Manuscript Offprint

arXiv:2609.04454

Topology-Aware Training and Spatial Diagnostics for Fiber Bundle Segmentation in Tracer Histology

Joselyn Romero Avila, Kyriaki-Margarita Bintsi, Ermias Habte, Julia F. Lehman, Suzanne N. Haber, Anastasia Yendiki

Joselyn Romero Avila¹, Kyriaki-Margarita Bintsi², Ermias Habte², Julia F. Lehman³, Suzanne N. Haber³,⁴, and Anastasia Yendiki²

¹ Universidad Nacional Mayor de San Marcos, Lima, Peru joselyn.romero1@unmsm.edu.pe

² Athinoula A. Martinos Center for Biomedical Imaging, Massachusetts General Hospital and Harvard Medical School, Charlestown, MA, United States

³ Department of Pharmacology and Physiology, University of Rochester School of Medicine, Rochester, NY, United States

⁴ McLean Hospital, Belmont, MA, United States

Abstract. Anatomic tracer studies reveal how axon bundles project from an injection site, branch into smaller groups of axons, and course through the brain to reach their destinations. Histological data from such studies provide anatomical reference information for validating diffusion MRI tractography. However, manual annotation of the histological data is very labor-intensive, and although automated segmentation methods have been proposed, they rely mainly on pixel-overlap losses such as BCE and Dice; topology-aware loss functions have not been studied for this task. We compare BCE-Dice, clDice, Betti matching, and Topograph for fiber bundle segmentation in macaque tracer histology using a frozen DINOv3 backbone. To our knowledge, this is the first exploration of foundation-model features for this task. BCE-Dice achieved the highest Dice, while clDice achieved the highest bundle recall but poor mask overlap. Topograph had similar Dice to BCE-Dice, the lowest B0B_0 error, and fewer false positives than BCE-Dice and Betti matching. Fiber bundle segmentation methods are typically evaluated with a permissive rule that counts a bundle as detected given any overlap with the prediction. We show this rule does not capture oversegmentation, and that per-section TPR can be inflated by empty sections assigned perfect recall. To quantify this, we introduce Excess32_{32}, a spatial diagnostic measuring predicted pixels outside a 32-pixel tolerance band around annotated bundles. In validation, a Betti-Topograph union raises sparse-bundle TPR from 0.818 to 0.933, but worsens FDR from 0.296 to 0.509, Excess32_{32} from 0.108 to 0.466, and area ratio from 0.94 to 3.34. These results show detection metrics alone are insufficient to characterize segmentation quality.

Keywords: Anatomic tracing · fiber bundle segmentation · topology-aware learning · segmentation metrics

J. Romero Avila et al.

1 Introduction

Diffusion MRI (dMRI) tractography allows white-matter pathways to be reconstructed non-invasively and in vivo. However, it relies on indirect measurements of axonal orientations based on water diffusion, at a spatial scale much coarser than that of individual axons. This creates a need for validation against ground-truth connectional anatomy. Tracer injection studies in non-human primates provide anatomical reference data for validating dMRI tractography, as they allow fiber bundles projecting from an injection site to be visualized at microscopic resolution [23,6,8,22,16]. This validation, in turn, requires the segmentation of fiber bundles in large histological sections. The process is labor-intensive and requires neuroanatomic expertise to distinguish fibers from other signals in the images, such as terminal fields, artifacts, and background staining [21,2]. Recent work has sought to automate this task using semi-supervised learning, self-supervised pretraining, synthetic data, and anatomical post-processing across sections [20,21,2,3]. Despite these advances, fiber bundle segmentation remains challenging because manually annotated data are limited and substantial variability exists across brains, tracers, injection areas, and fiber bundles of different densities.

Foundation models are of particular interest in settings where annotated data are limited, as self-supervised pretraining can provide transferable visual representations. Models in the DINO family have shown strong transfer to dense prediction tasks [4,13,18]. More recently, DINOv3 extended this family through training on extensive collections of web images [18]. Its use for fiber bundle segmentation in tracer histology has not yet been explored. A further consideration is the training loss. Prior work on tracer histology segmentation has focused mainly on pixel overlap terms such as binary cross-entropy (BCE) and Dice loss. These losses do not directly account for the structure of fiber bundles, which often appear as elongated and connected regions. Topology-aware losses offer an alternative way to incorporate structural information during training. For example, cDice measures skeleton overlap [17], Betti matching penalizes errors in connected components and holes [19], and Topograph compares graph-based representations [11]. These approaches have been used to preserve structural or topological properties in curvilinear segmentation tasks, including retinal vessels, road networks, and neuronal processes [17,19,11]. The effect of these loss functions on fiber bundle segmentation in tracer histology remains unclear.

Furthermore, standard metrics used to evaluate segmentation models rely on a permissive many-to-many rule, where a fiber bundle included in the ground-truth labels is considered detected if it has any overlap with one of the predicted bundles [21,2]. This rule is useful for sparse and fragmented annotations, but it does not penalize predicted bundles that extend far outside the ground-truth annotations. A large, contiguous area in the prediction can increase the true-positive rate (TPR) without being counted as a false-positive component, even though it may include large swaths of tissue that do not overlap with the ground-truth annotation. This is consistent with recent work showing that ag-

Figure

Fig. 1. Proposed pipeline. RGB patches are extracted from macaque tracer histology sections and processed by a frozen DINOv3 encoder and a trainable U-Net decoder. During training, patches are sampled from both annotated foreground and background or mixed regions, and we compare BCE-Dice, clDice, Betti matching, and Topograph losses. At inference, the probability maps from overlapping crops are averaged to reconstruct a section-level probability map. This map is thresholded, and connected components smaller than Amin⁡A_{\min} are removed to obtain the final binary mask.

gregate scores can hide domain-relevant errors and that metrics should match the structure, task, and scientific question being evaluated [12,14,1].

In this work, we study loss functions and evaluation metrics for fiber-bundle segmentation in tracer histology. We use a frozen DINOv3 backbone [18], and compare multiple loss functions (BCE-Dice, clDice, Betti matching, Topograph) under the same architecture. We then evaluate how well pixel-overlap vs. component-level error metrics capture the quality of the resulting predictions. This paper makes the following contributions. (1) We provide the first systematic comparison of topology-aware losses for fiber bundle segmentation in macaque tracer histology using frozen foundation-model features. (2) We audit standard evaluation metrics and identify two failure modes: oversegmentation hidden by component-level matching, and per-section TPR inflation caused by sections with no annotated bundles. (3) We introduce Excess32_{32}, a spatial diagnostic that measures predicted pixels outside a 32-pixel tolerance band around annotated bundles and reveals oversegmentation missed by legacy metrics. The code is publicly available at https://github.com/jromero158486/topology-aware-fiber-bundle-segmentation.

References (23)

  • What's outside the intersection? fine-grained error analysis for semantic segmentation beyond IoU
  • Fully automated segmentation of fiber bundles in anatomic tracing data
  • Tractography-driven synthetic data generation for fiber bundle segmentation in tracer histology (opens arXiv in a new tab)
  • Emerging properties in self-supervised vision transformers
  • ImageNet: A large-scale hierarchical image database
  • Diffusion MRI and anatomic tracing in the same brain reveal common failure modes of tractography
  • The organization of prefrontal-subthalamic inputs in primates provides an anatomical substrate for both functional specificity and integration: Implications for basal ganglia models and deep brain stimulation
  • Human and monkey ventral prefrontal fibers use the same organizational principles to reach their targets: Tracing versus tractography
  • Rules ventral prefrontal cortical axons use to reach their targets: Implications for diffusion tensor imaging tractography and deep brain stimulation for psychiatric illness
  • Decoupled weight decay regularization
  • Topograph: An efficient graph-based framework for strictly topology preserving image segmentation
  • Metrics reloaded: Recommendations for image analysis validation
  • DINOv2: Learning Robust Visual Features without Supervision
  • Understanding metric-related pitfalls in image analysis validation
  • U-Net: Convolutional networks for biomedical image segmentation
  • Limits to anatomical accuracy of diffusion tractography using modern approaches
  • clDice: A novel topology-preserving loss function for tubular structure segmentation
  • DINOv3
  • Efficient Betti matching enables topology-aware 3D segmentation via persistent homology
  • Constrained self-supervised method with temporal ensembling for fiber bundle detection on anatomic tracing data
  • Self-supervised segmentation and characterization of fiber bundles in anatomic tracing data
  • Anatomical accuracy of brain connections derived from diffusion MRI tractography is inherently limited
  • Post mortem mapping of connectional anatomy for the validation of diffusion MRI. NeuroImage 256, 119146