MHFNet: Multi-Hypothesis Fusion Network for Dichotomous Image Segmentation

Maxwell Meyer, Jack SpruytarXiv 2026

TL;DR

When segmenting intricate objects from backgrounds, multi-hypothesis models hedge their bets by generating several candidate masks—only to pick a single "winner" at the end and throw the rest away. MHFNet replaces this winner-take-all selection with a lightweight second-stage network that looks at the original image alongside all candidate masks simultaneously, synthesizing a superior, finely detailed segmentation while leaving already-certain pixels untouched.

What Problem Does This Paper Address?

Dichotomous Image Segmentation (DIS) is background removal on hard mode: think bicycle spokes, birdcages, and bonsai leaves, where missing a few pixels severs a crucial structure.

To handle ambiguity in boundaries, multi-hypothesis models (like S3OD) generate multiple plausible foreground masks along with a predicted global quality score for each. At inference time, standard practice is to simply pick the mask with the highest score. The catch? A single global number doesn't tell you where a mask succeeded or failed. Mask A might nail the intricate tree branches while hallucinating a background rock, whereas Mask B gets the trunk right. Throwing away the runners-up discards valuable local spatial clues.

Methods

The authors propose the Multi-Hypothesis Fusion Network (MHFNet), a two-stage pipeline that turns candidate selection into a learned reconstruction problem.

  1. Frozen Generator: First, they retrain an existing multi-mask generator (S3OD) with detail-aware supervision at $2048 \times 2048$ resolution and freeze its weights. Given an image, it outputs three soft probability masks.
  2. Early Fusion & Transformer Refinement: Instead of picking one mask, MHFNet resizes the three masks and the RGB image to $1024 \times 1024$ and concatenates them into a single 6-channel input. This feeds into a standard Swin-Tiny Transformer encoder, enhanced with a cross-scale attention module (to blend coarse semantics with finer spatial details) and a coarse-to-fine decoder.
  3. Hard Confidence Constraint: Rather than letting the refiner rewrite the whole image, the authors compute the pixel-wise mean ($\bar{h}$) across the three hypotheses to build a Matting-style "trimap." Pixels where the hypotheses strongly agree on background ($\bar{h} \le 0.01$) or foreground ($\bar{h} \ge 0.99$) are strictly locked. Both network predictions and training gradients are restricted exclusively to the uncertain, intermediate-confidence boundary regions.
Overview of the MHFNet architecture, showing early concatenation of the RGB image and three candidate masks feeding into a Swin encoder-decoder.

Datasets

The model is trained and evaluated on DIS5K, the standard high-resolution benchmark for fine-grained foreground segmentation. It comprises 5,470 image–mask pairs split into 3,000 training images (DIS-TR), 470 validation images (DIS-VD), and 2,000 test images divided into four subsets of increasing structural complexity (DIS-TE1 through DIS-TE4). No new datasets are introduced.

Key Insights and Ideas

  • Learned quality selectors can be surprisingly bad: In the retrained generator, one specific branch ($h_1$) naturally specialized into the strongest predictor. Remarkably, blind devotion to $h_1$ actually beat the generator's own learned quality-score selector! Furthermore, naively averaging the three masks hurt performance because it gave equal weight to the weakest branch. Joint spatial fusion sidesteps both traps.
  • 93.7% of the work is already done: Auditing the confidence constraint across the test set revealed that only 6.3% of pixels fall into the uncertain "editable" zone. Focusing all capacity and loss gradients on this tiny sliver makes refinement highly structured and efficient.
  • Multiple hypotheses shine when geometry gets gnarly: In an ablation comparing MHFNet against an identical refiner given only the best single mask ($h_1$), most of the baseline jump came from the learned refinement architecture itself. However, feeding all three hypotheses provided an extra boost that peaked on DIS-TE4—the subset with the thinnest, most complex structures, right where single masks tend to miss fine details.

Key Results

Across the 2,000-image DIS-TE benchmark, MHFNet improves all five standard metrics compared to predicted selection from the exact same generator:

  • Weighted $F$-measure ($F_\beta^\omega$): Jumps from $0.8915$ to $0.9054$ (recovering over half the gap to an unfair ground-truth "best-of-three" oracle).
  • Mean Absolute Error (MAE): Drops from $0.0277$ to $0.0255$ (a ~7.9% relative error reduction).
  • Efficiency: On an RTX 3090, adding MHFNet on top of the heavy $2048 \times 2048$ S3OD generator adds just 54.3 ms of latency (+15.8%, running at 2.51 FPS) and 0.195 GiB of peak VRAM (+4.75%).
Qualitative comparisons on DIS5K showing MHFNet preserving thin structures like birdcages and windmill blades while suppressing background clutter.

Limitations and Future Work

  • The cost of hard locks: While 99.1% of locked pixels are right, 0.84% of all image pixels are confidently wrong across the averaged hypotheses. Because the constraint is hard-coded, MHFNet is forbidden from fixing them—setting a hard MAE floor of $0.0084$ (roughly a third of MHFNet's remaining error). Exploring soft constraints, adaptive thresholds, or learned uncertainty could unlock these errors.
  • Unmatched external comparisons & single-seed runs: While MHFNet tops published literature baselines in aggregate tables, the authors candidly note the comparison isn't strictly apples-to-apples (their frozen generator sees $2048 \times 2048$ inputs vs. $1024 \times 1024$ for published baselines). Additionally, experiments rely on single-seed runs and a single generator family (S3OD), leaving broader multi-seed validation and tests on other hypothesis generators for future work.

Summary updated

BibTeX
@misc{meyer2026mhfnet,
  author = {Maxwell Meyer and Jack Spruyt},
  title = {{MHFNet: Multi-Hypothesis Fusion Network for Dichotomous Image Segmentation}},
  year = {2026},
  eprint = {2611.38399},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2611.38399},
}
Figure