NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Generating Diverse Training Samples for Relation Extraction with Large Language Models

Zexuan Li, Hongliang Dai, Piji Li

Introduction

Relation Extraction (RE) is a fundamental task in information extraction that involves identifying semantic relationships between entities in text—for example, determining that "John Smith" (Subject) has a "died in" (Relation) relationship with "Canada" (Object). Despite its importance, RE often suffers from chronic data scarcity, particularly in specialized or niche domains. While Large Language Models (LLMs) have emerged as potential data generators to alleviate this scarcity, they frequently exhibit "imitation behavior," producing repetitive and linguistically homogenous samples. This lack of diversity limits the effectiveness of synthetic datasets for training robust downstream models. This paper proposes a novel framework to enhance the diversity of LLM-generated RE data through iterative prompting and preference optimization.

Methodology

The authors introduce two primary strategies designed to break the repetitive cycle of LLM generation and force the exploration of diverse linguistic structures.

Iterative In-Context Learning (OBO)

Rather than the traditional "All-at-Once" generation approach, the authors propose a One-by-One (OBO) iterative loop. In this setup, after the LLM generates a single training sample, that sample is immediately fed back into the prompt as a negative demonstration. The model is explicitly instructed to generate a new sample that differs significantly in structure and phrasing from the previous examples. This iterative feedback loop prevents the model from falling into a "lazy" pattern of repeating the same syntactic templates.

Diversity Fine-tuning via Direct Preference Optimization (DPO)

The core innovation of the research is the application of Direct Preference Optimization (DPO) to penalize structural mimicry. The researchers fine-tune the LLM using pairs of "preferred" and "non-preferred" samples:

  • Preferred Samples: High-quality, manually labeled examples from existing gold-standard datasets.
  • Non-preferred Samples: These include samples with incorrect labels or, more importantly, samples that are structurally nearly identical to the provided demonstrations.

By training on these pairs, the LLM learns to avoid imitation and is incentivized to produce more creative and varied phrasings for the same underlying relation.

Experimental Setup

The framework was evaluated across four major RE benchmarks: TACRED, TACRED-Revisit, Re-TACRED, and SemEval 2010 Task 8. To simulate real-world data scarcity, the authors employed a "split-relation" setup. In this configuration, half of the relations in a dataset were used to train the DPO model, while the remaining half were reserved to test the model's ability to generate samples for entirely unseen relations.

Key Results and Insights

The Performance of Synthetic Data

A significant finding of the study is the "Smaller is Better" paradox: training a smaller, specialized RE model (such as KnowPrompt) on LLM-generated synthetic data consistently outperformed direct inference using the LLM itself. For instance, on the Re-TACRED dataset, direct LLM inference achieved an F1 score of 33.30, whereas a smaller model trained on the authors' synthetic data reached 50.72 F1. This suggests that LLMs are more effective as high-level data architects than as direct task executors in few-shot scenarios.

Quantifying Diversity

The combination of the OBO approach and DPO fine-tuning significantly improved the linguistic variety of the output. Diversity metrics showed that the average cosine similarity between generated samples dropped from approximately 0.15 to 0.08. Ablation studies confirmed that removing the DPO component led to a sharp decline in performance, indicating that explicit structural incentives are necessary to overcome the LLM's natural tendency toward imitation.

The 32-Sample Ceiling

The researchers identified a practical limit to synthetic generation: performance typically peaks at approximately 32 generated samples per relation. Beyond this point, the LLM often exhausts its internal variety for a specific relation, leading to diminishing returns and a plateau in the quality of the resulting training set.

Conclusion and Future Work

This research demonstrates that LLMs can be powerful engines for data augmentation in Relation Extraction if their tendency toward repetition is actively managed. By combining iterative in-context learning with Direct Preference Optimization, the authors provide a pathway to creating high-quality, diverse synthetic datasets that empower smaller models to exceed the performance of their larger generators. Future work may explore human-in-the-loop refinements to further push the "32-sample ceiling" and handle increasingly complex or technical linguistic nuances.

Summary updated

BibTeX
@inproceedings{li2025generating,
  author = {Zexuan Li and Hongliang Dai and Piji Li},
  title = {{Generating Diverse Training Samples for Relation Extraction with Large Language Models}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure