Introduction
Information Extraction (IE) is a cornerstone of natural language processing, yet traditional systems remain notoriously brittle. When a Named Entity Recognition (NER) model trained on medical literature is applied to legal contracts, it often fails because the underlying schema—the definitions and boundaries of entities—changes entirely. Historically, adapting to new domains required significant human intervention: domain experts to draft annotation guidelines and annotators to label thousands of examples.
While Large Language Models (LLMs) have introduced "zero-shot" capabilities, they frequently struggle in specialized domains where label semantics diverge from their general pre-training data. Existing synthetic data generation methods attempt to bridge this gap but often rely on rigid, predefined schemas and suffer from high noise levels, such as hallucinations or inconsistent labeling. This paper introduces GUIDEX, a novel pipeline designed to automatically infer schemas, generate annotation guidelines, and produce high-quality synthetic training data from raw text.
The GUIDEX Pipeline
GUIDEX shifts the paradigm of synthetic data generation. Rather than forcing an LLM to generate data for a fixed, top-down schema, it dynamically constructs the schema based on the document's content. The pipeline utilizes a large teacher model (Llama 3.1 70B Instruct) through four sequential stages:
- Document Summarization: The LLM analyzes a raw document to extract key concepts and entities, distilling them into concise bullet points.
- Structured Representation: These concepts are organized into a standardized JSON format, where the model assigns meaningful labels and attributes based on the context.
- Guideline Generation: This is the core innovation of GUIDEX. The model translates the JSON structure into explicit annotation guidelines formatted as Python dataclasses. In this format, the class docstring serves as the entity definition, while the fields define expected attributes.
- Instance Extraction: Using these generated guidelines, the model extracts concrete instances from the text, populating the Python dataclasses with specific values.
Consistency Filtering via Code Execution
A significant challenge in synthetic data is noise. GUIDEX addresses this by treating the annotation guidelines and extracted instances as executable Python code. The authors implement an automated script to execute the dataset entries; if the code throws an error—such as an undefined entity type or misaligned attributes—the instance is immediately discarded. This programmatic validation acts as a highly effective filter, ensuring structural integrity and reducing the spurious annotations that typically plague distant supervision.
Experimental Setup and Datasets
The authors generated the GUIDEX dataset using approximately 10,000 educational documents sampled from the FineWeb-edu corpus. This process resulted in a dataset containing 28,677 unique, dynamically generated labels. These labels range from general categories (e.g., Location) to highly specific domain terms (e.g., AsyncDataSharing).
To evaluate the effectiveness of this synthetic data, the authors fine-tuned a smaller model (Llama 3.1 8B) and tested it across seven standard zero-shot NER benchmarks, including CrossNER (AI, Literature, Music, Science, Politics), MIT Movie, and MIT Restaurant.
Key Insights
Dynamic Schemas and Label Diversity
By allowing the schema to emerge from the text, GUIDEX captures a massive and diverse label space. Analysis revealed that approximately 42% of the labels found in standard human-annotated benchmarks emerged naturally within the GUIDEX dataset without any explicit prompting, demonstrating the pipeline's ability to anticipate real-world extraction needs.
Code as a Constraint
Formatting guidelines as Python code forces the LLM to adhere to strict structural logic. This constraint, combined with programmatic validation, drastically reduces the "hallucination" rate of entity types and ensures that the synthetic data is high-utility for training smaller models.
Mitigating Overgeneralization
Zero-shot LLMs often default to broad categories (e.g., labeling a span as "Person" instead of "Politician"). Because GUIDEX generates precise, contextual definitions for fine-grained labels, models trained on this data learn to differentiate nuances that general-purpose models often miss.
Results
The impact of GUIDEX on zero-shot performance is substantial:
- Zero-Shot Improvement: Fine-tuning Llama 3.1 8B solely on the synthetic GUIDEX dataset improved average F1 scores by 7.06 points (from 30.08 to 37.14) across the seven benchmarks compared to the base model.
- State-of-the-Art Performance: When trained on a combination of GUIDEX and standard human-annotated (Gold) data, the model achieved an average F1 of 64.2, setting a new state-of-the-art for these benchmarks.
- Baseline Comparison: The combined model outperformed GoLLIE, a leading guideline-driven system, by an average of 6.2 F1 points, with a notable 12.4 F1 point lead in the complex "Politics" domain.
Limitations and Future Work
While GUIDEX excels at generating rich, document-level synthetic data, the current evaluation was restricted to sentence-level NER benchmarks. Future research will explore the impact of this data on document-level extraction tasks. Additionally, the system still faces challenges with "catch-all" labels like Miscellaneous, which lack precise definitions. The authors suggest that unsupervised clustering could be used in future iterations to induce more meaningful schema definitions for these ambiguous spans.
In conclusion, GUIDEX demonstrates that dynamically generated, guideline-driven synthetic data can effectively bridge the gap to unseen domains, providing a scalable alternative to expensive human annotation for Information Extraction.
Summary updated