potentialpaper

Test-Time Defense Against Adversarial Attacks via Stochastic Resonance of Latent Ensembles

Dong Lao, Yuxiang Zhang, Haniyeh Ehsani Oskouie, Yangchao Wu, Alex Wong, Stefano Soatto

NeurIPS 2026

Edit this page

Or clone it with git

Run in a terminal:

Needs Git LFS. To push, use an API key from your profile as the password.

Or let your agent set it up

It checks and sets up everything: signing in, git, the clone, credentials and an SSH key.

Abstract. We propose a test-time defense mechanism against adversarial attacks: Unlike existing methods that rely on feature filtering or smoothing, which can lead to information loss, we propose to ``combat noise with noise'' by leveraging stochastic resonance to enhance robustness while minimizing information loss. Our approach introduces small translational perturbations to the input image, aligns the transformed feature embeddings, and aggregates them before mapping back to the original reference image. This can be expressed in a closed-form formula, which can be deployed on diverse existing network architectures without introducing additional network modules or fine-tuning for specific attack types. The resulting method is entirely training-free, architecture-agnostic, and attack-agnostic. Empirically, the method achieves state-of-the-art robustness on image classification and provides the first generic test-time defense for dense prediction tasks, including stereo matching, optical flow, and monocular depth estimation. Across adversarial attacks, it recovers up to 68.1% of the accuracy loss on image classification, 71.9% on stereo matching (MAE), 29.2% on optical flow (EPE), 68.3% on depth estimation (SqRel), and 83.8% on vision-language alignment (cosine similarity).

Are you an author? Claim this paper to see who's reading it, with views and other statistics, and to write about it here.

Claim this paper
How does this paper connect to your work? Write how you built on it, compared with it or reproduced it, or add a summary, a critique or errata.
Or make it interactive:
Start writing

edit · history

FromAToBDateVersionSubmitted toPDFEvidence
11 Sep 2025ICLR 2026submittedICLR 2026Rejected—[1]
29 Apr 2026NeurIPS 2026submittedNeurIPS 2026Accept (poster)reviews ↓[1]PDF[1]
Their titles, abstracts and, where both have a PDF, the text.Missing a version?

NeurIPS 2026

Accept (poster) · 3 reviews · OpenReview

Updated 25 Nov 2026, 03:45 UTC.

Program Chairs · DecisionOpenReview ↗
Decision
Accept (poster)
Read decision
Meta-review

This paper proposes a test-time defense against adversarial attacks. The method applies small integer-pixel translations to the input image, encodes each translated version through an encoder, aligns the resulting embeddings via inverse transformations, and aggregates them to robustify against adversarial attacks.

The main concerns are as follows: 1. the mathematical rigor of this paper is poor, as listed in the Reviewer Zu7P. 2. The experiments cannot verify the strong claims: such as being state-of-the-art, attack-agnostic, architecture-agnostic.

Three reviewers give the "reject" or "borderline reject", the meta reviewer agree with that and recommend "reject".

Final justification

There are two main concerns in the first-round review process: one is about the mathematical rigor, which has been clarified by the authors, and Reviewer agrees with that arrowing the claims and clearly presenting the theoretical analysis can address this point. Another is about the experiments, where reviewers also recognize the new results added by the authors.

After reading the rebuttal, Meta Reviewer thinks most of the concerns have been addresseed, and two reviewers also raise their scores to "borderline accept". If the authors can revise their paper according to the comments, Meta reviewer recommend "accept as poster".

Area Chair rrRP · Meta-reviewOpenReview ↗
Read meta-review
Meta-review

This paper proposes a test-time defense against adversarial attacks. The method applies small integer-pixel translations to the input image, encodes each translated version through an encoder, aligns the resulting embeddings via inverse transformations, and aggregates them to robustify against adversarial attacks.

The main concerns are as follows: 1. the mathematical rigor of this paper is poor, as listed in the Reviewer Zu7P. 2. The experiments cannot verify the strong claims: such as being state-of-the-art, attack-agnostic, architecture-agnostic.

Three reviewers give the "reject" or "borderline reject", the meta reviewer agree with that and recommend "reject".

Final justification

There are two main concerns in the first-round review process: one is about the mathematical rigor, which has been clarified by the authors, and Reviewer agrees with that arrowing the claims and clearly presenting the theoretical analysis can address this point. Another is about the experiments, where reviewers also recognize the new results added by the authors.

After reading the rebuttal, Meta Reviewer thinks most of the concerns have been addresseed, and two reviewers also raise their scores to "borderline accept". If the authors can revise their paper according to the comments, Meta reviewer recommend "accept as poster".

Reviewer vVwYOpenReview ↗
Rating
4/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
2/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes a training-free test-time defense against adversarial attacks based on stochastic resonance: small image translations are applied, transformed latent embeddings are inverse-aligned, and the resulting features are averaged before prediction. The intended advantage is to avoid direct input or feature filtering, thereby reducing information loss while retaining compatibility with existing architectures. The paper evaluates the method across classification, stereo matching, optical flow, monocular depth estimation, and vision-language alignment, reporting recovered performance under several attacks.

Strengths and weaknesses

Strengths:

  1. The latent stochastic-resonance framing is interesting. The idea of using controlled translations to decorrelate adversarial effects in latent space is more conceptually appealing than another feature-pruning or smoothing heuristic.

  2. This paper attempts to go beyond the standard CIFAR or ImageNet classification setting and evaluates dense prediction tasks such as stereo matching, optical flow, and monocular depth estimation. This is valuable because test-time adversarial defense for dense prediction is underexplored compared with classification.

  3. The method is simple to implement. The fact that it can be added on top of adversarially trained models without retraining is practically appealing.

Weaknesses:

  1. The paper makes several strong claims: such as being state-of-the-art, attack-agnostic, architecture-agnostic, and the first generic test-time defense for dense prediction. But these claims are not yet sufficiently justified. The comparison to prior work is somewhat selective, and the paper tends to characterize existing defenses as simple filtering or smoothing methods, which oversimplifies a diverse literature including adversarial training, purification, randomized smoothing, and test-time adaptation. For example, as to CLIP, there are already test-time purification works such as [1,2], this paper should compare the results with these works.

  2. The methodology is conceptually interesting but lacks mathematical rigor. The notation mixes continuous images, discrete lattices, feature maps, global embeddings, and group actions without sufficiently precise definitions. The push-forward and inverse-alignment operations are plausible for spatial feature maps, but it is unclear how they should be rigorously interpreted for classification embeddings, pooled CLIP features, or MLP-style architectures. The theoretical argument that stochastic resonance reduces the effective perturbation by a factor of (1/N1/\sqrt{N}) relies on a decorrelation assumption across transformed perturbation terms, but this assumption is not guaranteed and may be explicitly violated by an adaptive attacker.

  3. The empirical evaluation is broad but not yet rigorous enough for a strong adversarial defense claim. The classification experiments need stronger adaptive evaluations, such as EOT/APGD through the entire defense pipeline, multiple restarts, and comparisons with recent robust baselines and purification methods. For dense prediction, the experiments are promising but insufficiently controlled: stereo, optical flow, and depth estimation are evaluated under limited attack settings, and the baselines are relatively weak or not clearly state-of-the-art.

  4. For several dense prediction tasks, the authors evaluate the proposed defense mainly using standard PGD or FGSM attacks. However, adversarial attacks on dense prediction models differ substantially from those on image classification models, due to the structured and spatially correlated nature of the outputs. It remains unclear whether the proposed method is effective against stronger task-specific adversaries designed for dense prediction, such as [3]. The authors should provide additional evaluations under these stronger attacks to substantiate the claimed generality of the defense.

[1] Clip is strong enough to fight back: Test-time counterattacks towards zero-shot adversarial robustness of clip. CVPR'25

[2] Tapt: Test-time adversarial prompt tuning for robust inference in vision-language models. CVPR'25

[3] CosPGD: an efficient white-box adversarial attack for pixel-wise prediction tasks. ICML'24

Questions
  1. Can the authors provide a full adaptive evaluation using EOT/APGD through the entire stochastic-resonance pipeline, with multiple restarts, for classification and all dense prediction tasks?

  2. How sensitive is the method to padding mode, boundary cropping, feature-map resolution, and high-frequency image content such as thin structures, small objects, text, or fine depth discontinuities?

  3. How would the proposed defense perform on semantic segmentation, where several adversarial attacks have been specifically tailored to exploit pixel-level predictions and spatial structures [4,5,6]?

[4] Segpgd: An effective and efficient adversarial attack for evaluating and boosting segmentation robustness. ECCV'22

[5] Rp-pgd: Boosting segmentation robustness with a region-and-prototype based adversarial attack. AAAI'25

[6] Segtrans: Transferable adversarial examples for segmentation models. TMM'26

Limitations

Yes

Final justification

The authors provided clarifications and additional experiments during the rebuttal, including a more careful comparison with CSR. After reviewing these responses, I acknowledge that my initial concern regarding the claimed state-of-the-art performance across all evaluated tasks was based on a misunderstanding of the claim’s scope. Considering the quality of the rebuttal and the clarifications provided, I have raised my score to 4 (Borderline Accept).

My remaining concern is the strength of the robustness evaluation. In particular, PGD and FGSM alone may not constitute sufficiently strong adversaries for evaluating a defense method, especially in dense prediction tasks. This limitation prevents me from assigning a clear Accept rating.

Formatting concerns

None

7 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for recognizing the paper's value, specifically, the value of extending test-time defense to dense prediction. The reviewer raises several important issues. We address them below and provide the additional experiments requested.

W1. Scope of the claims and related work

We will clarify our claims. “Architecture-agnostic” means that SR requires no architecture-specific training or additional learned module, and can be applied as long as a model contains an image-encoding stage (which applies to all vision architectures). “Attack-agnostic” means that the defense does not require prior knowledge of an attack.

Our state-of-the-art claim is not based on a selective comparison. Table 1 compares SR with existing SOTA methods under matched protocols and across multiple settings, including fully adaptive attacks. To our knowledge, we are also the first generic test-time defense evaluated across multiple dense-prediction tasks, including stereo matching, optical flow, monocular depth estimation, and semantic segmentation as requested by the reviewer.

The reviewer additionally identifies methods developed specifically for CLIP. As requested, although the scope differs from our generic encoder-side defense, we directly evaluated TTC using its public CLIP+ImageNet protocol:

Method Clean Top-1 Clean Top-5 Adv. Top-1 Adv. Top-5
No defense 59.74 84.57 1.17 15.94
TTC 49.34 74.94 38.49 63.12
TTC+SR (d=1d=1) 52.53 78.29 43.28 69.55
TTC+SR (d=2d=2) 53.92 79.78 46.05 72.89
TTC+SR (d=3d=3) 54.92 80.81 48.10 75.09

SR remains effective even when added to a specialized CLIP defense. We will cite and discuss. We also agree that existing methods have distinct families with different assumptions. We will revise the discussion accordingly.

W2. Mathematical presentation and different architectures

SR is applied before spatial information is discarded. For classification, unless specified, aggregation is performed on spatial features/tokens before the final prediction head. For ViT, we reshape the spatial tokens into a two-dimensional grid, lift the feature map to the input-pixel lattice, apply the inverse pixel translation, aggregate the aligned features, and pool back to token resolution. This procedure is illustrated in Figure 1. We apologize that the corresponding explanation was unintentionally omitted from the text during editing. We will add this explanation.

For the theoretic section, the transformed perturbations gin(x)g_i n(x) are not assumed to be independent. The relevant quantities are their downstream inverse-aligned feature responses, vi(x)=gi,∗−1Jgix[gin(x)]v_i(x)=g_{i,*}^{-1}J_{g_i x}[g_i n(x)].

An adaptive attacker may attempt to align these responses. This is precisely why the analysis in Table 6 uses adaptive PGD-100, where the attacker optimizes through every SR branch. The measured pairwise correlations show that full adaptation does not collapse the aligned perturbation responses into a single common direction.

Please refer to the response to Reviewer Zu7P for mathematical notations we will revise. We will revise the informal “decorrelation” wording with an explicit formalization. We clarify that the first-order expansion is explanatory, not for certified robustness, and none of the empirical results depend on the linear approximation. We will revise the paper to make this distinction explicit.

W3/Q1. Adaptive evaluation, EOT, APGD, and restarts

There may be a misunderstanding regarding EOT. Our main implementation evaluates the complete deterministic translation grid rather than sampling random transformations. There is therefore no hidden inference randomness over which EOT must estimate an expectation.

The “Worst-Case” setting in Table 1 is fully adaptive. The attacker has access to the model weights, every SR transformation and branch, inverse alignment, latent aggregation, and the final prediction head, and differentiates through the complete defense. Under adaptive PGD-100, SR achieves 52.39% robust accuracy, compared with 46.37% for the base adversarially trained model. Table 1 also reports AutoAttack, which includes APGD-based attacks and its standard restart configuration. Under the same AT setting, SR achieves 49.78%, compared with 46.41% for FSR. Applying SR to TRADES and MART models further achieves 54.02% and 50.72%, respectively.

For dense prediction, a classification APGD loss cannot be transferred unchanged because the tasks have different structured outputs and task objectives. The appropriate evaluation is therefore to use attacks optimized for the corresponding task, as discussed below.

The statement that the dense-prediction baselines are “not clearly state-of-the-art” is difficult to address without a specific baseline. To our knowledge, SR is the first generic test-time defense evaluated across these tasks under the same protocols. If the reviewer has a specific existing test-time baseline in mind, we would appreciate the reference and will evaluate it as time permits.

W4/Q3. Task-specific attacks and semantic segmentation

There may be a misunderstanding. We do not simply apply a generic classification attack to stereo predictions. For example, we follow the task-specific benchmark introduced by Stereopagnosia, which was designed specifically to attack stereo-matching.

We thank the reviewer for suggesting semantic segmentation. As requested, we additionally evaluated SR on Cityscapes set using CosPGD and SegPGD, with attacks applied directly through the defended pipeline, including an adaptive attack.

mIoU:

Attack ϵ\epsilon Baseline SR (d=1d=1) SR (d=2d=2) SR (d=3d=3)
CosPGD 2/2552/255 18.40 25.53 31.14 32.75
CosPGD 4/2554/255 17.16 22.42 26.29 27.38
CosPGD 8/2558/255 15.39 19.15 21.71 22.41
SegPGD 2/2552/255 1.02 5.64 18.24 23.46
SegPGD 4/2554/255 0.47 1.50 6.43 9.06
SegPGD 8/2558/255 0.40 0.67 1.70 2.30

Boundary mIoU:

Attack ϵ\epsilon Baseline SR (d=1d=1) SR (d=2d=2) SR (d=3d=3)
CosPGD 2/2552/255 15.14 21.57 26.71 28.21
CosPGD 4/2554/255 13.74 18.61 22.26 23.28
CosPGD 8/2558/255 12.18 15.57 17.96 18.62
SegPGD 2/2552/255 1.08 6.06 17.84 22.11
SegPGD 4/2554/255 0.49 1.66 6.79 9.32
SegPGD 8/2558/255 0.41 0.72 1.81 2.41

These results show that SR remains effective against attacks specifically designed for structured pixel-wise prediction while preserving clean segmentation and boundary quality. Together with the existing stereo-matching, optical-flow, and monocular-depth experiments, these results provide evidence across four distinct dense-prediction tasks and multiple task-specific objectives. Again, if the reviewer has a specific additional model or test-time baseline in mind, we would appreciate the reference.

Q2. Padding, feature resolution, and fine spatial content

Our original implementation uses zero filling. As requested, we evaluated five boundary treatments under PGD-100 using the same AT setting as Table 1:

Boundary treatment PGD-100
Reflection 54.29
Replication 54.56
Circular extension 54.55
Valid masking 54.40
Valid cropping 55.24

Robust accuracy remains within 54.29 to 55.24, showing that the gain is insensitive to the padding convention.

Feature-map resolution is controlled by the aggregation layer. Table 11 evaluates SR after the initial convolution and residual blocks 1 to 3 of ResNet-50, each of which operates at a different feature resolution. Under PGD with ϵ=8/255\epsilon=8/255, Top-1 accuracy improves from 8.51 without defense to 16.91, 22.44, 24.88, and 21.76, respectively. Thus, every evaluated resolution improves over the undefended model, with the strongest result at residual block 2.

SR also does not spatially filter the input. Table 10 shows that clean ImageNet and CIFAR-10 accuracy is preserved or slightly improved. The new Cityscapes results provide a direct evaluation of fine spatial structure: clean boundary mIoU is nearly unchanged, while boundary robustness improves consistently under both CosPGD and SegPGD.

Remarks

We hope these additional results and clarifications address the reviewer’s concerns. We emphasize that the issues identified above are primarily presentation and positioning issues that can be addressed directly in the revision, rather than limitations of the method or evaluation. We would appreciate further discussion and we will revise the paper accordingly and hope the reviewer will reconsider the assessment in light of these clarifications and additional results.

Reviewer vVwY · CommentOpenReview ↗

Thank you for the detailed rebuttal and the additional experiments. I acknowledge that the new results address several of my empirical questions and provide further evidence that the proposed method can improve robustness in the evaluated settings.

However, my main concern remains unresolved. The claimed 1/N1/\sqrt{N} suppression still relies on an unverified decorrelation assumption, which the rebuttal acknowledges as heuristic and does not validate systematically across architectures, layers, attacks, and tasks. Moreover, the rebuttal adds useful evaluations, including adaptive attacks, semantic segmentation, and comparisons with TTC. Nevertheless, the additional results still provide insufficient comparative evidence to substantiate the broad claim of state-of-the-art performance across all evaluated tasks.

Since these concerns affect the central scientific claims rather than only the presentation, I will maintain my borderline reject assessment.

Authors · CommentOpenReview ↗

Request for Specific State-of-the-Art Baselines

Thank you for acknowledging that the additional experiments address several of the empirical questions. We would appreciate further clarification regarding the remaining concern about the state-of-the-art claim. We also believe that we addressed all experimental requests raised in the initial review, including adaptive evaluation, task-specific attacks on semantic segmentation, boundary handling, and comparison with the reviewer-suggested CLIP baseline.

We respectfully ask the reviewer to specify the exact baseline or baselines they believe are missing, together with the corresponding task, dataset, threat model, and evaluation metric. With a concrete reference, we can either provide a direct comparison or explain any protocol differences. As currently stated, the concern is not sufficiently specific for us to address experimentally or through a technical comparison.

We would appreciate this clarification as soon as possible and further discussion before the final assessment. We remain prepared to run or comment on the requested comparison as long as the relevant method and protocol are identified.

Reviewer A3gkOpenReview ↗
Rating
3/6
Confidence
4/5
Quality
3/4
Clarity
3/4
Significance
3/4
Originality
3/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes a training-free test-time defense against adversarial attacks based on stochastic resonance. The method applies a set of small image translations, extracts latent features from each transformed input, aligns them back to a common reference frame, and aggregates the resulting representations in latent space. The authors argue that this process preserves semantic information while reducing the impact of adversarially amplified feature responses. The approach is architecture-agnostic and attack-agnostic, requiring neither additional training nor modifications to the underlying model.

Strengths and weaknesses

###Strengths

  • The proposed defense is simple, training-free, and can be integrated into existing models without retraining.
  • The idea of aggregating aligned transformed embeddings in latent space is conceptually novel and well motivated.
  • The empirical evaluation is extensive, covering classification, dense prediction, and vision-language tasks.
  • The method consistently improves robustness across multiple attack types, including adaptive attacks.
  • The mathematical justification demonstrates that spatial grid alignment averages out adversarial outliers and scales down the effective Lipschitz constant by 1/N1/\sqrt{N}.

Weaknesses

  • It remains unclear how much of the gain comes from latent-space aggregation itself versus standard transformation-based ensembling.
  • Escalating the resonance level to d=3d=3 demands exactly 49 forward evaluations per instance, creating computational bottlenecks for real-time deployment or resource-constrained edge hardware.
  • The framework relies heavily on high-frequency feature perturbations, inheriting a fragility against common low-pass purification operations like image downscaling or compression.
Questions
  1. How much of the observed improvement comes from latent-space aggregation itself, compared to performing the same aligned ensemble at the output level or other intermediate layers?

  2. The paper primarily validates the method using integer-pixel translations, while alternative transformations such as rotations appear less effective due to interpolation artifacts. How sensitive is the method to the choice of transformation class, and to what extent do the benefits generalize beyond translations?

  3. Can the authors characterize the robustness-efficiency tradeoff across different resonance levels, particularly for resource-constrained and real-time deployment scenarios?

Limitations

Please see the weaknesses.

Formatting concerns

None

2 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for recognizing the simplicity, novelty, broad applicability, and strong empirical performance of our method. We address the concerns below.

W1/Q1. Latent-space versus output-space aggregation

We do evaluates this question across both classification and dense prediction.

First, Table 1 compares our method with TTE [46], which ensembles predictions from test-time transformations at the output level. We improves accuracy over TTE across all reported attacks. Second, Figure 4 provides a controlled comparison on optical flow. We apply exactly the same transformations and inverse alignment, changing only whether aggregation is performed on the latent features or the final flow predictions. Latent aggregation consistently achieves lower EPE under both PGD and FGSM at every resonance level. Stereo matching provides further evidence on a different dense-prediction architecture. Table 3 compares SR with latent smoothing [1] and randomized smoothing [16] (which ensembles in the output space) on PSMNet across FGSM and PGD attacks.

Finally, Table 11 studies aggregation at different intermediate layers of ResNet-50. Under PGD with ϵ=8/255\epsilon=8/255, Top-1 accuracy increases from 8.51 without defense to 16.91, 22.44, 24.88, and 21.76 when SR terminates after the initial convolution and residual blocks 1-3, respectively. The best result occurs at residual block 2, confirming that where to aggregate is an important design choice.

W2/Q2. Choice of transformation group

Both translations and rotations improve robustness, but our particular design choice of integer translations works better. As shown in Table 12, rotations outperform the undefended model across all evaluated attack strengths and resonance levels, demonstrating that the mechanism is not restricted to translations. However, translations perform better at larger resonance levels and avoid the interpolation required by rotations.

Table 13 further shows that inverse-aligned translated features have consistently higher correlation and cosine similarity than rotated features. Thus, rotations are a valid but less effective instantiation of the same principle, while translations provide better feature alignment and lower computational cost. Please refer to Appendix E.2 and Tables 12-13 for the detailed results.

We do not claim that all transformation groups are equally effective. A suitable transformation should preserve task-relevant content while allowing reliable inverse alignment. Extending the method to more general transformation groups, potentially including learned transformations optimized for alignment and robustness, is our next step.

W3/Q3. Robustness-efficiency trade-off

We do have this discussion in the paper. Please refer to Section 5, Appendix B, and Table 8 for the detailed speed-robustness trade-off; Appendix C and Table 9 for memory usage; and Appendix E.1 for shallow-layer execution.

At d=3d=3, the method uses 49 transformation branches, but these branches can be processed in parallel. Moreover, when aggregation is applied at a shallow layer, only the network front end is repeated; the remaining layers are evaluated once after aggregation.

SR level Branches Wall-clock time Top-1 at ϵ=8/255\epsilon=8/255
d=0d=0 1 0.095 s 8.51
d=1d=1 9 0.114 s 18.40
d=2d=2 25 0.133 s 20.01
d=3d=3 49 0.158 s 21.17

Thus, d=1d=1 already provides a substantial improvement from 8.51 to 18.40 with 0.019 s additional latency, while higher resonance levels provide further gains at increased cost. The resonance level is therefore an adjustable test-time compute budget rather than a fixed requirement.

We agree that deployment under strict latency, memory, or power constraints remains a limitation, as already discussed in Section 5.

W4. Low-pass purification

There may be a misunderstanding regarding this concern. SR is not a low-pass purification method and does not explicitly remove high-frequency image content. As discussed in the Introduction, low-pass filtering is a separate, lossy defense that may discard task-relevant information and can be bypassed by adaptive attacks. SR instead aligns and aggregates latent representations without spatially smoothing the input.

We want to further emphasis that, in contrast to denoising-based methods, Appendix D and Table 10 show that SR preserves or slightly improves clean accuracy, suggesting that useful fine-grained information is retained. The method also improves performance on CIFAR-10-C corruptions, including blur, weather, noise, and photometric changes. Please refer to Sections 4.1 and 4.2 and Appendix D for these results.

We hope these clarifications address the reviewer’s concerns. We will revise the presentation to make above points more prominent.

Authors · CommentOpenReview ↗

We thank the reviewer for their time and effort. Since the discussion period is ending soon, we would appreciate it if the reviewer could let us know whether any concerns remain.

Reviewer Zu7POpenReview ↗
Rating
4/6
Confidence
3/5
Quality
2/4
Clarity
2/4
Significance
3/4
Originality
2/4
Contribution type
general
Ethical concerns
NO or VERY MINOR ethics concerns only
Read review
Summary

This paper proposes a test-time defense against adversarial attacks. The method applies small integer-pixel translations to the input image, encodes each translated version through an encoder, aligns the resulting embeddings via inverse transformations, and aggregates them to robustify against adversarial attacks.

Strengths and weaknesses

The core idea of leveraging input transformations for test-time adversarial defense is intuitive and potentially impactful. The experimental evaluation is broad in terms of tasks, and the results show improvements in adversarial robustness, which suggests that the method is not tied to a specific model or configuration. However, the mathematical formalization has inconsistencies and unjustified assumptions that undermine the mathematical rigor.

Major Concerns

  1. The formalization of images and transformations in Section 3 contains fundamental errors.
    1.1 An image is initially defined as a map from a continuous domain x:R2→Rkx : \mathbb{R}^2 \to \mathbb{R}^k but is then implicitly treated as a map from a discrete lattice $ \Lambda \subset \mathbb{R}^2 $. By defining images on R2\mathbb{R}^2, the authors implicitly suggest that continuous group actions are available. In reality, the discrete lattice restricts the possible group actions. For instance, in R2\mathbb{R}^2 the set of rotations constitute a group, while the rotation group on Z2\mathbb{Z}^2 are the 90° ones: any other rotation requires interpolation, which is non-invertible and introduces systematic artifacts, precisely as stated on line 694 ff. The continuous-domain definition is unnecessary and misleading given that the method operates mostly with integer-pixel translations on a discrete grid.

    1.2 Transformations are defined as maps on the spatial domain to itself g:R2→R2g : \mathbb{R}^2 \to \mathbb{R}^2, but are then applied directly to images as g(x)g(x), where x∈Rkx \in \mathbb{R}^k is a value in color space. This composition is ill-defined: the correct notation for the action of a spatial transformation on an image would be (Tg⋅x)(i,j)=x(g−1(i,j))(T_g \cdot x)(i, j) = x(g^{-1}(i, j)) for (i,j)∈R2(i, j) \in \mathbb{R}^2 [5].

  2. Images live on a finite discrete grid Λ\Lambda of size h×wh \times w (line 730), but the method implicitly assumes translations on R2\mathbb{R}^2, while only briefly mentioning "padding and sampling" (line 125). This is not merely an implementation detail: boundary effects break the group structure. Translations on a finite grid do not form a group under standard zero-padding (since Ta∘T−a≠IdT_a \circ T_{-a} \neq \text{Id} when boundary pixels are lost). Moreover, boundary effects may systematically bias the averaging in Eq. (1), particularly for pixels near image edges. For a translation radius dd, all pixels within dd of the boundary will have corrupted contributions from at least some translations in the ensemble.

  3. The definition of the adversarial perturbation (lines 132–133) x~=x+n(x)\tilde{x} = x + n(x) where n(x)=arg⁡max⁡ d(ϕ(x),ϕ(x~))n(x) = \arg\max\, d(\phi(x), \phi(\tilde{x})) is circular, as x~\tilde{x} appears on both sides of the definition. The standard formulation would be n∗(x)=arg⁡max⁡∥n∥≤ϵ d(ϕ(x),ϕ(x+n))n^\ast(x) = \arg\max_{\|n\| \leq \epsilon}\, d(\phi(x), \phi(x + n)) and then x~=x+n∗(x)\tilde{x} = x + n^*(x).

  4. The method is introduced using the full machinery of generic group transformations. However, lines 163–164 explicitly state: “While that can be optimized for performance, we optimize for simplicity, restricting our attention to translation by integer pixels.” If this is the case, then the general group-theoretic framing is ornamental rather than functional. The authors should either (a) demonstrate that the group-theoretic generality is substantive by showing other proper groups (e.g., the group p4p4 or p4mp4m [5]), or (b) simplify the presentation to match the actual scope of the contribution (integer translations only). Right now, the core method only uses translations (and rotations in R2\mathbb{R}^2 in Appendix E.2, which do not constitute a group in Z2\mathbb{Z}^2).

  5. The notation is inconsistent. The concrete specification of the transformation family appears at line 168: {gi}={(x,y)∣x∈[−dx,dx], j∈[−dy,dy]}\{g_i\} = \{(x,y) \mid x \in [-d_x, d_x],\, j \in [-d_y, d_y]\}. This specification is, however, not precise:

    5.1 The second coordinate uses jj instead of yy.

    5.2 There is no explicit relation between the single index ii and the pair (x,y)(x, y).

    5.3 Appendix G uses (i,j)(i, j) for the translation pair gi,jg_{i, j}, and a new symbol for the inverse action T−i,−jT_{-i, -j}

  6. The experimental evaluation lacks comparisons with the latest test-time defense methods, particularly those operating in the vision-language alignment setting. Relevant omissions include:

    • DBD [1] which also analyzes how image transformations affect. This is directly relevant since the proposed SR method similarly operates on embeddings of transformed inputs.
    • CIDER [2] which denoises images, another transformation of the input.
    • TTC [3], and AOM [4] which inject noise to counteract adversarial attacks at test time, sharing the same "combat noise with noise" philosophy.
  7. The theoretical justification for the 1/N1/\sqrt{N} suppression of adversarial perturbations rests on a single critical step: Under mild decorrelation assumptions: ∣1N∑i=1Nvi∣2∼1NE[vi2]\left|\frac{1}{N}\sum_{i=1}^{N} v_i\right|^2 \sim \frac{1}{N} \mathbb{E}[v_i^2]

    However:

    7.1 The "mild assumptions" are never formalized, in the main text or the appendix. Without a precise statement, the bound remains too vague.

    7.2 The assumption is measured only for ViT, there is no analysis showing that the terms viv_i are decorrelated for the other deployed models, e.g., the convolutional encoders. A truly translation-equivariant map φ:Rk→Rk\varphi : \mathbb{R}^k \to \mathbb{R}^k satisfies φ(Tgix)=Tgiφ(x)\varphi (T_{g_i} x) = T_{g_i} \varphi (x), in which case the aligned terms viv_i become identical across ii and their pairwise correlation approaches 11. Standard CNNs are equivariant by construction in their convolutional stages (up to downsampling and boundary effects), so it is entirely plausible that corr(vi,vj)\mathrm{corr}(v_i, v_j) is higher for them than for the patch-embedding ViT that was actually measured; whether the stride/pooling in these networks breaks equivariance enough to recover decorrelation is itself an empirical question that should be answered. The concern is sharpened by the paper's own layer-wise ablation (Table 11), which recommends applying SR through shallow layers. If the decorrelation assumption fails in these regimes while robustness still improves, then the gains cannot be attributed to the 1/N1/\sqrt{N} mechanism.

    7.3 Only the mean correlation is reported. If even a fraction of translation pairs have high correlation, those terms do not cancel in the sum, and the 1/N1/\sqrt{N} decay breaks down. Moreover, the sample size N=(2d+1)”N=(2d+1)^” is small (N=9, 25, 49 for d =1, 2, 3), hence, this effect might dominate.

    This is the central theoretical gap of the paper: the mechanism by which SR suppresses adversarial perturbations is assumed rather than derived, and the available empirical evidence does not clearly support the assumption. The authors should either (a) state the decorrelation condition precisely and characterize when it holds, or (b) acknowledge that the 1/N1/\sqrt{N} bound is heuristic and provide tighter empirical characterization on the models they actually deployed.

[1] Liu et al. "Adversarial Attacks Already Tell the Answer: Directional Bias-Guided Test-Time Defense for Vision-Language Models." ICLR 2025.
[2] Xu et al. "Cross-modality Information Check for Detecting Jailbreaking in Multimodal Large Language Models." Findings of EMNLP 2024.
[3] Xing et al. "CLIP is Strong Enough to Fight Back: Test-time Counterattacks towards Zero-shot Adversarial Robustness of CLIP." arXiv:2503.03613, 2025. [4] Tong et al. "On the Zero-Shot Adversarial Robustness of Vision-Language Models: A Truly Zero-Shot and Training-Free Approach." [5] Cohen, Taco, and Max Welling. "Group equivariant convolutional networks." International conference on machine learning. PMLR, 2016.

Minor Concerns

Line 48: there is a space missing: is limited[55].

Line 588 appears to contain a rendering/typesetting error.

Lines 617, 623 should use the textbold command, rather than the markdown one.

Throughout the experiments, a single "SR level" dd is reported, but the formal definition uses separate dx,dyd_x, d_y. It is never stated whether dx=dy=dd_x = d_y = d is always assumed, or whether asymmetric settings are ever used. This should be clarified.

Questions

To what is already stated above

  1. What specific boundary handling (padding strategy) is used in the implementation? Have you measured how much the boundary effects contribute to the observed performance, e.g., by comparing center-cropped evaluation vs. full-image evaluation?

  2. The theoretical analysis assumes a first-order (linear) approximation of the encoder. Have you verified that this approximation is valid?

  3. How is the integer-pixel translation, and its inverse, handled for patch-based encoders such as ViT? A translation by a number of pixels that is not a multiple of the patch size has no corresponding integer translation on the token lattice, so the inverse alignment in latent space is not well-defined.

Limitations

yes

Final justification

The rebuttal resolves several implementation concerns and strengthens the empirical evaluation, particularly through the boundary-handling tests and additional defense comparisons. The authors also agreed to narrow the claims and clearly present the theoretical analysis as conditional. Although the underlying assumption and first-order approximation remain insufficiently validated, the response improves the paper. I therefore increase my score by one point.

Formatting concerns

No formatting issues were found

4 comments
Authors · RebuttalOpenReview ↗
Rebuttal

We thank the reviewer for the careful reading and feedback. The reviewer rightfully identified several inconsistencies in the mathematical presentation and made valuable suggestions for better connecting the derivations to the actual implementation. We agree with these points and will revise the paper accordingly. However, we respectfully disagree that these correctable formalization issues invalidate the core algorithm or the empirical conclusions. We address each concern below.

W1. Continuous/discrete domains and transformation notation

The language of continuous image models followed by discrete sampling onto a lattice is widely adopted in computer vision [a,b,c] and originates from classical signal processing. Since our work is motivated by the classical stochastic resonance framework in signal processing, we formulate the problem using these mathematical conventions. That said, we acknowledge the distinction between the continuous formulation and the discrete implementation, and we will make it clearer.

[a] Horn and Schunck, “Determining Optical Flow,” 1981.
[b] Mumford and Shah, “Optimal Approximations by Piecewise Smooth Functions,” 1989.
[c] Perona and Malik, “Scale-Space and Edge Detection Using Anisotropic Diffusion,” 1990.

The reviewer correctly identifies a genuine mistake in our notation: we define g:R2→R2g:\mathbb{R}^2\rightarrow\mathbb{R}^2 as a spatial transformation and subsequently apply gg directly to the image. We thank the reviewer for identifying this issue and will correct it by explicitly distinguishing the continuous signal, its sampled finite representation, and the corresponding feature-space alignment.

W2/Q1. Finite boundaries and padding

Thank you for bringing this up. In our original implementation, we simply use zero filling. By construction, boundary features containing more zero-filled content contribute less signal during aggregation, and we did not observe a significant issue arising from boundary handling. We acknowledge that finite-grid translations with zero filling break the exact group structure, but the practical impact is mild when the translation radius is small, as in our settings d=1,2,3d=1,2,3. When dd becomes too large, e.g., above 5, we do observe a performance drop.

As requested, we evaluated five boundary treatments under PGD-100 using the same AT setting as Table 1:

Boundary treatment PGD-100
Reflection 54.29
Replication 54.56
Circular extension 54.55
Valid masking 54.40
Valid cropping 55.24

Robust accuracy remains between 54.29 and 55.24 across all treatments, showing that the method is insensitive to the choice of boundary handling. We will define the boundary operator explicitly and include these results.

W3. Adversarial-perturbation definition

Thank you. We will revise the definition accordingly.

W4. Scope of the group formulation

We understand the concern, but we do not believe the general formulation is purely ornamental. Its purpose is to clearly describe the transform => encode => inverse-align => aggregate construction underlying our method. We keep the formalization generic rather than limiting it to integer translations because there may be extensions beyond integer translations, such as learned transformations, which we leave for future work.

However, we agree that the current presentation may create a misunderstanding regarding the scope of our claims. We will therefore rephrase the discussion to avoid implying that arbitrary transformation groups are equally effective.

W5. Notational consistency

Thank you. We will revise the notation accordingly.

W6. Recent vision-language defenses

The goal of this manuscript is to introduce a generic test-time defense that applies across a broad range of tasks. The CLIP experiments are intended to demonstrate its applicability to vision-language settings. In contrast, the methods cited by the reviewer are specialized approaches tailored to a particular task and vision-language architecture. The goals are therefore different.

Nevertheless, we used the public TTC codebase and conducted the same CLIP+ImageNet experiments following its protocol:

Method Clean Top-1 Clean Top-5 Adv. Top-1 Adv. Top-5
No defense 59.74 84.57 1.17 15.94
AOM 33.58 58.22 44.06 68.98
TTC 49.34 74.94 38.49 63.12
TTC+SR (d=1d=1) 52.53 78.29 43.28 69.55
TTC+SR (d=2d=2) 53.92 79.78 46.05 72.89
TTC+SR (d=3d=3) 54.92 80.81 48.10 75.09

Adding SR to TTC consistently improves both clean and adversarial accuracy as dd increases. At d=3d=3, adversarial Top-1 accuracy improves from 38.49 to 48.10 and Top-5 accuracy from 63.12 to 75.09, while clean Top-1 accuracy improves from 49.34 to 54.92. TTC+SR at d=3d=3 also substantially outperforms AOM under attack.

W7. Decorrelation assumption and first-order analysis

This is a valid concern and deserves further discussion. To be clear, our intention is not to derive certified robustness through an exact theoretical bound, but to explain the motivation behind our method and provide empirical evidence consistent with that motivation. As requested, we formalize the decorrelation assumption as follows:

Let x~=x+n(x)\tilde{x}=x+n(x), and define the inverse-aligned feature perturbation induced by the ii-th transformation as vi(x)=gi,∗−1Jgix[gin(x)]v_i(x)=g_{i,*}^{-1}J_{g_i x}[g_i n(x)]. Under the first-order expansion, ΔSR(x)=ϕ^(x~)−ϕ^(x)≈1N∑i=1Nvi(x)\Delta_{\mathrm{SR}}(x)=\hat{\phi}(\tilde{x})-\hat{\phi}(x)\approx \frac{1}{N}\sum_{i=1}^{N}v_i(x).

Expanding the expected squared magnitude gives E[∣ΔSR(x)∣22]≈1N2(∑i=1NE[∣vi(x)∣22]+∑i≠jE[⟨vi(x),vj(x)⟩])\mathbb{E}[|\Delta_{\mathrm{SR}}(x)|2^2]\approx \frac{1}{N^2}\left(\sum{i=1}^{N}\mathbb{E}[{|v_i(x)|}_2^2]+\sum_{i\neq j}\mathbb{E}[\langle v_i(x),v_j(x)\rangle]\right).

The transformed perturbations gin(x)g_i n(x) are not independent because they originate from the same adversarial perturbation. Our assumption instead concerns their downstream feature responses after propagation through the transformation-dependent Jacobians and inverse alignment. Specifically, we assume that the expected aggregate cross terms are small: ∣∑i≠jE[⟨vi(x),vj(x)⟩]∣≤κ∑i=1NE[∣vi(x)∣22]\left|\sum_{i\neq j}\mathbb{E}[\langle v_i(x),v_j(x)\rangle]\right|\leq \kappa\sum_{i=1}^{N}\mathbb{E}[|v_i(x)|_2^2], where κ\kappa is small.

If, in addition, 1N∑i=1NE[∣vi(x)∣22]≤σ2\frac{1}{N}\sum_{i=1}^{N}\mathbb{E}[|v_i(x)|2^2]\leq \sigma^2, then E[∣ΔSR(x)∣22]≲(1+κ)σ2N\mathbb{E}[|\Delta{\mathrm{SR}}(x)|_2^2]\lesssim \frac{(1+\kappa)\sigma^2}{N}.

Thus, when the aggregate cross terms are negligible, the root-mean-square feature perturbation decreases approximately as 1/N1/\sqrt{N}. This assumption is motivated by three observations: (1) clean models are trained to produce coherent representations of natural images under common transformations; (2) they are not trained to preserve the same equivariance for adversarial perturbations; and (3) at test time, the adversarial noise is optimized to maximally perturb the output for a particular input. Together, these observations motivate the small-correlation assumption. It is an explanatory assumption rather than a certified guarantee. The extent to which it holds depends on the network, layer, input, and attack.

In general, we observe that architectures with weaker built-in translation equivariance benefit more strongly. For example, the defense is stronger on ViTs than on CNNs, since convolutional filters are naturally translation equivariant, and it is stronger still on MLP-Mixer. Modern CNNs, however, include striding, pooling, and skip connections and therefore exhibit imperfect translation equivariance, often discussed in connection with the “flickering” or shift-sensitivity problem. For a broader discussion of learned invariance, see [d]. Accordingly, our method still consistently improves CNN robustness, as demonstrated by the experimental results.

Our DINO ViT measurements in the appendix provide empirical evidence in one particular setting. Given the reviewer’s feedback, we will: (1) state the assumption explicitly; (2) revise the language to avoid suggesting a universal reduction of the effective Lipschitz constant; and (3) clarify that the derivation describes an assumption-based mechanism rather than a guarantee.

[d] Achille and Soatto, “Emergence of Invariance and Disentanglement in Deep Representations,” 2018.

Q2. First-order approximation

Like any first-order expansion of a nonlinear system, this approximation is local, and its accuracy depends on the network, layer, input, and perturbation magnitude. A comprehensive analysis of the local energy landscape of adversarial perturbations across different architectures and pretraining regimes would require a separate study and is beyond our current computational budget.

However, SR does not rely on strict local linearity. We introduce the analysis to explain why inverse-aligned latent aggregation, even across transformations differing by only one pixel, can improve adversarial robustness. We will revise the text to make this role clearer.

Q3. ViT inverse alignment

Our implementation reshapes the spatial tokens into a two-dimensional grid, lifts the feature map to the input-pixel lattice, applies the exact inverse pixel translation, aggregates the aligned features, and pools them back to the token resolution. This procedure is illustrated in Figure 1, but an editing error caused the corresponding explanation to be omitted from the text. We thank the reviewer for asking and will add this clarification.

Remarks

We hope this addresses the reviewer’s concerns. We also thank the reviewer for recognizing the potential impact and strong empirical evidence of the method. This is primarily an empirical methods paper; the formalization is intended to motivate and explain the method rather than provide a certified guarantee. We will revise the presentation to better reflect this distinction, and we believe the identified issues are correctable.

Reviewer Zu7P · CommentOpenReview ↗

Thank you for the detailed rebuttal and the additional experiments. The response clarifies several important aspects of the method.

The boundary-handling experiments are useful and indicate that the reported robustness is not strongly affected by the selected padding strategy. The new TTC and AOM comparisons also improve the experimental evaluation. In particular, the improvement obtained by combining SR with TTC supports the claim that SR can complement existing test-time defenses.

My main remaining concern is the theoretical explanation. The rebuttal now makes clear that the decorrelation condition is an assumption and that the 1/N1/\sqrt{N} reduction is not a general guarantee. This is an important clarification. However, the paper should not present this result as an established mechanism unless the assumption is measured across the architectures and layers used in the experiments. At present, the evidence is limited to one ViT setting. The revised paper should clearly separate the following:

  1. What is mathematically derived under the stated assumption.
  2. What is supported by measurements.
  3. What is only a possible explanation for the empirical results.

The response to the first-order approximation question is also incomplete. The authors state that a broader analysis is outside their computational budget, but they do not provide evidence that the approximation is accurate in the experimental settings. The analysis can still be included as an intuitive explanation, but its limitations should be stated explicitly.

The explanation of inverse alignment for ViTs is clearer, but lifting the token map to the pixel grid and then reducing it back to token resolution may introduce interpolation or resampling effects. The authors should specify the exact operations used and distinguish this procedure from an exact inverse action on the token grid.

Finally, I recommend simplifying the general group-based presentation. The current experiments mainly support integer translations. Possible future extensions to learned or more general transformations do not, by themselves, justify claims of generality in the present work.

Overall, the rebuttal improves my view of the empirical contribution and resolves some implementation concerns. The theoretical limitations remain, but they can be addressed by correcting the claims and clearly presenting the analysis as conditional and explanatory.

Authors · CommentOpenReview ↗

Thank you for the thoughtful follow-up.

We are glad that the rebuttal resolved the empirical and implementation concerns. As suggested, we will revise the presentation accordingly:

  • Clearly separate the conditional mathematical derivation, the empirical measurements, and the explanatory interpretation.
  • State explicitly that the 1/N1/\sqrt{N} reduction is an assumption and is not a guarantee.
  • Present the first-order expansion as a local explanatory approximation and state its limitations.
  • Specify the exact ViT resampling and alignment operations.
  • Restrict the main claims to the integer translations evaluated in the paper.

We appreciate that the reviewer views the remaining concerns as addressable through revision. There is no remaining methodological dispute, and we agree to refine the theoretical claims. We hope the reviewer will reconsider the overall assessment in light of these revisions and the strengthened empirical evidence.

Authors · CommentOpenReview ↗

We thank the reviewer for their time and effort. Since the discussion period is ending soon, we would appreciate it if the reviewer could let us know whether any concerns remain.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Missing a submission?

Loading the discussion…