ArcFace vs CosFace: Face Matching Algorithms Compared (2026)
ArcFace adds an angular margin inside the cosine; CosFace subtracts a cosine margin. Both are training losses, not products. Didit runs 1:1 face matching at $0.05 per check; ArcFace model licensing is quote required.

Contents
In this guide
Jump to the part you need.
ArcFace and CosFace are two training losses for face recognition, not two products you install. The difference is where the margin sits: inside the cosine angle for ArcFace, subtracted from the cosine for CosFace. If you need face matching inside a live verification flow, we run 1:1 Face Match for $0.05 per check and handle the model for you. The caveat: no loss name predicts how a deployed system scores your own captures.
Last updated: November 26, 2026. Prices checked against the live Didit price feed on November 26, 2026.
ArcFace vs CosFace at a glance
| Question | Short answer |
|---|---|
| Which loss is better? | Neither is universally better. Both learn separable embeddings; the result depends on backbone, data and evaluation set. |
| What is the actual technical difference? | ArcFace adds the margin to the angle, s x cos(theta + m). CosFace subtracts it from the cosine, s x (cos(theta) - m). |
| Can I ship ArcFace in a product? | Yes. The code is MIT licensed and free for commercial use; the pre-trained models are not, they need a license (ArcFace InsightFace page, read November 26, 2026). |
| Can I ship CosFace? | CosFace is a training loss. Check the license for the code and model weights you intend to deploy. |
| What if I do not want to train or host a model? | Didit Face Match 1:1 is $0.05 per check, and a full KYC check that includes it is $0.33. |
| What do 100,000 face checks cost? | Usage charges before plan fees and credits: $5,000.00 at list price, $4,500.00 on the Scale plan. |
Start free in the sandbox at business.didit.me, no sales call, and connect Didit to an AI assistant through the MCP server at didit.me/developers/mcp. Face match pricing sits on the pricing page and the request contract is in the Face Match API docs.
What ArcFace and CosFace actually are
A face recognition system has two parts. The first turns a face image into an embedding, a vector of numbers. The second compares two embeddings and produces a score. ArcFace and CosFace both change the first part, and specifically the loss function used to train the classifier head that shapes those embeddings.
Both losses attack the same problem. Embeddings for one person vary with lighting, pose, age, expression, camera and compression, which is intra-class variance. Embeddings for different people must stay apart, which is the inter-class side. Plain softmax has no explicit angular or cosine margin. ArcFace and CosFace add that constraint to the target-class logit. Both losses lower the target-class logit during training, which increases the separation an example needs from competing classes. The same person clusters and different people separate with room to spare.
The name is written ArcFace, also as arc face, and sometimes mistyped as acrface. The paper is ArcFace: Additive Angular Margin Loss for Deep Face Recognition, by Deng, Guo, Xue and Zafeiriou, CVPR 2019.
ArcFace: an additive angular margin
ArcFace normalizes the feature vector and the class weights so both lie on a hypersphere, then measures the angle between them. The target-class logit becomes s x cos(theta + m), where s is a scale and m an angular margin. Every other class keeps s x cos(theta). The margin is added to the angle of the correct class, which is the same as demanding a larger angular gap before the model is satisfied.
The margin exists only during supervised training. After training you deploy the embedding network and compare vectors with a calibrated threshold. Nothing at inference knows about the margin.
ArcFace's target-logit penalty depends on the original angle. For the formula above, the reduction is 2s sin(m/2) sin(θ + m/2), which peaks at θ = π/2 − m/2. CosFace reduces the target logit by the constant s × m. CosFace subtracts m from the cosine before scaling, so the penalty is constant in cosine units. That is why a 0.5 margin in ArcFace, an angle in radians, and a 0.5 margin in CosFace, a cosine decrement, are not interchangeable settings.
CosFace: a large margin cosine loss
CosFace, from CosFace: Large Margin Cosine Loss for Deep Face Recognition by Wang and colleagues, CVPR 2018, normalizes the same way and subtracts the margin from the cosine value of the target class: s x (cos(theta) - m). Other classes stay at s x cos(theta).
Both papers put features and weights on a unit hypersphere. Normalization is not a difference between them, and any comparison that presents it as one is wrong.
ArcFace vs CosFace: the real differences
| Point | ArcFace | CosFace |
|---|---|---|
| Where the margin sits | Inside the cosine, on the angle | Outside the cosine, on the value |
| Target-class logit | s x cos(theta + m) | s x (cos(theta) - m) |
| Feature and weight normalization | Yes | Yes, so not a difference |
| Are the two margin values interchangeable | No, the penalty changes with the angle | No, the penalty is constant in cosine units |
| What you deploy | Embedding network plus a threshold | Embedding network plus a threshold |
| What the paper establishes | A training objective, with results under its own protocol | A training objective, with results under its own protocol |
The two approaches can use the same inference pipeline: you deploy the embedding network and compare vectors with a calibrated threshold. Training differences can change the resulting embeddings and the deployed error rates. Whether that helps your product depends on the backbone, the training data, the preprocessing and the images you will actually see. Neither loss is universally better for airports, consumer apps or onboarding. Paper numbers describe the authors' training setup, not your capture conditions.
How to compare ArcFace and CosFace accuracy
Hold the backbone, training data, preprocessing and evaluation set constant. Define genuine pairs, two captures of the same person, and impostor pairs, captures of different people. Choose thresholds on a held-out calibration split, then compare false non-match rates at the same target false-match rate. Report that operating point, not a threshold chosen to flatter the model. Test document-to-selfie pairs from the devices, lighting and user population you serve, and read the demographic and image-quality slices as well as the average.
The distinction that matters is between training-class accuracy and verification error rates on people absent from the training set. And 1:N search needs its own evaluation, because a larger gallery raises the chance that some enrolled face becomes a false candidate.

ArcFace as a commercial option: what InsightFace publishes
InsightFace is the project behind the ArcFace models and related tooling (ArcFace InsightFace page, read November 26, 2026). InsightFace offers commercial licensing, self-hosted APIs and SDKs for face and person AI, including face recognition, person analysis with body ReID, video face redaction, face swapping and deepfake detection.
Licensing terms matter more than the algorithm name. The code is released under the MIT License and is free for commercial use, but the pre-trained models are for non-commercial academic research only, so commercial use requires a license. The page lists Open Source as free, Model Licensing as custom and Enterprise and API as custom, with no specific prices published on this page. InsightFace claims a top NIST FRVT ranking and 99.8% accuracy. Evaluate your own captures at the false-match rate your deployment requires. The page also lists an InspireFace C/C++ SDK for Linux, Android, iOS, macOS and embedded devices. No certifications are listed on the page.
Scorecard: Didit vs ArcFace for a face matching deployment
ArcFace facts in this scorecard come from the ArcFace InsightFace page, read November 26, 2026.
Scope: these six criteria score a managed identity and fraud deployment for live face matching, and Didit ranks first for that managed job. A 5 means the criterion is covered with published prices or evidence; a low score means the vendor page does not cover the criterion, or the capability sits outside that vendor's remit, as with self-hosted media tooling.
| Criterion | Didit | Why | ArcFace | Why |
|---|---|---|---|---|
| Published pricing | 5 | Published prices for Face Match, Face Search and full KYC. Some other checks and lookups have variable rates. | 1 | Open source free; model licensing and Enterprise & API pricing are custom. Quote required. |
| Published deployment coverage | 5 | 220+ countries, 14,000+ document types, 54 capture languages | 2 | The page lists Linux, Android, iOS, macOS and embedded targets for InspireFace. |
| Product breadth (KYC, KYB, AML, monitoring) | 5 | KYC, KYB, AML screening, transaction monitoring and wallet screening under one plan | 1 | Face and person AI only: recognition, ReID, redaction, deepfake detection |
| AI/MCP and developer access | 5 | Free MCP server, SDKs, public API, workflow builder | 3 | REST API and Python SDK for InsightFace Server. |
| Test access and production prerequisites | 5 | Free sandbox with mock responses. Live checks require a live API key and available credit. | 2 | Code is free, but pre-trained models are non-commercial until you hold a license |
| Evidence and certifications | 5 | SOC 2 Type 2, ISO/IEC 27001:2022 certified, iBeta Level 1 PAD | 1 | No certifications listed on the page |
| Total (out of 30) | 30 | Six criteria at the top score | 10 | Strongest on code access, weakest on published terms and evidence |
Didit publishes this ranking; we explain the criteria so you can check them.
Like-for-like comparison
ArcFace facts in this comparison come from the ArcFace InsightFace page, read November 26, 2026.
ArcFace and Didit are not the same kind of vendor, so read this table as a map rather than a tie. One sells model licensing and self-hosted tooling. The other runs verification checks per call and returns a decision.
| Dimension | Didit | ArcFace (InsightFace) |
|---|---|---|
| What you buy | Hosted verification checks and workflows | Model licensing, SDKs, self-hosted server |
| Face matching | 1:1 at $0.05 per check, 1:N at $0.05 per search | Embedding model you host, licensing quote required |
| Document checks | ID verification $0.15, 14,000+ document types | Not listed on the page. |
| Coverage | 220+ countries, 54 capture languages | Linux, Android, iOS, macOS and embedded targets listed |
| Evidence | SOC 2 Type 2, ISO/IEC 27001:2022 certified, iBeta Level 1 PAD, used by 4,000+ companies | NIST FRVT top ranking claim, 99.8% accuracy claim, no certifications listed |
| Implementation | API, SDKs, workflow builder, MCP server, webhooks | REST API, Python SDK, C/C++ SDK, self-hosted server, RTSP monitoring |
| Liveness | Passive $0.10, active $0.15 | Optional RGB liveness before recognition, built-in anti-spoofing in InspireFace |
| Price unit | Per completed check, prepaid credit | Model licensing and Enterprise & API pricing are custom. Quote required. |
Matched volume price scenarios
ArcFace facts in these scenarios come from the ArcFace InsightFace page, read November 26, 2026.
| Checks per month | Didit list ($0.05) | Didit Growth ($0.048) | Didit Scale ($0.045) | ArcFace (InsightFace) |
|---|---|---|---|---|
| 1,000 | $50.00 | $48.00 | $45.00 | Quote required |
| 10,000 | $500.00 | $480.00 | $450.00 | Quote required |
| 100,000 | $5,000.00 | $4,800.00 | $4,500.00 | Quote required |
- 1,000 x $0.05 = $50.00. 1,000 x $0.048 = $48.00. 1,000 x $0.045 = $45.00. These are usage charges before plan fees and credits.
- 10,000 x $0.05 = $500.00. 10,000 x $0.048 = $480.00. 10,000 x $0.045 = $450.00. These are usage charges before plan fees and credits.
- 100,000 x $0.05 = $5,000.00. 100,000 x $0.048 = $4,800.00. 100,000 x $0.045 = $4,500.00. These are usage charges before plan fees and credits.
- ArcFace model licensing, Enterprise and API pricing are custom, with no specific prices published on the page (ArcFace InsightFace page, read November 26, 2026), so all three volumes are quote required.
Growth costs $99 a month and includes $115 in monthly credit. Scale costs $299 a month and includes $350 in monthly credit. Eligible Free organizations receive $10 in monthly credit. Plan credit is applied to usage; it does not change the unit price.
Worked cost example: 20,000 onboardings a month
- 20,000 full KYC checks x $0.33 = $6,600.00. Each check is ID document verification at $0.15 plus passive liveness at $0.10 plus face match 1:1 at $0.05 plus device and IP analysis at $0.03, which sums to $0.33.
- 1,000 of those users, 5%, also trigger a standalone 1:N face search at $0.05 = $50.00.
- Monthly usage at list prices before plan fees and credits: $6,600.00 + $50.00 = $6,650.00.
- The same month on Scale unit prices: 20,000 x $0.297 = $5,940.00, plus 1,000 x $0.045 = $45.00, for $5,985.00 before plan fees and credits. Scale costs $299 a month and includes $350 in monthly credit, which is applied to that usage.
- An ArcFace licensing equivalent cannot be totalled here, because model licensing and API pricing are custom. Quote required (ArcFace InsightFace page, read November 26, 2026).
Strengths and limitations
Didit
- Published prices for Face Match, Face Search and full KYC. Some other checks and lookups have variable rates.
- Our $0.33 full KYC check includes ID document verification, passive liveness, Face Match and device and IP analysis. AML screening can be added separately. The standalone Face Match endpoint compares two images.
- Free sandbox on every plan, SDKs, API and a free MCP server for AI assistants.
- SOC 2 Type 2, ISO/IEC 27001:2022 certified and iBeta Level 1 PAD, with 4,000+ companies on the platform.
- Limitation: We process the images on our infrastructure. Include that processing in your data-protection review.
- Limitation: We publish how Face Match scores and decides. Our public docs do not specify the training loss.
ArcFace (InsightFace)
ArcFace facts in this section come from the ArcFace InsightFace page, read November 26, 2026.
- Code under the MIT License, free for commercial use.
- Self-hosted path: REST API, Python SDK, C/C++ SDK and an RTSP monitoring server, useful when data must stay inside your network.
- Beyond recognition: person analysis with body ReID, video face redaction and deepfake detection.
- InspireFace ships built-in anti-spoofing and liveness detection with commercial licensing.
- Limitation: pre-trained models are non-commercial without a license, so a prototype on the free download is not a production right.
- Limitation: Commercial prices require a quote. The page lists face and person AI products and does not list document verification, KYB, AML screening or transaction monitoring. No certifications are listed on the page.
When ArcFace is the better fit
ArcFace facts in this section come from the ArcFace InsightFace page, read November 26, 2026.
ArcFace licensing is best for teams evaluating self-hosted face recognition or an SDK for a listed mobile or embedded target. InsightFace also lists separate offerings for video redaction, person analysis with body ReID, and deepfake detection. It also fits teams with ML engineers who want to evaluate the backbone and own the thresholds. Be clear about what you take on: data collection, model evaluation, versioning, infrastructure, and the legal work of a model licence. The page lists self-hosted APIs and SDK targets. Check the licence terms for what you may do with the weights.
Verdict by use case
ArcFace facts in this verdict come from the ArcFace InsightFace page, read November 26, 2026.
| Use case | Better fit | Why |
|---|---|---|
| Regulated KYC onboarding with an audit trail | Didit | Document check, liveness, face match and AML in one session with warnings and decisions you can review |
| Duplicate account and fraud ring detection | Didit | Face Search 1:N against your enrolled gallery, with blocklist and duplicate flags at $0.05 per search |
| Self-hosted recognition inside your network | ArcFace licensing | Self-hosted server, REST API and SDKs listed on the page |
| Video redaction, body ReID, deepfake detection | The relevant InsightFace product | Products listed on its page |
| On-device recognition or an SDK for a listed target | ArcFace licensing | SDKs for mobile and embedded targets, running inside your own app |
| Published unit pricing at 100,000 checks | Didit | $4,500.00 on Scale at published unit prices before plan fees and credits; ArcFace requires a quote |
How Didit Face Match works in practice
1:1 comparison against a document portrait
Our Didit Face Match API compares two images and returns an Approved or Declined status. When the API can score the pair, the similarity score ranges from 0 to 100. The Face Match 1:1 overview documents the same check inside a session. The standalone endpoint treats a score strictly above face_match_score_decline_threshold as Approved, and the default threshold is 30. Each live HTTP 200 consumes one Face Match API credit, including a Declined result. The list charge is $0.05. An unscorable pair returns a null score when the call is saved, or 0 when save_api_request=false. Inference is sub-2-second p99, and the shared write budget is 300 requests per minute per API key.
Failed captures are not a dead end in a session flow. face_match_max_attempts defaults to 3, and retryable failures return feedback_codes that the SDKs turn into coaching. The standalone endpoint is single-shot, so build your own retry prompt if you call it directly.
curl -X POST 'https://verification.didit.me/v3/face-match/' -H 'x-api-key: YOUR_API_KEY' -F 'user_image=@./selfie.jpg' -F 'ref_image=@./id_portrait.jpg' -F 'save_api_request=true' -F 'vendor_data=user-123'With save_api_request at its default of true, the call is persisted as an API-type session, appears in the Business Console, and the returned request_id is a real session id you can pass to GET /v3/session/{sessionId}/decision/. Set it to false and nothing is stored. Sandbox keys return a static Approved mock payload after request validation, so use a live API key with approved test images to evaluate scores.
1:N search for duplicates and blocklists
Face Search returns up to 5 matches above the similarity floor, with similarity percentages, source information and blocklist flags. Session details are available for session-backed matches. search_type=most_similar is for deduplication; search_type=blocklisted_or_approved is for blocklist screening. Either a confirmed or a possible blocklist warning can produce a Declined status. Duplicate warnings are informational. The standalone search is $0.05 per search.
Liveness as a separate control
Liveness asks whether the capture shows a live person or an attack. It is not the same measurement as a face match, and one does not cover for the other.

Migration plan: from a self-hosted model to Didit
- Run both in parallel. Use image pairs approved for live testing. Set
save_api_request=falsefor one-shot comparisons. Enable persistence only if you need session lookup or webhooks and your retention policy permits storing both images. Retain only the records your policy requires. - Calibrate the threshold. The standalone endpoint declines a score of 30 or less by default. Set
face_match_score_decline_thresholdfrom your own data and record the value with each decision. - Wire the webhooks. Subscribe to
status.updated. Persisted calls emit it. Read the score, status and warnings from the relevant entry in the decision payload'sface_matches[]array. The immediate standalone response uses the singularface_matchobject. - Handle the failure modes. For HTTP 403, inspect the response to distinguish missing or invalid credentials from insufficient credit. HTTP 400 can indicate invalid image input, such as a missing file, an unsupported extension or a file larger than 5 MB. A
LOW_FACE_MATCH_SIMILARITYwarning means the score was at or below the configured threshold. Treat it as a declined match and follow your capture or review policy. - Keep the records. Store the decision payload, the warnings, the threshold and the date. Presigned media URLs are short lived, so download anything you must retain promptly.
- Set a cutover criterion. Move traffic when you have enough representative pairs and have met prespecified false-match and false-non-match targets on both systems. Keep the old path callable until then.
Face matching and liveness solve different problems
Face matching estimates whether two images show the same person. Liveness detection evaluates whether a capture shows signs of a live person or an attack. An embedding match does not prove document authenticity, capture freshness or legal identity, and no single control removes spoofing risk. Combine the controls according to the risk of the action being authorized, and route borderline cases to review rather than forcing them through a threshold.
Sources
- Didit pricing page, prices and plans, read November 26, 2026.
- Didit live pricing feed, USD list prices and plan rates, read November 26, 2026.
- Didit docs: Identity Verification Pricing, billing rules and standalone API prices, read November 26, 2026.
- Didit Face Match product page, product overview and the published price per check, read November 26, 2026.
- Didit docs: Face Match API, request fields, threshold default, warnings, read November 26, 2026.
- Didit docs: Face Match 1:1 overview, retries and
face_match_max_attempts, read November 26, 2026. - Didit docs: Face Search API, 1:N behaviour, search types, read November 26, 2026.
- Didit docs: Face Search 1:N overview, automatic searches and blocklists, read November 26, 2026.
- Didit docs: Data Models, the
face_matches[]schema and warning objects, read November 26, 2026. - Didit MCP server, read November 26, 2026.
- Deng, Guo, Xue and Zafeiriou, ArcFace: Additive Angular Margin Loss for Deep Face Recognition, CVPR 2019.
- Wang et al., CosFace: Large Margin Cosine Loss for Deep Face Recognition, CVPR 2018.
- ArcFace InsightFace page, insightface.ai, read November 26, 2026. Cited as plain text, no link.
Open the free sandbox at business.didit.me to test request validation and response handling. No sales call. Use a live API key with approved test images to evaluate match scores.
Try it
Try this in the sandbox
Run the check this guide describes, free.
The product this post is about, taken from its topic. Run it free in the sandbox.
Author
Alejandro Rosas
Co-founder and CTO

Questions
Frequently asked questions
What is ArcFace?
ArcFace is a loss function for training face recognition networks, published in 2019. It adds an angular margin to the target-class logit, s x cos(theta + m), so the network learns embeddings that sit closer for the same person and further apart for different people. The margin is used only in training, and deployed systems compare embeddings with a threshold.
What is CosFace?
CosFace is a loss function published in 2018 that subtracts a margin from the target-class cosine, s x (cos(theta) - m), after normalizing features and weights to a unit hypersphere. It is also called large margin cosine loss. Like ArcFace, it changes training and not inference.
Is ArcFace better than CosFace?
Not in general. Both are margin losses that produce separable embeddings, and any measured difference depends on the backbone, the training data, the preprocessing and the evaluation protocol. To decide for your product, hold those constant and compare false match and false non-match rates at your operating threshold on your own captures.
How should I test ArcFace vs CosFace accuracy?
Define genuine and impostor pairs, hold the backbone and preprocessing constant, choose thresholds on a held-out calibration split, and compare false non-match rates at the same target false-match rate. Test on representative document-to-selfie pairs and read capture-quality groups, not only the average. That gives a reproducible answer for your operating point.
Is ArcFace free for commercial use?
The InsightFace code is MIT licensed and free for commercial use, but the pre-trained models are for non-commercial academic research only, so commercial use of the models requires a license (ArcFace InsightFace page, read November 26, 2026). Model licensing, Enterprise and API pricing are custom, so expect a quote rather than a list price.
Does Didit use ArcFace or CosFace?
We publish how Face Match scores and decides. Our public docs do not specify the training loss. What is documented is behaviour: Face Match 1:1 returns an Approved or Declined status at your threshold, and a similarity score from 0 to 100 when the API can score the pair.
How much does face matching cost?
We charge $0.05 per completed Face Match 1:1 check at list price, $0.048 on Growth and $0.045 on Scale. Growth costs $99 a month with $115 in monthly credit; Scale costs $299 a month with $350 in monthly credit, and eligible Free organizations receive $10 in monthly credit. A full KYC check that includes Face Match is $0.33. ArcFace model licensing and API pricing are custom with no prices published on its page (ArcFace InsightFace page, read November 26, 2026), so it is quote required.
What is the difference between 1:1 face match and 1:N face search?
1:1 compares two images, usually a live selfie against a document portrait, and returns one similarity score. 1:N embeds one face and searches it against an enrolled gallery, returning up to 5 ranked matches with blocklist and duplicate flags. We charge $0.05 per Face Match 1:1 check and $0.05 per Face Search 1:N search at list price.
Can face matching alone prove someone's identity?
No. A match says two images look like the same person, not that the document is genuine, the capture is live, or the person is legally who the document says. Combine document verification, liveness and a review policy that matches the risk of the action being authorized.
What related research should I read?
Start with the two papers behind the names: ArcFace by Deng, Guo, Xue and Zafeiriou, CVPR 2019, and CosFace by Wang et al., CVPR 2018. Then read the evaluation material on false match and false non-match rates, demographic slices and 1:N gallery effects, because that is where deployment decisions are actually made. Hold the backbone, training data and evaluation set constant whenever you compare two losses.
Compliance built in
Audited, certified and attested.
We hold the certifications and build each country's rules into your flows, so you can launch anywhere without worrying. Security and Compliance center
- Regulation encoded into your flows
Tell us what you do and where. Didit lists the rules that apply to you, with sources, and builds the checks each country needs into one workflow.
- Ready for AMLR
Every requirement of the new EU anti-money laundering rules, from checking customers to human review, is already covered by a Didit check.
- Tested in Spain's Treasury sandbox
Spain's Treasury published its supervised sandbox report on Didit's NFC plus active liveness onboarding; SEPBLAC took part and valued the added measures positively.
- Audited, not self-declared
iBeta Level 1 and Level 2. Liveness tested under ISO/IEC 30107-3.
Your obligations · 3 regions
SOC 2 Type 2
ISO 27001
iBeta Level 1 and Level 2
EU regulator attestation
FSM youth protection
GDPR
EBA remote onboarding
MiCA compatible
FIDO Alliance member
- AMLREU AML Regulation ready
Integration · Didit MCP
Run Didit from your own AI agent
Connect Didit to Claude, Cursor, VS Code or ChatGPT and just ask in plain words. Your agent can do anything you can do in the console, with the same permissions you have.
- Build workflowsDescribe the checks you need. The agent creates and publishes the flow.
- Run investigationsAsk why a session was declined, review cases, search people and companies.
- Change rulesCreate payment rules, test them on past data and switch them on.
- Pull reportsAsk for numbers, exports or the audit log.
Didit Academy


