Cross-Lingual Function Vectors Recover Emotion Classification From 0.6 to 50.2 F1

Cross-lingual Functional Vectors for Emotion Detection in Large Language Models

Jieying Xue, Phuong Minh Nguyen, Minh Le Nguyen, Shogo Okada

EMNLP 2026

cs.CL, cs.LG

2026-08-30

JAIST shows function vectors transfer across languages on multi-label emotion: English Macro-F1 rises from 0.6 to 50.2 under perturbed zero-shot prompts, Chinese from 0 to 42.7.

What problem this solves

Function vectors (FVs), from Todd et al., are a steering trick: pull a task direction out of in-context demonstrations, add it back into the residual stream, and the model does the task with no demonstrations at inference. The original work mostly tested tidy English tasks such as extraction and simple classification. On messier semantic jobs like sentiment, FVs looked weak. Cross-lingual, multi-label transfer was largely untested.

This JAIST paper uses SemEval-2025 Task 11 multi-label emotion recognition as a stress test. Two questions: can FVs handle semantic classification that needs contextual disambiguation, and can a direction extracted in one language recover the task in another, with no target-language demonstrations. They can. Cross-lingual transfer sometimes beats same-language extraction.

Method

Extraction follows Todd's causal mediation recipe. A simple extractive task, ConceptVObject5, ranks attention heads by average indirect effect (AIE), the recovery you get by patching a head's activation to its clean mean on shuffled-label prompts. Those heads are treated as shared across tasks. The emotion FV is then the sum of those heads' mean last-token activations on clean 5-shot emotion prompts in the source language. At inference the vector is added to the residual stream. Intervention layers are also chosen by AIE and usually span several layers, not one. Single-layer steering was already known to fail on sentiment; spreading heads across layers is the intended fix.

Evaluation uses English, German, Chinese, Spanish, and Russian, with multi-label tags joy, sadness, fear, anger, surprise, and disgust. Models are Qwen3-8B and Llama-3.1-8B-Instruct, five random seeds. Zero-shot scoring looks at the first greedy token. Few-shot allows up to 10 new tokens.

Two zero-shot prompts separate instruction following from the vector itself. A clean prompt states the task and the emotion inventory. A perturbed prompt mixes in distractor labels such as colors and countries. If the model is only reading the instruction, it emits yellow or The man. FVs are injected at inference with no extra demonstrations.

Results

On clean zero-shot, Qwen3-8B without FVs scores Macro-F1 36.4 (EN), 16.9 (DE), 18.4 (ZH), 41.4 (ES), 52.5 (RU). With an English 20-head FV those become 53.7, 44.1, 44.2, 62.4, 72.1. German is the largest jump, 16.9 to 44.1. Other source languages land in the same band; Spanish-to-English reaches 54.4, slightly above English-to-English at 53.7.

The perturbed setting is the sharper test:

FV sourceENDEZHESRU
no FV0.60.50.08.01.8
English48.638.241.451.858.9
Spanish50.237.842.254.060.3
Russian49.439.242.753.964.6

Without FVs the model is near chance. With FVs it returns to a usable range. In one case study the unsteered model labels a fear sentence yellow; the steered model returns fear. Llama follows the same pattern. Clean Chinese rises from 12.7 into the low thirties. Perturbed Llama without FVs does not collapse as hard as Qwen, and injection still adds about twenty to thirty points.

Few-shot is already strong (66.6 English), and FVs are a patch, not a replacement: same-language English gains about +1.0, and Spanish demonstrations plus FVs lift Russian from 73.9 to 78.4. PAI and JNLP, which ensemble fine-tuned Qwen 32B models, still sit in the 80s. An 8B with a vector does not close that gap. Pairwise cosine similarity of FVs across source languages is 0.94–0.96 on Qwen3-8B and 0.85–0.93 on Llama. Gains plateau around six heads on Qwen, and that plateau is stable across language pairs.

Why it matters

For multilingual classification without packing demonstrations into every prompt, FVs are a cheap intervention: extract once from source-language 5-shot, add the vector at inference, context length unchanged. Cross-lingual transfer suggests a task direction, not a lexical fingerprint of one language. Once heads and layers are calibrated on a model, swapping the source language does not require a new search. That is useful in production.

They do not replace few-shot prompting, and they do not replace fine-tuning a larger model. The fit is zero-shot under messy prompts, scarce target-language demos, and an 8B latency budget.

Limitations

The authors list three. Co-occurrence among emotion labels is not modeled, so it is unknown whether FVs encode that anger often arrives with disgust. The study stops at classification; long-form generation such as translation is untested, and they warn that steering every step of a long sequence may scramble the latent space. Generation quality is outside the protocol.

A few experimental choices also leak optimism. Zero-shot scoring uses only the first token, while a multi-label answer is a list. Head selection comes from a simple English extractive task and is reused for emotion and for other languages; the paper offers AIE ranks and cosine similarity, not a causal account of why that reuse works. The few-shot table is not uniformly up: German-source FVs on English drop 61.6 to 60.2, so consistent improvement is a stretch. The gap to 32B ensembles is waved off as a small-model win; the numeric gap is still large.

Terms

Source

Related papers

All paper explainers