Next Article in Journal
Pyrite Trace-Element Signatures of Porphyry-Epithermal Systems in Xizang: Implications for Metallogenic Discrimination and Hydrothermal Evolution
Previous Article in Journal
Study on the Influence Mechanism of Particle Migration on the Stability of Weathering Crust Elution-Deposited Rare Earth Ores
Previous Article in Special Issue
Blending Characterization for Effective Management in Mining Operations
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Mycelial_Net: A Bio-Inspired Deep Learning Framework for Mineral Classification in Thin Section Microscopy

by
Paolo Dell’Aversana
Independent Researcher, 20133 Milan, Italy
Minerals 2025, 15(11), 1112; https://doi.org/10.3390/min15111112
Submission received: 25 August 2025 / Revised: 17 October 2025 / Accepted: 24 October 2025 / Published: 25 October 2025

Abstract

This study presents the application of Mycelial_Net, a biologically inspired deep learning architecture, to the analysis and classification of mineral images in thin section under optical microscopy. The model, inspired by the adaptive connectivity of fungal mycelium networks, was trained on a test mineral image database to extract structural features and to classify various minerals. The performance of Mycelial_Net was evaluated in terms of accuracy, robustness, and adaptability, and compared against conventional convolutional neural networks. The results demonstrate that Mycelial_Net, properly integrated with Residual Networks (ResNets), offers superior analysis capabilities, interpretability, and resilience to noise and artifacts in petrographic images. This approach holds promise for advancing automated mineral identification and geological analysis through adaptive AI systems.

1. Introduction

The application of machine learning methods to mineral identification and classification in thin sections has evolved significantly over the past two decades, reflecting both the growing computational power available and the increasing need for automated solutions in petrography. Early approaches demonstrated the potential of artificial neural networks (ANNs) for recognizing minerals. For instance, Solar et al. [1] presented one of the first attempts to apply neural recognition techniques to minerals, laying the groundwork for subsequent developments. This was followed by the introduction of more structured classification systems, such as the multi-network strategy proposed by Baykan and Yılmaz [2], which employed k-fold cross-validation to enhance reliability.
Parallel research addressed the challenge of variability in image acquisition. Slipek and Młynarczuk [3] applied pattern recognition techniques to rock images captured under different polarization and lighting conditions, highlighting the importance of robustness in classification systems. Similarly, Aligholi et al. [4] developed an automated algorithm exploiting optical crystal properties, bridging mineralogical knowledge with computational techniques. A major breakthrough in computer vision came with the introduction of deep residual networks (ResNets) by He et al. [5], which soon influenced mineral image classification by enabling deeper and more accurate convolutional neural network (CNN) models. A recent application is discussed by Neelam Agrawal and Himanshu Govil [6]. The authors demonstrate that ResNet architectures are highly effective for mineral classification, offering a strong reference point for adapting residual models to petrographic or thin-section images.
Building on these foundations, Izadi et al. [7] proposed a cascade approach to thin section mineral identification, achieving improvements in accuracy through multi-stage decision processes. The widespread adoption of CNNs and ensemble methods around 2019 further accelerated progress. She et al. [8] demonstrated the effectiveness of machine learning for mineral resource exploration, while Zhang et al. [9] showed that ensemble models could improve the intelligent identification of rock-mineral microscopic images. In the same period, Liu et al. [10] introduced a hybrid method combining deep learning with clustering algorithms, showing that integrating unsupervised learning enhances recognition performance. Additional studies have consolidated deep learning as the dominant paradigm in image classification of mineral thin sections. Liu et al. [11] applied CNNs specifically to mineral classification in thin sections, achieving high levels of accuracy and paving the way for practical applications in digital petrography. Ran et al. [12] presented a deep CNN approach for classifying rock types from field image patches, demonstrating its effectiveness in handling complex textures. They highlight how deep learning can outperform traditional methods in automated geological image analysis.
Overall, the literature reveals a clear trajectory: from early experiments with simple neural models and rule-based approaches to the widespread adoption of CNNs, ensemble learning, and hybrid frameworks [13,14]. The state of the art now points toward integrated deep learning systems capable of combining domain knowledge, robust architectures, and multimodal data to address the inherent complexity of mineralogical thin section analysis.
Recently, we have introduced novel deep learning methodologies enhanced with self-awareness mechanisms, enabling a significantly greater flexibility in tackling automatic classification problems [15]. In this context, self-awareness refers to the model’s ability to continuously monitor its own performance during training and inference, and to adapt its internal structure accordingly. Unlike conventional neural networks, which passively follow fixed architectures and pre-set optimization rules, a self-aware deep neural network dynamically adjusts not only its weights but also its connectivity patterns, hyperparameters, and decision strategies in real time. This adaptive capability is inspired by the way biological systems—such as the human brain—evaluate feedback from their environment, detect changes or anomalies, and modify their internal organization to maintain or improve functionality.
We have obtained further improvements in deep learning by introducing Mycelial_Net [16], a novel deep learning architecture inspired by the adaptive and decentralized intelligence of fungal mycelium [17]. In nature, the fungal mycelium operates as a living, interconnected network of hyphae that explores the environment, senses chemical and physical signals, and dynamically reallocates resources to optimize survival and growth. This network effectively discriminates between nutrient sources, toxic compounds, obstacles, and potential symbiotic partners—performing a form of ecological classification based on distributed perception, chemical recognition, and adaptive memory. Its decision-making process is not centralized but emerges from the interaction of many local nodes, allowing the system to remain highly robust and self-organizing, even under variable and imperfect conditions. Mycelial_Net is designed to replicate these biological principles in the digital domain by dynamically adjusting its internal connectivity during training, mimicking the growth, pruning, and plasticity of mycelial networks.
In this work, the previously introduced Mycelial_Net [16] is applied to the classification of mineral images in thin sections. We compare its performance against standard CNN architectures, as well as with other consolidated classification techniques, and show that it can introduce some promising benefits. Our basic hypothesis is that the Mycelial_Net model can be applied to optimize mineral analysis and classification of mineral thin sections while also adapting to structural irregularities, extracting crystalline boundaries, and recognizing patterns in complex and imperfect datasets (including low-resolution images).
In the present research, we intend to show that the fungal mycelium analogy is not merely metaphorical but functionally relevant in the problem of image analysis/classification (as well as in other relevant domains). In biological mycelium, decision-making emerges from the continuous interaction of local sensing, adaptive growth, and structural reconfiguration, enabling the organism to solve complex survival problems without a centralized brain. Mycelial_Net follows the same principle in the computational domain: classification accuracy and robustness are achieved not solely through fixed parameter and hyperparameter optimization, but through continuous adaptation of the network’s topology and its entire architecture during training. This structural plasticity allows the model to retain previously acquired knowledge while reshaping itself to meet new challenges, effectively combining memory and adaptability. By embedding these biologically inspired mechanisms into a deep learning framework and integrating it with consolidated Residual Networks (ResNets), we show that Mycelial_Net bridges the gap between conventional CNN-based approaches and truly self-organizing, self-aware computational systems. Figure 1 summarizes, schematically, the entire workflow. The subsequent methodological section presents a comprehensive discussion of each step within the workflow.

2. Methodology

2.1. Basic Principles

The Mycelial_Net model employs a mycologically inspired architecture that emulates the adaptive behavior of fungal mycelial systems [17]. The main elements are, schematically, the following:
“MycelialLayer”—A dynamic layer that optimizes learning by pruning weak connections and forming new ones during training.
Dynamic Connectivity—A topology-restructuring mechanism, modeled after the exploratory growth of a network, enabling continual adaptation.
Self-Monitoring Mechanism—A performance-driven adaptation process, inspired by biological self-awareness that adjusts connectivity based on metrics such as accuracy, ensuring responsiveness to changing conditions and datasets.
Exploration Factor—A module that regulates the exploration–exploitation trade-off in hyperparameter space, steering the model toward optimal configurations.
The model uses time-dependent weight matrices controlled by binary masks, evolving connectivity ratios, key hyperparameters, and cross-entropy loss for multi-class classification. Higher loss gradients increase connectivity, mimicking fungal mycelial expansion toward regions of high information content in the mineral feature space. The following is a more detailed quantitative formulation of these concepts. This is readapted to the image classification problem from previous research [16].

2.2. Formalization of Myclelial_Net Model

Let X R m × n be the input data matrix, where m is the number of mineral thin section samples and n is the number of extracted petrographic features (e.g., mineralogical appearance, grain size distribution, texture descriptors, colorimetric attributes, or other quantitative image analysis metrics).
Let Y R m × k the corresponding labels for classification with k output classes (for instance, Plagioclase, Quartz, K-feldspar, etc.).
Each input passes through multiple layers of dynamically changing artificial neuronal connections. Unlike standard artificial neural networks with fixed connection paths and fixed hyperparameters, Mycelial_Net introduces a time-dependent weight matrix, Wt, that dynamically adapts:
W t = M t W t 1
where
  • Wt is the weight matrix at time t,
  • Wt−1 is the weight matrix at the previous time step t − 1,
  • Mt ∈ {0,1} n × d is a binary mask matrix controlling active connections at time t,
  • n is the number of features,
  • d is the number of neurons in the layer.
  • ⊙ represents the Hadamard (elementwise) product,
The mask Mt is updated dynamically based on a connectivity ratio ct:
Mt = 1(Ut < ct)
where Ut is a uniform random matrix. The formula (2) means that the mask Mt is updated by comparing each element of a random matrix Ut with the connectivity ratio ct. Those elements that are smaller than ct are “activated” (set to 1), and others are “deactivated” (set to 0). By default, ct is a scalar (global density control: each element of Ut is compared with ct). More advanced ct can be a matrix (local adaptive connectivity). This dynamic update of the mask can be used to model how elements of a system are connected or disconnected in response to a changing connectivity threshold.
What do Formulas (1) and (2) mean in practice? The connection graph is not fixed but changes over time: links can appear or disappear depending on the threshold. The parameter ct controls the density of the network: a higher value implies more active connections; a lower value implies a sparser network. The random noise (Ut) ensures variability in connections being activated/deactivated: this creates structural diversity and plasticity.
Why is this useful in the Mycelial_Net model? This point can be fully understood through the analogy with natural mycelium: fungal networks in the soil do not have permanent connections; filaments can break or regrow depending on environmental conditions. The benefit is high resilience: a model with dynamic connectivity explores multiple configurations instead of becoming locked into a single architecture. The key concept is “Self-organization”: the threshold ct can depend on system feedback-based entropy values, network performance, loss function, misfit, and reward (in case of reinforcement learning mechanisms). Consequently, the network learns not only the weights (as it happens in standard neural networks), but also how connected it should be at any moment.
In short, formulae (1) and (2) introduce a structural plasticity mechanism. The network does not just adapt its weights, but also its entire topology, reconfiguring dynamically. It is like giving the model the ability to contract or expand depending on context, very similar to how a living biological network behaves.
We remark that the connectivity ratio ct evolves over training:
c t + 1 = c t + η L t
where
  • η is the learning rate,
  • L t is the gradient of the loss function L at time t.
The total loss function is
L t o t a l = i = 1 m j = 1 k y i j l o g ( y ^ i j )
where
  • m is the number of samples (e.g., thin section mineral samples), as stated earlier,
  • k is the number of output classes (e.g., types of minerals), as stated earlier,
  • y i j is the true label (one-hot encoded, where y i j = 1 for the true class and y i j = 0 otherwise),
  • y ^ i j is the predicted probability for the j-th class for the i-th sample, computed using the Softmax function.
We remind that the Softmax function is a mathematical function commonly used in machine learning, particularly in multi-class classification problems. It takes a vector of real numbers as input and converts it into a probability distribution, where each element is in the range (0, 1) and the sum of all elements equals 1. In this case, we compute the Softmax for each sample and class. The final loss is the sum over all samples and classes.
Coming back to the computation of the gradient of the loss function, in our case, higher gradients increase Mycelial_Net connectivity, mimicking the fungal mycelial network’s expansion in response to environmental stimuli.
For a given neuronal layer l, the activation H t l at time t is computed as:
H t l = σ H t l 1 W t l b l
where
  • H t l 1 is the activation from the previous neuronal layer,
  • W t l is the dynamically adjusted weight matrix,
  • b l is the bias vector,
  • σ is an activation function (e.g., Rectified Linear Unit, briefly ReLU, or sigmoid, as well as other activation functions settable by the user).
The output of the final layer is computed as:
Y ^ = S o f t m a x H t P W t P + b P
where P is the total number of layers.
This equation intuitively means that the final output of the neural network is computed in a multi-class classification problem. The model’s final layer uses weights and biases to compute raw scores (logits), and the Softmax function is then applied to transform these raw scores into a probability distribution, making it suitable for classification tasks. The network minimizes a standard cross-entropy loss for classification. Additionally, we introduce a regularization term to encourage network sparsity. The gradient update rule for weights and hyperparameters is given by:
W t + 1 = W t α L t o t a l W t
This equation allows optimizing the weights and hyperparameters in the Mycelial_Net model by moving them in the direction that reduces the total loss function. By iteratively applying this rule, the model learns to make better predictions. The learning rate α controls how quickly or slowly the entire architecture is updated in each iteration.
Finally, to balance exploration and exploitation of the parameters and hyperparameters space, we introduce an entropy-based connectivity adjustment:
c t + 1 = c t + γ H X
where H(X) is the entropy of the activations:
H X = i = 1 N p i l o g p i
This is the standard formula for the Shannon entropy, which measures the uncertainty in the system’s state. It is used here to measure the “spread” or uncertainty in the activations, guiding the network’s adaptability. Higher entropy leads to increased connectivity attempting to reduce uncertainties, mimicking mycelial expansion in high-information regions.
Figure 2 presents a simplified scheme of the Mycelial_Net model workflow. Although it may appear as a linear sequence of steps, it implicitly includes complex circular loops, driven by the continuous adaptive adjustment of the network topology for optimizing classification performances.
In summary, Mycelial_Net innovates by merging deep learning, entropy-based self-organization, and biologically inspired structural plasticity, creating a neural system that learns both its weights and its evolving topology, just like a living mycelial network exploring its environment. These innovative aspects and scientific contributions will be more clearly evidenced through the experimental results of the following tests.
Finally, to support both intuitive and rigorous comprehension of the Mycelial_Net architecture, comprehensive explanatory tutorials have been prepared and can be accessed via the link listed in the “Data Availability Statement” section.

2.3. Empowering Myclelial_Net Model with Residual Network

ResNet (Residual Network) is a deep convolutional neural network architecture that introduced the concept of residual connections (also known as skip connections). These connections enable the network to bypass one or more layers by directly passing information forward. The main advantage of this mechanism is that it allows ResNet to train very deep models (with 50, 100, or even more layers) without being hindered by the vanishing gradient problem, which typically makes optimization of deep architectures unstable and inefficient. The benefits of ResNet in the context of mineral image classification are significant. When employed as a backbone, ResNet serves as a highly effective feature extractor, capable of learning hierarchical representations of increasing complexity. Schematically, the advantages offered by ResNet in the process of automatic feature extraction can be summarized as follows:
  • Early convolutional layers capture low-level visual features such as edges, textures, and simple color transitions.
  • Intermediate layers progressively detect more complex structures, such as mineral grain boundaries, morphological patterns, and characteristic textures.
  • Deeper layers encode high-level, abstract representations, including shapes, compositional structures, and object-level features that are essential for distinguishing among different minerals.
  • The residual design stabilizes the optimization process and increases efficiency, ensuring that very deep models remain trainable and resistant to degradation.
In the proposed Mycelial_Net framework, the ResNet backbone provides these rich, multi-level representations of mineral images. The mycelial blocks then refine and reorganize these features through their adaptive connectivity, enhancing the discriminative power of the overall system. This synergy allows the network to achieve robust and accurate classification, even when dealing with challenging datasets characterized by noise, variability, or low resolution.

3. Results

3.1. Image Analysis, Edge Detection and Segmentation

To verify the effectiveness of the Mycelial_Net model for thin-section images analysis, we used a public dataset. The part of this dataset used in our tests consists of 204 thin-section images of rocks and minerals (see Data Availability Statement for direct access and repository link). The thin-section images include 50 images of augite, 55 of biotite, 48 of olivine, and 51 of plagioclase. The number of training and test images varied depending on the specific test (see below), as multiple tests were conducted. Both plane-polarized light (PPL) and cross-polarized light (XPL) images were employed, combined in a mixed dataset with equal proportions of each type.
The images are provided in RGB JPEG format at 96 dpi, with a resolution of 275 × 183 pixels. From this collection, we constructed a labeled sub-dataset, ranging from 40% to 80% (indeed, we performed multiple training tests) of the total dataset, to be used for training. The remaining portion of the dataset was reserved for independent testing. Each thin-section image was manually labeled into one of four mineralogical categories: augite, biotite, olivine, and plagioclase. These classes were selected because of their common occurrence in igneous rocks and the frequent challenges they pose in automated classification tasks due to morphological similarities, overlapping optical properties, and alteration or corrosion effects. The dataset encompasses a broad range of mineralogical and textural variations across different geological contexts, ensuring that the model is exposed to realistic diversity within each mineral class.
For Augite, thin sections include both simple and twinned crystals from foidite samples (Capo Verde), imaged under both parallel Nicols (N//, 2× magnification) and crossed Nicols (NX). The dataset also includes zoned augite crystals from the same locality, as well as augite crystals from a tephrite, from the Rheingraben, Germany.
For Biotite, thin sections cover basal sections under N//and NX conditions, biotite with opaque rims, sections containing rutile and apatite inclusions, as well as biotite crystals from andesites and rhyolites.
For Olivine, images represent crystals from diverse volcanic environments, including the Aeolian Islands, Etna basalts, and other regions worldwide such as Antarctica. The dataset also captures olivine with fractures filled by bowlingite, rounded phenocrysts, and chromite crystals embedded in a calcite matrix from Bloemfontein kimberlite (South Africa).
For Plagioclase, thin sections include crystals in basaltic scoria and basalts, partially resorbed crystals, and zoned plagioclase with complex zoning patterns. The dataset also incorporates crystals with glass inclusions, plagioclase from trachites (from Bingol region, Turkey), and crystals exhibiting Carlsbad twinning.
By including these variations—ranging from zoning, twinning, and inclusions to differences in host rock and regional context—the dataset provides a realistic representation of mineralogical heterogeneity.
The train–test splits were generated randomly, with stratified sampling to maintain class balance. In general, the training images included both isolated mineral grains and minerals embedded within complex rock fabrics. This choice was deliberate in order to introduce variability into the training process and to make the model more robust. While images of isolated grains provide clearer reference patterns for each mineral class, incorporating minerals within multi-mineral rock matrices exposes the model to more realistic and challenging textural contexts. This balance allowed Mycelial_Net to learn from both idealized and complex examples, thereby enhancing its ability to generalize and perform effectively on diverse petrographic images.
Before performing any automatic classification test with the Mycelial_Net model, we conducted a preliminary analysis on a subset of selected mineral thin-section images to extract key structural features through the ResNet model. This step is designed to illustrate how our approach identifies and quantifies petrographic structures, even in low-quality images. The original thin-section images were deliberately kept at low resolution to demonstrate that the segmentation and edge detection algorithms are robust and effective under suboptimal imaging conditions. Figure 3 shows some examples of thin-section images used in this test.
Each image is first converted to grayscale to simplify intensity-based analysis. Edge detection is then performed using the Sobel filter, a classical gradient-based operator that highlights regions of rapid intensity change. This process effectively identifies the boundaries of mineral grains and microstructures, allowing the algorithm to capture essential structural information. Following edge detection, connected component labeling is applied to segment contiguous regions based on the detected edges. This labeling provides a clear delineation of individual mineral domains and quantifies the number of distinct structures within the image.
High-resolution images (500–600 dpi) are successively generated for visual inspection, showing the original image alongside the detected edges and segmented regions. This approach not only provides qualitative validation of the feature extraction process but also allows precise visual comparison across samples.
Integrating this feature extraction workflow with Mycelial_Net’s adaptive training pipeline creates a comprehensive methodology for mineral image analysis. The model leverages the extracted structural features to enhance classification performance while simultaneously allowing detailed exploration of petrographic characteristics. By quantifying edges and segmented regions, we can investigate correlations between structural complexity and mineralogical properties, opening avenues for deeper insights into petrography and mineral analysis.
This combination of grayscale conversion, Sobel edge detection, and connected component segmentation ensures that the methodology is robust, interpretable, and effective even when starting from low-quality images. Illustrative examples of the extracted features and segmented regions are presented in Figure 4, highlighting the workflow’s ability to reliably capture essential mineral structures prior to classification.

3.2. Test: Adaptive Training, Cross-Validation and Classification with Mycelial_Net

We adopted a rigorous and statistically robust approach to assess the training reliability and classification performance of the proposed Mycelial_Net algorithm.
The dataset was divided into distinct training, validation, and testing subsets. The training set was used to optimize the model parameters, while the validation set supported hyperparameter tuning and early stopping to prevent overfitting. The testing set, kept entirely independent, provided an unbiased estimate of the final model accuracy and generalization capability.
To further strengthen the reliability of the evaluation, we implemented various types of K-fold cross-validation tests, in which the dataset was partitioned into K equally sized folds. For instance, in one of the tests, the model was trained K times, each time using K–1 folds for training and one for validation, and the results were then averaged. In another class of tests, a stratified K-fold procedure was used to preserve class balance across folds, ensuring statistical consistency even in the case of uneven class distributions.
This entire procedure was systematically applied in our study, allowing for a comprehensive and reproducible assessment of model performance across multiple runs, and providing a sound statistical basis for evaluating the robustness, precision, and generalization of Mycelial_Net.
As anticipated earlier, the training data volume was not fixed but varied across different experiments, allowing us to test the robustness and generalization of the Mycelial_Net model under different training-to-testing ratios.
To make the study more reproducible and transparent, we emphasize that the training sets were selected randomly but with class balance preserved, and that all images underwent identical preprocessing (resizing, normalization, and augmentation). Training was performed over multiple epochs with early stopping based on validation performance to prevent overfitting.
The Mycelial_Net architecture, in this test, consists of an initial convolutional layer (variable number of filters, 3 × 3 kernel, ReLU activation), followed by a max-pooling layer, a flattening operation, a fully connected dense layer with an adaptive number of neurons, and a Softmax output layer corresponding to the number of classes. The model was compiled with the Adam optimizer, categorical cross-entropy loss, and accuracy as the performance metric.
A custom Keras callback was implemented to adjust hyperparameters dynamically during training. Key hyperparameters—including the number of dense neurons, convolutional filters, dropout rate, and learning rate—were adapted based on validation accuracy trends. Specifically, if validation accuracy remained below 0.8, the network increased neurons and filters slightly and incrementally adjusted the dropout rate. In this simple test, the learning rate decayed exponentially to stabilize convergence.
The user of the Mycelial_Net model can use several hyperparameters to optimize training and generalization on images to classify. As an illustrative example, training runs for 50–100 epochs (an epoch here refers to one complete pass of the entire training dataset through the network), with an initial learning rate of 0.01 and a weight decay of 0.0001, while 20%–40% of the data is reserved for validation. The hidden network starts with 2 MycelialBlock layers, each of variable dimension with architecture evolution, and can dynamically add new layers if performance stagnates, following a “layer_patience” (see below) of 5 epochs. To prevent overfitting, a variable level of dropout is applied. Early stopping is employed if validation accuracy does not improve for 12 epochs (patience = 12). Finally, the network uses ResNet18, ResNet36, or ResNet50 pretrained on ImageNet as its feature extractor backbone.
The network was trained with the adaptive hyperparameter callback actively modifying the model at the end of each epoch. Training and validation metrics were recorded, along with the evolution of network hyperparameters, to allow in-depth analysis of the learning dynamics.
Post-training evaluation was performed on the validation set. Predicted labels were compared to ground truth classes, and a detailed classification report—including precision, recall, and F1-score—was generated. This provided a quantitative assessment of model performance across all mineral classes.
Comprehensive visualizations were produced, including accuracy and loss over epochs, evolution of dense layer neurons, adaptive learning rate adjustments, convolutional filter modifications, and dropout rate evolution. High-resolution plots were saved for detailed inspection of the network’s adaptive behavior.
Figure 5 and Figure 6 illustrate the adaptive evolution of model parameters across epochs, highlighting how Mycelial_Net reallocates computational capacity for challenging classes. These enhancements demonstrate that the biologically inspired adaptive mechanisms embedded in Mycelial_Net provide substantial gains in accuracy, robustness, and generalization over traditional CNN architectures, confirming its effectiveness for complex mineral image classification tasks.
Figure 7 shows four representative test cases of mineral classification obtained with the Mycelial_Net model. Each panel reports the true prevalent mineral class, the predicted mineral class, and the corresponding classification probability. In all four examples, the classification is excellent, with probabilities very close to 100%. This demonstrates the remarkable ability of the Mycelial_Net model, combined with ResNet, to extract and recognize robust discriminative features from the input data. The high accuracy is explained by several factors:
  • Biologically inspired architecture—The Mycelial_Net model integrates multiple hidden layers connected through mycelium-like blocks, which combine linear and non-linear transformations in a way that enhances information flow and feature abstraction.
  • Resilience to noise and degradation—As explained earlier, our Mycelial_Net model is empowered by deep feature extraction from the ResNet backbone with adaptive hidden layers. The model captures subtle textural and structural patterns of minerals that remain invariant under poor image quality.
  • Progressive self-adaptation—During training, the network dynamically grows by adding new hidden layers and neurons when the learning stagnates. This process allows the model to adaptively refine its internal representations and reach optimal classification performance.
In summary, Figure 5, Figure 6 and Figure 7 highlight how the Mycelial_Net model achieves near-perfect classification accuracy even under challenging conditions, confirming its robustness and generalization capability for mineral recognition tasks.

4. Discussion

In the tests presented in the previous section, Mycelial_Net, combined with ResNet, demonstrates not only high classification accuracy but also self-adaptive behavior reminiscent of biological fungal mycelium. Its modular and plastic structure enables it to adapt to variations in input data and structural anomalies. Unlike rigid CNNs, Mycelial_Net reconfigures its pathways to improve feature propagation and reduce redundancy.
The adaptive Mycelial_Net demonstrated a progressive increase in validation accuracy, accompanied by controlled loss and quick decay. Dense layer neurons and convolutional filters increased adaptively, while the learning rate decayed smoothly, reflecting the dynamic adjustment strategy. These mechanisms allowed the network to maintain robust learning while minimizing overfitting.
The Mycelial_Net framework effectively integrates adaptive hyperparameter tuning with ResNet and “conventional” CNN-based classification. This adaptive approach enhances model performance on mineral image datasets, providing a flexible and resilient architecture suitable for complex, heterogeneous visual data (Table 1). In fact, the model dynamically adjusts its hyperparameters during training to enhance validation performance. It outperforms the standard CNN baseline, particularly in classes where the baseline struggled. Validation accuracy improved from ~75%–78% (baseline CNN) to over 95%–100% with Mycelial_Net. F1-scores indicate more balanced class performance, with significant gains in previously underperforming classes (we briefly recall the following definitions: Accuracy defines the proportion of correctly classified samples over the total number of samples. Precision represents the proportion of correctly predicted positive samples over all samples predicted as positive. Recall is also called Sensitivity or True Positive Rate and is like Precision but slightly different. It corresponds to the proportion of correctly predicted positive samples over all actual positive samples. Finally, the F1-score is the harmonic mean of Precision and Recall, providing a balance between the two).
Furthermore, adaptive hyperparameter evolution (number of hidden layers and neurons, conv filters, dropout, learning rate) shows strategic resource allocation, reducing overfitting and improving generalization. Loss curves demonstrate faster convergence and stability.
For completeness, Figure 8 shows a comparison between the confusion matrix obtained with Baseline CNN (left) and the Mycelial_Net methods (right).
Finally, to compare the Mycelial_Net model with other automatic classification approaches, we performed the same test on the identical dataset using alternative algorithms, including Fully Connected Neural Networks (with a variable number of hidden layers ranging from 2 to 10), Decision Tree, Random Forest, and Adaptive Boosting. In this case as well, the classification performance (Validation Accuracy and Average F1-Score) proved to be significantly higher for the Mycelial_Net model compared to all the other techniques employed, as shown in Table 2.
We remark that the benchmark methods used for comparison with Mycelial_Net, namely Convolutional Neural Networks (CNNs), Adaptive Boosting (AdaBoost), Fully Connected Neural Networks (FCNNs), Random Forest and Decision Tree, were deliberately chosen for their continued relevance, representativeness, and complementary characteristics.
In fact, these methods cover distinct and well-established machine learning families—convolutional architectures for spatial pattern recognition, fully connected networks for baseline parametric performance, residual networks for deep and stable learning, AdaBoost as a robust non-neural ensemble approach, Random Forest and Decision Trees for effective classification and anomaly detection tasks. This diversity ensures a fair and informative comparison across methodological domains.
In addition to the above comparative tests, in order to quantitatively evaluate the performance of the proposed MycelialNet, a comparative experiment was carried out against a state-of-the-art Visual Transformer (ViT) model. Both models were trained and validated on the same dataset of petrographic images collected in labeled subfolders, ensuring identical data augmentation procedures, learning parameters, and optimization settings.
The results indicate that MycelialNet performed slightly better than the Visual Transformer in terms of training stability, and convergence speed. Although the ViT architecture demonstrated good generalization capabilities, its intrinsic patch-based tokenization mechanism tends to reduce sensitivity to fine-grained spatial and textural details. These microstructural features are essential for accurate mineral classification in thin-section imagery. Conversely, the biologically inspired architecture of MycelialNet, characterized by non-linear, adaptive, and interconnected processing layers, effectively captured both global and local correlations within the image domain.
Quantitatively, MycelialNet achieved an average validation accuracy of about 95% after 42 training epochs, compared to 87% obtained by the Visual Transformer under the same conditions. Moreover, MycelialNet exhibited a smoother convergence curve and lower validation loss variance, indicating satisfactory robustness and reduced overfitting.
Of course, we must acknowledge that, in the tests discussed in this paper, the four selected mineral classes (augite, biotite, olivine, and plagioclase) are characterized by optical properties that can often be distinctive, especially under cross-polarized light. However, our choice was driven by two main considerations.
First, although these minerals possess diagnostic optical features, their classification in practice is not always straightforward. Factors such as alteration, corrosion, zoning, and grain boundary effects often obscure or distort their ideal optical signatures. Moreover, when embedded in a complex rock fabric, the visual discrimination between these minerals is considerably less trivial than in isolated textbook examples. For this reason, we observed that even with these “seemingly distinctive” minerals, the classification task remained challenging, particularly when working with relatively low-resolution images.
Second, we remark that the primary goal of this study was not to exhaustively test Mycelial_Net on the most ambiguous mineral pairs, but rather to demonstrate the feasibility, robustness, and adaptability of the biologically inspired architecture when applied to real petrographic data. Establishing a proof of concept on these four mineral classes allowed us to start validating the model’s adaptive mechanisms under controlled conditions.
That said, we recognize that the ultimate validation of Mycelial_Net should involve more demanding classification tasks, such as distinguishing between quartz–K-feldspar–plagioclase, different pyroxenes, or different amphiboles. This represents a natural next step for future research. Expanding the dataset to include such challenging mineral groups will allow us to more rigorously test and demonstrate the advantages of Mycelial_Net over standard CNNs and other architectures.
Furthermore, we must highlight the computational cost associated with adaptive reconfiguration (generally 20%–30% higher than in standard CNNs), and the potential risk of overfitting when working with small datasets. This problem is linked with another important question that is directly related to our work: the definition of the Representative Elementary Volume (REV) [18]. The REV represents the smallest volume of material that can be considered statistically representative of the mineralogical composition. In our study, the features extracted by Mycelial_Net from image samples depend on the local textures and structures within each sample. If the sample volume is too small, it may fail to capture the full variability of the mineral, potentially leading to biased or non-representative classifications. Conversely, excessively large volumes may dilute meaningful local features and increase computational costs. While this study focuses on evaluating the classification framework, we acknowledge that careful selection of the REV is critical for robust mineral characterization, and future work will address systematic REV determination to ensure representative and reproducible analysis.
However, despite the intrinsic limitations of this research, we are confident that the Mycelial_Net framework can be effectively extended to a wide range of geoscientific applications. Beyond thin-section image classification, it can address diverse problems typically tackled with deep neural networks, including mineral resource exploration, well log analysis, lithofacies classification, and other complex tasks in subsurface characterization and geoscientific data interpretation [8,19,20,21,22,23,24,25]. These domains constitute further areas of ongoing application of the Mycelial_Net model and will be examined in detail in separate publications.

5. Conclusions

In this work, we applied Mycelial_Net, a deep neural network inspired by the structural and adaptive properties of fungal mycelium, to the classification and structural analysis of mineral images in thin sections. Compared to baseline CNN models, as well as to other consolidated classifiers (Random Forest, Adaptive Boosting and so forth), Mycelial_Net demonstrates encouraging advancements in the following crucial points. First, validation accuracy improved from ~78% in baseline CNNs to over 95%, confirming superior feature extraction and generalization. Second, underrepresented mineral classes exhibit higher F1-scores, indicating more uniform predictive reliability. Third, Mycelial_Net demonstrated high dynamic adaptation: key hyperparameters such as number of neurons, convolutional filters, dropout rates, and learning rates evolved during training, reducing overfitting and improving convergence. Furthermore, this model shows faster convergence: loss curves show Mycelial_Net quickly reaches stable minima. High performance across multiple mineral datasets highlights generalizability and applicability to other imaging domains.
However, the Mycelial_Net model is still in its infancy. For that reason, we do not claim that it surpasses all modern architectures. It is indeed possible that, on other datasets, more established models could perform better. The principal aim of our study is not to assert superiority in every case, but rather to introduce and explore a new biologically inspired, evolutionary, and dynamically self-organizing learning framework. We believe that this approach, through further experimental work, can progressively achieve improved performance and broader applicability.

Funding

This research received no external funding.

Data Availability Statement

All the images (microscope mineral thin sections) discussed and shown in this paper were kindly provided by Alessandro Da Mommio. Link: http://www.alexstrekeisen.it/index.php, accessed on 21 July 2023. The images used in this paper have been extracted from that website at the following specific links: Augite thin sections are derived primarily from foidites, tephrites, and other volcanic rocks. See examples at: http://www.alexstrekeisen.it/vulc/clinopirosseni.php (accessed on 21 July 2023). Biotite thin sections are derived mainly from andesites, rhyolites, and other volcanic rocks. See examples at: http://www.alexstrekeisen.it/vulc/biotite.php (accessed on 21 July 2023). Olivine thin sections are derived predominantly from basalts. See examples at: http://www.alexstrekeisen.it/vulc/olivina.php (accessed on 21 July 2023). Plagioclase thin sections are derived primarily from basaltic scoria and trachyte. See examples at: http://www.alexstrekeisen.it/vulc/plagioclasi.php (accessed on 21 July 2023). Additional resources: 1. A Simple Tutorial code on Mycelial_Net Model for Image Classification—DOI: 10.13140/RG.2.2.36136.64007. Free download at the link: https://www.researchgate.net/publication/395734780_A_Simple_Tutorial_on_Mycelial_Net_Model_for_Image_Classification_Introduction_to_the_Methodology (accessed on 15 September 2025). 2. Intuitively Understanding the Mycelial_Net Model through a comparative explanation—Free download at the link: https://www.researchgate.net/publication/396523364_Tutorial_Intuitively_Understanding_the_Mycelial_Net_Model_through_a_comparative_explanation (accessed on 15 October 2025).

Conflicts of Interest

The author declares no conflicts of interest.

References

  1. Solar, M.; Perez, P.; Watkins, F. Neural Recognition of Minerals. In Proceedings of Artificial Intelligence in Theory and Practice; Springer: Boston, MA, USA, 2008; pp. 433–437. [Google Scholar]
  2. Baykan, N.A.; Yılmaz, N. A mineral classification system with multiple artificial neural network using k-fold cross validation. Math. Comput. Appl. 2011, 16, 22–30. [Google Scholar] [CrossRef]
  3. Slipek, B.; Młynarczuk, M. Application of pattern recognition methods to automatic identification of microscopic images of rocks registered under different polarization and lighting conditions. Geol. Geophys. Environ. 2013, 39, 373. [Google Scholar] [CrossRef]
  4. Aligholi, S.; Khajavi, R.; Razmara, M. Automated mineral identification algorithm using optical properties of crystals. Comput. Geosci. 2015, 85, 175–183. [Google Scholar] [CrossRef]
  5. He, K.; Zhang, X.; Ren, S.; Sun, J. Deep Residual Learning for Image Recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar] [CrossRef]
  6. Agrawal, N.; Govil, H. A deep residual convolutional neural network for mineral classification. Adv. Space Res. 2023, 71, 3186–3202. [Google Scholar] [CrossRef]
  7. Izadi, H.; Sadri, J.; Bayati, M. An intelligent system for mineral identification in thin sections based on a cascade approach. Comput. Geosci. 2017, 99, 37–49. [Google Scholar] [CrossRef]
  8. She, Y.; Wang, H.; Zhang, X.; Qian, W. Mineral identification based on machine learning for mineral resources exploration. J. Appl. Geophys. 2019, 168, 68–77. [Google Scholar]
  9. Zhang, Y.; Li, M.; Han, S.; Ren, Q.; Shi, J. Intelligent Identification for Rock-Mineral Microscopic Images Using Ensemble Machine Learning Algorithms. Sensors 2019, 18, 3914. [Google Scholar] [CrossRef]
  10. Liu, C.; Li, M.; Zhang, Y.; Han, S.; Zhu, Y. An Enhanced Rock Mineral Recognition Method Integrating a Deep Learning Model and Clustering Algorithm. Minerals 2019, 9, 516. [Google Scholar] [CrossRef]
  11. Liu, K.; Liu, J.; Wang, K.; Wang, Y.; Ma, Y. Deep learning-based mineral classification in thin sections using convolutional neural network. Minerals 2020, 10, 1096. [Google Scholar]
  12. Ran, X.; Xue, L.; Zhang, Y.; Liu, Z.; Sang, X.; He, J. Rock classification from field image patches analyzed using a deep convolutional neural network. Mathematics 2019, 7, 755. [Google Scholar] [CrossRef]
  13. Giri, R.N.; Janghel, R.R.; Govil, H.; Mishra, G. A stacked ensemble learning-based framework for mineral mapping using AVIRIS-NG hyperspectral image. J. Earth Syst. Sci. 2024, 133, 107. [Google Scholar] [CrossRef]
  14. Xie, S.; Qiu, Y.; Cao, S.; Wu, W. Hyperspectral Lithological Classification of 81 Rock Types Using Deep Ensemble Learning Algorithms. Minerals 2025, 15, 844. [Google Scholar] [CrossRef]
  15. Dell’Aversana, P. Enhancing Deep Learning and Computer Image Analysis in Petrography through Artificial Self-Awareness Mechanisms. Minerals 2024, 14, 247. [Google Scholar] [CrossRef]
  16. Dell’Aversana, P. A Biological-Inspired Deep Learning Framework for Big Data Mining and Automatic Classification in Geosciences. Minerals 2025, 15, 356. [Google Scholar] [CrossRef]
  17. Sheldrake, M. Entangled Life: How Fungi Make Our Worlds, Change Our Minds & Shape Our Futures; First US Edition 2020; Random House: New York, NY, USA, 2020. [Google Scholar]
  18. Araya-Polo, M.; Alpak, F.O.; Hunter, S.; Hofmann, R.; Saxena, N. Deep learning–driven permeability estimation from 2D images. Comput. Geosci. 2020, 24, 571–580. [Google Scholar] [CrossRef]
  19. Hall, B. Facies classification using machine learning. Lead. Edge 2016, 35, 906–909. [Google Scholar] [CrossRef]
  20. Mamani, M.; Wörner, G.; Sempere, T. Geochemical variations in igneous rocks of the Central Andean orocline (13° S to 18° S): Tracing crustal thickening and magma generation through time and space. GSA Bull. 2010, 122, 162–182. [Google Scholar] [CrossRef]
  21. Binetti, M.S.; Massarelli, C.; Uricchio, V.F. Machine Learning in Geosciences: A Review of Complex Environmental Monitoring Applications. Mach. Learn. Knowl. Extr. 2024, 6, 1263–1280. [Google Scholar] [CrossRef]
  22. Li, Y.E.; O’Malley, D.; Beroza, G.; Curtis, A.; Johnson, P. Machine Learning Developments and Applications in Solid-Earth Geosciences: Fad or Future? J. Geophys. Res. Solid Earth 2023, 128, e2022JB026310. [Google Scholar] [CrossRef]
  23. Sören, J.; Fontoura do Rosário, Y.; Fafoutis, X. Machine Learning in Geoscience Applications of Deep Neural Networks in 4D Seismic Data Analysis. Ph.D. Thesis, Technical University of Denmark, Kongens Lyngby, Denmark, 2020. [Google Scholar]
  24. Bhattacharya, S. Summarized Applications of Machine Learning in Subsurface Geosciences. In A Primer on Machine Learning in Subsurface Geosciences; SpringerBriefs in Petroleum Geoscience & Engineering; Springer: Berlin/Heidelberg, Germany, 2021; pp. 123–165. [Google Scholar]
  25. Zhang, W.; Gu, X.; Tang, L.; Yin, Y.; Liu, D.; Zhang, Y. Application of machine learning, deep learning and optimization algorithms in geoengineering and geoscience: Comprehensive review and future challenge. Gondwana Res. 2022, 109, 1–17. [Google Scholar] [CrossRef]
Figure 1. Integrated ResNet/Mycelial_Net workflow.
Figure 1. Integrated ResNet/Mycelial_Net workflow.
Minerals 15 01112 g001
Figure 2. Simplified block diagram of the Myclelial_Net model including the basic formulas. The key innovative aspects of the model are synthetically described on the right side of each corresponding block.
Figure 2. Simplified block diagram of the Myclelial_Net model including the basic formulas. The key innovative aspects of the model are synthetically described on the right side of each corresponding block.
Minerals 15 01112 g002
Figure 3. Few illustrative examples of thin-section images. From left to right: (a) augite, (b) biotite, (c) olivine, (d) plagioclase.
Figure 3. Few illustrative examples of thin-section images. From left to right: (a) augite, (b) biotite, (c) olivine, (d) plagioclase.
Minerals 15 01112 g003
Figure 4. Original, low-resolution thin-section image of a biotite sample (a), edge detection (b), segmented regions (c).
Figure 4. Original, low-resolution thin-section image of a biotite sample (a), edge detection (b), segmented regions (c).
Minerals 15 01112 g004
Figure 5. From top right to bottom left panels: (a) adaptive learning rate vs. epochs; (b) convolutional filter evolution; (c) normalized training and validation accuracy; (d) normalized training and validation loss vs. epochs.
Figure 5. From top right to bottom left panels: (a) adaptive learning rate vs. epochs; (b) convolutional filter evolution; (c) normalized training and validation accuracy; (d) normalized training and validation loss vs. epochs.
Minerals 15 01112 g005
Figure 6. (Left) neuron number vs. epochs; (right) dropout evolution vs. epochs.
Figure 6. (Left) neuron number vs. epochs; (right) dropout evolution vs. epochs.
Minerals 15 01112 g006
Figure 7. Representative examples of image classification results. From top left to bottom right: (a) Augite, (b) Biotite, (c) Olivine, (d) Plagioclase; predicted vs. true mineral, and prediction probability.
Figure 7. Representative examples of image classification results. From top left to bottom right: (a) Augite, (b) Biotite, (c) Olivine, (d) Plagioclase; predicted vs. true mineral, and prediction probability.
Minerals 15 01112 g007
Figure 8. Confusion matrix comparison (values in %). Baseline CNN matrix (left) and Mycelial_Net matrix (right).
Figure 8. Confusion matrix comparison (values in %). Baseline CNN matrix (left) and Mycelial_Net matrix (right).
Minerals 15 01112 g008
Table 1. Quantitative Comparison.
Table 1. Quantitative Comparison.
ModelValidation AccuracyAverage F1-Score
Baseline CNN≤0.78≤0.76
Mycelial_Net≥0.95≥0.95
Table 2. Quantitative Comparison of the performances of Mycelial_Net with other consolidated classification techniques.
Table 2. Quantitative Comparison of the performances of Mycelial_Net with other consolidated classification techniques.
ModelValidation AccuracyAverage F1-Score
Fully Connected NN0.6270.619
Decision Tree0.5290.522
Random Forest0.6080.598
Adaptive Boosting0.5200.520
Mycelial_Net≥0.95≥0.95
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Dell’Aversana, P. Mycelial_Net: A Bio-Inspired Deep Learning Framework for Mineral Classification in Thin Section Microscopy. Minerals 2025, 15, 1112. https://doi.org/10.3390/min15111112

AMA Style

Dell’Aversana P. Mycelial_Net: A Bio-Inspired Deep Learning Framework for Mineral Classification in Thin Section Microscopy. Minerals. 2025; 15(11):1112. https://doi.org/10.3390/min15111112

Chicago/Turabian Style

Dell’Aversana, Paolo. 2025. "Mycelial_Net: A Bio-Inspired Deep Learning Framework for Mineral Classification in Thin Section Microscopy" Minerals 15, no. 11: 1112. https://doi.org/10.3390/min15111112

APA Style

Dell’Aversana, P. (2025). Mycelial_Net: A Bio-Inspired Deep Learning Framework for Mineral Classification in Thin Section Microscopy. Minerals, 15(11), 1112. https://doi.org/10.3390/min15111112

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop