Abstract
Term Set Expansion (TSE) is a fundamental NLP task that aims to expand a small seed set of terms into a comprehensive semantic category. Traditional methods often struggle with the trade-off between the high precision of pattern-based approaches and the broad coverage of distributional methods. This paper, presented at ACL 2020, introduces a novel two-stage approach that leverages the zero-shot capabilities of Masked Language Models (MLMs) like BERT. By mining indicative linguistic patterns and evaluating candidate similarity through MLM predictions, the proposed method achieves state-of-the-art performance on both closed and open datasets with as few as three seed examples.
Introduction
Term Set Expansion is a classic "generalization from few examples" problem. Given a tiny seed set (e.g., {orange, apple}), the goal is to identify other members of the same semantic class (e.g., other fruits). While modern neural models like BERT are typically fine-tuned for specific tasks, TSE seed sets are often too small for effective training. This research offers a clever way to extract semantic knowledge from pre-trained models without traditional fine-tuning, combining pattern-based precision with the generalization power of MLMs.
The Challenge of Term Set Expansion
Historically, TSE has relied on two main strategies:
- Distributional Methods: These represent words as vectors (embeddings) and find neighbors in the vector space. While powerful, they are often noisy due to polysemy (words with multiple meanings).
- Pattern-based Methods: These look for specific phrases like "fruits such as X." While highly accurate, they suffer from low coverage; if a specific pattern does not appear in the corpus, no terms are found.
The authors sought to bridge this gap by using the massive internal knowledge of BERT to identify and utilize high-quality patterns dynamically.
Methodology: Leveraging Masked Language Models
The proposed algorithm treats the MLM as a zero-shot knowledge base in two distinct stages.
Stage 1: Mining Indicative Patterns
The system first searches a large corpus (e.g., Wikipedia) for sentences containing the seed terms. It replaces the seed term with a [MASK] token to create candidate patterns. To select the most effective patterns, the authors use a "Min-over-Max" trick: patterns are scored based on how well the MLM ranks the worst-fitting seed term. For example, a pattern like "The capital of [MASK] is..." is considered "tight" and useful if it ranks all seed countries (e.g., France, Japan) highly in its top predictions.
Stage 2: Expansion via MPB1 and MPB2
The authors propose two methods for expansion:
- MPB1 (Direct Query): The MLM is asked to fill the
[MASK]for the best patterns found in Stage 1. This is fast but limited to terms within the MLM’s subword vocabulary (usually single words). - MPB2 (Pattern Similarity): This more robust version identifies terms in the corpus that appear in patterns semantically similar to the mined ones. Similarity is defined by the MLM: two patterns are similar if the model predicts a similar set of words to fill their masks. This allows for the discovery of multi-word terms (e.g., "George W. Bush") not present in the standard BERT vocabulary.
Evaluation and Results
The authors evaluated their method on a newly curated dataset of seven closed sets (e.g., NFL teams, US States, US Presidents) and one open set (Music Genres).
As shown in Table 1, the MLM-based approach (MPB2) outperformed previous leaders like SetExpander and CategoryBuilder on the majority of the closed sets. Notably, while previous methods often excelled at either closed or open sets, the MLM-based approach demonstrated consistent robustness across both types.
Efficiency and Data Requirements
A key insight from the study is the efficiency of the method. High-quality results were achieved with relatively small amounts of data. Sensitivity analysis indicates that performance plateaus at high levels with as few as 2,000 sentences containing seed terms, suggesting the method does not require an exhaustive corpus to find indicative patterns.
Key Insights and Limitations
- Zero-Shot over Fine-Tuning: For tasks with extremely small data (3-5 examples), querying a pre-trained model's existing distributions is more effective than updating its weights.
- Contextual Similarity: The success of MPB2 stems from the realization that semantic equivalence can be judged by the model's internal predictions rather than just word similarity. If two different sentences lead BERT to predict the same list of words, those sentences are semantically equivalent for the purpose of expansion.
Despite its success, the method has limitations. MPB1 is constrained by vocabulary, and MPB2 relies on an external high-recall candidate generator (like sense2vec). Additionally, the computational cost of running BERT over numerous corpus occurrences is higher than simple vector lookups. Future work may focus on more efficient candidate generation and applying pattern similarity to other NLP tasks beyond term expansion.
Summary updated