语义流正则化:教会LLMs生成多样且连贯的回复
Semantic Flow Regularization: Teaching LLMs to Generate Diverse Yet Coherent Responses
AI总结:
针对大语言模型微调时输出多样性严重受限的跨风格坍缩问题,提出语义流正则化(SFR),通过条件流匹配监督骨干网络使用连续句子嵌入,在零部署成本下提升多样性和风格保真度。
摘要:
当大语言模型被微调以生成个性或语气条件化的回复时,其输出多样性受到严重限制——我们将这种失败称为跨风格坍缩。我们将这种坍缩追溯到交叉熵目标,该目标在共享表示下倾向于抑制多样化的延续。我们提出语义流正则化(SFR),一种轻量级的辅助目标,通过条件流匹配使用未来片段的连续句子编码器嵌入来监督骨干网络。随机流源通过构造保持多模态;流匹配头在推理时被丢弃,增加零部署成本。在一个大规模工业对话数据集(Qwen3-32B,9种个性)上,SFR在输出多样性、风格保真度和回复质量上优于SFT。我们进一步在公共LiveCodeBench-v5(Qwen2.5-Coder-7B-Instruct)上验证,其中SFR持续改进pass@k,证实了其超越风格化对话的通用性。在MBPP上的受控比较显示,多令牌预测是SFR的一个退化特例。
英文摘要:
When large language models are fine-tuned to generate persona- or tone-conditioned responses, their output diversity is severely limited--a failure we term Cross-Style Collapse. We trace this collapse to the cross-entropy objective, which under shared representations tends to suppress diverse continuations. We propose Semantic Flow Regularization (SFR), a lightweight auxiliary objective that supervises the backbone with continuous sentence-encoder embeddings of future segments via conditional flow matching. The stochastic flow source preserves multi-modality by construction; the flow-matching head is discarded at inference, adding zero deployment cost. On a large-scale industrial dialogue dataset (Qwen3-32B, 9 personas), SFR improves output diversity, style fidelity, and response quality over SFT. We further validate on the public LiveCodeBench-v5 (Qwen2.5-Coder-7B-Instruct), where SFR consistently improves pass@k, confirming generality beyond stylized dialogue. A controlled comparison on MBPP reveals Multi-Token Prediction to be a degenerate special case of SFR.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。