Do Language Models Follow the Rules They Say They Follow?
| Type | Status | Published | Supervisors | |
| MA, MAP | Open | 26 November 2026 | Nasim Nezhadsistani |
nezhadsistani@ifi.uzh.ch |
When a language model explains its reasoning step by step, it is tempting to treat that explanation as an account of how the answer was reached. But explanations can be unfaithful. Turpin et al. showed that adding irrelevant cues to a prompt can cut accuracy by up to 36% on BIG-Bench Hard tasks, while the model's explanations rarely mention the cue [1]. Lanham et al. tested whether the written reasoning actually matters by editing or truncating it. They found that its causal role varies widely across tasks and models [2].
These studies look only at the model's outputs. This project asks whether the model's internal activity provides additional evidence. You will build a small benchmark of simple tasks with known, explicit rules, such as arithmetic parity or rule-based symbol classification. The examples come in matched pairs that differ in exactly one rule-relevant detail. Because the correct rule is known, you can check whether the model's answers, explanations and internal representations all follow it.
You will:
- measure output-level faithfulness: whether the explanation mentions the rule, whether answers stay stable under irrelevant edits, and whether they flip under relevant ones;
- use activation patching to locate which layers and token positions carry the rule, following established best practices [3];
- test whether these internal signals help predict when an explanation does not match the rule actually used.
The work uses open models of 1–4B parameters, with optional exploration of pretrained Gemma Scope features [4].
You will learn: mechanistic interpretability, causal intervention methods, benchmark design, and careful statistical evaluation.
Prerequisites: PyTorch, transformer basics, statistics and experimental design. One 16–24 GB GPU is sufficient.
Key terms
- Chain of thought (CoT): the step-by-step reasoning a model writes before giving its answer.
- Faithfulness: whether an explanation reflects the reasons that actually produced the answer, rather than a plausible-sounding story [1, 2].
- Matched pairs: two inputs that are identical except for one detail that changes the correct answer under the rule. Comparing them isolates the effect of that single detail.
- Rule-preserving edit: a change to the input that should not affect the answer, such as different wording. A model that follows the rule should give the same answer.
- Residual stream: the main internal channel in a transformer through which information passes from layer to layer.
- Activation patching: running the model on one input while swapping in internal activations recorded from its matched pair, then measuring how the answer changes. A large change shows that this layer and position carry information the answer depends on [3].
- Logit difference: how strongly the model prefers the correct answer over the alternative. It is the standard measure of an intervention's effect [3].
- Sparse autoencoder (SAE) features: learned components that break a model's activations into more interpretable units. Gemma Scope provides pretrained SAEs for Gemma models [4].
References
- Turpin, M. et al. (2023). Language Models Don't Always Say What They Think: Unfaithful Explanations in Chain-of-Thought Prompting. NeurIPS 2023.
- Lanham, T. et al. (2023). Measuring Faithfulness in Chain-of-Thought Reasoning. arXiv:2307.13702.
- Zhang, F. & Nanda, N. (2024). Towards Best Practices of Activation Patching in Language Models: Metrics and Methods. ICLR 2024.
- Google DeepMind (2024). Gemma Scope: open sparse autoencoders for Gemma.
Prerequisites
| Area | Requirements |
|---|---|
| Programming | Good Python programming skills and familiarity with Git and GitHub. |
| Machine Learning | Fundamental knowledge of machine learning, neural networks, and model evaluation. |
| LLMs | Basic understanding of Transformers, and Large Language Models. |
| Software Development | Ability to design and implement modular Python applications and work with existing open-source repositories. |
| Research Skills | Ability to read scientific papers, reproduce experimental results, analyze findings, and write technical documentation in English. |