NFLAT: Non-Flat-Lattice Transformer for Chinese Named Entity Recognition

Shuang Wu, Xiaoning Song, Zhenhua Feng, Xiao-Jun Wu
5/12/2022
cs.CLcs.AI
transformer-attention

Official code: CoderMusou/NFLAT4CNER (40 stars, Python, Apache-2.0, last commit 2022-12-04).

Abstract

Recently, Flat-LAttice Transformer (FLAT) has achieved great success in Chinese Named Entity Recognition (NER). FLAT performs lexical enhancement by constructing flat lattices, which mitigates the difficulties posed by blurred word boundaries and the lack of word semantics.

Show full abstract

In FLAT, the positions of starting and ending characters are used to connect a matching word. However, this method is likely to match more words when dealing with long texts, resulting in long input sequences. Therefore, it significantly increases the memory and computational costs of the self-attention module. To deal with this issue, we advocate a novel lexical enhancement method, InterFormer, that effectively reduces the amount of computational and memory costs by constructing non-flat lattices. Furthermore, with InterFormer as the backbone, we implement NFLAT for Chinese NER. NFLAT decouples lexicon fusion and context feature encoding. Compared with FLAT, it reduces unnecessary attention calculations in "word-character" and "word-word". This reduces the memory usage by about 50% and can use more extensive lexicons or higher batches for network training. The experimental results obtained on several well-known benchmarks demonstrate the superiority of the proposed method over the state-of-the-art hybrid (character-word) models.

View on arXivView PDF

Code Implementations(1)

Apache-2.0
408PythonNov 13, 20223 years agoApache-2.0

Similar Papers

Cite this paper

@article{wu2022nflat,
  title  = {NFLAT: Non-Flat-Lattice Transformer for Chinese Named Entity Recognition},
  author = {Shuang Wu and Xiaoning Song and Zhenhua Feng and Xiao-Jun Wu},
  year   = {2022},
  eprint = {2205.05832},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2205.05832}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2205.05832.svg)](https://codeofpaper.com/paper/2205.05832)

Discussion