Abstract
Few-shot Named Entity Recognition (NER) is often hampered by the high cost of human annotation and the limitations of traditional data augmentation (DA) techniques, which frequently produce syntactically broken or semantically incoherent training data. This paper presents LLM-DA, a novel framework that repurposes Large Language Models (LLMs) as "data factories" rather than direct task performers. By utilizing 14 contextual rewriting strategies and intelligent entity replacement, LLM-DA generates high-quality, diverse synthetic data. Our evaluation across four diverse benchmarks shows that smaller, specialized models trained on LLM-DA data significantly outperform state-of-the-art baselines and even the LLMs used for generation, particularly in extreme low-resource settings.
Introduction: The Challenge of Few-Shot NER
Named Entity Recognition (NER) is a fundamental task in information extraction, identifying and categorizing entities such as names, locations, and organizations. The primary bottleneck in developing robust NER models is the requirement for extensive human-annotated datasets. In "few-shot" scenarios, where only a handful of examples are available, researchers rely on Data Augmentation (DA) to expand training sets.
However, traditional DA techniques—such as shuffling word segments or simple synonym replacement—often compromise sentence syntax or create semantically nonsensical "garbage" data. While LLMs like GPT-3.5 exhibit impressive general capabilities, they often struggle with the rigid, token-level precision required for direct NER tasks. LLM-DA addresses this by leveraging the superior rewriting and world-knowledge capabilities of LLMs to construct high-quality training sets for smaller, more efficient models.
Methodology: The LLM-DA Framework
The LLM-DA framework operates through a structured three-stage pipeline designed to maximize data diversity while maintaining linguistic integrity.
Stage I: Data Sampling
To ensure a representative training set, a greedy algorithm selects a balanced "k-shot" sample from the original dataset. This step is crucial for ensuring that all entity categories are adequately represented in the seed data provided to the LLM.
Stage II: Multi-Level Data Augmentation
This stage is the core of the framework, employing three distinct levels of augmentation:
- Context-level Augmentation: The LLM rewrites sentences using 14 strategies across four dimensions: sentence length (expansion/contraction), vocabulary usage (advanced terminology, adverbs), syntax (incorporating subordinate clauses), and presentation styles (e.g., news, Wikipedia, movie reviews).
- Entity-level Augmentation: Utilizing its internal world knowledge, the LLM replaces existing entities with new ones of the same type (e.g., substituting "New Year" with "Thanksgiving" or "Diwali").
- Both-level Augmentation: A sequential process that first modifies the context and then replaces entities to maximize semantic diversity.
- Noise Injection: To enhance model robustness, random spelling errors are introduced into the generated data.
Stage III: Data Annotation and Filtering
To mitigate hallucinations or incorrect modifications common in LLM outputs, the system filters generated sentences. It then employs Generalized Cross-Entropy (GCE) loss during the training of the downstream model to handle any remaining label noise effectively.
Experimental Setup and Datasets
LLM-DA was evaluated across four diverse NER benchmarks to test its generalizability:
- CoNLL’03: Classic news-based dataset with 4 entity types.
- OntoNotes 5.0: General domain dataset with 11 entity types.
- MIT Movie: Domain-specific movie reviews with 12 entity types.
- FEW-NERD: A challenging, fine-grained dataset with 66 entity types.
Key Insights
The success of LLM-DA stems from several critical observations:
- Rewriting vs. Extraction: There is a "capability gap" where LLMs excel at creative rewriting but falter at rigid extraction. LLM-DA exploits the former to improve the latter.
- Linguistic Quality: Unlike generative methods like DAGA or MELM, LLM-DA maintains high readability and grammatical correctness, as verified by Flesch-Kincaid scores.
- Distributional Balance: LLM-DA avoids "mode collapse," maintaining a uniform distribution of entity types and preventing label bias in the downstream model.
Results and Discussion
The experimental results demonstrate the significant impact of high-quality synthetic data.
In 5-shot scenarios on the CoNLL’03 dataset, LLM-DA improved micro-F1 scores by over 30 points compared to existing state-of-the-art augmentation methods. The framework showed consistent superiority across all domains, particularly in extreme low-resource settings (5-shot and 10-shot). Furthermore, BERT and RoBERTa models trained on LLM-DA data consistently outperformed ChatGPT on the same tasks, proving that specialized smaller models can surpass general-purpose LLMs when provided with high-quality data.
Limitations and Future Directions
While effective, LLM-DA has limitations. The 14 rewriting strategies are currently static; future work could explore dynamic, domain-adaptive prompting. Additionally, LLM token limits restrict the volume of entity replacements per pass. Finally, the risk of inheriting societal biases from LLM pre-training data necessitates careful inspection in sensitive applications.
Summary updated