arXiv:2512.12544cs.CLcs.LG2025-12ACL被引 3

用超网络实现精准指令化文本编辑,避免多余修改

HyperEdit: Unlocking Instruction-based Text Editing in LLMs via Hypernetworks

  • 通过超网络动态生成参数,让模型按指令定制编辑策略
  • 差值感知正则化使修改区域更精确,减少无关内容改动
  • 仅30亿参数就比现有方法提升9%至30%的编辑准确率

指令式文本编辑在代码编辑器(如Cursor)等实际应用中日益重要,但大语言模型仍难以胜任。与自由生成不同,编辑需忠实执行用户指令并保留未修改内容,任何微小的意外改动都可能破坏功能。现有方法将编辑视为通用文本生成,导致两大缺陷:难以准确对齐多样化的用户意图,且常过度修改未变更区域。我们提出HyperEdit解决上述问题。首先,引入基于超网络的动态适配机制,生成请求特定参数,使模型能根据每条指令调整编辑策略;其次,设计差值感知正则化,聚焦于修改片段的监督,防止过度编辑同时确保修改精准、最小化。HyperEdit在修改区域的BLEU上相较最先进基线提升9%–30%,仅使用30亿参数。

原文摘要 · Abstract (English)

Instruction-based text editing is increasingly critical for real-world applications such as code editors (e.g., Cursor), but Large Language Models (LLMs) continue to struggle with this task. Unlike free-form generation, editing requires faithfully implementing user instructions while preserving unchanged content, as even minor unintended modifications can break functionality. Existing approaches treat editing as generic text generation, leading to two key failures: they struggle to faithfully align edits with diverse user intents, and they often over-edit unchanged regions. We propose HyperEdit to address both issues. First, we introduce hypernetwork-based dynamic adaptation that generates request-specific parameters, enabling the model to tailor its editing strategy to each instruction. Second, we develop difference-aware regularization that focuses supervision on modified spans, preventing over-editing while ensuring precise, minimal changes. HyperEdit achieves a 9%--30% relative improvement in BLEU on modified regions over state-of-the-art baselines, despite utilizing only 3B parameters.

文本编辑超网络大模型指令遵循

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