Skip to main content
QUICK REVIEW

[Paper Review] Maximum Mean Discrepancy is Aware of Adversarial Attacks

Ruize Gao, Feng Liu|arXiv (Cornell University)|Oct 22, 2020
Adversarial Robustness in Machine LearningComputer Science81 references10 citations
TL;DR

This paper demonstrates that the Maximum Mean Discrepancy (MMD) test can detect adversarial attacks when enhanced with a deep kernel, maximized test power via asymptotic statistics, and wild bootstrap to handle non-i.i.d. data. The improved MMD test successfully identifies distributional discrepancies between natural and adversarial data, establishing two-sample testing as a viable framework for adversarial detection.

ABSTRACT

The maximum mean discrepancy (MMD) test could in principle detect any distributional discrepancy between two datasets. However, it has been shown that the MMD test is unaware of adversarial attacks -- the MMD test failed to detect the discrepancy between natural and adversarial data. Given this phenomenon, we raise a question: are natural and adversarial data really from different distributions? The answer is affirmative -- the previous use of the MMD test on the purpose missed three key factors, and accordingly, we propose three components. Firstly, the Gaussian kernel has limited representation power, and we replace it with an effective deep kernel. Secondly, the test power of the MMD test was neglected, and we maximize it following asymptotic statistics. Finally, adversarial data may be non-independent, and we overcome this issue with the wild bootstrap. By taking care of the three factors, we verify that the MMD test is aware of adversarial attacks, which lights up a novel road for adversarial data detection based on two-sample tests.

Motivation & Objective

  • To investigate why previous MMD tests failed to detect adversarial attacks despite their theoretical capability.
  • To identify and correct three key limitations in prior MMD applications: shallow kernel representation, low test power, and i.i.d. assumption violations.
  • To develop a robust MMD-based method that can effectively distinguish natural from adversarial data distributions.
  • To establish two-sample testing as a viable and theoretically sound approach for adversarial data detection.

Proposed method

  • Replace the standard Gaussian kernel with a deep kernel to enhance representation power for complex data distributions.
  • Maximize the test power of the MMD test using asymptotic statistical theory to improve sensitivity to distributional differences.
  • Apply the wild bootstrap method to account for potential dependence in adversarial data, ensuring valid inference under non-i.i.d. conditions.
  • Integrate the three components—deep kernel, power maximization, and wild bootstrap—into a unified MMD framework for adversarial detection.
  • Use the resulting enhanced MMD test to compare natural and adversarial data distributions in a two-sample testing setup.

Experimental results

Research questions

  • RQ1Why did prior MMD tests fail to detect distributional discrepancies between natural and adversarial data?
  • RQ2Can the MMD test be made sensitive to adversarial attacks by addressing its inherent limitations?
  • RQ3Does the use of a deep kernel improve the MMD test's ability to detect subtle distributional shifts caused by adversarial examples?
  • RQ4How does maximizing test power affect the MMD test's sensitivity to adversarial perturbations?
  • RQ5Can the wild bootstrap method effectively handle non-i.i.d. structures in adversarial data for valid statistical inference?

Key findings

  • The enhanced MMD test successfully detects distributional discrepancies between natural and adversarial data, confirming that such data indeed come from different distributions.
  • Replacing the Gaussian kernel with a deep kernel significantly improves the MMD test's representation capacity and detection capability.
  • Maximizing test power through asymptotic statistics increases the sensitivity of the MMD test to small but meaningful distributional shifts.
  • The wild bootstrap method effectively handles non-i.i.d. structures in adversarial data, ensuring reliable p-values and valid statistical inference.
  • The combination of deep kernel, power maximization, and wild bootstrap enables the MMD test to reliably detect adversarial attacks across multiple datasets and models.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.