Skip to content

Add ANDA transfer attack - #6

Open
Pranjali-Nagpal wants to merge 2 commits into
AItruste:mainfrom
Pranjali-Nagpal:implement-anda-transfer-attack
Open

Add ANDA transfer attack#6
Pranjali-Nagpal wants to merge 2 commits into
AItruste:mainfrom
Pranjali-Nagpal:implement-anda-transfer-attack

Conversation

@Pranjali-Nagpal

@Pranjali-Nagpal Pranjali-Nagpal commented Jul 20, 2026

Copy link
Copy Markdown

Summary

This PR adds an implementation of the ANDA (Asymptotically Normal Distribution Learning) transfer attack (CVPR 2024) to the face recognition transfer attack framework.

Paper basis: "Strong Transferable Adversarial Attacks via Ensembled Asymptotically Normal Distribution Learning" (CVPR 2024), Fang et al."

Changes

  • Implemented anda_attack() in core/transfer_attack_core.py
  • Added TensorFlow implementation of the ANDA running statistics (ANDAStatistics)
  • Added TensorFlow equivalent of the affine translation ensemble used by ANDA
  • Adapted the attack objective from image classification to face verification by using the repository's existing embedding similarity loss (compute_embedding() + attack_loss())
  • Added ANDA to ALL_ATTACKS
  • Added the corresponding output column to ATTACK_COLS
  • Connected the attack through run_attack()

Notes

  • Only core/transfer_attack_core.py has been modified, following the Assignment 4 submission guidelines.
  • The implementation preserves the original ANDA optimization pipeline, including:
    • translation ensemble
    • running gradient statistics
    • Gaussian distribution estimation
    • iterative adversarial update
  • The only intended algorithmic adaptation is replacing the original classification loss with the repository's embedding similarity objective to support both impersonation and dodging attacks.

Evaluation Results (docs/subset_input_pairs.csv):

Attack Breach Rate (%) Impact Mean
ANDA 36.67 0.1992
SI_NI_FGSM 29.17 0.1755
MI_FGSM 26.67 0.1643
MI_ADMIX_DI_TI 24.17 0.1534
TI_FGSM 20.42 0.1313
PGD 16.67 0.1002

ANDA breakdown:

Goal Breach Rate (%) Impact Mean
Dodging 45.42 0.2543
Impersonation 27.92 0.1441

Added ANDA attack implementation with statistics collection and sampling.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant