Expand description
oxicuda-ssl — Self-supervised learning primitives for OxiCUDA.
Pure-Rust implementation of the four canonical SSL families, suitable for CPU simulation and PTX kernel generation for GPU execution.
§Architecture
oxicuda-ssl
├── contrastive/ — SimCLR (NT-Xent), MoCo (memory-bank InfoNCE)
├── non_contrastive/ — BYOL (cosine), Barlow Twins, VICReg
├── masked/ — MAE (random patch mask + reconstruction MSE)
├── clustering/ — SwAV (Sinkhorn-Knopp), DINO (centred + sharpened CE)
├── augment/ — Color jitter, multi-crop helpers
├── metrics/ — Uniformity, alignment, effective rank, collapse score
├── momentum/ — EmaUpdater for momentum-encoder schemes
├── head/ — MlpProjector, PredictorHead
├── error — SslError / SslResult
├── handle — SslHandle (SmVersion + LcgRng)
└── ptx_kernels — GPU PTX kernel stringsModules§
- augment
- Standard SSL data augmentation helpers operating on
[C, H, W]CHW tensors. - clustering
- Clustering SSL losses: SwAV (Sinkhorn-Knopp normalised assignments), DINO (centred + sharpened student-teacher cross-entropy), iBOT (masked image modeling with online tokenizer), and DeepCluster / DeeperCluster (k-means pseudo-label clustering).
- contrastive
- Contrastive SSL losses: SimCLR (NT-Xent) and MoCo (memory-bank InfoNCE).
- error
- Error types for
oxicuda-ssl. - handle
- Session handle for
oxicuda-ssl. - head
- Projection and predictor MLP heads used by SSL pipelines.
- masked
- Masked SSL losses: Masked Autoencoder (MAE) random-patch dropping + reconstruction MSE; SimMIM L1/L2 reconstruction with block & random masking; data2vec joint-embedding masked prediction (Baevski et al. 2022); BEiT discrete-token prediction (Bao et al. 2021).
- metrics
- Representation-quality metrics for self-supervised learning.
- momentum
- Momentum-encoder utilities (EMA target network update + scheduling).
- non_
contrastive - Non-contrastive SSL losses: BYOL (cosine target), Barlow Twins (cross-correlation), VICReg (variance + invariance + covariance), SimSiam (stop-gradient cosine), and MSN (masked siamese networks).
- prelude
- Convenience re-exports for common SSL types.
- ptx_
kernels - PTX GPU kernel sources for self-supervised learning operations.
- ssl
- High-level SSL model structs that own their own weights.