001 / research record
sac-qutab
semantic analysis of counterfactuals — quality under transformations and adaptive benchmarking.
listen to this recordnarrated · 6:00
0:00
the record
abstract
clean accuracy gives an incomplete account of a land-cover classifier's sensitivity to image changes. sac-qutab evaluates resnet-50 and vit-small/16 on paired eurosat rgb images, using three training seeds per model and four separate partitions for training, validation, calibration and final test.
rgb gain, fourier amplitude mixing and resolution reduction are tested at three severities. identity shams check the processing paths; different-class controls provide a reference for representation displacement. a frozen protocol fixes the six checkpoints and evaluation inputs before final testing.
resnet achieves higher mean clean accuracy — 98.63% versus 96.77% — whereas vit retains more accuracy under severe resolution reduction — 43.00% versus 12.94%. the model ordering therefore depends on the transformation family. adding representation displacement to transformed uncertainty and entropy improves failure-detection average precision in every run: mean paired gains of 0.432 for resnet and 0.402 for vit.
three questions
- how do predictions change with transformation family and severity?
- what different behaviors are revealed by prediction stability and representation stability?
- does representation information improve failure detection when added to the specified output/confidence features?
method
each image is compared with a deterministically transformed version of itself, so prediction and representation changes are measured on matched inputs. the latent choice — channel-gain direction or donor identity — is reused across the three severities, changing only the dose.
three intervention families act on the native 64×64 tensor before common 224×224 preprocessing: rgb gain scales channels by a fixed random direction, fourier amplitude mixing convexly blends the full amplitude spectrum with a same-class training donor while keeping the source phase, and resolution reduction downsamples to 48, 32 or 16 pixels per side. each family carries an identity sham that passes the untransformed image through the same code path.
metrics: label consistency, jensen–shannon divergence of the predictive distribution, signed confidence drop, and cosine dissimilarity of representations — the last normalized to a percentile of a validation different-class control ecdf, fixed before evaluation. failure detection compares an output-only logistic detector (transformed uncertainty + entropy) against the same detector augmented by the normalized representation feature, fitted per model and seed on the calibration partition.
results
| accuracy (%) — mean ± sd | ResNet-50 | ViT-Small/16 |
|---|---|---|
| clean | 98.63 ±0.04 | 96.77 ±1.21 |
| rgb gain · severe | 92.14 ±0.88 | 85.85 ±4.14 |
| amplitude mixing · severe | 94.41 ±0.18 | 93.59 ±0.88 |
| resolution · mild | 87.89 ±1.00 | 92.89 ±3.12 |
| resolution · moderate | 49.47 ±3.56 | 77.17 ±3.69 |
| resolution · severe | 12.94 ±3.14 | 43.00 ±6.71 |
the ordering flips with the intervention family: resnet leads on clean, rgb gain and amplitude mixing, while vit keeps accuracy under resolution reduction. the families are not matched for perceptual damage, so the comparison describes sensitivity on the chosen dose grid.
failure detection
| average precision — mean ± sd | ResNet-50 | ViT-Small/16 |
|---|---|---|
| output only | 0.507 ±0.107 | 0.496 ±0.028 |
| representation only | 0.918 ±0.008 | 0.878 ±0.032 |
| output + representation | 0.939 ±0.006 | 0.898 ±0.020 |
| paired gain ΔAP | +0.432 ±0.113 | +0.402 ±0.032 |
adding normalized representation instability improves both ap and auroc in every model/seed run. mean paired auroc gains are 0.166 for resnet and 0.114 for vit, and every stored source-group bootstrap interval excludes zero. features can stay close relative to different-class controls while the predicted label still changes — prediction stability and representation stability are not interchangeable.
limits
no human semantic-preservation review was conducted — results measure sensitivity relative to the original dataset labels, and severe transformations can remove genuine class evidence. differences in pretraining recipes and hardware prevent attributing gaps to architecture alone. three training seeds, one rgb benchmark and a content-group split without geographic holdout restrict generalization. the evaluated detector needs a clean reference image, so it is an offline paired diagnostic rather than a deployment monitor.
reproducibility
the protocol, configurations, pair manifests, validation ecdfs and detectors were frozen with sha-256 digests before final testing. the report package rebuilds its figures from saved evaluations; the public repository is the reproducibility entry point: github.com/GeminusF/sac-qutab.