Looking Right is Sometimes Right: Investigating the Capabilities of Decoder-only LLMs for Sequence Labeling

📄 arXiv: 2401.14556v3 📥 PDF

作者: David Dukić, Jan Šnajder

分类: cs.CL

发布日期: 2024-01-25 (更新: 2024-06-06)

备注: Accepted at ACL 2024 Findings


💡 一句话要点

提出层级去除因果掩码以提升解码器LLM的序列标注能力

🎯 匹配领域: 支柱九:具身大模型 (Embodied Foundation Models)

关键词: 解码器LLM 序列标注 因果掩码 信息提取 自然语言处理 模型微调 上下文利用

📋 核心要点

  1. 现有的解码器LLM在序列标注任务中的表现不如基于MLM的编码器,尤其在信息提取任务中未能达到最先进水平。
  2. 本文提出通过逐层去除因果掩码来改进解码器LLM在序列标注任务中的性能,从而使模型能够更好地关注当前token右侧的上下文信息。
  3. 实验结果显示,采用该方法的LLM在多种序列标注任务中表现优异,能够与最先进的模型相媲美,甚至在某些情况下超越它们。

📝 摘要(中文)

基于掩码语言模型(MLM)的预训练语言模型在自然语言理解任务中表现优异。然而,尽管解码器仅的LLM在规模上有所提升,其在信息提取任务中的表现仍未达到最先进水平。本文假设LLM在序列标注任务中的表现不佳源于因果掩码的限制,提出在LLM微调过程中逐层去除因果掩码的技术。实验结果表明,该方法在多种序列标注任务中表现出色,甚至超越了强大的MLM编码器和指令调优的LLM。

🔬 方法详解

问题定义:本文旨在解决解码器LLM在序列标注任务中的性能不足问题,现有方法由于因果掩码的限制,无法有效利用右侧上下文信息,导致性能欠佳。

核心思路:论文提出逐层去除因果掩码的策略,使模型在微调过程中能够关注到当前token右侧的上下文,从而提升序列标注的准确性。

技术框架:整体流程包括预训练的解码器LLM,微调阶段逐层去除因果掩码,并在多种序列标注任务上进行评估。主要模块包括数据预处理、模型微调和性能评估。

关键创新:最重要的创新在于提出了逐层去除因果掩码的技术,这一方法与传统的全局掩码策略本质上不同,能够更灵活地利用上下文信息。

关键设计:在微调过程中,设计了层级去除因果掩码的策略,确保模型在每一层都能动态调整掩码设置,优化了损失函数以适应新的掩码策略。

🖼️ 关键图片

fig_0
fig_1
fig_2

📊 实验亮点

实验结果表明,采用逐层去除因果掩码的解码器LLM在多种序列标注任务中表现优异,性能与最先进的模型相当,甚至在某些任务中超越了强大的MLM编码器,显示出显著的提升幅度。

🎯 应用场景

该研究的潜在应用领域包括信息提取、自然语言处理和智能问答系统等。通过提升解码器LLM在序列标注任务中的性能,能够为实际应用提供更高效的文本分析和理解能力,推动相关技术的发展与应用。

📄 摘要(原文)

Pre-trained language models based on masked language modeling (MLM) excel in natural language understanding (NLU) tasks. While fine-tuned MLM-based encoders consistently outperform causal language modeling decoders of comparable size, recent decoder-only large language models (LLMs) perform on par with smaller MLM-based encoders. Although their performance improves with scale, LLMs fall short of achieving state-of-the-art results in information extraction (IE) tasks, many of which are formulated as sequence labeling (SL). We hypothesize that LLMs' poor SL performance stems from causal masking, which prevents the model from attending to tokens on the right of the current token. Yet, how exactly and to what extent LLMs' performance on SL can be improved remains unclear. We explore techniques for improving the SL performance of open LLMs on IE tasks by applying layer-wise removal of the causal mask (CM) during LLM fine-tuning. This approach yields performance gains competitive with state-of-the-art SL models, matching or outperforming the results of CM removal from all blocks. Our findings hold for diverse SL tasks, demonstrating that open LLMs with layer-dependent CM removal outperform strong MLM-based encoders and even instruction-tuned LLMs.