[论文解读] Learning to Look Inside: Augmenting Token-Based Encoders with Character-Level Information
本文提出 XRayEmb,一种通过整合字符级编码器和生成式解码器,将字符级表征引入预训练 Transformer 模型的方法,从而更好地处理罕见词、未登录词及非标准词汇——尤其在无需从头重新训练基础模型的前提下,显著提升了序列标注任务的性能。
Commonly-used transformer language models depend on a tokenization schema which sets an unchangeable subword vocabulary prior to pre-training, destined to be applied to all downstream tasks regardless of domain shift, novel word formations, or other sources of vocabulary mismatch. Recent work has shown that "token-free" models can be trained directly on characters or bytes, but training these models from scratch requires substantial computational resources, and this implies discarding the many domain-specific models that were trained on tokens. In this paper, we present XRayEmb, a method for retrofitting existing token-based models with character-level information. XRayEmb is composed of a character-level "encoder" that computes vector representations of character sequences, and a generative component that decodes from the internal representation to a character sequence. We show that incorporating XRayEmb's learned vectors into sequences of pre-trained token embeddings helps performance on both autoregressive and masked pre-trained transformer architectures and on both sequence-level and sequence tagging tasks, particularly on non-standard English text.
研究动机与目标
- 解决预训练语言模型中子词分词的局限性,尤其是在领域分布变化或面对罕见词、拼写错误词时的表现。
- 克服固定子词词汇表不可逆的缺陷,以适应新领域或语言变体。
- 使现有预训练模型能够受益于字符级表征,而无需从头开始重新训练。
- 提升序列级任务和序列标注任务的性能,尤其针对非标准英文文本。
- 开发一种轻量级、基于知识回溯的方法,通过辅助组件将字符级知识整合进基于标记的预训练模型。
提出的方法
- XRayEmb 引入一个字符级编码器(XR-Enc),用于从字符序列中计算密集向量表征。
- 一个生成式解码器(XR-Dec)学习从 XR-Enc 生成的上下文表征中重建目标词。
- 该系统通过循环方式预训练:XR-Enc 将字符编码为向量,XR-Dec 再将其解码回序列,形成自监督循环。
- 字符级组件在下游任务微调过程中与主 Transformer 模型联合微调。
- 该方法使用保留的词边界标记(/w)来标识词边界,并支持掩码式和自回归式 Transformer 架构。
- 训练过程包含第二阶段预训练,使用领域特定数据(如 Twitter)对字符模块进行微调,以适应新的数据分布。
实验结果
研究问题
- RQ1当将字符级表征回溯整合进现有预训练的基于标记的模型时,是否能提升下游 NLP 任务的性能?
- RQ2与标准预训练模型相比,XRayEmb 在序列标注任务上的表现如何,特别是在处理罕见词或非标准词汇时?
- RQ3领域分布变化对 XRayEmb 性能有何影响?其在新数据分布上的适应能力如何?
- RQ4各个组件(如循环依赖回路或基于后缀的推理)对整体模型性能的贡献如何?
- RQ5在不从头重新训练主 Transformer 模型的前提下,XRayEmb 能在多大程度上提升性能?
主要发现
- XRayEmb 在 BERT、RoBERTa 和 GPT2 上均提升了序列标注性能,尤其在社交媒体文本等非标准英文文本上表现更优。
- 同时微调主模型与 XRayEmb 组件的效果优于仅使用特征提取,表明字符模块具有良好的可适应性。
- 在领域特定数据(如 Twitter)上训练 XRayEmb 显著优于使用维基百科数据,BERT 在 NYTWIT 任务上性能提升达 3.11 个百分点。
- 移除循环依赖回路在 BERT 和 GPT2 上提升了性能,但在 RoBERTa 上反而造成损害,表明不同模型对架构设计的敏感性存在差异。
- 预训练期间采用基于后缀的推理有助于掩码式模型,但对自回归式 GPT2 造成负面影响,可能源于其从左到右生成的约束。
- 该方法在序列标注任务上实现了可测量的性能提升,同时保持了在序列级任务上的性能,展现出良好的鲁棒性与迁移能力。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。