LUNA: Language Understanding with Number Augmentations on Transformers via Number Plugins and Pre-training

Hongwei Han, Jialiang Xu, Mengyu Zhou, Yijia Shao, Shi Han +1 more
12/6/2022
cs.CL
transformer-attention

Official code: zmy/LUNA (4 stars, Python, MIT, last commit 2022-06-25).

Abstract

Transformers are widely used in NLP tasks. However, current approaches to leveraging transformers to understand language expose one weak spot: Number understanding.

Show full abstract

In some scenarios, numbers frequently occur, especially in semi-structured data like tables. But current approaches to rich-number tasks with transformer-based language models abandon or lose some of the numeracy information - e.g., breaking numbers into sub-word tokens - which leads to many number-related errors. In this paper, we propose the LUNA framework which improves the numerical reasoning and calculation capabilities of transformer-based language models. With the number plugin of NumTok and NumBed, LUNA represents each number as a whole to model input. With number pre-training, including regression loss and model distillation, LUNA bridges the gap between number and vocabulary embeddings. To the best of our knowledge, this is the first work that explicitly injects numeracy capability into language models using Number Plugins. Besides evaluating toy models on toy tasks, we evaluate LUNA on three large-scale transformer models (RoBERTa, BERT, TabBERT) over three different downstream tasks (TATQA, TabFact, CrediTrans), and observe the performances of language models are constantly improved by LUNA. The augmented models also improve the official baseline of TAT-QA (EM: 50.15 -> 59.58) and achieve SOTA performance on CrediTrans (F1 = 86.17).

View on arXivView PDF

Code Implementations(1)

zmy/LUNAOfficial100%
MIT

Code for the paper "LUNA: Language Understanding with Number Augmentations on Transformers via Number Plugins and Pre-training"

41Python, Jupyter NotebookFeb 11, 20224 years agoMIT

Similar Papers

Cite this paper

@article{han2022luna,
  title  = {LUNA: Language Understanding with Number Augmentations on Transformers via Number Plugins and Pre-training},
  author = {Hongwei Han and Jialiang Xu and Mengyu Zhou and Yijia Shao and Shi Han and Dongmei Zhang},
  year   = {2022},
  eprint = {2212.02691},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2212.02691}
}

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/2212.02691.svg)](https://codeofpaper.com/paper/2212.02691)

Discussion