A parameter-efficient ensemble from a single training trajectory — calibrated, uncertainty-aware segmentation with SegFormer and Mask2Former.
Reliable decision-support in digital agriculture requires not only accurate predictions but also well-calibrated uncertainty estimates, particularly for dense prediction tasks such as semantic segmentation. While ensemble methods provide strong uncertainty quantification, their computational and memory demands limit practical applicability, whereas single-model approximations often compromise uncertainty quality for efficiency. We propose ST-LoRA, a parameter-efficient ensemble framework that constructs diverse ensemble members from a single training trajectory by combining Low-Rank Adaptation (LoRA) with snapshot ensembling. Each member shares a frozen pretrained backbone and differs only in its lightweight low-rank adapters, reducing trainable parameters to less than 10% of the full model while preserving ensemble diversity. We conduct a comprehensive evaluation across two agricultural datasets — GrowliFlower-L (cauliflower, close-range/open field) and BUP20 (sweet pepper, close-range/glasshouse) — using SegFormer and Mask2Former architectures. Our evaluation covers in-distribution performance, calibration under distribution shift, and out-of-distribution detection. Extensive ablation reveals that feed-forward layers are the critical LoRA target for dense prediction — contrary to the attention-only convention established in language models. ST-LoRA matches or exceeds full-rank ensembles in segmentation accuracy and calibration across both datasets and architectures, while significantly reducing training time, inference latency, memory footprint, and storage requirements. Compared to efficient baselines including Snapshot Ensemble, MC Dropout, and Deep Deterministic Uncertainty, ST-LoRA consistently matches or outperforms them in image/pixel level out-of-distribution detection, calibration stability under distribution shift, and cross-seed variance, while requiring significantly fewer parameters and lower computational overhead. These results indicate that LoRA efficient ensemble adaptation is not merely a coarse approximation to full-rank ensembling, but rather a highly effective approach that offers a compelling efficiency-performance trade-off, making it a strong and practical competitor for uncertainty-aware agricultural vision systems.
A short walkthrough of the method and findings.
One training trajectory → many ensemble members.
Released as self-contained, reproducible experiments.
ST-LoRA (rank 8) vs full fine-tuning (no augmentation): mIoU, all calibration metrics, and efficiency — trainable parameters, wall-clock, GPU energy, CO₂.
Mask2FormerSegFormerEoMTHow rank, scaling α, dropout and target modules affect the ST-LoRA ensemble — with structural variants (encoder-only, decoder full-FT) and an FFN-vs-attention efficiency study.
rankαdropouttargetsRobustness under photometric and geometric corruptions: augmentation importance (SegFormer / GrowliFlower-L) and component sensitivity (Mask2Former / BUP20).
mIoUECEshiftST-LoRA and FRE vs MC-Dropout, DDU and post-hoc calibration — in-distribution, under shift, and image/pixel OoD (GrowliFlower-L, BUTom21), with significance testing.
MC-DropoutDDUcalibrationOoDEnsemble-member diversity vs LR schedule & augmentation, qualitative success/failure panels, per-class mIoU + calibration, and an ensemble-size ablation.
diversityper-classensemble sizeDatasets: BUP20 (sweet pepper) · GrowliFlower-L (cauliflower) · BUTom21 (tomato).
@article{farag2026stlora,
title = {ST-LoRA: Single-Trajectory LoRA Ensemble for Uncertainty-Aware Agricultural Segmentation},
author = {Farag, Mohamed and Hoxha, Genc and Maleki, Yahya and McCool, Chris and Roscher, Ribana},
journal = {arXiv preprint arXiv:2608.01530},
year = {2026}
}