ChatPaper.aiChatPaper

大语言模型中用于情感检测的跨语言功能向量

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

August 30, 2026
作者: Jieying Xue, Phuong Minh Nguyen, Minh Le Nguyen, Shogo Okada
cs.AI

摘要

函数向量(FVs)近年来已成为一种有前景的机制,通过注入从上下文示例中提取的任务特定潜在方向表示来引导大语言模型(LLMs)的行为。尽管先前的研究表明,FVs能够在结构化的上下文学习设置中恢复任务行为,但其在语义复杂任务上的有效性以及跨语言泛化能力仍未得到充分探索。我们以多语言多标签情感识别作为具有挑战性的语义分类基准,研究了FVs的跨语言迁移性。具体来说,我们考察了从源语言中提取的FVs是否能在推理期间不提供示例的情况下,在标准干净和扰动零样本设置下引导另一种语言中的任务行为。在多样化的跨语言设置中,应用FVs显著提升了性能,这表明FVs捕获的是与语言无关的、与任务相关的信号,而非纯粹的语言特定词汇模式,并凸显了其作为多语言任务适应的轻量级、可迁移机制的潜力。我们观察到,每个LLM在构建有效FVs时都表现出一个相对稳定的最优注意力头范围,且该模式在不同语言间保持一致。此外,FVs能够部分复现标准少样本上下文学习的任务引导效果,同时避免了处理多个示例的计算开销,使其适用于大规模实际应用。我们的代码可在 https://github.com/yingjie7/cross_lingual_fvs 获取。
English
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.