Abstract
Deep neural models achieve some of the best results for semantic role labeling. Inspired by instance-based learning that utilizes nearest neighbors to handle low-frequency context-specific training samples, we investigate the use of memory adaptation techniques in deep neural models. We propose a parameterized neighborhood memory adaptive (PNMA) method that uses a parameterized representation of the nearest neighbors of tokens in a memory of activations and makes predictions based on the most similar samples in the training data. We empirically show that PNMA consistently improves the SRL performance of the base model irrespective of types of word embeddings. Coupled with contextualized word embeddings derived from BERT, PNMA improves over existing models for both span and dependency semantic parsing datasets, especially on out-of-domain text, reaching F1 scores of 80.2, and 84.97 on CoNLL2005, and CoNLL2009 datasets, respectively.
Introduction
Semantic Role Labeling (SRL) is a fundamental Natural Language Processing task that determines "who did what to whom" in a sentence. It involves identifying predicates and their associated arguments, such as the agent (the one performing the action) and the patient (the one affected by it).
While deep learning models like LSTMs and Transformers have significantly advanced SRL, they often struggle with the "long tail" of language—low-frequency predicates or unusual contexts that are sparse in training data. Standard models rely on a single fixed representation of a word. If this representation is slightly inaccurate due to an unfamiliar context, the model's prediction often fails.
The PNMA Method
To address these challenges, researchers from IBM and Google introduced Parameterized Neighborhood Memory Adaptation (PNMA). This method draws inspiration from instance-based learning: if a model is uncertain, it can consult similar examples seen during training to refine its prediction.
The PNMA approach operates in two distinct phases:
- Memory Generation: A pre-trained "base" SRL model (typically an Alternating LSTM with a CRF layer) processes the training data. The final-layer activations for every token are stored in a "memory" bank.
- Neighborhood Adaptation: When the model encounters a new token, it identifies the $K$ nearest neighbors in its memory based on Euclidean distance. Unlike traditional k-Nearest Neighbors which might use a simple majority vote, PNMA learns a set of parameters to calculate a weighted average of these neighbors. It specifically uses the absolute difference between the current token's activation and its neighbors' activations to determine relevance.
By retraining the classification layers using this "neighborhood-aware" representation while keeping the rest of the network frozen, the model can "shift" its internal representation toward a region of the feature space more likely to yield the correct label.
Experimental Setup and Results
The model was evaluated on three major benchmarks: CoNLL 2005 (span-based), CoNLL 2012 (OntoNotes 5.0), and CoNLL 2009 (dependency-based). A key focus was the Brown test set, which contains out-of-domain text from different genres than the training data.
Key Findings
- Out-of-Domain Robustness: PNMA showed its greatest strengths on unfamiliar text. On the CoNLL 2005 Brown test set, the model achieved an F1 score of 80.2% (a 2.0 point increase). On the CoNLL 2009 out-of-domain set, it reached 84.97% (a 5.0 point increase).
- Error Correction: The authors found that the correct label is almost always present in a token's immediate neighborhood in the activation space, even when the base model's top prediction is wrong. PNMA is four times more likely to correct a wrong prediction than to break a correct one.
- Embedding Agnostic: The performance gains were consistent regardless of whether the base model used random embeddings, ELMo, or BERT.
- Efficiency: Using GPU-accelerated batched distance computations, the memory adaptation adds less than 10% overhead to standard training.
Conclusion
PNMA demonstrates that instance-based memory adaptation is a powerful tool for improving the robustness of deep neural SRL models. By allowing models to "look around" their feature space for similar training examples, PNMA effectively mitigates errors on rare predicates and out-of-domain text, setting new benchmarks for single-model architectures in semantic role labeling.
Summary updated