用几何距离筛选大模型生成文本,提升少样本分类效果
Geometric Filtering of LLM-Generated Samples for Few-Shot Text Classification

- 根据生成样本与真实样本的嵌入距离,筛选语义一致的数据
- 在13个数据集上平均提升2.61个百分点,显著优于SMOTE
- 方法简单有效,适配多种任务和大模型,无需调参
大型语言模型(LLM)可生成用于文本分类的合成训练数据,但生成样本质量参差不齐:部分位于正确类别嵌入区域,部分则落在边缘或跨类别区域。本文提出一种基于几何过滤的框架,通过计算生成样本与真实样本在句子嵌入空间中的欧氏距离,仅保留几何一致性高的候选样本,并采用软加权机制将过滤得分转化为训练权重。在13个数据集、5种分类器、10种增强方法及超过6,700种配置下评估,该方法相较SMOTE平均提升2.61个百分点(p<0.0001,Cohen's d=0.95,88.9%胜率)。该方法可直接推广至命名实体识别任务(+9.26个百分点,100%胜率),且对来自4家厂商的5种LLM均表现稳健。关键发现是:最简单的距离基过滤器始终优于复杂多准则方案。
原文摘要 · Abstract (English)
Large language models (LLMs) can generate synthetic training data for text classification, but the quality of generated samples is heterogeneous: some fall in correct class regions of the embedding space while others land in peripheral or cross-class zones. We propose a geometric filtering framework that evaluates each LLM-generated sample by its Euclidean distance to real class examples in a sentence embedding space, selecting only geometrically consistent candidates. A soft weighting mechanism transforms filter scores into sample weights for classifier training. Evaluated across 13 datasets, 5 classifiers, 10 augmentation methods, and over 6,700 configurations, our method achieves +2.61 percentage points (pp) over SMOTE ($p<0.0001$, Cohen's $d=0.95$, 88.9% win rate). The approach generalizes to named entity recognition (+9.26pp, 100% win rate) without filter modification, and is robust across 5 LLMs from 4 providers. A key finding is that the simplest distance-based filter consistently outperforms complex multi-criteria alternatives.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。