通过文本空间正则化,解决提示词过拟合问题,提升模型泛化能力。
TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization

- 引入正则化梯度优化,控制提示词的表达效率与范围。
- 在多个推理基准上,OOD泛化性能提升最高达16.5%。
- 适合需要强泛化性的复杂任务提示工程场景。
大语言模型对指定任务目标和行为约束的提示词极为敏感。现有提示优化方法通过LLM生成反馈迭代重写提示词,但导致提示词变长、累积特定样本规则,泛化能力差。我们将其归因于离散文本空间优化中表征控制不足,提出提示分布过拟合问题。通过表示低效性(双因素度量)分解提示效率损失为容量成本与范围狭窄,并指出优化过程中两者耦合增长是根本原因。提出TextReg正则化框架,结合双证据梯度净化、语义编辑正则化与正则化引导提示更新,实现软惩罚目标。在多个推理基准测试中,TextReg显著提升分布外(OOD)泛化能力,相比TextGrad最高提升11.8%,相比REVOLVE最高提升16.5%。
原文摘要 · Abstract (English)
Large language models (LLMs) are highly sensitive to the prompts used to specify task objectives and behavioral constraints. Many recent prompt optimization methods iteratively rewrite prompts using LLM-generated feedback, but the resulting prompts often become longer, accumulate narrow sample-specific rules, and generalize poorly beyond the training distribution. We study this failure mode as prompt distributional overfitting and argue that it reflects a lack of representation control in discrete text-space optimization. We formalize this view through representational inefficiency, a dual-factor measure that decomposes prompt inefficiency into capacity cost and scope narrowness, attributing distributional prompt overfitting to their coupled growth during optimization. We propose TextReg, a regularization framework that realizes a soft-penalty objective through regularized textual gradients, combining Dual-Evidence Gradient Purification, Semantic Edit Regularization, and Regularization-Guided Prompt Update. Across multiple reasoning benchmarks, TextReg substantially improves out-of-distribution (OOD) generalization, with accuracy gains of up to +11.8% over TextGrad and +16.5% over REVOLVE.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。