Face BenchmarkHow face recognition and deepfake detection are measured, from the papers.

Face embeddings: what the vector is and how similarity is scored

The Face Benchmark editorsPublishedFigures checked

A face embedding is a fixed-length vector that a trained network computes from an aligned face crop: 128 values in FaceNet, 512 in ArcFace. Two embeddings are compared by one number, a squared L2 distance in FaceNet or a cosine in ArcFace, and that number is thresholded to decide a match. FaceNet's LFW threshold was 1.242, read 10 November 2026.

This page is part of the face recognition section. It expands step three of the four-step pipeline and feeds the verification metrics that every benchmark table on this site reports.

01What is a face embedding?

An embedding is the output of the last layer of a recognition network, a list of numbers of fixed length that stands in for the face. FaceNet describes it as "a mapping from face images to a compact Euclidean space where distances directly correspond to a measure of face similarity", produced by "a deep convolutional network trained to directly optimize the embedding itself" (arXiv 1503.03832). The vector has no named parts; no element means nose width or eye colour. Its only property is that faces of one person land close together and faces of different people land far apart.

The length is a design choice. FaceNet uses 128 floating-point values during training and shows they can be stored as 128 bytes without loss of accuracy. ArcFace extracts "the 512-D features" from a ResNet50 or ResNet100 in 8.9 or 15.4 milliseconds per face (arXiv 1801.07698). In both cases the input is a crop that has already been detected and aligned; ArcFace uses 112 by 112 pixel crops positioned by five landmarks from RetinaFace. A template for a video or a set of stills is the mean of its frame embeddings, which is how ArcFace scores IJB-B and IJB-C.

02How is the embedding trained?

FaceNet trains with a triplet loss: for an anchor face, a second image of the same person and an image of someone else, the loss pushes the anchor closer to the match than to the non-match by a margin, with the hard triplets chosen online during training. The network that set the LFW record of 99.63 percent was trained on 100 million to 200 million face thumbnails of about 8 million identities, a private set, and the paper reports that tens of millions of images cut the error by 60 percent relative to millions.

ArcFace trains as a classifier over the identities in its training set and changes the final layer so that the classifier's score is a cosine. The feature and each class weight are L2-normalised, so "the predictions only depend on the angle between the feature and the weight", and the embeddings "are thus distributed on a hypersphere with a radius of s". An additive angular margin m is then added to the angle to the true class before the softmax, with s set to 64 and m to 0.5. Because the loss is written in angles, the embedding it learns is meant to be compared by angle, which is why cosine similarity is the standard comparison for ArcFace-style models.

03How many dimensions does an embedding need?

Fewer than most deployments use. FaceNet's Table 5 holds the network fixed and varies the embedding size, reporting the validation rate at a false accept rate of one in a thousand on its hold-out set: 86.8 percent at 64 dimensions, 87.9 at 128, 87.7 at 256 and 85.6 at 512, with the differences described as statistically insignificant. The paper chose 128 and notes that smaller embeddings "are possible at a minor loss of accuracy".

ArcFace's 512 dimensions therefore reflect convention and the capacity of a larger training set rather than a measured need. The practical consequence is storage and search cost, which grow with the width of the vector and the size of the gallery, and which FaceNet cites as the reason its 128-byte vector "is ideal for large scale clustering and recognition". The accuracy a model reaches depends far more on its training data and loss than on the width of the vector, as the FaceNet training-size experiment shows.

FaceNet validation rate at a false accept rate of one in a thousand for four embedding sizesHorizontal bars of validation rate in percent at a false accept rate of 0.001 on the FaceNet hold-out set, by embedding dimension: 64 dimensions 86.8; 128 dimensions 87.9; 256 dimensions 87.7; 512 dimensions 85.6. Source: FaceNet, arXiv 1503.03832, Table 5, read 10 Nov 2026.0.025.050.075.0100.064 dimensions86.8128 dimensions87.9256 dimensions87.7512 dimensions85.6VAL in percent at a FAR of 0.001, FaceNet hold-out set
Figure 1Validation rate at a false accept rate of one in a thousand on the FaceNet hold-out set, for the same network with four embedding sizes. The paper reports the differences as statistically insignificant. Source: FaceNet, Table 5 (arXiv 1503.03832), read 10 Nov 2026.

04How is similarity scored between two embeddings?

Verification compares two embeddings and returns one number. FaceNet uses the squared L2 distance: a distance of 0.0 means identical embeddings and, in the paper's illustration, 4.0 is the opposite end, two different identities. The paper states that "face verification simply involves thresholding the distance between the two embeddings; recognition becomes a k-NN classification problem". A pair whose distance falls at or below the threshold d is called the same; the set of same-identity pairs accepted at d gives the true accept rate and the set of different-identity pairs accepted at d gives the false accept rate.

ArcFace compares normalised vectors, so the score is the cosine of the angle between them, 1.0 for identical directions and lower as the angle grows. The decision is the same shape: a cosine at or above a threshold is a match. Both scores sit on a continuous scale, and the benchmark result is a curve over every threshold rather than one accuracy; the face verification metrics page explains how that curve is summarised and why the operating point must be stated with the number.

05Where does the threshold come from?

From the data and the error the deployment is willing to accept. On LFW, FaceNet selected the distance threshold on nine training splits and applied it to the tenth; the chosen value was 1.242 for every split but one, where it was 1.256. That protocol fixes the threshold before the test pairs are seen, which is what makes the 99.63 percent accuracy a measurement rather than a fit.

Operational evaluations set the threshold from the false match side. NIST's FRTE 1:1 reports FNMR as "the proportion of mated comparisons below a threshold set to achieve the false match rate (FMR) specified", so each algorithm's threshold is whatever produces the stated FMR on NIST's images, and the NIST FRTE reports quote the miss rate at that point. NIST SP 800-63A asks remote identity proofing to run 1:1 comparison at a false match rate of 1 in 10,000 or better, so the threshold is chosen for that rate and the resulting false non-match rate, required to be 1 in 100 or better, is the cost. Change the threshold and both numbers move in opposite directions; a benchmark score without its threshold rule is not comparable to another.

06What does the embedding not tell you?

Three things that a verification flow still has to establish. It does not say whether the face was live: an embedding computed from a printed photograph or a replayed screen matches the person on it, which is why presentation attack detection is tested as a separate stage, as the spoofing and deepfake tests page sets out. It does not say whether the face was manipulated: a swap that preserves the target's identity produces an embedding close to the target's, and face swap generators such as SimSwap use an ArcFace identity vector as the signal they preserve; joint face and voice detectors learn a separate audio-visual representation for that question. And it does not reveal its training set: ArcFace's headline models were trained on MS1MV2 and MS1MV3, cleaned derivatives of a set that was taken down in 2019, and nothing in a 512-value vector shows that.

07Why numbers differ between sources

FaceNet reports 99.63 percent on LFW and ArcFace reports 99.83 for its MS1MV2 ResNet100 model, and the two are not a like-for-like comparison of embeddings. The training sets differ by two orders of magnitude in identities, the losses differ, the crops differ, and ArcFace's own paper prints 99.83 in one table and 99.82 in another for the same model. A distance threshold of 1.242 is also not convertible to a cosine threshold without knowing the scale of the vectors. When two papers quote a verification figure, the comparison that holds is the one made on the same test set under the same protocol, at a stated false accept rate.

SRCSources

  1. S1
    FaceNet: A Unified Embedding for Face Recognition and Clustering(external)Schroff, Kalenichenko, Philbin. CVPR 2015
    Checked
  2. S2
    ArcFace: Additive Angular Margin Loss for Deep Face Recognition(external)Deng, Guo, Yang, Xue, Kotsia, Zafeiriou. IEEE TPAMI 2021
    Checked
  3. S3Checked
  4. S4Checked

FAQQuestions

What is a face embedding?

A face embedding is a fixed-length vector that a trained network computes from an aligned face crop, 128 values in FaceNet and 512 in ArcFace. Faces of one person map to nearby vectors and faces of different people to distant ones; no single value has a named meaning.

How is similarity between two face embeddings calculated?

By one number: FaceNet uses the squared L2 distance between the vectors and ArcFace the cosine of the angle between them. The number is compared with a threshold; FaceNet's LFW threshold was 1.242, chosen on nine training splits and applied to the tenth.

How many dimensions does a face embedding have?

FaceNet uses 128, stored as 128 bytes, and ArcFace uses 512. FaceNet's Table 5 found 64 to 512 dimensions within 2.3 points of each other at a false accept rate of one in a thousand, and called the differences statistically insignificant.

Who sets the match threshold?

The evaluator or the deployer, from the false match rate they will accept. NIST's FRTE 1:1 sets each algorithm's threshold to reach a specified FMR and reports the FNMR there; NIST SP 800-63A asks for an FMR of 1 in 10,000 or better with an FNMR of 1 in 100 or better.

Can an embedding tell whether a face is real?

No. An embedding from a printed photo, a replayed screen or a face swap that keeps the target's identity sits close to the real person's embedding. Liveness and manipulation are separate tests with their own standards and benchmarks.