arXiv:2410.09038cs.CLcs.AI2024-10

用分层策略提升大模型生成多样性,效果优于调高温度。

SimpleStrat: Diversifying Language Model Generation with Stratification

  • 用模型自身划分答案空间为多个层次,随机选层生成。
  • 在CoverageQA上比GPT-4o召回率高0.05,KL散度降低0.36。
  • 适合需要多样输出的规划、数据生成等场景。

大语言模型生成多样化响应对规划、搜索和合成数据生成等应用至关重要。现有方法依赖提高温度来增加多样性,但研究表明,温度越高,单次生成质量越低,且依赖模型预测概率接近真实答案分布。本文提出SimpleStrat,利用语言模型自身将答案空间划分为多个分层,在推理时随机选择一个分层并从中采样。为评估多样性,构建CoverageQA数据集,包含多个合理答案的模糊问题,并通过输出分布与真实答案均匀分布间的KL散度衡量多样性。由于无法获取专有模型的逐响应概率,采用对真实答案的召回率作为替代指标。实验表明,SimpleStrat相比GPT-4o召回率提升0.05,相比Llama 3平均KL散度降低0.36。

原文摘要 · Abstract (English)

Generating diverse responses from large language models (LLMs) is crucial for applications such as planning/search and synthetic data generation, where diversity provides distinct answers across generations. Prior approaches rely on increasing temperature to increase diversity. However, contrary to popular belief, we show not only does this approach produce lower quality individual generations as temperature increases, but it depends on model's next-token probabilities being similar to the true distribution of answers. We propose SimpleStrat, an alternative approach that uses the language model itself to partition the space into strata. At inference, a random stratum is selected and a sample drawn from within the strata. To measure diversity, we introduce CoverageQA, a dataset of underspecified questions with multiple equally plausible answers, and assess diversity by measuring KL Divergence between the output distribution and uniform distribution over valid ground truth answers. As computing probability per response/solution for proprietary models is infeasible, we measure recall on ground truth solutions. Our evaluation show using SimpleStrat achieves higher recall by 0.05 compared to GPT-4o and 0.36 average reduction in KL Divergence compared to Llama 3.

生成多样性分层采样大模型优化

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