Domain adaptation allows generative language models to address specific flaws caused by the domain shift of their application. However, the traditional adaptation by further training on in-domain data rapidly weakens the model's ability to generalize to other domains, making the open-ended deployments of the adapted models prone to errors. This work introduces novel training objectives built upon a semantic similarity of the predicted tokens to the reference. Our results show that (1) avoiding the common assumption of a single correct prediction by constructing the training target from tokens' semantic similarity can mitigate catastrophic forgetting during domain adaptation, while (2) preserving the quality of the adaptation, (3) with negligible additions to compute costs. In the broader context, the objectives grounded in a continuous token similarity pioneer the exploration of the middle ground between the efficient but na\"{\i}ve exact-match token-level objectives and expressive but computationally- and resource-intensive sequential objectives.
翻译:领域适应使生成式语言模型能够解决因应用领域偏移导致的特定缺陷。然而,传统通过在领域内数据上进行进一步训练的适应方式,会迅速削弱模型泛化至其他领域的能力,导致适应模型在开放式部署中易产生错误。本研究提出了基于预测标记与参考标记语义相似性的新型训练目标。结果表明:(1)通过基于标记语义相似性构建训练目标,避免采用单一正确预测的传统假设,可缓解领域适应过程中的灾难性遗忘;(2)同时保持适应质量;(3)且计算成本增加可忽略不计。从更广泛的视角来看,基于连续标记相似性的目标函数,开创性地探索了高效但朴素的精确匹配标记级目标与表达能力更强但计算与资源密集的序列级目标之间的折中方案。