arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2404.10136cs.CLcs.AIcs.LG
收藏

语言模型级联:Token 级不确定性及超越

Language Model Cascades: Token-level uncertainty and beyond

Google Research(谷歌研究院)

Neha Gupta, Harikrishna Narasimhan, Wittawat Jitkrittum, Ankit Singh Rawat, Aditya Krishna Menon, Sanjiv Kumar

AI总结:

针对生成式语言模型级联,本文研究延迟规则,指出预测序列不确定性存在长度偏差,并提出利用 token 级不确定性及模型嵌入的事后学习规则以改善成本-质量权衡。

摘要:

语言模型(LMs)的最新进展显著提升了复杂 NLP 任务的质量,但代价是推理成本增加。级联提供了一种实现更优成本-质量权衡的简单策略:对大多数“简单”实例调用小模型,而将少数“困难”实例交给大模型处理。尽管支撑级联的原则在分类任务中已得到充分研究——基于预测类别不确定性的延迟决策在理论和实践中都受到青睐——但在生成式 LM 任务中仍缺乏类似理解。本文对 LM 级联的延迟规则展开系统研究。我们首先考察预测类别不确定性向生成式 LM 任务的自然扩展,即预测序列不确定性。我们表明该度量存在长度偏差问题,会根据输出长度过度强调或低估输出。这是因为 LM 会生成一系列不确定性值,每个输出 token 对应一个;此外,不同样本的输出 token 数量是可变的。为缓解该问题,我们建议利用生成式 LM 中隐含的更丰富的 token 级不确定性信息。我们认为朴素的预测序列不确定性对应于这些不确定性的简单聚合。相比之下,通过在使用 FLAN-T5 模型的一系列自然语言基准上进行实验,我们表明借助学习得到的事后延迟规则纳入 token 级不确定性,可显著优于此类简单聚合策略。我们进一步表明,纳入较小模型的嵌入以及较大模型中间层的嵌入,可进一步提升整体成本-质量权衡。

英文摘要:

Recent advances in language models (LMs) have led to significant improvements in quality on complex NLP tasks, but at the expense of increased inference costs. Cascading offers a simple strategy to achieve more favorable cost-quality tradeoffs: here, a small model is invoked for most "easy" instances, while a few "hard" instances are deferred to the large model. While the principles underpinning cascading are well-studied for classification tasks - with deferral based on predicted class uncertainty favored theoretically and practically - a similar understanding is lacking for generative LM tasks. In this work, we initiate a systematic study of deferral rules for LM cascades. We begin by examining the natural extension of predicted class uncertainty to generative LM tasks, namely, the predicted sequence uncertainty. We show that this measure suffers from the length bias problem, either over- or under-emphasizing outputs based on their lengths. This is because LMs produce a sequence of uncertainty values, one for each output token; and moreover, the number of output tokens is variable across examples. To mitigate this issue, we propose to exploit the richer token-level uncertainty information implicit in generative LMs. We argue that naive predicted sequence uncertainty corresponds to a simple aggregation of these uncertainties. By contrast, we show that incorporating token-level uncertainty through learned post-hoc deferral rules can significantly outperform such simple aggregation strategies, via experiments on a range of natural language benchmarks with FLAN-T5 models. We further show that incorporating embeddings from the smaller model and intermediate layers of the larger model can give an additional boost in the overall cost-quality tradeoff.

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

↑