arXiv:2509.21155cs.CL2025-09NeurIPS被引 8

语言模型会错误关联语法与领域,导致回答出错甚至绕过安全限制。

Learning the Wrong Lessons: Syntactic-Domain Spurious Correlations in Language Models

  • 发现模型在训练中错误学习语法与领域间的虚假关联
  • 该关联使模型在实体知识任务上性能下降至0.51±0.06
  • 可能被用于绕过安全机制,适合模型安全研究者关注

为了让大语言模型正确响应指令,必须理解任务的语义和领域。然而语法也能传递隐含信息。已有研究发现,句法模板(频繁出现的词性标签序列)在训练数据中普遍存在,并常出现在模型输出中。本文分析任务指令对中的句法、领域与语义,识别出句法与领域之间的虚假相关现象:模型在训练中学会将特定领域与特定句法绑定,有时甚至覆盖指令语义。通过合成数据集实验,发现这种句法-领域关联会使OLMo-2模型(1B-13B)在实体知识任务上性能下降至0.51±0.06。我们提出评估框架,验证该现象存在于FlanV2数据集的部分样本中,且在开放(OLMo-2-7B;Llama-4-Maverick)与封闭(GPT-4o)模型中均存在。最后通过案例研究显示,这种意外的句法-领域关联可用于绕过OLMo-2-7B Instruct和GPT-4o的安全拒绝机制。研究强调两点:(1) 应主动检测句法-领域相关性;(2) 需在各领域内增加句法多样性,防止此类虚假关联产生。

原文摘要 · Abstract (English)

For an LLM to correctly respond to an instruction it must understand both the semantics and the domain (i.e., subject area) of a given task-instruction pair. However, syntax can also convey implicit information Recent work shows that syntactic templates -- frequent sequences of Part-of-Speech (PoS) tags -- are prevalent in training data and often appear in model outputs. In this work we characterize syntactic templates, domain, and semantics in task-instruction pairs. We identify cases of spurious correlations between syntax and domain, where models learn to associate a domain with syntax during training; this can sometimes override prompt semantics. Using a synthetic training dataset, we find that the syntactic-domain correlation can lower performance (mean 0.51 +/- 0.06) on entity knowledge tasks in OLMo-2 models (1B-13B). We introduce an evaluation framework to detect this phenomenon in trained models, and show that it occurs on a subset of the FlanV2 dataset in open (OLMo-2-7B; Llama-4-Maverick), and closed (GPT-4o) models. Finally, we present a case study on the implications for safety finetuning, showing that unintended syntactic-domain correlations can be used to bypass refusals in OLMo-2-7B Instruct and GPT-4o. Our findings highlight two needs: (1) to explicitly test for syntactic-domain correlations, and (2) to ensure syntactic diversity in training data, specifically within domains, to prevent such spurious correlations.

语言模型虚假相关安全风险

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。