ICurriculumDistillationStrategy<T>
Interfaces · AiDotNet.KnowledgeDistillation.Strategies
Interface for curriculum distillation strategies that progressively adjust training difficulty.
Known implementations: CurriculumDistillationStrategyBase<T>
For Beginners
Curriculum learning is inspired by how humans learn - starting with easy concepts and gradually increasing difficulty. This interface defines strategies that control this progression during knowledge distillation.
How It Works
Key Concepts:
- Progressive Difficulty: Training difficulty increases (or decreases) over time
- Sample Filtering: Only include samples appropriate for current curriculum stage
- Temperature Progression: Temperature adjusts based on training progress
Common Curriculum Strategies:
- Easy-to-Hard: Start with simple samples, gradually add harder ones
- Hard-to-Easy: Start with challenging samples, then easier ones (for fine-tuning)
- Paced Learning: Combine difficulty-based and time-based progression
When to Use:
- Training data has clear difficulty levels
- Student model benefits from structured learning progression
- You want to prevent overwhelming the student early in training
Properties
| Property | Summary |
|---|---|
double CurriculumProgress { get; } |
Gets the current curriculum progress as a ratio (0.0 to 1.0). |
double MaxTemperature { get; } |
Gets the maximum temperature for the curriculum range. |
double MinTemperature { get; } |
Gets the minimum temperature for the curriculum range. |
int TotalSteps { get; } |
Gets the total number of steps/epochs in the curriculum. |
Methods
| Method | Summary |
|---|---|
bool ShouldIncludeSample(int sampleIndex) |
Determines if a sample should be included in the current curriculum stage. |
double ComputeCurriculumTemperature() |
Computes the curriculum-adjusted temperature based on current progress. |
double? GetSampleDifficulty(int sampleIndex) |
Gets the difficulty score for a specific sample, if set. |
void SetSampleDifficulty(int sampleIndex, double difficulty) |
Sets the difficulty score for a specific training sample. |
void UpdateProgress(int step) |
Updates the current curriculum progress. |