[Paper Review] AMBERT: A Pre-trained Language Model with Multi-Grained Tokenization
AMBERT proposes a multi-grained BERT model that jointly learns contextualized representations for both fine-grained (words/subwords) and coarse-grained (phrases/words) tokens using shared-parameters encoders. It outperforms BERT by 2.7% on average in Chinese CLUE and by over 3.0% on multiple English benchmarks, with an efficient inference variant using only one encoder.
Pre-trained language models such as BERT have exhibited remarkable performances in many tasks in natural language understanding (NLU). The tokens in the models are usually fine-grained in the sense that for languages like English they are words or sub-words and for languages like Chinese they are characters. In English, for example, there are multi-word expressions which form natural lexical units and thus the use of coarse-grained tokenization also appears to be reasonable. In fact, both fine-grained and coarse-grained tokenizations have advantages and disadvantages for learning of pre-trained language models. In this paper, we propose a novel pre-trained language model, referred to as AMBERT (A Multi-grained BERT), on the basis of both fine-grained and coarse-grained tokenizations. For English, AMBERT takes both the sequence of words (fine-grained tokens) and the sequence of phrases (coarse-grained tokens) as input after tokenization, employs one encoder for processing the sequence of words and the other encoder for processing the sequence of the phrases, utilizes shared parameters between the two encoders, and finally creates a sequence of contextualized representations of the words and a sequence of contextualized representations of the phrases. Experiments have been conducted on benchmark datasets for Chinese and English, including CLUE, GLUE, SQuAD and RACE. The results show that AMBERT can outperform BERT in all cases, particularly the improvements are significant for Chinese. We also develop a method to improve the efficiency of AMBERT in inference, which still performs better than BERT with the same computational cost as BERT.
Motivation & Objective
- To address the limitations of single-grained tokenization in pre-trained language models by combining fine-grained and coarse-grained representations.
- To investigate whether jointly learning word-level and phrase-level representations improves model performance in NLU tasks.
- To reduce computational cost in inference while preserving performance through selective encoder usage.
- To analyze why multi-grained modeling yields larger gains in Chinese than in English due to differing tokenization ratios.
Proposed method
- AMBERT employs two parallel encoders: one for fine-grained tokens (words/subwords in English, characters in Chinese) and one for coarse-grained tokens (phrases in English, words in Chinese).
- The two encoders share parameters, minimizing additional parameter count while enabling joint learning of multi-grained representations.
- Input text is tokenized at both levels: word-level and phrase-level (using a phrase tokenizer) for English, and character-level and word-level for Chinese.
- Contextualized representations are generated for both word-level and phrase-level tokens at each position, enhancing semantic richness.
- An inference optimization method is introduced that selects only one encoder (fine-grained or coarse-grained) based on performance on a development set.
- The model uses masked language modeling (MLM) during pre-training, with shared attention mechanisms across encoders to align representations.
Experimental results
Research questions
- RQ1Can jointly learning representations at multiple granularities improve performance in pre-trained language models?
- RQ2Why does multi-grained modeling yield larger improvements in Chinese than in English?
- RQ3How does parameter sharing between fine-grained and coarse-grained encoders affect representation alignment and model performance?
- RQ4Can an efficient inference mode be designed that maintains high performance while halving computational cost?
- RQ5What is the impact of attention patterns on multi-grained representations compared to single-grained models?
Key findings
- AMBERT outperforms BERT by 2.0% on GLUE, 2.5% on RACE, and 5.1% on SQuAD in English benchmarks.
- In Chinese, AMBERT improves the average score on CLUE by over 2.7% compared to Google BERT.
- The performance gap between AMBERT and AMBERT-Combo is attributed to parameter sharing, which aligns representations across granularities.
- AMBERT maintains strong performance with only one encoder in inference, outperforming single-grained BERT models at the same computational cost.
- The attention patterns in AMBERT preserve intra-level attention (e.g., among words or among phrases), unlike AMBERT-Hybrid, which weakens fine-grained attention.
- The larger gains in Chinese are due to a higher proportion of coarse-grained tokens (51.5%) compared to English (13.1%), making multi-grained learning more impactful.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.