Downloads · 30 days
0
RayCxggg/vit-superposition-bottleneck
vit-superposition-bottleneck is a image classification model from RayCxggg. Use it when you need a label for an image. The card lists the license as mit.
A replication study by Second Look Research, supervised by Zephaniah Roe.
Downloads · 30 days
0
Access
Public
Updated Aug 29, 2026
Repo size
6.8 GB
Likes
0
Public
Click a slice to open those files.
.safetensors6.8 GB · 100%
From the Hugging Face model README
A replication study by Second Look Research, supervised by Zephaniah Roe.
80 vision transformers trained from scratch for an independent replication of Stevinson et al., Adversarial Vulnerability from Interference Between Features in Superposition (arXiv:2510.11709v2), Section 5.
The paper's claim is that adversarial attacks exploit interference between class
features sharing a low-dimensional representation. The intervention is a linear
bottleneck of width m in the classification head of a k-class model: as m/k
falls, classes are forced into superposition, and input-space attack profiles come
to track head interference (ρ̄). These checkpoints are the trained models behind
that sweep, released so the geometry can be re-measured without retraining.
| family | dataset | k | m | seeds | files |
|---|---|---|---|---|---|
bottleneck | CIFAR-10 | 10 | 2, 3, 5, 10 | 0–4 | 20 |
bottleneck | CIFAR-100 | 100 | 20, 30, 50, 100 | 0–4 | 20 |
bottleneck | Tiny-ImageNet | 200 | 40, 60, 100, 200 | 0–4 | 20 |
adv-train | CIFAR-10 | 10 | 2, 3, 5, 10 | 0–4 | 20 |
adv-train models share the bottleneck recipe but are trained with PGD
adversarial training at ε=2/255, 7 steps.
<family>/<dataset>/m<M>/seed<N>/
model.safetensors # fp32 weights, 21.3M params
config.json # training recipe, final metrics, provenance
history.json # per-epoch lr / val_loss / val_acc (300 entries)
ViT trained from scratch: patch 4, embed dim 384, depth 12, 6 heads, MLP dim 1536,
CLS pooling. The head is encoder: Linear(384 → m) then decoder: Linear(m → k),
both with bias. Decoder rows are the class vectors w_c whose pairwise cosines
define the interference matrix.
Normalization is a module inside the model, so inputs are pixel-space [0,1]
and ε is specified in /255 directly.
The weights need the model class from the replication repo
(superposition-replication,
commit 55f6f0e):
import json
from dataclasses import replace
from safetensors.torch import load_file
from img_classifiers.core.config import config_for
from img_classifiers.core.data import stats
from img_classifiers.core.model import build_bottleneck
d = "bottleneck/cifar10/m2/seed0"
cfg = json.load(open(f"{d}/config.json"))["recipe"]
model = build_bottleneck(replace(config_for(cfg["dataset"]), m=cfg["m"]),
*stats(cfg["dataset"]))
model.load_state_dict(load_file(f"{d}/model.safetensors"))
model.eval()
Mean ± std over 5 seeds, in percent.
| m/k | CIFAR-10 | CIFAR-100 | Tiny-ImageNet | CIFAR-10 (adv-train) |
|---|---|---|---|---|
| 0.2 | 54.00 ± 3.37 | 65.11 ± 0.60 | 54.44 ± 0.43 | 78.39 ± 0.56 |
| 0.3 | 78.26 ± 0.58 | 65.96 ± 0.40 | 54.78 ± 0.34 | 85.56 ± 0.61 |
| 0.5 | 87.10 ± 0.74 | 66.59 ± 0.56 | 54.65 ± 0.30 | 85.34 ± 0.40 |
| 1.0 | 89.91 ± 0.79 | 67.52 ± 0.66 | 55.18 ± 0.69 | 85.27 ± 0.46 |
Adversarial training raises clean accuracy at tight bottlenecks (54.00 → 78.39 at m/k=0.2), inverting the usual robustness/accuracy tradeoff. At m/k=0.2 the standard model is capacity-starved and underfits; AT appears to act as a regulariser there. Treat this as an observation from these runs, not an established result.
MIT, covering the weights and the accompanying code. The training datasets retain their own licenses and terms.
These checkpoints were produced by Second Look Research, which conducts independent replications of published work, under the supervision of Zephaniah Roe. Please attribute the models to Second Look Research rather than to the original authors — the paper is the object of the replication, not its source.
The work being replicated is Stevinson, Prieto, Barsbey and Birdal, Adversarial Vulnerability from Interference Between Features in Superposition (arXiv:2510.11709); cite that paper for the claims, and this repository for the replication artifacts.