Ambiguity-Resolving Coalitions of Image Patches on the Pixel Grid

A patch of an image often cannot be named on its own. Seen through a small window, a cow's leg looks like a horse's leg and a red disc could be a traffic light or a taillight. Segmentation models resolve this by mixing in wider context, either through larger pooling windows or through fixed human-written label trees. We propose a different mechanism. The model groups image patches into spatially connected "teams," pools evidence within each team, and chooses the grouping that maximizes total agreement of class evidence. This is a coalition formation problem, the multiagent-systems task of splitting a set of agents into disjoint groups to maximize total payoff. The usual obstacle is that the number of possible groupings grows faster than exponentially. The opportunity comes from the image grid itself. A patch only touches four neighbors, and coalition formation on sparse graphs is exactly the regime where bounded search has been shown to scale to tens of thousands of agents.

In two sentences, the idea is this. Treat each patch of a vision transformer (a network that splits an image into patches and lets them exchange information) as an agent on the grid graph, and choose a partition into connected groups that maximizes a payoff rewarding agreement of class evidence. The payoff is built so that existing bounded-search coalition algorithms apply, which gives a certificate of how far the chosen grouping is from the best one. An ambiguous patch is then classified by the evidence of the connected object it joins, not by its own appearance or by a fixed pooling window.

Core Claim

The claim is that a contiguity-constrained, welfare-maximizing partition of patches resolves part-level and local ambiguity better than fixed multi-scale pooling or greedy token merging at the same compute. It can also do so while emitting dense, full-resolution predictions, because each patch keeps its coordinate and only borrows its group's pooled evidence.

The payoff is chosen to fit a known tractable class. Let $p_i$ be the class-probability vector a linear probe assigns to patch $i$, and let $\tau$ be an agreement threshold. A connected coalition $S$ is worth

$$v(S) = \sum_{i<j \in S} p_i^\top p_j \;-\; \tau \binom{|S|}{2}.$$

The first term is superadditive, because all dot products of probability vectors are nonnegative, so merging two groups only adds pairs. The second term is subadditive. This is exactly the "$m+a$" form (a superadditive synergy part plus a subadditive overhead part) for which Algorithms for Graph-Constrained Coalition Formation in the Real World derives tight upper bounds and prunes all but 0.0045% of the search space.

The payoff produces disambiguation directly. A leg patch with evidence split 0.5/0.5 between cow and horse gains about $0.5-\tau$ per pair from joining the body it is physically attached to. The body's many confident patches then decide the leg's label. A patch in an unrelated region gains nothing.

We are explicit that this objective is connectivity-constrained correlation clustering. The new parts are three. The first is the observation that this objective lies in a class with certified bounded search on sparse graphs. The second is using it as a drop-in disambiguation layer for dense prediction. The third is using the welfare gap certificate as a per-image signal of residual ambiguity.

Relation to Prior Work

Two papers motivate the gap. Hierarchical Prototype Learning for Semantic Segmentation fixes the horse-leg/cow-leg confusion by tying fine-class prototypes to coarse parents. It depends on hand-written taxonomies and reports that multi-level losses interfere unless trained on phased schedules. Our grouping is computed per image from evidence, needs no taxonomy, and adds no extra loss. Eliminating Feature Ambiguity for Few-Shot Segmentation shows that enlarging receptive fields leaks background into foreground features. Its remedy is foreground-minus-background subtraction, which needs annotated support masks. Our contiguity constraint plays the same protective role without masks, because a patch can only pool with regions it is connected to through high-agreement neighbors.

Two papers supply the method. CFSS (Algorithms for Graph-Constrained Coalition Formation in the Real World) gives edge-contraction search trees and the $m+a$ bounds. Anytime Optimal Coalition Structure Generation gives the anytime branch-and-bound view. CFSS also constrains the design. In the energy domain it reached solutions within 88% of optimum in under 100 seconds on 2,732 agents, which is far too slow to run per image on 8,192 raw patches. We therefore run search only on a coarsened graph, described below. Coalition Structure Generation with Worst Case Guarantees explains why unconstrained search is hopeless: any guarantee requires inspecting $2^{n-1}-1$ partitions. The graph constraint is what removes that barrier.

The closest bridges between game theory and vision differ in what the players are. Hierarchical Banzhaf Interaction for General Video-Language Representation Learning treats frames and words as players, measures their interactions with the Banzhaf index, and avoids the subset explosion with density-peak clustering that ignores spatial layout. It does not address dense prediction. Cooperative or Competitive? treats attention heads as players, a small set that never meets the partition explosion. Token Merging: Your ViT But Faster greedily merges similar tokens by bipartite matching with a fixed merge count. It has no payoff and no contiguity, and its authors leave dense prediction open. Our method differs from all three. The players are spatial patches. The grouping maximizes an explicit payoff under a grid-connectivity constraint. The number of groups is decided per image. Coordinates are never collapsed.

Research Program

The layer sits between a pretrained vision transformer encoder and its segmentation decoder. It has two stages, because raw-patch search is too expensive.

In the first stage, greedy edge contraction on the patch grid merges adjacent patches whenever the payoff $v$ increases. This stage stops at a few hundred super-patches. It is cheap and resembles graph-based superpixel methods, but it uses the same payoff.

In the second stage, CFSS-style bounded edge-contraction search runs on the super-patch adjacency graph. That graph is still sparse and planar. Each image gets an anytime budget. The search returns a partition together with an upper bound on the best achievable welfare, and the ratio of found to bound is the certificate.

Each patch's feature is then mixed with its coalition's mean feature through a learned gate, and the decoder predicts per patch at the original resolution.

The work proceeds in three phases. Phase one is training-free: frozen encoder, frozen decoder, and a probe fitted on training features. Phase two fine-tunes the decoder and gate with a single standard segmentation loss, recomputing partitions per batch with stopped gradients. Phase three is analysis. It asks whether the welfare gap is concentrated on ambiguous images, and whether the extra stage-two search budget pays off exactly where the gap is large. The threshold $\tau$ is the only new hyperparameter. It is tuned on validation data with the same budget given to baseline hyperparameters.

Baselines

The naive reference point is the same encoder and decoder with no grouping layer, trained identically. As an absolute anchor, The Cityscapes Dataset for Semantic Urban Scene Understanding reports 67.1% mIoU for Dilated10. Scene Parsing through ADE20K Dataset reports mean IoU of 0.3231 for a DilatedNet model and 0.3490 with its cascade part/object/stuff module. That cascade is a fixed hand-designed hierarchy, so we also report against it.

The strongest existing competitor on part-level ambiguity is HiPoSeg (Hierarchical Prototype Learning for Semantic Segmentation). It targets the same confusion, and it reports +10.49%p mIoU over DeepLabV3+ on Cityscapes and an average +3.07%p across ADE20K, Cityscapes, Mapillary Vistas 2.0 and PASCAL-Part-108. The file gives no absolute HiPoSeg mIoU, and no per-dataset number for Mapillary or PASCAL-Part. We will therefore retrain HiPoSeg on our encoder, with its published taxonomies, the same schedule length and the same tuning budget. Beating it means matching or exceeding its mIoU without using its label tree. On PASCAL-Part-108, where taxonomy-free grouping must earn its keep, it means a clear win on the confusable part pairs.

Token Merging is the strongest efficiency competitor. No reported result was found on Lacuna for ToMe on semantic segmentation. We will run it with coordinate restoration, so that each merged token's output is copied to its source patches, at matched token counts.

The key ablations isolate the two ingredients. The first keeps the payoff and replaces stage-two search with pure greedy contraction to the same number of groups. The second keeps the search but drops the contiguity constraint, allowing groups over the complete graph via greedy merging. The first tests whether bounded search matters. The second tests whether spatial connectivity is what prevents leakage.

Why not just…?

Why not just use wider context such as spatial pyramid pooling? Pyramid Stereo Matching Network shows that pooling at fixed scales disambiguates textureless regions, reaching a 3-pixel error of 2.32% on KITTI 2015. However, fixed windows do not follow object extent. Eliminating Feature Ambiguity for Few-Shot Segmentation documents that larger windows leak background into foreground. We include a pyramid-pooling head on the same encoder. If it matches us on the confusable part pairs, the coalition machinery is unnecessary, and we will say so.

Why not just merge tokens greedily, as Token Merging does, or as superpixels do? This is the real threat. Greedy contraction with our payoff may recover nearly all of the welfare that bounded search finds. If it does, the contribution reduces to the payoff and the contiguity constraint, and the search becomes a diagnostic. The greedy ablation settles this directly. Our prediction is that greedy and search agree on easy images, but diverge on images where an ambiguous region bridges two objects. There, early greedy merges lock in the wrong attachment. We will report the welfare gap and the mIoU difference stratified by that gap. We will not claim search helps unless the high-gap stratum shows it.

Why not just learn the hierarchy with HiPoSeg-style prototypes? HiPoSeg needs a label tree and phased training to avoid gradient interference (Hierarchical Prototype Learning for Semantic Segmentation). Our layer adds no extra loss, and its grouping changes per image. The two are also complementary, so we will additionally test HiPoSeg plus our layer.

Proposed Experiments

The main evaluation uses Cityscapes, ADE20K/SceneParse150 and PASCAL-Part-108, all with mIoU. We add a targeted metric: the error rate restricted to the most-confused fine-class pairs of the baseline's confusion matrix, which on PASCAL-Part are pairs such as leg parts across animal classes. Cityscapes at full resolution with 16-pixel patches yields 8,192 patches, which tests scaling. We report wall-clock time for each stage, the number of coalitions per image, and the welfare certificate.

The decisive checks are five. The first is the greedy-versus-search ablation, stratified by certificate gap. The second is the contiguity on/off ablation, where we expect the unconstrained version to reintroduce the leakage AENet describes. The third tests whether the certificate gap predicts per-image error, since a useful ambiguity signal should correlate. The fourth asks whether, at matched token count, our layer beats Token Merging on dense mIoU. The fifth is the training-free phase-one result against the no-grouping baseline, which shows whether the effect exists before any fine-tuning.

The idea fails if pyramid pooling or plain greedy grouping matches it on the confusable pairs. Each of those outcomes is reported as a finding rather than explained away.