Teacher-Anchored Selection of Post-Training Quantized Models under Domain Shift
Organizations: Department of Computer Science, University of Reading, Reading, United Kingdom · Quantitative Analysis and Artificial Intelligence Department, Miralta Finance Bank S.A., Madrid, Spain · Lecturer, Albert School, Madrid, Spain
Abstract
Compressing a trained model yields a family of deployment candidates, and under domain shift the most compressed one need not be the one to deploy. We study selection over such a family, with candidates and teacher fixed and target labels absent or scarce. Two findings organize the label-free case. Minimum teacher distortion behaves almost as a constant rule, selecting the same eight-bit, per-channel, unclipped configuration in every run, which does not minimize empirical target cross-entropy. Established estimators divide sharply: in the overconfident-collapse regime of the CNN families, confidence-based estimators order the family close to backwards, and the diagnostics that identify it need the labels the setting denies, while output-distribution estimators match the teacher-relative anchor and on one architecture beat it. Distortion is nonetheless stable, so a supervised term can move selection away from it. Combining the two, we give exact quadratic identities for a canonical quadratic analogue of the family. We also show that under symmetric corruption the label-dependent part of a criterion linear in the label indicator is multiplied by one common factor whenever its coefficient sums are candidate-invariant, a class holding teacher contrasts and accuracy but not cross-entropy. These characterize the score's components without bounding selection regret. Across one hundred and thirty-four candidate families, one per independently trained convolutional or Vision Transformer teacher, anchoring reduces mean regret at the smallest label budget in every setting, an advantage that fades beyond twenty-five labels.
Figures & tables
| Method | RN50 | MNV2 | ViT–DN | ViT–C20 |
|---|---|---|---|---|
| Direct validation | 0.182 0.06 | 0.227 0.13 | 0.208 0.12 | 0.222 0.10 |
| CE-combo (ours) | 0.166 0.09 | 0.103 0.07 | 0.139 0.14 | 0.115 0.06 |
| Alignment (ours) | 0.168 0.10 | 0.088 0.07 | 0.205 0.33 | 0.150 0.06 |
| SoftmaxCorr [TMLR’24] | 0.212 0.18 | 0.061 0.27 | 0.224 0.47 | 0.083 0.06 |
| COT [NeurIPS’23] | 0.257 0.21 | 0.007 0.01 | 0.278 0.66 | 0.098 0.05 |
| Nuclear norm [ICML’23] | 0.277 0.20 | 0.013 0.03 | 0.280 0.66 | 0.098 0.05 |
| Setting | Selected by | ECE | Acc. | CE |
|---|---|---|---|---|
| ResNet50 | Distortion | 0.216 | 0.332 | 2.865 |
| Validation CE | 0.083 | 0.327 | 2.745 | |
| MobileNetV2 | Distortion | 0.227 | 0.308 | 3.019 |
| Validation CE | 0.195 | 0.308 | 2.884 | |
| Paired difference, validation CE minus distortion | ||||
| ResNet50 | ||||
| Setting | Dist. | Val-CE | CE-combo | Align | |
|---|---|---|---|---|---|
| ResNet50–DomainNet | 10 | 0.2323 | 0.1756 | 0.1941 | 0.1870 |
| 25 | 0.2323 | 0.0972 | 0.0948 | 0.1143 | |
| 50 | 0.2323 | 0.0571 | 0.0498 | 0.0635 | |
| 100 | 0.2323 | 0.0267 | 0.0271 | 0.0342 | |
| 150 | 0.2323 | 0.0232 | 0.0239 | 0.0270 | |
| 300 | 0.2323 | 0.0000 | 0.0012 | 0.0024 |
| Setting | Val-CE | Val-Acc | CE-combo | Val-CE | Val-Acc | CE-combo | Val-CE | Val-Acc | CE-combo | |
|---|---|---|---|---|---|---|---|---|---|---|
| ResNet50–DomainNet | 10 | 0.168 | 0.630 | 0.159 | 0.326 | 1.497 | 0.234 | 0.393 | 2.485 | 0.278 |
| 25 | 0.100 | 0.249 | 0.091 | 0.145 | 0.427 | 0.111 | 0.361 | 0.792 | 0.230 | |
| 50 | 0.051 | 0.262 | 0.053 | 0.118 | 0.269 | 0.083 | 0.317 | 0.262 | 0.216 | |
| 100 | 0.025 | 0.227 | 0.030 | 0.104 | 0.239 | 0.071 | 0.288 | 0.240 | 0.194 | |
| 300 | 0.008 | 0.219 | 0.010 | 0.087 | 0.231 | 0.073 | 0.232 | 0.240 | 0.202 | |
| Setting | Predicted | Label comp. | Val. accuracy | |
|---|---|---|---|---|
| ResNet50–DomainNet | 10% | 0.897 | 0.881 | 0.881 |
| 20% | 0.793 | 0.800 | 0.802 | |
| 30% | 0.690 | 0.683 | 0.687 | |
| 40% | 0.586 | 0.577 | 0.579 | |
| MobileNetV2–DomainNet | 10% | 0.897 | 0.882 | 0.882 |
| 20% | 0.793 | 0.803 | 0.802 |
Appendix figures & tables19 assets
Supplementary material from the paper’s appendix.
Appendix
| Symbol | Meaning | Symbol | Meaning |
|---|---|---|---|
| , | fixed teacher and its predictive distribution | , | candidate and its predictive distribution |
| , | fixed candidate family and its cardinality | unlabeled target input pool | |
| , | labeled target sample and its size | disjoint target test set, evaluation only | |
| one-hot vector for class | , | teacher and candidate outputs in a chosen representation | |
| probability change | supervised term added to the distortion | ||
| teacher distance of type on input set | per-example alignment contribution for loss |
| Setting | Cfg. | Ex. | Runs | Pool | Clean | Noise |
|---|---|---|---|---|---|---|
| RN50–DN | 15 | 3 | 45 | 25 † | 10 | |
| MNV2–DN | 15 | 3 | 45 | 25 † | 10 | |
| ViT–DN | 17 | 1 | 17 | – | 25 | 10 |
| ViT–C20 | 27 | 1 | 27 | 25 | 10 | |
| Total | 74 | – | 134 | – | – | – |
| Selector | Score minimized over | Role |
|---|---|---|
| Distortion | label-free teacher-relative baseline | |
| Highest precision | none (fixed configuration) | data-free baseline matching the distortion pick |
| Validation CE | direct supervised reference | |
| CE-combo | anchored cross-entropy | |
| Alignment | teacher-relative directional selector | |
| Teacher component | mechanism ablation, no observed class |
| Data | Teacher | Cls. | Cfg. | Ex. | Runs | Pool | Max. |
|---|---|---|---|---|---|---|---|
| DomainNet | ResNet50 | 30 | 15 | 3 | 45 | 300 | 300 |
| DomainNet | MNV2 | 30 | 15 | 3 | 45 | 300 | 300 |
| DomainNet | ViT | 50 | 17 | 1 | 17 | 2.5k–6.3k | 150 |
| CIFAR-20 | ViT | 20 | 27 | 1 | 27 | 1332 | 200 |
| Total | – | – | 74 | – | 134 | – | – |
| CE-cmb Val-CE | Align Val-CE | Align CE-cmb | |||||
|---|---|---|---|---|---|---|---|
| Setting | Diff. | Diff. | Diff. | ||||
| RN50–DN | 10 | -0.016 | 1.000 | -0.014 | 1.000 | +0.001 | 1.000 |
| 25 | +0.003 | 0.776 | +0.020 | 0.469 | +0.016 | 0.077 | |
| 50 | +0.008 | 0.393 | +0.026 | 0.112 | +0.018 | 0.063 | |
| 100 | +0.004 | 0.485 | +0.020 | 0.167 | +0.016 | 0.029 | |
| 150 | -0.001 | 0.899 | +0.012 | 0.324 | +0.012 | 0.324 | |
| Estimator | RN50–DN | MNV2–DN |
|---|---|---|
| Distortion | 0.0032 | 0.0081 |
| SoftmaxCorr | 0.0092 | 0.0085 |
| Nuclear norm | 0.0090 | 0.0031 |
| DOC | 0.0033 | 0.0076 |
| ATC-MC | 0.3211 | 0.2717 |
| ATC-NE | 0.3211 | 0.2404 |
| Setting | Val-CE | All | Same | Indep. | COT anchor | |
|---|---|---|---|---|---|---|
| ResNet50–DomainNet | 10 | 0.1801 | 0.1627 | 0.1564 | 0.1629 | 0.1888 |
| 50 | 0.0608 | 0.0677 | 0.0682 | 0.0672 | 0.0757 | |
| 300 | 0.0129 | 0.0086 | 0.0086 | 0.0086 | 0.0094 | |
| MobileNetV2–DomainNet | 10 | 0.2473 | 0.1065 | 0.1080 | 0.1101 | 0.0847 |
| 50 | 0.0504 | 0.0231 | 0.0227 | 0.0219 | 0.0119 | |
| 300 | 0.0010 | 0.0010 | 0.0010 | 0.0010 | 0.0009 |
| CE regret at floor | Accuracy regret | ||||
|---|---|---|---|---|---|
| Setting | Dist. | Avg. conf. | |||
| ResNet50–DomainNet | 0.2158 | 0.2161 | 0.2161 | 0.0040 | 0.3212 |
| MobileNetV2–DomainNet | 0.0848 | 0.0848 | 0.0848 | 0.0076 | 0.3076 |
| Setting | Dist. | Val-CE | CE-combo | Align | |
|---|---|---|---|---|---|
| ResNet50–DomainNet | 10 | 0.2198 | 0.1819 | 0.1664 | 0.1678 |
| 25 | 0.2198 | 0.1015 | 0.1047 | 0.1211 | |
| 50 | 0.2198 | 0.0619 | 0.0702 | 0.0882 | |
| 100 | 0.2198 | 0.0334 | 0.0372 | 0.0532 | |
| 150 | 0.2198 | 0.0282 | 0.0276 | 0.0398 | |
| 300 | 0.2198 | 0.0132 | 0.0071 | 0.0121 |
| th-percentile regret | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Setting | Selector | 10 | 25 | 50 | 100 | 150 | 300 | 10 | 25 | 50 | 100 | 150 | 300 | |
| RN50–DN | Val-CE | 0.58 | 0.35 | 0.24 | 0.14 | 0.12 | 0.08 | 0.50 | 0.33 | 0.17 | 0.07 | 0.06 | 0.02 | |
| CE-combo | 0.49 | 0.37 | 0.33 | 0.20 | 0.13 | 0.03 | 0.49 | 0.32 | 0.19 | 0.08 | 0.06 | 0.00 | ||
| Align | 0.48 | 0.41 | 0.34 | 0.28 | 0.18 | 0.05 | 0.50 | 0.36 | 0.27 | 0.13 | 0.09 | 0.00 | ||
| MNV2–DN | Val-CE | 1.18 | 0.61 | 0.13 | 0.06 | 0.04 | 0.00 | 0.30 | 0.15 | 0.06 | 0.02 | 0.01 | 0.00 | |
| CE-combo | 0.71 | 0.20 | 0.12 | 0.08 | 0.06 | 0.02 | 0.23 | 0.13 | 0.06 | 0.02 | 0.02 | 0.00 | ||
| Setting | Supervision | Median | IQR | SD | ||
|---|---|---|---|---|---|---|
| ResNet50–DomainNet | Clean | 7.5 | [5.5, 9.0] | 0.111 | 0.156 | 3.12 |
| 20% noise | 9.0 | [8.5, 9.5] | 0.000 | 0.244 | 1.28 | |
| 40% noise | 8.5 | [7.5, 9.0] | 0.000 | 0.067 | 1.01 | |
| MobileNetV2–DomainNet | Clean | 3.5 | [0.0, 5.5] | 0.289 | 0.022 | 2.81 |
| 20% noise | 4.0 | [0.0, 5.5] | 0.289 | 0.000 | 2.91 | |
| 40% noise | 10.0 | [8.0, 10.0] | 0.133 | 0.533 | 3.41 |
| Setting | Val-CE | CE-combo | Align | |
|---|---|---|---|---|
| RN50–DN | 20% | 0.064 (0.078) | 0.064 (0.068) | 0.065 (0.067) |
| 40% | 0.165 (0.231) | 0.127 (0.200) | 0.102 (0.180) | |
| MNV2–DN | 20% | 0.009 (0.181) | 0.013 (0.105) | 0.001 (0.015) |
| 40% | 0.779 (0.831) | 0.706 (0.770) | 0.393 (0.399) |
| Setting | Dist. | Align | Perm. | Teach. | |
|---|---|---|---|---|---|
| ResNet50–DomainNet | 10 | 0.2323 | 0.1870 | 0.2170 | 0.1445 |
| 25 | 0.2323 | 0.1143 | 0.2228 | 0.1101 | |
| 50 | 0.2323 | 0.0635 | 0.2276 | 0.0692 | |
| 100 | 0.2323 | 0.0342 | 0.2304 | 0.0432 | |
| 150 | 0.2323 | 0.0270 | 0.2320 | 0.0360 | |
| 300 | 0.2323 | 0.0024 | 0.2307 | 0.0260 |
| Setting | Budget | Admissible | Excess over free | Internal spread |
|---|---|---|---|---|
| RN50–DN | 12 | 0.710 | 14.41 | |
| 36 | 0.103 | 15.02 | ||
| 54 | 0.007 | 15.12 | ||
| none | 72 | 0.000 | 15.13 | |
| MNV2–DN | 12 | 0.901 | 10.41 | |
| 36 | 0.869 | 10.63 |
| Setting | Budget | Dist. | Val-CE | CE-combo | Dist. | Val-CE | CE-combo | Dist. | Val-CE | CE-combo |
|---|---|---|---|---|---|---|---|---|---|---|
| ResNet50–DomainNet | 0.095 | 0.097 | 0.090 | 0.079 | 0.043 | 0.042 | 0.075 | 0.002 | 0.004 | |
| 0.305 | 0.168 | 0.160 | 0.304 | 0.040 | 0.056 | 0.304 | 0.014 | 0.016 | ||
| 0.269 | 0.184 | 0.176 | 0.283 | 0.063 | 0.078 | 0.290 | 0.015 | 0.009 | ||
| none | 0.220 | 0.182 | 0.164 | 0.220 | 0.062 | 0.070 | 0.220 | 0.013 | 0.007 | |
| MobileNetV2–DomainNet | 0.011 | 0.003 | 0.005 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | |
| Setting | Runs | AvgConf | Entropy | ATC-MC | ATC-NE | Distinct | ||||
|---|---|---|---|---|---|---|---|---|---|---|
| ResNet50–DomainNet | 45 | 30 | 15.062 | 15.062 | 15.062 | 15.062 | 1.000 | 0.408 | 34% | |
| MobileNetV2–DomainNet | 45 | 30 | 10.814 | 10.814 | 4.886 | 4.696 | 0.985 | 0.534 | 100% | |
| ViT–CIFAR-20 | 27 | 20 | 0.124 | 0.167 | 0.100 | 0.099 | 0.579 | 0.726 | 100% | |
| ViT–DomainNet | 17 | 50 | 0.062 | 0.339 | 0.020 | 0.020 | 0.523 | 0.761 | 100% |
| RN50 | MNV2 | ViT–C20 | ViT–DN | |||||
|---|---|---|---|---|---|---|---|---|
| Bits | PT | PC | PT | PC | PT | PC | PT | PC |
| 2 | 99 | 100 | 100 | 100 | 86 | 96 | 91 | 88 |
| 3 | 36 | 16 | 99 | 100 | 33 | 0 | 31 | 0 |
| 4 | 33 | 0 | 91 | 90 | 15 | 0 | 17 | 0 |
| 5 | 0 | 0 | 87 | 39 | 0 | 0 | 0 | 0 |
| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
Model Selection
Model selection chooses models, features, or configurations that balance predictive fit, generalization, complexity, and deployment constraints.
See all 96 papers