An adversarial input is crafted or modified to test whether a machine-learning model produces an incorrect, unsafe, or otherwise undesirable output. In enterprise GenAI, adversarial inputs support robustness and security testing rather than ordinary user interaction. section 13.0 section 13.4.2
Use adversarial inputs as part of red-teaming:
- Generate adversarial inputs with TextAttack, a Python framework supporting adversarial attacks, examples, and NLP data augmentation. section 13.4.2
- Evaluate how consistently an LLM handles bad inputs, edge cases, and other conditions that may produce unexpected outputs. section 13.4.2
- Combine attack testing with model evaluation, fairness audits, explainability, and data augmentation to investigate broader risks. section 13.4.2
# Run all compatible attacks against Llama 2 7B Chat using a SLURM cluster python ./scripts/run_pipeline.py --methods all --models llama2_7b --step all --mode slurm # Generate and evaluate completions using a SLURM cluster python ./scripts/run_pipeline.py --methods all --models baichuan2_7b,mistral_7b,llama2_70b --step 2_and_3 --mode slurm
The supplied pipeline listing shows how compatible attacks and completion evaluation can run across several language models on a SLURM cluster. section 13.4.2




