Using Prior Knowledge to Guide BERT's Attention in Semantic Textual Matching Tasks
Abstract
We study the problem of incorporating prior knowledge into a deep Transformer-based model, i.e., Bidirectional Encoder Representations from Transformers (BERT), to enhance its performance on semantic textual matching tasks. By probing and analyzing what BERT has already known when solving this task, we obtain better understanding of what task-specific knowledge BERT needs the most and where it is most needed. The analysis further motivates us to take a different approach than most existing works. Instead of using prior knowledge to create a new training task for fine-tuning BERT, we directly inject knowledge into BERT’s multi-head attention mechanism. This leads us to a simple yet effective approach that enjoys fast training stage as it saves the model from training on additional data or tasks other than the main task. Extensive experiments demonstrate that the proposed knowledge-enhanced BERT is able to consistently improve semantic textual matching performance over the original BERT model, and the performance benefit is most salient when training data is scarce.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
5 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Deberta: decoding-Enhanced Bert with Disentangled Attention cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Predicate-Argument Based Bi-Encoder for Paraphrase Identification cites Semantics-Aware BERT for Language Understanding
- Learning Semantic Textual Similarity via Topic-informed Discrete Latent Variables cites ALBERT: A Lite BERT for Self-supervised Learning of Language Representations
- Learning Semantic Textual Similarity via Topic-informed Discrete Latent Variables cites Semantics-Aware BERT for Language Understanding
Cited by top-tier papers5
- Dict-TTS: Learning to Pronounce with Prior Dictionary Knowledge for Text-to-SpeechZiyue Jiang, Su Zhe, Zhou Zhao, Qian Yang et al.NeurIPS 2022 · 7 citations
- Learning Semantic Textual Similarity via Topic-informed Discrete Latent VariablesErxin Yu, Lan Du, Yuan Jin, Zhepei Wei et al.EMNLP 2022 · 5 citations
- Predicate-Argument Based Bi-Encoder for Paraphrase IdentificationQiwei Peng, David J. Weir, Julie Weeds, Yekun ChaiACL 2022
- Embedding Prior Task-specific Knowledge into Language Models for Context-aware Document RankingShuting Wang, Yutao Zhu, Zhicheng DouKDD 2025
- TestifAI: Tomography-Based Testing for Deep Learning SystemsArooj Arif, Tobias Hartung, Elena Botoeva, Alexandros KoliousisICSE 2026
Builds on6
- ALBERT: A Lite BERT for Self-supervised Learning of Language RepresentationsZhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel et al.ICLR 2020 · 7,418 citations
- Deberta: decoding-Enhanced Bert with Disentangled AttentionPengcheng He, Xiaodong Liu, Jianfeng Gao, Weizhu ChenICLR 2021 · 3,729 citations
- Unsupervised Data Augmentation for Consistency TrainingQizhe Xie, Zihang Dai, Eduard H. Hovy, Thang Luong et al.NeurIPS 2020 · 2,774 citations
- K-BERT: Enabling Language Representation with Knowledge GraphWeijie Liu, Peng Zhou, Zhe Zhao, Zhiruo Wang et al.AAAI 2020 · 898 citations
- Semantics-Aware BERT for Language UnderstandingZhuosheng Zhang, Yuwei Wu, Hai Zhao, Zuchao Li et al.AAAI 2020 · 396 citations
Related papers
- Analyzing How BERT Performs Entity MatchingMatteo Paganelli, Francesco Del Buono, Andrea Baraldi, Francesco GuerraVLDB 2022 · 35 citations
- Integrating Task Specific Information into Pretrained Language Models for Low Resource Fine TuningRui Wang, Shijing Si, Guoyin Wang, Lei Zhang et al.EMNLP Findings 2020 · 6 citations
- GiBERT: Enhancing BERT with Linguistic Information using a Lightweight Gated Injection MethodNicole Peinelt, Marek Rei, Maria LiakataEMNLP Findings 2021 · 2 citations
- Deep Entity Matching with Pre-Trained Language ModelsYuliang Li, Jinfeng Li, Yoshihiko Suhara, AnHai Doan et al.VLDB 2021 · 484 citations
- Improving Semantic Matching through Dependency-Enhanced Pre-trained Model with Adaptive FusionJian Song, Di Liang, Rumei Li, Yuntao Li et al.EMNLP Findings 2022 · 16 citations
