arXiv:2601.10960cs.CLcs.AI2026-01被引 1

不训练模型也能控制文本风格,靠统计得分干预生成结果。

Steering Language Models Before They Speak: Logit-Level Interventions

  • 直接在输出 logits 空间用语料统计得分干预
  • 无需改模型、不访问内部层、不训练额外模型
  • 适合需要快速控制文本风格的研究与应用

可控生成要求语言模型实现阅读难度、礼貌程度、毒性等输出特征。现有方法多为间接控制,需访问内部激活或依赖额外训练模型。我们提出 SWAI,一种无需训练的推理阶段方法,通过语料衍生的词元统计,在 logits 空间直接干预。SWAI 从标注语料计算 z-标准化的一对多逻辑回归得分,仅在模型的 top-K 候选词中偏向高分词元,从而在保持上下文合理性的同时,引导目标特征。在可读性、礼貌性和毒性控制任务中,SWAI 均优于提示法及已有 logits 层基线,且无需修改模型参数、不访问内部层、不训练辅助模型。选择性与查表消融实验表明,性能提升源于特定目标的统计得分,而非通用 logits 扰动。结果表明,当干预基于高概率候选词中的目标特异性统计时,无需学习控制器即可实现有效控制。

原文摘要 · Abstract (English)

Controllable generation requires language models to realize output characteristics such as reading level, politeness, and toxicity. Existing steering methods are often indirect, require access to internal activations, or depend on auxiliary trained models. We propose SWAI, a training-free inference-time method that addresses these limitations by steering directly in logit space using corpus-derived token statistics. SWAI computes z-normalized one-vs-rest log-odds scores from labeled corpora and biases high-scoring tokens only within the model's top-K candidate set, allowing control to favor target-characteristic tokens while preserving contextually plausible choices. Across readability, politeness, and toxicity control, SWAI consistently improves over prompt-based and prior logit-level baselines without modifying model parameters, accessing internal layers, or training an auxiliary model. Selectivity and lookup-table ablations show that the gains come from target-specific statistical scores rather than generic logit perturbation. These results indicate that effective steering does not require learned controllers when the logit intervention is guided by target-specific statistics under high-probability candidates.

可控生成logits干预无训练文本风格

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