# [MLSN #8] Mechanistic interpretability, using law to inform AI alignment, scaling laws for proxy gaming

As part of a larger community building effort, [CAIS](https://safe.ai/) is writing a safety newsletter that is designed to cover empirical safety research and be palatable to the broader machine learning research community. You can [subscribe here](https://newsletter.mlsafety.org/) or follow the newsletter on [twitter](https://twitter.com/ml_safety) here.

* * *

Welcome to the 8th issue of the ML Safety Newsletter! In this edition, we cover:

*   Isolating the specific mechanism that GPT-2 uses to identify the indirect object in a sentence
*   When maximum softmax probability is optimal
*   How law can inform specification for AI systems
*   Using language models to find a group consensus
*   Scaling laws for proxy gaming
*   An adversarial attack on adaptive models
*   How systems safety can be applied to ML
*   And much more...

* * *

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

### **A Circuit for Indirect Object Identification in GPT-2 small**

[![](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%2F82973a3a-77de-41b8-80e4-f5ed94a738f0_1600x710.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%2F82973a3a-77de-41b8-80e4-f5ed94a738f0_1600x710.png)

One subset of interpretability is *mechanistic interpretability*: understanding how models perform functions down to the level of particular parameters. Those working on this agenda believe that by learning how small parts of a network function, they may eventually be able to rigorously understand how the network implements high-level computations.

This paper tries to identify how GPT-2 small solves *indirect object identification,* the task of identifying the correct indirect object to complete a sentence with. Using a number of interpretability techniques, the authors seek to isolate particular parts of the network that are responsible for this behavior.

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

### **Learning to Reject Meets OOD Detection**

Both learning to reject (also called error detection; deciding whether a sample is likely to be misclassified) and out-of-distribution detection share the same baseline: maximum softmax probability. MSP has been outperformed by other methods in OOD detection, but never in learning to reject, and it is mathematically provable that it is optimal for learning to reject. This paper shows that it isn’t optimal for OOD detection, and identifies specific circumstances in which it can be outperformed. This theoretical result is a good confirmation of the existing empirical results.

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

### **Other Monitoring News**

**\[**[**Link**](https://arxiv.org/abs/2212.06727)**\]** The first paper that successfully applies feature visualization techniques to Vision Transformers.

**\[**[**Link**](https://arxiv.org/abs/2211.07740)**\]** This method uses the reconstruction loss of diffusion models to create a new SOTA method for out-of-distribution detection in images.

**\[**[**Link**](https://arxiv.org/abs/2301.02344)**\]** A new Trojan attack on code generation models works by inserting poisoned code into docstrings rather than the code itself, evading some vulnerability-removal techniques.

**\[**[**Link**](https://arxiv.org/abs/2302.06600)**\]** This paper shows that fine tuning language models for particular tasks relies on changing only a very small subset of parameters. The authors show that as few as 0.01% of parameters can be “grafted” onto the original network and achieve performance that is nearly as high.

* * *

**Alignment**
=============

### **Applying Law to AI Alignment**

One problem in alignment is specification: though we may give AI systems instructions, we cannot possibly specify what they should do in all circumstances. Thus, we have to consider how our specifications will generalize in fuzzy, or out-of-distribution contexts.

The author of this paper argues that law has many desirable properties that may make it useful in informing specification. For example, the law often uses “standards”: relatively vague instructions (e.g. “act with reasonable caution at railroad crossings”; in contrast to rules like “do not exceed 30 miles per hour”) whose specifics have been developed through years of precedent. In the law, it is often necessary to consider the “spirit” behind these standards, which is exactly what we want AI systems to be able to do. This paper argues that AI systems could be construed under the fiduciary standard.

[![](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%2F742897ba-fbe3-447d-9c14-514d79064075_1600x1077.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%2F742897ba-fbe3-447d-9c14-514d79064075_1600x1077.png)

Finally, the paper conducts an empirical study on thousands of US court opinions. It finds that while the baseline GPT-3 model is unable to accurately predict court evaluations of fiduciary duty, more recent models in the GPT-3.5 series can do so with relatively high accuracy. Though legal standards will not resolve many of the most significant problems of alignment, they could improve upon current strategies of specification.

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

### **Language models can generate consensus statements for diverse groups**

[![](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%2Fc30e64ac-ef6f-4a73-a463-535987b9fab8_1600x775.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%2Fc30e64ac-ef6f-4a73-a463-535987b9fab8_1600x775.png)

We may want to take into account the interests not only of individuals but also of possibly-conflicting members of a larger group. This paper asked individuals for their opinions on political issues (e.g., “should speed limits be reduced?”) and used a language model to generate consensus statements that would be agreed on by the group at large. The participants rated AI-generated consensus statements highly, above even human-written statements. The authors don’t appear to discuss whether this could simply be due to the consensus statements being more watered down and thus less action-relevant. Still, the paper is a promising step towards aligning models with groups of humans.

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

* * *

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

### **Scaling laws for reward overoptimization**

Reinforcement learning techniques, such as those used to improve the general capabilities of language models, often optimize a model to give outputs that are rated highly by a proxy for some “gold standard.” For example, a proxy might be trained to predict how particular humans would react to an output. A difficulty, also mentioned earlier in the newsletter, is proxy gaming, where the model improves performance according to the proxy while failing to do so on the underlying gold standard (e.g., what humans would actually think).

[![](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%2F9b16d7f9-ace2-474e-b083-adc47f71b0da_1600x1105.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%2F9b16d7f9-ace2-474e-b083-adc47f71b0da_1600x1105.png)

This paper empirically studies how language models trained with reinforcement learning can over optimize proxy reward, and develops scaling laws describing this phenomenon. To do this, they use a (proxy) model as the gold standard, and build a set of proxy models that approximate that gold standard model. In addition to measuring models optimized with reinforcement learning, they find that over optimization can also happen with best-of-n sampling.

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

### **Adaptive models can be exploited by 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%2Faf65a777-1521-4afe-9a05-21c7419b4e67_1600x551.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%2Faf65a777-1521-4afe-9a05-21c7419b4e67_1600x551.png)

Many deep learning models aren’t robust to distribution shifts. One potential solution to this is test-time adaptation (TTA), where a model is modified based on the test data it sees. This paper demonstrates that TTA is subject to adversarial attacks, where malicious test data can cause predictions about clean data to be incorrect. This means that adaptive models have yet another attack surface that can potentially be exploited. The authors develop several kinds of attacks: targeted (degrade accuracy of a particular sample), indiscriminate (degrade accuracy in general), and “stealthy targeted” (degrade accuracy of a particular sample while not otherwise reducing accuracy). The attacks are conducted with projected gradient descent, and tested with the ImageNet-C dataset as the OOD dataset. The authors also find that models designed to be adversarially robust are also more robust to this attack.

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

### **Other Robustness News**

**\[**[**Link**](https://arxiv.org/abs/2302.04638)**\]** Better diffusion models can improve adversarial training when used to generate data.

**\[**[**Link**](https://arxiv.org/abs/2301.06294)**\]** Proposes a method for adapting RL policies to environments with random shocks, augmenting training with simulations of the post-shock environment.

**Systemic Safety**
===================

### **Applying Systems Safety to ML**

[![](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%2F5d5e6fbf-3446-41ba-b92f-45b526664a24_1600x287.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%2F5d5e6fbf-3446-41ba-b92f-45b526664a24_1600x287.png)

Systems safety engineering is widely used for safety analysis in many industries. The impetus for this discipline was the understanding that safety does not merely depend on the performance or reliability of individual components (e.g., ML models), but may also depend on assuring the safe interoperation of multiple systems or components (including human systems such as corporations). This paper advocates the use of systems safety engineering methods for analyzing the safety of machine learning models.

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

### **Other Systemic Safety News**

**\[**[**Link**](https://arxiv.org/abs/2302.06588)**\]** This paper proposes methods to “immunize” images against manipulation by diffusion models, potentially reducing the risk of the models being used for disinformation.

**Other Content**
=================

**\[**[**Link**](https://course.mlsafety.org/about)**\] The ML Safety course**

If you are interested in learning about cutting-edge ML Safety research in a more comprehensive way, there is now a course with lecture videos, written assignments, and programming assignments. It covers technical topics in Alignment, Monitoring, Robustness, and Systemic Safety.

**\[**[**Link**](https://www.reddit.com/r/mlsafety/)**\] ML Safety Reddit**

The ML Safety Reddit is frequently updated to include the latest papers in the field.

**\[**[**Link**](https://twitter.com/topofmlsafety)**\] Top of ML Safety Twitter**

This Twitter account tweets out papers posted on the ML Safety Reddit.