Alphabeta Math
Pipeline-generated
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

2 · Logical flowchart

3 · Definitions, theorems and proofs

DefinitionDefinition: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Symmetric image-text contrastive loss

Definition

Let X and T be nonempty sets of image and text inputs, let d,N≥1, and let ((xi,ti))i=1N be an indexed batch whose ith image and ith text are the designated matched pair. Let fθ:X→Rd and gϕ:T→Rd be image and text encoder maps into one shared d-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 fθ(xi)≠0 and gϕ(ti)≠0 for every i. For a,b∈Rd, set ⟨a,b⟩:=∑r=1darbr and ∥a∥2:=⟨a,a⟩. Define normalized embeddings

ui:=fθ(xi)∥fθ(xi)∥2,vi:=gϕ(ti)∥gϕ(ti)∥2.

For a learned real log-scale τ, set s:=exp⁡(τ)>0 and define the logits ℓij:=s⟨ui,vj⟩. For each image-to-text row and text-to-image column, respectively, define

pijI→T:=exp⁡(ℓij)∑k=1Nexp⁡(ℓik),pjiT→I:=exp⁡(ℓij)∑k=1Nexp⁡(ℓkj).

The two directional cross-entropies use the matched diagonal as their labels:

LI→T:=−1N∑i=1Nlog⁡piiI→T,LT→I:=−1N∑j=1Nlog⁡pjjT→I.

The symmetric image-text contrastive loss on this batch is

Lsym:=12(LI→T+LT→I).

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 N=3, the similarity matrix has this pattern. Row i indexes image i and column j indexes text j; 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 e by a power series: defines the real exponential on every real input by its convergent power series.

The exponential is a continuous bijection from R onto (0,∞): 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.

AlgorithmAlgorithm: Literature-sourcedProof: Not applicablejudge pass (gpt-6-luna)Open item page →

Zero-shot prompt classification

Definition

Fix image and text encoder maps fθ:X→Rd and gϕ:T→Rd into one shared embedding space, and a real log-scale τ with s:=exp⁡(τ)>0. The inputs are an image x∈X, an ordered nonempty list of distinct class descriptions C=(c1,…,cK), and a finite nonempty list of prompt templates T=(t1,…,tM), where each tm maps a class description to a text input. The admissible input conditions are fθ(x)≠0, gϕ(tm(ck))≠0 for every k,m, and a nonzero average text embedding for every class.

  1. Normalize the image embedding: u:=fθ(x)/∥fθ(x)∥2.

  2. For each class ck and template tm, form the text embedding vkm:=gϕ(tm(ck))/∥gϕ(tm(ck))∥2.

  3. Average the normalized prompt embeddings in the shared embedding space and normalize the average to obtain the class prototype qk:=(1M∑m=1Mvkm)/∥1M∑m=1Mvkm∥2. This is prompt-template averaging; it averages embeddings before classification, not class probabilities.

  4. For each class compute the scaled similarity score zk:=s⟨u,qk⟩ and softmax probability pk:=exp⁡(zk)/∑r=1Kexp⁡(zr).

  5. Return the vector (p1,…,pK) and class ck∗, where k∗ is the least index maximizing zk.

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.

4 · Examples, counterexamples and false statements

None yet.

Sources