← Mathematical compendium

Published equation contexts

L=−12B∑i=1B[log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨ui,vj⟩/τ)+log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨uj,vi⟩/τ)]\mathcal{L} = -\frac{1}{2B}\sum_{i=1}^{B}\left[\log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_i, v_j\rangle/\tau)} + \log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_j, v_i\rangle/\tau)}\right]

Why this formula appears here

Radford and colleagues’ 2021 paper, “Learning Transferable Visual Models From Natural Language Supervision,” is usually remembered simply as CLIP, and the compression loses the specific thing that made it a turning point rather than an incremental improvement. The method itself is not exotic: encode an image, encode its paired caption, and train both encoders so that the true pairing scores higher than every mismatched pairing drawn from the same batch. For a batch of B image-text pairs with normalised image embedding uiu_i , text embedding viv_i , and a learned temperature τ\tau , the symmetric form of the objective is L=−12B∑i=1B[log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨ui,vj⟩/τ)+log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨uj,vi⟩/τ)]\mathcal{L} = -\frac{1}{2B}\sum_{i=1}^{B}\left[\log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_i, v_j\rangle/\tau)} + \log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_j, v_i\rangle/\tau)}\right]. an image-to-text and a text-to-image cross-entropy…

Read the full article-specific guide →

Read the representative guide

BB

Symbol B

B occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
ii

Symbol i

i appears in the bound of this sum. The bound states where the repeated operation starts, ends, or which values it includes.

Read this term in its guide →
jj

Symbol j

j occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
vjv_j

Symbol v_j

vjv_j occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
uju_j

Symbol u_j

uju_j occurs below the fraction bar. The quantity above the bar is divided by this expression; zero is excluded as a denominator.

Read this term in its guide →
i=1i=1

Starting index or lower bound: i=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Read this term in its guide →
BB

Ending index or upper bound: B

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Read this term in its guide →
exp⁡(⟨ui,vi⟩/τ)\exp(\langle u_i, v_i\rangle/\tau)

Numerator: exp(langle u_i, v_irangle/τ)

The complete quantity above the fraction bar.

Read this term in its guide →
∑j=1Bexp⁡(⟨ui,vj⟩/τ)\sum_{j=1}^{B}\exp(\langle u_i, v_j\rangle/\tau)

Denominator: sum_j=1^Bexp(langle u_i, v_jrangle/τ)

The complete quantity below the fraction bar; it must be nonzero for this division.

Read this term in its guide →
j=1j=1

Starting index or lower bound: j=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Read this term in its guide →
BB

Ending index or upper bound: B

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Read this term in its guide →
exp⁡(⟨ui,vi⟩/τ)\exp(\langle u_i, v_i\rangle/\tau)

Numerator: exp(langle u_i, v_irangle/τ)

The complete quantity above the fraction bar.

Read this term in its guide →
∑j=1Bexp⁡(⟨uj,vi⟩/τ)\sum_{j=1}^{B}\exp(\langle u_j, v_i\rangle/\tau)

Denominator: sum_j=1^Bexp(langle u_j, v_irangle/τ)

The complete quantity below the fraction bar; it must be nonzero for this division.

Read this term in its guide →
j=1j=1

Starting index or lower bound: j=1

This label says where the repeated addition, multiplication, or accumulation starts. Read its value or condition together with the article’s description of the index.

Read this term in its guide →
BB

Ending index or upper bound: B

This label says where the repeated addition, multiplication, or accumulation stops. It sets the last term or end of the range.

Read this term in its guide →

How to interpret it

With a fixed numerator, increasing a nonzero denominator reduces the fraction. Read it with the definitions, units, and assumptions supplied by the article.

Research cited beside this formula

Published contexts (1)

A symbol can carry a different meaning in another article. Each occurrence keeps its own guide and term definitions.

L=−12B∑i=1B[log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨ui,vj⟩/τ)+log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨uj,vi⟩/τ)],\mathcal{L} = -\frac{1}{2B}\sum_{i=1}^{B}\left[\log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_i, v_j\rangle/\tau)} + \log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_j, v_i\rangle/\tau)}\right],

Equation 5 · Foundation Models

A History of Multimodal AI

This equation states an equality: the expressions on both sides have the same value under the article’s assumptions.

Radford and colleagues’ 2021 paper, “Learning Transferable Visual Models From Natural Language Supervision,” is usually remembered simply as CLIP, and the compression loses the specific thing that made it a turning point rather than an incremental improvement. The method itself is not exotic: encode an image, encode its paired caption, and train both encoders so that the true pairing scores higher than every mismatched pairing drawn from the same batch. For a batch of B image-text pairs with normalised image embedding uiu_i , text embedding viv_i , and a learned temperature τ\tau , the symmetric form of the objective is L=−12B∑i=1B[log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨ui,vj⟩/τ)+log⁡exp⁡(⟨ui,vi⟩/τ)∑j=1Bexp⁡(⟨uj,vi⟩/τ)]\mathcal{L} = -\frac{1}{2B}\sum_{i=1}^{B}\left[\log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_i, v_j\rangle/\tau)} + \log\frac{\exp(\langle u_i, v_i\rangle/\tau)}{\sum_{j=1}^{B}\exp(\langle u_j, v_i\rangle/\tau)}\right]. an image-to-text and a text-to-image cross-entropy…

Meanings in this article

Equation guide → · Article →