Skip to content

prakashchhipa/ASTrA

Repository files navigation

ASTrA: Adversarial Self-Supervised Training with Adaptive Attacks

Chhipa, P.C.*, Vashishtha, G.*, Settur, J.*, Saini, R., Shah, M., Liwicki, M. ASTrA: Adversarial Self-Supervised Training with Adaptive Attacks. International Conference on Learning Representations. (ICLR 2025)

*Indicates equal contributions.

Visit Project Website - https://prakashchhipa.github.io/projects/ASTrA

ASTrA addresses the limitations of conventional self-supervised adversarial training (Self-AT) methods, which rely on static heuristic attacks that fail to adapt to diverse data distributions and model dynamics. By introducing a learnable, reinforcement learning-based adversarial attack strategy, ASTrA generates adaptive perturbations that optimize self-supervised representations. This approach improves robustness and generalization across multiple datasets, enabling more effective and sustainable training for adversarially robust models. ASTrA also incorporates mixed contrastive loss to further enhance representation quality, making it a state-of-the-art solution for robust self-supervised learning.

Main Framework

Install the requisite conda environment using ASTra_environment.yml

Training

To run the code: Run it using the bash file bash run.sh run.sh file has all the hyperparameters tuned accordingly

Evaluation

SLF & ALF

python test_LF.py --experiment EXP_PATH --checkpoint PATH_TO_PRETRAINED_MODEL --dataset DATASET_NAME --data PATH_TO_DATASET --cvt_state_dict --bnNameCnt 1 --evaluation_mode EVALUATION_MODE

AFF

python test_AFF.py --experiment EXP_PATH --checkpoint PATH_TO_PRETRAINED_MODEL --dataset DATASET_NAME --data PATH_TO_DATASET

Acknowledgements

Some of our code are borrowed from DynACL. Thanks for their great work!

About

ASTrA - Adversarial-Self-Supervised-Training-with-Adaptive-Attacks, ICLR 2025

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published