Negation Scope Refinement via Boundary Shift Loss (2023)

Abstract: Negation in natural language may affect many NLP applications, e.g., information extraction and sentiment analysis. The key sub-task of negation detection is negation scope resolution which aims to extract the portion of a sentence that is being negated by a negation cue (e.g., keyword “not” and never”) in the sentence. Due to the long spans, existing methods tend to make wrong predictions around the scope boundaries. In this paper, we propose a simple yet effective model named R-BSL which engages the Boundary Shift Loss to refine the predicted boundary. On multiple benchmark datasets, we show that the extremely simple R-BSL achieves best results.

## introduction negation is a complex linguistic phenomenon. even though there does not exist a widely agreed task definition for negation detection, two sub-tasks are commonly performed: (i) negation cue detection, and (ii) negation scope resolution. negation cue is a keyword (e.g., not, never) in a sentence that acts as an indicator of semantic negation, and its detection is relatively easy. negation scope refers to the portion(s) in a sentence being semantically affected (i.e., negated) by the cue. there could be multiple cues in one sentence and each corresponds to its own scope. different datasets may adopt different annotation guideline of scopes, e.g., whether or not a cue itself is a part of its scope. the example sentence in in recent years, pretrained language models (plms) like bert @xcite have been explored to improve negation detection @xcite . specially designed pre-training material that focuses on negation has also been explored and achieves state-of-the-art performance @xcite . nevertheless, we believe that negation detection shall be considered as a pre-processing step for downstream subtasks and its model shall not be over-complicated. in this paper, we enhance a simple baseline by @xcite with an effective boundary shift loss (bsl), to refine the predicted negation scope boundaries. bsl is derived based on the positions of span boundaries. for each token, boundary shift tells the direction of the nearest span boundary: left or right. with the simple bert + feed-forward architecture, our r-bsl model outperform baselines on all well-known datasets. ## related work negation detection was firstly studied in biomedical and health texts, represented by negex @xcite developed for ehrs. negex is built on top of regular expressions; its negation scopes are mainly named entities. the definition of negation scope becomes largely different and more generic in later datasets. the bioscope corpus @xcite annotates negation scope in biological full papers and scientific abstracts. the "sherlock" corpus @xcite , annotates conan doyle's novels sherlock holmes series. sfu review negation corpus @xcite annotates negations and speculations in the sfu review corpus @xcite for sentiment analysis. like many other nlp tasks, bert leads to significant improvement on scope resolution (khan-cue negation scope marked in discontinuous "span" s in-mr. sherlock holmes, who was usually very late in the mornings, save upon "those" not [cue] in-[/cue] "frequent occasions when he was up all night", was seated at the breakfast ## problem definition as a common practice, we assume that negation cue has been successfully detected. our key focus is negation scope resolution for a given cue. for presentation simplicity, we assume there is only one cue in a given sentence. the cases of multiple cues can be easily achieved by sentence duplication, each time with a different known cue being wrapped with special indicator tokens. the model would be trained to predict negation scope of each cue separately. given an input sequence @xmath0, t 2 , ..., t n ⟩, with a known cue, the task is to predict the cue's negation score in token spans. we adopt the osc tagging scheme: @xmath1, y 2 , ..., y n ⟩ where y i is o if t i is non-scope, s if t i is part of the scope, and c if t i is the given cue. we use a dedicated label "c" for cue, to satisfy the annotation guidelines in different datasets, i.e., not all annotations consider cue as a part of the scope. ## the r-bsl model the central idea of boundary shift loss is inspired by techniques used for semantic segmentation. background. locating accurate segmentation boundary is particularly important for medical images such as mri, as the boundary for body organ is crucial. in a 2d image, we can represent the deviation of the predicted boundary with ground truth boundary in the form of a distance map, as shown in figure 1 . each pixel in the example image is mapped with a normalized distance to its nearest ground truth boundary pixel, forming the boundary distance map. for a typical pixel, the distance map could be reduced to a local distance map of 3 × 3, containing distance of the pixel itself and that of its eight neighbours. the cell with the smallest distance (e.g., the top left cell in the example) represents the direction to the nearest boundary. to indicate this direction, local distance map can be further reduced to an one-hot local direction map, where the "1" cell representing the direction of the nearest boundary. accordingly, the predicted boundary can be further refined toward this direction for more accurate boundary prediction @xcite . span extraction tasks in nlp share the same aim to find accurate region boundaries, but in a 1d space, scope span 1 scope span 2 scope span 2 scope span 1 scope boundary start boundary end boundary shift start boundary shift end s s o c s o o bs l r bs l l r o be o o be o o bs o o bs o o o r be l r be l r scope span 2 scope span 1 i am robot , not human . sentence i.e., along token sequence to shift left or right. ## conclusion we propose a simple sequence labelling training strategy to enhance boundary prediction for negation scope resolution. through experiments, we demonstrate the effectiveness of boundary shift loss on complex span extraction tasks on three benchmark datasets. in particular, our simple model achieves the state-of-the-art results on the sherlock dataset which is considered more challenging for this task. our model is simple and can be used as a pre-processing for downstream tasks where negation is an important consideration.