[论文解读] 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
论文系统地比较从零开始训练、冻结特征和PEFT(QLoRA 和 DoRA)在 DINOv3 上对九种奶牛行为的表现,在 98:1 的测试/训练 regime 下,PEFT 在训练数据和资源需求显著更少的情况下实现了最先进的准确性。
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.
研究动机与目标
- 在有限标注数据的前提下评估视觉模型对农业影像的泛化能力。
- 系统比较三种学习范式:从零开始训练、冻结特征提取以及在万亿参数基础模型上的 PEFT。
- 评估 QLoRA 与 DoRA 的 PEFT 超参数(秩和目标模块)。
- 为使用基于 PEFT 的基础模型的工业畜牧监控提供实际部署指南。
提出的方法
- 使用 PEFT(QLoRA 与 DoRA)对 DINOv3(6.7B 参数)进行微调。
- 将骨干量化为 4 位,并注入低秩适配器;在 {8,16,64} 的秩和目标模块 {q_proj, all-linear} 下变化。
- 训练 80 个 epoch,批量大小 4(梯度累积后有效为 32),学习率 1e-4,使用热身和余弦衰减;采用混合精度与梯度检查点。
- 数据:2160 张训练图像(9 种行为中每类 80%)带增强训练集;540 张验证和 211800 张测试样本,来自两个来源(MMCows、PlayBehaviour)。
- 评估指标:准确率、加权 F1 分数、逐类指标;推理的延迟与吞吐量。
实验结果
研究问题
- RQ1PEFT 是否能够在极少量训练数据的前提下使千亿参数的视觉模型在农业图像分类中实现有竞争力的表现?
- RQ2在不同适配器配置下,QLoRA 与 DoRA 在准确性、训练效率与稳定性方面的比较?
- RQ3适配器容量(秩)与范围(q_proj vs all-linear)对泛化与过拟合的影响?
- RQ4预训练特征提取器或完全微调在畜禽行为分类中是否优于 PEFT?
- RQ5在精准畜牧养殖中部署基于 PEFT 的基础模型的实际指南?
主要发现
| Method | Target | Rank | Trainable Params | Training Time | Test Acc | Test F1 |
|---|---|---|---|---|---|---|
| ResNet-18 (scratch) | — | — | 11.2M (100%) | 16h 45m | 72.87% | 0.7526 |
| ViT-Small (scratch) | — | — | 21.7M (100%) | 18h 39m | 61.91% | 0.6600 |
| DINOv3 (frozen) | — | — | 4.7M (0.07%) | 17h 27m | 76.56% | 0.7691 |
| QLoRA | q_proj | 8 | 2.6M (0.04%) | 6h 32m | 77.17% | 0.7646 |
| QLoRA | q_proj | 16 | 5.2M (0.08%) | 7h 16m | 78.38% | 0.7753 |
| QLoRA | all-linear | 16 | 46.8M (0.70%) | 4h 43m | 80.40% | 0.8069 |
| QLoRA | all-linear | 64 | 183.0M (2.72%) | 5h 46m | 83.16% | 0.8380 |
| DoRA | q_proj | 8 | 2.8M (0.04%) | 11h 31m | 81.53% | 0.8182 |
| DoRA | q_proj | 16 | 5.4M (0.08%) | 10h 27m | 81.03% | 0.8153 |
| DoRA | all-linear | 16 | 48.4M (0.72%) | 11h 51m | 81.23% | 0.8139 |
| DoRA | all-linear | 64 | 184.5M (2.75%) | 10h 59m | 83.14% | 0.8338 |
- PEFT 在 nine-class 奶牛行为任务上显著优于从零开始训练和冻结特征提取;最佳 QLoRA 配置(all-linear,秩=64)实现 83.16% 测试准确率。
- DoRA 在训练时间略长于最佳 QLoRA 设置的情况下,达到可比的表现(83.14% 测试准确率)。
- 提高适配器容量(更高秩或更广的目标模块)总体上提升泛化而非导致过拟合,表明主要挑战是欠拟合。
- QLoRA 与 DoRA 在最优设置下仅使用极少量可训练参数即可达到约 83% 的测试准确率(占总参数的比例低至 0.04% 到 2.72%)。
- PEFT 配置的训练时间显著减少(如 QLoRA all-linear 64 为 5h 46m),相较于全微调基线(最高约 18h)。
- 在不同配置下,QLoRA 与 DoRA 对适配器选择表现出不同的敏感性,DoRA 往往提供更稳定的性能。
更好的研究,从现在开始
从论文设计到论文写作,大幅缩短您的研究时间。
无需绑定信用卡
本解读由 AI 生成,并经人工编辑审核。