Knowledge distillation survey

From curiositech/windags-skills · View interactive version

Knowledge distillation survey is an AI agent skill from the GitHub repository curiositech/windags-skills. Comprehensive survey of knowledge distillation methods, architectures, and applications in neural network compression

How to use this skill

Skill file

Knowledge Distillation: A Survey

Core Concept

Knowledge distillation transfers learning from teacher systems to students across capability gaps. The key insight: effective transfer requires matching knowledge type, teacher capacity, and transfer mechanism to the student's representational constraints.

DECISION POINTS

Primary Decision Tree: Choosing Transfer Approach

1. ASSESS CAPACITY GAP
   ├── Small gap (teacher 1-2x student params) → Direct offline distillation
   ├── Large gap (teacher 10x+ student params) → Progressive with teacher assistants  
   └── Similar capacity/peer learning → Online collaborative distillation

2. IDENTIFY KNOWLEDGE TYPE NEEDED
   ├── Task needs final decisions → Response-based (soft labels, logits)
   ├── Task needs pattern recognition → Feature-based (intermediate representations)
   ├── Task needs structural reasoning → Relation-based (similarity matrices, attention maps)
   └── Task needs multiple types → Multi-level distillation

3. SELECT TRANSFER MECHANISM
   ├── Proven expert + stable domain → Offline (sequential training)
   ├── Exploration needed + multiple learners → Online (mutual learning)
   ├── No external teacher available → Self-distillation (temporal/spatial)
   └── Cross-modal/domain required → Alignment-based transfer

4. HANDLE REPRESENTATION GAPS
   ├── Same modality → Direct feature matching
   ├── Different modalities → Paired sample alignment
   ├── Different architectures → Attention transfer or feature adaptation
   └── Different tasks → Structural knowledge extraction

Capacity Gap Diagnostic

| Teacher-Student Performance Ratio | Approach | Rationale |

|-----------------------------------|----------|-----------|

| 1.1-1.5x | Direct distillation | Student can decode teacher knowledge |

| 1.5-3x | Add 1 teacher assistant | Bridge representational gap |

| 3x+ | Multi-step progressive | Prevent knowledge loss in translation |

| Similar performance | Collaborative learning | Mutual improvement through diversity |

FAILURE MODES

1. **Capacity Mismatch Collapse**

2. **Knowledge Type Confusion**

3. **Teacher Overconfidence Amplification**

4. **Cross-Modal Alignment Failure**

5. **Progressive Learning Degradation**

WORKED EXAMPLES

Example 1: Large Language Model Compression

Scenario: Compress GPT-3.5 (175B params) to run on mobile (500M params max)

Decision Process:

  1. Capacity gap assessment: 350x parameter difference = massive gap
  2. Knowledge type: Need response-based (text generation) + relation-based (reasoning chains)
  3. Progressive approach: GPT-3.5 → GPT-2 (1.5B) → GPT-small (500M)

Execution:

Expert catches: Temperature needs adjustment per stage; mobile model needs different attention patterns optimized for inference speed

Example 2: Cross-Modal Robotics Transfer

Scenario: Robot trained on RGB cameras must work with depth sensors only

Decision Process:

  1. Cross-modal gap: RGB (3 channels) → Depth (1 channel) with different semantic info
  2. Knowledge type: Feature-based (spatial understanding) + relation-based (object relationships)
  3. Alignment strategy: Paired RGB-depth data during distillation

Execution:

Expert catches: Depth lacks color/texture info; student needs different attention for material properties

QUALITY GATES

Task completion checklist for knowledge distillation:

NOT-FOR BOUNDARIES

Do NOT use knowledge distillation for:

Delegate to other skills:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.