Introduction
An availability attack, or unlearnable examples attack, perturbs every image of a published
training set inside an ball of radius . The goal is that a model trained from
scratch on the released set generalises badly to clean test data [1]. The
attacker sees the whole training set and its labels but not the victim. It does not know the
victim's architecture or training recipe, and in general it does not know whether the victim
trains adversarially. The harness passes the attack a description of the victim's pipeline
(standard, advtrain:<N> or unknown), and nothing more.
The well-known way to make data unlearnable is to plant a shortcut, a feature that predicts the label more easily than the image content does. Error-minimising noise finds such a feature by optimising against a surrogate network [1]. Synthetic patterns plant one directly: linearly separable noise [2], autoregressive filters [3], class-wise random noise. Shortcuts of this kind are fragile against a victim that trains adversarially. The victim's adversary perturbs each training image inside its own ball and removes whatever the shortcut can be cancelled by, so the network has to learn real features after all. The robust variants harden error-minimising noise against adversarial learning [4], make it stable [5], or re-think the attack under a randomness constraint [6]. Other recent work changes the objective altogether [7, 8].
Our starting point was the arithmetic of the threat model. An adversary of radius can cancel at most of a perturbation of amplitude . A residual of always remains. If that residual is a shortcut the victim can separate robustly and learn quickly, the adversarial loss falls to zero before real robust features are learned. The question we set ourselves is therefore: which full-amplitude, class-wise pattern does a victim actually adopt under adversarial training, and where does it send clean test images, which carry no pattern at all? The second half of that question turned out to matter as much as the first.
Method
Our method, the tone code, is model-free at its core. The perturbation of image with label is a tile repeated over the image at full amplitude:
Everything in the method is about choosing the tiles, and one class's tile in particular.
Why tiles, and why pure tones
For two classes with sign tiles and , an adversary of radius can remove at most from each pixel of either pattern. The linear robust gap between the classes is therefore , so full-amplitude sign tiles are optimal for every at once. Separability alone is not enough, though. A victim trained adversarially only adopts a shortcut its first layer can read. In our development runs, random sign tiles of period 4 or less were learned, while tiles of period 5 or more were ignored. Every channel of a tile is therefore a pure tone of the lattice, which one filter detects at every position. With if and otherwise, the seven tones are the checkerboard , the stripes and , the two diagonals and , and two mixed tones and . Each channel carries one cyclic shift of one tone. The class is coded by which tone and which phase each colour channel carries.
We assume victims train with random crops and flips, so two tiles that differ only by a shift or a mirror are the same shortcut. We work with orbits under the group of the 16 cyclic shifts times the horizontal mirror. Distances between classes are orbit Hamming fractions,
Where clean inputs go: the natural response of a tile
At test time no tile is present. The victim's tile detectors then respond only to natural image content, and clean images go to whichever class owns the tile that natural content excites most. We measure that excitation through a receptive field. Let be the second moment of natural patches of the given training images, with each patch's mean removed per channel. Let be the window of tile at offset , also mean-free per channel. The natural response of a tile is then
def _natural_response(self, X, reps):
"""Std of the response of each tile's 3x3 windows (DC-free per channel) to natural 3x3 patches."""
rng, T = self.rng, self.T
n = X.shape[0]
x = X[np.sort(rng.choice(n, min(n, 2000), replace=False))].astype(np.float64)
b, c, h, w = x.shape
p = np.stack([x[:, :, i:h - 2 + i, j:w - 2 + j] for i in range(3) for j in range(3)], 2)
p = p - p.mean(2, keepdims=True)
p = p.transpose(0, 3, 4, 1, 2).reshape(-1, c * 9)
if len(p) > 300000:
p = p[rng.choice(len(p), 300000, replace=False)]
C3 = p.T @ p / len(p)
big = np.tile(reps, (1, 1, 2, 2))
W = []
for dy in range(T):
for dx in range(T):
wdw = big[:, :, dy:dy + 3, dx:dx + 3].reshape(len(reps), c, 9)
W.append((wdw - wdw.mean(2, keepdims=True)).reshape(len(reps), -1))
W = np.stack(W, 1).astype(np.float64)
return np.sqrt(np.einsum("moi,ij,moj->mo", W, C3, W).mean(1)) / (c * 9.0) + 1e-9If several classes own tiles that natural content excites, the victim separates those classes with real features and accuracy rises above chance. Our design therefore has exactly one attractor: the rarest class (ties broken at random). Every other class gets a tile from the null space of natural patch statistics. Clean inputs then collapse onto the attractor class, and accuracy falls to that class's share of the test set.
The attractor depends on the announced adversary
The adversary's radius comes from the regime: for standard, for
advtrain:<N>, and a planning value of when the pipeline is undisclosed.
Weaker than half the budget: no tile at all. When , the attractor class is released unperturbed. The margin argument goes as follows. An adversary can fake at most of a tile on a clean input, and a genuine tile survives with at least . Clean test inputs are, tile-wise, identical to the attractor class's training inputs, with a margin of . This holds whatever the architecture, the natural statistics or the class priors. The comparison is , a tolerance that keeps a regime at half the budget on the tile side even when is rounded.
disclosed = regime == "standard" or regime.startswith("advtrain")
rho = 0.5 * eps # undisclosed pipeline: plan for a robust learner
if regime == "standard":
rho = 0.0
elif regime.startswith("advtrain:"):
try:
rho = max(0.0, float(regime.split(":", 1)[1]) / 255.0)
except ValueError:
pass
# Against a learner whose adversary is weaker than half the budget (2 rho < eps, in particular
# no adversary) the attractor needs no tile at all: its class is released UNPERTURBED. Clean
# test inputs then are, tile-wise, exactly that class's training inputs, and they stay on its
# side by a margin eps - 2 rho (a fake tile has amplitude <= rho, a genuine one >= eps - rho),
# whatever the architecture, the natural statistics or the class priors. For 2 rho >= eps the
# margin is gone and the natural-like tile attractor (positive margin for every rho < eps) is used.
null_attr = disclosed and 2.0 * rho < eps - 0.25 / 255.0 # strictly weaker than half the budget
reps, nat, Hd, lum = self._pool(X, k)
counts = np.bincount(y, minlength=k).astype(np.float64)
order = np.argsort(np.where(counts > 0, counts, np.inf) + self.rng.random(k) * 1e-3) # attractor -> rarest class
tile_of_cls = np.zeros(k, dtype=np.int64)
tile_of_cls[order] = np.arange(k)At half the budget or above: a natural-like luminance tile. When , the unperturbed class has no margin left. The attractor is then a luminance tile, the same tone and phase in every channel. It must satisfy two requirements that pull against each other. Its class must stay robustly separable at the residual amplitude, . And clean inputs must collapse onto it decisively, so the other tiles must have a natural response of at most . Let be the natural response at the level of the roughly cleanest tiles that the code will need. We minimise the joint violation
with when the pipeline is disclosed and when it is not. Ties after rounding go to the more natural tile. The four best luminance tiles become the default attractor and three rivals. In the unperturbed case the four least natural luminance tiles take that role instead; they are nominal, and enter only through the selection of the other tiles (the cap on their natural response and the orbit distances).
radii = [rho] if disclosed else [0.0, 0.25 * eps, 0.5 * eps, 0.75 * eps]
need = np.sort(nat)[min(len(nat) - 1, int(1.25 * (k - 1)) + 1)] # level of the cleanest k-ish tiles
viol = np.mean([[max(nat[a] / (self.KAPPA * max(eps - r, 1e-6)), 1.0) * max(need / (self.TAU * nat[a]), 1.0)
for a in lum] for r in radii], 0)
rank = np.lexsort((-nat[lum], np.round(viol / viol.min(), 2))) # ties -> the more natural tile
attrs = [int(lum[j]) for j in rank[:4]]
if null_attr: # no tile has to attract: start from the cleanest pool of tiles
attrs = [int(a) for a in lum[::-1][:4]]
resid = max(eps - max(radii), 1e-6) # the smallest residual planned for
cands = [self._select(k, attrs[0], nat, Hd, resid)]The other classes: far apart and invisible to natural content
The other tiles come from a pool of tiles with , . Such tiles are quiet against the attractor and still readable after the adversary. If too few qualify, the pool falls back to the cleanest tiles. From the pool we pick greedily, farthest first in orbit Hamming distance, with ties going to the least natural tile. The greedy pass restarts 40 times when and 8 times otherwise. We keep the code with the largest minimum pairwise distance, less a small penalty for naturalness.
def _select(self, k, attr, nat, Hd, resid):
"""Attractor + (k - 1) natural-null tiles: greedy max-min orbit distance, least natural first.
The pool holds the tiles whose natural response is small against both the attractor's (clean
inputs must collapse on the attractor) and the residual amplitude (the learner must be able to
read them after its adversary); if too few qualify, the cleanest ones."""
rng = self.rng
order = np.argsort(nat)
lim = min(self.TAU * nat[attr], self.BETA * resid)
pool = [int(i) for i in order if nat[i] <= lim and i != attr]
if len(pool) < int(1.25 * (k - 1)) + 1:
pool = [int(i) for i in order if i != attr][: int(1.25 * (k - 1)) + 1]
P = np.asarray(pool)
best, best_val = [attr], -np.inf
for _ in range(40 if k <= 20 else 8):
sel = [attr]
dmin = Hd[P][:, sel].min(1)
while len(sel) < k:
dd = dmin.copy()
dd[np.isin(P, sel)] = -1.0
top = np.flatnonzero(dd >= dd.max() - 1e-9) # farthest candidates ...
nxt = int(P[top[np.argmin(nat[P[top]] + 1e-6 * rng.random(len(top)))]]) # ... least natural
sel.append(nxt)
dmin = np.minimum(dmin, Hd[P, nxt])
if k > 1:
val = Hd[np.ix_(sel, sel)].min() - 1e-3 * nat[sel[1:]].mean() / nat.max()
if val > best_val:
best, best_val = sel, val
return bestThe release itself takes a few lines. When the pipeline is undisclosed, every image carries a random element of its class tile's orbit instead of the tile itself. A convolutional learner reads the same tones either way. But no fixed pixel pattern is then tied to a class, so the release is not linearly separable, and a linear analysis of the data finds nothing.
def release(sel):
tiles = reps[sel].astype(np.float32) # tiles[0] is the attractor
if null_attr:
tiles[0] = 0.0
if not disclosed:
# undisclosed pipeline: every image carries a random element of its class tile's orbit
# (cyclic shift x mirror). A convolutional learner reads the same tones either way, but
# no fixed pixel pattern is tied to a class any more: the release is not linearly
# separable (a linear probe scores as on clean data), so a linear analysis of the data
# (class means, orthogonal projection of a linear model's weights) finds nothing.
G = self._group(tiles)
gi = np.random.default_rng(self.seed + 1).integers(0, G.shape[0], n)
tl = G[gi, tile_of_cls[y]].reshape(n, c, T, T)
return np.tile(tl, (1, 1, reps_h, reps_w))[:, :, :h, :w] * eps
full = np.tile(tiles, (1, 1, reps_h, reps_w))[:, :, :h, :w] * eps
return full[tile_of_cls][y]Closing the loop with simulated victims, by consensus only
The tile choice is model-free. The generation budget would otherwise go unused, so we spend part of it checking the choice. The attack runs only when a GPU is available, more than 600 seconds are left and . It then trains two short simulated victims on the default code and on up to three rival attractors. One victim is a plain conv-BN-ReLU stack and the other is the provided source network. Both train with crops and flips, plus three-step PGD at when , for 8 epochs (4 when ). Each is scored by its accuracy on the clean training images, averaged over the epochs of the run. Those inputs are never seen without a tile (except the attractor class's when it is unperturbed), just like test images. The epoch average measures both the final collapse and how fast the shortcut locks in. The simulation spends at most 40% of the budget. It stops early when the remaining allowance looks too small for the next candidate, or when half of the time left at its start is gone. Because the simulation is noisy, a rival replaces the default only if every simulated learner scores it below times the default minus . Any failure releases the model-free default.
# the simulation is noisy: a rival replaces the default only when EVERY simulated
# learner finds it clearly better
if len(scores) > 1:
S = np.asarray(scores)
better = np.all(S[1:] < 0.75 * S[:1] - 0.005, axis=1)
if better.any():
best = cands[1 + int(np.argmin(np.where(better, S[1:].mean(1), np.inf)))]There are no per-setting constants. The only branches are on the regime string the harness passes, on the number of classes, and on the GPU and time available.
Results
| Method | ① | |||||
|---|---|---|---|---|---|---|
| Accuracy, standard training ↓ | Accuracy, grayscale ↓ | Accuracy, JPEG-10 ↓ | Accuracy, adversarial 2/255 ↓ | Accuracy, adversarial 4/255 ↓ | Accuracy, adversarial 8/255 ↓ | |
| Claude Fable 5.2 | 0.100 | 0.106 | 0.855 | 0.100 | 0.113 | 0.249 |
| Error-minimizing noise | 0.235 | 0.914 | 0.836 | 0.608 | 0.864 | 0.840 |
| Error-minimizing, class-wise | 0.115 | 0.673 | 0.818 | 0.390 | 0.688 | 0.850 |
| Linearly separable noise | 0.203 | 0.720 | 0.791 | 0.735 | 0.894 | 0.838 |
| AR | 0.119 | 0.697 | 0.852 | 0.923 | 0.894 | 0.847 |
| REM | 0.301 | 0.762 | 0.830 | 0.364 | 0.484 | 0.861 |
| SEM | 0.141 | 0.304 | 0.831 | 0.205 | 0.330 | 0.859 |
| EntF-push | 0.906 | 0.903 | 0.758 | 0.811 | 0.780 | 0.753 |
| Fang et al. | 0.127 | 0.502 | 0.838 | 0.220 | 0.380 | 0.855 |
| MI-UE | 0.140 | 0.335 | 0.848 | 0.203 | 0.846 | 0.842 |
| PIL | 0.192 | 0.167 | 0.811 | 0.835 | 0.875 | 0.834 |
| Class-wise random noise | 0.132 | 0.144 | 0.857 | 0.923 | 0.892 | 0.844 |
| Unmodified data | 0.945 | 0.928 | 0.848 | 0.924 | 0.895 | 0.849 |
- ① CIFAR-10 · one release, six ResNet-18 learners (standard, grayscale, JPEG-10, adversarial training at 2, 4 and 8/255)
On five of the learners the tone code is ahead of every published baseline in the table. On Learner 1 and Learner 4 it reaches 0.100 and 0.100. The strongest baselines there are EM, class-wise [1] at 0.115 and MI-UE [7] at 0.203. On Learner 2 we reach 0.106 against 0.144 (Class-wise noise [1]). On Learner 5 we reach 0.113 against 0.330 (SEM [5]). The largest gap is on Learner 6: 0.249 against 0.753 for Entangled features. There, every published baseline but one stays within a few points of unmodified data (0.849). Learner 6 is also where our release is furthest from a complete collapse: clearly effective, but well above our values on the other learners where the code works.
On Learner 3 the tone code does nothing. Our 0.855 is above the 0.848 of unmodified data. The only baseline above ours is class-wise random noise at 0.857, and the best baseline, Entangled features, reaches 0.758. Our reading is that where the victim adopts the tile, clean inputs collapse onto one class, and where it does not, the release teaches the victim nothing false, and the victim trains as it would on clean data.
How we got here
The design came out of a sequence of experiments on our own proxy victims, not out of a plan. Several of the steps that shaped it were failures.
- The literature left the question open. Alongside our first experiments we surveyed the robust methods [4, 5, 6, 7, 8] and the synthetic class-wise patterns [1, 2, 3]. We found no published test of a high-frequency, full-amplitude class-wise sign pattern against adversarial training at a radius below the budget. The class-wise patterns that had been tested were all recovered from. The survey also pointed to a known result that adversarial training at the full budget is a provable defence. That bounds what any method can do here, and it is why our analysis is in terms of the residual .
- Period decides whether an adversarially trained victim adopts a tile. Our first experiment used random class-wise sign tiles of several periods. Under adversarial training below the budget, tiles of period 2 to 4 were learned. In our development runs, test accuracy fell to 19–29%, against about 84% on clean data. Tiles of period 5, 6, 8 and 32 were ignored, and so were class-wise random noise and the linearly separable and autoregressive baselines. All of them ended at about clean-data accuracy. The sharp transition between periods 4 and 5 led to the hypothesis that the first-layer filters must see the whole period. That is why every tile is a pure tone of the lattice.
- Where clean inputs went was the real lever. With random tiles, clean test predictions collapsed onto two or three classes, and the residual accuracy came from real features separating those classes. Inspecting tile by tile showed that clean images went to the classes whose tile was luminance-like, with the same tone and sign in every channel. Tiles with a sign flipped in one channel attracted almost nothing. A code with exactly one luminance tile and chroma tiles for every other class sent 99.6% and 98.9% of clean test images to the attractor class, on two of our proxy architectures. This is the observation the method is built on.
- Re-assigning tiles to classes failed. We fitted a class-to-tile assignment from a trained victim's confusion matrix, choosing the assignment that minimised how often each class's clean images landed on its own tile. Offline, this predicted 3–6% accuracy for a code with several attractor classes. Retraining fresh victims gave 11–14%. With several attractor classes the victim separates them with real features, whichever tiles they own. We dropped the idea and kept exactly one attractor.
- The coherent energy of a tone did not predict attractiveness; its window did. The diagonal luminance tile attracted most clean images even though its image-wide energy in natural images is lower than that of the stripes. The natural response of the tile's windows, the first layer's receptive field, reproduced the observed ranking. That became .
- Per-image random phase costs nothing against a convolutional victim. Against our proxy convolutional victims, giving each image a random orbit element of its tile made no measurable difference. A linear probe tells the two apart, though. On the fixed-phase release it reached 100% training accuracy. On the random-phase release it reached 45.2%, the same as on clean data. The final file uses random phase only when the pipeline is undisclosed.
- Against a strong adversary the attractor must be less natural. Against an adversary at three quarters of the budget, the most natural attractor combined with the cleanest other tiles reached 30.3% on one proxy architecture, and a less natural mixed-tone attractor reached 12.1%. A very clean attractor was bad as well (26.7%). The attractor has to sit between "decisively above the others" and "still separable at the residual". The constraint and the joint-violation rule came from these runs; came from the earlier single-attractor design.
- The simulation needed a consensus rule. An earlier override rule averaged the two simulated victims' final-epoch scores. On one development run it promoted a rival attractor, and a longer victim then reached more than four times the default's accuracy (7.42% against 1.66%). Repeated simulations of a single code also varied widely on the source network. We moved to the epoch-averaged score and to the rule that every simulated learner must agree. In our development runs the override never fired under the final rule, so in practice the simulation is a safety net and not a source of gains.
- The unperturbed attractor, and where to stop using it. Leaving the attractor class unperturbed was first tried as a simplification. At convergence it matched the tile attractor in the runs we compared. It did better on a vision-transformer proxy under standard training (13.5% against 18.7%), and the margin argument explains why it is safe for . We also tested it at exactly . Converged runs were equal, and it was better on a small-data run. But on one five-epoch run it reached 45.1% where the tile attractor reached 18.5%. With zero margin, lock-in becomes slow and erratic, so the final file uses the unperturbed attractor only strictly below half the budget.
- Other ideas that did not survive. These were a hybrid attractor class for the undisclosed regime (half unperturbed, half tile), a larger pool of ten tones, a code with one tile per tone-type signature, and an energy-minimising selection. None of them improved on the version kept. We also chose not to pursue adversarial-example poisons for standard training. We expected them to gain about a point at best, and they risked a large loss whenever their non-robust features did not transfer.
Limitations
- One learner is untouched. On Learner 3 the release has no effect at all. Our accuracy there is above that of unmodified data and above every published baseline but one. The method has a single mechanism: the victim must adopt a high-frequency, full-amplitude tile. When that fails, nothing else in the release hurts the victim. On Learner 3 the best baseline reaches only 0.758, so this learner is hard for every method in the table.
- Learner 6 is not collapsed. 0.249 is far below every baseline but well above our values on Learner 1 and Learner 4. The collapse it reaches elsewhere is not reached there.
- Everything lives at the highest spatial frequencies. Every tile has period at most 4. Any operation in the victim's pipeline that attenuates those frequencies attacks the code directly. In development, a victim that resampled its inputs at sub-pixel offsets while also training adversarially was back near clean accuracy (about 76%).
- The margin shrinks with the adversary, and vanishes at the budget. The residual is . Against an adversary at three quarters of the budget, our proxy victims ended between 10% and 24%, depending on architecture and number of classes. An adversary whose radius reaches cancels the tile entirely, which is a property of the construction.
- With many classes, lock-in is slow. In development, on a dataset with many classes, a ten-epoch adversarial schedule ended at 13.6%, where longer schedules ended below 3%. A victim stopped early may therefore keep real features.
- The undisclosed regime relies on a tile attractor. A short standard-training probe on an undisclosed-regime release sent no clean images to the intended attractor. They collapsed onto a class chosen by the victim's own biases. Accuracy stayed low on balanced data, but the collapse is no longer under our control there. Using the unperturbed attractor in this regime too is the open point we did not settle.
- The code is conspicuous. In disclosed regimes the release is a fixed periodic pattern per class, linearly separable by construction. It is exposed to the detection and defence analyses aimed at unlearnable examples [9]. Random phase removes linear separability only in the undisclosed regime.
- The constants are tuned, not derived. , , and the pool size of were set from a modest number of proxy runs, and the simulation that checks the attractor choice never overrode it in our development runs.
References
- Hanxun Huang, Xingjun Ma, Sarah Monazam Erfani et al. (2021). Unlearnable Examples: Making Personal Data Unexploitable. ICLR.
- Da Yu, Huishuai Zhang, Wei Chen et al. (2022). Availability Attacks Create Shortcuts. KDD.
- Pedro Sandoval-Segura, Vasu Singla, Jonas Geiping et al. (2022). Autoregressive Perturbations for Data Poisoning. NeurIPS.
- Shaopeng Fu, Fengxiang He, Yang Liu et al. (2022). Robust Unlearnable Examples: Protecting Data Against Adversarial Learning. ICLR.
- Yixin Liu, Kaidi Xu, Xun Chen et al. (2024). Stable Unlearnable Example: Enhancing the Robustness of Unlearnable Examples via Stable Error-Minimizing Noise. AAAI.
- Bin Fang, Bo Li, Shuang Wu et al. (2023). Re-thinking Data Availablity Attacks Against Deep Neural Networks.
- Yifan Zhu, Yibo Miao, Yinpeng Dong et al. (2026). Why Do Unlearnable Examples Work: A Novel Perspective of Mutual Information. ICLR.
- Jinlin Liu, Wei Chen, Xiaojin Zhang (2026). Perturbation-Induced Linearization: Constructing Unlearnable Data with Solely Linear Classifiers. ICLR.
- Yifan Zhu, Lijia Yu, Xiao-Shan Gao (2024). Detection and Defense of Unlearnable Examples. AAAI.