This paper, originally presented at GCPR 2017 (with an updated arXiv version including a corrigendum), offers an elegant geometric solution to a classic problem in computer vision and optimization: finding not just the "best" answer, but a diverse set of "good" answers.
TL;DR
The authors propose a multi-layer graph construction that allows Dynamic Programming (DP) to find the $M$-best and diverse $M$-best solutions for tree-structured graphical models. By "stacking" replicas of the original graph and using "jump edges" to enforce differences, they create a flexible framework that provides exact solutions for $M=2$ and efficient heuristics for larger, diverse sets.
What Problem Does This Paper Address?
In many computer vision tasks—like finding the shortest path for a seam in a panorama or the most likely pose of a human skeleton—we use Dynamic Programming to find the single "best" (lowest energy) solution. However, the "best" solution according to our mathematical model isn't always the "best" in reality due to noise or model simplifications.
We often want the top $M$ solutions to use as candidates for more complex downstream processing. The problem is that the standard $M$-best solutions are often nearly identical (e.g., differing by just one pixel), which is useless for providing meaningful alternatives. We need diverse $M$-best solutions—results that have low energy but are significantly different from one another (usually measured by Hamming distance).
Methods
The core innovation is the Multi-layer Graph Construction.
- The $M=2$ Case: To find the second-best solution, the authors duplicate the original tree-shaped graph into two layers.
- Layer 1 represents the search for the first best solution.
- Layer 2 is a replica.
- Jump Edges: They connect Layer 1 to Layer 2. A "jump" is only allowed at a node if the state chosen is different from the state used in the first best solution.
- By running DP on this combined graph and forcing the final path to end in Layer 2, the algorithm is guaranteed to find the optimal second-best solution that differs by at least one node.
- Diverse $M$-Best: To enforce a larger difference (a Hamming distance $k > 1$), they propose two approaches:
- Multi-layer extension: Stacking $k+1$ layers, where each layer represents one "unit" of difference.
- Diversity Accumulation (Heuristic): A more efficient two-layer approach where the DP pass keeps track of how much diversity (difference) has been accumulated. A jump to the "solution layer" is only permitted once the accumulated diversity exceeds a threshold $T$.
Datasets
The authors evaluated their approach on several synthetic and real-world scenarios:
- Synthetic Trees: 50 random trees with 100 nodes and 3 states per node to test optimality and runtime.
- Biological Imaging: Centerline extraction of C. elegans nematodes in noisy brightfield microscope images.
- Mitocheck Project: Selecting segmentation hypotheses for cell clumps using a tree-structured model.
- Panorama Stitching: Finding alternative seams for stitching lunar surface images from the Apollo 11 mission.
- Stereo Matching: Depth estimation using the Middlebury benchmark (specifically the motorbike image pair).
Key Insights and Ideas
- Structural Constraints vs. Penalties: Most existing methods (like
divmbest) use Lagrangian relaxation, which "encourages" diversity by penalizing similarity. This paper turns diversity into a structural constraint within the graph itself. - The "Jump" Intuition: The multi-layer setup provides an intuitive way to visualize the search for alternatives. Finding a diverse solution is equivalent to finding a path that "earns" its way into the final layer by being different enough from previous paths.
- Hard Lower Bounds: Unlike relaxation methods, the diversity accumulation heuristic guarantees that the found solution meets the required Hamming distance, even if it has to sacrifice more energy to get there.
Key Results
- Optimality: For $M=2$, the method is provably optimal for tree-shaped graphs.
- Diversity Performance: In comparisons against the popular
divmbestalgorithm, the authors' "Diversity Accumulation" heuristic consistently produced solutions that met or exceeded the requested Hamming distance, whereasdivmbestoften fell short of the diversity target. - Efficiency: The diversity accumulation heuristic maintains a complexity of $O(|V|L^2)$ per solution (where $V$ is nodes and $L$ is states), making it highly scalable for large trees, such as those used in stereo matching.
- Qualitative Success: The method successfully identified valid alternative seams in panoramas and correct biological centerlines in cases where the "optimal" path was led astray by image noise.
Limitations and Future Work
- Optimality for $M > 2$: As noted in the authors' Corrigendum, the sequential multi-layer approach is not strictly optimal for $M > 2$ because the result can depend on the order in which previous solutions are processed. Finding the true $M^{th}$ best solution would require considering all permutations of previous layers, which is computationally prohibitive ($O((M-1)!)$).
- Tree Topology: The method is currently restricted to tree-shaped or chain-shaped graphical models. Extending this to loopy graphs remains a significant challenge.
- Combinatorial Explosion: The exact multi-layer model for large Hamming distances $k$ suffers from a combinatorial explosion of admissible edge combinations at branching points, necessitating the use of the diversity accumulation heuristic for practical applications.
Summary updated