Manuscript Offprint
arXiv:2608.29613Cross-lingual Functional Vectors for Emotion Detection in Large Language Models
Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.
Abstract
Function vectors (FVs) have recently emerged as a promising mechanism for steering the behavior of large language models (LLMs) by injecting task-specific latent direction representations derived from in-context demonstrations. While prior studies have shown that FVs can recover task behavior in structured in-context learning settings, their effectiveness on semantically complex tasks and their ability to generalize across languages remain underexplored. We investigate the cross-lingual transferability of FVs using multilingual multi-label emotion recognition as a challenging semantic classification benchmark. Specifically, we examine whether FVs extracted from a source language can steer task behavior in another language under both standard clean and perturbed zero-shot settings without providing demonstrations during inference. Across diverse cross-lingual settings, applying FVs substantially improves performance, suggesting that FVs capture language-agnostic, task-relevant signals rather than purely language-specific lexical patterns, and highlighting their potential as a lightweight and transferable mechanism for multilingual task adaptation. We observe that each LLM exhibits a relatively stable optimal range of attention heads for constructing effective FVs, and the pattern remains consistent across languages. In addition, FVs can partially replicate the task-steering effects of standard few-shot in-context learning while avoiding the computational overhead of processing multiple demonstrations, making them effective for large-scale practical applications. Our code is available at https://github.com/yingjie7/cross_lingual_fvs.
1 Introduction
Large language models (LLMs) exhibit remarkable in-context learning (ICL) abilities, enabling them to perform new tasks from only a few demonstrations without parameter updates (Brown et al., 2020; Adcock et al., 2026; Yang et al., 2025; Singh et al., 2025). Recent studies suggest that this capability is partially encoded in latent activation patterns within the LLMs. In particular, function vectors (FVs) have been proposed as latent task representations that steer model behavior through activation interventions at intermediate layers of LLMs (Todd et al., 2024). Existing studies have demonstrated the effectiveness of FVs on relatively constrained tasks, such as simple classification, retrieval, and factual induction (Todd et al., 2024). However, whether FVs remain effective for semantically complex tasks that require richer contextual understanding and reasoning remains largely unexplored. Therefore, this work investigates FVs using multilingual multi-label emotion recognition as a challenging semantic classification benchmark. Unlike the relatively simple tasks considered in previous work, multilingual emotion recognition requires implicit intention understanding, and the disambiguation of subtle affective expressions across substantial linguistic variation (Muhammad et al., 2025; Belay et al., 2024). This task provides a challenging testbed for evaluating whether FVs encode transferable task-level representations beyond relatively simple pattern matching.
Beyond task complexity, we further investigate the cross-lingual transferability of FVs. Prior studies have shown that multilingual LLMs exhibit partially shared language-agnostic latent representations across languages (Zhang et al., 2024; Zeng et al., 2025; Bandarkar et al., 2025), while other work suggests that these representations may remain biased toward English-centered latent structures (Zhao et al., 2024; Wendler et al., 2024; Schut et al., 2025; Tezuka and Inoue, 2025). These observations naturally raise an important question: Do FVs encode language-specific behaviors, or transferable task-level representations that generalize across languages? If the latter is true, FVs extracted from one language should be able to re-cover and transfer task behavior to other languages without requiring target-language demonstrations during inference.
To answer this question, we conduct a comprehensive study of FVs under both zero-shot and few-shot prompting settings. In the zero-shot setup, we evaluate FVs under both standard clean prompts and a perturbed zero-shot setting. The perturbed setting introduces controlled distractor labels into the prompt, allowing us to isolate the task-steering effect of FVs and evaluate whether cross-lingual FVs can recover the intended task behavior despite misleading contextual information. Experimental results demonstrate that FVs extracted from one language can be effectively transferred to multiple target languages, and are able to steer task behavior under both clean and perturbed zero-shot conditions. We further investigate whether FVs provide complementary task representations under multilingual few-shot prompting. Specifically, FVs are injected into the induction heads of LLMs during inference and shared across languages. While FVs do not completely replace the benefits of standard few-shot ICL, they consistently enhance multilingual few-shot performance and partially reproduce the task-steering effects without requiring additional demonstrations during inference. Moreover, we observe that each LLM exhibits a relatively stable range of attention heads for constructing effective FVs, and that this pattern remains consistent across languages. Overall, our findings suggest that FVs encode transferable task-level representations that are less dependent on language-specific lexical patterns, highlighting their potential as an efficient and transferable mechanism for multilingual task adaptation. Our contributions are summarized as follows:
• We extend FV evaluation from relatively constrained tasks to a semantically complex multilingual setting. We show that FVs remain effective on tasks requiring contextual semantic reasoning, suggesting that the limitations observed in prior work are not inherent to FVs themselves.
• We provide a systematic analysis of FV intervention across transformer layers and show that distributing FV interventions across multiple layers substantially outperforms single-layer intervention, offering a practical strategy for applying FVs to complex semantic tasks.
• We present the first systematic study of cross-lingual FVs for multilingual semantic classification, demonstrating effective task transfer under both standard clean and controlled perturbed zero-shot prompting.
• We analyze the stability of attention-head selection for FVs across languages and find that each LLM exhibits a stable range of attention heads for constructing effective FVs, and that this pattern remains consistent across languages.
• We demonstrate that cross-lingual FVs complement multilingual few-shot prompting. Although they do not fully replace standard few-shot ICL, cross-lingual FVs consistently improve multilingual few-shot performance and partially reproduce the task-steering effects of in-context learning without requiring additional demonstrations during inference.
2.1 FVs and Mechanistic Interpretability
Recent studies on ICL suggest that task behavior in LLMs may be partially encoded in internal activation patterns rather than solely induced by surface-level prompts (Todd et al., 2024; Hendel et al., 2023; Wang et al., 2023b; Guo et al., 2024; Liu et al., 2023). In particular, prior work interprets ICL as constructing latent task representations from demonstrations (Hendel et al., 2023), while other studies analyze how task-relevant information propagates through models from an information-flow perspective (Wang et al., 2023b). Within the growing field of mechanistic interpretability, FVs have been proposed as compact latent representations that capture task-inducing signals in LLMs (Todd et al., 2024). These studies demonstrate that injecting FVs into intermediate layers can steer model behavior toward task-consistent outputs, even under zero-shot settings, and that only a small subset of attention heads plays a critical role in transporting task-relevant information. Related approaches, such as in-context vectors (ICVs) (Liu et al., 2023), similarly manipulate hidden representations extracted from demonstrations to guide model behavior. However, existing studies primarily evaluate FVs and related steering methods on relatively structured monolingual tasks. Prior work reported limited effectiveness of FVs on semantically complex tasks, such as sentiment analysis.
and synonym prediction, where task boundaries are less structurally explicit (Todd et al., 2024). Consequently, whether FVs remain effective for multilingual semantic classification tasks requiring richer contextual reasoning and cross-lingual semantic understanding remains largely unexplored.
2.2 Cross-lingual Representation in LLMs
Understanding how multilingual LLMs represent and transfer knowledge across languages has become an important research direction. Prior work suggests that multilingual LLMs learn partially shared latent representations across languages while preserving language-specific characteristics (Qin et al., 2025; Zhang et al., 2024; Zeng et al., 2025; Bandarkar et al., 2025). Other studies further show that multilingual reasoning may rely on shared latent representations, whereas language-specific generation behavior tends to emerge in later transformer layers (Zhao et al., 2024; Wendler et al., 2024; Schut et al., 2025; Tezuka and Inoue, 2025). From a mechanistic perspective, recent studies have begun to analyze multilingual capabilities at the level of internal activations. For example, Cross-Lingual Activation Steering (CLAS) demonstrates that selectively modulating neuron activations can improve multilingual performance without updating model parameters (Pokharel et al., 2026). Likewise, prior work shows that both language-specific and language-general attention heads contribute to multilingual processing, suggesting that multilingual behavior is partially localized within model internals (Liu et al., 2026). Despite these advances, existing studies mainly investigate language-level representations or multilingual reasoning as a whole. Whether task-level latent representations themselves can be transferred across languages remains insufficiently explored. In contrast, our work investigates whether FV can recover and transfer task behavior across languages in semantically complex multilingual classification settings.
3 Method
We investigate whether FVs encode language-independent task representations that generalize across multilingual emotion classification settings. To this end, we evaluate cross-lingual transferability of FVs under both zero-shot and few-shot settings. Specifically, we examine whether FVs extracted from a source language can recover task behavior in target languages without target-language demonstrations under both standard clean and the perturbed zero-shot setting, and whether they provide complementary task representations when combined with standard few-shot ICL.
Problem Formalization. We define a dataset in a language , where . Given the input prompt , an LLM is expected to decode the label . Under the ICL setting, the cross-lingual few-shot prompt is formulated as an informative (clean) prompt:
where and denote the source language of the demonstrations and the target language of the query input, respectively. In the remainder of this paper, unless otherwise specified for and , the demonstrations and query share the same language; that is, . Note that in zero-shot prompting, no demonstrations are provided; therefore, only is used. In contrast, during FV extraction, only the language used in the demonstrations, , is utilized.
We design two experimental settings to examine the cross-lingual capabilities of FVs: (1) comparing Zero-shot prompting in language with Zero-shot + to evaluate the ability of FVs to encode task directions and steer LLM behavior in both monolingual settings ( ) and cross-lingual ( ) settings; (2) comparing Few-shot prompting using with Few-shot + to evaluate the ability of FVs to strengthen task representations in both monolingual and cross-lingual settings. Next, we describe the technique in detail, including FV extraction and injection in LLMs.
3.1 FV Extraction
As mentioned earlier, FV extraction uses a single language; therefore, we omit the parameter from all formulas for simplicity. We adopt the FV formulation proposed by Todd et al. (2024), which uses the causal mediation analysis technique (Pearl, 2001; Vig et al., 2020; Wang et al., 2023a)–activation patching–to identify the attention heads responsible for encoding task information in few-shot prompts. Todd et al. (2024) showed that there exists a subset of attention heads that encodes task information from few-shot demonstrations, and that these heads are fixed and shared across tasks. Therefore, we first extract this subset of FV heads using a simple extractive task
(Concept_V_Object_5 ). These heads are then used to compute the average activation projected onto the residual stream, which serves as the multilabel emotion detection FV for subsequent experiments.
FV Head Extraction. To construct a control condition, a pair consisting of an informative prompt (p) and an uninformative (known as corrupted) prompt is created by randomly shuffling labels:
Given a transformer model , the mean task-conditioned activation for each attention head is computed and cached at the last token position in input informative prompts:
where is the activation of layer , head j when the model processes the clean prompt , is the set of clean prompts. The causal contribution of each attention head (causal indirect effect) is estimated by measuring how well an attention head can restore the model's ability to predict the target label when its activation is replaced with the average clean activation. The average indirect effect (AIE) is computed over corrupted prompts, yielding a ranking score for each attention head.
The set of influential attention heads (FV heads) is selected based on the top-k highest AIE scores across all heads. Note that, is computed based on the Concept_V_Object_5 task.
Multi-label Emotion Detection FV. We construct the set of clean prompts for the multi-label emotion detection task, denoted by , to compute the average activation for this task. Given the set of FV heads A obtained in the previous step, the FV is constructed by aggregating the mean activations of the selected influential heads.
Concept_V_Object_5 is one of the 21 extractive-style tasks introduced in the original FV work (Todd et al., 2024).
where is the hyperparameter used to select the FV heads in the previous step. Note that, for each language , the set of clean prompts is reconstructed and used to compute the corresponding activations and FVs (denoted for language ).
3.2 FV Injection
To inject extracted FVs ( ) into the latent space of LLMs, we add them directly to the residual stream, following Todd et al. (2024).
where is the residual stream of the LLM at layer , , , and denote the projection of the MLP layer, attention head, and the extracted FV on the residual stream, respectively. Notably, the layer is selected to intervene also based on the corresponding scores computed from the previous step.
3.3 Prompt Construction
To evaluate the task-steering effect of FVs, we consider two zero-shot prompting settings: a standard clean prompt and a perturbed prompt. The clean prompt contains only task instructions and candidate emotion labels, serving as a standard zero-shot baseline for evaluating the model's instruction-following capability. The perturbed prompt additionally introduces auxiliary distractor labels (e.g., colors and nations) alongside the target emotion labels. This controlled perturbation reduces the model's reliance on explicit prompt instructions and enables a more direct evaluation of whether FVs can recover the intended task behavior under misleading contextual cues. Examples are shown in Tables 8, 9 and 10 (Appendix B).
4 Experimental Setup
Dataset To evaluate the multilingual generalization of FVs, we utilize the dataset released by the SemEval Task 11 (Muhammad et al., 2025), which consists of sentence-level emotion annotations in 28 languages. In our experiments, as summarized in Table 1, we select five typologically diverse languages: English (EN), German (DE), Chinese (ZH), Spanish (ES), and Russian (RU). Each instance is annotated with zero or more emotion categories, including joy, sadness, fear, anger, surprise, and disgust, forming a multilingual multilabel emotion classification task.
Table 1: Statistics of the multilingual emotion classification datasets used in our experiments.
| Language | Train | Dev | Test | Total |
|---|---|---|---|---|
| Chinese (ZH) | 2,642 | 200 | 2,642 | 5,484 |
| German (DE) | 2,603 | 200 | 2,604 | 5,407 |
| English (EN) | 2,768 | 116 | 2,767 | 5,651 |
| Spanish (ES) | 1,996 | 184 | 1,695 | 3,875 |
| Russian (RU) | 2,679 | 199 | 1,000 | 3,878 |
Evaluation To ensure consistency with prior studies and enable fair comparisons, we follow the evaluation protocol of the SemEval Task 11 (Muhammad et al., 2025) and report the macro-averaged F1 score:
where denotes the number of emotion classes and represents the F1 score of class .
Experimental Environments We conduct experiments using two representative open-source LLMs: Qwen3-8B (Yang et al., 2025) and Llama-3.1-8B-Instruct (Grattafiori et al., 2024). Unless otherwise specified, each experiment is repeated with five random seeds, and all reported results are presented as mean std over the five runs. For the zero-shot setting, we evaluate only the first generated token under the greedy decoding strategy, whereas for the few-shot setting, the maximum number of new tokens is set to 10, since the model is expected to follow the demonstration format and generate a list of emotions.
5 Results
We evaluate FVs under monolingual and cross-lingual zero-shot settings with clean and perturbed prompts, as well as multilingual few-shot prompting with and without FV injection. As a baseline, we also measure zero-shot performance without FVs to assess whether FVs extracted from a source language can transfer task behavior to different target languages.
5.1 Effectiveness of FVs – Zero-shot Setting
Standard Clean Prompt. We first evaluate FV injection under the standard clean prompt (example in Table 10, Appendix B). As shown in Table 2 and Table 12 (Appendix C), FV injection consistently improves performance over the standard clean zero-shot baseline across all evaluated languages and Table 2: Macro-F1 scores (%) of Qwen3-8B on the cross-lingual emotion classification task with standard clean zero-shot prompts. The first row reports the baseline without FVs (w/o FV), while the remaining rows use FVs extracted from random 5-shot demonstrations using the top-k heads ( ). Rows indicate the source languages for FV extraction ( ), and columns denote the target evaluation languages ( ).
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| w/o FV | 36.4 | 16.9 | 18.4 | 41.4 | 52.5 |
| (+FVs) | |||||
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
both LLMs. Since the task objective is explicitly specified in the instruction of the clean prompt, these improvements indicate that FVs provide additional task-relevant representations beyond standard prompt-based instruction following.
Perturbed Prompt. To rigorously evaluate whether FVs can independently induce task behavior beyond explicit prompt instructions, we conduct experiments under the perturbed prompting setting introduced in Section 3.3 (example in Table 9, Appendix B). As shown in Table 3, the perturbed zero-shot setting without FVs achieves low Macro-F1 scores across all languages, with performance close to random prediction in several cases. This indicates that the model struggles to infer the intended task behavior when explicit task cues are weakened. After injecting FVs, performance improves substantially across all evaluated languages. For example, the English target setting improves from 0.6 to 50.2, while the Chinese setting improves from 0 to 42.7. These results suggest that FVs capture task-relevant representations that effectively steer the model toward the target emotion classification behavior under highly perturbed prompting conditions. Furthermore, the improvements remain consistent in cross-lingual transfer settings. Although using FVs derived from the same language as the target occasionally yields slightly stronger performance (e.g., Spanish (ES) and Russian (RU)), the differences are relatively small. Notably, in some cases (e.g., English (EN), Chinese (ZH) and German (DE)), cross-lingual transfer even outperforms same-language settings. These findings suggest that FVs encode transferable task-level represen-
Table 3: Macro-F1 scores (%) of Qwen3-8B on the cross-lingual emotion classification task with perturbed zero-shot prompts. The FVs were extracted from random 5-shot demonstrations using the top-k heads ( ).
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| w/o FV | 0.6 | 0.5 | 0.0 | 8.0 | 1.8 |
| (+ FVs) | |||||
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
Table 4: Case studies comparing perturbed zero-shot inference with and without cross-lingual FV injection.
| (Example 1) |
|---|
| Sentence: “My heart dropped and I just replied ‘No.’” |
| Gold Label: fear |
| Zero-shot Output (without FVs): yellow |
| Zero-shot Output (with FVs): fear |
| (Example 2) |
| Sentence: “I slammed my fist against the door and yelled, Open up!” |
| Gold Label: anger, fear |
| Zero-shot Output (without FVs): The man |
| Zero-shot Output (with FVs): anger |
tations rather than relying primarily on language-specific lexical patterns.
Case studies in Table 4 further illustrate this phenomenon. Without FVs, the perturbed prompts often lead to predictions from irrelevant label spaces, whereas applying cross-lingual FVs guides the model toward the correct emotion labels. Overall, these results demonstrate that FVs can transfer task behavior across languages without requiring target-language demonstrations during inference. Additional cross-lingual zero-shot results for Llama are provided in Appendix C (Table 11).
5.2 Effectiveness of FVs – Few-shot Setting
Standard few-shot prompting provides strong performance by introducing explicit demonstrations during inference. We therefore investigate whether FV injection can further enhance few-shot ICL by providing additional latent task representations. As shown in Table 5, injecting FVs consistently improves performance across both monolingual and cross-lingual few-shot settings. Compared with standard few-shot prompting (Table 6), FV-enhanced prompting achieves consistent gains across different language configurations. Interest- Table 5: Macro-F1 scores (%) of Qwen3-8B on the cross-lingual emotion classification task with few-shot prompts. The FVs were extracted from random 5-shot demonstrations in the source language using the top-20 heads. The denotation * indicates the results reported by previous works in SemEval 2025 Task 11: PAI (Ruan et al., 2025) and JNLP (Xue et al., 2025).
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| Previous works | |||||
| PAI* | 82.3 | 73.9 | 70.9 | 84.8 | 88.2 |
| JNLP* | 80.4 | 69.9 | 68.1 | 83.0 | 89.1 |
| This work | |||||
| w/o FV(+ FVs) | 66.6 | 64.1 | 54.1 | 71.6 | 73.9 |
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
Table 6: Macro-F1 scores (%) of Qwen3-8B with standard 5-shot prompts without FV injection in monolingual and cross-lingual settings. Rows indicate the source language (demonstration languages), while columns indicate the target evaluation languages.
| Demo. Lang. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| EN | 66.6 | 45.2 | 49.0 | 68.8 | 65.9 |
| DE | 61.6 | 64.1 | 53.7 | 70.5 | 74.0 |
| ZH | 52.9 | 45.3 | 54.1 | 54.0 | 67.7 |
| ES | 59.2 | 53.3 | 50.4 | 71.6 | 77.4 |
| RU | 51.8 | 44.9 | 53.0 | 55.9 | 73.9 |
ingly, several cross-lingual FV settings even outperform the corresponding monolingual few-shot baselines. For example, transferring FVs extracted from Spanish to Russian achieves the best Russian performance, surpassing standard Russian few-shot prompting. Similar improvements are observed across multiple language pairs, suggesting that FV-induced representations are not restricted to the demonstration language. These results demonstrate that FVs complement standard in-context learning by providing additional task-relevant representations. Although FVs do not completely replace the benefits of explicit demonstrations, they partially reproduce the task-steering effect of few-shot ICL while enabling cross-lingual transfer without requiring target-language demonstrations.
Compared with prior works (Ruan et al., 2025; Xue et al., 2025), which improves performance via ensembles of large fine-tuned LLMs such as Qwen
32B, our method performs inference-time intervention on much smaller 8B LLMs, yet still achieves remarkable performance across languages.
5.3 Analysis
5.3.1 Cross-lingual Alignment of FVs
To better understand why FVs extracted from one language can generalize to other languages, we analyze the similarity between FVs constructed from different source languages. Specifically, we measure the pairwise cosine similarity between FVs extracted from different source languages over five random seeds. The results are summarized in Figure 1 and Figure 7 (Appendix F). Across all lan-

Figure 1: Pairwise similarity scores of FV construction across different source languages ( for ). Results are obtained with Qwen3-8B (5-shot, head = 20) and are reported as mean over five random seeds.
guage pairs, the cosine similarities are consistently high. For Qwen3-8B, the similarities range from 0.94 to 0.96, while for Llama-3.1-8B they range from 0.85 to 0.93, with relatively small standard deviations across random seeds. These observations suggest that FVs extracted from different source languages occupy highly similar directions in the model representation space. This supports our hypothesis that cross-lingual transfer is enabled by a shared latent functional representation rather than language-specific vectors. In other words, although FVs are extracted from different languages, they capture largely overlapping functional directions, which provides a possible explanation for why FVs extracted from one language remain effective when injected into another language.
Table 7: Macro-F1 scores (%) of Qwen3-8B on the cross-lingual emotion classification task with standard clean zero-shot prompts. The FVs were extracted from random demonstrations in the range from 5-shot to 9-shot in the source language using the top-20 heads.
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| w/o FV | 36.4 | 16.9 | 18.4 | 41.4 | 52.5 |
| (+ FVs) | |||||
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
5.3.2 Effect of FV Configuration on Robustness
We conduct a series of ablation studies to investigate how different FV configurations affect intervention performance.
Number of Demonstrations for FV Constructions. We first evaluate the robustness of FV injection under different numbers of demonstrations (5-shot to 9-shot). As shown in Table 7, FV injection consistently improves performance across all tested few-shot configurations, indicating that the resulting gains are not specific to any particular number of demonstrations. Moreover, the performance variation across different shot counts remains small, further confirming the stability of FV injection with respect to the number of demonstrations.
Number of FV Heads. We analyze the influence of the number of attention heads used for FV construction under both monolingual (Figure 2a) and cross-lingual settings (Figures 2b and 2c) on Qwen3-8B. The results consistently demonstrate that FV performance is strongly influenced by the number of selected attention heads. In general, incorporating more informative heads leads to stronger and more stable performance. However, after approximately six heads in Qwen3-8B, the performance gains begin to plateau, suggesting that the most effective steering signals are concentrated within a limited subset of attention heads, while additional heads contribute only marginal improvements. We further observe that the optimal head-selection pattern remains highly consistent across language pairs within the same LLM. Although the optimal number of heads varies across models, the overall trend is remarkably stable across multilingual transfer settings. Corresponding results for Llama-3.1-8B-Instruct are provided in Appendix D (Figure 5). These observations suggest that the optimal FV configuration is largely model-specific but remains stable across source languages, allowing the same configuration to generalize across multilingual transfer settings.

(a) Monolingual (esp → esp)

(b) Cross-lingual (esp → deu)

(c) Cross-lingual (esp → eng)
Figure 2: Effect of the top-k attention heads used to construct FVs on performance under monolingual and cross-lingual settings with perturbed zero-shot prompts using Qwen3-8B.
Number of FV-injected layers. We analyze how the number of FV-injected layers – determined by the layers spanned by the selected top-k function-vector heads– relates to model performance (Figures 2a, 2b and 2c). Prior work has shown that FVs applied to a single layer are often insufficient for semantically complex tasks such as sentiment analysis (Todd et al., 2024). Consistent with this observation, our results show that when the selected heads span only one or two layers, the resulting improvements are limited, whereas configurations in which the selected heads are distributed across multiple layers substantially enhance performance. These findings suggest that multi-layer FV injection facilitates the propagation of task-relevant representations, enabling more effective steering for complex classification tasks.
Number of FV Heads in Few-shot Setting. We further investigate whether the above observations remain valid when FV injection is combined with few-shot prompting. Figure 3 (and Figure 6 in Appendix E) presents the performance under different top-k head selections. Across both monolingual and cross-lingual settings, FV-enhanced few-shot prompting consistently outperforms the corresponding standard few-shot baseline across a broad range of top-k configurations. These results indicate that FV-enhanced few-shot prompting remains effective across a broad range of top-k selections, suggesting that its benefits do not rely on a narrowly tuned head configuration.
5.3.3 Error Analysis
We analyze the impact of FV injection on prediction behavior through confusion matrix analysis across different emotion categories. As illustrated in Figure 4, we aggregate the confusion matrix variations across five languages after applying FVs under the standard few-shot setting. Specifically, we analyze the changes in true positive (TP), true negative (TN), false positive (FP), and false negative (FN) to further investigate the precision–recall trade-off introduced by FVs. Several important observations can be derived from the results. First, for relatively strong and explicitly expressed emotions such as anger and disgust, FVs lead to consistently improved classification behavior, where TP and TN increase while FN and FP decrease simultaneously. This indicates that FVs enhance both recognition sensitivity and decision reliability for strong emotional expressions. Second, the substantial increase in TP together with the decrease in FN for joy suggests that FVs enable the model to become more sensitive to joyful emotional signals, although this also causes a small proportion of other emotional labels to be misclassified as joy. Moreover, for more subtle and easily confused emotions such as fear, sadness, and surprise, the model becomes more careful and tends to avoid over-predicting these categories. This behavior is clearly reflected by the substantial decrease in FP, together with the increase in TN across these three emotions. These results suggest that FVs help the model make more cautious and reliable predictions for emotionally ambiguous categories.
Overall, the comparative confusion matrix analysis demonstrates that FVs consistently improve the model’s prediction behavior across multiple emotion categories and languages, leading to more

Qwen/Qwen3-8B
Fs Lang: rus, Test Lang: rus
Qwen/Qwen3-8B
Fs Lang: rus, Test Lang: chn
Qwen/Qwen3-8B
Fs Lang: rus, Test Lang: eng
Qwen/Qwen3-8B
Fs Lang: rus, Test Lang: deu
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: rus
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: esp
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: chn
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: eng
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: deu
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: rus
Qwen/Qwen3-8B
Fs Lang: chn, Test Lang: esp
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: eng
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: esp
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: chn
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: chn
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: eng
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: deu
Qwen/Qwen3-8B
Fs Lang: eng, Test Lang: esp
Figure 3: Performance of FV-enhanced few-shot prompting across different Top-k head selections on Qwen3-8B. X-axis: number of selected FV heads (k); y-axis: classification performance score. The dashed line indicates the standard few-shot baseline without FV injection. “Fs Lang” ( ): language used for FV extraction and few-shot demonstrations; “Test Lang” ( ): language used in both demonstrations and query inputs during evaluation.

Figure 4: Confusion matrix across different emotion categories, where each emotion category combines results from all languages.
balanced and reliable emotion recognition performance.
6 Conclusion
In this paper, we investigated the cross-lingual transferability of FVs through multilingual multilabel emotion recognition, a semantically complex classification task. Our experimental results demonstrate that FVs exhibit strong cross-lingual generalization capabilities, enabling effective zero-shot task steering across languages without requiring in-context demonstrations during inference. Notably, cross-lingual FVs achieved substantial performance improvements, suggesting that FVs capture language-agnostic task-relevant representations rather than purely language-specific patterns. Furthermore, FVs can partially replicate the task-steering effects typically achieved through standard few-shot ICL, offering a more efficient alternative that circumvents the computational overhead associated with processing multiple demonstrations. These results establish FVs as a lightweight, transferable, and scalable mechanism for multilingual task adaptation, with significant implications for deploying large language models in cross-lingual scenarios where demonstration examples may be limited or unavailable.
Acknowledgments
This work was partially supported by JSPS KAKENHI (No. 26K03016), and JST CREST (No. JPMJCR2563), JST CRONOS (No. JPMJCS24K7), AMED under Grant Number JP256f0137001, and JSPS KAKENHI Grant-in-Aid for Scientific Research (A), Grant Number JP25H00459.
Limitations
Although we evaluate under a multilingual multi-label setting, our study primarily focuses on task-level cross-lingual transfer rather than label dependency modeling. We do not explicitly investigate how FVs capture correlations among co-occurring emotion labels in multi-label prediction. Our study focuses on multilingual emotion recognition as a classification (or multi-label classification) task, and it remains unclear whether the observed cross-lingual transferability of FVs generalizes to other multilingual reasoning or generation tasks (e.g., machine translation). In particular, generation tasks involve long output sequences, and over-steering by FVs throughout this process may corrupt the model's latent space, potentially degrading generation quality.
References
Aaron Adcock, Aayushi Srivastava, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pande, Abhinav Pandey, Abhinav Sharma, Abhishek Kadian, Abhishek Kumawat, Adam Kelsey, and 1 others. 2026. The llama 4 herd: Architecture, training, evaluation, and deployment notes. arXiv preprint arXiv:2601.11659.
Lucas Bandarkar, Benjamin Muller, British Yuvraj, Rui Hou, Nayan Singhal, Hongjiang Lv, and Bing Liu. 2025. Layer swapping for zero-shot cross-lingual transfer in large language models. In International Conference on Learning Representations, volume 2025, pages 51315–51338.
Tadesse Destaw Belay, Israel Abebe Azime, Abinew Ali Ayele, Grigori Sidorov, Dietrich Klakow, Philipp Slusallek, Olga Kolesnikova, and Seid Muhie Yimam. 2024. Evaluating the capabilities of large language models for multi-label emotion understanding. ArXiv, abs/2412.17837.
Tom Brown, Benjamin Mann, Nick Ryder, Melanie Subbiah, Jared D Kaplan, Prafulla Dhariwal, Arvind Neelakantan, Pranav Shyam, Girish Sastry, Amanda Askell, and 1 others. 2020. Language models are few-shot learners. Advances in neural information processing systems, 33:1877–1901.
Aaron Grattafiori, Abhimanyu Dubey, Abhinav Jauhri, Abhinav Pandey, Abhishek Kadian, Ahmad Al-Dahle, Aiesha Letman, Akhil Mathur, Alan Schelten, Alex Vaughan, and 1 others. 2024. The llama 3 herd of models. arXiv preprint arXiv:2407.21783.
Tianyu Guo, Wei Hu, Song Mei, Huan Wang, Caiming Xiong, Silvio Savarese, and Yu Bai. 2024. How do transformers learn in-context beyond simple functions? a case study on learning with representations. In International Conference on Learning Representations, volume 2024, pages 46014–46042.
Roee Hendel, Mor Geva, and Amir Globerson. 2023. In-context learning creates task vectors. In Findings of the Association for Computational Linguistics: EMNLP 2023, pages 9318–9333, Singapore. Association for Computational Linguistics.
Sheng Liu, Haotian Ye, Lei Xing, and James Y. Zou. 2023. In-context vectors: Making in context learning more effective and controllable through latent space steering. In International Conference on Machine Learning.
Xin Liu, Qiyang Song, Qihang Zhou, Haichao Du, Shaowen Xu, Wenbo Jiang, Weijuan Zhang, and Xiaoqi Jia. 2026. Focusing on language: Revealing and exploiting language attention heads in multilingual large language models. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 40, pages 32195–32203.
Shamsuddeen Hassan Muhammad, Nedjma Ousidhoum, Idris Abdulmumin, Seid Muhie Yimam, Jan Philip Wahle, Terry Lima Ruas, Meriem Beloucif, Christine De Kock, Tadesse Destaw Belay, Ibrahim Said Ahmad, Nirmal Surange, Daniela Teodorescu, David Ifeoluwa Adelani, Alham Fikri Aji, Felermino Dario Mario Ali, Vladimir Araujo, Abinew Ali Ayele, Oana Ignat, Alexander Panchenko, and 2 others. 2025. SemEval-2025 task 11: Bridging the gap in text-based emotion detection. In Proceedings of the 19th International Workshop on Semantic Evaluation (SemEval-2025), pages 2558–2569, Vienna, Austria. Association for Computational Linguistics.
Judea Pearl. 2001. Direct and indirect effects. In Proceedings of the Seventeenth Conference on Uncertainty in Artificial Intelligence, UAI'01, page 411–420, San Francisco, CA, USA. Morgan Kaufmann Publishers Inc.
Rhitabrat Pokharel, Ameeta Agrawal, and Tanay Nagar. 2026. Cross-lingual activation steering for multilingual language models. arXiv preprint arXiv:2601.16390.
Libo Qin, Qiguang Chen, Yuhang Zhou, Zhi Chen, Yinghui Li, Lizi Liao, Min Li, Wanxiang Che, and Philip S Yu. 2025. A survey of multilingual large language models. Patterns, 6(1).
Zhihao Ruan, Runyang You, Kaifeng Yang, Junxin Lin, Wenwen Dai, Mengyuan Zhou, Meizhi Jin, and Xinyue Mei. 2025. PAI at SemEval-2025 task 11: A large language model ensemble strategy for text-based emotion detection. In Proceedings of the 19th International Workshop on Semantic Evaluation (SemEval-2025), pages 1136–1142, Vienna, Austria. Association for Computational Linguistics.
Lisa Schut, Yarin Gal, and Sebastian Farquhar. 2025. Do multilingual llms think in english? arXiv preprint arXiv:2502.15603.
Aaditya Singh, Adam Fry, Adam Perelman, Adam Tart, Adi Ganesh, Ahmed El-Kishky, Aidan McLaughlin,
Aiden Low, AJ Ostrow, Akhila Ananthram, and 1 others. 2025. Openai gpt-5 system card. arXiv preprint arXiv:2601.03267.
Hinata Tezuka and Naoya Inoue. 2025. The transfer neurons hypothesis: An underlying mechanism for language latent space transitions in multilingual llms. In Proceedings of the 2025 Conference on Empirical Methods in Natural Language Processing, pages 31730–31780.
Eric Todd, Millicent Li, Arnab Sen Sharma, Aaron Mueller, Byron C Wallace, and David Bau. 2024. Function vectors in large language models. In The Twelfth International Conference on Learning Representations.
Jesse Vig, Sebastian Gehrmann, Yonatan Belinkov, Sharon Qian, Daniel Nevo, Yaron Singer, and Stuart Shieber. 2020. Investigating gender bias in language models using causal mediation analysis. In Advances in Neural Information Processing Systems, volume 33, pages 12388–12401. Curran Associates, Inc.
Kevin Ro Wang, Alexandre Variengien, Arthur Conmy, Buck Shlegeris, and Jacob Steinhardt. 2023a. Interpretability in the wild: a circuit for indirect object identification in GPT-2 small. In The Eleventh International Conference on Learning Representations.
Lean Wang, Lei Li, Damai Dai, Deli Chen, Hao Zhou, Fandong Meng, Jie Zhou, and Xu Sun. 2023b. Label words are anchors: An information flow perspective for understanding in-context learning. In Proceedings of the 2023 Conference on Empirical Methods in Natural Language Processing, pages 9840–9855.
Chris Wendler, Veniamin Veselovsky, Giovanni Monea, and Robert West. 2024. Do llamas work in english? on the latent language of multilingual transformers. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 15366–15394.
Jieying Xue, Phuong Minh Nguyen, Minh Le Nguyen, and Xin Liu. 2025. JNLP at SemEval-2025 task 11: Cross-lingual multi-label emotion detection using generative models. In Proceedings of the 19th International Workshop on Semantic Evaluation (SemEval-2025), pages 20–27, Vienna, Austria. Association for Computational Linguistics.
An Yang, Anfeng Li, Baosong Yang, Beichen Zhang, Binyuan Hui, Bo Zheng, Bowen Yu, Chang Gao, Chengen Huang, Chenxu Lv, and 1 others. 2025. Qwen3 technical report. arXiv preprint arXiv:2505.09388.
Hongchuan Zeng, Senyu Han, Lu Chen, and Kai Yu. 2025. Converging to a lingua franca: Evolution of linguistic regions and semantics alignment in multilingual large language models. In Proceedings of the 31st International Conference on Computational Linguistics, pages 10602–10617, Abu Dhabi, UAE. Association for Computational Linguistics.
Zhihao Zhang, Jun Zhao, Qi Zhang, Tao Gui, and Xuanjing Huang. 2024. Unveiling linguistic regions in large language models. In Proceedings of the 62nd Annual Meeting of the Association for Computational Linguistics (Volume 1: Long Papers), pages 6228–6247, Bangkok, Thailand. Association for Computational Linguistics.
Yiran Zhao, Wenxuan Zhang, Guizhen Chen, Kenji Kawaguchi, and Lidong Bing. 2024. How do large language models handle multilingualism? In The Thirty-eighth Annual Conference on Neural Information Processing Systems.
A AI Usage Declaration
AI tools were used for grammar checking and formatting of tables and figures, and polish writing. All technical content and implementations were written by the authors.
B Prompting Content
Table 8: English few-shot prompting template used for multilingual emotion classification. Blue text denotes the task instruction, while the red text indicates the target output generated by the LLM. Five demonstrations are used by default in the few-shot setting.
You are a multi-label emotion classification system. Each sentence contains zero or more emotions from the following list: anger, fear, joy, sadness, surprise, or none.
Emotions: anger, fear, joy, sadness, surprise, or none
Input: For many months I learned to shower keeping my elbows close to prevent water from hosing off the ends and totally drenching the place.
###Answer: fear
... { {demonstrations} } ...
Emotions: anger, fear, joy, sadness, surprise, or none
Input: She commented on everything that went into my mouth.
Answer: anger
Table 9: Perturbed zero-shot prompting template for German (g = deu).
Colors: yellow, red, blue or none
Nation: China, USA, Germany, England or none
Emotions: anger, fear, joy, sadness, surprise, or none
Input: Ich kenne keinen Staat, der Menschen, die unter seiner Herrschaft leben so un menschlich behandelt wie.
###Answer:
Table 10: Standard zero-shot prompting template for German ().
You are a multi-label emotion classification system. Each sentence contains zero or more emotions from the following list: anger, fear, joy, sadness, surprise, or none.
Emotions: anger, fear, joy, sadness, surprise, or none
Input: Ich kenne keinen Staat, der Menschen, die unter seiner Herrschaft leben so unmenschlich behandelt wie.
###Answer:
C Cross-lingual Zero-shot Emotion Classification with Llama
Table 11: Macro-F1 scores (%) of Llama-3.1-8B-Instruct on the cross-lingual emotion classification task with perturbed zero-shot prompts. The FVs were extracted from random 5-shot demonstrations using the top- heads ().
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| w/o FV | 14.1 | 12.9 | 8.4 | 29.1 | 35.5 |
| (+ FVs) | |||||
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
Table 12: Macro-F1 scores (%) of Llama-3.1-8B-Instruct on the cross-lingual emotion classification task with standard clean zero-shot prompts. The FVs were extracted from random 5-shot demonstrations using the top- heads ().
| FVs Src. | Target Language | ||||
|---|---|---|---|---|---|
| EN | DE | ZH | ES | RU | |
| w/o FV | 36.1 | 18.9 | 12.7 | 31.0 | 21.9 |
| (+ FVs) | |||||
| EN | |||||
| DE | |||||
| ZH | |||||
| ES | |||||
| RU | |||||
D Effect of Top-k Attention Heads in Llama-3.1-8B-Instruct
E Additional Cross-lingual Few-shot Results

(a) Monolingual (esp → esp)

(b) Cross-lingual (esp → deu)

(c) Cross-lingual (esp → eng)
Figure 5: Effect of top-k attention heads used for constructing FVs under monolingual and cross-lingual settings in Llama-3.1-8B-Instruct.

Figure 6: Performance of FV-enhanced few-shot prompting across different Top-k FV head selections on Qwen3-8B. The x-axis denotes the number of selected FV heads (k), while the y-axis represents the classification performance score. The dashed horizontal line indicates the corresponding standard few-shot prompting baseline without FV injection. “Fs Lang” ( ) denotes the language used for FV extraction and few-shot demonstrations, and “Test Lang” ( ) denotes the language used in both the demonstrations and query inputs during evaluation.
F Mechanism Analysis
Cosine Similarity of FVs

Figure 7: Pairwise similarity scores of FV construction across different source languages ( for ). Results are obtained with Llama-3.1-8B-Instruct (5-shot, head = 5).