Adversarial Effectiveness vs. Computational Cost: An Analysis of GCG and nanoGCG Adversarial Suffix Attacks
Resumo
Small Language Models (SLMs) are gaining widespread adoption due to their lower computational cost, faster inference speed, and suitability for deployment on edge devices and resource-constrained environments. The adoption of SLMs in Generative Artificial Intelligence (GenAI) applications makes security evaluation dependent on both adversarial effectiveness and computational cost. We compare Greedy Coordinate Gradient (GCG) and nanoGCG adversarial suffix generation under equivalent experimental conditions using Python Risk Identification Tool (PyRIT). The evaluation considers Attack Success Rate (ASR), execution time, memory usage, estimated cost, and throughput. Our results support defensive red-teaming evaluations by relating attack success to the computational effort required to obtain it.
Referências
GraySwanAI (2025). nanogcg: A fast + lightweight implementation of the gcg algorithm in pytorch. [link]. GitHub repository. Latest release: v0.3.0 (commit 33d8418).
Microsoft AI Red Team (2026). Pyrit documentation: The python risk identification tool for generative ai. [link]. Acesso em: 20 fev. 2026.
Munoz, G. D. L., Minnich, A. J., Lutz, R., Lundeen, R., Dheekonda, R. S. R., Chikanov, N., Jagdagdorj, B.-E., Pouliot, M., Chawla, S., Maxwell, W., et al. (2024). Pyrit: A framework for security risk identification and red teaming in generative ai system. arXiv preprint arXiv:2410.02828.
NVIDIA (2023). Train with mixed precision. NVIDIA Deep Learning Performance Documentation. Acesso em 12 maio 2026.
PyTorch Contributors (2026). CUDA semantics. Disponível em: [link].
Vassilev, A., Oprea, A., Fordyce, A., Anderson, H., Davies, X., and Hamin, M. (2025). Adversarial machine learning: A taxonomy and terminology of attacks and mitigations. NIST Technical Series Publication NIST AI 100-2e2025, National Institute of Standards and Technology, Gaithersburg, MD.
Zou, A., Wang, Z., Carlini, N., Nasr, M., Kolter, J. Z., and Fredrikson, M. (2023). Universal and transferable adversarial attacks on aligned language models. arXiv preprint arXiv:2307.15043.
