# MLSN: #10
Adversarial Attacks Against Language and Vision Models, Improving LLM Honesty, and Tracing the Influence of LLM Training Data

Welcome to the 10th issue of the ML Safety Newsletter by the Center for AI Safety. In this edition, we cover:

*   Adversarial attacks against GPT-4, PaLM-2, Claude, and Llama 2
*   Robustness against unforeseen adversaries
*   Studying the effects of LLM training data using influence functions
*   Improving LLM honesty by editing activations at inference time
*   Aligning language models in simulated social situations
*   How to verify the datasets on which a model was trained
*   An overview of the catastrophic risks posed by AI

Subscribe [here](https://newsletter.mlsafety.org) to receive future versions.

* * *

*We have a new safety newsletter. It’s more frequent, covers developments beyond technical papers, and is written for a broader audience.*

*Check it out here:* [*AI Safety Newsletter*](http://aisafety.substack.com)*.*

**Robustness**
==============

### Universal and Transferable Adversarial Attacks on Aligned Language Models

Large language models are often trained to refuse harmful requests. These safeguards can be bypassed with “jailbreak” prompts, but these require creative prompting skills and remain brittle. To reliably bypass the safeguards on aligned language models, a new paper develops an automatic method for generating adversarial attacks that succeed against GPT-4, PaLM-2, Claude, and Llama 2.

[![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bcdb5c4-29b8-4eac-89f3-2a9b30424bed_1120x1600.png)](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F6bcdb5c4-29b8-4eac-89f3-2a9b30424bed_1120x1600.png)

They generate attack strings using a white box gradient-based method on the open source model Llama 2. The method takes the gradient of each token embedding, then updates towards a new token on which the model will be less likely to refuse to answer. Though the attacks are developed on Llama 2, they succeed against GPT-4 in 47% of cases, against PaLM-2 in 66% of cases, and against Claude 2 in 2.1% of cases. 

Language model developers will now need to contend with adversarial attacks in the same way that computer vision developers have done for the last decade. There have been [several thousand papers](https://nicholas.carlini.com/writing/2019/all-adversarial-example-papers.html) published on adversarial robustness over the last decade, but simple attacks [still frequently fool](https://robustbench.github.io) the world’s most robust image classifiers. Without strong defenses against adversarial attacks, language models could be used maliciously, such as in [synthesizing bioweapons](https://arxiv.org/abs/2306.03809). 

Several papers have begun [developing](https://arxiv.org/abs/2309.00614) “[defenses](https://arxiv.org/abs/2309.02705)” against this attack, but evaluating defenses against adversarial attacks is notoriously difficult. Researchers want to show that they have built strong defenses, and so they are incentivized to conduct weak attacks against their own defenses. Previous work has demonstrated the failures of many published defenses against adversarial attacks, and on that basis has provided [recommendations for conducting better evaluations](https://arxiv.org/abs/1902.06705).

**\[**[**Link**](https://arxiv.org/abs/2307.15043)**\]**

### Testing Robustness Against Unforeseen Adversaries

Robustness against adversarial attacks might be much more difficult in computer vision, where images provide more degrees of freedom for adversarial optimization. Future AI systems might rely on image inputs, such as multimodal AI agents which operate on the pixels of a computer monitor. Therefore, it’s important to improve robustness in *both* language modeling and computer vision.

Previous work on adversarial robustness in computer vision has focused on defending against small ℓ~p~-constrained attacks, but real-world attacks may be unrestricted and unlike attacks seen before, similar to zero-day attacks in computer security. For example, a multimodal AI agent processing screenshots of monitors could be attacked by webpages with adversarial backgrounds.

In a [significant update](https://arxiv.org/abs/1908.08016) to an earlier work on unforeseen adversaries, researchers have introduced eighteen novel adversarial attacks. These attacks are used to construct ImageNet-UA, a new benchmark for evaluating model robustness against a wide range of unforeseen adversaries.

[![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cfc0b8e-30aa-4a1d-8573-ac4b6e16a1a4_1600x1395.png)](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F8cfc0b8e-30aa-4a1d-8573-ac4b6e16a1a4_1600x1395.png)

Evaluations show that current techniques provide only small improvements to robustness against unforeseen adversaries. ℓ~2~ adversarial training outperforms both standard training and training on ℓ~∞~ adversaries. Capabilities improvements in computer vision have somewhat improved robustness, as moving from a ResNet-50 to ConvNeXt-V2-huge improves performance from 1% to 19.1% on UA2. Interestingly, the most robust model, DINOv2, was not adversarially trained at all. Rather, it used self-supervised learning on a large, diverse dataset. This model obtains 27.7% accuracy on ImageNet-UA.

**\[**[**Link**](https://arxiv.org/abs/1908.08016)**\]**

**Monitoring**
==============

### Studying Large Language Model Generalization with Influence Functions

To better understand the causes of model behavior, this paper estimates how a model’s weights and outputs would change if a given data point were added to the training set. They do so by developing a faster implementation of a classical statistics technique, influence functions. 

This method faces several challenges. It is computationally costly, and is therefore only evaluated on a subset of the training data and a subset of the parameters. Moreover, influence functions provide an imperfect approximation of how a training datapoint affects a neural network’s weights and outputs. Further work is needed to evaluate whether influence functions are useful for predicting performance and reducing risks. This paper contributes to the growing literature on training data attribution. 

**\[**[**Link**](https://arxiv.org/abs/2308.03296)**\]**

**Other Monitoring News**

*   **\[**[**Link**](https://arxiv.org/abs/2305.04388)**\]** Large language models' chain-of-thought explanations can be misleading and biased, even when they sound plausible.
*   **\[**[**Link**](https://arxiv.org/abs/2306.09983)**\]** AI systems with superhuman performance in their domains still have logical inconsistencies in their outputs, such as a chess AI which assigns different probabilities of winning a game when a board is flipped symmetrically without altering game semantics.
*   **\[**[**Link**](https://arxiv.org/abs/2306.01128)**\]** Rather than reverse engineering Transformer models by inspecting weights and activations, this paper trains modified Transformers that can be directly compiled into human-readable code.
*   **\[**[**Link**](https://arxiv.org/abs/2305.15324)**\]** This paper advocates screening models for potentially dangerous behaviors such as deception, weapons acquisition, and self-propagation.

* * *

**Control**
===========

### Inference-Time Intervention: Eliciting Truthful Answers from a Language Model

This paper enhances the truthful accuracy of large language models by adjusting model activations during inference. Using a linear probe, they identify attention heads which can strongly predict truthfulness on a validation dataset. During each forward pass at inference time, they shift model activations in the truthful directions identified by the probe. Experiments show a tradeoff between truthfulness and helpfulness, as more truthful models are more likely to refuse to answer a given question. 

**\[**[**Link**](https://arxiv.org/abs/2306.03341)**\]**

### Training Socially Aligned Language Models in Simulated Human Society

[![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F522ece18-79e5-4517-9c17-6c1878902103_1600x1504.png)](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F522ece18-79e5-4517-9c17-6c1878902103_1600x1504.png)

Language model alignment techniques usually focus on pleasing a single conversational partner. This paper instead develops a technique for aligning language models in a social setting. Models generate answers to questions, send those answers to other models, and receive feedback on their answers. Then models are trained to mimic the outputs and ratings provided by other models in their simulated society. This technique improves generalization and robustness against adversarial attacks. 

**\[**[**Link**](https://arxiv.org/abs/2305.16960)**\]**

* * *

Systemic Safety
===============

### Can large language models democratize access to dual-use biotechnology?

ChatGPT can be prompted into providing information about how to generate pandemic pathogens. The model provides detailed step-by-step instructions that might not be easily available online, including recommendations about how to bypass the security protocols at DNA synthesis labs. As models learn more about hazardous topics such as bioterrorism, there will be growing interest in developing technical and governance measures for preventing model misuse. 

**\[**[**Link**](https://arxiv.org/abs/2306.03809)**\]**

### Tools for Verifying Neural Models' Training Data

This paper introduces the concept of Proof of Training Data: any protocol which allows a developer to credibly demonstrate which training data was used to produce a model. Techniques like these could help model developers prove that they have not trained on copyrighted data or violated government policies. 

They develop empirical strategies for Proof of Training Data, and successfully catch a wide variety of attacks from the Proof of Learning Literature. 

**\[**[**Link**](https://arxiv.org/abs/2307.00682)**\]**

### An Overview of Catastrophic AI Risks

[![](https://substackcdn.com/image/fetch/w_1456,c_limit,f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b38348b-1e40-4a3a-b3cf-22e884eab124_1600x444.png)](https://substackcdn.com/image/fetch/f_auto,q_auto:good,fl_progressive:steep/https%3A%2F%2Fsubstack-post-media.s3.amazonaws.com%2Fpublic%2Fimages%2F2b38348b-1e40-4a3a-b3cf-22e884eab124_1600x444.png)

This paper provides an overview of the main sources of catastrophic AI risk. Organized into four categories—malicious use, competitive pressures, organizational safety, and rogue AIs—the paper includes detailed discussion of threats such as bioterrorism, cyberattacks, automation, deception, and more. Illustrative stories of catastrophe and potential solutions are presented in each section. 

**\[**[**Link**](https://arxiv.org/abs/2306.12001)**\]**

**Other Systemic Safety News**

*   **\[**[**Link**](https://arxiv.org/abs/2307.04699)**\]** This paper details four kinds of international institutions which could improve safety in AI development.
*   **\[**[**Link**](https://arxiv.org/abs/2306.06924)**\]** A taxonomy of societal-scale risks from AI, including an automated economy that no longer benefits humanity and an unexpectedly powerful AI system that leaks from a lab.
*   **\[**[**Link**](https://www.darpa.mil/news-events/2023-08-09)**\]** DARPA AI Cyber Challenge to award $20M in prizes for using LLMs to find and fix security vulnerabilities in code.

* * *

### **More ML Safety Resources**

*   \[[Link](https://course.mlsafety.org/)\] The ML Safety course
*   \[[Link](https://www.reddit.com/r/mlsafety/)\] ML Safety Reddit
*   \[[Link](https://twitter.com/topofmlsafety)\] ML Safety Twitter
*   \[[Link](http://aisafety.substack.com)\] AI Safety Newsletter

Subscribe [here](https://newsletter.mlsafety.org) to receive future versions.