arXiv:2411.03250cs.LGcs.AI2024-11ACL被引 16

用扩散模型提升语言模型生成结构化数据的可控性与质量

DiffLM: Controllable Synthetic Data Generation via Diffusion Language Models

  • 基于VAE与扩散模型,学习更贴近真实分布的隐变量空间
  • 在7个真实数据集上,生成数据使下游任务表现优于真实数据2%-7%
  • 支持插件式特征注入,可灵活控制生成内容,适合数据增强场景

大型语言模型(LLMs)在知识和生成能力上的进步推动了高质量数据合成的需求。然而,仅通过提示词生成合成数据仍面临挑战,主要源于LLM对目标数据分布理解有限以及提示工程复杂,尤其在结构化数据(如表格、代码、工具数据)上。为此,我们提出DiffLM,一种基于变分自编码器(VAE)的可控数据合成框架,其创新点包括:(1)引入扩散模型以保留原始数据分布和格式结构信息;(2)通过即插即用的隐特征注入模块,将目标分布知识学习与LLM生成目标解耦。由于发现VAE隐表示与真实数据分布存在显著差异,我们在框架中加入隐扩散模块,以学习更具表达力的隐空间分布。在七个包含结构化格式的真实数据集上的评估表明,DiffLM生成的数据在下游任务中表现优于真实数据2%-7%。相关数据与代码已开源。

原文摘要 · Abstract (English)

Recent advancements in large language models (LLMs) have significantly enhanced their knowledge and generative capabilities, leading to a surge of interest in leveraging LLMs for high-quality data synthesis. However, synthetic data generation via prompting LLMs remains challenging due to LLMs' limited understanding of target data distributions and the complexity of prompt engineering, especially for structured formatted data. To address these issues, we introduce DiffLM, a controllable data synthesis framework based on variational autoencoder (VAE), which further (1) leverages diffusion models to reserve more information of original distribution and format structure in the learned latent distribution and (2) decouples the learning of target distribution knowledge from the LLM's generative objectives via a plug-and-play latent feature injection module. As we observed significant discrepancies between the VAE's latent representations and the real data distribution, the latent diffusion module is introduced into our framework to learn a fully expressive latent distribution. Evaluations on seven real-world datasets with structured formatted data (i.e., Tabular, Code, and Tool data) demonstrate that DiffLM generates high-quality data, with performance on downstream tasks surpassing that of real data by 2%-7% in certain cases. Data and code are available at https://github.com/bytedance/DiffLM.

数据合成扩散模型可控生成

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