arXiv:2610.37157cs.CLOct 2026

Manuscript Offprint

arXiv:2610.37157

What Survives Distillation? A Mechanistic Interpretability Study of GPT-2 and DistilGPT-2

Nabeelah Faumi, Deshan Sumanathilaka

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Knowledge distillation compresses large language models into compact students that preserve aggregate metrics, yet the mechanistic consequences of depth-reduction distillation remain largely uncharacterized. This work applies linear CKA, logit lens analysis, attention pattern decomposition, sparse autoencoder feature statistics, and activation patching to compare GPT-2 and its six-layer student DistilGPT-2 across two canonical circuits: the Indirect Object Identification (IOI) circuit and the Greater-Than (GT) circuit. The results reveal a compression-collapse dichotomy: the IOI circuit suffers complete mechanistic collapse (DistilGPT-2: 35.2% accuracy vs. 94.8%, zero name-mover preservation), while the GT circuit survives with 87.7% task performance recovery through active remapping of the teacher's layer-9 comparison head into student layer 4 (mean Pearson r = 0.945). These findings demonstrate that circuit compressibility governs mechanistic survival under distillation, and that aggregate metrics are insufficient diagnostics for circuit integrity.

1 Introduction

Large language models (LLMs) exhibit remarkable capabilities, but their sheer scale poses significant computational challenges for deployment. Knowledge distillation trains a compact student on soft targets from a larger teacher, enabling compression while mimicking the teacher's generalization (Hinton et al., 2015). While distillation often successfully preserves aggregate metrics like validation perplexity, it remains an open question how severe architectural truncation affects the precise, underlying algorithms the model has learned. Prior work establishes that compression can degrade circuit integrity and alter feature representations (Lindner et al., 2023; Bereska and Gavves, 2024), but the specific mechanistic consequences of distillation-induced depth reduction remain largely uncharacterized. Mechanistic interpretability provides a framework for addressing this blind spot by reverse-engineering neural networks into human-understandable computational subgraphs, known as circuits (Elhage et al., 2021; Olah et al., 2020).

This work investigates the mechanistic impact of depth-reduction distillation. It focuses on DistilGPT-2 (Sanh et al., 2019), a 6-layer student distilled from the 12-layer GPT-2 teacher (Radford et al., 2019). This drastic depth reduction poses a critical structural challenge: many well-documented higher-order reasoning behaviors in GPT-2 depend crucially on late-layer interactions. For example, both the Indirect Object Identification (IOI) circuit (Wang et al., 2022) and the Greater-Than (GT) circuit (Hanna et al., 2023) rely heavily on highly specialized attention heads located in layers 9-11. Because the student model is only 6 layers deep, these components have no direct structural counterpart. This raises two central research questions: do the internal representations of DistilGPT-2 remain similar to those of GPT-2 after depth halving (RQ1), and does distillation preserve the computational circuits responsible for higher-order reasoning, and if so, how does the student compensate for the absence of essential upper-layer components (RQ2).

To answer this, a suite of representational and causal probes, including representational similarity analysis, direct logit attribution (Elhage et al., 2022), and activation patching (Meng et al., 2022), is applied to track circuit preservation across the distillation gap. A natural question is whether circuit preservation matters at all if task performance is maintained. We argue it does, for two reasons. First, the IOI and GT circuits are among the most causally validated subgraphs in any language model, established through convergent evidence from activation patching, path patching, and direct logit attribution across independent studies (Wang et al., 2022; Hanna et al., 2023); they are not arbi-trary correlational subgraphs but confirmed computational mechanisms. Second, and more critically, the IOI result we report is not a performance degradation but a sign reversal: DistilGPT-2 achieves a negative mean logit difference (−0.467)(-0.467), meaning the model is actively misled rather than merely uncertain, failure mode entirely invisible to aggregate metrics, the core motivation for circuit-level analysis.

We find a striking dichotomy in how different computational mechanisms survive depth halving. One circuit collapses entirely, the other is actively remapped into the student’s shallower stack, detailed in §5 and §6. By contrasting a circuit that collapses with one that compresses, this sheds light on the inductive biases of the distillation process.

The main contributions are as follows:

• Provide a comprehensive, circuit-level analysis comparing a depth-distilled model to its teacher, quantifying the mechanistic impact of structural truncation.

• Demonstrate that complex, multi-stage computational pipelines (such as the IOI circuit) fail to survive standard distillation when critical late-layer components are excised.

• Discover that the student model can successfully compress and remap specific cognitive algorithms (such as the GT circuit), migrating late-layer mechanisms into its available upper layers to preserve task functionality.

In the following sections, we review related work, outline our experimental setup, present our results, and conclude with a discussion and conclusion.

References (15)