ML Systems Lab Open interactive version →
Intermediate 50 min read tabular SSLSCARFVIMEgraph SSLwav2vec

SSL on Non-Image and Non-Text Data

Tabular SSL (SCARF, VIME), graph SSL, audio SSL (wav2vec, HuBERT), domain applicability

A fraud detection dataset: 200 features, 5% labeled, 95% unlabeled. A supervised XGBoost model on the labeled 5% achieves baseline AUC. SCARF—self-supervised contrastive learning using random feature corruption—pretrain on all data, then fine-tune on the labeled 5%, and AUC improves. The question worth understanding is: why does this particular corruption strategy work, and when does it not?

SCARF corrupts a fraction α of feature values by replacing them with draws from that feature's marginal distribution. The original row and the corrupted row form a positive pair. NT-Xent loss runs over positive and in-batch negative pairs. The key design choice is marginal-distribution corruption: a drawn value looks plausible—it falls within the natural range of that feature—so the model cannot detect corruption by checking whether values are out-of-range. Detection requires understanding how features relate to each other. If a patient's age is 35 but their feature for "years since retirement" suddenly draws a value of 12, the model must understand that these features are correlated to notice the inconsistency. The SSL pretraining forces encoding of inter-feature relationships, which is exactly what transfers to downstream fraud detection. VIME takes a complementary route to the same problem: instead of a contrastive pull-push objective, it pretrains the encoder on two reconstruction pretext tasks—estimating which features were masked and reconstructing their original corrupted values—forcing the same inter-feature dependency encoding through denoising rather than contrastive alignment.

This logic also predicts when tabular SSL fails. If features are heavily engineered—explicitly encoding the correlations that SCARF would otherwise force the model to learn—then pretraining learns redundant structure. If the labeled dataset is large enough that supervised training can already capture inter-feature relationships directly, SSL adds noise without signal. The overhead is only justified when unlabeled data is substantially larger than labeled data and features are not already explicitly relational.

Audio SSL (wav2vec 2.0, HuBERT) is the most successful SSL transfer outside text and vision precisely because speech has natural temporal structure—phonemes, words, prosody—that maps cleanly onto masked prediction without special augmentation design. Fine-tuning on just 10 minutes of labeled speech still achieves a competitive word error rate — a separate, even more extreme low-label result. The paper's headline "100× less labeled data" figure specifically compares its 100-hour labeled fine-tune to prior state of the art, not the 10-minute case.

NOT this. "Tabular SSL always helps when you have unlabeled data" is wrong. If features are heavily engineered and correlations are already explicit, SSL learns redundant structure it cannot leverage downstream. The unlabeled data advantage only materializes when the SSL pretext task discovers non-obvious inter-feature relationships that supervised training on the small labeled set would miss.

Key points

Takeaway

SSL does not transfer seamlessly across domains—the corruption or augmentation strategy must reflect what variations leave the semantic identity of a sample invariant. For tabular data, marginal-distribution corruption forces detection through inter-feature relationships, which is exactly what transfers downstream. For audio, temporal masking maps onto the same masked prediction framework that works for text. The pretext task design question is always: what shortcut would a lazy model exploit, and how does the design eliminate it?

Recap

Check your understanding

Q1. Select the two plausible causes of SCARF failing to improve AUC over the XGBoost baseline on this fraud dataset.

Q2. wav2vec 2.0 uses both a quantizer and a contrastive loss. Why is the quantizer needed? What would happen if you used the continuous representations as targets instead?

Q3. Compare GraphCL`s edge-drop augmentation for molecular graphs vs social network graphs. Why does the same augmentation have different effects across domains?

Try it interactively

ML Systems Lab is a free interview-prep platform for ML engineers — work through the full interactive module, quizzes, and drills.

Open ML Systems Lab →