用少量数据高效微调大模型,实现精准养殖行为识别
Exploring parameter-efficient fine-tuning (PEFT) of billion-parameter vision models with QLoRA and DoRA: insights into generalization for limited-data image classification under a 98:1 test-to-train regime
- 采用QLoRA和DoRA技术,仅调整2.7%参数实现高精度
- 在98:1数据比下达到83.16%准确率,远超传统方法
- 适合农业图像数据少、算力有限的场景应用
自动化行为分类对精准畜牧养殖至关重要,但面临计算成本高与标注数据少的挑战。本研究系统比较了三种方法:从头训练(ResNet-18、ViT-Small)、冻结特征提取,以及对DINOv3基础模型(67亿参数)进行参数高效微调(PEFT)。评估了QLoRA和DoRA在不同配置下的表现,包括秩(8、16、64)和目标模块(q_proj vs 所有线性层)。基于2,160张验证训练图像,在211,800张测试样本上评估模型泛化能力,测试集占比达98:1。结果表明,PEFT显著优于其他方法:最佳QLoRA配置(所有线性层+秩=64)在5.8小时内实现83.16%测试准确率,仅需2.72%参数(1.83亿),而ResNet-18为72.87%(16.8小时),ViT-Small为61.91%(18.7小时),冻结DINOv3为76.56%(17.5小时)。DoRA同样达到83.14%准确率,但耗时更长(11.0小时)。增加适配器容量持续提升泛化性能,且未引发过拟合:秩从16降至8,准确率由78.38%降至77.17%;从仅q_proj扩展至所有线性层(秩=64),准确率从78.38%升至83.16%。这表明适应农业图像时,主要挑战是欠拟合而非过拟合。研究为在畜牧应用中部署百亿参数视觉模型提供了实践指导。
原文摘要 · Abstract (English)
Automated behavior classification is essential for precision livestock farming but faces challenges of high computational costs and limited labeled data. This study systematically compared three approaches: training from scratch (ResNet-18, ViT-Small), frozen feature extraction, and parameter-efficient fine-tuning (PEFT) of the DINOv3 foundation model (6.7 billion parameters). We evaluated QLoRA and DoRA across multiple configurations varying rank (8, 16, 64) and target modules (q_proj versus all-linear layers). With 2,160 verified training images, we assessed generalization of our model on 211,800 test samples, which is essentially a 98:1 test-to-train ratio. Results demonstrated that PEFT substantially outperformed alternatives, where the best QLoRA configuration (all-linear layers and rank=64) achieved 83.16% test accuracy with only 2.72% parameters (183.0M) in 5.8 hours, compared to 72.87% for ResNet-18 (16.8 hours), 61.91% for ViT-Small (18.7 hours), and 76.56% for frozen DINOv3 (17.5 hours). DoRA achieved comparable accuracy (83.14%) but with longer training time (11.0 hours). Notably, increasing adapter capacity consistently improved generalization while simultaneously not causing overfitting: reducing rank from 16 to 8 decreased test accuracy from 78.38% to 77.17%, while expanding from q_proj-only to all-linear layers with rank=64 improved accuracy from 78.38% to 83.16%. This suggests underfitting, instead of overfitting, is the primary challenge when adapting foundation models to agricultural imagery. Our findings provide guidelines for deploying billion-parameter vision models with PEFT in agricultural livestock applications.
Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。