arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2406.03146cs.CVcs.LG
收藏

小数据生成小模型:面向少样本蒸馏的文本与空文本反转

Tiny models from tiny data: Textual and null-text inversion for few-shot distillation

Chalmers University of Technology(查尔姆斯理工大学)

Erik Landolsi, Fredrik Kahl

AI总结:

针对少样本蒸馏中无标注数据不足的问题,提出结合文本反转多样性与空文本反转特异性的扩散模型反转技术TINT,提升了小型学生模型准确率与速度,并通过理论分析降低评估计算量。

摘要:

少样本学习解决的是仅用极少量训练样本完成图像分类等任务的问题。近期的视觉基础模型展现出出色的少样本迁移能力,但模型体积大、推理速度慢。通过知识蒸馏,可将高性能但速度慢的模型的能力迁移到小巧高效的模型中。然而,常用的蒸馏方法需要大量无标注数据,这在少样本场景下无法获取。为解决数据不足的问题,近期学界开始关注合成数据的使用。我们拓展了这一研究方向,提出了一种新颖的扩散模型反转技术TINT,该技术结合了文本反转的多样性与空文本反转的特异性。将该方法应用于少样本蒸馏流程后,在主流基准测试上,小型学生模型的准确率达到了当前最优水平,同时速度远快于已有方法。主流的少样本基准需要在大量情境(episode)上进行评估,这对于涉及合成数据生成的方法来说计算负担很重。我们还对准确率估计器的方差如何依赖于情境数量和查询样本数量进行了理论分析,并利用这些结果降低了方法评估所需的计算量。最后,为进一步说明生成模型在少样本蒸馏中的价值,我们证明了我们的方法性能优于使用从扩散模型原始训练数据集中挖掘的真实数据训练的效果。源代码可在https://github.com/pixwse/tiny2获取。

英文摘要:

Few-shot learning deals with problems such as image classification using very few training examples. Recent vision foundation models show excellent few-shot transfer abilities, but are large and slow at inference. Using knowledge distillation, the capabilities of high-performing but slow models can be transferred to tiny, efficient models. However, common distillation methods require a large set of unlabeled data, which is not available in the few-shot setting. To overcome this lack of data, there has been a recent interest in using synthetic data. We expand on this line of research by presenting a novel diffusion model inversion technique (TINT) combining the diversity of textual inversion with the specificity of null-text inversion. Using this method in a few-shot distillation pipeline leads to state-of-the-art accuracy among small student models on popular benchmarks, while being significantly faster than prior work. Popular few-shot benchmarks involve evaluation over a large number of episodes, which is computationally cumbersome for methods involving synthetic data generation. We also present a theoretical analysis on how the accuracy estimator variance depends on the number of episodes and query examples, and use these results to lower the computational effort required for method evaluation. Finally, to further motivate the use of generative models in few-shot distillation, we demonstrate that our method outperforms training on real data mined from the dataset used in the original diffusion model training. Source code is available at https://github.com/pixwse/tiny2.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑