Source-linked AI summary

Some Emotions Run Deeper: Layer-wise Probing and Causal Intervention in Large Language Models

Tian Fang, Gaël Guibon, Davide Buscaldi

arXiv:2609.01279v1cs.CLcs.AI

TL;DR

The paper examines whether emotion has a fixed layer-wise location in decoder-only LLMs or varies with text source. It combines layer-wise probing with intervention, transfer, and early-exit analyses, finding systematic source-dependent depth and useful probe-selected bands.

  • Problem

    Prior layer-wise emotion analyses often use one corpus, leaving unclear whether emotion-accessible depth is a model property or also depends on text source.

  • Method

    The study evaluates eight 1B–9B Llama, Qwen, and Granite models on Twitter, Reddit, and autobiographical emotion corpora using probing, interventions, transfer, and early-exit readout.

  • Results

    Emotion depth shifts from input-adjacent layers to over half model depth across corpora, while probe-selected bands support stronger intervention disruption and better early-exit readout.

  • Takeaways & Limitations

    Affective information is localizable and reusable, but its depth and generalizability depend on text style, model family, and decoding setting.

  • Takeaways & Limitations

    The main experiments freeze model parameters and use deterministic pooling with linear probes, so results concern information already available in pretrained representations rather than fine-tuned performance.

Abstract

from arXiv · show

Emotion is expressed in text along a wide spectrum, from surface lexical cues to inferences entangled with content. Most layer-wise analyses of emotion in LLMs use a single corpus, leaving open whether the depth at which emotion becomes accessible is a property of the model or also of the text source. We investigate this across three datasets spanning different degrees of explicitness and contextualization in emotion expression (Twitter posts, Reddit comments, and autobiographical narratives) and eight 1B--9B open-weight LLMs from the Llama, Qwen, and Granite families. We combine layer-wise probing with offline feature scaling and online forward interventions, transfer analyses, and an early-exit classifier. We find that (i) the best probing layer shifts systematically across corpora, from input-adjacent layers to over half model depth, and this ordering persists after matching label-by-length-bin distributions; (ii) across the evaluated settings, forward-pass interventions on probe-selected bands reduce test accuracy by 5--6 points more than same-width random bands ($q < 0.01$); (iii) selected bands transfer across datasets and emotion categories, suggesting partially shared affective information rather than strictly per-emotion substrates; and (iv) probe-selected early-exit representations outperform full-depth exits by $6.9$ percentage points on average.

1 Introduction

The paper asks whether emotion becomes accessible at a fixed model depth or varies with text source, and combines probing with interventions, transfer, and early-exit analyses to test this.

  • The study analyzes eight 1B–9B open-weight LLMs from the Llama, Qwen, and Granite families across three stylistically different emotion corpora.
  • The pipeline localizes emotion-sensitive layer bands with layer-wise probing, then evaluates them using online intervention, offline feature scaling, transfer analyses, and early-exit classification.
  • Emotion depth varies systematically by dataset source: Emotion/CARER peaks near input-adjacent layers, GoEmotions is intermediate and diffuse, and ISEAR peaks much deeper.
  • Probe-selected bands disrupt prediction more than same-width unrelated controls under online intervention, indicating functional relevance beyond probe decodability.
  • Selected early exits outperform, on average, full-depth and several control exits under the same linear-probe protocol.

2 Related Work

Prior work establishes emotion benchmarking, layer-wise probing, and early-exit efficiency, while this paper connects these traditions by testing layer bands across datasets.

  • Emotion-understanding benchmarks mainly characterize what LLMs predict, whereas this work studies how emotion-related predictions arise from internal representations.
  • Layer-wise probing is used to analyze information encoded in intermediate neural language-model representations, with simple linear probes intended to limit probe-capacity effects.
  • Early-exit methods halt computation at intermediate layers for easier inputs, trading accuracy for compute; SENTRILLAMA applies this idea to emotion classification at one probe-identified layer.
  • The experimental pipeline localizes emotion-sensitive bands with probing and evaluates them through intervention, feature scaling, transfer, and early-exit classification.
  • This paper extends single-layer early exit by comparing contiguous layer bands of varying width and evaluating cross-dataset transfer of selected bands.

3 Preliminaries

The study standardizes a four-emotion subset across three corpora and uses frozen open-weight models with fixed pooling and linear-probe settings for comparable analyses.

  • Datasets: The datasets are Twitter Emotion, autobiographical ISEAR narratives, and Reddit GoEmotions comments, restricted to fear, joy, anger, and sadness.
  • Datasets: Dataset splits are stratified, using 80/10/10 for Emotion and ISEAR and 70/15/15 for GoEmotions.
  • Models: The model set comprises Llama, Qwen, and Granite families, spanning 1B–9B parameters.
  • Pooling and probing: Main analyses use fixed concat(mean, max, min) pooling with a StandardScaler–LogisticRegression pipeline after a validation-only pilot.
  • Pooling and probing: A learned attention-pooling baseline was more sensitive to layer, seed, and optimization settings, with some deeper-layer runs reaching zero validation F1.

4 Where and How do emotions reside in LLMs?

Layer-wise probing shows that emotion decodability is organized differently across datasets, with both peak depth and signal concentration changing with text source.

  • Emotion peaks near the input, GoEmotions is intermediate and diffuse, and ISEAR peaks deep in the model.Mean best relative depths are 0.066 for Emotion, 0.219 for GoEmotions, and 0.590 for ISEAR; the ordering persists after length matching.
  • The same ordering persists on length-matched subsets, with mean best relative depths of 0.131, 0.288, and 0.642 for Emotion, GoEmotions, and ISEAR.
  • Emotion has sharply concentrated signal, GoEmotions has diffuse signal, and ISEAR is later with moderate breadth.Near-peak layers span 0.073 normalized depth for Emotion, 0.316 for GoEmotions, and 0.193 for ISEAR.
  • Joy is the most consistently decodable emotion, while sadness is usually hardest across the evaluated datasets and model contexts.
  • Four-class best depth strongly agrees with mean one-vs-rest best depth across 24 dataset–model pairs, with r = 0.85.

5 Causal Intervention on Emotion-Sensitive Layer Bands

The paper tests whether probe-selected emotion-sensitive layer bands affect downstream emotion readout by intervening during forward computation and by scaling cached representations. Online interventions show stronger selected-band specificity than unrelated controls, while transfer analyses indicate partially shared affective structure across datasets and emotions.

  • 5.1 Setup: Selected bands are compared with same-width transfer, unrelated, and unmodified conditions using α values of 0.0, 0.5, and 1.5.α = 0 removes the band, α = 0.5 attenuates it, and α = 1.5 amplifies it; test-set predictions are evaluated with paired correctness contrasts.
  • 5.2 Online intervention: main effect and specificity: −6.1 percentage points overall: online scaling of selected bands is more disruptive than scaling unrelated same-width bands.Across 768 forward settings, selected-band scaling reduces accuracy by −26.6 points relative to baseline, compared with −20.5 points for unrelated bands.
  • 5.2 Online intervention: main effect and specificity: −1.2 points, n.s.: own-dataset and cross-dataset selected bands produce nearly the same disruption, while transfer remains more disruptive than unrelated bands by −4.9 points.The probe–band transfer control shows the own–transfer difference is approximately −1.2 points under either probe, with a negligible interaction of −0.06 points.
  • 5.2 Online intervention: main effect and specificity: −7.8 points for Llama and −9.3 points for Qwen: specificity is strongest in those families, whereas Granite shows +1.2 points, n.s.Dataset patterns also differ: Emotion shows −7.7 points, while ISEAR shows −4.5 points and less stable specificity; transfer-vs-unrelated is strongest on ISEAR at −12.2 points.
  • 5.3 Offline feature scaling: −0.8 points, not reliable: offline selected-vs-unrelated specificity is much weaker than online specificity despite substantial disruption relative to baseline.Offline own-band scaling reduces accuracy by −12.2 points, while unrelated and low-sensitivity bands reduce it by −11.3 and −10.8 points.
  • 5.3 Offline feature scaling: −15.2 versus −15.9 points at α = 0: cross-emotion transfer is almost as disruptive as scaling the own-emotion band.The exploratory pattern suggests selected bands encode shared affective structure rather than completely emotion-specific modules.

6 Early Exit from Emotion-Sensitive Bands

Probe-selected emotion-sensitive bands can support early-exit classification with higher accuracy than full-depth representations, while transfer and gains vary by dataset, bandwidth, and model family.

  • Setup: The early-exit setup trains a separate 4-class multinomial logistic-regression head on pooled representations from each candidate layer band.The forward pass stops after the band’s final layer, while the full-depth control runs the complete transformer.
  • Selected early exits outperform full-depth representations by +6.9 accuracy points overall (q < 0.001).They also outperform random bands (+3.7), low-sensitivity bands (+8.2), and transferred bands (+6.6), all with q < 0.001.
  • Bandwidth: Width 1 gives the largest selected-vs-full-depth gain (+7.8 points), while width 3 is weakest (+5.9) and width 4 partially recovers (+6.5).Narrow bands can capture concentrated emotion cues, whereas wider bands add capacity with diminishing returns when cues are distributed.
  • Early-exit transfer: Transferred bands roughly match full depth overall (+0.3 points, n.s.) but remain below target-selected exits by 6.6 points.Transfer exits help on Emotion relative to full depth (+3.7 points) but hurt on ISEAR (−3.2 points).
  • Frozen-encoder comparison: Selected LLM exits outperform frozen RoBERTa by +15.8 points and frozen DeBERTa by +21.5 points overall.The comparison uses frozen representations and the same logistic-regression protocol.
  • Moderators: Selected-vs-full-depth gain is +11.3 points on Emotion but only +2.5 on ISEAR; Granite gains +8.8, Llama +6.9, and Qwen +5.5.Dataset selection is the strongest moderator, followed by model family.

7 Discussion

Emotion-sensitive information is localizable for intervention and early readout, but its layer depth varies with dataset style and with the readout question being asked.

  • The best emotion layers shift from input-adjacent layers for short posts to much deeper layers for autobiographical narratives.GoEmotions falls between these cases with a broader, less sharply localized profile.
  • Perturbing probe-selected bands disrupts downstream prediction more than matched unrelated bands, whereas offline scaling is less specific.This distinguishes diagnostic decodability from functional involvement during the forward computation.
  • Some intermediate bands are better lightweight-classifier readout points than the final layer.Thus decodability, causal involvement, and readout usefulness are distinct questions.
  • Emotion-sensitive bands transfer across datasets and emotion categories, but early-exit transfer is weaker than intervention transfer.Intervention tests whether a region matters during computation, while early exit tests whether a trained classifier can use it effectively.
  • Future analyses should report dataset source, model family, layer-selection criterion, and readout mechanism alongside emotion decodability.

8 Conclusion

Across models and datasets, emotion is not confined to a universal shallow layer; its depth and breadth vary with text style, while selected bands support causal perturbation and compact readout.

  • Emotion information is not uniformly shallow or located in a single universal layer across models and datasets.Its depth and breadth vary systematically with dataset style and model family.
  • Selected bands can be causally perturbed through forward intervention and reused as compact early-exit representations.Their cross-dataset and cross-emotion transfer suggests shared affect-sensitive regions rather than isolated label-specific modules.
  • Emotion representation is a depth-sensitive and context-dependent property of pretrained LLMs, not a fixed architectural fact.This view helps explain why prior layer-wise analyses can disagree across datasets.

Limitations

The study’s conclusions are bounded by its English, largely Western datasets; limited open-weight model range; frozen linear-probe design; coarse interventions; and several statistical and finding-level caveats.

  • Dataset and language scope: Three English, largely Western corpora cover only fear, joy, anger, and sadness, limiting generalization across languages, cultures, and finer-grained taxonomies.Other emotions, including surprise, disgust, shame, guilt, and love, are excluded.
  • Model scope: The eight evaluated models are open-weight Llama, Qwen, and Granite checkpoints spanning 1B–9B parameters, excluding closed-weight, non-instruction-tuned, and much larger open models.Model-family and scale patterns are descriptive within this range, not universal claims about decoder-only LLMs.
  • Methodological choices: Frozen parameters, deterministic pooling, linear probes, and contiguous layer-band interventions prioritize representation localization but may miss effects of fine-tuning or finer-grained causal methods.The authors note that learnable attention pooling can achieve higher absolute F1 in pilot runs, while finer-grained interventions could localize computation more precisely.
  • Finding-level caveats: Forward specificity is significant for Llama and Qwen but not Granite, while early-exit width effects are non-monotonic and their selectivity–capacity explanation remains exploratory.Source-train transfer supports, but does not prove, a classifier–band alignment hypothesis.
  • Statistical and reproducibility caveats: Aggregate comparisons use within-family multiple-testing correction but not more conservative family-wise correction across every paper comparison, and ISEAR reproducibility depends on a community-uploaded source.The study reports bootstrap intervals, sign tests, Wilcoxon tests, and BH-FDR correction within comparison families.

A Dataset Statistics and Corpus-Cue Diagnostics

The three corpora differ in source, elicitation, length, and surface-cue profiles; matched diagnostics show no single monotonic continuum of cue explicitness.

  • Corpus-cue diagnostics: The matched diagnostic subsets contain 1,909 training examples per dataset and are macro-averaged across the four target emotions.Matching is performed by label and length bin to make cue rates comparable.
  • Operational definitions: The diagnostics define exact-label presence, lexicon coverage, and first-person feel-form frames using token and pattern rules applied to the matched subsets.The exact-label indicator requires the gold-label token; the lexicon indicator uses hand-specified target-emotion lexicons.
  • Corpus-cue diagnostics: Exact-label mentions increase from Emotion to ISEAR, while emotion-lexicon coverage peaks for GoEmotions and first-person feel/felt frames are most frequent in Emotion.These diagnostics are descriptive string-pattern proxies rather than linguistic annotations.

B Pooling and Probe Selection Pilot

The pilot fixes deterministic concat pooling and logistic regression for the main analyses, while supplementary checks examine instability, depth profiles, and probe consistency.

  • Pooling selection: Concat(mean, max, min) is selected as the strongest non-parametric pooling option, outperforming last-token by 24–35 F1 points and mean by 2–8 points.The comparison uses Llama-3.2-3B-Instruct, a linear SVM, and the Emotion validation split.
  • Pooling selection: Concat remains stronger than max and min in the ablation and leads mean and last-token pooling on Qwen fear, with F1 values 0.822, 0.795, and 0.536 respectively.The Qwen sanity check uses Qwen-3.5-4B.
  • Probe selection: Logistic regression is adopted as the fixed probe because it is strongest or within 0.01 F1 of the best across the four emotions and is simpler and more stable than the MLP.A Qwen fear sanity check also ranks logistic regression first: 0.847 versus 0.843 for SVM and 0.832 for MLP.
  • Learned pooling verification: Learned attention pooling is unstable: training collapses in 10 of 24 layer–emotion cells, with mean F1 0.51 versus 0.85 for concat.Cherry-picking the best layer and weight decay reaches mean F1 0.96, but this requires screening or retries impractical at main-experiment scale.
  • Probe consistency: Across 24 dataset–model pairs, four-class and one-vs-rest best depths correlate at r = 0.85, with 87.5% of four-class layers inside the one-vs-rest ranges.This supports one-vs-rest probes for target-specific band selection.
  • Intervention analyses: Online forward interventions provide stronger causal evidence than offline scaling, whose main disruption direction is reliable but selected-band specificity is weak.The forward master includes 768 matched settings; both analyses use paired correctness contrasts and BH-FDR correction within comparison families.

G Joint Probe and Layer-Band Transfer

Joint transfer analyses test whether selected layer bands remain useful when probes and bands come from different datasets, while early-exit analyses compare selected bands with full-depth and random controls.

  • Evaluation scope: The transfer and early-exit analyses include cross-dataset and cross-emotion settings, using matched predictions and correction within comparison families.Cross-emotion results are organized with target probes as rows and source-band emotions as columns.
  • Transfer design: The 2×2 transfer control independently varies probe-training dataset and intervened band, evaluating both probes on the target test set.The design is run for online forward intervention and offline cached-feature intervention across matched settings.
  • Cross-dataset transfer: Source-trained probes reduce unmodified target-test accuracy to approximately 71.9% online and 70.7% offline, versus 88.9% for target-trained probes.This demonstrates a cross-dataset readout cost while preserving the transfer comparison.
  • Cross-dataset transfer: Own and transferred bands remain similarly disruptive under both probes, and probe-by-band interactions are not retained after model-clustered analysis.The joint results support partial sharing of emotion-sensitive layer locations rather than dataset-invariant decision boundaries.
  • Early exit: Early-exit selected bands outperform both full-depth and random controls at every tested width, with the largest gain at width 1.The table reports accuracy-point differences, with positive values indicating the first condition is more accurate.
Loading 2609.01279v1…