Introduction
An availability attack is a data release: we are given a whole labelled training set and an budget , and we return one perturbation per image so that a model trained from scratch on the released set generalises as badly as possible to clean test data. The metric is the top-1 accuracy of such victims on clean test images, and lower is better. The unmodified data gives 0.945 on Learner 1, 0.928 on Learner 2 and 0.895 on Learner 5, so each learner column starts from a trained, working classifier.
Three properties make this hard.
The victim is not ours. The attack is given a randomly initialised source network and nothing about the victim except a declared training regime. Whatever shortcut the perturbation creates has to be one that the victim finds too, whatever its architecture and training recipe, and, in some regimes, adversarial training inside a ball.
The perturbation is read through a quantiser. The evaluator projects onto the ball, clips to and rounds to 8-bit pixel levels. A perturbation that is a fraction of one level in places, or that lives in coefficients a coarse quantiser would erase, is weaker than it looks.
The shortcut that works for one learner fails for another. Error-minimising noise [1], its stable and robust variants [2, 3], linearly separable noise [4], autoregressive noise [5], randomness-constrained min-max-min noise [6], linearisation by linear classifiers [7] and the mutual-information view of unlearnable examples [8] each give very different accuracies on different columns of the table below. No published baseline is best on every column.
Our proposal is to treat the surrogate as the thing to get right before spending the generation budget, and to build the perturbation in two stages whose frequency content is deliberately split.
Method
We call the method He-HCI (the file's own docstring expands it as He-Initialized FP16 Contrastive Collapse and Class-Coherent Block-DCT Centered-Simplex Halftone Involution). It is a single file that changes only the generator class; the driver, the projection and the quantisation are those of the starter.
A surrogate that is conditioned before it is used
The harness hands us a fresh source network. We found two things about it that matter once a perturbation is optimised against its features: the pixels enter the first convolution without any mean and standard-deviation standardisation, and the hidden convolutions keep PyTorch's default initialisation, whose gain is well below that of a ReLU network, so activations and gradients start small before normalisation adapts. We wrap the network so that standardisation is part of the model, re-initialise every hidden convolution with a fan-out He initialisation, and hook the input of the last linear layer so that the wrapped model returns the penultimate features and the logits together.
def _wrap_surrogate(net, x_mean, x_std, he_fanout: bool = True):
nn = torch.nn
if he_fanout:
first_conv = None
for m in net.modules():
if isinstance(m, nn.Conv2d):
if first_conv is None:
first_conv = m
else:
nn.init.kaiming_normal_(m.weight, mode="fan_out", nonlinearity="relu")
elif isinstance(m, nn.BatchNorm2d):
if m.weight is not None:
nn.init.constant_(m.weight, 1.0)
if m.bias is not None:
nn.init.constant_(m.bias, 0.0)In our own development measurement, with the same optimiser and everything else fixed, this re-initialisation raised the fraction of pixels that saturate at after 35 epochs from 0.6042 to 0.7276, a proxy for a perturbation that uses its whole budget.
A class permutation taken from the surrogates' own confusions
Stage 1 trains snapshots of up to four different networks (the wrapped source network, a shallow convolutional net, a multi-scale patch-pooling net and a small patch-attention net; each after the first only if time remains before its deadline), each for a number of epochs set in the code and with a few checkpoints kept per trajectory. For each class and each other class we average the negative log-probability over the images of class and over the checkpoints, symmetrise, forbid the diagonal, and solve a linear assignment problem:
The target of a class is therefore the class the surrogates already find most confusable with it, with the constraint that every class is someone's target exactly once. A fixed point is repaired by swapping with a neighbour.
cost_np = (cost / (cnt_sub * max(1, len(checkpoints)))).cpu().numpy()
if k <= 1:
perm = np.zeros((k,), dtype=np.int64)
else:
sym = 0.5 * (cost_np + cost_np.T)
finite_vals = sym[np.isfinite(sym)]
finite_max = float(np.max(finite_vals)) if finite_vals.size > 0 else 10.0
sym = np.nan_to_num(sym, nan=finite_max, posinf=finite_max * 10.0, neginf=0.0)
np.fill_diagonal(sym, finite_max * 100.0 + 1e6)
_, col_ind = linear_sum_assignment(sym)
for c_idx in range(k):
if col_ind[c_idx] == c_idx:
sw = (c_idx + 1) % k
col_ind[c_idx], col_ind[sw] = col_ind[sw], col_ind[c_idx]
perm = col_ind.astype(np.int64)
return torch.as_tensor(perm, dtype=torch.long, device=dev), ck_statsA centered simplex objective
For each checkpoint we store the class centroids of the penultimate features, their mean , the unit vectors and a feature scale. The centring matters: penultimate ReLU features are non-negative, so a push-away term written against an uncentred centroid is geometrically infeasible. With target , feature and logits , the loss is
where and are cosines between the centred feature and , , is the squared-centroid scale and is a same-class contrastive term. The perturbation moves the feature of each image to the centroid of its target class and away from its own class, in the way a neural-collapse simplex would arrange the classes.
def _centered_simplex_involution_loss(fe, lg, st, yb, tb, pos_mask_f, coh_weight: float = 0.35):
F = torch.nn.functional
mu_raw, mu_global, cent_unit, fscale = st
fe_f = fe.float()
mse_t = (fe_f - mu_raw[tb]).pow(2).mean(dim=1).mean() / fscale
fe_c = F.normalize(fe_f - mu_global, dim=1)
cos_t = (fe_c * cent_unit[tb]).sum(dim=1)
cos_y = (fe_c * cent_unit[yb]).sum(dim=1)
cos_tb_yb = (cent_unit[tb] * cent_unit[yb]).sum(dim=1)
simplex = (1.0 - cos_t).mean() + 0.65 * F.relu(cos_y - cos_tb_yb).mean()
lg_f = lg.float()
ce_t = F.cross_entropy(lg_f, tb)
z_y = lg_f.gather(1, yb[:, None]).squeeze(1)
z_t = lg_f.gather(1, tb[:, None]).squeeze(1)
margin = F.relu(z_y - z_t + 4.0).mean()
loss = 1.15 * mse_t + 1.65 * simplex + 0.35 * ce_t + 0.20 * margin
if coh_weight > 0.0 and pos_mask_f is not None:
sim = torch.exp(torch.mm(fe_c, fe_c.t()) / 0.12) + 1e-8
nt = -torch.log((sim * pos_mask_f).sum(dim=1) / sim.sum(dim=1)).mean()
loss = loss + coh_weight * nt
return lossVariance-reduced sign descent through two views of the image
The gradient of this loss with respect to the image comes from two views. One is the image itself. The other is the image passed through a differentiable block-DCT quantiser (88 blocks, a fixed low quality factor, the luminance and chroma channels quantised separately). Its forward pass is true quantisation; its backward pass is a straight-through surrogate gated by , so that only coefficients with a small quantisation step pass gradient. In our own development measurement, the full-resolution gradient was roughly fifteen times larger than the one through the quantiser, so that and the second view would be silently ignored. We therefore normalise each gradient by its own mean absolute value, , and mix them (the mix is renormalised in the same way),
The perturbation is optimised against the whole ensemble of checkpoints by an SVRG-style scheme. At the outer point every checkpoint gives and the weighted mean is . A few inner steps sample a checkpoint , evaluate its gradient at the inner iterate and accumulate the corrected direction
after which the outer point takes one step along the sign of the same sum, and projects onto the ball and the valid pixel range. Step sizes are fractions of with a floor, decayed by a cosine toward of their initial value, and the loop stops at its own deadline.
g_ens = torch.zeros_like(x_t)
for k_idx, gk in enumerate(g_ks):
g_ens.add_(gk, alpha=norm_w[k_idx])
g_upd = torch.zeros_like(x_t)
x_hat = x_t.clone()
sampled_ks = torch.multinomial(probs, inner_m, replacement=True, generator=g).tolist()
for k_idx in sampled_ks:
(g_hat,) = self._eval_halftone_grads_at_point(
[checkpoints[k_idx]], [ck_stats[k_idx]], x_hat, yb, tb, pos_mask_f,
jstate, eps=eps, jp_weight=jp_weight, coh_weight=coh_weight, use_amp=use_amp
)
g_vr = g_hat - (g_ks[k_idx] - g_ens)
g_upd.add_(g_vr)
d_hat = (x_hat - step_in * g_upd.sign() - xb).clamp(-eps, eps)
x_hat = (xb + d_hat).clamp(0.0, 1.0)
d_new = (x_t - step_out * g_upd.sign() - xb).clamp(-eps, eps)
delta[idx] = (xb + d_new).clamp(0.0, 1.0) - xb
del g_ks, g_ens, g_upd, x_hatA class-coherent low-frequency carrier, then a contrastive collapse
Stage 1 gives a perturbation that is largely sample-specific. Stage 2 keeps from it only what is shared by a class and survives coarse quantisation. We low-pass its blocks to the six lowest 88 DCT modes (those with , kept whole; the four modes with are kept at weight ), average over each class, symmetrise against a horizontal flip, rescale the class template by its 95th percentile to , add of each image's own low-frequency residual, and clip. The result is a carrier that never exceeds .
dev = delta_svrg.device
n, c, h, w = delta_svrg.shape
with torch.no_grad():
low_all = self._project_low_dct(delta_svrg, jstate)
cls_sum = torch.zeros((k, c, h, w), dtype=torch.float32, device=dev)
cls_cnt = torch.bincount(yt, minlength=k).clamp_min(1).to(torch.float32)[:, None, None, None]
for i in range(0, n, 1024):
cls_sum.index_add_(0, yt[i:i + 1024], low_all[i:i + 1024])
u_low = cls_sum / cls_cnt
u_low = 0.5 * (u_low + u_low.flip(3))
q95 = torch.quantile(u_low.abs().flatten(1), 0.95, dim=1).clamp_min(1e-6)[:, None, None, None]
u_scaled = (0.36 * eps * (u_low / q95)).clamp(-0.46 * eps, 0.46 * eps)
res_low = (low_all - u_low[yt]).clamp(-0.26 * eps, 0.26 * eps)
c_low = self._project_low_dct(u_scaled[yt] + 0.40 * res_low, jstate)
return c_low.clamp(-0.52 * eps, 0.52 * eps)Stage 2 is a bi-level loop on a single re-initialised surrogate, in the spirit of the mutual-information construction [8]: each epoch trains the surrogate by SGD on with a cosine learning rate, then moves every image's for sign steps on
where is the penultimate feature, so that the features of each class collapse together. Two details are ours. The step size grows linearly from a small fraction of to , and the whole computation runs in float16 with the loss multiplied by 4096 rather than in bfloat16. And after the last step of each batch, is pulled toward the carrier in the low-frequency subspace,
with (0.55 when the regime is undisclosed), so that the six carrier modes are held, the four next modes are held at weight and the remaining fifty-four modes of every block are not constrained and are free to saturate the budget.
perm_p = torch.randperm(n, device=dev, generator=g)
for i in range(0, n, bs_p):
if time.time() > hard_deadline:
break
idx = perm_p[i:i + bs_p]
xb_fl = self._flip(Xt[idx], g)
yb = yt[idx]
mask_f = (yb[:, None] == yb[None, :]).to(torch.float32)
db = delta[idx].clone()
c_low_b = c_low[idx] if (c_low is not None and eta_lock > 0.0) else None
for p_it in range(p_iters):
db.requires_grad_(True)
with torch.amp.autocast(dev.type, dtype=torch.float16, enabled=use_amp):
f1, _ = m1(xb_fl + db)
f1r = torch.nan_to_num(f1.float(), nan=0.0, posinf=1e4, neginf=-1e4)
f1n = F.normalize(f1r, dim=1)
s1 = torch.exp(torch.mm(f1n, f1n.t()) / 0.1) + 1e-8
nt1 = -torch.log((s1 * mask_f).sum(1) / s1.sum(1)).mean()
sq1 = f1r.pow(2).sum(1, keepdim=True)
d1 = (sq1 + sq1.t() - 2.0 * torch.mm(f1r, f1r.t())).clamp_min(1e-8).sqrt()
l_mi = nt1 + 0.05 * torch.log1p((d1 * mask_f).sum(1) / f1r.shape[1]).mean()
(gp,) = torch.autograd.grad(l_mi * 4096.0, [db])
gp = torch.nan_to_num(gp, nan=0.0, posinf=0.0, neginf=0.0)
with torch.no_grad():
db = (db.detach() - alpha_p * gp.sign()).clamp(-eps, eps)
if c_low_b is not None and p_it == p_iters - 1:
db = (db + eta_lock * (c_low_b - self._project_low_dct(db, jstate))).clamp(-eps, eps)
db = torch.clamp(xb_fl + db, 0.0, 1.0) - xb_fl
delta[idx] = db.detach()The perturbation is finally rounded to the 8-bit grid. Stage 2's own surrogate is trained for up to 90 epochs
(96 when the regime is undisclosed), within a wall-clock deadline that the code derives from
budget.seconds_left(); the surrogate training, the Stage 1 loop and the collapse loop each check a
deadline, so the file does not rely on the evaluator's cap to stop them.
When the declared regime is adversarial training and the radius of that training is close to or above the attack budget (the ratio exceeds 0.90), the file takes a separate path: it trains the surrogates with a partial adversarial perturbation and optimises a variant of the centered-simplex loss, evaluated at two scales of the perturbation, inside the ball. For smaller radii it skips Stage 1 and starts the collapse loop from a low-frequency class-template seed. We describe these as written; the trace shows no victim evaluation of the final form of either path.
Results
| Method | ① | |||||
|---|---|---|---|---|---|---|
| Accuracy, standard training ↓ | Accuracy, grayscale ↓ | Accuracy, JPEG-10 ↓ | Accuracy, adversarial 2/255 ↓ | Accuracy, adversarial 4/255 ↓ | Accuracy, adversarial 8/255 ↓ | |
| Gemini 4 Carbon | 0.145 | 0.117 | 0.852 | 0.382 | 0.897 | 0.845 |
| 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)
Columns that are lower are better. Our result is uneven, and we describe it by column.
On Learner 2 the released data leaves a victim at 0.117, below the strongest published baseline there, Class-wise noise [1], at 0.144. That is a small margin over a baseline that was already low on this column.
On Learner 1 we reach 0.145 against 0.115 for the best baseline, EM, class-wise [1]: we are well below the unmodified data (0.945) but not the best. On Learner 4 we reach 0.382, against 0.203 for MI-UE [8], and 0.608 for sample-wise error-minimising noise. Our perturbation does more there than most baselines, and not as much as the best ones.
On Learners 3, 5 and 6 the method does not work. Accuracy stays at 0.852, 0.897 and 0.845, against 0.848, 0.895 and 0.849 on unmodified data. These columns are not saturated for the task as a whole: SEM [2] brings Learner 5 down to 0.330 and Entangled features brings Learner 6 to 0.753. We have only these means and no measure of their spread, so we cannot say whether the differences of a fraction of a point on these three columns are anything but noise; we can say that none of them is large enough to count as a gain.
How we got here
We began by reading every reference method in the image and a batch of recent papers on unlearnable examples, whose sources we downloaded, and by writing a local harness that applied the post-processing of the driver and trained victims of several architectures and training pipelines on a subset of a public image dataset. We ran the published baselines in that harness as a calibration. What follows is our account of the development, and the figures are our development measurements on that proxy harness.
- Version 1 misdirected features toward a class permutation with an ensemble of surrogates. It already contained the permutation and sign descent over several checkpoints.
- Variance reduction, and a gradient the second view could not move. Version 2 added the SVRG scheme with a plain combination of the full-resolution and quantiser gradients, which the former dominated; version 3 separated the two bands and normalised each, and the quantiser-compressed victims in the harness reached a markedly lower accuracy (about 32% in the harness against about 40% for version 1; the gain is that of version 3 as a whole over version 1, not of the normalisation alone).
- Augmentation-synchronised SVRG. Random crops inside the inner loop break the control variate, since the gradient of a checkpoint at two crops is not the same function. Version 4 drew the crop and flip once per outer step and shared them across the outer point and all inner steps, which keeps the variate exact and, with some hoisting of repeated work, made the loop about 2.4 times faster.
- An orthogonality idea that regressed. Version 5 added a universal class template learned under crops and a term that made the surrogate blind to the clean image, intended to keep the perturbation orthogonal to clean features. It took the class-explained share of the perturbation to 0.974, and the victims it was aimed at did not improve on the previous version; we removed it.
- Centring. Version 6's fix was the centered simplex (see Method); input standardisation, which version 5 had introduced together with the template changes above, was kept. Version 5 brought two proxy victims to roughly 10 to 12 percent accuracy in the harness, a gain we credited to the standardisation although version 5 changed several things at once.
- Stage 2 and the precision of the steps. Versions 6 and 7 ran the contrastive collapse as a second stage after Stage 1. We measured that a PGD step of a fifth of one pixel level is below one unit in the last place of bfloat16 for values in , and that 57.39% of the pixel updates in its test rounded to no change. Float16 with loss scaling resolved all of them and was about twice as fast as the mutual-information baseline's loop, on our own timing.
- One surrogate, not two. Version 7 trained two different networks inside the contrastive loss. Our four-way ablation put the class-explained share of the perturbation at 0.3327 with two networks and 0.5155 with one, and measured the two networks' gradient norms to be in the ratio 0.60 to 1. The final version uses one.
- Version 8 is what we submit. The final file combined the He initialisation, the single-surrogate collapse, and the six-mode carrier. We assembled it in the last half hour of the session and verified that it satisfied the static checks and produced a perturbation of the right shape and range on a small batch. It did not train a victim on its output, and its last victim measurements were of version 7, which was worse than Stage 1 alone on four of the six standard proxy victims and marginally better on the other two.
The method is therefore an engineering assembly with a diagnosed reason for each part rather than one idea, and the last two changes in particular are justified by proxy statistics of the perturbation (class-explained share, saturation), not by victim accuracy. The Stage 2 objective is the one of the mutual-information baseline [8]; what is ours is the conditioning of the surrogate, the precision, the carrier and the Stage 1 initialisation.
Limitations
- Three of the learner columns are unchanged. Learners 3, 5 and 6 are at the level of unmodified data. The method does not move them, and the baselines show that those columns can be moved.
- The submitted file was never run against a victim in development. Our last victim measurements were of an earlier version, and the changes between them (He initialisation, one surrogate, the six-mode carrier) were argued from proxy statistics. The results above are the evaluation of this exact file, and they are mixed.
- The development evidence is our own and proxy-based. Its harness, victims and subset were chosen by us.
- Many hand-set constants. The weights of the loss, the carrier scalings, the step schedules, the lock strengths and the time fractions are set by hand.
- A large amount of machinery for a mixed result. Four surrogate architectures, two stages, two gradient views and a separate regime path make a method that is expensive to generate and hard to attribute. Our accuracy on Learner 1 is higher (worse) than that of six published baselines, among them the far simpler class-wise random noise.
- Generation time was not checked against the cap. The code spends a fixed fraction of the remaining time on each stage and stops at deadlines; the task requires it to be no slower than the slowest reference method.
- It depends on the declared regime. Branches on the regime string, and a hard threshold on the ratio of adversarial-training radius to budget, decide which algorithm runs. If the declared regime does not describe the victim, the file has no fallback.
References
- Hanxun Huang, Xingjun Ma, Sarah Monazam Erfani et al. (2021). Unlearnable Examples: Making Personal Data Unexploitable. 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.
- Shaopeng Fu, Fengxiang He, Yang Liu et al. (2022). Robust Unlearnable Examples: Protecting Data Against Adversarial Learning. 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.
- Bin Fang, Bo Li, Shuang Wu et al. (2023). Re-thinking Data Availablity Attacks Against Deep Neural Networks.
- Jinlin Liu, Wei Chen, Xiaojin Zhang (2026). Perturbation-Induced Linearization: Constructing Unlearnable Data with Solely Linear Classifiers. ICLR.
- Yifan Zhu, Yibo Miao, Yinpeng Dong et al. (2026). Why Do Unlearnable Examples Work: A Novel Perspective of Mutual Information. ICLR.