arXivDaily arXiv每日学术速递 周一至周五更新
​通知:联邦节假日调休:哥伦布日 / 原住民日(Columbus Day / Indigenous Peoples' Day),今日(13日)无更新。
arXiv 2504.21020cs.CLcs.AIcs.LG

用于改进LLM文本生成的上下文增强对比搜索

Context-Enhanced Contrastive Search for Improved LLM Text Generation

Praxis Business School(普拉克西斯商学院)

Jaydip Sen, Rohit Pandey, Hetvi Waghela

AI总结:

针对LLM长文本生成中连贯性与多样性难以兼顾的问题,本文提出带上下文校准的Context-Enhanced Contrastive Search (CECS),通过动态上下文加权、多级对比搜索和自适应温度控制优化生成质量,实验证明其在连贯性和相关性上显著优于现有方法。

摘要:

近期,大型语言模型(LLMs)在自然语言处理(NLP)领域展现出显著进展。然而,生成兼顾连贯性、多样性和相关性的高质量文本仍具挑战。传统解码方法,如bean search和top-k sampling,常面临输出重复或不连贯的问题,在需长文本生成的任务中尤为明显。为解决这些局限,本文提出对知名Contrastive Search算法的改进——带上下文校准的Context-Enhanced Contrastive Search (CECS)。该方案引入多项创新,包括动态上下文重要性加权、多级Contrastive Search和自适应温度控制,以优化流畅性、创造性和精确度间的平衡。CECS的性能通过BLEU、ROUGE和语义相似度等标准指标评估。实验结果表明,CECS显著提升了生成文本的连贯性和相关性,优于现有Contrastive Search技术。该算法在法律文件起草、客服聊天机器人和内容营销等现实场景中具潜在应用。

英文摘要:

Recently, Large Language Models (LLMs) have demonstrated remarkable advancements in Natural Language Processing (NLP). However, generating high-quality text that balances coherence, diversity, and relevance remains challenging. Traditional decoding methods, such as bean search and top-k sampling, often struggle with either repetitive or incoherent outputs, particularly in tasks that require long-form text generation. To address these limitations, the paper proposes a novel enhancement of the well-known Contrastive Search algorithm, Context-Enhanced Contrastive Search (CECS) with contextual calibration. The proposed scheme introduces several novelties including dynamic contextual importance weighting, multi-level Contrastive Search, and adaptive temperature control, to optimize the balance between fluency, creativity, and precision. The performance of CECS is evaluated using several standard metrics such as BLEU, ROUGE, and semantic similarity. Experimental results demonstrate significant improvements in both coherence and relevance of the generated texts by CECS outperforming the existing Contrastive Search techniques. The proposed algorithm has several potential applications in the real world including legal document drafting, customer service chatbots, and content marketing.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑