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.
Multimodal contrastive alignment and transfer
1 · Prerequisites
- Absolute and Conditional Convergence; Rearrangement; Products
- Binary Operations, Monoids, Groups and Subgroups
- Compactness in Metric Spaces
- Completeness, Completion, and Uniform Continuity
- 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
- Countability and Uncountability
- Feedforward networks and single-hidden-layer universality
- Finite Counting, Factorials and Binomial Coefficients
- Foundations of the Real Numbers for Analysis
- Limits of Real Functions
- limsup, liminf, and Subsequential Limits
- Metric Spaces
- Monotone Functions, Discontinuities, and Continuity Sets
- Monotone Sequences, Bolzano-Weierstrass, and Cauchy Completeness
- Order, Zorn's Lemma, and the Axiom of Choice
- Power Series and Real-Analytic Functions
- Properties of the Integral and the Working FTC
- Relations, Functions, and Quotients
- Roots, Rational Powers, and Classical Inequalities
- Sequences and Limits
- Sequences and Series of Functions; Uniform Convergence
- Series: Convergence and the Nonnegative Tests
- Suprema and Infima
- The Derivative and the Mean Value Theorems
- The Exponential Function
- The Logarithm and General Powers
- The Riemann Integral: Definition and Integrability
- The ZFC Axioms and the Basic Set Constructions
- Topology of ℝ
- Vector Spaces, Linear Subspaces, Span and Direct Sums
2 · Logical flowchart
3 · Definitions, theorems and proofs
Symmetric image-text contrastive loss
Definition
Let and be nonempty sets of image and text inputs, let , and let be an indexed batch whose th image and th text are the designated matched pair. Let and be image and text encoder maps into one shared -dimensional space; any learned projection into that space is included in the corresponding map. A finite feedforward network on vectorized inputs is one possible encoder realization. Assume and for every . For , set and . Define normalized embeddings
For a learned real log-scale , set and define the logits . For each image-to-text row and text-to-image column, respectively, define
The two directional cross-entropies use the matched diagonal as their labels:
The symmetric image-text contrastive loss on this batch is
Since the batch is nonempty, the embeddings are nonzero, the exponential is finite and positive on real inputs, and the logarithm is defined on positive reals, every displayed normalization and loss term is well-defined. Each off-diagonal candidate in a row or column denominator is treated as a negative for that anchor, whether or not the corresponding image and text might also be semantically compatible. This is an index-matching objective on the supplied batch; it makes no assumption about latent classes, sampling, or semantic alignment.
For , the similarity matrix has this pattern. Row indexes image and column indexes text ; outlined diagonal cells are designated matches and dashed off-diagonal cells are other batch candidates. The definition and its formula do not rely on the diagram.
diagram failed to render:
\begin{tikzpicture}[x=1cm,y=1cm]
\node at (1.2,1.3) {text index $j$};
\node at (-1.25,-0.8) {image index $i$};
\node at (0,0.65) {$1$};
\node at (1.2,0.65) {$2$};
\node at (2.4,0.65) {$3$};
\node at (-0.55,0) {$1$};
\node at (-0.55,-0.8) {$2$};
\node at (-0.55,-1.6) {$3$};
\node[draw,thick,minimum width=1cm,minimum height=0.55cm] at (0,0) {$\ell_{11}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (1.2,0) {$\ell_{12}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (2.4,0) {$\ell_{13}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (0,-0.8) {$\ell_{21}$};
\node[draw,thick,minimum width=1cm,minimum height=0.55cm] at (1.2,-0.8) {$\ell_{22}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (2.4,-0.8) {$\ell_{23}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (0,-1.6) {$\ell_{31}$};
\node[draw,dashed,minimum width=1cm,minimum height=0.55cm] at (1.2,-1.6) {$\ell_{32}$};
\node[draw,thick,minimum width=1cm,minimum height=0.55cm] at (2.4,-1.6) {$\ell_{33}$};
\end{tikzpicture}Definition references
Radford et al., §§2.3–2.5 and Figure 3: batch matching objective, encoders, and training setup
Machine Learning II lecture notes, “The contrastive objective” and “Encoders and scaling”
Finite feedforward computation graphs and layered MLPs: a finite acyclic weighted/activation graph evaluates to an input-output map; this is one possible encoder model class here.
The real exponential function and the number by a power series: defines the real exponential on every real input by its convergent power series.
The exponential is a continuous bijection from onto : the real exponential has positive range, so the scale and softmax denominators are positive.
The natural logarithm as the inverse of the exponential function: defines the logarithm on positive reals as the inverse of the exponential.
Zero-shot prompt classification
Definition
Fix image and text encoder maps and into one shared embedding space, and a real log-scale with . The inputs are an image , an ordered nonempty list of distinct class descriptions , and a finite nonempty list of prompt templates , where each maps a class description to a text input. The admissible input conditions are , for every , and a nonzero average text embedding for every class.
-
Normalize the image embedding: .
-
For each class and template , form the text embedding .
-
Average the normalized prompt embeddings in the shared embedding space and normalize the average to obtain the class prototype . This is prompt-template averaging; it averages embeddings before classification, not class probabilities.
-
For each class compute the scaled similarity score and softmax probability .
-
Return the vector and class , where is the least index maximizing .
The returned classifier is zero-shot in the precise sense that no labeled examples from the target classification dataset are used to fit its class prototypes or classifier. The encoder maps, log-scale, class descriptions, and templates are fixed inputs to this inference procedure; it performs no training or parameter update. The procedure makes no accuracy or distribution-generalization guarantee.
Definition references
Machine Learning II lecture notes, “Zero-shot transfer” and “Prompt engineering”/“Prompt ensembling”
Symmetric image-text contrastive loss: supplies the shared image/text embedding space, normalized inner-product score convention, and positive learned exponential scale.
The real exponential function and the number by a power series: defines the real exponential used in the logit scale and softmax.
The exponential is a continuous bijection from onto : gives positivity of exponential scores and softmax denominators.
4 · Examples, counterexamples and false statements
None yet.