Syntax-guided Contrastive Learning for Pre-trained Language Model
Syntactic information has been proved to be useful for transformer-based pre-trained language models. Previous studies often rely on additional syntax-guided attention components to enhance the transformer, which require more parameters and additional syntactic parsing in downstream tasks. This increase in complexity severely limits the application of syntax-enhanced language model in a wide range of scenarios. In order to inject syntactic knowledge effectively and efficiently into pre-trained language models, we propose a novel syntax-guided contrastive learning method which does not change the transformer architecture. Based on constituency and dependency structures of syntax trees, we design phrase-guided and tree-guided contrastive objectives, and optimize them in the pre-training stage, so as to help the pre-trained language model to capture rich syntactic knowledge in its representations. Experimental results show that our contrastive method achieves consistent improvements in a variety of tasks, including grammatical error detection, entity tasks, structural probing and GLUE. Detailed analysis further verifies that the improvements come from the utilization of syntactic information, and the learned attention weights are more explainable in terms of linguistics.
Code (0)
등록된 구현이 없습니다.
Tasks
Contrastive LearningGrammatical Error DetectionLanguage ModelingLanguage ModellingSimilar Papers 제목 키워드 기반
SynCoBERT: Syntax-Guided Multi-Modal Contrastive Pre-Training for Code Representation
Code representation learning, which aims to encode the semantics of source code into distributed vectors, plays an important role in recent deep-learning-based models for code intelligence. Recently, many pre-trained lan…
Clone DetectionCode SearchCode TranslationContrastive Learning+3Disentangling Semantics and Syntax in Sentence Embeddings with Pre-trained Language Models
Pre-trained language models have achieved huge success on a wide range of NLP tasks. However, contextual representations from pre-trained models contain entangled semantic and syntactic information, and therefore cannot …
Semantic SimilaritySemantic Textual SimilaritySentenceSentence Embedding+2SG-Net: Syntax-Guided Machine Reading Comprehension
For machine reading comprehension, the capacity of effectively modeling the linguistic knowledge from the detail-riddled and lengthy passages and getting ride of the noises is essential to improve its performance. Tradit…
Language ModellingMachine Reading ComprehensionQuestion AnsweringReading ComprehensionOn Eliciting Syntax from Language Models via Hashing
Unsupervised parsing, also known as grammar induction, aims to infer syntactic structure from raw text. Recently, binary representation has exhibited remarkable information-preserving capabilities at both lexicon and syn…
Constituency Grammar InductionExtracting Temporal Event Relation with Syntax-guided Graph Transformer
Extracting temporal relations (e.g., before, after, and simultaneous) among events is crucial to natural language understanding. One of the key challenges of this problem is that when the events of interest are far away …
Dependency ParsingNatural Language UnderstandingRelationRelation Classification+3