arXiv:2609.11240cs.CVSep 2026

Manuscript Offprint

arXiv:2609.11240

Fast and Accurate Monomodal 3D High Resolution Deep Registration of Drosophila Larval Brain Volumes

Daniel Reisenbüchler, Yousef Sadegheih, Michael Dittrich, Pratibha Kumari, Muhammad Usman, Dorit Merhof

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Daniel Reisenbüchler 1^{1}, Yousef Sadegheih 1^{1}, Michael Dittrich 1^{1}, Pratibha Kumari 1^{1}, Muhammad Usman 1^{1}, Dorit Merhof 1,2∗^{1,2*}

1^{1}Faculty of Informatics and Data Science, University of Regensburg, Regensburg, Germany.

2^{2}Fraunhofer Institute for Digital Medicine, MEVIS, Bremen, Germany.

*Corresponding author(s). E-mail(s): dorit.merhof@informatik.uni-regensburg.de; Contributing authors: daniel.reisenbuechler@informatik.uni-regensburg.de; yousef.sadegheih@informatik.uni-regensburg.de; michael.dittrich@informatik.uni-regensburg.de; pratibha.kumari@informatik.uni-regensburg.de; muhammad.usman@informatik.uni-regensburg.de;

Abstract

The larval stage of Drosophila melanogaster is a compact model system for neuroscience whose genetic toolkit allows fluorescent markers to be expressed in defined neural populations, and comparing the resulting expression patterns across animals requires every brain to be registered into a shared anatomical reference space. Existing pipelines for this task are predominantly based on classical registration methods, which perform a new optimization for each volume, often require per-case parameter tuning, and can take minutes per brain, limiting their use as a routine preprocessing step. We present a trained deep registration pipeline that deformably aligns a larval brain to a reference template in a single forward pass at high spatial resolution, on volumes that hold several times more voxels than those learned 3D registration is normally reported on, together with the preprocessing and anatomy-anchored evaluation pipeline required to apply it. Against eleven classical and seven further learned baselines on a held-out collection acquired with different acquisition and quality strata, the proposed pipeline is the most accurate, improving on the strongest classical baseline by 23 percentage points of anatomical landmark-local mutual information. It registers a volume one to two orders of magnitude faster than the classical deformable pipelines, and it retains more of its accuracy than any other method as acquisition quality degrades. The network, its trained weights and the full pipeline are released as the open-source deep larval brain registration framework: https://github.com/agentdr1/deep-larval-brain-reg.

Keywords: Drosophila melanogaster, Deformable Image Registration, Deep Learning, Larval Brain Registration, Fluorescence Microscopy

1 Introduction

The fruit fly Drosophila melanogaster is a central model organism in neuroscience, supported by an extensive genetic toolkit for labeling, manipulating and tracing defined neural populations. At the larval stage, its brain contains only around 10,000 neurons (Nassif et al. 2002), yet retains many structural features of the adult nervous system, making it a tractable system for studying neural organization at cellular resolution. Despite this anatomical simplicity, larvae exhibit a rich behavioral repertoire, enabling the study of sensory-driven behaviors, including responses to odors (Gerber and Stocker 2006) and light (Keene and Sprecher 2012). Genetic tools are central to mapping the larval brain. The GAL4/UAS system, for example, enables expression of markers such as green fluorescent protein within a defined subpopulation of neurons (Brand and Perrimon 1993; Venken et al. 2011). Comparing these expression patterns across individuals requires a common reference space in which brains from different animals can be aligned. Muenzing et al. (2017) introduced a standard larval brain template derived from microscopy images that combine neuropil (NP, anti-N-cadherin antibody) and nerve tract (NT, anti-neuroglian antibody) staining. In this framework, anatomical NP channels from individual brains are registered to the template, and the resulting transformations are then applied to the corresponding NT and gene expression channels to bring them into the shared anatomical space.

The accuracy of this mapping depends critically on image registration. Muenzing et al. (2017) showed that an elastix-based sequential cascade (affine followed by B-spline) can produce high-quality larval brain alignments. However, four practical limitations restrict the applicability of classical registration as a routine preprocessing tool for large-scale studies. First, classical registration methods are slow: a single volume requires up to minutes of CPU optimization, and the most accurate deformable variants sit at the slow end of that range. This makes interactive use impractical and increases the cost of large-cohort studies. Second, new cases often require per-sample tuning of parameters such as step size, smoothing strength and related optimization settings. These settings must be returned when acquisition conditions change, and the resulting configurations do not transfer cleanly across laboratories or microscope setups. Third, classical registration is optimized independently for each image pair and cannot learn from previous cases, which limits its ability to improve with additional data. Fourth, readily available registration methods for this domain are predominantly classical. No trained model for larval brain registration is available, so each new study assembles its own pipeline and repeats a per-volume optimization from scratch.

Learned registration instead trains a neural network to predict the deformation field from a moving volume and a fixed template in a single forward pass. Once trained, inference is amortized into a single forward pass that takes well under a second per volume on a GPU, two orders of magnitude below the cost of the accurate classical methods. Moreover, the network requires a limited set of training-time hyperparameters, rather than a per-volume optimization schedule during inference. VoxelMorph (Balakrishnan et al. 2018) has become a reference framework for learned biomedical image registration, and subsequent backbones have extended this paradigm in several directions, including transformer- and attention-based architectures (Chen et al. 2022, 2021; Sadegheih et al. 2025), coarse-to-fine and recursive pyramids (Mok and Chung 2020; Wang et al. 2024), frequency-domain formulations (Jia et al. 2023) and state-space models (Guo et al. 2024). We adopt several of these as learned baselines and describe each in Section 3.

A further difficulty is the spatial resolution at which such a model has to operate. Many published studies of learned 3D deformable registration operate on volumes with roughly 160–224 voxels per dimension (Balakrishnan et al. 2018; Chen et al. 2022; Mok and Chung 2020), including the widely used 160×192×224160 \times 192 \times 224 brain volumes, whereas larval brain acquisitions retain anatomical detail on a much finer in-plane grid. A 64×768×51264 \times 768 \times 512 volume holds about four times more voxels than a 160×192×224160 \times 192 \times 224 one, and a 3D convolutional network has to hold the activations of the entire volume in memory while it is trained. For the Drosophila melanogaster larval brain it therefore remains unclear whether a learned model, under the architectural and memory constraints imposed by deep neural networks, can improve on classical pipelines at this resolution.

In this study, we present Deep Larval Brain Registration (DLBR), a trained deep learning based registration pipeline for larval Drosophila brain volumes that is designed to remain robust to biological and experimental variation, including brain deformation, inhomogeneous staining and inconsistencies in sample preparation across data acquired over extended periods. We establish the necessary preprocessing steps, set up a comprehensive evaluation protocol that anchors intensity agreement to the annotated anatomical landmarks, and train a single network on the Janelia collection spanning different image-quality levels. We then evaluate DLBR against eleven classical and seven further learned registration methods on the independently curated Larvalign test set (Muenzing et al. 2017), which no method sees during training or model selection. DLBR is realized as the open-source deep-larval-brain-reg package, a computational framework that combines image preprocessing, network inference and evaluation into one ready-to-use pipeline for the registration of larval Drosophila brain microscopy images. Our contributions are summarized as follows.

(i) High accuracy at high resolution: DLBR aligns larval Drosophila brain volumes to a common template at a resolution well above the one that learned 3D deep learning based registration studies commonly operate on, and is the most accurate of all classical and learned methods we compare.

(ii) Fast inference: A single forward pass replaces the per-volume optimization of the classical pipelines, so the cost of optimization is paid once during training rather than again for every new brain. Registration drops from up to minutes to a fraction of a second per volume.

(iii) Generalization and quality robustness: Trained on the Janelia collection alone and evaluated on the external Larvalign one, DLBR retains more of its accuracy than any other method we evaluate as acquisition quality degrades.

(iv) Open-source deep-larval-brain-reg package: We release DLBR together with its trained weights in a PyTorch-based framework that supports preprocessing, inference and evaluation for larval Drosophila brain registration.

In the following, we introduce a comprehensive training and evaluation framework, and subsequently an extensive empirical evaluation across biological variation to demonstrate the practical applicability of the method for registration.

References (27)