[论文解读] Porous Lattice-based Transformer Encoder for Chinese NER
该论文提出了一种基于Transformer的新型模型——多孔网格Transformer编码器(PLTE),用于中文命名实体识别(NER)。PLTE通过并行处理字符与词汇词网格,并结合网格感知自注意力机制及多孔机制,增强局部上下文建模能力。PLTE在保持性能提升的同时,推理速度相比最先进方法最高提升11.4倍,尤其在结合BERT表示时表现更优。
Incorporating lattices into character-level Chinese named entity recognition is an effective method to exploit explicit word information. Recent works extend recurrent and convolutional neural networks to model lattice inputs. However, due to the DAG structure or the variable-sized potential word set for lattice inputs, these models prevent the convenient use of batched computation, resulting in serious inefficient. In this paper, we propose a porous lattice-based transformer encoder for Chinese named entity recognition, which is capable to better exploit the GPU parallelism and batch the computation owing to the mask mechanism in transformer. We first investigate the lattice-aware self-attention coupled with relative position representations to explore effective word information in the lattice structure. Besides, to strengthen the local dependencies among neighboring tokens, we propose a novel porous structure during self-attentional computation processing, in which every two non-neighboring tokens are connected through a shared pivot node. Experimental results on four datasets show that our model performs up to 9.47 times faster than state-of-the-art models, while is roughly on a par with its performance. The source code of this paper can be obtained from https://github.com/xxx/xxx.
研究动机与目标
- 解决基于网格的RNN模型在中文NER中效率低下且语义交互有限的问题。
- 克服基于网格的LSTM及其类似模型中顺序计算瓶颈与缺乏双向上下文的问题。
- 在基于Transformer的架构中实现对网格结构输入的批量并行处理。
- 通过引入多孔注意力机制,增强相邻词元之间依赖关系的建模,从而提升局部上下文建模能力。
- 证明PLTE在性能与速度方面均优于现有方法,尤其在集成预训练BERT表示时表现更优。
提出的方法
- PLTE扩展了Transformer编码器,使其能够处理拼接序列中的字符与匹配的词汇词,支持全批量推理。
- 引入网格感知自注意力机制,借鉴Shaw等人(2018)的相对位置嵌入方法,利用网格结构中的相对位置信息。
- 多孔机制将标准全连接注意力替换为枢纽共享结构,其中每对非相邻词元通过共享枢纽连接,从而增强局部依赖建模。
- 通过保留全局注意力机制,同时聚焦于相关局部上下文,维持长距离依赖学习能力。
- 支持对标准Transformer架构进行最小修改的端到端训练与推理。
- 该框架与预训练语言模型(如BERT)兼容,可通过迁移学习实现进一步性能提升。
实验结果
研究问题
- RQ1基于Transformer的架构能否有效处理中文NER中的网格结构输入,同时实现批量并行计算?
- RQ2与单向RNN相比,网格感知自注意力机制在建模字符与其匹配词汇词之间交互关系方面有何改进?
- RQ3多孔注意力机制在字符级NER任务中,对局部上下文建模的增强程度如何?
- RQ4与现有基于网格的模型(如Lattice LSTM和LR-CNN)相比,PLTE在速度与准确率方面表现如何?
- RQ5将PLTE与预训练BERT表示结合,能否进一步提升性能,超越当前最先进结果?
主要发现
- 在OneNotes数据集上使用Word2vec嵌入时,PLTE的推理速度相比Lattice LSTM最高提升11.4倍,相比LR-CNN提升5.11倍。
- 在四个基准数据集上,PLTE在F1分数上优于多个强基线模型,尤其在结合BERT表示时表现更优。
- 消融实验表明,若移除网格感知自注意力机制,F1分数下降0.58%至3.63%,证明词汇集成在模型中的关键作用。
- 多孔机制通过消融实验显示,相比标准注意力机制,能持续提升性能,证明其在局部上下文建模中的有效性。
- 由于消除了先前模型中常见的循环计算与重思考机制,PLTE即使在批量大小为1时仍保持高效率。
- 在使用BERT嵌入进行微调后,PLTE在中文NER基准上实现了迄今报告的最佳性能,证实其与预训练表示的兼容性与有效性。
更好的研究,从现在开始
从阅读论文到最终审阅,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。