liveBook · Manning

Robustness

As explained in Generative AI in Action

Robustness is the ability of a machine-learning model to maintain acceptable behavior when inputs vary, are perturbed, or include difficult cases.

Robustness is a model’s ability to maintain acceptable behavior when inputs vary, contain difficult cases, or are deliberately perturbed. In enterprise LLM evaluation, it is tested alongside safety, fairness, and ethics. section 13.4.2

Practical robustness checks include:

  • Generate adversarial inputs with TextAttack to test resilience against manipulated or difficult NLP inputs. section 13.4.2
  • Evaluate performance across broad input sets and edge cases to detect unexpected outputs. section 13.4.2
  • Use NL-Augmenter to create varied training data that can improve testing and robustness. 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

Run compatible adversarial attacks and evaluate model completions across multiple LLMs using a SLURM cluster. section 13.4.2

How Generative AI in Action covers it

How deep it goes
Connects robustness to adversarial generation, data augmentation, and edge-case checks, without detailing metrics or remediation procedures.
Examples
Uses TextAttack, NL-Augmenter, edge-case inputs, and a SLURM pipeline evaluating Llama 2, Baichuan2, Mistral, and other models.
What it assumes
Assumes familiarity with machine-learning models, LLMs, NLP inputs, and basic model evaluation.
What you can do after
Diagnose robustness risks by generating adversarial inputs and comparing model behavior across varied and difficult cases.
How it connects
Links robustness with red-teaming, adversarial attacks, model evaluation, data augmentation, safety, fairness, and explainability.

Also explained in

Compare how 7 books explain robustness →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Generative AI in Action. The section links point to the parts of the book it draws on.