Manuscript Offprint

arXiv:2608.26771

Cross-Architecture Knowledge Distillation from a Vision Foundation Model to a Lightweight Visual State Space Model for Tea Leaf Disease Classification

Zibo Zhou, Zongsen Qiu, Rui Chen, Yujie Yao, Yue Zhou, Jianjun Wang

Zibo Zhou, Zongsen Qiu, Rui Chen, Yujie Yao, Yue Zhou, Jianjun Wang

Abstract—Automated tea leaf disease classification supports precision agriculture, yet deploying accurate models on edge devices remains challenging under tight compute budgets. Self-supervised vision foundation models such as DINOv2 provide strong features but are too large for field deployment, while lightweight models trained from scratch on small agricultural datasets often underfit. We study cross-architecture knowledge distillation (KD) from a fine-tuned DINOv2 teacher (a Vision Transformer) to a compact bidirectional Visual State Space Model (LVSSM) student, a direction that is comparatively underexplored because the two architectures use fundamentally different token-mixing mechanisms. We first identify and fix two training-stability problems that otherwise prevent our from-scratch SSM student from learning on limited data: a single large patch-embedding convolution and a fusion layer that severs the residual path. With a progressive convolutional stem and a gated bidirectional selective-scan block, the 4.45M-parameter student trains stably. Averaged over three seeds, temperature-scaled logit distillation raises test accuracy from 92.32±2.14%92.32 \pm 2.14\% (standalone) to 95.41±1.17%95.41 \pm 1.17\% (best single run 96.20%, macro-F1 94.45%), a +3.09 percentage-point mean gain that also reduces run-to-run variance, while the model uses 5.0×5.0 \times fewer parameters than the 22M-parameter teacher and retains 98.3% of its accuracy. Through controlled ablations that hold the distillation weight fixed, we find that adding intermediate feature-alignment losses reduces accuracy, so simple logit-level KD is the strongest configuration for this ViT→SSM transfer. A fair from-scratch comparison shows the gain is specific to students that start below the teacher: the same recipe helps the SSM but not from-scratch CNNs that already match the teacher. We report per-class metrics, confusion matrices, bootstrap confidence intervals, and FLOPs/latency measurements, and we discuss the limitations of the study, including its single-dataset scope and the use of a simplified (non-official) SSM implementation.

Index Terms—Knowledge distillation, state space models, cross-architecture transfer, tea leaf disease classification, precision agriculture, edge deployment

I. INTRODUCTION

Tea is among the most widely consumed beverages worldwide, and its yield and quality depend on timely detection of foliar diseases. Manual inspection is labor-intensive and subjective, which motivates automated image-based classification. While deep learning has advanced plant disease recognition substantially, deploying high-accuracy models on the resource-constrained edge devices typical of agricultural settings remains an open problem.

Self-supervised vision foundation models, particularly DI-NOv2 [1], achieve strong transfer accuracy across visual tasks. However, even their smaller variants (~22M parameters) are expensive for embedded inference. Conversely, compact architectures trained from scratch on small agricultural datasets frequently fail to learn discriminative features and generalize poorly.

State Space Models (SSMs), and the selective-scan Mamba formulation [2] in particular, offer linear-time sequence modeling and have been adapted to vision by Vision Mamba (Vim) [3] and VMamba [4]. Their favorable complexity makes SSMs attractive for edge deployment. However, training vision SSMs from scratch on small datasets is difficult: the bidirectional scan is prone to unstable gradient flow, and naive patch embeddings provide little local inductive bias.

Knowledge distillation (KD) [5] is a natural way to transfer the knowledge of a large teacher into a compact student. Most KD literature targets same-family transfer (CNN→CNN, ViT→ViT), where teacher and student share token-mixing mechanisms and intermediate representations can be aligned directly. Cross-architecture distillation between families with different inductive biases — here, a ViT teacher (global self-attention over patches) and an SSM student (sequential state propagation over a scanned patch order) — is less understood, and it is unclear whether feature-level alignment helps or hurts.

In this work we make the following contributions:

  1. We diagnose two concrete failure modes that prevent a from-scratch bidirectional visual SSM from learning on a small dataset, and we fix them with a progressive convolutional stem and a gated-residual bidirectional selective-scan block. The resulting 4.45M-parameter student (which we call LVSSM, for Lightweight Visual State Space Model) trains stably to 92.16% test accuracy without any pretraining.

  2. We study cross-architecture KD from a fine-tuned DI-NOv2 teacher to this SSM student. Averaged over three seeds, logit-level distillation improves student accuracy by +3.09 points (92.32%→95.41%; best single run 96.20%) and reduces variance, demonstrating that dark knowledge transfers effectively even across strongly dissimilar architectures.

  3. Through controlled ablations with a fixed CE/KD weighting, we find that adding intermediate feature-alignment losses does not improve over logit-only KD at this scale, and we analyze why. We report a complete evaluation (per-class metrics, confusion matrices, bootstrap confidence intervals, FLOPs and GPU/CPU latency) and discuss the study’s limitations honestly.

References (11)