A critical component of a successful language generation pipeline is the decoding algorithm. However, the general principles that should guide the choice of a decoding algorithm remain unclear. Previous works only compare decoding algorithms in narrow scenarios, and their findings do not generalize across tasks. We argue that the misalignment between the model's likelihood and the task-specific notion of utility is the key factor to understanding the effectiveness of decoding algorithms. To structure the discussion, we introduce a taxonomy of misalignment mitigation strategies (MMSs), providing a unifying view of decoding as a tool for alignment. The MMS taxonomy groups decoding algorithms based on their implicit assumptions about likelihood--utility misalignment, yielding general statements about their applicability across tasks. Specifically, by analyzing the correlation between the likelihood and the utility of predictions across a diverse set of tasks, we provide empirical evidence supporting the proposed taxonomy and a set of principles to structure reasoning when choosing a decoding algorithm. Crucially, our analysis is the first to relate likelihood-based decoding algorithms with algorithms that rely on external information, such as value-guided methods and prompting, and covers the most diverse set of tasks to date. Code, data, and models are available at https://github.com/epfl-dlab/understanding-decoding.
翻译:一种语言生成流程成功的关键组成部分是解码算法。然而,在选择解码算法时应遵循的一般原则仍不清楚。以往的工作仅在狭窄的场景中比较解码算法,其研究结果并不适用于不同的任务。我们认为,模型的似然与特定任务中概率效用定义之间的不匹配是理解解码算法有效性的关键因素。为构建框架,并给出基于配准的解码工具,我们提出了一种缓解似然-效用不匹配的分类系统。该分类系统基于对解码算法的假设,将其分成几类,并对其适用性进行归纳总结。具体来说,通过对多种任务中预测结果的似然和效用进行相关性分析,我们为所提出的分类系统提供了实证支持,并提供了一些选择解码算法时的推理原则。需要注意的是,我们的分析是第一个将基于似然的解码算法与依赖于外部信息(如基于价值的方法和启发式的方法)相关联,并涵盖迄今最为广泛的一组任务的分析。代码、数据和模型可以在 https://github.com/epfl-dlab/understanding-decoding 找到。