Representation Learning

Representation learning trains a model to transform raw inputs into features that make downstream tasks easier.

A representation model maps inputs to embeddings:

A downstream model then predicts from :

The representation can be learned with supervised labels, self-supervised signals, contrastive objectives, masked modeling, or generative pretraining.

The useful representation is not necessarily the one that preserves everything. It should preserve information needed for downstream tasks and discard nuisance variation:

where is task-relevant information and is nuisance variation.

Representation Contract

FieldQuestion
input objectIs a token, sequence, image, graph, molecule, protein, pocket, complex, or structure?
representation unitDoes one represent a token, residue, node, graph, molecule, protein, pair, or full example?
pooling/readoutIs obtained by CLS token, mean pooling, graph pooling, attention pooling, or task-specific readout?
invarianceWhich transformations should leave unchanged: permutation, rotation, translation, augmentation, or assay source?
equivarianceDoes the representation need to transform with coordinates, vectors, forces, or fields?
selection ruleWhich checkpoint, layer, pooling rule, or embedding dimension is selected on validation data?
evaluation budgetIs the downstream evaluator linear, kNN, retrieval, shallow model, or full fine-tuning?

Objective Families

FamilyTypical ObjectiveMain Claim
supervised representationrepresentation is useful for the supervised label
contrastive learningpull positive views together, push negatives apartrepresentation preserves view-invariant semantics
masked modelingreconstruct masked token, patch, node, residue, or coordinatecontext encodes predictable structure
predictive coding / JEPApredict latent target from contextrepresentation captures abstract state rather than raw pixels/tokens
autoencodingreconstruct through a bottleneckcompression preserves enough information
generative pretrainingmaximize or approximate learned features support likelihood or sampling

For contrastive representation learning, a common normalized similarity form is:

The meaning of a “positive” pair must match the downstream claim. Two augmented molecules, two protein homologs, or two views of the same image encode very different assumptions.

Failure Modes

FailureSymptomCheck
collapseembeddings become nearly identicalvariance, rank, covariance spectrum
shortcut featurerepresentation encodes source, split, scaffold, or artifactsource-stratified metric and leakage audit
wrong invarianceaugmentation removes task-relevant signalview policy vs downstream label semantics
overpowered evaluatordownstream head learns the task from labels, not the representationcompare linear probe, kNN, and fine-tuning budgets
cache leakageembeddings are fitted, normalized, or selected using test datacache provenance and split-aware preprocessing

Checks

  • What information should the representation preserve or discard?
  • Is the representation instance-level, token-level, graph-level, or structure-level?
  • Does it transfer to downstream tasks under a realistic split?
  • Are embeddings evaluated with linear probes, fine-tuning, retrieval, or task metrics?
  • Does the representation avoid collapse?
  • Is the selected layer, pooling rule, and embedding dimension fixed before final test evaluation?
  • Does the representation claim survive a simple baseline such as fingerprints, sequence identity, or bag-of-tokens?