用难例筛选法精简数据集,训练效率翻倍且效果几乎不变。
Text2Cypher: Data Pruning using Hard Example Selection
- 从文本转图数据库查询数据集中挑选难例进行训练。
- 训练时间与成本减半,准确率下降不足1%。
- 适合资源有限但追求高效训练的开发者使用。
关系型数据库和图数据库的查询语言(如SQL、Cypher)已被广泛采用。近年来,大语言模型(LLMs)使自然语言与数据库交互成为可能,例如Text2SQL和Text2Cypher模型。这些模型的微调通常需要大规模、多样化的非平凡数据集,但随着数据量增加,训练成本也随之上升。因此,构建更小但高质量的数据集对降低训练成本至关重要。本文提出了五种用于文本转Cypher数据集的难例选择技术,旨在减少数据量的同时保持或提升性能。实验表明,该方法可将训练时间与成本减半,对性能影响极小,证明了难例选择是一种高性价比的解决方案。
原文摘要 · Abstract (English)
Database query languages such as SQL for relational databases and Cypher for graph databases have been widely adopted. Recent advancements in large language models (LLMs) enable natural language interactions with databases through models like Text2SQL and Text2Cypher. Fine-tuning these models typically requires large, diverse datasets containing non-trivial examples. However, as dataset size increases, the cost of fine-tuning also rises. This makes smaller, high-quality datasets essential for reducing costs for the same or better performance. In this paper, we propose five hard-example selection techniques for pruning the Text2Cypher dataset, aiming to preserve or improve performance while reducing resource usage. Our results show that these hard-example selection approaches can halve training time and costs with minimal impact on performance, and demonstrates that hard-example selection provides a cost-effective solution.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。