SelfSupervisedLearningMetrics<T>
Models & Types · AiDotNet.SelfSupervisedLearning.Evaluation
Metrics for monitoring and evaluating self-supervised learning.
For Beginners
These metrics help track the quality of SSL training and detect potential issues like representation collapse. Monitoring these during training helps ensure the model is learning useful representations.
How It Works
Key metrics:
Constructors
| Constructor | Summary |
|---|---|
SelfSupervisedLearningMetrics() |
Methods
| Method | Summary |
|---|---|
SelfSupervisedLearningMetricReport<T> ComputeFullReport(Tensor<T> z1, Tensor<T> z2) |
Computes a full set of SSL metrics. |
T ComputeAlignment(Tensor<T> z1, Tensor<T> z2) |
Computes alignment loss between positive pairs. |
T ComputeCosineSimilarity(Tensor<T> z1, Tensor<T> z2) |
Computes cosine similarity between corresponding pairs. |
T ComputeEffectiveRank(Tensor<T> representations) |
Computes the effective rank of the representation matrix. |
T ComputeRepresentationStd(Tensor<T> representations) |
Computes the standard deviation of representations (collapse detection). |
T ComputeUniformity(Tensor<T> representations, double t) |
Computes uniformity loss (how uniformly distributed embeddings are). |
bool DetectCollapse(Tensor<T> representations, double threshold) |
Detects if representations are collapsing. |