Skip to main content
QUICK REVIEW

[Paper Review] Adversary Detection in Neural Networks via Persistent Homology

Thomas Gebhart, Paul Schrater|arXiv (Cornell University)|Nov 28, 2017
Adversarial Robustness in Machine LearningComputer Science8 references18 citations
TL;DR

This paper proposes a topological anomaly detection method for adversarial examples in neural networks using persistent homology to analyze the structural differences in computational graphs induced by inputs. By comparing the persistent subgraphs—particularly the first homology group—between clean and adversarial inputs, the method achieves 98% detection accuracy and F₁-score of 0.98 on MNIST, demonstrating robustness to high-distortion adversaries.

ABSTRACT

We outline a detection method for adversarial inputs to deep neural networks. By viewing neural network computations as graphs upon which information flows from input space to out- put distribution, we compare the differences in graphs induced by different inputs. Specifically, by applying persistent homology to these induced graphs, we observe that the structure of the most persistent subgraphs which generate the first homology group differ between adversarial and unperturbed inputs. Based on this observation, we build a detection algorithm that depends only on the topological information extracted during training. We test our algorithm on MNIST and achieve 98% detection adversary accuracy with F1-score 0.98.

Motivation & Objective

  • To address the vulnerability of deep neural networks to adversarial examples that are imperceptible to humans but cause misclassification.
  • To investigate whether topological features of neural network computations can reveal structural differences between adversarial and clean inputs.
  • To develop a detection framework that relies solely on topological information extracted during training, avoiding reliance on model-specific or adversarial-specific assumptions.
  • To evaluate the robustness and generalizability of topological detection across varying levels of adversarial perturbation and network architectures.

Proposed method

  • Represent neural network computations as weighted, directed graphs where nodes are neurons and edges are weighted connections, with activations from input data determining the induced subgraph.
  • Apply persistent homology to the induced computational graphs to extract topological invariants, particularly focusing on the most persistent subgraphs generating the first homology group.
  • Define similarity measures between input-induced graphs using node matching (maximum and average), edge weighting, and edge counting to compare topological structures of clean vs. adversarial inputs.
  • Train the detection system using topological features from clean inputs only, enabling zero-shot detection of adversarial examples without retraining.
  • Use the persistent homology computation to identify topological anomalies in the flow of information, where adversarial inputs induce structurally distinct subgraphs compared to clean inputs.
  • Optimize detection performance using hyperparameters like λ (regularization) and π (threshold for edge counting), with evaluation across varying perturbation levels (κ = 0, 20).

Experimental results

Research questions

  • RQ1Can persistent homology detect structural differences in neural network computations induced by adversarial inputs compared to clean inputs?
  • RQ2Do adversarial examples induce topologically distinct persistent subgraphs—particularly in the first homology group—compared to unperturbed inputs?
  • RQ3Can topological features extracted during training be used to detect adversarial inputs without requiring access to the adversarial examples during training?
  • RQ4How does the detection performance vary with the magnitude of adversarial perturbation (e.g., κ = 0 vs. κ = 20)?
  • RQ5Is the topological detection framework robust to adversarial attacks that are adaptive to the detection mechanism?

Key findings

  • The method achieves 98.4% detection accuracy and an F₁-score of 0.984 using average edge counting with π = 0.95 and κ = 20, indicating high sensitivity to high-distortion adversaries.
  • Maximum node matching achieves 98.0% accuracy and F₁-score of 0.980 with κ = 20, outperforming other similarity measures under high-perturbation conditions.
  • For low-perturbation adversaries (κ = 0), average edge weighting yields 93.1% accuracy and F₁-score of 0.931 at λ = 0.05, showing strong performance even with minimal distortion.
  • The topological detection framework is most effective for high-confidence adversarial examples (κ = 20), with the maximum node matching method missing only 6 adversarial examples.
  • The method remains robust across different similarity measures and hyperparameters, with consistent performance across multiple evaluation metrics.
  • Despite computational cost, the framework is resilient to white-box attacks due to its deep integration with input-space features and topological invariants.

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.