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

词汇定义的语义:用于改进上下文学习的潜在空间聚类

Vocabulary-Defined Semantics: Latent Space Clustering for Improving In-Context Learning

Monash University(莫纳什大学);Technical University of Munich(慕尼黑工业大学);Chongqing University(重庆大学)

Jian Gu, Aldeida Aleti, Chunyang Chen, Hongyu Zhang

AI总结:

针对上下文学习因示例选择导致难以优化的问题,提出“词汇定义的语义”方法,通过计算输出标签的潜在表示并进行聚类以对齐模型与任务的语义,在提升3%-49%性能的同时节省一半计算时间。

摘要:

上下文学习通过将少量样本作为示例纳入提示中,使语言模型(LM)能够适应下游数据或任务。它无需微调的开销即可提供强大的性能。然而,上下文学习的性能可能会因示例的质量、格式或顺序而不稳定,这反过来又加剧了优化的难度。先前的工作,如Knn Prompting,除了在输入端的常规检索操作外,还基于输出端logits的相似性对样本进行索引。它们通过利用下一词元预测的核心能力来改进上下文学习,而不是仅仅依赖进行类比的涌现能力。尽管如此,上下文学习难以优化的问题依然存在。在我们看来,这源于选择示例的过程。为了解决这个问题,我们提出用额外的聚类操作来补充上下文学习。我们提出了一种新颖的方法“词汇定义的语义”。该方法以作为模型输出标签空间的LM词汇表为基础,为输出标签计算语义等价的潜在表示。然后,以这些表示作为质心,执行聚类操作以对齐语言模型与下游数据/任务之间的语义属性。基于在多个文本理解数据集和多个模型上的广泛实验,我们的方法在有效性和效率方面均优于现有技术。平均而言,它实现了3%到49%的性能提升,同时仅需一半的计算时间。

英文摘要:

In-context learning enables language models (LM) to adapt to downstream data or tasks by incorporating few samples as demonstrations within the prompts. It offers strong performance without the expense of fine-tuning. However, the performance of in-context learning can be unstable depending on the quality, format, or order of demonstrations, which in turn exacerbates the difficulty of optimization. Prior work, such as Knn Prompting, index samples based on the similarities of logits at the output-side, in addition to the regular retrieval operation at the input-side. They improve in-context learning by leveraging the core ability of next-token prediction, rather than relying solely on the emergent capacity to make analogies. Despite this, the hard-to-optimize issue of in-context learning still exists. In our view, it stems from the process of selecting demonstrations. To address this, we propose complementing in-context learning with an additional clustering operation. We propose a novel approach "vocabulary-defined semantics". Grounded in LM vocabulary, which is the label space of model outputs, the proposed approach computes semantically equivalent latent representations for output labels. Then, taking the representations as centroids, a clustering operation is performed to align the semantic properties between the language model and the downstream data/tasks. Based on extensive experiments across diverse textual understanding datasets and multiple models, our approach outperforms the state-of-the-art in terms of effectiveness and efficiency. On average, it achieves $3\%-49\%$ improvements while requiring only half of the computation time.

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

↑