A wide variety of natural language tasks are currently being addressed with large-scale language models (LLMs). These models are usually trained with a very large amount of unsupervised text data and adapted to perform a downstream natural language task using methods like fine-tuning, calibration or in-context learning. In this work, we propose an approach to adapt the prior class distribution to perform text classification tasks without the need for labelled samples and only few in-domain sample queries. The proposed approach treats the LLM as a black box, adding a stage where the model posteriors are calibrated to the task. Results show that these methods outperform the un-adapted model for different number of training shots in the prompt and a previous approach were calibration is performed without using any adaptation data.
翻译:目前,各类大规模语言模型(LLMs)被广泛应用于自然语言任务中。这些模型通常通过海量无监督文本数据进行训练,并采用微调、校准或上下文学习等方法适配执行下游自然语言任务。本文提出一种无需标注样本、仅需少量领域内查询样本即可实现文本分类任务的先验类别分布适配方法。该方法将大语言模型视为黑箱,增加一个阶段以校准模型后验概率至目标任务。实验结果表明,针对提示中不同数量的训练示例,该方法均优于未适配模型及一项无需适配数据的先前校准方法。