用树形聚类精挑细选待评估文档,大幅减少大模型调用次数。
TBDFiltering: Sample-Efficient Tree-Based Data Filtering
- 基于文本嵌入构建分层聚类,自适应选择需评估的文档
- 只需少量评估即可高概率准确判断全部文档质量
- 适合大规模语料筛选,尤其对资源有限的研究者友好
机器学习模型的性能高度依赖训练数据质量。为大型语言模型(LLMs)筛选高质量、多样化的训练数据极具挑战,因缺乏廉价可靠的评估指标。虽然常通过查询现有LLM来评估文档质量,但面对数十亿级文档时难以扩展。当前实践多采用在稀疏质量信号上训练的分类器。本文提出一种基于文本嵌入的分层聚类方法,可自适应选择由LLM评估的文档以估计簇质量。我们证明该方法具有查询高效性:若分层聚类中存在一个子树,其叶簇足够纯净(即几乎全为优质或劣质文档),则高概率下仅需评估少量文档即可正确预测所有文档质量。所需评估文档数与最小纯叶簇子树的规模成正比,且算法无需事先知晓该子树。在全面实验中,本方法优于其他基于分类器的过滤方法。
原文摘要 · Abstract (English)
The quality of machine learning models depends heavily on their training data. Selecting high-quality, diverse training sets for large language models (LLMs) is a difficult task, due to the lack of cheap and reliable quality metrics. While querying existing LLMs for document quality is common, this is not scalable to the large number (billions) of documents used in training. Instead, practitioners often use classifiers trained on sparse quality signals. In this paper, we propose a text-embedding-based hierarchical clustering approach that adaptively selects the documents to be evaluated by the LLM to estimate cluster quality. We prove that our method is query efficient: under the assumption that the hierarchical clustering contains a subtree such that each leaf cluster in the tree is pure enough (i.e., it mostly contains either only good or only bad documents), with high probability, the method can correctly predict the quality of each document after querying a small number of documents. The number of such documents is proportional to the size of the smallest subtree with (almost) pure leaves, without the algorithm knowing this subtree in advance. Furthermore, in a comprehensive experimental study, we demonstrate the benefits of our algorithm compared to other classifier-based filtering methods.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。