Cross-Architectural Mixture-of-Experts with Adaptive Soft Routing for Plant Leaf Disease Classification Phi-Hung Hoang, Thi-Thu-Hong Phan ∗
arXiv:2606.23441v1 [cs.AI] 22 Jun 2026
AIT laboratory, Faculty of Artificial Intelligence, FPT University, Da Nang, 550000, Viet Nam
Abstract Plant leaf disease classification is crucial for crop protection and precision agriculture but remains challenging under complex backgrounds, illumination variations, and severe class imbalance. Moreover, single-architecture models often fail to effectively capture both local and global representations. To address these challenges, this study proposes an adaptive soft Mixture-ofExperts (MoE) framework with cross-architectural routing that integrates EfficientNet-B0, DenseNet-121, and Swin-Tiny to exploit complementary multi-scale, local, and global features. A soft gating mechanism dynamically assigns input-dependent expert weights, while a two-stage refinement training strategy improves optimization stability and generalization. Experiments on a highly imbalanced potato leaf disease dataset achieve 91.68% recall and 92.62% F1-score, surpassing the strongest individual expert by 5.91% and 5.03%, respectively. Additional evaluations on durian and sesame leaf disease datasets yield F1-scores of 94.03% and 97.04%, demonstrating robust cross-dataset generalization and the potential of the proposed framework for reliable real-world crop health monitoring. Keywords: Adaptive routing; Mixture-of-experts (MoE); Plant leaf disease classification; Class imbalance; Grad-CAM
∗
Corresponding author Email addresses: [email protected] (Phi-Hung Hoang), [email protected] (Thi-Thu-Hong Phan )
1. Introduction Plant leaf disease classification plays an important role in crop protection, food security, and sustainable agriculture. In precision agriculture, automated and real-time crop health monitoring has become increasingly important, as traditional diagnosis based on visual inspection by agronomists is time-consuming, labor-intensive, subjective, and impractical for large-scale deployment [1, 2]. Therefore, developing robust computer vision systems for accurate plant leaf disease identification remains a critical research challenge. Early plant leaf disease recognition methods relied on handcrafted features and conventional machine learning techniques, which struggled to generalize under complex real-world conditions due to their dependence on manual feature engineering [3, 4, 5]. These limitations drove the adoption of deep learning approaches, particularly Convolutional Neural Networks (CNNs), which substantially improved classification through automatic hierarchical feature learning [6, 7, 8]. More recently, Vision Transformers (ViTs) have further enhanced contextual modeling through self-attention mechanisms [9, 10, 11]. Despite these advances, robust plant leaf disease classification under realworld agricultural conditions remains challenging due to complex backgrounds, illumination variation, viewpoint changes, and severe class imbalance. A central limitation lies in architectural adaptability: CNNs excel at local texture modeling but struggle with global contextual understanding, whereas Transformer-based models capture long-range dependencies but may lack a strong local inductive bias for subtle lesion representation. Hybrid and ensemble approaches attempt to combine these complementary strengths; however, most rely on static fusion strategies that assign fixed importance to expert models regardless of input complexity [12, 13, 14]. Consequently, they cannot adaptively emphasize the most informative representations for diverse disease patterns. Severe class imbalance further compounds this challenge in practical agricultural environments. To address these challenges, this study proposes an Adaptive Soft Mixtureof-Experts (MoE) framework that enables adaptive collaboration among heterogeneous expert architectures for robust plant leaf disease classification. Unlike conventional static fusion approaches, the proposed framework dynamically adjusts expert contributions based on learned feature representations, allowing the model to emphasize the most informative expert responses for different disease patterns. Furthermore, a refinement-based training strat2
egy is introduced to improve optimization stability and enhance generalization under challenging imbalanced conditions. The main contributions of this study are as follows: • We propose a cross-architectural adaptive soft MoE framework that dynamically routes complementary CNN- and Transformer-based expert contributions based on learned feature representations, thereby overcoming the limitations of static fusion strategies. • We introduce a two-stage refinement training strategy that progressively improves optimization stability and generalization under classimbalanced conditions. • We conduct a comprehensive empirical evaluation on a highly imbalanced real-world potato leaf disease dataset and further assess crossdataset generalization on durian and sesame leaf disease datasets. • We perform interpretability-driven analysis using gating entropy and Grad-CAM to provide insight into adaptive expert collaboration and feature attention behavior. The rest of the paper is organized as follows. Section 2 reviews related works in the literature. Section 3 describes the proposed adaptive soft MoE framework. Section 4 presents the datasets and experimental setup. Section 5 reports the experimental results, interpretability analysis, and discussion. Finally, Section 6 concludes the paper and outlines future research directions. 2. Related works Traditional plant disease classification methods primarily relied on handcrafted features combined with conventional machine learning (ML) classifiers. To capture disease characteristics, researchers typically extracted color, texture, and shape descriptors to train ML classifiers. For instance, Al-Shamasneh [15] proposed a method based on Generalized Jones Polynomials (GJPs) with a Support Vector Machine (SVM), while Sridhar and Angamuthu [3] combined bilateral filtering, GraphCut segmentation, and hybrid texture features (GLCM, LBP) for improved classification. To address high dimensionality, optimization techniques have also been employed, such as the Whale Optimization Algorithm (WOA) in Li and Javidan [16] 3
for feature selection. While effective in controlled settings, these pipelines often lack robustness under real-world conditions. To improve robustness in more complex environments, Hoang and Phan (2026a) [4] integrated global color statistics with local descriptors (SIFT, KAZE) using a Bag-of-VisualWords (BoVW) framework with LightGBM. In a related study, Hoang and Phan (2026b) [5] further showed that embedded feature selection can reduce dimensionality while maintaining classification stability. Despite these efforts, handcrafted feature-based approaches remain limited in scalability and robustness under complex environmental variations. To overcome these limitations, Convolutional Neural Networks (CNNs) became the prevailing approach in agricultural image analysis. Pre-trained CNN models have been widely adopted with transfer learning and optimization strategies to improve disease identification. For instance, Shabrina et al. [6] evaluated several pre-trained architectures, including EfficientNet, MobileNet, VGG, ResNet, and DenseNet, under uncontrolled conditions. To mitigate the effects of noise and class imbalance, Mhala et al. [8] proposed an optimized DenseNet-based approach incorporating data augmentation, early stopping, and L2 regularization. Subsequent studies explored more efficient CNN architectures to balance classification performance and computational cost. Hoang et al. [17] introduced a hybrid knowledge distillation framework for edge devices, while Zhang et al. [18] proposed a lightweight LDL-MobileNetV3S architecture that integrates multi-scale fusion, dilated convolutions, and localized attention to improve lesion detection with reduced complexity. Despite these advances, CNNs remain limited by their localized receptive fields, which restrict global context modeling. Vision Transformers (ViTs) and hierarchical variants have therefore emerged, leveraging self-attention to capture long-range dependencies. Studies by Meghana et al. [9] and Murugavalli and Gopi [10] demonstrated improved recognition of subtle and dispersed disease patterns using ViT architectures, while Tabassum and Nunavath [11] demonstrated the effectiveness of Swin Transformer models in fine-grained agricultural tasks. However, relying on a single architectural paradigm still leads to a trade-off between local detail modeling and global contextual understanding. Moreover, architectural improvements alone are insufficient, as real-world agricultural environments also present severe class imbalance challenges. Recent studies have therefore explored both data-level and algorithm-level mitigation strategies. For example, Aishawarya et al. [19] and Rofiqi et al. [20] applied SMOTE with hierarchical transformers and lightweight CNNs to bal4
ance training distributions. At the algorithmic level, Mandhani et al. [21] combined Focal Loss with class weighting to emphasize hard-to-classify samples without generating synthetic data. Nevertheless, these approaches remain limited: oversampling may introduce noisy synthetic samples, while static loss weighting lacks adaptability to input-specific characteristics. Ensemble learning and hybrid architectures have been widely explored to improve the robustness and generalization of individual deep learning models. By combining multiple networks, these approaches exploit complementary feature representations to enhance performance under complex conditions. For instance, Ahmad and Alamsyah [14] proposed a featurelevel ensemble of DenseNet201 and MobileNetV2, demonstrating that combining representational richness with computational efficiency can improve disease classification. Similarly, Apleni et al. [12] fused VGG16, ResNet50, and InceptionV3 through feature concatenation followed by a Multi-Layer Perceptron (MLP), achieving more consistent performance than single architectures under environmental variability. Hybrid CNN–Transformer models have also been explored to capture both local textures and global contextual information. Synamenye et al. [13] combined EfficientNet-V2 with Vision Transformer (ViT) in a parallel design, achieving stronger performance under diverse conditions. Despite these advances, most ensemble methods rely on static fusion strategies such as averaging or fixed feature concatenation, assigning uniform weights regardless of input complexity. Consequently, they lack the adaptability needed to dynamically emphasize the most relevant features for different samples. The Mixture of Experts (MoE) paradigm offers a promising alternative to static ensembles by introducing a dynamic, input-dependent routing mechanism. Rather than uniformly combining all models, MoE adaptively allocates expert contributions according to the characteristics of each input. In agricultural applications, several recent studies have explored its potential for disease and crop classification. Raya-González at al. [22] proposed a hybrid CNN-SVM MoE for crop disease recognition, assigning visually similar classes to specialized experts to reduce class overlap. More recently, Salman et al. [23] integrated MoE with a Vision Transformer backbone for plant disease classification under field conditions, using entropy and orthogonal regularization to balance expert utilization. To address long-tail distributions and intra-class variability in complex agricultural environments, Lu et al. [24] introduced DMoE-ViT, which routes samples based on difficulty to specialized Vision Transformer (ViT) experts to reduce prediction uncer5
tainty. Beyond image classification, Xu et al. [25] extended MoE to spectral data analysis and showed that SoftMoE, which aggregates all experts through weighted combination, outperforms hard-routing approaches by better capturing continuous variations. Despite these promising advances, existing MoE studies in agricultural applications remain relatively limited, particularly in exploring adaptive soft routing across heterogeneous architectures for robust plant disease classification under real-world conditions. This motivates the present study, which investigates an adaptive soft MoE framework designed to dynamically integrate complementary expert representations for improved classification performance. 3. Methodology 3.1. Overview of the proposed approach Figure 1 illustrates the overall workflow of the proposed adaptive soft Mixture of Experts (MoE) framework, which is designed to address visual variations in real-world agricultural environments. The framework consists of two main phases: expert selection and construction of the adaptive soft MoE classification framework. In the expert selection phase, a pool of heterogeneous deep learning architectures is considered as candidate experts to provide diverse feature extraction capabilities, including local texture modeling, multi-scale representation learning, and global contextual understanding. Candidate suitability is assessed based on architectural complementarity and competitive validation performance, ensuring that the selected experts provide diverse yet effective representations for the downstream MoE framework. In the second phase, the selected backbones are integrated into the proposed adaptive soft MoE framework. Given an input image, feature extraction is performed in parallel by the three expert networks. Since heterogeneous architectures produce feature maps with different channel dimensions, a Feature Projection Module (FPM) is introduced to align them into a unified feature space, enabling stable cross-expert fusion. To dynamically determine expert contributions, an input-adaptive routing mechanism is employed. Specifically, the aligned feature representations are first combined through a feature fusion step to construct a unified descriptor, which is subsequently processed by a routing network to generate continuous gating weights for each expert. The final fused representation is 6
then obtained through weighted aggregation of the expert features, allowing adaptive integration of complementary visual information. Finally, the aggregated representation is passed through a classifier head to generate the output probability distribution over the target classes. To optimize the proposed framework, a two-stage refinement training strategy
7
(a) Phase 1: Selection of experts from candidate DL models.
8 (b) Phase 2: Proposed adaptive soft MoE classification framework.
Figure 1: Overall architecture of the proposed Adaptive Soft MoE framework.
is adopted. In the first stage, the entire framework is jointly fine-tuned to learn discriminative feature representations and input-dependent routing behavior. In the second stage, training resumes from the best-performing checkpoint using a reduced learning rate to further refine the learned representations, improve optimization stability, and enhance generalization. 3.2. Candidate expert architectures To provide diverse feature extraction capabilities, five pre-trained architectures are considered as candidate expert models in Phase 1, including MobileNet-V2, EfficientNet-B0, DenseNet-121, ResNet-50, and SwinTiny. These models represent different architectural characteristics, such as lightweight convolution, dense feature reuse, multi-scale representation, and global self-attention. The architectural details of each candidate model are briefly described in the following subsections. 3.2.1. MobileNet-V2 MobileNet-V2 is a lightweight convolutional architecture known for its computational efficiency and compact design [26]. As shown in Figure 2, the network adopts the Inverted Residual with Linear Bottleneck design, where feature maps are expanded, processed using depthwise separable convolutions, and projected through linear 1 × 1 convolutions. This design reduces computational cost while preserving representative feature information. For an input image of size 224 × 224, the extracted feature map is denoted as FM OBILE ∈ R7×7×1280 .
Figure 2: Architecture of the MobileNet-V2.
3.2.2. EfficientNet-B0 EfficientNet-B0 is designed for efficient feature extraction through compound scaling of network depth, width, and input resolution [27]. As shown in Figure 3, the architecture is based on MBConv blocks with inverted residual structures, combining depthwise convolution, channel expansion, projection 9
layers, and Squeeze-and-Excitation (SE) modules to enhance channel-wise feature representation. For an input image of size 224 × 224, the extracted feature map is denoted as FEF F I ∈ R7×7×1280 .
Figure 3: Architecture of the EfficientNet-B0.
3.2.3. DenseNet-121 DenseNet-121 employs dense connectivity, where each layer receives feature maps from all preceding layers to encourage feature reuse and improved information flow [28]. As shown in Figure 4, the architecture consists of dense blocks interconnected by transition layers with 1 × 1 convolution and average pooling for dimensionality reduction. The network follows a block configuration of [6, 12, 24, 16] with a growth rate of 32. For an input image of size 224 × 224, the extracted feature map is denoted as FDEN SE ∈ R7×7×1024 .
Figure 4: Architecture of the DenseNet-121.
3.2.4. ResNet-50 ResNet-50 leverages residual learning through bottleneck residual blocks with shortcut connections to facilitate deep feature extraction [29]. Each block combines 1 × 1 convolutions for channel compression and restoration with a central 3 × 3 convolution for spatial feature extraction, as illustrated in Figure 5. This design enables the network to capture hierarchical visual representations efficiently. For an input image of size 224×224, the extracted feature map is denoted as FRES ∈ R7×7×2048 . 10
Figure 5: Architecture of the ResNet-50.
3.2.5. Swin-Tiny Swin-Tiny is a hierarchical Vision Transformer that captures visual representations using localized self-attention with linear computational complexity [30]. The architecture employs window-based self-attention with a shifted window mechanism to enable cross-window interaction. A hierarchical pyramid structure progressively reduces spatial resolution while increasing channel capacity through patch merging. For an input image of size 224 × 224, the extracted feature map is denoted as FSW IN ∈ R7×7×768 .
Figure 6: Architecture of the Swin-Tiny.
3.3. Adaptive soft mixture of experts (MoE) framework Building upon the heterogeneous feature representations extracted by the selected expert networks, the proposed framework adopts an adaptive soft MoE architecture to integrate complementary visual information. As illustrated in Figure 7, the proposed framework employs an adaptive routing mechanism that dynamically reweights expert contributions based on the learned representation of each input. Let the extracted feature maps from the three selected experts be denoted as FExpert1 ∈ R7×7×C1 , FExpert2 ∈ R7×7×C2 , and FExpert3 ∈ R7×7×C3 . Since heterogeneous backbones produce feature maps with different channel dimensions, a Feature Projection Module (FPM) is introduced to align them into a shared feature space. Specifically, each feature map is projected through a 1×1 convolution to a unified channel dimension of 512, providing lightweight 11
dimensional alignment while preserving spatial structure. Layer Normalization (LayerNorm) is subsequently applied to normalize expert-specific feature statistics prior to fusion, providing more stable feature alignment across heterogeneous backbones and producing aligned feature representations denoted aligned aligned aligned as FExpert , FExpert , and FExpert ∈ R7×7×512 . 1 2 3 After feature alignment, Global Average Pooling (GAP) is applied to each expert representation to obtain global feature vectors. These vectors are then combined through element-wise summation (⊕) to construct a compact shared descriptor for routing while avoiding the dimensional expansion and additional parameter overhead associated with concatenation-based fusion. The resulting descriptor is processed by a routing network implemented as a two-layer Multi-Layer Perceptron (MLP) with a Linear (512 → 256 → 3) structure, followed by a Softmax activation to generate continuous gating weights WExpert1 , WExpert2 , and WExpert3 . This enables the framework to adaptively modulate the contribution of each expert for individual inputs. The final fused feature map is computed as: aligned aligned aligned FGAT E = WExpert1 · FExpert + WExpert2 · FExpert + WExpert3 · FExpert 1 2 3
P where WExperti ∈ [0, 1] and 3i=1 WExperti = 1, with WExperti representing the gating weight of the i-th expert. This soft aggregation strategy allows the model to adaptively combine expert outputs according to the input characteristics. The fused feature map FGAT E ∈ R7×7×512 is subsequently processed by the classifier head. Specifically, GAP is applied to obtain a 512-dimensional feature vector, followed by Dropout for regularization. The resulting representation is then passed through a single fully connected layer to generate the final class prediction.
12
Figure 7: Detailed architecture of the proposed MoE framework.
13
3.4. Two-stage refinement training strategy The proposed MoE framework is optimized using a two-stage refinement training strategy. In the first stage, all backbone networks are initialized with ImageNet-pretrained weights and jointly fine-tuned together with the routing module and classification head. This stage enables the framework to adapt the pre-trained feature representations to the target domain while learning input-dependent routing behavior. In the second stage, training resumes from the best-performing checkpoint obtained in the first stage, using a reduced learning rate for further refinement. Starting from an already converged solution allows more controlled parameter updates, enabling finer adjustment of both the learned feature representations and the gating mechanism. This refinement stage helps improve optimization stability and may help the optimization converge to a better solution. 3.5. Gradient-weighted Class Activation Mapping (Grad-CAM) Grad-CAM [31] is a gradient-based visualization technique used to interpret deep learning models by leveraging the gradients of a target class flowing back to the final convolutional layer to generate class-discriminative localization maps. These heatmaps highlight the spatial regions that contribute most strongly to the model’s prediction, thereby providing visual insight into the model’s decision-making behavior. In this study, Grad-CAM is employed to qualitatively analyze the attention behavior of the proposed MoE framework and the specialization characteristics of individual experts. Specifically, Grad-CAM generates attention heatmaps that visualize the spatial regions emphasized by each backbone during prediction. This facilitates comparison of attention patterns across different architectures and provides qualitative insight into how complementary feature representations are integrated within the proposed framework. 4. Experiments 4.1. Data description To evaluate the effectiveness and generalization capability of the proposed MoE framework, experiments were conducted on three leaf disease datasets. The potato dataset serves as the primary benchmark, while the durian and sesame datasets are used to assess performance consistency across different 14
crop conditions and data distributions. Detailed dataset descriptions are provided in the following subsections. 4.1.1. Potato leaf disease dataset The potato leaf disease dataset consists of 3,076 images categorized into seven classes: Bacteria (569), Fungi (748), Healthy (201), Nematode (68), Pest (611), Phytophthora (347), and Virus (532) [6]. The images were collected from various agricultural fields in Central Java, Indonesia, using a diverse range of smartphone cameras (including models from Apple, Samsung, Xiaomi, and Vivo) with resolutions ranging from 8 to 50 megapixels. Unlike controlled laboratory settings, the dataset captures natural real-world variations, including cluttered backgrounds, varying lighting conditions, and imaging distances ranging from 5 to 15 cm. All images were standardized to a fixed size of 1500 × 1500 pixels. The dataset was split using a stratified sampling strategy with a ratio of 81%, 9%, and 10% for training, validation, and testing sets, respectively, as in Shabrina et al. [6], and consistent splits across all experiments with a random seed of 42. The detailed distribution is provided in Table 1. Representative samples of each class are illustrated in Figure 8.
(a) Bacteria
(d) Nematode
(b) Fungi
(e) Pest
(c) Healthy
(f) Phytophthora
(g) Virus
Figure 8: Sample images representing different classes in the potato leaf disease dataset.
15
Table 1: Distribution of samples across classes in the training, validation, and test sets.
Classes Bacteria Fungi Healthy Nematode Pest Phytophthora Virus Total
Train 461 605 163 55 494 281 430 2489
Validation 51 67 18 6 55 31 48 276
Test 57 76 20 7 62 35 54 311
Total 569 748 201 68 611 347 532 3076
4.1.2. Durian disease dataset The durian disease dataset consists of 5,451 images categorized into ten classes: Thrips disease (537), Stem blight (554), Canker disease (557), Pink disease (549), Stem cracking and gummosis (560), Mealybug infestation (536), Anthracnose (549), Fruit rot (528), Sooty mold (541), and Yellow leaf disease (540) [32]. The images were collected from a family-owned durian orchard and four neighboring farms in Vinh Long, Vietnam, under real-field conditions. All images were captured using an iPhone 14 under natural lighting. Image resolutions range from 150 to 1824 pixels in width and from 150 to 1452 pixels in height. The dataset contains various real-world challenges, including motion blur, uneven illumination, diverse viewing angles, and complex backgrounds. The dataset was split using stratified sampling with a ratio of 64%, 16%, and 20% for training, validation, and testing, respectively, with a fixed random seed of 42 to ensure consistent splits across all experiments. Representative samples of each disease class are illustrated in Figure 9. 4.1.3. Sesame leaf disease dataset The sesame leaf disease dataset consists of 3,540 images categorized into four classes: Healthy Leaf (1,335), Insect Leaf Damage (724), Leaf Spot Disease (587), and Yellowing Leaf Syndrome (894) [33]. The images were collected from sesame cultivation fields in Pabna District, Bangladesh, and captured under natural field conditions using high-resolution smartphone cameras. Unlike controlled laboratory datasets, the images reflect real-world variations such as illumination changes and complex background clutter. All images were standardized to a fixed size of 1024 × 1024 pixels. The dataset was split using stratified sampling with a ratio of 64%, 16%, and 20% for 16
training, validation, and testing, respectively, with a fixed random seed of 42 to ensure consistent splits across all experiments. Representative samples of each class are illustrated in Figure 10.
(a) Thrips
(b) Stem blight
(c) Canker
(d) Pink disease
(e) Gummosis
(f) Mealybug
(g) Anthracnose
(h) Fruit rot
(i) Sooty mold
(j) Yellow leaf
Figure 9: Sample images representing different classes in the durian disease dataset.
(a) Healthy Leaf
(b) Insect Leaf Damage
(c) Leaf Spot Disease
(d) Yellowing Leaf Syndrome
Figure 10: Sample images representing different classes in the sesame leaf disease dataset.
4.2. Experimental setting All experiments were conducted on the Kaggle platform using two NVIDIA Tesla T4 GPUs, and the proposed framework was implemented in PyTorch. All backbone networks were initialized with ImageNet pre-trained weights, and input images were resized to 224×224 pixels to match the backbone input requirements. Model optimization followed the two-stage refinement training strategy described in Section 3.4. Detailed preprocessing, augmentation, and dataset-specific training configurations are summarized in Table 2.
17
Table 2: Detailed experimental and two-stage refinement training configurations for each dataset. Dataset Preprocessing & Augmentation Potato leaf disease
Phase 1 (Finetuning)
Phase 2 (Refinement)
Color jitter (brightness=0.15)
Epochs: 100
Epochs: 20
Random horizontal flip (p = 0.5)
Batch size: 16
Batch size: 16
Optimizer: Adam
Optimizer: Adam
◦
Random rotation (±20 )
−4
LR: 1 × 10
LR: 5 × 10−6
Dropout: 0.3
Dropout: 0.3
Patience: 20
Patience: 5
Color jitter (brightness=0.15, contrast=0.05) Epochs: 100
Epochs: 20
Random horizontal flip (p = 0.5)
Batch size: 32
Batch size: 32
Random rotation (±15 )
Optimizer: Adam
Optimizer: Adam
Gaussian blur (kernel=3, σ = 0.1–1.0)
LR: 1 × 10−4
LR: 3 × 10−7
Dropout: 0.1
Dropout: 0.1
Patience: 20
Patience: 5
Random affine (translation=0.2)
Durian leaf disease
◦
Sesame Color jitter (brightness=0.15, contrast=0.05) Epochs: 100 leaf Random horizontal flip (p = 0.5) Batch size: 32 dis◦ ease Random rotation (±15 ) Optimizer: Adam Gaussian blur (kernel=3, σ = 0.1–1.0)
Epochs: 20 Batch size: 32 Optimizer: Adam
−4
LR: 1 × 10
LR: 7 × 10−7
Dropout: 0.5
Dropout: 0.5
Patience: 20
Patience: 5
5. Results and discussion This section presents the experimental evaluation of the proposed MoE framework, including performance analysis on the primary potato leaf disease dataset, internal mechanism analysis, cross-dataset validation, comparison with previous studies, and discussion of limitations. 5.1. Results on the potato leaf disease dataset 5.1.1. Performance of individual models To establish baseline performance for the potato leaf disease classification task and identify suitable experts for the proposed MoE framework, five representative pre-trained models were evaluated: MobileNet-V2, EfficientNet18
B0, DenseNet-121, ResNet-50, and Swin-Tiny. These models were selected to cover diverse architectural paradigms, including lightweight convolutional networks (MobileNet-V2), residual CNNs (ResNet-50), densely connected networks (DenseNet-121), compound-scaled efficient CNNs (EfficientNet-B0), and transformer-based architectures with hierarchical self-attention (SwinTiny). This architectural diversity enables a broad assessment of complementary representational characteristics for expert selection. While expert selection was primarily guided by validation performance, test performance was additionally evaluated to assess the generalization capability of the candidate architectures on unseen data. Table 3: Classification performance of pre-trained models on the potato leaf disease dataset across the validation and test sets (%). Validation set
Model
Test set
Accuracy
Precision
Recall
F1-score
Accuracy
Precision
Recall
F1-score
85.57
86.93
80.71
82.55
85.21
87.76
77.58
79.50
EfficientNet-B0
83.33
84.80
82.84
83.49
86.50
87.22
84.15
85.37
DenseNet-121
87.68
85.32
85.38
84.80
87.78
84.65
81.93
82.72
ResNet-50
84.78
83.36
82.61
82.93
85.21
85.99
80.44
82.42
Swin-Tiny
86.23
87.93
85.53
86.23
89.39
91.65
85.77
87.59
MobileNet-V2
Table 3 summarizes the performance of the candidate architectures. Since expert selection was primarily based on validation performance, the validation results are analyzed first. Given the pronounced class imbalance in the potato dataset, recall and F1-score are particularly important for identifying robust expert candidates. Swin-Tiny achieves the strongest balanced validation performance, obtaining the highest precision (87.93%), recall (85.53%), and F1-score (86.23%), indicating effective contextual modeling under complex background conditions. DenseNet-121 attains the highest validation accuracy (87.68%) while maintaining competitive recall (85.38%) and F1-score (84.80%), reflecting strong fine-grained local feature extraction. EfficientNetB0 also demonstrates a relatively balanced performance profile, achieving a recall of 82.84% and an F1-score of 83.49%, suggesting its potential contribution through robust multi-scale feature representation. In contrast, the remaining architectures show comparatively weaker validation performance, particularly in recall and F1-score, indicating reduced robustness under class imbalance and high intra-class variability. To further assess generalization capability, test performance was addi19
tionally examined as supportive evidence. The overall trends remain largely consistent with the validation results, with Swin-Tiny achieving the strongest generalization performance, obtaining the highest test accuracy (89.39%) and F1-score (87.59%). EfficientNet-B0 also maintains relatively balanced performance, achieving an F1-score of 85.37%. In contrast, the remaining architectures exhibit weaker generalization, particularly in recall and F1-score, indicating reduced robustness under unseen disease variations, class imbalance, and high intra-class variability. Based on the validation analysis, further supported by the test set generalization results, MobileNet-V2 and ResNet-50 were excluded due to comparatively weaker performance. DenseNet-121, EfficientNet-B0, and Swin-Tiny were therefore selected as expert candidates for the proposed MoE framework, given their complementary strengths in local, multi-scale, and contextual feature representation. 5.1.2. Performance of the proposed MoE framework Table 4 presents the classification performance of the MoE framework on the potato leaf disease dataset across the validation and test sets. Table 4: Classification performance of the proposed MoE framework on the potato leaf disease dataset across the validation and test sets (%). Validation set
Test set
Accuracy
Precision
Recall
F1-score
Accuracy
Precision
Recall
F1-score
88.77
87.24
87.74
87.05
92.28
93.97
91.68
92.62
The MoE framework demonstrates clear and consistent improvements over all individual baseline models, with the most substantial gains observed on the unseen test set. While test accuracy improves from 89.39% to 92.28%, corresponding to an absolute gain of 2.89% over Swin-Tiny, the strongest standalone baseline, the improvements in recall and F1-score are considerably more pronounced. Specifically, recall increases from 85.77% to 91.68% (+5.91%), while the F1-score improves from 87.59% to 92.62% (+5.03%). Given the strong class imbalance in the potato dataset, where the largest class contains more than ten times the samples of the smallest class, these gains are particularly meaningful. The marked improvement in recall indicates a substantially stronger ability to correctly identify minority and difficult disease categories, while the corresponding F1-score gain confirms a more balanced trade-off between precision and recall. 20
These improvements can be attributed to the complementary integration of heterogeneous expert representations. DenseNet-121 contributes finegrained local texture modeling, EfficientNet-B0 provides robust multi-scale feature extraction, and Swin-Tiny captures broader contextual dependencies through hierarchical self-attention. When operating independently, each architecture exhibits inherent limitations, particularly when handling imbalanced and visually diverse disease categories. Through the soft gating mechanism, the framework dynamically adjusts expert contributions according to input characteristics, effectively combining these strengths into a unified representation and yielding more balanced classification performance than any standalone model. Consistent gains are also observed on the validation set, where the framework achieves 88.77% accuracy and 87.05% F1-score, exceeding the highest baseline validation accuracy by 1.09% and the best validation F1-score by 0.82%. This supporting evidence indicates that the observed improvements are not limited to the final test evaluation but are also reflected during model optimization. 5.1.3. Confusion matrix analysis To better understand class-level errors under visual similarity and class imbalance, confusion matrices on the potato leaf disease test set are analyzed, as shown in Figure 11. A key challenge in this task is the high inter-class similarity, particularly among Pest, Fungi, and Phytophthora. Individual baseline models exhibit noticeable confusion between these categories. For example, Swin-Tiny misclassifies 12 Pest samples as Fungi, while EfficientNet-B0 confuses 10 Fungi samples with Pest. DenseNet-121 also misclassifies several Phytophthora samples as Pest. In contrast, the MoE framework substantially reduces these errors, decreasing Pest→Fungi confusion to 6 samples, Fungi→Pest confusion to 2 samples, and completely eliminating Phytophthora→Pest misclassification. These results indicate stronger separation of visually similar disease patterns. The confusion matrices also highlight improved robustness under severe class imbalance. Minority classes such as Nematode and Healthy remain challenging for individual models, with only 4-5 correctly classified Nematode samples in the baseline architectures. In comparison, the MoE framework correctly identifies 6 out of 7 Nematode samples and 18 out of 20 Healthy samples, indicating a stronger ability to recognize minority and dif21
ficult classes. This suggests that the adaptive routing mechanism reduces the bias toward majority classes by dynamically weighting expert contributions based on input characteristics rather than dataset-level priors. These observations are consistent with the improvements in recall and F1-score reported in Table 4, further confirming the effectiveness of the MoE framework in reducing critical class-level misclassification errors.
(a) EfficientNet-B0
(b) DenseNet-121
(c) Swin-Tiny
(d) MoE
Figure 11: Confusion matrices on the test set of EfficientNet-B0, DenseNet-121, Swin-Tiny, and the proposed MoE framework for potato leaf disease classification.
5.1.4. Configuration ablation study of the MoE framework A configuration ablation study was conducted on the validation set of the potato leaf disease dataset to assess the impact of key design choices within the MoE framework, including classifier head structure, normalization strat22
egy, dropout configuration, and loss formulation. The detailed experimental results are summarized in Table 5. To evaluate the effectiveness of the fused MoE representation, different classifier head configurations were investigated. Specifically, the proposed single-layer classifier was compared with two-layer MLP heads using progressively reduced hidden dimensions (512 → 384, 512 → 256, and 512 → 128). Given the class imbalance of the potato dataset, F1-score and recall are particularly important for assessing balanced classification performance. The results show that increasing classifier depth does not provide consistent benefits. Although some two-layer configurations achieve comparable F1-scores, the single-layer design delivers the best overall trade-off, achieving the highest accuracy (88.77%), the highest recall (87.74%), and a tied best F1-score (87.05%) with substantially lower architectural complexity. This suggests that the fused representation is already sufficiently discriminative, making additional hidden layers unnecessary. Table 5: Ablation study of the MoE framework under different configurations on the validation set of the potato leaf disease dataset. Normalization Classifier Head Structure (Depth) LayerNorm LayerNorm LayerNorm LayerNorm LayerNorm LayerNorm LayerNorm BatchNorm LayerNorm
512 → 384 → classes (2 layers) 512 → 384 → classes (2 layers) 512 → 256 → classes (2 layers) 512 → 256 → classes (2 layers) 512 → 128 → classes (2 layers) 512 → 128 → classes (2 layers) 512 → classes (1 layer) 512 → classes (1 layer) 512 → classes (1 layer - Ours)
Loss Function
Dropout Rates
Accuracy (%)
Precision (%)
CE CE CE CE CE CE Weighted CE CE CE
0.3, 0.3 0.5, 0.3 0.3, 0.3 0.5, 0.3 0.3, 0.3 0.5, 0.3 0.3 0.3 0.3
87.68 87.68 87.32 87.32 86.96 86.59 86.96 87.68 88.77
88.85 89.09 88.58 85.85 87.99 88.05 87.67 86.64 87.24
Recall F1-Score (%) (%) 85.04 85.40 85.92 86.34 86.38 83.65 87.18 86.04 87.74
86.21 87.02 87.05 85.86 86.79 85.28 86.83 86.20 87.05
The impact of loss formulation was also examined, particularly given the pronounced class imbalance of the potato dataset. Weighted Cross-Entropy (Weighted CE) was evaluated to determine whether explicit class reweighting could improve minority-class recognition. However, replacing standard Cross-Entropy (CE) reduced performance, lowering accuracy to 86.96% and F1-score to 86.83%. This suggests that the adaptive expert weighting mechanism already provides implicit balancing benefits, as reflected in the improved recall and stronger recognition of minority classes, making additional static class reweighting unnecessary. The normalization strategy within the Feature Projection Module was also evaluated by comparing LayerNorm and BatchNorm. LayerNorm achieved better performance, improving accuracy from 87.68% to 88.77%. This result 23
is consistent with the heterogeneous nature of the framework, which integrates both CNN-based experts and a transformer-based architecture, as well as the relatively small training batch size (16), where BatchNorm may be more sensitive to unstable batch statistics. In contrast, LayerNorm provides more stable feature alignment by operating independently of the batch dimension. The ablation results support the final configuration consisting of a singlelayer classifier, standard Cross-Entropy loss, LayerNorm, and a dropout rate of 0.3, which provides the most effective balance between preserving complementary feature information and maintaining optimization stability. 5.1.5. Analysis of the MoE routing mechanism While the quantitative results confirm the effectiveness of the MoE framework, further analysis is needed to understand its internal routing behavior. This subsection examines three aspects: global expert importance, classwise expert specialization, and gating entropy, providing insight into how the framework adapts expert contributions under varying input complexities. a) Expert importance and decision-level selection behavior Figure 12 presents two global routing metrics derived from the soft gating network: the average gating weight assigned to each expert across the test set and the top-1 selection ratio, which indicates how frequently an expert receives the highest routing weight. Swin-Tiny exhibits the strongest overall contribution, with an average gating weight of approximately 0.58 and a top-1 selection ratio of about 68%. This indicates that the gating network frequently prioritizes its representations. This behavior is consistent with Swin-Tiny’s strength in modeling broader contextual dependencies, which are particularly beneficial under visually complex field conditions. DenseNet-121 serves as the second most influential expert, with an average gating weight of approximately 0.29 and a top-1 ratio of roughly 25%. Its contribution reflects a complementary role, supporting the framework through fine-grained local texture modeling that complements the global contextual representations provided by Swin-Tiny. In contrast, EfficientNet-B0 contributes more modestly, with an average gating weight of approximately 0.14 and a top-1 ratio below 9%. Its lower but non-zero contribution suggests a supportive complementary role, providing additional multi-scale feature cues for specific input conditions. The clearly non-uniform routing distribution indicates that the framework 24
learns an input-adaptive expert allocation strategy rather than behaving as a conventional ensemble with uniform expert averaging.
Figure 12: Global expert importance and decision-level selection patterns in the proposed MoE framework.
b) Class-wise expert specialization To further understand the routing behavior of the soft gating network at the class level, class-wise expert specialization is analyzed by examining the average gating weights assigned to each expert across different disease categories, as shown in Figure 13. The results reveal clear specialization patterns, indicating that the model adaptively prioritizes different experts according to class-specific visual characteristics. Swin-Tiny receives the highest gating weights across most classes. It dominates the classification process for Virus, Phytophthora, and Pest, with average weights of 0.76, 0.74, and 0.63, respectively. It also provides the largest contribution for the Nematode (0.53) and Fungi (0.52) classes, indicating its strong capability in handling complex and spatially distributed disease patterns. In contrast, DenseNet-121 exhibits a clear specialization for the Bacteria class, where it achieves the highest gating weight of 0.56 among all experts. It also plays a significant secondary role in the Fungi class, with a weight of 0.42, reflecting its effectiveness in capturing fine-grained local 25
texture features. EfficientNet-B0, on the other hand, shows a highly concentrated contribution to the Healthy class, where it obtains a dominant weight of 0.66. Its secondary contribution is observed in the Nematode class (0.38), suggesting its usefulness in handling variations in feature scale and overall leaf structure. The heatmap also reveals that certain classes rely on collaborative expert contributions rather than a single dominant expert. For example, Fungi is jointly influenced by Swin-Tiny (0.52) and DenseNet-121 (0.42), while Nematode receives substantial contributions from both Swin-Tiny (0.53) and EfficientNet-B0 (0.38). These patterns confirm that the framework performs adaptive class-dependent expert allocation rather than fixed or uniform expert fusion.
Figure 13: Class-wise expert specialization patterns across disease categories.
c) Adaptive routing behavior via gating entropy Beyond class-level specialization, the adaptive routing behavior of the soft gating mechanism is further examined through the distribution of gating entropy across the test set, as illustrated in Figure 14. In the proposed 26
framework, gating entropy quantifies how concentrated or distributed the routing weights are among experts for each input sample. Lower entropy indicates stronger concentration toward a dominant expert, whereas higher entropy reflects more collaborative routing across multiple experts. As shown in Figure 14, entropy values span a broad range from approximately 0.3 to 1.0, with a mean of 0.680. This wide distribution indicates substantial variation in routing behavior across samples, confirming that the framework does not rely on a fixed expert allocation strategy. For low-entropy samples (e.g., < 0.5), routing is strongly concentrated on a single expert, reflecting more decisive expert selection. In contrast, for highentropy samples (e.g., > 0.8), routing weights are distributed more evenly, indicating collaborative integration of multiple expert representations. These observations suggest that the MoE framework dynamically switches between selective expert routing and collaborative expert fusion depending on the characteristics of each input, further distinguishing it from conventional ensemble methods with static or uniform expert aggregation.
Figure 14: Gating entropy distribution characterizing adaptive expert routing behavior.
27
5.1.6. Interpretability analysis using Grad-CAM visualizations The attention behavior of the proposed framework and the visual evidence of expert specialization were further examined using Grad-CAM-based attention heatmaps. Figure 15 presents representative visualizations for five classes from the potato leaf disease dataset (Bacteria, Healthy, Fungi, Nematode, and Pest). These comparisons provide qualitative insight into how the individual experts (EfficientNet-B0, DenseNet-121, and Swin-Tiny) and the MoE framework emphasize different regions of interest, revealing how complementary visual features are integrated during prediction. The visual observations reveal a clear relationship between the architectural characteristics of each expert and their responses to different pathological patterns. In the Bacteria class, characterized by small and scattered lesion regions, DenseNet-121 provides the most localized activation around the affected area, consistent with its strength in capturing fine-grained local texture characteristics. In contrast, Swin-Tiny exhibits more diffuse activations over a broader region, while EfficientNet-B0 partially attends to less relevant leaf boundaries. The MoE heatmap appears to preserve the localized sensitivity observed in DenseNet-121 while suppressing less informative activations, resulting in more focused attention around the pathological region. For disease classes involving broader structural damage, the experts exhibit complementary behaviors. In the Pest sample, where damage appears as clustered physical holes, DenseNet-121 focuses on localized damaged regions, whereas Swin-Tiny captures a broader structural context surrounding the affected area. EfficientNet-B0 also attends to the lesion region but with less precise localization. The MoE framework integrates these complementary responses, maintaining concentrated activation around the lesion while preserving relevant contextual information. A similar collaborative behavior is observed in the Nematode class, where disease symptoms appear as widespread discoloration across the leaf surface. Both Swin-Tiny and EfficientNet-B0 emphasize broader structural regions rather than localized details, and the MoE heatmap reflects a similar wholeregion attention pattern, suggesting collaborative integration of these broader representations. The effectiveness of complementary feature integration is particularly evident in the Fungi class, where the pathology includes both a necrotic center and a surrounding affected region. DenseNet-121 concentrates on the cen-
28
tral lesion area, while Swin-Tiny captures a broader surrounding context. The MoE heatmap combines these responses, preserving strong activation at the lesion center while extending attention across the affected surrounding region, resulting in a more comprehensive visual representation. For Healthy leaf samples, where no localized lesions are present, the classification task depends more on modeling overall leaf appearance rather than detecting specific pathological regions. EfficientNet-B0 emphasizes broader leaf appearance, while the MoE framework further refines this behavior by focusing attention more consistently on the leaf region while reducing irrelevant background influence. Overall, the Grad-CAM visualizations provide qualitative evidence that the soft gating mechanism adaptively combines complementary expert representations, leading to more coherent and interpretable attention behavior than any individual expert alone.
29
(a) Original (Bacteria)
(b) EfficientNet-B0 Expert
(c) DenseNet-121 Expert
(d) Swin-Tiny Expert
(e) MoE
(f) Original (Healthy)
(g) EfficientNet-B0 Expert
(h) DenseNet-121 Expert
(i) Swin-Tiny Expert
(j) MoE
(k) Original (Fungi) (l) EfficientNet-B0 Expert
(m) DenseNet-121 Expert
(n) Swin-Tiny Expert
(o) MoE
(p) Original (Nematode)
(q) EfficientNet-B0 Expert
(r) DenseNet-121 Expert
(s) Swin-Tiny Expert
(t) MoE
(u) Original (Pest)
(v) EfficientNet-B0 Expert
(w) DenseNet-121 Expert
(x) Swin-Tiny Expert
(y) MoE
Figure 15: Grad-CAM visualizations for representative samples across five potato leaf classes (Bacteria, Healthy, Fungi, Nematode, and Pest). Each row corresponds to a class, while columns present the original image, individual expert models, and the proposed MoE framework.
30
5.2. Validation on additional datasets To examine the generalization capability of the proposed MoE framework beyond the primary potato benchmark, additional experiments were conducted on the durian and sesame disease datasets. Their differing crop characteristics, class distributions, and visual patterns provide a more challenging setting for cross-dataset validation. 5.2.1. Durian disease dataset Table 6 presents the classification performance of the baseline models and the proposed framework on the durian disease dataset. Compared with the potato benchmark, this dataset introduces a substantially different evaluation setting, including a different crop domain, a larger number of disease categories, and distinct visual symptom patterns collected under real-field conditions. Evaluating performance under these conditions provides a stronger assessment of the framework’s cross-dataset generalization capability. Table 6: Performance of baseline models and the proposed MoE framework on the durian disease dataset (%). Model MobileNet-V2 EfficientNet-B0 DenseNet-121 ResNet-50 Swin-Tiny Proposed framework
Accuracy 84.57 88.89 89.20 88.73 89.35 93.98
Precision 85.12 89.31 89.35 90.54 89.87 94.18
Recall 84.70 89.00 89.37 88.83 89.44 94.02
F1-score 84.47 88.79 89.19 89.25 89.28 94.03
Among the standalone baseline architectures, Swin-Tiny achieves the strongest performance, obtaining an accuracy of 89.35%, precision of 89.87%, recall of 89.44%, and an F1-score of 89.28%. This result suggests that transformer-based contextual modeling remains effective for capturing the broader visual dependencies present in durian disease symptoms. DenseNet121 and EfficientNet-B0 also achieve competitive performance, with F1scores of 89.19% and 88.79%, respectively, indicating that each architectural paradigm retains meaningful representational capability when used independently. However, the proposed framework consistently surpasses all standalone architectures across every evaluation metric. Specifically, it achieves an accuracy of 93.98%, precision of 94.18%, recall of 94.02%, and an F1score of 94.03%. Compared with the strongest single baseline (Swin-Tiny), 31
this corresponds to absolute improvements of 4.63% in accuracy, 4.31% in precision, 4.58% in recall, and 4.75% in F1-score. The consistency of these gains is particularly significant. Rather than improving only overall accuracy, the framework demonstrates balanced improvement across precision, recall, and F1-score, indicating that the performance gains are systematic rather than metric-specific. This suggests that the adaptive soft gating mechanism successfully preserves and integrates complementary strengths from heterogeneous expert architectures, allowing the framework to generalize effectively beyond the dataset used for expert selection. These findings provide evidence that the proposed MoE framework is not simply tailored to the primary potato benchmark but exhibits promising generalization across datasets with differing crop domains, disease distributions, and visual symptom characteristics. 5.2.2. Sesame leaf disease dataset The classification results on the sesame dataset are reported in Table 7. In contrast to the durian dataset, all standalone architectures achieve notably strong performance, with F1-scores exceeding 95%, suggesting that this dataset presents a comparatively more separable classification setting with less severe visual ambiguity. Among the individual baselines, DenseNet-121 achieves the strongest overall balanced performance, obtaining an accuracy of 96.75%, precision of 96.67%, recall of 96.54%, and an F1-score of 96.58%. Swin-Tiny also performs competitively, achieving the highest recall among standalone models (96.88%) and an F1-score of 96.28%. These results indicate that both fine-grained local texture modeling and broader contextual feature extraction remain effective in this dataset. Despite the already strong baseline performance, the proposed framework still achieves the best overall results, reaching an accuracy of 97.32%, precision of 96.96%, recall of 97.16%, and an F1-score of 97.04%. Compared with the strongest standalone baseline, this corresponds to consistent absolute improvements of 0.57% in accuracy, 0.29% in precision, 0.62% in recall, and 0.46% in F1-score. Although the performance margin is smaller than that observed on the durian dataset, this outcome is expected given the already high baseline performance, which leaves less room for improvement. Importantly, the framework continues to deliver consistent gains across all evaluation metrics, indicating that the benefit of adaptive expert fusion is not limited to challenging or highly ambiguous datasets. Instead, the results suggest that the proposed routing strategy provides consistent gains on 32
the evaluated datasets even when individual expert models already achieve near-ceiling performance. Table 7: Performance of baseline models and the proposed MoE framework on the Sesame leaf disease dataset (%). Model MobileNet-V2 EfficientNet-B0 DenseNet-121 ResNet-50 Swin-Tiny Proposed framework
Accuracy 95.76 95.90 96.75 96.19 96.47 97.32
Precision 95.26 95.61 96.67 95.57 95.83 96.96
Recall 95.12 95.46 96.54 96.04 96.88 97.16
F1-score 95.19 95.53 96.58 95.74 96.28 97.04
5.3. Comparison with previous studies To assess the effectiveness of the proposed framework, its performance was compared with 12 recent studies evaluated on the same primary potato leaf disease dataset. As illustrated in Figure 16, existing approaches can be broadly grouped into three categories: single-architecture deep learning models, feature engineering and imbalance mitigation approaches, and hybrid or ensemble-based methods.
Figure 16: Performance comparison of the proposed MoE framework with existing methods on the potato leaf disease dataset.
33
Early studies primarily explored single CNN architectures on this dataset. For example, Shabrina et al. [6] reported 73.63% using EfficientNetV2-B3, while subsequent works improved performance through architectural refinement and training optimization. Rivaldo and Udjulawa [7] achieved 78.14% with EfficientNet-B0, Mhala et al. [8] reported 81.31% using DenseNet201 with augmentation and regularization, and Chang and Lai [34] achieved 90.68% using RegNetY-400MF. Although these methods demonstrate progressively stronger performance, they remain constrained by the fixed representational bias of a single architecture. Traditional machine learning approaches have also been explored to address class imbalance and feature optimization. Hoang and Phan (2026b) [5] achieved 79.10% using LGBM with handcrafted features, improving to 81.03% with Borderline-SMOTE [4]. Similarly, Rofiqi et al.[20] combined MobileNetV3Large with Optuna tuning and SMOTE to reach 89.50%. While effective, these methods rely on feature engineering or synthetic resampling rather than adaptive representation learning. More recent studies have attempted to integrate multiple feature representations through hybrid or ensemble-based designs. Examples include RCANet [35] (78.14%), lightweight CNN-based fusion [17] (84.57%), EfficientNetV2B3 + ViT [13] (85.06%), PLDNet [36] (87.50%), and EfficientNet-LITE + KE-SVM [37] (87.82%). Although these approaches combine diverse representational strengths, they generally rely on predefined integration strategies that do not adapt dynamically at the sample level. In contrast, the proposed framework achieves the highest reported accuracy of 92.28% on this dataset. This improvement is attributed to the adaptive soft gating mechanism, which dynamically adjusts the contribution of DenseNet-121, EfficientNet-B0, and Swin-Tiny according to input characteristics. Unlike conventional ensemble strategies with fixed integration behavior, the proposed design enables sample-dependent expert routing, while also mitigating class imbalance effects through adaptive expert allocation rather than explicit data-level balancing. 5.4. Limitations Despite its strong classification performance, the proposed framework presents several limitations. The primary limitation is computational efficiency. As shown in Table 8, integrating three heterogeneous expert networks substantially increases computational cost compared with standalone architectures, resulting in higher FLOPs, parameter count, training time, 34
and inference latency. The proposed framework requires 12.73 GFLOPs and 40.19 million parameters, with an inference latency of 39.85 ms/sample, making direct deployment more challenging on resource-constrained edge devices commonly used in practical agricultural monitoring systems. Table 8: Computational efficiency comparison of baseline deep learning models and the proposed method on the potato leaf disease dataset in terms of FLOPs, parameter count, training time, and inference latency. Model
FLOPs (G)
Params (M)
Training Time (m:s)
Latency (ms/sample)
Swin-Tiny ResNet-50 DenseNet-121 EfficientNet-B0 MobileNet-V2
5.95 8.26 5.79 0.83 0.65
27.52 23.52 6.96 4.02 2.23
31:44.96 38:24.63 30:17.48 26:43.17 32:25.88
16.04 ± 2.13 8.30 ± 1.14 18.56 ± 2.63 11.92 ± 1.62 7.61 ± 1.55
Proposed (MoE)
12.73
40.19
75:29.40
39.85 ± 3.79
Second, although the two-stage refinement strategy improves optimization stability, the learning curves in Figure 17 indicate a remaining generalization gap between training and validation performance, particularly during Phase 1, where training accuracy approaches saturation while validation metrics stabilize at a lower level. Although the refinement stage reduces instability, this gap is not fully eliminated, suggesting that the high representational capacity of the framework may still introduce some overfitting risk under real-world visual variability. This behavior likely reflects sensitivity to irrelevant environmental factors such as background clutter, shadows, and illumination changes, despite the use of data augmentation and regularization. Third, the current expert selection strategy relies on manually chosen backbone combinations based on validation performance and architectural complementarity. While effective in this study, this design does not guarantee globally optimal expert composition and may require re-evaluation for different datasets or application domains.
35
(a) Phase 1 (fine-tuning)
(b) Phase 2 (refinement)
Figure 17: Training and validation accuracy and loss curves of the proposed MoE framework across Phase 1 (fine-tuning) and Phase 2 (refinement) on the potato leaf disease dataset.
6. Conclusion This study proposes an adaptive soft Mixture-of-Experts (MoE) framework for robust plant leaf disease classification by integrating three heterogeneous architectures–EfficientNet-B0, DenseNet-121, and Swin-Tiny–as complementary experts. On the primary potato leaf disease benchmark, the proposed framework achieved 92.28% accuracy and 92.62% F1-score, outperforming the compared methods, including the strongest standalone baseline, with improvements of 2.89% in accuracy and 5.03% in F1-score over the best single-model competitor. These gains suggest that adaptive routing helps improve recognition of difficult and minority classes under imbalanced conditions. Gating behavior and Grad-CAM analyses further confirmed meaningful expert collaboration and disease-relevant attention patterns. Addi36
tionally, cross-dataset evaluations on durian and sesame datasets yielded F1scores of 94.03% and 97.04%, respectively, indicating strong generalization capability. The proposed framework offers a promising strategy for robust plant disease diagnosis under real-world field conditions. However, the computational overhead of multiple experts remains a limitation to large-scale deployment. Future work will focus on developing more efficient routing and lightweight expert architectures, as well as evaluating the framework on larger and more diverse field-acquired datasets to improve scalability and real-world applicability further. Funding This research did not receive any specific grant from funding agencies in the public, commercial, or not-for-profit sectors. Declaration of competing interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Declaration of generative AI and AI-assisted technologies in the writing process During the preparation of this manuscript, the authors used Grammarly and generative AI tools to improve grammar and refine wording for clarity. After using these tools, the authors reviewed and edited the content as needed and take full responsibility for the final version of the manuscript. References [1] J. Yao, S. N. Tran, S. Sawyer, et al., Machine learning for leaf disease classification: data, techniques and applications, Artificial Intelligence Review 56 (Suppl 3) (2023) 3571–3616. doi:10.1007/ s10462-023-10610-4. [2] I. Pacal, I. Kunduracioglu, M. H. Alma, et al., A systematic review of deep learning techniques for plant diseases, Artificial Intelligence Review 57 (2024) 304. doi:10.1007/s10462-024-10944-7. 37
[3] P. Sridhar, P. Angamuthu, Enhancing image based classification for crop disease detection using a multiclass svm approach with kernel comparison, Scientific Reports 15 (2025) 40055. doi:10.1038/ s41598-025-23568-w. [4] P. H. Hoang, T. T. H. Phan, Potato leaf disease classification in uncontrolled environments: Leveraging the synergy of handcrafted features, in: T. T. Quan, C. Sombattheera, H. A. Pham, N. T. Tran (Eds.), Multi-disciplinary Trends in Artificial Intelligence, Vol. 16354 of Lecture Notes in Computer Science, Springer, Singapore, 2026. doi:10.1007/978-981-95-4960-3_20. [5] P. H. Hoang, T. T. H. Phan, Toward robust potato leaf disease identification: Optimizing performance via comparative feature selection, in: N. N. Dao, H. A. Le, R. Vadivel, N. T. Nguyen (Eds.), Intelligence of Things: Technologies and Applications, Vol. 281 of Lecture Notes on Data Engineering and Communications Technologies, Springer, Cham, 2026. doi:10.1007/978-3-032-13102-7_18. [6] N. H. Shabrina, S. Indarti, R. Maharani, D. A. Kristiyanti, Irmawati, N. Prastomo, T. Adilah M, A novel dataset of potato leaf disease in uncontrolled environment, Data in Brief 52 (2024) 109955. doi:https: //doi.org/10.1016/j.dib.2023.109955. [7] M. Rivaldo, D. Udjulawa, Performance comparison of efficientnetb0 in potato leaf disease classification with adam and sgd, Brilliance: Research of Artificial Intelligence 5 (2) (2025) 1224–1231. doi:10.47709/ brilliance.v5i2.7482. [8] P. Mhala, A. Bilandani, S. Sharma, Enhancing crop productivity with fined-tuned deep convolution neural network for potato leaf disease detection, Expert Systems with Applications 267 (2025) 126066. doi: https://doi.org/10.1016/j.eswa.2024.126066. [9] V. Meghana, S. Akanksha, P. K. Reddy, M. A. Jabbar, Potato leaf disease classification using vision transformers, in: Proceedings of the 2025 International Conference on Computing and Communications (COMPUTINGCON), 2025, pp. 1–7. doi:10.1109/COMPUTINGCON64838. 2025.11377413.
38
[10] S. Murugavalli, R. Gopi, Plant leaf disease detection using vision transformers for precision agriculture, Scientific Reports 15 (2025) 22361. doi:10.1038/s41598-025-05102-0. [11] I. Tabassum, V. Nunavath, Transformer-based multi-class classification of bangladeshi rice varieties using image data, Applied Sciences 16 (3) (2026) 1279. doi:10.3390/app16031279. [12] T. Apleni, F. O. Isinkaye, M. O. Olusanya, Ensemble-based feature fusion for accurate plant disease classification using pretrained models, Scientific Reports 15 (2025) 41925. doi:10.1038/ s41598-025-25927-z. [13] J. H. Sinamenye, A. Chatterjee, R. Shrestha, Potato plant disease detection: Leveraging hybrid deep learning models, BMC Plant Biology 25 (2025) 647. doi:10.1186/s12870-025-06679-4. [14] B. Ahmad, Alamsyah, Ensemble learning-based potato leaf disease classification using densenet201 and mobilenetv2, Journal of Information System Exploration and Research 4 (1) (2026) 1–8. [15] A. R. Al-Shamasneh, Potato leaves disease classification based on generalized jones polynomials image features, MethodsX 14 (2025) 103421. doi:https://doi.org/10.1016/j.mex.2025.103421. [16] Z. Li, S. M. Javidan, Ml-based approach to potato diseases diagnosis using image processing and whale optimization algorithm for feature selection, Smart Agricultural Technology 12 (2025) 101282. doi:https: //doi.org/10.1016/j.atech.2025.101282. [17] P.-H. Hoang, N.-T. Trinh, V.-M. Tran, T.-T.-H. Phan, Multi-objective hybrid knowledge distillation for efficient deep learning in smart agriculture (2025). arXiv:2512.22239. [18] J. Zhang, X. Yang, X. Fu, B. Wang, H. Li, Ldl-mobilenetv3s: an enhanced lightweight mobilenetv3-small model for potato leaf disease diagnosis through multi-module fusion, Frontiers in Plant Science 16 (2025). doi:10.3389/fpls.2025.1656731.
39
[19] N. Aishwarya, S. Cheran, S. S. Gnaneswar, V. Rathinasamy, Transformer-based deep learning approach for potato leaf disease classification, in: Proceedings of the 2025 International Conference on Sustainability, Innovation & Technology (ICSIT), 2025, pp. 1–6. doi: 10.1109/ICSIT65336.2025.11295448. [20] H. K. Rofiqi, E. Noersasongko, S. Winarno, M. A. Soeleman, Augmentation strategy and hyperparameter optimization using optuna for potato leaf disease classification in uncontrolled environment, Jurnal Teknik Informatika (JUTIF) 7 (2) (2026) 743–759. [21] K. Mandhani, S. Singh, A. Chandrawanshi, Multi-crop disease detection using deep learning with class imbalance handling, International Journal of Research Publication and Reviews 7 (4) (2026) 2906–2913. [22] L. E. Raya-González, V. A. Alcántar-Camarena, J. Cepeda-Negrete, A. Bustos-Gaytán, M. del Rosario Abraham-Juárez, N. Saldaña-Robles, Application of mixture of experts models for the recognition of pests and diseases in maize, Array 27 (2025) 100502. doi:https://doi.org/ 10.1016/j.array.2025.100502. [23] Z. Salman, A. Muhammad, D. Han, Plant disease classification in the wild using vision transformers and mixture of experts, Frontiers in Plant Science 16 (2025). doi:10.3389/fpls.2025.1522985. [24] Q. Lu, W. Zhao, J. Chen, X. Chen, L. Zhang, Uncertainty mixture of experts model for long tail crop type mapping, Remote Sensing 17 (22) (2025) 3752. doi:10.3390/rs17223752. [25] S. Xu, Z. He, X. Liang, H. Lu, Robust prediction of soluble solids content in pomelo across storage time using a gated mixture-of-experts model with near-infrared transmittance spectra, Talanta 306 (2026) 129758. doi:https://doi.org/10.1016/j.talanta.2026.129758. [26] M. Sandler, A. Howard, M. Zhu, A. Zhmoginov, L.-C. Chen, Mobilenetv2: Inverted residuals and linear bottlenecks (2019). arXiv: 1801.04381. [27] M. Tan, Q. V. Le, Efficientnet: Rethinking model scaling for convolutional neural networks (2020). arXiv:1905.11946. 40
[28] G. Huang, Z. Liu, L. Van Der Maaten, K. Q. Weinberger, Densely connected convolutional networks, in: 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), 2017, pp. 2261–2269. doi:10.1109/CVPR.2017.243. [29] K. He, X. Zhang, S. Ren, J. Sun, Deep residual learning for image recognition (2015). arXiv:1512.03385. [30] Z. Liu, Y. Lin, Y. Cao, H. Hu, Y. Wei, Z. Zhang, S. Lin, B. Guo, Swin transformer: Hierarchical vision transformer using shifted windows, in: 2021 IEEE/CVF International Conference on Computer Vision (ICCV), 2021, pp. 9992–10002. [31] R. R. Selvaraju, M. Cogswell, A. Das, R. Vedantam, D. Parikh, D. Batra, Grad-cam: Visual explanations from deep networks via gradient-based localization, International Journal of Computer Vision 128 (2) (2019) 336–359. doi:10.1007/s11263-019-01228-7. [32] T. Nguyen, Image dataset of ten durian diseases captured in real-field conditions from a family orchard in vinh long, vietnam, Mendeley Data, V1 (2025). doi:10.17632/mhjwyb5p48.1. [33] S. A. Rahman, M. H. Hena, Applying convolutional neural networks for early detection of diseases in sesame leaf, Mendeley Data (2025). doi:10.17632/c64jt5gkzm.1. [34] C.-Y. Chang, C.-C. Lai, Potato leaf disease detection based on a lightweight deep learning model, Machine Learning and Knowledge Extraction 6 (4) (2024) 2321–2335. doi:10.3390/make6040114. [35] M. H. Tariq, H. Sultan, R. Akram, S. G. Kim, J. S. Kim, M. Usman, H. A. H. Gondal, J. Seo, Y. H. Lee, K. R. Park, Estimation of fractal dimensions and classification of plant disease with complex backgrounds, Fractal and Fractional 9 (5) (2025) 315. doi:10.3390/ fractalfract9050315. [36] A. Mondal, A. Chatterjee, N. Avazov, A hybrid cnn-transformer model with adaptive activation function for potato leaf disease classification, Scientific Reports 16 (2026) 4282. doi:10.1038/s41598-025-34406-4.
41
[37] G. Sangar, V. Rajasekar, Optimized classification of potato leaf disease using efficientnet-lite and ke-svm in diverse environments, Frontiers in Plant Science 16 (2025) 1499909. doi:10.3389/fpls.2025.1499909.
42