Riemannian Patch Assignment Gradient Flows

Daniel Gonzalez-Alvarado, Fabio Schlindwein, Jonas Cassel, Laura Steingruber, Stefania Petra, Christoph Schnörr · DOI

Introduction

In the fields of computer vision and data science, the task of "labeling"—assigning discrete categories to nodes within a graph, such as pixels in an image—remains a fundamental challenge. Traditional approaches often rely on local pixel-wise classification or simple spatial smoothing techniques. However, these methods frequently struggle to capture complex structural dependencies and topological rules, such as the continuity of lines or the necessary separation between distinct biological tissues.

This paper introduces Patch Assignment Flows (P-AFs), a novel framework that addresses these limitations by shifting the focus from individual pixel assignments to the matching of local regions against a dictionary of "template patches." By formulating the labeling process as a Riemannian gradient flow on a statistical manifold, the authors provide a mathematically rigorous way to enforce spatial consistency and quantify uncertainty.

Methodology: Information Geometry and Patch Interaction

The P-AF framework is built upon the principles of information geometry. The core components of the system include:

1. The Patch Dictionary and Dictionary Graph

Rather than assigning labels in isolation, the model utilizes a dictionary of $p \times p$ labeled templates. These templates represent "legal" or "allowed" local configurations of the data. To manage the relationships between these templates, the authors define a Dictionary Graph. In this graph, nodes represent individual patches, and edges represent the compatibility (or "overlap") between patches when placed adjacently on the image grid.

2. Riemannian Gradient Flow

The labeling process is treated as an optimization problem: finding a global configuration that maximizes the consistency of overlapping patches. This is solved using a gradient flow on a manifold equipped with the Fisher-Rao metric. This geometric approach ensures that the evolution of the labeling is intrinsic to the space of probability distributions.

3. Replicator Equations

The flow is implemented via a coupled system of replicator equations, a concept borrowed from evolutionary game theory. This implementation is particularly elegant because it naturally constrains the variables to remain valid probability distributions (summing to one) throughout the evolution, eliminating the need for external projection or clipping steps.

4. Uncertainty Quantification

A significant advantage of the P-AF approach is its inherent ability to handle ambiguity. Since the system evolves probabilities, the authors can calculate a "mean patch assignment." In regions where multiple patches from the dictionary fit the data equally well, the model maintains a high-uncertainty signal, providing a more nuanced output than "black box" classifiers that might force a potentially incorrect binary choice.

Experimental Evaluation

The authors validated the P-AF framework on both synthetic and real-world datasets:

  • Synthetic Binary Patterns: Using computer-generated grids of lines and crossings, the authors demonstrated the model's capacity for "pattern completion." The P-AF successfully suppressed noise and filled in gaps in broken line segments by identifying the most consistent path through the patch dictionary.
  • Skeletal Muscle Microscopy: The model was applied to light microscopy images of anti-myosin immunostained skeletal muscle from COVID-19 patients. In this noisy biological context, the P-AF effectively segmented complex structures, suppressing nuisance background artifacts and producing biologically plausible boundaries between muscle fibers.

Key Insights

The P-AF framework offers several conceptual advantages over traditional regularization methods:

  • Consistency-Based Regularization: Instead of using generic penalties for noise, P-AF regularizes data by enforcing structural consistency. A pixel's label is determined by how well it contributes to a coherent local patch structure.
  • Topological Priors: By carefully designing the dictionary, specific topological rules can be enforced. For instance, a dictionary can be constructed such that foreground classes must be separated by background labels, preventing the "bleeding" of adjacent structures.
  • Symmetry and Ambiguity: The authors show that symmetric dictionaries (e.g., containing both horizontal and vertical patterns) allow the flow to naturally identify and flag ambiguous regions, enhancing the interpretability of the results.
  • Parameter Efficiency: The system's behavior is primarily driven by the dictionary itself, with the "regularization strength" being the only major user-defined parameter.

Limitations and Future Directions

While the P-AF framework represents a significant step forward, several areas for improvement remain. Currently, dictionaries are often hand-crafted or based on simple heuristics; future work aims to learn these dictionaries directly from data. Additionally, the computational cost of patch-based methods is higher than pixel-wise approaches due to the complexity of patch comparisons. Finally, the authors suggest exploring "locally equivariant networks" to reduce dictionary size by recognizing that rotated or flipped versions of a patch represent the same underlying structural rule.

Summary updated

BibTeX
@inproceedings{gonzalezalvarado2025riemannian,
  author = {Daniel Gonzalez-Alvarado and Fabio Schlindwein and Jonas Cassel and Laura Steingruber and Stefania Petra and Christoph Schnörr},
  title = {{Riemannian Patch Assignment Gradient Flows}},
  booktitle = {SSVM},
  year = {2025},
  doi = {10.1007/978-3-031-92369-2\_21},
}
Figure