Abstract
Morphologically detailed dendrites possess powerful computational capabilities but are computationally expensive. Therefore, exploring how large-scale, detailed multi-compartment neural networks achieve learning proves challenging, presenting significant obstacles both in learning algorithms and simulation infrastructures. Here, we provide an extension to the DeepDendrite framework to enable the construction and data-driven training of multi-layer, detailed multi-compartment neural networks with highly modularized layer components. The gradient at each layer is computed by simulating gradient-mirror neurons in the feedback pathway simultaneously with the detailed neurons in the feedforward pathway, providing a simulation-based implementation of backpropagation in detailed neural networks. We demonstrate comparable results on classic image classification datasets with fully-connected and convolutional architectures. Furthermore, we analyze transfer attack robustness between artificial neural networks (ANNs), detailed neural networks and single-compartment networks. In conclusion, we provide a useful framework to investigate learning in multi-layer detailed neural networks, potentially offering further insights into exploiting the computational potential of dendrites at a large scale.
Keywords: adversarial robustness, cable theory, dendritic computation, learning rule, multi-compartment model, synaptic plasticity
1. Introduction
The success of deep learning in AI has been demonstrated across numerous fields (LeCun et al., 2015; Silver et al., 2016; Abramson et al., 2024; Guo et al., 2025), with its core technical pillars being deep network architectures (Krizhevsky et al., 2012; He et al., 2016; Vaswani et al., 2017) and the backpropagation algorithm (Rumelhart et al., 1986; Schmidhuber, 2015). However, unlike the point-like neurons (McCulloch and Pitts, 1943; Rosenblatt, 1958) utilized in mainstream deep learning models, real neurons in the brain possess elaborate dendrites that integrate synaptic inputs in complex, nonlinear ways. Both active nonlinear mechanisms and passive cable properties contribute to dendritic computation (Payeur et al., 2019; Poirazi and Papoutsi, 2020). Passive dendrites, through morphology-dependent filtering and signal attenuation, can also reshape neuronal input-output transformations (Rall, 1967; Koch et al., 1983; Stuart and Spruston, 1998). Therefore, single neurons can effectively function as multi-layer neural networks (Poirazi et al., 2003; Ujfalussy et al., 2018; Beniaguev et al., 2021). The mismatch between neuroscience and AI highlights a key ingredient of biological intelligence–dendritic computation (London and Häusser, 2005; Stuart and Spruston, 2015) –that is often ignored. Consequently, the joint application of deep networks and learning algorithms to biophysically detailed multi-compartment neurons remains largely unexplored.
One reason for this mismatch is that the high computational cost of realistic dendritic trees severely limits their application (Häusser and Mel, 2003; Moldwin and Segev, 2020; Bicknell and Häusser, 2021; Zhang et al., 2023). Significant impediments must be overcome both in investigating the synaptic learning rules that operate across network of dendrites and in enhancing simulation platforms to support high-performance training with multi-compartment models. Unlike deep learning, which relies on well-established frameworks such as TensorFlow and PyTorch (Abadi et al., 2016; Paszke et al., 2019), mainstream detailed neuronal simulators (Hines and Carnevale, 1997; Kumbhar et al., 2019) focus exclusively on simulation itself, giving little consideration to support large-scale training. For example, utilities to support batch training are missing, and neuronal models are frequently loaded and unloaded on computing devices when switching samples.
To address this issue, recent studies have focused on enhancing or redesigning detailed neuronal simulators to incorporate utilities for data-driven training, resulting in emerging simulation platforms such as DeepDendrite and JAXLEY (Zhang et al., 2023; Deistler et al., 2025). These platforms have demonstrated that detailed neuronal models can be optimized for data-driven tasks, highlighting task-constrained training of biophysical models as an emerging direction in computational neuroscience. However, utilities to support modular construction of deep networks are rather limited, and results have only been demonstrated for detailed neural networks with a single hidden layer (Wybo et al., 2023; Zhang et al., 2023; Deistler et al., 2025), leaving deep detailed networks unexplored.
In this work, we extend the established DeepDendrite framework to support the construction and data-driven training of multi-layer, detailed multi-compartment neural networks. We provide highly modularized layer components (e.g., input, output, fully-connected, and convolutional layers) as basic building blocks for network construction (Figure 1a). Each layer comprises multi-compartment neurons in the feedforward pathway for inference and single-compartment gradient-mirror neurons in the feedback pathway for error backpropagation (Figure 1b). Simulating both pathways simultaneously, the somatic gradients of feedforward neurons are approximated via the somatic voltages of gradient-mirror neurons, providing a simulation-based implementation of error backpropagation in detailed neural networks.
FIGURE 1.

Multi-layer detailed neural network construction using modularized layers. (a) An example of a fully-connected detailed neural network for image classification. The pixel values of an image are converted into spike trains to serve as input to the network. The detailed neural network is constructed by stacking these highly modularized layers. Only the feedforward pathway is shown for clarity. (b) Diagram of a modularized layer. Each layer comprises detailed multi-compartment neurons in the feedforward pathway for inference, and single-compartment gradient-mirror neurons in the feedback pathway for error backpropagation. Both pathways are simulated simultaneously. The somatic gradients of the feedforward detailed neurons can be closely approximated by the somatic voltages of gradient-mirror neurons.
We conduct experiments on classic image classification datasets using fully-connected and convolutional networks, demonstrating that our framework can achieve comparable results to artificial neural networks (ANNs) of identical architectures. Additionally, to investigate potential computational advantages brought by dendrites, we target the networks with transfer adversarial attacks (Goodfellow et al., 2015; Papernot et al., 2016). The results show that fully-connected detailed neural networks consistently outperform ANNs under high attack strength. Furthermore, we compare transfer adversarial robustness between single-compartment and detailed fully-connected networks, demonstrating that dendritic compartments provide an additional contribution to this effect. In conclusion, we provide a useful framework to advance explorations in training multi-layer detailed neural networks, potentially offering new possibilities into investigating how dendritic structure influence task-driven neural computation.
2. Materials and methods
2.1. Code availability statement
The source code for the modified DeepDendrite and the modularized layer APIs is available at https://github.com/MS-GEB/DeepDendrite-modularization.
2.2. Detailed neurons in the feedforward pathway
We utilize morphologically detailed multi-compartment models with passive dendrites and active synapses for inference in the feedforward pathway, following the HPC-Net model proposed in DeepDendrite (Zhang et al., 2023). Although active ion channels are not incorporated in the model to preserve mathematical tractability, passive dendrites are computationally important because morphology imposes location-dependent filtering, attenuation, and transfer-resistance structure on synaptic integration (Rall, 1967, 1994; Rinzel and Rall, 1974). Here, we provide a detailed description of the theory behind our approach, which was undisclosed in the original DeepDendrite paper. For passive dendrites, the voltage change at any location in response to arbitrary current inputs can be explicitly and accurately expressed following transfer impedance theory (Butz and Cowan, 1974; Koch et al., 1983; Koch and Poggio, 1985) as:
where Vk (t) is the relative change of voltage at location k relative to resting potential, N is the number of current inputs, Kkj (t) is the impulse response or Green’s function between current input location j and voltage output location k over elapsed time t, and * denotes convolution. For current inputs with a time-invariant mean, i.e., , the steady-state expected voltages can be computed by:
where Rkj is the transfer resistance between location j and k on the dendrites, defined as . The neurons in different layers are connected by synapses with active conductances, where the postsynaptic current Ij (t) depends nonlinearly on the somatic voltage of the presynaptic neuron j in the previous layer, Vin,j (t):
where wj is the synaptic weight, gj is the normalization factor, and f(⋅) is the nonlinear activation function. As we are primarily interested in the somatic voltages of each neuron, we omit subscript k and add subscript i to denote the somatic voltage of neuron i as Vi (t), and the transfer resistance between dendritic location j and the soma of neuron i as Rij. Assuming Vin,j (t) fluctuates slightly around its time-invariant mean , we can combine the above equations to demonstrate that the expected somatic voltages of neurons in the next layer are also constant at steady state:
Therefore, we can describe the computation in our multi-layer detailed neural networks in terms of steady-state expected voltages as:
where is the expected somatic voltage vector of neurons in layer l, and Wl + 1 is the matrix of equivalent connection weights between layer l and l + 1, defined as Wl + 1, ij = wl + 1, ijgl + 1, ijRl + 1, ij. The resulting formula regarding steady-state expected voltages shares a similar mathematical form with conventional ANNs, providing a theoretical basis for well-established ANN learning methods (e.g., backpropagation) to be readily transferred to multi-layer detailed neural networks.
2.3. Gradient-mirror neurons in the feedback pathway
We define gradient-mirror neurons as the neurons utilized in the feedback pathway whose voltages represent gradient signals of the feedforward pathway. It should be noted that the term “gradient-mirror neuron” is unrelated to action-observation mirror neurons (Rizzolatti and Craighero, 2004; Iacoboni, 2009). The design of simulating single-compartment gradient-mirror neurons for error backpropagation stems from two considerations. First, from a computational perspective, using a unified simulation substrate for inference and optimization provides a convenient way to construct and train detailed neural networks. Second, to enable high-performance training, we seek to unify the computation of simulation and backpropagation so that learning is not interrupted by alternating between different computing mechanisms.
As a result of this design, the somatic gradients of detailed neurons in the feedforward pathway can be approximated by the simulated somatic voltages of gradient-mirror neurons in the feedback pathway. This unifies gradient computation with simulation and provides a simulation-based implementation of backpropagation. Specifically, the backpropagation rule for somatic gradients is:
where L is the loss function at the output layer. The synaptic input from gradient-mirror neuron i in layer l +1 to gradient-mirror neuron j in layer l is defined as:
where gm is the synaptic conductance. The steady-state expected voltages of gradient-mirror neurons are then given by:
where rm is the input resistance of the single-compartment gradient-mirror neuron. By setting gm = 1/rm and combining the above equations, we obtain , demonstrating that the somatic gradients of feedforward neurons match the expected voltages of the gradient-mirror neurons at steady state. This approach should therefore be regarded as a computational mechanism for gradient propagation in detailed neural simulations rather than a biologically local learning rule.
2.4. Synaptic plasticity rule
The original synaptic plasticity rule in DeepDendrite computes the gradient at each time step and uses the averaged gradient to guide learning. However, when applied to multi-layer networks, we found such a setting occasionally leads to unstable results due to rapid voltage variations. To stabilize training, we compute weight updates from expected voltages:
where η is the learning rate. In practice, we use running averages to approximate expected voltages in an online manner.
2.5. Input patterns
We adopt image classification tasks as typical benchmarks for data-driven learning. To convert a static image into spike train inputs for neuronal simulation, we follow the method in DeepDendrite to convert normalized pixel values into the onsets and intervals of homogeneous spike trains, ensuring that the postsynaptic potentials maintain constant expectations at steady state. Specifically, for each grayscale or color channel value of a pixel normalized between 0 and 1, denoted by p(x, y, c) [where (x, y) is the pixel location on image and c is the channel index], the corresponding spike train has a constant interspike interval of:
in milliseconds, where ISImin is the minimum interval when p(x, y, c) reaches its maximum value. The onset of the first spike is given by ISI(x, y, c) + Ton, where Ton is a constant parameter. The simulation time per image is denoted by T. In the original setting of DeepDendrite, ISImin = 5ms, Ton = 9ms, and T = 50ms. However, in multi-layer networks, we found this duration insufficient to drive responses in deeper layers. Therefore, we extended the simulation time per image to T = 500ms, and the period for learning is set between 200ms and 500ms for running average computation. The input spikes are received by synapses with single-exponential conductance, with a decay time constant of 5ms and a reversal potential of 1mV.
3. Results
3.1. Gradient-mirror neurons enable effective training of multi-layer detailed neural networks
We demonstrate the learning capabilities of our proposed framework on the MNIST (LeCun et al., 1998) and CIFAR-10 (Krizhevsky, 2009) image classification datasets using typical fully-connected and convolutional architectures following Bartunov et al. (2018). We chose not to experiment with larger networks or more challenging datasets, such as ImageNet (Deng et al., 2009), due to excessive training times. Even when utilizing DeepDendrite on a single NVIDIA A100 GPU, we estimate that completing 60 epochs of training for a convolutional network on CIFAR-10 would take 4 weeks, and a single epoch of training on ImageNet would require a month. As a result, we focus our experiments on fully-connected and convolutional networks on MNIST, and a fully-connected network on CIFAR-10, which require 1 day, 3 days, and 1 week, respectively, to complete 60 epochs of training. For each network we performed multiple independent runs with different random seeds (N = 3). For the convolutional network on MNIST, the feedforward neurons in the convolutional layers are single-compartment, and the simulation time step is enlarged to 10ms to reduce training time to an affordable amount.
The detailed multi-compartment neurons in the feedforward pathway were constructed using the morphology of a layer 2/3 pyramidal neuron from the mouse brain [Allen Institute for Brain Science (2015); ID 472299294]. We retained the passive dendritic properties of the model and set the reversal potential to 0 mV, following the practice of HPC-Net in DeepDendrite. For a fair comparison with ANN baselines, we utilized identical network architectures, activation functions, number of synaptic connections between neurons, weight initializers (He et al., 2015), batch sizes, loss functions, optimizers, learning rates, and training epochs, as summarized in Table 1. We employed cross-entropy as the loss function, stochastic gradient descent (SGD) without momentum or weight decay as the optimizer, and refrained from applying techniques like data augmentation or normalization.
TABLE 1.
Experiment specification of detailed neural networks and ANNs.
| Configuration | MNIST | CIFAR-10 | ANNs | |
|---|---|---|---|---|
| Fully-connected | Convolutional | Fully-connected | ||
| Architecture | FC 256 FC 256 FC 256 FC 256 FC 256 Softmax 10 |
(3 × 3, 32, 2) (3 × 3, 64, 2) FC 1024 Softmax 10 |
FC 1024 FC 1024 FC 1024 Softmax 10 |
Same as corresponding detailed neural networks |
| Platform | DeepDendrite | PyTorch | ||
| Simulation time step (ms) | 5 | 10 | 5 | N/A |
| Input spike interval (ms) | 50/(p(x, y, c) + 0.01) | N/A | ||
| Input spike start (ms) | 90 + 50/(p(x, y, c) + 0.01) | N/A | ||
| Activation function | ReLU | |||
| Synaptic connections between neurons | 1 | |||
| Weight initializer | Kaiming uniform | |||
| Batch size | 16 | 2 | 8 | Same as corresponding detailed neural networks |
| Optimizer | SGD without momentum or weight decay | |||
| Learning rate | 3e-2 | 1e-2 | 5e-4 | Same as corresponding detailed neural networks |
| Training epochs | 60 | |||
The format for locally-connected layers is (kernel size, number of output channels, stride).
The learning rates were first selected for the ANNs to yield the highest clean test accuracy, and the identical rates were subsequently applied to train the detailed neural networks. The final performances of the detailed neural networks and corresponding ANNs are summarized in Table 2. Our results show that detailed neural networks can achieve clean test accuracies comparable to their ANN counterparts, indicating that the gradient-mirror neurons in our framework can effectively leverage voltages to propagate gradients backward through layers and enable robust training of multi-layer detailed neural networks.
TABLE 2.
Comparison of clean test accuracy (%) between multi-layer detailed neural networks and corresponding ANNs (N = 3).
| MNIST | CIFAR-10 | ||
|---|---|---|---|
| Network type | Fully-connected | Convolutional | Fully-connected |
| Deep detailed network | 98.42 ± 0.05 | 98.96 ± 0.10 | 52.63 ± 0.14 |
| ANN | 98.45 ± 0.08 | 99.06 ± 0.06 | 52.95 ± 0.27 |
3.2. Enhanced transfer attack robustness in detailed neural networks
We next investigate possible computational advantages brought by dendrites. In the original DeepDendrite study, we demonstrated increased resilience to transfer adversarial attacks in the HPC-Net, but the network comprised only one hidden layer of detailed dendritic neurons and evaluations were restricted to MNIST and Fashion-MNIST (Xiao et al., 2017). To verify whether this conclusion scales to larger networks and datasets, we performed transfer attacks on our trained detailed neural networks. Notably, because the onsets and intervals of spike trains converted from an image are fixed, no noise is added during the training of detailed neural networks. The adversarial samples were obtained from a third network with a significantly different architecture–a 20-layer Residual Neural Network (ResNet) (He et al., 2016) –to ensure a fair comparison of transfer attack robustness. We utilized Foolbox (Rauber et al., 2017, 2020) alongside the Fast Gradient Sign Method (FGSM) (Goodfellow et al., 2015) to generate adversarial noise.
The results for the three network architectures on MNIST and CIFAR-10 are illustrated in Figure 2. For fully-connected architectures, the detailed neural networks achieved average improvements of 5.22% on MNIST and 3.56% on CIFAR-10 over ANNs when attack strength reached ε = 0.2. For the convolutional architecture, the performance difference was less pronounced, with the detailed network slightly exceeding the ANN by an average of 0.51% on MNIST. We argue that this marginal improvement is likely because the convolutional architectures already provided sufficient transfer adversarial robustness on this dataset (at ε = 0.2, an average of 95.32% for the convolutional ANN, compared with 91.39% for the fully-connected ANN). Furthermore, the use of point neurons instead of dendritic neurons in the convolutional layers, alongside the enlarged simulation time step, may have impaired the performance on detailed neural networks.
FIGURE 2.

Comparison of FGSM transfer attack robustness between detailed neural networks and corresponding ANNs. N = 3. (a) Fully-connected network evaluated on MNIST. (b) Convolutional network evaluated on MNIST. (c) Fully-connected network evaluated on CIFAR-10.
To obtain a more comprehensive comparison of the fully-connected networks, we expanded our experiments with an additional base model for adversarial sample generation and incorporated alternative attack methods. We trained an 11-layer VGG network (Simonyan and Zisserman, 2015) as a base model, which achieved a test accuracy of 99.53% on MNIST and 84.18% on CIFAR-10. To diversify the attack methods, we adopted a 5-step Projected Gradient Descent (PGD) (Madry et al., 2018) and DeepFool (Moosavi-Dezfooli et al., 2016) in addition to FGSM. Consequently, we evaluated 5 additional combinations of transfer attack samples for both MNIST and CIFAR-10.
The prediction accuracies of the fully-connected detailed neural networks and ANNs on these samples are illustrated in Figure 3. Our results demonstrate that the detailed neural networks consistently outperformed their ANN counterparts across all combinations under high attack strength. For the more successful attack configurations, detailed neural networks achieved an average improvement of 5.30% for MNIST and 2.38% for CIFAR-10 when the attack strength reached ε = 0.2 (e.g., DeepFool on ResNet for MNIST; FGSM on VGG for CIFAR-10). These results indicate that fully-connected detailed neural networks trained with our framework are endowed with enhanced transfer adversarial robustness under high attack strength.
FIGURE 3.

Transfer attack robustness comparison between fully-connected detailed neural networks and corresponding ANNs across combinations of base models and attack methods. Results for the ResNet+FGSM configuration are shown in Figure 2. N = 3. (a) Comparison on MNIST. (b) Comparison on CIFAR-10.
3.3. Dendrites provide an additional contribution to transfer adversarial robustness
The improved transfer adversarial robustness in detailed neural networks might be attributed to multiple factors including dendritic morphology, spike-train input encoding, temporal averaging and others. To further assess the contribution of dendrites, we performed ablation experiments on fully-connected single-compartment networks that composed only the somatic compartments in detailed neuron models. The same experiment specifications were applied as in the detailed neural networks for training and evaluation, including the same spike encoding and temporal averaging.
On both datasets, the clean test accuracy for single-compartment networks was largely in line with the detailed networks, achieving an average of 98.47% ± 0.10% on MNIST and 52.60% ± 0.57% on CIFAR-10. We then targeted the single-compartment networks with transfer adversarial samples from all 6 combinations evaluated in the previous experiment; the prediction accuracies are illustrated in Figure 4. On MNIST, single-compartment networks maintained similar accuracies to detailed networks under low attack strength. Under high attack strength, however, the performance of single-compartment networks quickly dropped, and detailed networks outperformed their single-compartment counterparts across all combinations (at ε = 0.2, min: 0.39% for FGSM on VGG, max: 1.33% for FGSM on ResNet). Additionally, single-compartment networks constantly outperformed ANNs, indicating that factors other than dendrites also contribute to the model’s transfer adversarial robustness. On CIFAR-10, the detailed networks also maintained a consistent average accuracy improvement over single-compartment networks across all combinations under high attack strength (at ε = 0.2, min: 0.82% for DeepFool on VGG, max: 1.73% for PGD on ResNet). Our results indicate that dendritic compartments provide an additional contribution to the transfer attack robustness of fully-connected detailed neural networks under high attack strength.
FIGURE 4.

Transfer attack robustness comparison between fully-connected detailed neural networks and corresponding single-compartment networks. The single-compartment networks preserve the same spike encoding and temporal integration scheme as the detailed networks, while removing dendritic compartments. ANN accuracy means are shown as baselines. N = 3. (a) Comparison on MNIST. (b) Comparison on CIFAR-10.
4. Discussion
Biophysically detailed multi-compartment models are powerful tools to decipher the computational principles of the brain. However, the application of learning in deep detailed networks remains largely unexplored due to excessive computational cost that poses significant challenges both in developing learning algorithms and advancing simulation platforms. In this work, we build upon the established DeepDendrite framework to provide an extension for constructing and training multi-layer detailed neural networks. By using gradient-mirror neurons to backpropagate errors via simulation, we provide a simulation-based implementation of backpropagation in detailed neural networks. Utilizing this framework, we achieved learning performance comparable to ANNs of identical architectures on MNIST and CIFAR-10. The fully-connected detailed neural networks exhibited improved performance under high-strength transfer attacks, and further ablation experiments suggested that dendritic compartments provide an additional contribution to this effect.
Although we construct detailed networks with architectures similar to ANNs and employ backpropagation as a mathematical basis for learning, our primary goal is not to replicate the success of ANNs. Instead, we seek to investigate the feasibility of training detailed networks at scale to better resemble the cognitive systems of the brain. To this end, two important aspects are considered. First, we build our extension upon the advanced DeepDendrite platform, which employs the computationally optimal and accurate method of Dendritic Hierarchical Scheduling (DHS) to simulate dendrites and is optimized for GPU hardware. Therefore, our framework serves as an excellent benchmark to assess the computational time and resources required to train large-scale detailed networks on data-driven tasks. Second, we implement the computations required for learning directly via neuronal simulation. This provides a unified computational framework in which neuronal dynamics and optimization signals are represented within the same simulation environment.
It is worth noting that the observed transfer adversarial robustness in fully-connected detailed neural networks likely stems from a combination of factors, including dendritic morphology, spike-train input encoding, temporal averaging, conductance normalization, activation scaling, and other simulation-specific details. Our ablation experiments against single-compartment networks, which controlled for encoding and temporal averaging, suggest that dendrites provide an additional contribution to transfer adversarial robustness under high attack strength. However, the relative contributions of these factors warrant systematic investigation in future studies.
We also emphasize that our conclusions regarding adversarial robustness are specifically confined to the transfer attack setting, where adversarial samples are generated from an external source model with a significantly different architecture. A lower transferability of adversarial perturbations could arise from various factors, including differences in input encoding, temporal dynamics, or gradient mismatch between the source model and the detailed network, rather than from intrinsic robustness in the white-box or adaptive sense. We do not claim that detailed neural networks are inherently robust against adaptive attacks that incorporate the image-to-spike encoding and network simulation into the attack pipeline. Such white-box attacks would be a valuable direction for future work.
Additionally, the gradient-mirror neuron implementation in its current form relies on precise knowledge of feedforward weights, normalization factors, and dendritic transfer resistances to define feedback synaptic inputs. This means that, despite being a simulation-based implementation, our method still faces challenges related to the weight-transport problem when considered from a biological plausibility perspective. Addressing this limitation and incorporating more biologically realistic learning rules–such as those based on random feedback weights (Lillicrap et al., 2016) or local synaptic plasticity (Sacramento et al., 2018; Lillicrap et al., 2020; Payeur et al., 2021) –into our framework remains an important direction for future research.
We utilize detailed neurons with passive dendrites and active synapses in our current framework to preserve mathematical tractability. However, real neurons in the brain possess ion channels and synapses with diverse active properties, enabling dendrites to perform more complex computations (London and Häusser, 2005; Payeur et al., 2019; Poirazi and Papoutsi, 2020). Therefore, to build more realistic learning models of the brain, additional biological and cognitive principles must be incorporated into the framework, such as active dendrites, structured connectivity, neuromodulators, etc. Future research is needed to identify rules that can facilitate learning with the involvement of these principles and to explore their computational implications for large-scale learning models.
Although our current experiments were limited in scope and computational power, future efforts will be dedicated to developing a scalable framework that can effectively leverage multi-GPU systems, incorporating biological principles such as active dendrites, and extending evaluations across a wider range of tasks and domains. We explicitly acknowledge that multi-GPU support and further algorithmic innovations are essential for scaling to more challenging datasets and deeper architectures. We also note that our current results are limited to relatively small-scale architectures (fully-connected networks on MNIST and CIFAR-10, with convolutional experiments employing single-compartment neurons in the convolutional layers as a practical compromise to reduce computational cost). Extending to genuinely deep, all-dendritic convolutional networks on large-scale datasets such as ImageNet remains an important direction for future work. By overcoming these limitations, we can further advance our understanding of biophysically detailed neural networks and open up new opportunities for exploiting the potential of dendrites at a large scale.
Acknowledgments
We thank Yichen Zhang, Lei Ma, Xiaofei Liu, J. J. Johannes Hjorth, Alexander Kozlov, Yutao He, Shenjian Zhang, Jeanette Hellgren Kotaleski, Yonghong Tian and Sten Grillner for their contribution in the original DeepDendrite project.
Funding Statement
The author(s) declared that financial support was received for this work and/or its publication. KD was supported by National Natural Science Foundation of China grant (32471149).
Footnotes
Edited by: Daqing Guo, University of Electronic Science and Technology of China, China
Reviewed by: Songting Li, Shanghai Jiao Tong University, China
Hidetoshi Urakubo, Fujita Health University, Japan
Data availability statement
Publicly available datasets were analyzed in this study. The MNIST dataset used in this study is available at http://yann.lecun.com/exdb/mnist. The CIFAR-10 dataset used in this study is available at https://www.cs.toronto.edu/~kriz/cifar.html. The source code for the modified DeepDendrite and the modularized layer APIs is available at https://github.com/MS-GEB/DeepDendrite-modularization.
Author contributions
GH: Conceptualization, Data curation, Formal analysis, Investigation, Methodology, Software, Writing – original draft. KD: Conceptualization, Funding acquisition, Supervision, Writing – review & editing. TH: Conceptualization, Supervision, Writing – review & editing.
Conflict of interest
The author(s) declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declared that Generative AI was used in the creation of this manuscript. The generative AI was only used to polish the languages, and the authors verify and take full responsibility for the use of generative AI in the preparation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
- Abadi M., Barham P., Chen J., Chen Z., Davis A., Dean J., et al. (2016). “TensorFlow: A system for large-scale machine learning,” in Proceedings of the 12th USENIX Symposium on Operating Systems Design and Implementation (OSDI 16), (New York, NY: ACM; ). [Google Scholar]
- Abramson J., Adler J., Dunger J., Evans R., Green T., Pritzel A., et al. (2024). Accurate structure prediction of biomolecular interactions with AlphaFold 3. Nature 630 493–500. 10.1038/s41586-024-07487-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- Allen Institute for Brain Science. (2015). Allen Cell Types Database. Seattle: Allen Institute for Brain Science. [Google Scholar]
- Bartunov S., Santoro A., Richards B. A., Marris L., Hinton G. E., Lillicrap T. (2018). “Assessing the scalability of biologically-motivated deep learning algorithms and architectures,” in Advances in Neural Information Processing Systems 31, eds Bengio S., Wallach H., Larochelle H., Grauman K., Cesa-Bianchi N., Garnett R. (Denver, CO: NeurIPS; ). [Google Scholar]
- Beniaguev D., Segev I., London M. (2021). Single cortical neurons as deep artificial neural networks. Neuron 109 2727–2739. 10.1016/j.neuron.2021.07.002 [DOI] [PubMed] [Google Scholar]
- Bicknell B. A., Häusser M. (2021). A synaptic learning rule for exploiting nonlinear dendritic computation. Neuron 109 4001–4017. 10.1016/j.neuron.2021.09.044 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Butz E. G., Cowan J. D. (1974). Transient potentials in dendritic systems of arbitrary geometry. Biophys. J. 14 661–689. 10.1016/S0006-3495(74)85943-6 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Deistler M., Kadhim K. L., Pals M., Beck J., Huang Z., Gloeckler M., et al. (2025). Jaxley: Differentiable simulation enables large-scale training of detailed biophysical models of neural dynamics. Nat. Methods 22 2649–2657. 10.1038/s41592-025-02895-w [DOI] [PMC free article] [PubMed] [Google Scholar]
- Deng J., Dong W., Socher R., Li L.-J., Kai L., Li F.-F. (2009). “ImageNet: A large-scale hierarchical image database,” in Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2009), (Piscataway, NJ: IEEE; ). [Google Scholar]
- Goodfellow I. J., Shlens J., Szegedy C. (2015). “Explaining and harnessing adversarial examples,” in Proceedings of the 3rd International Conference on Learning Representations, (San Diego, CA: ICLR; ). [Google Scholar]
- Guo D., Yang D., Zhang H., Song J., Wang P., Zhu Q., et al. (2025). DeepSeek-R1 incentivizes reasoning in LLMs through reinforcement learning. Nature 645 633–638. 10.1038/s41586-025-09422-z [DOI] [PMC free article] [PubMed] [Google Scholar]
- Häusser M., Mel B. (2003). Dendrites: Bug or feature? Curr. Opin. Neurobiol. 13 372–383. 10.1016/s0959-4388(03)00075-8 [DOI] [PubMed] [Google Scholar]
- He K., Zhang X., Ren S., Sun J. (2015). “Delving deep into rectifiers: Surpassing human-level performance on ImageNet classification,” in Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), (Piscataway, NJ: IEEE; ). [Google Scholar]
- He K., Zhang X., Ren S., Sun J. (2016). “Deep Residual learning for image recognition,” in Proceedings of 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2016), (Piscataway, NJ: IEEE; ). [Google Scholar]
- Hines M. L., Carnevale N. T. (1997). The NEURON simulation environment. Neural Comput. 9 1179–1209. 10.1162/neco.1997.9.6.1179 [DOI] [PubMed] [Google Scholar]
- Iacoboni M. (2009). Imitation, empathy, and mirror neurons. Annu. Rev. Psychol. 60 653–670. 10.1146/annurev.psych.60.110707.163604 [DOI] [PubMed] [Google Scholar]
- Koch C., Poggio T. (1985). A simple algorithm for solving the cable equation in dendritic trees of arbitrary geometry. J. Neurosci. Methods 12 303–315. 10.1016/0165-0270(85)90015-9 [DOI] [PubMed] [Google Scholar]
- Koch C., Poggio T., Torre V. (1983). Nonlinear interactions in a dendritic tree: localization, timing, and role in information processing. Proc. Natl. Acad. Sci. 80 2799–2802. 10.1073/pnas.80.9.2799 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Krizhevsky A. (2009). Learning Multiple Layers of Features From Tiny Images. Available online at: https://www.cs.toronto.edu/~kriz/cifar.html (accessed May 17, 2026).
- Krizhevsky A., Sutskever I., Hinton G. E. (2012). “ImageNet classification with deep convolutional neural networks,” in Advances in Neural Information Processing Systems 25, eds Pereira F., Burges C.J., Bottou L., Weinberger K. (Denver, CO: NIPS; ). [Google Scholar]
- Kumbhar P., Hines M., Fouriaux J., Ovcharenko A., King J., Delalondre F., et al. (2019). CoreNEURON: An optimized compute engine for the NEURON simulator. Front. Neuroinform. 13:63. 10.3389/fninf.2019.00063 [DOI] [PMC free article] [PubMed] [Google Scholar]
- LeCun Y., Bengio Y., Hinton G. (2015). Deep learning. Nature 521 436–444. 10.1038/nature14539 [DOI] [PubMed] [Google Scholar]
- LeCun Y., Bottou L., Bengio Y., Haffner P. (1998). Gradient-based learning applied to document recognition. Proc. IEEE 86 2278–2324. 10.1109/5.726791 [DOI] [Google Scholar]
- Lillicrap T. P., Cownden D., Tweed D. B., Akerman C. J. (2016). Random synaptic feedback weights support error backpropagation for deep learning. Nat. Commun. 7:13276. 10.1038/ncomms13276 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Lillicrap T. P., Santoro A., Marris L., Akerman C. J., Hinton G. (2020). Backpropagation and the brain. Nat. Rev. Neurosci. 21 335–346. 10.1038/s41583-020-0277-3 [DOI] [PubMed] [Google Scholar]
- London M., Häusser M. (2005). Dendritic computation. Annu. Rev. Neurosci. 28 503–532. 10.1146/annurev.neuro.28.061604.135703 [DOI] [PubMed] [Google Scholar]
- Madry A., Makelov A., Schmidt L., Tsipras D., Vladu A. (2018). “Towards deep learning models resistant to adversarial attacks,” in Proceedings of the 2016 6th International Conference on Learning Representations, (San Diego, CA: ICLR; ). [Google Scholar]
- McCulloch W. S., Pitts W. (1943). A logical calculus of the ideas immanent in nervous activity. Bull. Math. Biophys. 5 115–133. 10.1007/bf02478259 [DOI] [PubMed] [Google Scholar]
- Moldwin T., Segev I. (2020). Perceptron learning and classification in a modeled cortical pyramidal cell. Front. Comput. Neurosci. 14:33. 10.3389/fncom.2020.00033 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Moosavi-Dezfooli S.-M., Fawzi A., Frossard P. (2016). “DeepFool: A simple and accurate method to fool deep neural networks,” in Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2016), (Piscataway, NJ: IEEE; ). [Google Scholar]
- Papernot N., Mcdaniel P., Goodfellow I. (2016). Transferability in machine learning: From phenomena to black-box attacks using adversarial samples. arXiv [Preprint] 10.48550/arXiv.1605.07277 [DOI] [Google Scholar]
- Paszke A., Gross S., Massa F., Lerer A., Bradbury J., Chanan G., et al. (2019). “PyTorch: an imperative style, high-performance deep learning library,” in Advances in Neural Information Processing Systems 32, eds Wallach H., Larochelle H., Beygelzimer A., d’Alché-Buc F., Fox E., Garnett R. (Denver, CO: NeurIPS; ). [Google Scholar]
- Payeur A., Beique J. C., Naud R. (2019). Classes of dendritic information processing. Curr. Opin. Neurobiol. 58 78–85. 10.1016/j.conb.2019.07.006 [DOI] [PubMed] [Google Scholar]
- Payeur A., Guerguiev J., Zenke F., Richards B. A., Naud R. (2021). Burst-dependent synaptic plasticity can coordinate learning in hierarchical circuits. Nat. Neurosci. 24 1010–1019. 10.1038/s41593-021-00857-x [DOI] [PubMed] [Google Scholar]
- Poirazi P., Papoutsi A. (2020). Illuminating dendritic function with computational models. Nat. Rev. Neurosci. 21 303–321. 10.1038/s41583-020-0301-7 [DOI] [PubMed] [Google Scholar]
- Poirazi P., Brannon T., Mel B. W. (2003). Pyramidal neuron as two-layer neural network. Neuron 37 989–999. 10.1016/S0896-6273(03)00149-1 [DOI] [PubMed] [Google Scholar]
- Rall W. (1967). Distinguishing theoretical synaptic potentials computed for different soma-dendritic distributions of synaptic input. J. Neurophysiol. 30 1138–1168. 10.1152/jn.1967.30.5.1138 [DOI] [PubMed] [Google Scholar]
- Rall W. (1994). “Theoretical significance of dendritic trees for neuronal input-output relations (1964),” in The Theoretical Foundation of Dendritic Function: The Collected Papers of Wilfrid Rall with Commentaries, eds Segev I., Rinzel J., Shepherd G. M. (Cambridge, MA: The MIT Press; ), 73–97. 10.7551/mitpress/6743.003.0015 [DOI] [Google Scholar]
- Rauber J., Brendel W., Bethge M. (2017). “Foolbox: A Python toolbox to benchmark the robustness of machine learning models,” in Proceedings of the Reliable Machine Learning in the Wild Workshop, 34th International Conference on Machine Learning, (New York, NY: ICML; ). [Google Scholar]
- Rauber J., Zimmermann R., Bethge M., Brendel W. (2020). Foolbox Native: Fast adversarial attacks to benchmark the robustness of machine learning models in PyTorch, TensorFlow, and JAX. J. Open Source Softw. 5:2607. 10.21105/joss.02607 [DOI] [Google Scholar]
- Rinzel J., Rall W. (1974). Transient-response in a dendritic neuron model for current injected at one branch. Biophys. J. 14 759–790. 10.1016/S0006-3495(74)85948-5 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Rizzolatti G., Craighero L. (2004). The mirror-neuron system. Annu. Rev. Neurosci. 27 169–192. 10.1146/annurev.neuro.27.070203.144230 [DOI] [PubMed] [Google Scholar]
- Rosenblatt F. (1958). The perceptron: A probabilistic model for information storage and organization in the brain. Psychol. Rev. 65 386–408. 10.1037/h0042519 [DOI] [PubMed] [Google Scholar]
- Rumelhart D. E., Hinton G. E., Williams R. J. (1986). Learning representations by back-propagating errors. Nature 323 533–536. 10.1038/323533a0 [DOI] [Google Scholar]
- Sacramento J., Costa R. P., Bengio Y., Senn W. (2018). “Dendritic cortical microcircuits approximate the backpropagation algorithm,” in Advances in Neural Information Processing Systems 31, eds Bengio S., Wallach H., Larochelle H., Grauman K., Cesa-Bianchi N., Garnett R. (Denver, CO: NeurIPS; ). [Google Scholar]
- Schmidhuber J. (2015). Deep learning in neural networks: An overview. Neural Networks 61 85–117. 10.1016/j.neunet.2014.09.003 [DOI] [PubMed] [Google Scholar]
- Silver D., Huang A., Maddison C. J., Guez A., Sifre L., Van Den Driessche G., et al. (2016). Mastering the game of Go with deep neural networks and tree search. Nature 529 484–489. 10.1038/nature16961 [DOI] [PubMed] [Google Scholar]
- Simonyan K., Zisserman A. (2015). “Very deep convolutional networks for large-scale image recognition,” in Proceedings of the 3rd International Conference on Learning Representations, (San Diego, CA: ICLR; ). [Google Scholar]
- Stuart G. J., Spruston N. (2015). Dendritic integration: 60 years of progress. Nat. Neurosci. 18 1713–1721. 10.1038/nn.4157 [DOI] [PubMed] [Google Scholar]
- Stuart G., Spruston N. (1998). Determinants of voltage attenuation in neocortical pyramidal neuron dendrites. J. Neurosci. 18 3501–3510. 10.1523/JNEUROSCI.18-10-03501.1998 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Ujfalussy B. B., Makara J. K., Lengyel M., Branco T. (2018). Global and multiplexed dendritic computations under in vivo-like conditions. Neuron 100 579–592. 10.1016/j.neuron.2018.08.032 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Vaswani A., Shazeer N., Parmar N., Uszkoreit J., Jones L., Gomez A. N., et al. (2017). “Attention is all you need,” in Advances in Neural Information Processing Systems 30, eds Guyon I., Von Luxburg U., Bengio S., Wallach H., Fergus R., Vishwanathan S., Garnett R. (Denver, CO: NIPS; ). [Google Scholar]
- Wybo W. A. M., Tsai M. C., Tran V. A. K., Illing B., Jordan J., Morrison A., et al. (2023). NMDA-driven dendritic modulation enables multitask representation learning in hierarchical sensory processing pathways. Proc. Natl. Acad. Sci. 120:e2300558120. 10.1073/pnas.2300558120 [DOI] [PMC free article] [PubMed] [Google Scholar]
- Xiao H., Rasul K., Vollgraf R. (2017). Fashion-MNIST: A novel image dataset for benchmarking machine learning algorithms. arXiv [Preprint] 10.48550/arXiv.1708.07747 [DOI] [Google Scholar]
- Zhang Y., He G., Ma L., Liu X., Hjorth J. J. J., Kozlov A., et al. (2023). A GPU-based computational framework that bridges neuron simulation and artificial intelligence. Nat. Commun. 14:5798. 10.1038/s41467-023-41553-7 [DOI] [PMC free article] [PubMed] [Google Scholar]
Associated Data
This section collects any data citations, data availability statements, or supplementary materials included in this article.
Data Availability Statement
Publicly available datasets were analyzed in this study. The MNIST dataset used in this study is available at http://yann.lecun.com/exdb/mnist. The CIFAR-10 dataset used in this study is available at https://www.cs.toronto.edu/~kriz/cifar.html. The source code for the modified DeepDendrite and the modularized layer APIs is available at https://github.com/MS-GEB/DeepDendrite-modularization.
