Logit adjustment corrects class imbalance using the empirical class prior. We study whether a comparable class-frequency signal can instead be learned from the network representation, without explicitly supplying class counts to the correction rule. We introduce the Neural Prior Estimator (NPE), which attaches one or more lightweight Prior Estimation Modules (PEMs) to the latent representation. Each PEM is trained with a one-way logistic objective on the ground-truth coordinate. The resulting frequency-dependent outputs are combined into an NPE estimate and used as a learned logit correction, forming NPE-LA. In a simplified scalar model, the optimum of the PEM objective is monotone in the class count and grows asymptotically as logNc, up to a slower loglogNc term. Experiments on long-tailed CIFAR-10 and CIFAR-100 show that NPE-LA is competitive with standard logit adjustment and improves minority-class performance over CE and cRT in the reported settings. Experiments on STARE and ADE20K further show that the same idea can be used as a lightweight recalibration mechanism for dense prediction.
Figures & tables
Setting
LR
Weight Decay
Batch Size
Epochs
LR decay milestones
HP-1
0.1
2×10−4
124
200
160, 180
HP-2
0.05
10−3
64
120
100, 110
Table 1: Training hyperparameters for classification experiments. LR decay factor = 0.1 at each milestone.
Dataset
Backbone + Head
Optimizer
LR
WD
Iterations
LR decay milestones
STARE
UNet-FCN
SGD
1e-2
5e-4
600
200, 400
ADE20K
DeepLab-V3
SGD
1e-2
5e-4
2 500
1 250
ADE20K
Swin-T + UPerNet
AdamW
6e-5
1e-2
2 500
1 250
Table 2: Per-model training schedule and optimizer settings. LR decay factor = 0.1 at each milestone.
Figure 1: Class-wise accuracy on CIFAR-100 ( ρ=100 ) under HP-2, illustrating the impact of different numbers of PEMs ( NPEM ) across Head, Medium, and Tail classes. NPE is utilized during training only; no logit adjustment is performed at inference time.
# of PEMs
CIFAR-100
CIFAR-10
200
100
50
200
100
50
0
37.62
40.53
45.98
64.40
75.01
77.00
1
37.28
41.00
45.96
65.24
73.05
78.29
4
37.09
42.35
45.45
66.31
73.95
77.99
8
38.39
41.65
46.29
66.13
73.72
78.98
16
38.42
41.78
46.36
66.22
74.20
78.33
Table 3: Top-1 accuracy (%) on CIFAR-100 and CIFAR-10 for different imbalance ratios ρ and PEMs under hyperparameter setting HP-2. NPE is utilized during training only; no logit adjustment is performed at inference time.
Method
CIFAR-100
CIFAR-10
200
100
50
200
100
50
CE
34.83 ± 0.26
39.14 ± 0.41
43.87 ± 0.25
63.54 ± 0.28
71.24 ± 0.29
76.77 ± 0.37
cRT
37.04 ± 0.24
41.04 ± 0.14
45.83 ± 0.32
67.19 ± 0.31
73.80 ± 0.42
79.07 ± 0.51
LA
38.59 ± 0.18
42.63 ± 0.46
47.07 ± 0.49
72.10 ± 0.27
77.37 ± 0.32
81.25 ± 0.38
NPE-LA (1 PEM)
38.85 ± 0.30
42.53 ± 0.40
46.86 ± 0.78
72.42 ± 0.21
77.89 ± 0.38
82.22 ± 0.46
NPE-LA (16 PEMs)
39.36 ± 0.12
42.73 ± 0.28
46.44 ± 0.24
73.18 ± 0.41
78.17 ± 0.73
82.31 ± 0.22
Table 4: Top-1 accuracy (%) on CIFAR-100 and CIFAR-10 for different imbalance ratios ρ and methods under hyperparameter setting HP-1. Bold indicates the highest value; underlined indicates the second highest
Method
CIFAR-100
CIFAR-10
200
100
50
200
100
50
CE
37.04 ± 0.23
41.00 ± 0.12
45.46 ± 0.11
65.59 ± 0.20
73.18 ± 0.77
77.76 ± 0.44
cRT
41.58 ± 0.24
45.43 ± 0.11
50.50 ± 0.12
72.34 ± 0.71
77.85 ± 0.25
81.01 ± 0.50
LA
43.35 ± 0.33
46.85 ± 0.53
51.30 ± 0.22
74.91 ± 0.51
80.13 ± 0.13
82.95 ± 0.36
NPE-LA (1 PEM)
42.99 ± 0.30
46.72 ± 0.23
51.25 ± 0.36
74.37 ± 0.25
79.35 ± 0.37
82.32 ± 0.19
NPE-LA (16 PEMs)
43.96 ± 0.40
47.47 ± 0.36
51.82 ± 0.17
74.83 ± 0.55
80.12 ± 0.31
83.16 ± 0.08
Table 5: Top-1 accuracy (%) on CIFAR-100 and CIFAR-10 for different imbalance ratios ρ and methods under hyperparameter setting HP-2. Bold indicates the highest value; underlined indicates the second highest
Figure 2: Class-wise accuracy on CIFAR-100 ( ρ=100 ) under HP-2, comparing different methods across head, medium, and tail classes.
Backbone
Decode Head
PEM
Scale
Dice (%)
Accuracy (%)
Type
Factor
BG
FG
Mean
BG
FG
Mean
UNet
FCN
-
-
98.55
81.20
89.78
99.13
75.21
87.17
FCN
1
97.34
75.02
86.27
95.22
94.93
95.08
0.2
98.52
82.39
90.46
98.44
83.21
90.83
Table 6: STARE segmentation with UNet–FCN: Dice and pixel accuracy for background (BG), foreground (FG), and mean, comparing the baseline and NPE-LA across scale factors α .
Backbone
Decode Head
PEM Type
Scale Factor
mIoU (%)
mAcc (%)
DeepLab-V3
ASPPHead
-
-
42.42
53.60
ASPPHead
1
24.55
65.59
0.1
42.82
57.99
FCN
1
29.28
67.05
0.1
42.92
56.92
Swin-T
UPerNet
-
-
44.41
55.96
Table 7: ADE20K segmentation with DeepLabv3 and Swin-T: mIoU and pixel accuracy for baseline and NPE-LA with different PEM types and scale factors α .
Figure 3: Class-wise IoU on ADE20K for baseline DeepLab-V3 and NPE-LA variant with a single FCN PEM and scale factor 0.1. Baseline IoUs are ordered in ascending order for improved visual clarity.
Figure 4: Class-wise accuracy on ADE20K for baseline DeepLab-V3 and NPE-LA variant using a single FCN PEM and scale factor 0.1. Baseline accuracies are ordered in ascending order for improved visual clarity.
Appendix figures & tables1 asset
Supplementary material from the paper’s appendix.
Appendix
Figure 5: NPE estimated prior p^val(y) and empirical class prior p(y) (left axis), and representation confidence Conf(y) (right axis), on CIFAR-100-LT ( ρ=100 ).
Prior-data fitted networks (PFNs) have achieved exceptional performance on tabular classification tasks. However, like other classifiers, their performance can suffer under the effect of class imbalance, resulting in poor performance for rare classes. Several techniques exist which attempt to mitigate the deleterious effect of class imbalance on classification performance, but the in-context learning (ICL) dynamic of PFNs means that loss-based strategies are impossible, and other techniques are unproven. We have adapted several classical techniques addressing class imbalance and analyzed their performance on PFN classification. We observe that thresholding performs exceptionally well because of the calibration characteristics of PFNs, and downsampling performs comparably because of PFNs exceptional limited-data performance, with the additional benefit of reduced computation cost for inference.
Samuel McDowell, Nathan Stromberg, Lalitha Sankar
School of Electrical, Computer and Energy Engineering · Arizona State University, Tempe, AZ
Learning with class-conditional label noise often relies on a transition model from latent clean classes to observed annotations. Forward correction embeds this transition in the likelihood, yet finite-sample networks may still memorize corrupted labels. The corrected likelihood also induces a reverse posterior over the clean classes that could explain each annotation. When its leading class differs from the annotation, the model and transition matrix provide evidence against that annotation, but the leading alternatives can remain nearly tied. We introduce Selective Posterior Margin Regularization (SPMR), which preserves the Forward objective and converts this disagreement into a graded update on the clean classifier. SPMR selects the leading reverse-posterior class, scales a detached pairwise margin by the separation between the two leading posterior classes, and assigns correspondingly little influence to diffuse conflicts. The gap factorizes into transition- adjusted pairwise separation and the posterior mass carried by the leading pair. The active margin follows the locally minimum-norm logit direction that enlarges the selected pairwise margin. Across five known-transition benchmarks, SPMR improves full-length Forward by 2.5-7.0 percentage points and remains 0.7-2.5 percentage points above Forward with Mixup and early stopping. Matched interventions support distinct gains from the posterior-space coefficient, transition-adjusted target, and pairwise action. The same design transfers to estimated transitions, human annotations, architectural changes, and stronger Forward recipes. The formulation uses latent-class evidence already available inside Forward correction without promoting every posterior conflict to a corrected label.
Zexing Zhang, Jichao Li, Tianyang Lei +2
College of Systems Engineering, National University of Defense Technology Changsha 410073, China
Neural Posterior Estimation (NPE) fits an amortized conditional density estimator to a simulated training set of complete-data realizations. NPE's training objective, log-likelihood, favors posterior approximations that assign arbitrarily high density to the training points, and typical families of amortized conditional density estimators (e.g., normalizing flows, Gaussian encoders) are flexible enough to oblige. The resulting policy of extreme overconfidence translates poorly to held-out data. Early stopping and other regularizers can prevent this degeneracy, but they are limited to selecting posterior approximations along an unfavorable optimization trajectory set by in-sample residuals, where the posterior mean is underfit while the posterior variance is overfit. To avoid this trade-off, we propose Cross-Fitting NPE (CF-NPE), which uses sample splitting to separate conditional-mean estimation from the estimation of the posterior's higher moments. Using K-fold cross-fitting, CF-NPE fits K posterior-mean regressors and then fits a conditional density estimator to the resulting out-of-fold residuals. In experiments with synthetic data and in a cosmological application, CF-NPE achieves higher held-out log-likelihood than standard NPE and typically improves calibration. CF-NPE is most useful in high-dimensional, simulation-limited settings.
Jeffrey Regier
Department of Statistics, University of Michigan, Ann Arbor, MI 48109