How statement and proof provenance work
The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.
- Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
- AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
- AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.
These labels describe origin, not correctness: citations and verification chips remain separate evidence.
Self-supervised and contrastive representations — Examples
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- Concentration
- Conditional Distributions and Regular Conditional Probability
- Conditional Expectation
- Construction of the Natural Numbers
- Construction of the Real Numbers via Cauchy Sequences
- Construction of the Real Numbers via Dedekind Cuts
- Continuity, IVT, EVT, and Uniform Continuity
- Convexity
- Cosets, Index and Lagrange's Theorem
- Countability and Uncountability
- Darboux, L'Hôpital, and Taylor's Theorem
- Discrete Time Martingales
- Divisibility, Euclidean Domains, Principal Ideal Domains and Unique Factorisation
- Dual Spaces, Bilinear and Quadratic Forms, and Sylvester's Law of Inertia
- Empirical-Process Complexity
- Estimators and Randomized Procedures
- Finite Counting, Factorials and Binomial Coefficients
- Finite Probability Spaces and Random Variables
- Foundations of the Real Numbers for Analysis
- Ideals, Quotient Rings and the Isomorphism Theorems for Rings
- Independence Borel Cantelli and Zero One Laws
- Inner Product Spaces, Gram-Schmidt, Projections and Adjoints
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Linear Independence, Bases and Dimension
- Linear Transformations, Rank-Nullity and Quotient Spaces
- Loss, Risk and Decision Theory
- Martingale Inequalities and Convergence
- Measurable Functions and Simple Approximation
- Measures and Their Basic Properties
- Metric Spaces
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Normal Subgroups and Quotient Groups
- Order, Zorn's Lemma, and the Axiom of Choice
- Outward rounded interval and ball arithmetic
- Polynomial Rings, the Division Algorithm and Roots
- Power Series and Real-Analytic Functions
- Prediction problems, risks, and empirical minimization
- Probability Spaces Random Variables and Expectation
- Product Measures and the Fubini Tonelli Theorems
- Properties of the Integral and the Working FTC
- Rademacher complexity and uniform generalization
- Relations, Functions, and Quotients
- Rings, Subrings, Integral Domains and Fields
- Rⁿ as a Normed Space; Vector-Valued Functions
- Roots, Rational Powers, and Classical Inequalities
- Self-supervised and contrastive representations
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Sigma Algebras and Borel Sets
- Signed and Complex Measures Hahn and Jordan
- Simple Field Extensions and the Construction of the Complex Numbers
- Statistical Experiments, Models and Identifiability
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Exponential Function
- The Lebesgue Integral and the Convergence Theorems
- The Logarithm and General Powers
- The Lᵖ Spaces Holder Minkowski and Riesz Fischer
- The Radon Nikodym Theorem and Lebesgue Decomposition
- The Riemann Integral: Definition and Integrability
- The Spectral Theorem, Positive Operators and Singular Value Decomposition
- The Topology of Euclidean Space
- The ZFC Axioms and the Basic Set Constructions
- Topological Spaces and Continuity
- Topology of ℝ
- Triangularisation, Generalised Eigenspaces and Jordan Canonical Form
- Vector Spaces, Linear Subspaces, Span and Direct Sums
- Weak Laws and Series of Independent Random Variables
2 · Logical flowchart
3 · Definitions, theorems and proofs
None yet.
4 · Examples, counterexamples and false statements
A negative sample collides with the positive class
Example
Let the latent classes be with equal probabilities, let each class contain one deterministic input, and define a scalar representation by and . Use one independent marginal negative and the hinge loss. The probability that the negative class equals the positive-pair class is . Conditional on such a collision, the contrastive score is always zero and the conditional loss is . Conditional on distinct classes, the ordered pair has loss and has loss , so and the full contrastive risk is .
Example references
Latent-class contrastive representation learning: defines the positive-pair and independent-negative sampling laws.
Convexity, Lipschitz bounds, and oscillation of the source contrastive losses: defines the hinge loss used in the calculation.
Saunshi et al., Section 4.2 and Equation (8): decomposes the objective by whether the negative class collides with the positive class.
Facts & Assumptions
Given: Two equally likely classes , deterministic inputs, , , one independent marginal negative, and hinge loss.
The positive and negative classes are independent with law , so equality has probability and inequality has probability . Latent-class contrastive representation learning
The hinge contrastive loss is and equals at score . Convexity, Lipschitz bounds, and oscillation of the source contrastive losses
Proof
Given: The finite sampling model in the Example.
If the negative class equals the positive class, the anchor, positive sample and negative sample all have the same representation. Thus and [F2] gives collision loss .
If the ordered classes are , the anchor representation is , hence and loss . If they are , then , hence the hinge loss is . The two ordered cases are equiprobable given inequality, so .
The collision decomposition weights the two conditional losses by and . Therefore , with a positive contribution from negative-class collisions.
High within-class variance raises contrastive loss despite perfect mean separation
Example
Let be uniform and let each class contain two equally likely inputs indexed by . In , define and for . Each class mean is respectively and , so the mean classifier separates both classes with hinge loss zero. Yet for one independent marginal negative and hinge contrastive loss, the total risk is , which grows without bound as the within-class variance increases. The norm bound holds with for each fixed .
Example references
Latent-class contrastive representation learning: defines the latent-class triplet law, mean classifier, covariance and contrastive risk.
Convexity, Lipschitz bounds, and oscillation of the source contrastive losses: defines the hinge loss.
Saunshi et al., Section 5.1 and Figure 1(b): gives a two-class example where high within-class variation raises the unsupervised loss despite a good mean classifier.
Facts & Assumptions
Given: The two-class distribution and representation in the Example, one independent marginal negative, and hinge loss.
The class means are and ; the mean classifier for the ordered task has weight . Latent-class contrastive representation learning
The class-mean hinge risk uses loss , and the contrastive hinge loss is . Latent-class contrastive representation learning, Convexity, Lipschitz bounds, and oscillation of the source contrastive losses
Given the positive class, the negative class equals it with probability ; conditional on collision, the score's random part is , whose values have probabilities . Conditional on distinct classes, the score is with the same three probabilities. Latent-class contrastive representation learning
Proof
Given: The finite class-conditional laws in the Example.
For the task , the mean weight is . On class with label , for either ; on class with label , it is also . The hinge loss is therefore zero for both labels. Swapping the ordered task gives the same result, so the average mean-classifier hinge risk is zero.
Conditional on a class collision, [F3] gives score values with probabilities . Since , their hinge losses are , respectively. Thus .
Conditional on distinct classes, the score values are with probabilities . For , their hinge losses are . Hence .
Collision and distinct-class events each have probability . Combining steps 1.2 and 1.3 yields . This tends to infinity with , while step 1.1 keeps the mean-classifier hinge risk zero.
An augmentation that erases the label-relevant class coordinate
Example
Let the raw input be , where the latent class is and, conditional on either class, the nuisance coordinate is uniform on . Apply the augmentation before forming positive pairs and negative samples. The resulting input law is the same uniform law for both classes, so and the observed triplets carry no class-dependent distributional signal. Consequently, every deterministic representation of the augmented input is independent of the binary task label, and its optimal average hinge risk for a uniform-label two-class task is exactly ; the erased class coordinate is unavailable to both the contrastive learner and the downstream linear classifier.
Example references
Latent-class contrastive representation learning: defines the class-conditional post-augmentation laws and binary tasks.
Convexity, Lipschitz bounds, and oscillation of the source contrastive losses: defines the hinge loss used to compute the downstream risk.
Chen et al., Section 3: explains how augmentation choices define the predictive tasks in contrastive learning.
Facts & Assumptions
Given: The two latent classes, the nuisance law, the deterministic augmentation , and a deterministic representation of the augmented input.
After augmentation, is uniform on , so the observed input has the same law under both labels. Latent-class contrastive representation learning
For a fixed score , the average hinge loss over uniform labels is , which is at least for every real ; choosing gives risk . Convexity, Lipschitz bounds, and oscillation of the source contrastive losses
Proof
Given: The finite model in the Example.
Since and is uniform independently of , each post-augmentation class law is the same uniform law . The mixture formula gives and for all subsets of the finite input space, hence . Thus the observed triplet law is , independent of the latent task labels, and every score has the same distribution under both labels.
For each fixed score , if then . If , the sum is ; if , it is . Therefore [F2] gives average risk at least after integrating over the common input law, and attains . The class coordinate erased by cannot be recovered by this downstream classifier.
SimCLR reports an empirical projection-head effect
Example
In SimCLR's ImageNet experiments, a projection head is a map applied to the encoder representation to produce ; linear evaluation trains a linear classifier on a fixed representation. The authors report a comparison among an identity head, a linear projection head, and a nonlinear projection head with one additional hidden layer and ReLU. In their Figure 8, the nonlinear head's pre-projection representation scores about three percentage points above the linear-head condition and more than ten points above the no-head condition; they also report that scores more than ten points above the projected representation . Their default setup uses a ResNet-50 encoder, a two-layer MLP projection head to a 128-dimensional latent space, NT-Xent (normalized temperature-scaled cross-entropy), batch size 4096 and 100 training epochs. These are reported empirical results under the paper's evaluation protocol, not a theorem that projection heads universally improve representations.
Example references
Latent-class contrastive representation learning: supplies the representation-learning context only; the reported benchmark is empirical.
Chen et al., Section 4 default setup and Section 4.2, Figure 8: reports the encoder/head configuration and linear-evaluation comparisons.
Chen et al., Supplementary Appendix B.4: provides additional projection-head analysis.
Facts & Assumptions
Given: The published SimCLR paper and its ImageNet projection-head experiments.
The default configuration in Section 4 uses a ResNet-50 base encoder, a two-layer MLP projection head to dimension 128, NT-Xent, batch size 4096 and 100 epochs. Chen et al., Section 4, default setting
Figure 8 reports linear evaluation for identity, linear and nonlinear projection heads; its text reports roughly a three-point gain over a linear projection, more than ten points over no projection, and more than ten points for pre-projection over . Chen et al., Section 4.2 and Figure 8
Proof
Given: The complete relevant passages of the SimCLR paper inspected in [F1] and [F2].
The setup in [F1] identifies the encoder, projection head, latent dimension, loss, batch size and training duration for the reported default experiment.
The linear-evaluation comparisons in [F2] state the reported relative performance of the three head choices and of versus . The Example reports those empirical comparisons with their stated experimental scope and makes no universal claim.
The hinge margin comparison does not extend to logistic contrastive loss
Example
Consider two equally likely deterministic classes and the scalar representation , , so , , and the classwise centered representation has sub-Gaussian proxy . For the distinct-class tasks, the mean classifier has logistic risk
while its source hinge margin risk at is exactly . The logistic contrastive risk conditioned on distinct classes has the same value as the displayed logistic mean-classifier risk. Consequently, for every smaller than the positive gap, the source hinge margin comparison fails for logistic contrastive loss. In particular, the hinge-margin corollary cannot be transferred unchanged to logistic training.
For the optional transfer comparison, assume the Axiom of Choice, fix and , impose the corollary's remaining model, risk and supremum measurability, and measurable exact-empirical-minimizer hypotheses, and use the singleton . The proposed extension is
where uses logistic task loss, uses the scaled hinge margin loss, here, and
uses the logistic loss oscillation. The example tests this claimed mean-classifier bound with logistic contrastive training.
Example references
Latent-class contrastive representation learning: defines the latent-class risks, scores and centered classwise representations.
Convexity, Lipschitz bounds, and oscillation of the source contrastive losses: defines the base-2 logistic loss and hinge margin loss.
Class-conditional sub-Gaussian concentration yields a contrastive margin bound: states the one-negative margin inequality for hinge contrastive loss.
Sub-Gaussian contrastive transfer with a mean-classifier margin loss: states the source margin transfer corollary with its hinge-only scope.
The Axiom of Choice: supplies the choice assumption for the optional transfer comparison.
Saunshi et al., Lemma 5.1 and Corollary 5.1.1: states the margin comparison in the hinge-loss section.
Facts & Assumptions
Given: The deterministic two-class model and representation in the Example; base-2 logistic contrastive loss; hinge loss for the scaled mean-classifier margin; and . For the optional transfer comparison, also assume AC, , , the stated risk and supremum measurability hypotheses, and a measurable exact empirical selector for .
The optional transfer comparison assumes the Axiom of Choice required by the transfer corollary's uniform-generalization route. The Axiom of Choice, Sub-Gaussian contrastive transfer with a mean-classifier margin loss
The ordered distinct class pairs and have equal conditional probability, the means equal their deterministic embeddings, and the positive-pair and negative sampling rules are those in the latent-class model. Latent-class contrastive representation learning
The contrastive score is , logistic loss is , and the scaled hinge mean-classifier loss is . Latent-class contrastive representation learning, Convexity, Lipschitz bounds, and oscillation of the source contrastive losses
The source sub-Gaussian margin parameter equals when , and the source margin corollary is hinge-only. Class-conditional sub-Gaussian concentration yields a contrastive margin bound, Sub-Gaussian contrastive transfer with a mean-classifier margin loss
Proof
Given: The finite deterministic model in the Example.
The class means are and . For task , the mean weight is . The positive-label example has logistic argument , while the negative-label example has argument . Swapping the classes gives the same two losses in reverse order, proving the displayed mean-classifier logistic risk.
For the mean classifier, the two hinge-margin arguments at are and , so the losses are and and their average is . The sub-Gaussian proxy is zero because each class is deterministic, so [F3] gives for every permitted .
For distinct classes, the contrastive score is for and for . Therefore , equal to the value in step 1.1.
The exponential series has positive terms and . Hence , so ; also . Thus the value in step 2.1 exceeds by a positive gap . Choose . Then , contradicting the proposed logistic extension.
Under [A1] and the transfer hypotheses in the Statement, take and the logistic objective. The only element is an exact empirical minimizer, its vector Rademacher complexity is zero because the expectation of its finite signed sum is zero, and because both class covariances vanish. Therefore as for the fixed . The mean-classifier logistic risk exceeds by , while the proposed logistic-training extension would upper-bound that risk by (since ). Taking and then large enough that makes that right side less than , contradicting .
Sources
- Nikunj Saunshi et al., A Theoretical Analysis of Contrastive Unsupervised Representation Learning, Section 4.2, Equation (8)
- Nikunj Saunshi et al., A Theoretical Analysis of Contrastive Unsupervised Representation Learning, Section 5.1 and Figure 1(b)
- Ting Chen et al., A Simple Framework for Contrastive Learning of Visual Representations, Section 3
- Ting Chen et al., A Simple Framework for Contrastive Learning of Visual Representations, default setting in Section 4 and Section 4.2, Figure 8
- Ting Chen et al., A Simple Framework for Contrastive Learning of Visual Representations, Supplementary Appendix B.4
- Nikunj Saunshi et al., A Theoretical Analysis of Contrastive Unsupervised Representation Learning, Lemma 5.1 and Corollary 5.1.1