Lune

ICML2022Top-tier venue

Adversarial Attack and Defense for Non-Parametric Two-Sample Tests

Xilie Xu, Jingfeng Zhang, Feng Liu, Masashi Sugiyama, Mohan S. Kankanhalli

Abstract

Non-parametric two-sample tests (TSTs) that judge whether two sets of samples are drawn from the same distribution, have been widely used in the analysis of critical data. People tend to employ TSTs as trusted basic tools and rarely have any doubt about their reliability. This paper systematically uncovers the failure mode of non-parametric TSTs through adversarial attacks and then proposes corresponding defense strategies. First, we theoretically show that an adversary can upperbound the distributional shift which guarantees the attack's invisibility. Furthermore, we theoretically find that the adversary can also degrade the lower bound of a TST's test power, which enables us to iteratively minimize the test criterion in order to search for adversarial pairs. To enable TST-agnostic attacks, we propose an ensemble attack (EA) framework that jointly minimizes the different types of test criteria. Second, to robustify TSTs, we propose a max-min optimization that iteratively generates adversarial pairs to train the deep kernels. Extensive experiments on both simulated and real-world datasets validate the adversarial vulnerabilities of non-parametric TSTs and the effectiveness of our proposed defense. Source code is available at https://github.com/GodXuxilie/Robust-TST.git . where x i , x j ∈ S P and y i , y j ∈ S Q . In this paper, we investigate six types of non-parametric TSTs as follows since Liu et al. (2020a; 2021) have shown they are powerful on complex data. • ) for tests based on MMD with Gaussian kernels (MMD-G) (Sutherland et al., 2017) with the learnable lengthscale σ φ , in which ) for tests based on MMD with deep kernels (MMD-D) (Liu et al., 2020a). Note that k (D) (x, y) = [(1γ) exp(-1 2σ φ φ(x)φ(y) 2 ) + γ] exp(-1 2σq xy 2 ) where γ, σ φ , σ q are the learnable parameters and φ(•) is a parameterized deep network to extract the features. • D (S) (•, •) (Eq. ( 10 )) for C2ST based on Sign (C2ST-S) (Lopez-Paz & Oquab, 2016). A classifier f : X → R that outputs the classification probabilities is utilized by C2ST. Liu et al. (2020a) pointed out that the test statistic of C2ST-S is equivalent to MMD with kernel k (S) , i.e., D (S) (•, •) = MMD 2 (•, •; k (S) ) where k (S) (x, y) = 1 4 1(f(x) > 0)1(f (y) > 0).

Ask Lune

Know this paper in minutes, not an afternoon.

Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.

3 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Adversarial Weight Perturbation Helps Robust Generalization cites Towards Evaluating the Robustness of Neural Networks
  • Adversarial Weight Perturbation Helps Robust Generalization cites Improving Adversarial Robustness Requires Revisiting Misclassified Examples
  • Adversarial Weight Perturbation Helps Robust Generalization cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
  • Adversarial Weight Perturbation Helps Robust Generalization cites Fast is better than free: Revisiting adversarial training
  • Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks cites Towards Evaluating the Robustness of Neural Networks
  • Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks cites Fast is better than free: Revisiting adversarial training
  • Fast is better than free: Revisiting adversarial training cites Towards Evaluating the Robustness of Neural Networks
  • AutoLoRa: An Automated Robust Fine-Tuning Framework cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
  • Synergy-of-Experts: Collaborate to Improve Adversarial Robustness cites Towards Evaluating the Robustness of Neural Networks
  • Synergy-of-Experts: Collaborate to Improve Adversarial Robustness cites Improving Adversarial Robustness Requires Revisiting Misclassified Examples
  • Synergy-of-Experts: Collaborate to Improve Adversarial Robustness cites Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacks
  • Synergy-of-Experts: Collaborate to Improve Adversarial Robustness cites Fast is better than free: Revisiting adversarial training
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers3

  1. Synergy-of-Experts: Collaborate to Improve Adversarial RobustnessSen Cui, Jingfeng Zhang, Jian Liang, Bo Han et al.NeurIPS 2022 · 12 citations
  2. AutoLoRa: An Automated Robust Fine-Tuning FrameworkXilie Xu, Jingfeng Zhang, Mohan S. KankanhalliICLR 2024 · 5 citations
  3. Binary Hypothesis Testing for Softmax Models and Leverage Score ModelsYuzhou Gu, Zhao Song, Junze YinICML 2025

Builds on39

  1. Towards Evaluating the Robustness of Neural NetworksNicholas Carlini, David A. WagnerS&P 2017 · 9,786 citations
  2. Reliable evaluation of adversarial robustness with an ensemble of diverse parameter-free attacksFrancesco Croce, Matthias HeinICML 2020 · 2,337 citations
  3. Fast is better than free: Revisiting adversarial trainingEric Wong, Leslie Rice, J. Zico KolterICLR 2020 · 1,352 citations
  4. Adversarial Weight Perturbation Helps Robust GeneralizationDongxian Wu, Shu-Tao Xia, Yisen WangNeurIPS 2020 · 917 citations
  5. Improving Adversarial Robustness Requires Revisiting Misclassified ExamplesYisen Wang, Difan Zou, Jinfeng Yi, James Bailey et al.ICLR 2020 · 829 citations

Related papers

  1. Maximum Mean Discrepancy Test is Aware of Adversarial AttacksRuize Gao, Feng Liu, Jingfeng Zhang, Bo Han et al.ICML 2021 · 77 citations
  2. Learning Deep Kernels for Non-Parametric Two-Sample TestsFeng Liu, Wenkai Xu, Jie Lu, Guangquan Zhang et al.ICML 2020 · 213 citations
  3. One Stone, Two Birds: Enhancing Adversarial Defense Through the Lens of Distributional DiscrepancyJiacheng Zhang, Benjamin I. P. Rubinstein, Jingfeng Zhang, Feng LiuICML 2025
  4. On the Adversarial Risk of Test Time Adaptation: An Investigation into Realistic Test-Time Data PoisoningYongyi Su, Yushu Li, Nanqing Liu, Kui Jia et al.ICLR 2025
  5. Attack as defense: characterizing adversarial examples using robustnessZhe Zhao, Guangke Chen, Jingyi Wang, Yiwei Yang et al.ISSTA 2021 · 34 citations
Dusk over the sea between two cliffs drawn in fine vertical lines