Abstract
Named Entity Recognition (NER) is a fundamental task in Natural Language Processing, yet traditional models struggle with "hard" zero-shot scenarios where entity types are entirely unseen during training. ZERONER is a novel framework that addresses this by distilling knowledge from a large teacher Large Language Model (LLM) into a compact, efficient student model. By utilizing synthetic data and rich, multi-domain entity descriptions, ZERONER enables a 110M parameter BERT-based model to outperform models nearly 80 times its size, achieving state-of-the-art performance in specialized domains like medicine and law.
Introduction
While Large Language Models (LLMs) have demonstrated impressive zero-shot capabilities, their deployment for specialized NER tasks remains hindered by high computational costs and slow inference speeds. Furthermore, existing lightweight zero-shot methods often suffer from "label leakage," where models are inadvertently exposed to test labels during pre-training. Most current approaches also rely on ambiguous entity names (e.g., "Person" or "Location") which lack the context necessary for complex domain disambiguation.
ZERONER tackles these challenges by enforcing a strict "hard" zero-shot protocol and replacing simple labels with detailed textual descriptions. This approach provides the necessary context for a small model to generalize across diverse and previously unencountered entity types.
Methodology
The ZERONER framework utilizes a teacher-student distillation pipeline consisting of three primary stages: synthetic data generation, data refinement, and student training.
1. Synthetic Data Generation and Refinement
The process begins by using a frozen LLM (Llama-3.1-8B) to annotate 50,000 raw text samples from "The Pile Uncopyrighted." The teacher model identifies entity mentions, assigns types, and extracts domain context. To ensure the quality of this "silver" data, the framework employs a self-correction mechanism where the LLM acts as a judge, scoring annotations for completeness and correctness. Heuristic rules are also applied to filter out low-confidence or poorly formatted samples.
2. Multi-View Entity Type Descriptions
A core innovation of ZERONER is the generation of "multi-view" descriptions. Rather than using a static label, the teacher generates detailed functional definitions based on the specific domain context. For instance, the entity type "Facility" receives different descriptions when appearing in a culinary context versus a healthcare context, allowing the model to capture nuanced semantic differences.
3. Student Model Training
The student model, a BERT-base architecture (110M parameters), is trained as a cross-encoder. It receives a sentence and an entity description as input and learns to calculate the semantic affinity between individual tokens and the provided description. To manage the vast variety of potential entity types, the model is trained incrementally on random subsets of types, preventing it from being overwhelmed by the majority "non-entity" class.
Experimental Setup
ZERONER was evaluated on three diverse benchmarks adapted for a strict "hard" zero-shot setup, ensuring no overlap between training and test entity types:
- OntoNotes-ZS: General-domain text including newswire and web content.
- MedMentions-ZS: Biomedical abstracts featuring fine-grained clinical entity types.
- LegalNER-ZS: Indian court judgments with specialized types like "Precedent" and "Statute."
Training was conducted exclusively on synthetic silver data, ensuring the model remained completely blind to the gold-standard labels of the test sets.
Key Insights and Results
Performance and Efficiency
Despite its small size, ZERONER consistently outperformed significantly larger models. It achieved an average F1 score of 0.39 across all benchmarks, doubling the performance of the previous lightweight baseline, SMXM (0.19). Notably, ZERONER outperformed 8B parameter models like Llama-3.1 and Qwen2.5 by up to 16% in F1 score. In terms of efficiency, ZERONER processed over 82 samples per second on OntoNotes-ZS, making it more than 4x faster than the leading GLiNER-L model.
The Power of Descriptions
The research highlights that rich textual definitions are significantly more effective than simple class names for generalization. Interestingly, even the teacher LLMs saw a performance boost (up to 8% F1) when provided with the entity descriptions they had generated for the student.
Conclusion and Future Work
ZERONER demonstrates that with proper knowledge distillation and rich descriptive context, small language models can achieve superior performance in zero-shot NER tasks while maintaining high inference speeds.
Current limitations include a lack of support for nested entities and a high sensitivity to the quality of entity descriptions. Future research will explore "soft prompting" to automatically optimize descriptions and expand the framework to other low-resource tasks such as cross-domain document classification.
Summary updated