HyperAIHyperAI

Command Palette

Search for a command to run...

5 months ago

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

Shuang Wu; Xiaoning Song; Zhenhua Feng; Xiao-Jun Wu

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

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. 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.

Code Repositories

codermusou/nflat4cner
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
chinese-named-entity-recognition-on-msraNFLAT
F1: 94.55
Precision: 94.92
Recall: 94.19
chinese-named-entity-recognition-on-ontonotesNFLAT
F1: 77.21
Precision: 75.17
Recall: 79.37
chinese-named-entity-recognition-on-resumeNFLAT
F1: 95.58
Precision: 95.63
Recall: 95.52
chinese-named-entity-recognition-on-weibo-nerNFLAT
F1: 61.94
Precision: 59.10
Recall: 63.76

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp