Back to paper library
Paper notesarXiv 2020CVPR 2020

CurricularFace

Who Set the Syllabus?

Original paper

CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition

Paper authors

Yuge Huang · Yuhan Wang · Ying Tai …

Show all 8 authors

Yuge Huang · Yuhan Wang · Ying Tai · Xiaoming Liu · Pengcheng Shen · Shaoxin Li · Jilin Li · Feiyue Huang

Publication
CVPR 2020Conference
First submitted to arXiv
arXiv:2004.00288
Cite this paper · BibTeX

The citation identifies the linked source version. It cites the original paper and its authors.

@misc{facerecognitioncurricularface2020,
  title = {{CurricularFace: Adaptive Curriculum Learning Loss for Deep Face Recognition}},
  author = {Yuge Huang and Yuhan Wang and Ying Tai and Xiaoming Liu and Pengcheng Shen and Shaoxin Li and Jilin Li and Feiyue Huang},
  year = {2020},
  eprint = {2004.00288},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2004.00288}
}
On this page

Train MobileFaceNet with ArcFace, the margin at ArcFace's default of 0.5, on CASIA-WebFace. The loss goes down until around step 2,100, suddenly bounces back up, and a few hundred steps later turns into NaN; only after the margin is lowered to 0.45 does it train.

Small networks buckling under large margins was not news at the time. The paper cites AirFace's observation that ArcFace diverges on small backbones such as MobileFaceNet and has to be pretrained for a while with plain softmax first. Around the same time, another school of methods wanted to weigh hard samples even more heavily. MV-Arc-Softmax picks out misclassified samples and up-weights them, with the weighting factor tt (in the CurricularFace paper's notation) a hand-set constant greater than 1, for example 1.2; the paper relays MV-Arc-Softmax's own claim that a slightly larger tt, above 1.4, may make the model hard to converge.

On one side, a margin that treats every sample the same; on the other, mining that up-weights hard samples from the very first step. The question this paper asks is whether hard samples should be up-weighted from the start at all.

People usually learn the easy things first and the hard things later, and in machine learning this idea is called curriculum learning, proposed by Bengio et al. in 2009: draw up a syllabus ordered by sample difficulty, teach the easy ones first, then the hard ones. The catch is that a traditional syllabus has to fix every sample's difficulty in advance. Yuge Huang, Ying Tai, Feiyue Huang and others at Tencent Youtu Lab, together with Yuhan Wang of Zhejiang University and Xiaoming Liu of Michigan State University, want the loss function to decide for itself which lesson the class is on.

Defining the Problem

The common skeleton of margin-based softmax

First, write the face recognition losses of recent years in one form. The backbone's output feature xi\mathbf x_i and every column WjW_j of the fully connected layer's weights are L2-normalized, so their inner product is the cosine of the angle between them, cos⁡θj\cos\theta_j; WjW_j can be seen as the class center of the jj-th identity. The cosine times a scale ss (64 here, as in ArcFace) is the logit fed to softmax. The paper writes all the methods as one equation, Eq. (1):

L=−log⁡es T(cos⁡θyi)es T(cos⁡θyi)+∑j≠yies N(t,cos⁡θj)\mathcal L=-\log\frac{e^{s\,T(\cos\theta_{y_i})}}{e^{s\,T(\cos\theta_{y_i})}+\sum_{j\neq y_i}e^{s\,N(t,\cos\theta_j)}}

yiy_i is the correct class. T(⋅)T(\cdot) governs the correct-class logit, where the margin is added; N(⋅)N(\cdot) governs the other classes, the negative classes. The negative-class form is written uniformly as:

N(t,cos⁡θj)=I(t,cos⁡θj) cos⁡θj+cN(t,\cos\theta_j)=I(t,\cos\theta_j)\,\cos\theta_j+c

II is called the modulation coefficient and cc is a constant. ArcFace's setting is T=cos⁡(θyi+m)T=\cos(\theta_{y_i}+m) with m=0.5m=0.5, and the negative classes are left untouched, I=1I=1 and c=0c=0.

What counts as a hard sample

MV-Arc-Softmax and CurricularFace use the same criterion. For sample ii and some negative class jj, whenever

cos⁡(θyi+m)<cos⁡θj\cos(\theta_{y_i}+m)<\cos\theta_j

the pair counts as hard. That is, once the margin is added, the correct class loses to this negative class.

Plug in some numbers. Suppose a face is at angle θyi=60∘\theta_{y_i}=60^\circ from its own class center; m=0.5m=0.5 radians is about 28.6°, so adding it gives 88.6°, and cos⁡(88.6∘)≈0.024\cos(88.6^\circ)\approx0.024. There are two negative classes:

  • the first at 75°, cos⁡75∘≈0.259>0.024\cos75^\circ\approx0.259>0.024, hard;
  • the second at 89°, cos⁡89∘≈0.017<0.024\cos89^\circ\approx0.017<0.024, easy.

The first negative class is actually farther away than the correct class (75° versus 60°); without the margin, this face would be classified correctly, and only the margin turns it into a "misclassification." So hardness here is judged pair by pair: the same face can be hard for some negative classes and easy for others, and the margin itself manufactures hard samples.

As this paper summarizes it, MV-Arc-Softmax changes the negative cosine of a hard pair to tcos⁡θj+t−1t\cos\theta_j+t-1, with t=1.2t=1.2 in the figure. The first negative class's 0.259 becomes 0.511; multiplied by s=64s=64, the logit goes from 16.6 to 32.7, and the hard sample's loss grows sharply. Because

(tcos⁡θj+t−1)−cos⁡θj=(t−1)(cos⁡θj+1) ≥ 0\begin{aligned} &(t\cos\theta_j+t-1)-\cos\theta_j\\ &\quad=(t-1)(\cos\theta_j+1)\ \ge\ 0 \end{aligned}

as long as t>1t>1, the logit of a hard negative class is always raised, from the first training step to the last.

That leaves two questions. Can the force with which hard samples are up-weighted change with training progress? And how should progress be measured, so that nobody has to hand-tune a constant the way MV-Arc-Softmax does?

Solving the Problem

Putting progress into the modulation coefficient

CurricularFace's correct class follows ArcFace, T(cos⁡θyi)=cos⁡(θyi+m)T(\cos\theta_{y_i})=\cos(\theta_{y_i}+m); the paper notes that any margin form could go here. All the changes are on the hard negative classes. Writing ϕ=cos⁡(θyi+m)\phi=\cos(\theta_{y_i}+m), the N(t,cos⁡θj)N(t,\cos\theta_j) of Eq. (7) is

N={cos⁡θj,ϕ≥cos⁡θjcos⁡θj (t+cos⁡θj),ϕ<cos⁡θjN= \begin{cases} \cos\theta_j, & \phi\ge\cos\theta_j\\ \cos\theta_j\,(t+\cos\theta_j), & \phi<\cos\theta_j \end{cases}

Easy negative classes stay as they are. For hard negative classes the modulation coefficient becomes I=t+cos⁡θjI=t+\cos\theta_j, which depends on two things at once. tt stands for training progress, starting at 0 and growing; cos⁡θj\cos\theta_j stands for how hard this pair is: the closer the negative class, the larger the cosine and the larger the coefficient.

The paper's Figure 1, two line charts side by side; on both, the horizontal axis is the angle θj between the sample and the negative class center, from 0 to π/2, and a green arrow underneath points from Hard on the right to Harder on the left. Left chart, vertical axis the modulation coefficient I(t, cos θj): the blue line, ArcFace, stays flat at 1; the green line, MV-Arc-Softmax (t = 1.2), stays flat at 1.2; the solid red line (t = 1.0) falls from 2 at θj = 0 to 1 at π/2; the dashed red line (t = 0.0) falls from 1 to 0; on the left, a red arrow points from Early Stage to Later Stage. Right chart, vertical axis the modulated negative cosine N(t, cos θj): the blue line is just cos θj, falling from 1 to 0; the green line falls from 1.4 to 0.2; the solid red line falls from 2 to 0; the dashed red line falls from 1 to 0, staying below the blue line the whole way.
Original Figure 1, Huang et al., from PDF page 1, arXiv license, scholarly quotation.

The horizontal axis is the angle to the negative class; the farther left, the harder. The two red lines in the left chart are the two extremes of tt. At t=0t=0 (dashed), I=cos⁡θjI=\cos\theta_j, below 1 everywhere, so the logits of all hard negative classes are pushed down; at t=1t=1 (solid), I=1+cos⁡θjI=1+\cos\theta_j, above 1 everywhere, so every hard negative class is raised, and the harder it is, the more it is raised. During training tt climbs from 0, the red line moves from the dashed one toward the solid one, and that is what the red arrow on the left depicts. The right chart shows the negative cosine after multiplying back by cos⁡θj\cos\theta_j; compared with the blue line (ArcFace, no modulation), you can see whether each stage pushes down or raises.

When tt is between the two ends, where is the dividing line? For cos⁡θj>0\cos\theta_j>0, I>1I>1 is equivalent to cos⁡θj>1−t\cos\theta_j>1-t. At t=0.3t=0.3, the negative cosine has to exceed 0.7 to be up-weighted; at t=0.74t=0.74, anything above 0.26 is. Listing a few values, each cell holds II and the gradient coefficient MM used in the next section:

cos⁡θj\cos\theta_jt=0.3t=0.3t=0.6t=0.6t=0.74t=0.74
0.10.40/0.500.70/0.800.84/0.94
0.30.60/0.900.90/1.201.04/1.34
0.50.80/1.301.10/1.601.24/1.74

Computed for this note from Eqs. (7) and (8) of the paper; in each cell the left value is I=t+cos⁡θjI=t+\cos\theta_j and the right is M=t+2cos⁡θjM=t+2\cos\theta_j. Above 1 means more weight than ArcFace.

Back to that 75° negative class, cos⁡θj=0.259\cos\theta_j=0.259. At t=0.3t=0.3, the modulated value is 0.259×0.559≈0.1450.259\times0.559\approx0.145 and the logit drops from 16.6 to 9.3; at t=0.74t=0.74, the coefficient is 0.999 and the logit is 16.5, almost back to ArcFace. The same pair of samples is let off early on and treated as usual later.

In terms of decision boundaries, the boundary for a hard sample is cos⁡(θyi+m)=(t+cos⁡θj)cos⁡θj\cos(\theta_{y_i}+m)=(t+\cos\theta_j)\cos\theta_j. Compared with ArcFace's cos⁡(θyi+m)=cos⁡θj\cos(\theta_{y_i}+m)=\cos\theta_j, this amounts to an extra margin d=(t+cos⁡θj−1)cos⁡θjd=(t+\cos\theta_j-1)\cos\theta_j. When t+cos⁡θj<1t+\cos\theta_j<1, dd is negative and the boundary is looser than ArcFace's; once tt grows, dd turns positive and the boundary is stricter than ArcFace's. MV-Arc-Softmax's extra margin is (t−1)cos⁡θj+t−1(t-1)\cos\theta_j+t-1, which is always positive at t=1.2t=1.2.

How the gradient changes

The logit of a hard negative class is s (t+cos⁡θj)cos⁡θjs\,(t+\cos\theta_j)\cos\theta_j; treating tt as a constant and differentiating with respect to cos⁡θj\cos\theta_j:

∂∂cos⁡θj[(t+cos⁡θj)cos⁡θj]=t+2cos⁡θj\frac{\partial}{\partial\cos\theta_j}\Big[(t+\cos\theta_j)\cos\theta_j\Big]=t+2\cos\theta_j

So in the paper's Eq. (8), the gradient a hard negative class sends back to the features and weights carries one extra factor compared with ArcFace:

M=2cos⁡θj+tM=2\cos\theta_j+t

ArcFace's MM is fixed at 1, MV-Arc-Softmax's at t=1.2t=1.2. CurricularFace's MM grows with tt and also with the difficulty of the negative class. The paper plots tt and MM over one training run.

The paper's Figure 2, a line chart. The horizontal axis is the iteration count, 0 to about 48,000; the vertical axis is the value, 0 to 1.3. The red line is t, rising from 0 to about 0.4 within the first one or two thousand iterations, then slowly climbing to about 0.6, jumping to about 0.65 to 0.7 at around iteration 27,000, and finally settling at about 0.74. The blue line is MV-Arc-Softmax's M, flat at 1.2. The green band is the range of CurricularFace's M: roughly 0.7 to 0.97 early on, raised to about 0.85 to 1.27 after about iteration 27,000, with visible spikes along its upper edge. A purple arrow marks the Early Stage and an orange arrow the Later Stage.
Original Figure 2, Huang et al., from PDF page 4, arXiv license, scholarly quotation.

The red line is tt. It starts at 0, climbs to 0.5 within the first few thousand iterations, then sits near 0.6; at around iteration 27,000 it jumps above 0.65, then climbs to 0.7 and finally settles at 0.74. The green band is the range of MM from smallest to largest over all hard negative classes at each iteration: about 0.7 to 0.97 early on, raised to 0.85 to 1.27 later; the blue line is MV-Arc-Softmax's 1.2. The paper's explanation is that fewer hard samples are mined later in training, which is why spikes appear along the band's upper edge.

There are two more things to read from this figure; what follows is this note's own inference.

First, where tt jumps. The figure runs to about 48,000 iterations, which matches 50 epochs on CASIA-WebFace (about 490,000 images) at batch size 512; the learning rate in that setting drops at epochs 28 and 38, which comes to around iterations 27,000 and 36,500, exactly where the red line jumps up twice. When the learning rate drops, the correct-class cosines rise across the board and tt follows. In this run, the curriculum's "next stage" follows the learning-rate schedule.

Second, the range of MM lets you back out the range of II. Late in training, t≈0.74t\approx0.74 and MM peaks at about 1.27, meaning the hardest negative class has cos⁡θj\cos\theta_j of about 0.27, so I=t+cos⁡θjI=t+\cos\theta_j is about 1.0; the minimum MM of about 0.85 corresponds to II of about 0.8. Early on, t≈0.6t\approx0.6 and II falls roughly between 0.65 and 0.8. In other words, in the paper's own run, the coefficient for hard negative classes stays below 1 almost the whole way, pushing down hard early and less later, and only at the end returns to around ArcFace. The second half of "learn the easy ones first, then up-weight the hard ones" is far gentler than the t=1t=1 red line in Figure 1.

How tt is estimated

What remains is where tt comes from. The authors observe that the mean of cos⁡θyi\cos\theta_{y_i}, the cosine between every sample in a batch and its own class center, can serve as an indicator of training progress: the more mature the model, the higher this mean. A single batch's statistic gets dragged around by extreme samples, so it is smoothed with an exponential moving average (EMA), Eq. (9):

t(k)=α r(k)+(1−α) t(k−1),t(0)=0t^{(k)}=\alpha\,r^{(k)}+(1-\alpha)\,t^{(k-1)},\qquad t^{(0)}=0

r(k)r^{(k)} is the mean positive cosine of the kk-th batch (without the margin). Note that this is cos⁡θyi\cos\theta_{y_i}, not the margin-added cos⁡(θyi+m)\cos(\theta_{y_i}+m).

The paper says α=0.99\alpha=0.99, meaning each step looks almost entirely at the current batch. The official code says:

Python
self.t = target_logit.mean() * 0.01 + (1 - 0.01) * self.t

The new batch gets only 0.01 and the old value 0.99, exactly the reverse. In April 2020 someone asked in issue #8 which one was right, and the maintainer HuangYG123 replied the same day with an apology, saying the code is the right version. After that the question was asked three more times, in issue #19, #32 and #37, with no reply from a maintainer; arXiv has only this one version, and Eq. (9) in the official CVPR version still says 0.99. Tencent's own TFace training framework includes CurricularFace, with yet another default of 0.1. (Paper 0.99, official code 0.01, TFace 0.1: take your pick.)

With the official code's 0.01, tt takes about 100 iterations to reach 63% of its target and 300 to reach 95%. For training that runs tens of thousands of iterations, this merely smooths out the noise between batches.

As for which statistic to use for tt, the authors compared three:

StatisticLFWCFP-FP
Mode of positive cosine99.4296.49
Mean of correct-class prob.99.4295.39
Mean of positive cosine99.4796.96

Compiled from Table 3 of the paper (%).

The mean beats the mode, and the cosine beats the probability. Under s=64s=64 the probability is very steep, with most samples close to either 0 or 1, too coarse to measure progress; that is this note's reading, while the paper only says the cosine better reflects the training stage.

tt also depends on the backbone. The asker in issue #8 trained with ResNet18 and saw tt only around 0.4 in the first stage, against 0.6 in the paper's figure; the maintainer replied that small backbones have a harder time pushing the positive cosine up.

The official implementation

The whole method is one classification head in code. The version below follows CurricularFace.forward in the official head/metrics.py, keeps the variable names of the original file, merges a few lines and omits the raw cosine returned for accuracy computation; the comments were added for this note:

Python
embbedings = l2_norm(embbedings, axis=1)
kernel_norm = l2_norm(self.kernel, axis=0)
cos_theta = torch.mm(embbedings, kernel_norm).clamp(-1, 1)            # (B, n)
target_logit = cos_theta[torch.arange(0, embbedings.size(0)), label].view(-1, 1)

sin_theta = torch.sqrt(1.0 - torch.pow(target_logit, 2))
cos_theta_m = target_logit * self.cos_m - sin_theta * self.sin_m      # cos(theta_y + m)
mask = cos_theta > cos_theta_m                                         # hard pairs, element-wise
final_target_logit = torch.where(target_logit > self.threshold,       # theta_y + m <= pi
                                 cos_theta_m, target_logit - self.mm)  # else cos(theta_y) - m*sin(m)

hard_example = cos_theta[mask]
with torch.no_grad():                                                  # t is a buffer, no gradient
    self.t = target_logit.mean() * 0.01 + (1 - 0.01) * self.t
cos_theta[mask] = hard_example * (self.t + hard_example)               # Eq. (7)
cos_theta.scatter_(1, label.view(-1, 1).long(), final_target_logit)   # positive column last
output = cos_theta * self.s                                            # logits for CrossEntropyLoss

A few implementation details:

  • mask is element-wise, judged once for each negative class of each sample; the correct-class column also falls into mask, but is overwritten by scatter_ at the end.
  • The modulation line is not wrapped in no_grad, so the gradient with respect to hard_example is exactly t+2cos⁡θjt+2\cos\theta_j; tt itself passes no gradient.
  • threshold and mm are carried over from ArcFace's official code. Once θyi+m\theta_{y_i}+m passes 180°, cos⁡(θyi+m)\cos(\theta_{y_i}+m) rises again as the angle grows, so the worst samples would be penalized less; hence when θyi>π−m\theta_{y_i}>\pi-m (about 151° for m=0.5m=0.5), cos⁡θyi−msin⁡m\cos\theta_{y_i}-m\sin m is used instead. Someone asked about the meaning of this line in issue #31 (July 2021), people were still adding the same question in 2024, and the maintainers never replied.
  • t is a tensor registered with register_buffer, and the line above reassigns it rather than modifying it in place. PyTorch's nn.DataParallel rebuilds replicas of the module on each GPU at every forward pass, and updates to module attributes made during the forward pass are discarded. So if this head is wrapped in DataParallel, tt stays at 0 forever, equivalent to a fixed t=0t=0; issue #10 (May 2020) reported that with multiple GPUs tt starts from 0 every time, again with no reply from a maintainer. The official training script uses DistributedDataParallel, which does not have this problem.

The head costs very little. In the same environment with the same batch size, ArcFace takes 0.370 seconds per iteration and CurricularFace 0.378 seconds, 2% more; at inference the classification head is discarded entirely, so the cost is the same as the backbone's.

Discussion

Experimental setup

  • Training data: CASIA-WebFace (about 10,000 people, 490,000 images) and the cleaned MS1MV2 (about 86,000 people, 5.8 million images), trained separately to allow comparison with earlier work.
  • Preprocessing and backbone: faces aligned with five landmarks and cropped to 112×112 as in ArcFace; the backbones are ArcFace's versions of ResNet50 and ResNet100.
  • Optimization: PyTorch, 4 Tesla P40 GPUs, batch size 512, SGD (momentum 0.9, weight decay 5e−4), initial learning rate 0.1. CASIA-WebFace drops the learning rate at epochs 28, 38 and 46, for 50 epochs in total; MS1MV2 drops it at epochs 10, 18 and 22, for 24 in total. s=64s=64, m=0.5m=0.5.

Fixed tt versus adaptive tt

ttLFWCFP-FP
099.3295.90
0.399.3796.47
0.799.4296.66
199.4593.94
Adaptive99.4796.96

Compiled from Table 2 of the paper (%).

t=0t=0 means hard negative classes are always pushed down; t=1t=1 means they are always up-weighted. LFW rises slightly all the way from 0 to 1, with differences all within 0.15; CFP-FP, which verifies frontal against profile faces, is more sensitive, and t=1t=1 drops to 93.94%, nearly 3 percentage points below t=0.7t=0.7. Up-weighting hard samples from start to finish hurts most on the test with large pose variation.

t=0.7t=0.7 is already very close to the adaptive result. The adaptive tt ends at 0.74 and stays below 0.7 for the first thirty thousand iterations, so the two differ mainly in the early part of training. The gap between them is 0.05 on LFW and 0.30 percentage points on CFP-FP.

For both this table and the earlier comparison of statistics, the paper does not say which training set and backbone were used (guess the ablation setup yourself).

Convergence on a small backbone

The NaN experiment from the opening comes from here.

The paper's Figure 5, a line chart; the horizontal axis is the iteration count, about 0 to 43,000; the vertical axis is the loss, about 5 to 55. Four lines: yellow is CurricularFace m = 0.45 (LFW 99.20), red is ArcFace m = 0.45 (LFW 99.10), blue is CurricularFace m = 0.5 (LFW 99.25), and green is ArcFace m = 0.5, labeled Not Converge. The first 3,000 iterations are boxed in black, and the zoomed inset shows the green line between iterations 1,800 and 2,400 falling from about 33 to about 19 at around iteration 2,140, then immediately jumping back to between 21 and 22. The yellow, red and blue lines each drop sharply once at around iterations 25,000 and 34,000; in the later part the blue line is highest and the red lowest.
Original Figure 5, Huang et al., from PDF page 6, arXiv license, scholarly quotation.

MobileFaceNet on CASIA-WebFace. At m=0.5m=0.5, the green ArcFace line in the inset bottoms out around iteration 2,140 and rebounds, and the paper says it becomes NaN at about iteration 2,400; the blue CurricularFace line converges, with LFW 99.25%. At m=0.45m=0.45 both converge, CurricularFace at 99.20% and ArcFace at 99.10%.

Now look at the early and late parts of the curves. At first the yellow line (CurricularFace) is clearly below the red line (ArcFace), because the hard samples' losses are pushed down; later the yellow line is slightly above the red, which the paper attributes to up-weighting hard samples in the later stage. By the inference above, however, the late-stage coefficients are mostly still below 1, and with coefficients below 1, plugging in the same features gives CurricularFace a loss that can only be smaller than ArcFace's. The two curves come from two separately trained models, so the level of the loss also reflects differences in the features themselves; this figure alone cannot measure how much up-weighting took place.

Against ArcFace

The main results use MS1MV2 and ResNet100. LFW is already saturated: CurricularFace 99.80%, ArcFace 99.77%. On the other four 1:1 verification sets, CFP-FP and CPLFW test pose, while AgeDB and CALFW test age:

MethodCFP-FPCPLFWAgeDBCALFW
ArcFace98.2792.0898.1595.45
MV-Arc-Softmax*98.2892.8397.9596.10
CurricularFace98.3793.1398.3296.20

Compiled from Table 4 of the paper (%); * marks results the authors reproduced with ResNet100.

IJB-B and IJB-C are harder mixed-quality datasets, where each person has several photos and frames from several videos; together these form a template, and the paper follows ArcFace in averaging the features within a template. IJB-B has 1,845 people, and its 1:1 verification has 10,270 same-person and 8 million different-person template pairs; IJB-C has about 3,500 people, with 19,557 same-person and 15.64 million different-person pairs. The metric TAR@FAR=1e−4 means setting the threshold so that only one in every ten thousand different-person pairs may be falsely accepted, then seeing what share of same-person pairs pass at that threshold.

MethodIJB-BIJB-C
ArcFace94.295.6
MV-Arc-Softmax*93.695.2
CurricularFace94.896.1

Compiled from Table 5 of the paper; TAR@FAR=1e−4 (%).

The error rate drops from 5.8% to 5.2% and from 4.4% to 3.9%, relative reductions of 10% and 11%.

MegaFace tests identification. The 530 people of FaceScrub, about 100,000 photos, serve as probes, and the database mixes in 1 million distractor photos of 690,000 people; two numbers are reported. Id is the rank-1 identification rate: a probe searches for its closest match among the 1 million distractors and has to find the right person. Ver is the verification pass rate at FAR=1e−6. MegaFace's original labels contain quite a few errors, and the ArcFace team compiled a cleaning list, so the table shows results before and after cleaning:

MethodIdVer
ArcFace81.0396.98
MV-Arc-Softmax*80.5996.22
CurricularFace81.2697.26
ArcFace (cleaned)98.3598.48
MV-Arc-Softmax* (cleaned)97.7697.80
CurricularFace (cleaned)98.7198.64

Compiled from Table 6 of the paper (MS1MV2, ResNet100, %).

All three tables point the same way, with CurricularFace highest in every column, by roughly 0.1 to 1 percentage point. The small training set (CASIA-WebFace, ResNet50) behaves the same, with the cleaned Id going from ArcFace's 91.75% to 92.48%.

There is one condition when reading these tables. The ArcFace rows are the ArcFace paper's own numbers, trained with MXNet; CurricularFace uses its own PyTorch code. The only comparisons with the same code and only the loss swapped are the authors' reproduction of MV-Arc-Softmax and the ablations above.

Results from other people's reruns

Outside the paper, several independent reruns are less one-sided.

  • Official issues. In issue #17 (June 2020), a user trained IR-101 from scratch with the official code and got LFW 99.77%, CFP-FP 98.30% and AgeDB 98.18%, against 99.80%, 98.36% and 98.37% for the pretrained model in the README: a rough reproduction, with AgeDB 0.19 short.
  • FaceX-Zoo (JD AI's face recognition toolbox, October 2021 version) compared eight classification heads with the same MobileFaceNet and the same MS-Celeb-1M-v1c. CurricularFace's MegaFace rank-1 is 87.27%, against ArcFace's 88.39% and MV-Softmax's 90.39%; on AgeDB it scores 95.82%, against ArcFace's 96.23%. This toolbox's authors overlap with MV-Softmax's.
  • AdaFace (2022) ran a same-setting comparison with ResNet50 on MS1MV2. Without data augmentation, CurricularFace averages 96.85% on the high-quality test sets and 41.00% on the low-quality ones, both slightly above AdaFace's 96.72% and 40.95%; with augmentation, CurricularFace drops on both.
  • AdaSin (a 2025 preprint) retrained on MS1MV3 with IResNet50: CurricularFace's IJB-C TAR@FAR=1e−5 is 94.41%, against ArcFace's 94.74%; CFP-FP is 97.30%, against ArcFace's 98.03%. This paper also points out that CurricularFace's modulation coefficient rarely exceeds 1, consistent with the inference above.

The last three all come from authors proposing competing methods, and their backbones, data and training lengths differ from the original paper's; they only show that CurricularFace's lead depends on the setup. The paper's own MS1MV2/ResNet100 results have not been overturned.

Pitfalls with the pretrained model

The official README includes a pretrained IR101 model. The two most common "failures to reproduce" in the issues have nothing to do with the loss.

One is LFW at only about 66%, which several people ran into. It took until 2022 for someone to find the cause: when the config file does not specify a checkpoint path, the program raises no error and evaluates with randomly initialized weights. The other is IJB-B/IJB-C TAR@FAR=1e−4 at only about 87%; the asker in issue #24 (November 2020) found the cause themselves the next day, a different face alignment. After switching to InsightFace's alignment, a similarity transform from five landmarks onto a fixed template, the paper's numbers could be reproduced.

Limitations

The paper's conclusion names two directions itself: designing a better negative-class function N(⋅)N(\cdot), and studying noisy samples, since mislabeled faces also get optimized as hard samples. The latter reappeared later in AdaFace from a different angle. Some hard samples are faces so blurry nobody can tell who they are; up-weight them, and the model can only memorize cues such as the color of the clothes.

Beyond that, this curriculum is tied to two external things. tt is the mean positive cosine, so the smaller the backbone, the more slowly tt grows; and tt's jumps follow the learning-rate schedule. Change the backbone or the schedule and the curriculum changes with them, and the paper's ablations do not cover these cases.

Conclusion

CurricularFace changes only the logits of hard negative classes, multiplying them by t+cos⁡θjt+\cos\theta_j, and estimates tt with an EMA of the mean positive cosine. Training time goes up 2% and inference is unchanged. On MS1MV2 with ResNet100 it edges out ArcFace in every table, with relative error reductions of about a tenth on IJB-B and IJB-C; MobileFaceNet also converges at m=0.5m=0.5. Other teams that reran it with different backbones and data did not see a consistent lead.

To use it, take the official classification head as is, with the code's EMA of 0.01; for multi-GPU training use DistributedDataParallel, or change tt to an in-place update. Print tt during training: the paper's setup ends at 0.74, and smaller backbones such as ResNet18 come out lower (one report had only 0.4 in the first stage); if it stays at 0, DataParallel has most likely swallowed the update. When evaluating the official weights, switch to InsightFace's alignment first.

Two years later, this paper's co-author Xiaoming Liu, with Minchul Kim and Anil K. Jain, published AdaFace, arguing that some of the up-weighted hard samples are faces that can never be learned no matter what.