Hostname: page-component-74656f9884-8rzl6 Total loading time: 0 Render date: 2026-11-05T13:44:58.495Z Has data issue: false hasContentIssue false

An empirical study of incorporating syntactic constraints into BERT-based location metonymy resolution

Published online by Cambridge University Press:  01 August 2022

Hao Wang
Affiliation:
School of Computer Engineering and Science, Shanghai University, Shanghai, China
Siyuan Du
Affiliation:
School of Computer Engineering and Science, Shanghai University, Shanghai, China
Xiangyu Zheng
Affiliation:
School of Computer Engineering and Science, Shanghai University, Shanghai, China
Lingyi Meng*
Affiliation:
School of Foreign Languages, East China Normal University, Shanghai, China
*
*Corresponding author. E-mail: lymeng@fl.ecnu.edu.cn
Rights & Permissions [Opens in a new window]

Abstract

Metonymy resolution (MR) is a challenging task in the field of natural language processing. The task of MR aims to identify the metonymic usage of a word that employs an entity name to refer to another target entity. Recent BERT-based methods yield state-of-the-art performances. However, they neither make full use of the entity information nor explicitly consider syntactic structure. In contrast, in this paper, we argue that the metonymic process should be completed in a collaborative manner, relying on both lexical semantics and syntactic structure (syntax). This paper proposes a novel approach to enhancing BERT-based MR models with hard and soft syntactic constraints by using different types of convolutional neural networks to model dependency parse trees. Experimental results on benchmark datasets (e.g., ReLocaR, SemEval 2007 and WiMCor) confirm that leveraging syntactic information into fine pre-trained language models benefits MR tasks.

Information

Type
Article
Copyright
© The Author(s), 2022. Published by Cambridge University Press
Figure 0

Figure 1. An example illustrates that syntactic information helps metonymy resolution. ‘Malaysia’ is metonymically used. The words in deeper blue colour have higher weights in the BERT’s attention. Since the sentence above contains two verbs, it is confusing to infer metonymy. While ‘manage’ strongly suggests a metonymic reading, BERT currently has not addressed that verb. The attention weight for ‘went’ is higher than that of ‘manage’.

Figure 1

Figure 2. Illustration of the architecture of the proposed model with syntactic integration. It can distinguish metonymic usage of the entity name ‘Malaysia’ given the enriched representation by incorporating hard and soft syntactic constraints using GCN and AGCN blocks. In this model, both the context and entity semantics are considered to resolving metonymies.

Figure 2

Figure 3. Densely connected structure. The sublayers are densely connected to fuse structures.

Figure 3

Figure 4. Variants of the architecture for extracting entity and sentence representations from the deep Transformers network. (a) A model with the standard input and with sentence output at the position of [CLS]; (b) a model using the entity-marked input and with the sentence (i.e., [CLS]) and the entity outputs; (c) and (d) two models with the entity-marked input and with the sentence (i.e., [CLS]) and the entity outputs using GCN and AGCN, respectively.

Figure 4

Table 1. Statistics of the datasets used in this paper. The table describes the number of identical entities and the number of overlapping entities in the training and test sets. The table includes sentence length, entity position and the number of verbs per sentence

Figure 5

Table 2. The overall F1 and accuracy scores on the SemEval and ReLocaR datasets. ‘L’ and ‘M’ denote literal and metonymic classes. +NER+POS means integrating both NER and POS features with the baseline model. In general, E-BERT+AGCN obtains the best results. The boldface denotes the best results and ‘$\uparrow$’ means statistically significant improvement over the baseline (BERT+MASK, Li et al. 2020) with p-value $\leq 0.05$. † and ‡ are the results reported in the previous works of Gritta et al. (2017) and Li et al. (2020), respectively. Since the datasets are slightly different, we re-implement systems of Li et al. (2020) and report the new results labelled by $*$

Figure 6

Table 3. Results of the WiMCor dataset

Figure 7

Table 4. Cross-domain accuracy, precision, recall and F1 scores. The best results are indicated in boldface

Figure 8

Figure 5. Comparison on the ReLocaR and the SemEval datasets w.r.t. different sentence lengths. E-BERT+AGCN significantly outperforms E-BERT and E-BERT+GCN on the SemEval dataset when sentence length is longer than 70.

Figure 9

Figure 6. Visualisation of attention matrices (better viewed in colour). (a) averaged attention weights in the E-BERT encoder (E-BERT), (b) averaged attention weights in the E-BERT encoder (E-BERT+AGCN); (c) attention weights in the non-attention modules (E-BERT+GCN and E-BERT+AGCN); (d) averaged attention weights in the attention modules (E-BERT+AGCN). (a) with (b) show the effect of incorporating syntactic constraints on BERT. (c) and (d) illustrate soft attention weights compared to hard ones. (a)$\sim$(d) illustrate that incorporating syntactic information forces the model to focus on the neighbours of the target word in the dependency graph, compared to Figure 1.

Figure 10

Table 5. Samples for error analysis. Bold denotes the target entities for MR. ‘Label’ refers to the class label of the target entity, followed by the correctness of the predictions of E-BERT and E-BERT+AGCN models

Figure 11

Figure A.1. Comparison of F1 scores w.r.t training data size on the ReLocaR dataset. We train the model with different percentages {20, 40, 60, 80, 100} of the training dataset.