Llama-3's Emotions Can Be Steered with an Activation Vector, but Past λ=0.15 Text Loses Clarity
Researchers found activation directions for six basic emotions in Llama-3-8B and blended one of them in at every layer with a coefficient λ. Ratings from 190 people showed that disgust and fear rise from 0.8 to 4.9 and 4.8 on a scale up to 7, while at λ=0.15 the text stays understandable. Beyond that, clarity drops and neighboring emotions follow along: anger drags disgust with it.
AI-processed from Habr AI; edited by Hamidun News
Usually the emotional coloring of a model's response is set with a prompt: "answer more harshly," "write with warmth." There is another path: instead of asking the model, directly nudge its internal activations. A study by Diallo et al. (2025), published in IEEE Access, tested this approach on human raters, and the results are useful for anyone building characters, assistants, and creative tools.
How the experiment was set up
The base was Llama-3-8B, fine-tuned so that it does not resist expressing emotions. Layer-by-layer "axes" were identified in it for six Ekman emotions: anger, disgust, fear, joy, sadness, and surprise. The model was then given tasks of 19 types: write a fairy tale, compare theater and cinema, describe a family's day in the 1980s. At every transformer layer, before the response was formed, activations were shifted along the chosen axis. The size of the shift was set by a coefficient λ, which was varied from 0 to 0.35 in steps of 0.05.
The responses were rated by 190 participants on a scale from 0 to 7: how strongly each emotion was expressed and how understandable the text was.
What the results showed
Five of the six emotions grew with λ. Disgust (from 0.8 to 4.9) and fear (from 0.8 to 4.8) rose the most. For anger, joy, and sadness, the rating peaked at λ=0.30. Surprise behaved the opposite way: it fell from 1.5 to 1.2.
Emotions are not isolated. Shifting along the anger axis raised disgust from 0.7 to 2.7, sadness from 1.2 to 1.7, and fear from 1.0 to 1.5. Shifting along the disgust axis raised anger from 1.0 to 2.5. Shifting along the fear axis added sadness: from 1.2 to 2.3.
Clarity also depends on λ. At 0.15 it barely differs from the baseline: 5.7–6.1 versus 5.8–6.0. At 0.35 it drops sharply: to 2.8 for disgust, 3.2 for surprise, and 4.1 for anger and fear. Sadness and joy hold up better: 5.2–5.5. In preliminary trials, at λ above 0.35 the texts often lost coherence.
In a live example, the task "describe a family's day in the 1980s" with anger (λ=0.20) produced a story of shortage of money: children in the same clothes, the mother washing by hand, the father on edge. With joy (λ=0.30), the family happily spent the day and the children delighted in their toys. With sadness (λ=0.35), phrases such as "behind the bright colors lay a quiet struggle" appeared.
What to do with this in practice
First, this kind of control has a working range. A moderate shift gives a noticeable emotion with almost no loss in readability. If you chase the maximum, you get text that is expressive but hard to read. The value of λ will have to be tuned separately for each emotion: joy and sadness tolerate a strong shift noticeably better than disgust.
Second, you can't count on a pure "volume knob" for a single emotion. If you are building a character who should be angry but not disgusted or afraid, check side effects on real texts, not just the target metric.
Third, this method suits those who work with open weights and have access to activations. It won't work through the API of a closed model.
Limitations
The experiment was run on a single 8B-size model, and one fine-tuned specifically for expressing emotions. Whether the result transfers to other models is unclear from the material. The scales are subjective, and human ratings are averaged.
The author of the original post on Habr builds the results into his own theory of an "I-layer" and a "Luhmannian operating system" of conversations. That is his interpretation, not independently verified, and it isn't needed for the practical takeaway. The useful part here is the numbers from the experiment itself.
- Nov 12, 2026Meta* rolls out AI age checks on Instagram* worldwide: children under 13 will lose access
- Nov 12, 2026Meta brings Muse to Apple and Android watches with three ways to interact
- Nov 12, 2026Anthropic launches Claude Meetings: AI joins Google Meet and starts working on tasks right away
- Nov 12, 2026SEO Text Has Become an Attack Vector: A Research Agent Followed Someone Else's Instruction from a Website
Key Questions Answered
How the experiment was set up?
The base was Llama-3-8B, fine-tuned so that it does not resist expressing emotions. Layer-by-layer "axes" were identified in it for six Ekman emotions: anger, disgust, fear, joy, sadness, and surprise. The model was then given tasks of 19 types: write a fairy tale, compare theater and cinema, describe a family's day in the 1980s. At every transformer layer, before the response was formed, activations were shifted along the chosen axis.
What the results showed?
Five of the six emotions grew with λ. Disgust (from 0.8 to 4.9) and fear (from 0.8 to 4.8) rose the most. For anger, joy, and sadness, the rating peaked at λ=0.30. Surprise behaved the opposite way: it fell from 1.5 to 1.2. Emotions are not isolated. Shifting along the anger axis raised disgust from 0.7 to 2.7, sadness from 1.2 to 1.7, and fear from 1.0 to 1.5. Shifting along the disgust axis raised anger from 1.0 to 2.5. Shifting along the fear axis added sadness: from 1.2 to 2.3. Clarity also depends on λ.
What to do with this in practice?
First, this kind of control has a working range. A moderate shift gives a noticeable emotion with almost no loss in readability. If you chase the maximum, you get text that is expressive but hard to read. The value of λ will have to be tuned separately for each emotion: joy and sadness tolerate a strong shift noticeably better than disgust. Second, you can't count on a pure "volume knob" for a single emotion.
Test Frontier LLMs & Autonomous Agents in One Workspace
Run Claude Opus 5.5, GPT-6, Gemini 3.1, and DeepSeek side-by-side in Nomad AI (nomadnet.ai) — unified model routing, deep research, and multimodal workflows under one subscription.
The AI world, distilled — once a week
Seven stories that actually mattered, hand-picked. No noise, no reposts, no press releases.
Done! Check your inbox for a confirmation.