Source-linked AI summary
LentEx: Generalizable Latent Entity Extraction via Synthetic Data and Instruction-Tuned LLMs
Umesh Bodhwani, Yuan Ling, Cibi Chakravarthy Senthilkumar, Shujing Dong, Yarong Feng, Hongfei Li, Ayush Goyal
TL;DR
Latent entity extraction identifies implicit, contextually inferred entities, but LLM applications to the task remain largely unexplored. LentEx uses synthetic data and instruction fine-tuning to train smaller LLMs, outperforming baselines across most datasets with the highest average v-measure score of 59.54 versus NV-Embed-v2 (58.46).
Problem
LLM applications to latent entity extraction remain largely unexplored, despite the task’s role in enriching RAG document filtering with contextually inferred entities.
Source: §I · p. 1Method
LentEx uses template-based synthetic data and instruction fine-tuning to train smaller LLMs for latent entity extraction.
Source: §I · pp. 1–2Results
Across most datasets, LentEx outperformed embedding- and prompting-based baselines, with the highest average v-measure score of 59.54 versus NV-Embed-v2 (58.46).
Source: B. Clustering with Latent Entity… · p. 5Takeaways & Limitations
The evaluations support LentEx as a generalizable approach for latent entity extraction across domains and tasks, including clustering and RAG.
Source: §VIII · p. 7LentEx’s retrieval filtering needs further refinement to address an observed drop in Recall.
Source: §VIII · p. 7
Abstract
from arXiv · showhide
Latent entity extraction (LEE) tackles the challenge of identifying implicit, contextually inferred entities within free text-an area where traditional entity extraction methods fall short. In this paper, we introduce LentEx, a novel framework for latent entity extraction that leverages synthetic data generation and instruction fine-tuning to optimize smaller, efficient large language models (LLMs). Latent entities, which are often abstract and thematic, are crucial for applications such as retrieval-augmented generation (RAG), customer persona analysis, and knowledge graph enrichment. LentEx addresses the scarcity of labeled datasets by employing a template-based approach to generate diverse, contextually rich synthetic data, ensuring high variability and alignment with real-world distributions. To our knowledge, LentEx is the first to systematically approach LEE through the lens of LLMs. LentEx demonstrates significant performance improvements across multiple tasks, notably surpassing state-of-the-art models on the MTEB Clustering Benchmark. Furthermore, our methodology enables robust generalization to unseen domains, making LentEx highly applicable in real-world NLP tasks, including RAG and clustering, thereby establishing a new paradigm for latent entity understanding and extraction in natural language processing.
I. INTRODUCTION
LEE infers abstract or thematic entities from context, unlike NER’s extraction of explicitly mentioned entities. LentEx addresses the largely unexplored use of LLMs for LEE with synthetic-data training of smaller models, targeting generalization across domains and downstream tasks.
Introduction
- LEE infers abstract or thematic entities from contextual cues, whereas NER identifies overtly mentioned entities such as people, organizations, or locations.Examples of latent entities include a conversation persona or an implied industry sector.Source: §I · p. 1
- Classification depends on predefined labels and retraining as categories emerge,, while topic modeling can produce uninterpretable clusters that lack nuanced, actionable entity information –.In RAG, extracting latent entities from queries and documents can improve document filtering and retrieval relevance.Source: §I · p. 1
- LentEx uses synthetic data generation and self-instruction to fine-tune smaller, efficient LLMs for latent entity extraction, aiming to generalize across domains.The resulting structured entities are intended to support clustering and RAG, as well as applications such as knowledge discovery and content personalization.Source: §I · p. 1
- LentEx formalizes domain-agnostic LEE and introduces template-based synthetic data generation that produces diverse datasets without manually curated seed data.The paper also reports that fine-tuning a small LLM on this data outperforms state-of-the-art embedding-based and generation-based methods on multiple downstream tasks.Source: §I · pp. 1–2
II. RELATED WORK
Prior topic-modeling and supervised extraction approaches limit entity granularity or adaptability, while recent synthetic-data methods address annotation costs. LentEx’s related-work framing emphasizes open-ended latent entity extraction and template-based data generation without curated seed data.
A. Latent Entity Extraction
- Topic models yield keyword clusters too coarse for actionable entity extraction, while supervised extraction depends on predefined labels for overt entities,, [14].Topic-modeling pipelines typically select an embedding space and post-process keyword clusters –.Source: A. Latent Entity Extraction · p. 2
- LentEx enables open-ended latent entity prediction for out-of-distribution data and new entity types without predefined labels or retraining.This flexibility is framed as a response to evolving real-world datasets and shifting data landscapes.Source: A. Latent Entity Extraction · p. 2
B. Synthetic Data Generation
- LentEx uses template-based synthetic data generation to create diverse, context-rich datasets without curated seed data, lowering the barrier to training.Prior approaches include Self-Instruct’s few-shot instruction generation [16], SeqGPT’s ChatGPT-based augmentation and labeling, and InstructPTS’s product-title generation [18].Source: B. Synthetic Data Generation · p. 2
III. LENTEX · A. Problem Definition
LEE identifies entities implied by a text rather than explicitly mentioned. LentEx formulates it as a flexible task that can support both unsupervised and supervised settings.
A. Problem Definition
- LEE identifies entities implied by the context of a text but not explicitly mentioned.The paper frames this as the problem LentEx addresses.Source: A. Problem Definition · pp. 2–3
- The formulation maps input text to an identified latent entity that is not contained in the input, with entity and text types specified.The formulation also allows an optional set of predefined labels for supervised learning.Source: A. Problem Definition · p. 3
- LEE supports unsupervised tasks such as topic modeling and clustering, as well as supervised tasks such as classification.This flexibility follows from the task formulation.Source: A. Problem Definition · p. 3
B. Method Overview
LentEx addresses labeled-data scarcity by combining synthetic data generation with instruction fine-tuning, enabling latent entity extraction across domains using smaller, efficient LLMs.
B. Method Overview
- LentEx combines synthetic data generation and instruction fine-tuning to address labeled-data scarcity and support cross-domain latent entity extraction with smaller, efficient LLMs.The approach is illustrated in Figure 1.Source: B. Method Overview · p. 3
C. Synthetic Data Generation
LentEx generates synthetic data through template-based domain combinations and Claude 3 Sonnet, then creates diverse text–latent-entity pairs and validates their variability with Rouge-L scores.
1) Template-Based Domain Generation:
- Few-shot prompting with Claude 3 Sonnet iteratively generates 100 unique text-type and latent-entity-type combinations, sampling prior domains and filtering duplicates.The prompt asks the model to identify a latent entity type from a given text type.Source: 1) Template-Based Domain Generation · p. 3
2) Synthetic Input-Output Instance Generation:
- Over 10 iterations per domain, Claude 3 Sonnet generates 10,000 synthetic text–label pairs, with over 80% scoring below 0.5 Rouge-L similarity.Each label is inferred from the context of its synthetically generated text.Source: 2) Synthetic Input-Output Instance… · p. 3
D. Instruction Fine-Tuning
LentEx builds instruction-tuning examples that pair structured prompts and input texts with inferred latent entities as targets, then fine-tunes Mistral-7B-Instruct using LoRA. Data filtering and paraphrased prompts are used to encourage contextual inference and reduce overfitting.
1) Training Data Construction:
- Training examples concatenate instruction templates, domain descriptions, latent entity types, and input texts, using the inferred latent entity as the target label.Source: 1) Training Data Construction · p. 3
- Instances with Rouge-L similarity scores above 0.5 are filtered out to prevent explicit entity mentions and require contextual inference.Source: 1) Training Data Construction · p. 3
- Paraphrased instruction templates, varied sequence structures, and subtle spacing and line-break changes are used to mitigate overfitting.Source: 1) Training Data Construction · pp. 3–4
- Table I presents prompts for workflow steps 1 and 2 and paraphrased prompts for step 3 instruction fine-tuning.Source: Table I · p. 4
2) Model Selection and Training:
- Mistral-7B-Instruct-v0.2 [20] was selected for superior performance among similarly sized models, and LoRA [21] for computational efficiency.Source: 2) Model Selection and Training · p. 4
- The model was fine-tuned with LoRA on four NVIDIA A10G GPUs for one epoch, using batch size 8, warmup ratio 0.01, and learning rate 0.0001.LoRA parameters were rank 16 and alpha 32.Source: 2) Model Selection and Training · p. 4
- The authors state that the methodology can extend to other models and training setups.Source: 2) Model Selection and Training · p. 4
IV. EXPERIMENTATION
The experiments evaluate LentEx’s latent-entity extraction, clustering, and retrieval performance across synthetic data and domain-specific tasks, alongside an LLM-based assessment of its outputs.
A. Latent Entity Extraction Performance
- LentEx achieved higher semantic similarity to synthetic reference labels than Mistral-7B-Instruct-v0.2 and Claude-3-Haiku.The evaluation compared predictions with labels across 5,000 sampled synthetic instances using all-mpnet-base-v2 embeddings.Source: A. Latent Entity Extraction Performance · p. 4
B. Clustering with Latent Entity Representations
- LentEx achieved the highest average v-measure score of 59.54, outperforming NV-Embed-v2 (58.46) and bge-en-icl (57.89), with paragraph-level gains on arxiv-p2p (61.42 vs. 56.46) and reddit-p2p (79.59 vs. 74.94).Source: B. Clustering with Latent Entity… · p. 5
3) Experimental Setup:
- On BioASQ, RAG+LentEx achieved the highest scores across all metrics: P 0.742, R 0.595, and F1 0.66.On COLIEE, it achieved the highest precision (0.792), competitive recall (0.681), and F1 0.732, versus baseline RAG’s F1 0.199; its precision also exceeded CAPTAIN’s (0.792 vs. 0.787).Source: Table IV · p. 5, 3) Experimental Setup · p. 6
1) Datasets:
- COLIEE and BioASQ evaluation used domain-specific latent entities as pre-filters, covering legal queries and biomedical summary questions.COLIEE comprised 100 queries and 375 supporting documents; BioASQ-2023 11b Phase A used 1,130 training questions and 4,719 supporting documents.Source: 1) Datasets · p. 5
2) Baselines:
- RAG+LentEx was compared with standard RAG and four entity-extraction or topic-modeling variants under identical retrieval and embedding configurations.The variants were RAG+Mistral, RAG+Claude, RAG+NER, and RAG+Topic Modeling.Source: 2) Baselines · p. 5
3) Experimental Setup:
- LentEx dynamically adjusted query-filter combinations and restrictiveness to address the risk that too much filtering excludes relevant documents while too little admits irrelevant ones.It extracted entities from paragraphs into metadata and from queries at inference, then reranked retrieved results with msmarco-MiniLM-L-6-v2; chunks were limited to 512 tokens with 10-token overlap.Source: 3) Experimental Setup · pp. 5–6
D. LLM as an Evaluator
- 98.4% of LentEx outputs were rated correct and precise or relevant but generic, outperforming both baseline models.Claude-3.5-Sonnet classified responses into three categories, with output order shuffled for unbiased assessment.Source: D. LLM as an Evaluator · p. 6, Figure 4 · p. 6
V. ABLATION STUDIES
The ablations show that performance improves with training data up to 6,000 samples, while paired synthetic input-label generation produces high data quality and outperforms independent label generation.
A. Impact of Dataset Size on Model Fine-Tuning
- Performance improved with progressively larger training subsets up to 6,000 samples, then plateaued, indicating sufficient data for fine-tuning under the current setup.Source: A. Impact of Dataset Size on Model… · p. 6
B. Effect of Synthetic Data Generation on Data Quality
- 98% of sampled inputs aligned and 91.5% of labels were correct; independent label generation reached 91% correctness, while generating pairs in one call improved data quality [16].The manual assessment covered 2,000 randomly sampled examples, with 20 from each domain.Source: B. Effect of Synthetic Data Generation… · pp. 6–7, Table V · p. 7
VI. RESULTS AND DISCUSSION
LentEx uses synthetic data generation and instruction fine-tuning to extract latent entities, with reported generalization across diverse real-world datasets despite training exclusively on synthetic data.
VI. RESULTS AND DISCUSSION
- Trained exclusively on synthetic data, LentEx generalizes across 11 MTEB clustering benchmarks in scientific literature, social media, and news, plus legal COLIEE and biomedical BioASQ retrieval datasets.The paper attributes this transfer to synthetic data that captures the complexity and distribution of naturally occurring text.Source: §VI · p. 7
- LentEx also performs in zero-shot settings, extending its reported versatility beyond the evaluated datasets.Source: §VI · p. 7
- Integrating LentEx into Retrieval-Augmented Generation systems boosts retrieval relevance and precision.Source: §VI · p. 7
- LentEx performs optimally with a moderate dataset size, balancing data quality and diversity in a practical, cost-effective approach for low-resource settings.Source: §VI · p. 7
VII. ERROR ANALYSIS
LentEx’s errors arise from ambiguous latent-entity assignments in clustering and incomplete extraction that over-restricts document filtering in RAG. The paper proposes domain-specific fine-tuning and adaptive entity selection as ways to address these limitations.
VII. ERROR ANALYSIS
- In clustering, ambiguous assignments among multiple latent entities can produce suboptimal selections and misclassified clusters, especially when entity types are generic.The paper highlights twenty-newsgroups and stackexchange as examples.Source: §VII · p. 7
- In RAG, incomplete latent-entity extraction can over-restrict filtering and exclude relevant documents, particularly in COLIEE’s intersecting legal categories.A query that fails to capture all relevant entities may miss case-law documents spanning categories such as contract and tort law.Source: §VII · p. 7
- The paper suggests domain-specific fine-tuning and adaptive entity selection to mitigate these limitations in real-world applications.Source: §VII · p. 7
VIII. CONCLUSION AND FUTURE WORK
LentEx uses synthetic data generation and instruction fine-tuning to address labeled-data scarcity, with experiments demonstrating generalization across domains and tasks, including clustering and retrieval-augmented generation. Future work targets retrieval filtering, training methods, complex domain-specific tasks, and ethical concerns.
VIII. CONCLUSION AND FUTURE WORK
- LentEx addresses labeled-data scarcity with synthetic data generation and instruction fine-tuning, and outperforms state-of-the-art models across multiple domains and tasks.Experiments also validate its efficacy on clustering and retrieval-augmented generation, where it enhances the quality and relevance of retrieved results.Source: §VIII · p. 7
- Future retrieval-augmented systems should refine filtering mechanisms to address the observed drop in Recall, potentially using adaptive, context-aware retrieval strategies.Source: §VIII · p. 7
- Further research could explore self-supervised training, contrastive learning, and reinforcement learning, and apply LentEx to domain-specific temporal reasoning and multi-hop inference.Source: §VIII · p. 7
- Future work should integrate LEE's structured representations into knowledge graphs, search engines, and recommendation systems, while addressing ethical concerns and potential model biases.Source: §VIII · p. 7
Related papers
This paper cites
- Language Models are Few-Shot Learners2020
- Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer2019
- Retrieval-Augmented Generation for Knowledge-Intensive NLP Tasks2020
- Self-Instruct: Aligning Language Models with Self-Generated Instructions2022
- MiniLM: Deep Self-Attention Distillation for Task-Agnostic Compression of Pre-Trained Transformers2020
- MTEB: Massive Text Embedding Benchmark2022