Concept · Intermediate
Embeddings and similarity
A face embedding is a vector of a few hundred numbers produced by a neural network from an aligned face image. The network is trained so that embeddings of the same person sit close together and embeddings of different people sit far apart. Similarity is the distance between two such vectors, rescaled into a score. This entry explains the geometry, the thresholds and what the numbers can and cannot say.
Updated November 6, 2026 · 4 min read · reviewed November 6, 2026
Every face search, and every face verification system from phone unlock to airport gates, rests on the same object: the face embedding. It is the point at which a picture stops being pixels and becomes something a computer can compare at scale.
What is an embedding?
An embedding is a list of numbers, typically 128 to 512 of them, that a trained network outputs for an aligned face crop. Each number has no human meaning on its own. Together they place the face at a point in a high-dimensional space. The training objective shapes that space so that distance corresponds to identity: the same person photographed twice should land at nearby points, two different people at distant ones, regardless of lighting, expression or age.
How does a network learn to do that?
Two families of training objective dominate. Metric losses such as the triplet loss used by FaceNet (2015) take an anchor face, a second photo of the same person and a photo of someone else, and push the network to make the first pair closer than the second by a margin. Classification-style losses with angular margins, such as SphereFace, CosFace and ArcFace (2018 to 2019), train the network to classify millions of identities while forcing a gap between classes on the surface of a sphere. ArcFace's additive angular margin became the common baseline for open-source and commercial systems. Both approaches need large labelled datasets, which is where the controversies documented under datasets begin.
How is similarity calculated?
Most systems normalise embeddings to unit length and use cosine similarity: the cosine of the angle between two vectors, from 1 (identical direction) down to -1. Equivalent formulations use Euclidean distance between the normalised vectors. Engines then rescale the raw value into a 0 to 100 score for display. The rescaling is arbitrary and differs by engine, so a 90 on one service and a 90 on another are not comparable.
- Different people (pairs (relative))
- Same person (pairs (relative))
Source: Schematic shape based on the verification-score histograms reported in FaceNet (2015) and ArcFace (2019); the axis values are illustrative, not measured
The two curves overlap. Where the operator places the threshold decides the trade-off: a high threshold produces few false matches but misses true ones; a low threshold finds more true matches and more strangers. In a one-to-many search against millions of faces, even a tiny per-comparison false-match rate produces look-alikes in the top results, because there are so many comparisons. That is the arithmetic behind the doppelganger effect.
| Factor | Effect on same-person similarity | Why |
|---|---|---|
| Lighting and expression | Small | Training data covers these; the network learns to ignore them |
| Pose beyond three-quarter view | Moderate to large | Half the face is unseen; features are inferred |
| Age gap of 10 years or more | Moderate | Bone structure holds, soft tissue changes; children change most |
| Low resolution or blur | Large | Texture the network relies on is gone |
| Heavy filters and retouching | Moderate | Skin texture and proportions are altered |
| Identical twins | Near zero difference | The faces are the same to the model; see false positives |
What does a score not tell you?
A similarity score is not a probability that two photos show the same person, and engines that present it as one are simplifying. The probability depends on the prior: how many people in the index look like the query. For a distinctive face in a small index, a score of 80 may be near certain; for a common face type in a billion-face index, the same score may be a coincidence. NIST's evaluations report false-match rates at fixed thresholds precisely because the raw score has no absolute meaning; see accuracy, bias and testing.
Can an embedding be reversed into a face?
Not faithfully, but approximately. Research from 2019 onward has shown that a network trained to invert embeddings can produce a face that the original system scores as a match, even though it does not look much like the person to a human. This is why regulators treat embeddings as biometric data rather than as anonymous numbers: the vector can be used to recognise the person it was computed from. The GDPR definition in Article 4(14) and the Illinois BIPA definition of a biometric identifier both reach stored face geometry.
Questions
Is an embedding the same thing as a faceprint?
Faceprint is the informal term; embedding, template and feature vector are the technical ones. Laws usually say face geometry or biometric template.
Do different engines produce compatible embeddings?
No. Each model defines its own space. An embedding from one system is meaningless to another.
Why can my own two photos score only 70?
Pose, age, resolution or filters moved the embeddings apart. The score measures the model's view of similarity, not your identity.
How many dimensions do embeddings have?
Commonly 128 (FaceNet) or 512 (ArcFace-style models). More dimensions do not automatically mean more accuracy.
Sources
- 1.Schroff, Kalenichenko, Philbin, FaceNet: A Unified Embedding for Face Recognition and Clustering (2015) (checked June 17, 2015)
- 2.Deng et al., ArcFace: Additive Angular Margin Loss for Deep Face Recognition (2019) (checked February 9, 2019)
- 3.Mai et al., On the Reconstruction of Face Images from Deep Face Templates, IEEE TPAMI (2019) (checked May 1, 2018)
Entry reviewed November 6, 2026. Found an error? Tell us.
Related entries
- Concept How a face search works The face search pipeline step by step: detection, alignment, embedding, index lookup, ranking and source pages, with the limits at each stage.
- Concept Accuracy, bias and testing How face recognition accuracy is measured, what NIST FRTE reports found on error rates and demographic differences, and why marketing claims cannot be checked.
- Term Face embedding Face embedding defined: the numeric vector a network computes from a face, why same-person vectors sit close, how it is compared, and why it is biometric data.
- Term Similarity score Similarity score defined: the number from comparing two face embeddings, what it does and does not mean, thresholds, and why a high score is a lead, not proof.
- Term Doppelganger effect The doppelganger effect: why a face search returns look-alikes, how index size and photo quality make it worse, and how to verify a match with non-face evidence.
Cite this entry
FaceSearch Wiki editors. "Embeddings and similarity". FaceSearch Wiki, updated November 6, 2026. https://facesearch.wiki/concepts/embeddings-and-similarity/