Hidden Markov Modeling for Maximum Probability Neuron Reconstruction

Thomas L. Athey, Daniel J. Tward, Ulrich Mueller, Joshua T Vogelstein, Michael B. MillerResearch Square 2021 · DOI

Abstract

Recent advances in brain clearing and imaging have made it possible to image entire mammalian brains at sub-micron resolution. These images offer the potential to assemble brain-wide atlases of neuron morphology, but manual neuron reconstruction remains a bottleneck. Several automatic reconstruction algorithms exist, but most focus on single neuron images. In this paper, we present a probabilistic reconstruction method, ViterBrain, which combines a hidden Markov state process that encodes neuron geometry with a random field appearance model of neuron fluorescence. Our method utilizes dynamic programming to compute the global maximizers of what we call the "most probable" neuron path. Our most probable estimation method models the task of reconstructing neuronal processes in the presence of other neurons, and thus is applicable in images with several neurons. Our method operates on image segmentations in order to leverage cutting edge computer vision technology. We applied our algorithm to imperfect image segmentations where false negatives severed neuronal processes, and showed that it can follow axons in the presence of noise or nearby neurons. Additionally, it creates a framework where users can intervene to, for example, fit start and endpoints. The code used in this work is available in our open-source Python package brainlit.

Introduction: The Connectome Bottleneck

Mapping the "connectome"—the intricate web of neuronal connections in the brain—is one of the greatest challenges in modern neuroscience. While we can now image entire mammalian brains at sub-micron resolution, turning those massive datasets into usable 3D models (neuron reconstruction) remains a massive bottleneck.

The primary issue is that even the best AI segmentation models aren't perfect. They often produce "false negatives," where a thin axon appears severed or fades into the background noise. Most existing automated tools are designed for single-neuron images and "break" when they encounter these gaps or get confused by nearby neurons. Consequently, researchers still spend thousands of hours manually "tracing" neurons to ensure accuracy.

Methodology: The ViterBrain Framework

The authors introduce ViterBrain, a method that combines computer vision with classical probability. ViterBrain is designed to sit on top of existing deep learning segmenters, acting as a "stringer" that ties together locally connected components into a global, ordered structure.

The ViterBrain workflow: from input image to state generation.

The process involves several key steps:

  1. Fragment Generation: Instead of looking at raw pixels, ViterBrain starts with an initial (often imperfect) segmentation mask. It breaks this mask into "fragments" (supervoxels).
  2. Hidden Markov Modeling (HMM): The algorithm treats the neuron as a sequence of these fragments. The "hidden" state is the true path of the neuron, and the "observed" data is the image intensity.
  3. Geometry and Appearance: The model uses two main scores to evaluate a potential path:
  4. Transition Probability: Based on the Frenet representation (curvature and torsion). It penalizes sharp, un-biological turns and large physical gaps between fragments.
  5. Likelihood: An appearance model that uses KL-divergence to distinguish between foreground (neuron) and background intensities.
  6. Dynamic Programming: Inspired by the Viterbi algorithm, ViterBrain uses dynamic programming to find the globally "most probable" sequence of fragments from a starting point to an endpoint.

Unlike standard Maximum A Posteriori (MAP) estimation, which assumes anything not on the path is "background," ViterBrain’s "most probable" approach only considers data along the path. This allows it to ignore nearby "distractor" neurons that would otherwise confuse the model.

Evaluation and Results

The study primarily utilized data from the MouseLight project at Janelia Research Campus, consisting of high-resolution, two-photon microscopy images of the mouse brain.

Comparison of raw input (left), initial segmentation (center), and fragment generation (right).

Key findings include:

  • High Precision: In head-to-head comparisons with manual human traces, ViterBrain achieved a spatial distance error of only 1 to 2 microns, which is roughly the resolution limit of the images themselves.
  • Robustness to Signal Dropout: The algorithm successfully reconstructed axons even when segments up to 10µm in length were missing from the initial data. By modeling the physics of how neurons curve, the HMM can predict where an axon should be, even if the image signal temporarily disappears.
  • Competitive Performance: When tested against established tools like APP2 and Snake, ViterBrain showed comparable precision but proved more robust in "crowded" environments where other algorithms often over-segmented or stopped prematurely.

Discussion and Future Work

While powerful, ViterBrain currently has a few hurdles. The current version requires fixed start and end points (the "endpoint control problem"). Moving toward a fully automated system that identifies these points on its own is a key next step. Additionally, if a gap in the signal exceeds 10µm, the algorithm's accuracy drops significantly, as the geometric "prior" becomes less certain. The model also relies on hyperparameters that must be tuned based on image quality.

The team has released ViterBrain as part of the open-source Python package brainlit, inviting the community to help refine these probabilistic tools for the next generation of brain mapping.

Summary updated

Abstract

<title>Abstract</title> Recent advances in brain clearing and imaging have made it possible to image entire mammalian brains at sub-micron resolution. These images offer the potential to assemble brain-wide atlases of neuron morphology, but manual neuron reconstruction remains a bottleneck. Several automatic reconstruction algorithms exist, but most focus on single neuron images. In this paper, we present a probabilistic reconstruction method, ViterBrain, which combines a hidden Markov state process that encodes neuron geometry with a random field appearance model of neuron flourescence. Our method utilizes dynamic programming to compute the global maximizers of what we call the ``most probable'' neuron path. Our most probable estimation method models the task of reconstructing neuronal processes in the presence of other neurons, and thus is applicable in images with several neurons. Our method operates on image segmentations in order to leverage cutting edge computer vision technology. We applied our algorithm to imperfect image segmentations where false negatives severed neuronal processes, and showed that it can follow axons in the presence of noise or nearby neurons. Additionally, it creates a framework where users can intervene to, for example, fit start and endpoints. The code used in this work is available in our open-source Python package brainlit.
BibTeX
@inproceedings{athey2021hidden,
  author = {Thomas L. Athey and Daniel J. Tward and Ulrich Mueller and Joshua T Vogelstein and Michael B. Miller},
  title = {{Hidden Markov Modeling for Maximum Probability Neuron Reconstruction}},
  booktitle = {Research Square},
  year = {2021},
  doi = {10.21203/rs.3.rs-934665/v1},
}
Figure