TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization
Summary
The paper introduces TextReg, a regularization framework for text-space prompt optimization that mitigates prompt distributional overfitting via dual-evidence gradient purification and semantic edit regularization, yielding up to +11.8% over TextGrad and +16.5% over REVOLVE on out-of-distribution reasoning benchmarks.
View Cached Full Text
Cached at: 10/06/26, 08:53 AM
Paper page - TextReg: Mitigating Prompt Distributional Overfitting via Regularized Text-Space Optimization
Source: https://huggingface.co/papers/2605.21318 Can prompts overfit just like machine learning models do?
Prompt optimization has emerged as a powerful paradigm for improving LLM performance. However, we observed a recurring phenomenon: as optimization progresses, prompts often become longer, accumulate increasingly specific instructions, and generalize worse beyond the training distribution.
In this work, we study this failure mode as prompt distributional overfitting.
Rather than viewing prompts as arbitrary text, we treat them as structured representations of task knowledge and ask a fundamental question:
What makes an optimized prompt generalize?
To answer this question, we introduce representational inefficiency, a perspective that attributes prompt overfitting to the coupled growth of:
🔹 Capacity Cost — prompts becoming unnecessarily long
🔹 Scope Narrowness — rules becoming increasingly specific and less reusable
Building on this insight, we propose TextReg, a regularization framework for text-space prompt optimization that combines:
✅ Dual-Evidence Gradient Purification ✅ Semantic Edit Regularization ✅ Regularization-Guided Prompt Update
Across multiple reasoning benchmarks and model families, TextReg consistently improves out-of-distribution generalization, achieving gains of up to +11.8% over TextGrad and +16.5% over REVOLVE.
More broadly, we hope this work contributes to a better understanding of how prompts evolve during optimization and how regularization principles can be extended from parameter space to text space.
Similar Articles
Structured Prompt Optimization Meets Reinforcement Learning for Global and Local Interpretability over Complex Text
Introduces eXTC, a text classifier with three progressive stages: structured prompt optimization to learn a natural-language rulebook, reasoning distillation into a compact LM, and reinforcement learning to expand reasoning, achieving strong performance and interpretability.
Nonsense Helps: Prompt Space Perturbation Broadens Reasoning Exploration
This paper introduces LoPE, a training framework that uses prompt-space perturbations to address the zero-advantage problem in reinforcement learning with verifiable rewards, thereby enhancing reasoning exploration in large language models.
Once a Response, Always a Response: Detecting LLM-generated Text via Latent Prompt Restoration
This paper proposes EchoPrompt, a training-free detector for LLM-generated text that restores a latent prompt dependency by prepending a generic prefix and measuring likelihood gain differences between instruction-tuned and base models, achieving state-of-the-art zero-shot detection performance.
Self-Supervised Prompt Optimization
This paper introduces Self-Supervised Prompt Optimization (SPO), a framework that optimizes prompts for LLMs without external references by using output comparisons, significantly reducing costs and data requirements.
Beyond Prompt Engineering: A Systematic Analysis of Prompt Lexical Sensitivity and Its Impacts on Quality
This paper presents a large-scale analysis of prompt lexical sensitivity in large language models, revealing a scaling law for prompt performance stability and introducing an automated Prompt-Refining Agent that reduces performance variance in tasks like code generation.