Introduction
Slot tagging is a fundamental task in Natural Language Understanding (NLU), requiring models to identify and categorize specific entities within a sentence—such as identifying "New York" as a departure city or "7:00 PM" as a time. In the context of Few-Shot Learning (FSL), where models must generalize from only a handful of examples, prompting has emerged as a dominant paradigm. However, traditional prompting methods for sequence labeling are often computationally prohibitive and struggle to capture the relationships between different slots.
This paper introduces a novel approach that flips the standard prompting logic, utilizing Inverse Prompting to achieve significant gains in both speed and accuracy.
The Bottleneck of Standard Prompting
In standard few-shot prompting, the task is typically framed as a discriminative span-classification problem. To identify all entities in a 10-word sentence, a model must enumerate every possible word combination (n-grams) and ask: "Is this span a slot? If so, which one?"
This approach suffers from two primary flaws:
- Computational Complexity: Checking all spans up to a certain length results in $O(n^2)$ complexity. For a standard sentence, this requires dozens of individual queries to a Language Model (LM), making real-time inference difficult.
- Independence Assumption: By evaluating spans in isolation, the model ignores the structural dependencies between labels (e.g., the presence of a "departure city" often implies the presence of an "arrival city").
Methodology: Inverse Prompting and Iteration
The researchers propose a generative framework that shifts the focus from tokens to labels. Their method consists of three core components:
1. Inverse Prompting
Instead of mapping tokens to labels, the model maps labels to tokens. The prompt is structured as: [Original Sentence] [Slot Type] refers to [MASK]. The model then generates the specific words from the sentence that correspond to that slot. This reduces the number of queries from "every possible span" to "once per slot type," significantly lowering the computational overhead.
2. Iterative Prediction Strategy
To address the relationships between different slots, the authors implement a two-pass iterative strategy. In the first pass, the model identifies the most obvious slots. In the second pass, these identified slots are fed back into the prompt as additional context. This "hint" allows the model to resolve dependencies and identify more difficult or ambiguous slots that it might have missed initially.
3. Restricted Decoding
Generative models are prone to "hallucination"—generating words that were not in the original input. To prevent this, the authors use restricted decoding, forcing the model’s output vocabulary to only include words present in the input string, plus a small set of control tokens like "none."
Experimental Results
The method was evaluated on several benchmark datasets, including the MIT Restaurant Review, MIT Movie Review, and SNIPS (for cross-domain testing).
- Accuracy: In 10-shot scenarios, the Inverse Prompting method improved F1-scores by 6.1 points over previous state-of-the-art methods. The generative nature of the task appears to better leverage the pre-trained knowledge within models like GPT-2.
- Efficiency: The method achieved a massive 8x speedup compared to traditional template-based BART approaches. Even when utilizing the two-pass iterative strategy, the system remained over 3 times faster than standard methods.
- Model Scaling: Interestingly, the researchers found that their method using a small GPT-2 model could outperform much larger models (like BART-large) that relied on traditional discriminative prompting.
Discussion and Future Work
While Inverse Prompting offers a dramatic improvement in efficiency, its complexity still scales linearly with the number of slot types ($V$). In domains with hundreds of potential labels, this could still present a challenge. Additionally, while the iterative strategy improves recall, it can occasionally impact precision if the model incorrectly infers a relationship between slots.
Future research may explore more sophisticated triggers for the second-pass iteration or apply this inverse logic to other complex NLP tasks, such as relation extraction or event detection. By treating slot tagging as a targeted query rather than an exhaustive search, this research paves the way for more practical, deployable few-shot NLU systems.
Summary updated