arXiv:2410.18194cs.LGcs.AI2024-10被引 1

用压缩算法衡量数据与任务的匹配度,选出更优训练数据

ZIP-FIT: Embedding-Free Data Selection via Compression-Based Alignment

  • 用gzip压缩度直接评估数据与目标任务的匹配程度
  • 选中的数据使模型损失下降速度比基线快85.1%
  • 适合需要高效微调的语言模型任务

数据选择对提升语言模型在特定任务上的表现至关重要,但现有方法多忽略任务分布特性。当前方法或完全无视任务需求,或依赖简化且易出错的表示(如哈希n-gram特征),导致误判。本文提出ZIP-FIT框架,利用gzip压缩率直接衡量潜在训练数据与目标任务分布之间的对齐程度。在自动形式化和Python代码生成任务上,基于ZIP-FIT筛选的数据使模型交叉熵损失下降速度比主流基线DSIR和D4快最多85.1%。同时,其数据选择效率比DSIR快65.8%,比D4快两个数量级。实验表明,小而高质量的对齐数据集常优于大但不精准的数据集,证明高质量数据胜过低质量大数据。结果表明,任务感知的数据选择对高效领域适配至关重要,压缩提供了一种可解释的对齐测量方式。

原文摘要 · Abstract (English)

Data selection is crucial for optimizing language model (LM) performance on specific tasks, yet most existing methods fail to effectively consider the target task distribution. Current approaches either ignore task-specific requirements entirely or rely on approximations that fail to capture the nuanced patterns needed for tasks like Autoformalization or code generation. Methods that do consider the target distribution often rely on simplistic, sometimes noisy, representations, like hashed n-gram features, which can lead to collisions and introduce noise. We introduce ZIP-FIT, a data selection framework that uses gzip compression to directly measure alignment between potential training data and the target task distribution. In extensive evaluations on Autoformalization and Python code generation, ZIP-FIT significantly outperforms leading baselines like DSIR and D4. Models trained on ZIP-FIT-selected data achieve their lowest cross-entropy loss up to 85.1\% faster than baselines, demonstrating that better task alignment leads to more efficient learning. In addition, ZIP-FIT performs selection up to 65.8\% faster than DSIR and two orders of magnitude faster than D4. Notably, ZIP-FIT shows that smaller, well-aligned datasets often outperform larger but less targeted ones, demonstrating that a small amount of higher quality data is superior to a large amount of lower quality data. Our results imply that task-aware data selection is crucial for efficient domain adaptation, and that compression offers a principled way to measure task alignment. By showing that targeted data selection can dramatically improve task-specific performance, our work provides new insights into the relationship between data quality, task alignment, and model learning efficiency.

数据选择任务对齐压缩语言模型

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。