GraphMorph: Tubular Structure Extraction by Morphing Predicted Graphs

Zhao Zhang, Ziwei Zhao, Dong Wang, Liwei Wang

Extracting tubular structures like blood vessels and roads is notoriously difficult for standard pixel-level AI models, which often output broken or hallucinated branches. GraphMorph solves this by explicitly predicting the underlying graph topology (junctions and connections) and then "morphing" this graph into a precise centerline mask using a custom pathfinding algorithm. This branch-level approach drastically reduces topological errors and achieves state-of-the-art results across both medical and satellite imagery.

The Challenge of Pixel-Level Classification

In computer vision, extracting tubular structures—such as blood vessels in medical scans, neurons in microscopy, or road networks in satellite images—is usually treated as a pixel-level classification task.

However, this approach ignores the inherent nature of these structures: they are continuous, interconnected networks. Standard loss functions (like Dice or Focal loss) prioritize overlapping pixels rather than ensuring a road or vessel is fully connected. As a result, traditional models frequently suffer from three major issues:

  1. Broken branches (False Negatives)
  2. Redundant, hallucinated branches (False Positives)
  3. Topological errors (Incorrect connections)
Baseline methods often suffer from broken branches (yellow box) and topological errors (red box).

The authors argue that to fix this, models need to understand branch-level features rather than just looking at individual pixels. If a model knows where a branch starts and ends, it can guarantee a connection between them, naturally eliminating breaks and floating artifacts.

The GraphMorph Approach

GraphMorph tackles the problem in two main steps: finding the endpoints of a branch, and then finding the optimal path between them.

  1. Segmentation Network & Graph Decoder: A standard segmentation network (like U-Net) extracts multi-scale features from an image patch. A Graph Decoder (based on a modified Deformable DETR) uses these features to predict a graph. The nodes represent critical points (junctions and endpoints), and a lightweight, dynamic link prediction module determines which nodes are connected (the edges).
GraphMorph explicitly predicts the underlying graph topology, identifying junctions and connections before drawing pixels.
  1. Morph Module (Training-Free): Taking the predicted graph and a centerline probability map from the segmentation network, the Morph Module uses a novel SkeletonDijkstra algorithm. It finds the optimal, single-pixel-wide path between connected nodes. Because the path is constrained by the predicted graph, it guarantees topological correctness.
  2. Post-Processing for Segmentation: For full segmentation tasks (predicting the thickness of the tubes, not just the centerlines), the highly accurate centerline mask is used to filter out isolated false-positive regions from the standard segmentation output.

Key Insights and Innovations

  • Endpoints First, Paths Second: By explicitly predicting where a branch starts and ends before drawing the pixels, the model inherently avoids "floating" false positives and ensures connectivity. This mimics human perception of networks.
  • Dynamic Link Prediction is Highly Efficient: Previous graph-generation methods used computationally heavy tokens to predict edges, resulting in $O(P^2 \times C^2)$ complexity. GraphMorph generates linear weights dynamically based on node features, dropping the complexity to $O(P \times C^2)$ and significantly speeding up inference.
  • SkeletonDijkstra Enforces Structure: Standard pathfinding algorithms don't account for the thickness of a path. SkeletonDijkstra forces the path to maintain a single-pixel width (a "skeleton" property) while avoiding paths that exceed a certain cost threshold, naturally suppressing false-positive edges that the Graph Decoder might have accidentally predicted.

Experimental Results

The method was evaluated on four primary 2D datasets (DRIVE, STARE, ISBI12, MassRoad) and one 3D dataset (PARSE), proving its robustness across vastly different domains.

  • Centerline Extraction: GraphMorph significantly outperformed previous state-of-the-art methods in topological accuracy. On the DRIVE dataset, the $\beta_0$ error (a metric measuring the number of incorrect connected components) plummeted from 3.259 to 0.555.
  • Segmentation: When applied as a post-processing filter to standard backbones (UNet, ResUNet, CS-Net), GraphMorph consistently improved performance. For UNet on DRIVE, $\beta_0$ error dropped from 1.191 to 0.692, while standard volumetric metrics (like Dice score) also saw slight improvements.

Limitations and Future Directions

While highly effective, GraphMorph has a few limitations. For the segmentation task, the method currently relies on post-processing rather than an end-to-end trainable pipeline that directly outputs the final thick segmentation mask from the graph. Additionally, because the Graph Decoder trains on small Regions of Interest (ROIs) and uses a sliding window during inference, it might miss the broader global context of massive tubular networks.

Finally, the Morph Module currently runs sequentially on the CPU, creating an inference bottleneck. Future work aims to refine the segmentation algorithms to utilize the predicted graphs directly, implement parallel processing for the Morph Module, and upgrade the architecture to process larger fields of view simultaneously.

Summary updated

BibTeX
@inproceedings{zhang2024graphmorph,
  author = {Zhao Zhang and Ziwei Zhao and Dong Wang and Liwei Wang},
  title = {{GraphMorph: Tubular Structure Extraction by Morphing Predicted Graphs}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2024},
  url = {https://openreview.net/forum?id=hW5QWiCctl},
}
Figure