flag2vec DINOv2 ViT-S/14 · 384-d · 423 flags

An atlas of learned visual similarity

The latent geometry
of 423 flags

DINOv2 has never been told what a flag is. Given nothing but pixels, it sets the Nordic crosses side by side, keeps the British ensigns together across an ocean, and scatters communist red to the far corners of its space. This is the map it drew — and you can walk around inside it.

Model
DINOv2 ViT-S/14, self-supervised, frozen
Space
384 dimensions, Procrustes-joined
Corpus
197 sovereign · 201 subdivision · 25 Martian
Projections
PCA · t-SNE · UMAP, all in 3D
Plate I The corpus, one flag per vexillological tradition. Every flag is rasterized at 518 px and pushed through the encoder exactly once.
Plate II drag to rotate · scroll to zoom · click a flag
projection
color by
loading 423 flags…
423 flags positioned by their DINOv2 embeddings, projected to three dimensions. Distance is visual similarity as the encoder measures it — nobody labelled a single one.

Five things the encoder saw

    01

    Nordic crosses are visual twins.

    Sweden, Denmark, Norway, Iceland and Finland sit in the tightest cluster of any tradition — 64% k=5 nearest-neighbour purity in 384 dimensions. The structure carries the signal, not the colour: a single off-centre cross survives every palette it is painted in.

    02

    British ensigns crossed an ocean and stayed siblings.

    The UK, Australia, New Zealand, Fiji and Tuvalu share a canton-on-blue template, and despite wildly different fly designs the encoder files them together. Australian state flags pile in on top of them — a 31× k-NN lift over chance.

    03

    Tradition beats geography.

    Europe scatters across the whole map. Latin America does not: the horizontal tricolour with a central charge forms one tight subcluster spanning two continents. Argentina, Uruguay, Honduras, El Salvador — visual cousins, political coincidence.

    04

    Communist red doesn't cluster.

    China, Vietnam, North Korea, Belarus, Mongolia, Angola — a shared colour, not a shared structure. Because the encoder reads layout over palette, a red field with a star, a hammer-and-compass, an ornate seal and a black stripe end up nowhere near each other.

    05

    Mars inherits — sometimes.

    Twenty-five Martian regional flags, each procedurally derived from an Earth tradition. 13 of 25 land closest to the centroid they inherited from. Structurally distinctive parents (Nordic, solid+emblem, pan-Arab) pass the resemblance down; colour-only parents (heraldic, pan-African) do not.

How the map was made

Encoder DINOv2 ViT-S/14, frozen. Self-supervised on natural images; never fine-tuned, never shown a label.
Corpus 423 flags — 197 sovereign, 201 subdivision, 25 Martian. SVGs rasterized before encoding.
Alignment Two encoder runs (398 flags at 518 px, 197 at 224 px) joined into one 384-d frame by orthogonal Procrustes on the 197 shared sovereigns.
Projection 3D PCA · 3D t-SNE (perplexity 20, cosine) · 3D UMAP (n=15, min_dist=0.05).
Palette Four-colour median cut per flag, classified into twelve named families. Used for the palette colouring, never for the embedding.
Lineage A visual analogue of Figure 3 in emoji2vec. Sister project: music2vec.