Face Verification One-to-One
Face verification answers one narrow question about a pair of photos, same person or not, by checking whether their embeddings land close enough together.
Why Does This Exist?
Unlocking a phone and searching a crowd look similar but are different tasks. Search is one-to-many: find this face among millions. Unlocking is one-to-one: is this the owner, yes or no. Confusing the two produces bad systems, because a threshold tuned for search lets strangers into phones. Face verification exists as the narrow one-to-one decision with its own metrics and trade-offs. Embeddings come from networks like FaceNet; the surrounding pipeline is in face detection and recognition.
Think of It Like This
A key and a lock
A lock never asks which key you are among all keys ever made. It asks one question: does this key's shape match mine within tolerance. Too loose and any key turns (false accept); too tight and your own key sticks on cold mornings (false reject). Face verification is a lock. The embedding is the key's shape, the threshold is the tolerance, and tuning it picks your position between break-ins and lockouts. The analogy stops at adaptability: a lock's tolerance is fixed metal, while a threshold is a number you set from validation data.
How It Actually Works
Both photos are detected, aligned, embedded and L2-normalized. The system computes cosine similarity (or equivalently squared Euclidean distance on unit vectors) and accepts the pair as same-person when the score passes a threshold chosen on held-out pairs.
A worked decision
Take toy 4D embeddings a = (0.8, 0.1, 0.5, -0.2) and b = (0.78, 0.15, 0.48, -0.15). The dot product is 0.624 + 0.015 + 0.24 + 0.03 = 0.909. The norms are sqrt(0.94) = 0.9695 and sqrt(0.8838) = 0.9401, whose product is 0.9114. Cosine similarity is 0.909 / 0.9114 = 0.997. Against a typical operating threshold of 0.60 this pair is confidently accepted as the same person.
Watch Out For
Tuning the threshold on the wrong population
A threshold picked on clean studio portraits fails on nightclub selfies because the score distributions shift. The symptom is a sudden spike in false rejects after deployment. Fix it by calibrating the threshold on pairs sampled from your actual cameras, lighting and demographics, and re-calibrating when any of those change.
The Quick Version
- Verification is one-to-one matching with a threshold; identification is one-to-many search.
- Both faces are embedded and compared with cosine similarity or Euclidean distance.
- The threshold trades false accepts against false rejects along a ROC curve.
- Thresholds must be calibrated on deployment-like pairs, not lab portraits.
- Liveness checks belong alongside verification wherever photos could spoof the camera.