Skip to content

Image-language and multimodal models · Image-language and multimodal models · MM002 · Model

ALIGN

Scales image-text dual-encoder learning using a very large collection of noisy alt-text pairs. Its contribution emphasizes the interaction of data scale, noisy supervision and simple alignment, rather than requiring a…

Explained here Component demo, not a trained model CodeSplash's run and the reference's record

In CodeSplash

Documented in the Academy only. There's no Set up button.

Availability
Explained here
Code example
Component demo, not a trained model
Who ran it
CodeSplash's run and the reference's record
CodeSplash's run
The reference's example ran here in one language.
The reference's record
Python: Ran in the reference's review. The report doesn't record which version of the code ran. R: Reviewed but not run: R wasn't available to the reference's authors.

Purpose

Scales image-text dual-encoder learning using a very large collection of noisy alt-text pairs. Its contribution emphasizes the interaction of data scale, noisy supervision and simple alignment, rather than requiring a new hypothesis-testing statistic.

Question / objective

How much transferable visual/language alignment can a simple dual encoder learn from noisy web pairing at large scale? The learning target replaces a null/alternative hypothesis formulation; benchmark evaluation is a separate statistical task.

Method type and supervision

Model/system family. Image-language or broader multimodal learning using the paired, generated or task-specific supervision described below. This is not a classical significance test.

Architecture / computational structure

A visual encoder and text encoder map their inputs into a shared normalized space, trained contrastively using matched pairs and in-batch alternatives. The published system combines a convolutional image backbone with a language transformer.

Assumptions

Alt text is weak supervision rather than a verified image annotation. Scaling noisy data does not remove duplicate, bias or evaluation-contamination problems. Some apparent negatives are semantically compatible, and deployment language may differ sharply from web captions.

Formula / computational definition

Li→t=−∑ilog⁡exp⁡(s(vi,ti)/τ)∑jexp⁡(s(vi,tj)/τ)L_{i\to t}=-\sum_i\log\frac{\exp(s(v_i,t_i)/\tau)}{\sum_j\exp(s(v_i,t_j)/\tau)} is one direction of alignment; the complete contrastive recipe includes the corresponding reverse direction and specified normalization. This captures the central mechanism; consult the primary source for all masks, stages, normalizations and loss terms.

Parameters and notation

Learned/estimated quantities: Encoder/projection weights and scaling parameters are learned. Pair identities and data mixture define supervision; data-cleaning rules are not model parameters inferred by the contrastive loss. Hyperparameters and design choices: Pair filtering, duplication policy, batch size, negative ratio, image/text lengths and language mixture affect both compute and semantic coverage.

Fitting, fine-tuning, and adaptation

Use a compatible pretrained encoder if available; reproduce data assumptions before claiming equivalence to the original training. Tune small heads/projections first, then selected encoder layers, and retain broad-domain retrieval to detect specialization damage. Save the exact trainable-module selection, data split, loss, optimizer and processor configuration; distinguish parameter adaptation from inference-time prompt tuning.

How to use and calibrate

Choose a specific model/processor and task protocol, validate preprocessing on known examples, tune only on a held-out development set and freeze the final evaluation. Evaluate retrieval with multiple valid descriptions, out-of-domain languages and noisy-pair controls; keep near-duplicate images in the same split.

Example application

Build a text-searchable image archive when paired descriptive metadata is plentiful but inconsistently written.

Interpretation / pitfalls

Watch out

Reported capability is conditional on available visual evidence, data coverage and the chosen task. Evaluate retrieval with multiple valid descriptions, out-of-domain languages and noisy-pair controls; keep near-duplicate images in the same split. A successful numeric component example is not evidence that a complete system achieves a published benchmark score.

Python and R code examples

Component: Identify false-negative risk when two captions refer to the same image. Dependencies: shared NumPy/base-R setup above. Python: executed successfully. R: unexecuted. Complete model training/inference: not run.

Full implementation routes: Python: reproduce the paper’s dual-encoder and preprocessing/data pipeline, distinguishing third-party implementations from original checkpoints; R: construct pair audits and retrieval metrics directly, bridging learned encoders when compatible.

Python and R

The reference's own programs, shown as written. A component demo shows one central piece of the method; it doesn't train a full model.

Python

Component demo, not a trained model — Identify false-negative risk when two captions refer to the same image.

Shared setup for this chapter
import numpy as np
def softmax(x):
    z = np.asarray(x, dtype=float)
    e = np.exp(z-z.max())
    return e/e.sum()
image_ids=np.array([10,20,10])
same_source=image_ids[:,None]==image_ids[None,:]
diagonal=np.eye(3,dtype=bool)
false_negative_risk=same_source & ~diagonal
print(false_negative_risk)
# This diagnostic does not reproduce ALIGN's full data pipeline.
R

Component demo, not a trained model — Identify false-negative risk when two captions refer to the same image.

image_ids <- c(10,20,10)
same_source <- outer(image_ids,image_ids,"==")
false_negative_risk <- same_source & !diag(TRUE,3)
print(false_negative_risk)

Sources

From the CodeSplash reference, entry MM002.