Dense labels such as pixel masks are expensive, so real datasets mix a few masks with many cheaper annotations: boxes, scribbles, clicks, or image-level tags. Current methods for this mixed setting either write a separate loss for each annotation type on top of one feed-forward network, or call a large external model such as Segment Anything (SAM) to turn cheap annotations into pseudo-masks. We propose a third option. We learn a single small refinement step that takes the image and a rough mask and returns a slightly better mask. That one step is applied repeatedly, with the same weights each time; this is recurrent weight sharing. The loop starts from whatever annotation an image has. A box becomes a filled rectangle, a scribble becomes a sparse seed map, and a tag becomes a class activation map, which is a coarse heat map of where a classifier looks. The loop stops when the mask stops changing. Coarser starting points should need more steps, and because the step is shared, the model can simply run longer on them.
The opportunity is that weight tying gives something feed-forward pipelines lack: a learned procedure that extrapolates. On mazes and prefix sums, a recurrent network trained on easy instances solves harder ones by iterating longer at test time (Can You Learn an Algorithm?). We ask whether the same holds for weak supervision. The question is whether a refinement step trained to recover masks from box-like and scribble-like corruptions can also recover masks from points and tags, which are harder starting points, just by running more iterations. If it can, the annotation type becomes a starting state rather than a separate branch, and the number of iterations becomes a per-image measure of how uncertain the label is.
Core Claim
A weight-tied refinement loop, trained on the few mask-labeled images by corrupting their masks into synthetic weak annotations, produces pseudo-masks for the real weakly-labeled images that are better than those from loss-per-annotation-type training. It also generalizes from easier starting points (boxes, scribbles) to harder ones (points, tags) when given more iterations, which an untied cascade of the same depth cannot do. Its own convergence behavior, meaning the size of the remaining change at halting, predicts pseudo-label quality well enough to replace hand-tuned loss weights when training the final segmenter.
The loop is
$$m_{t+1} = \Pi_{a}\big(m_t + g_\theta(\phi(x), m_t, t)\big),$$
where $x$ is the image and $\phi(x)$ its features from a shared encoder. The current soft mask is $m_t$, and $m_0$ is the mask rendered from the annotation $a$. The step $g_\theta$ is a small convolution-plus-attention block whose weights $\theta$ are the same at every iteration $t$, and $\Pi_a$ is a cheap projection that re-imposes what the annotation guarantees. For a scribble, it clamps the scribbled pixels. For a box, it zeroes mass outside the box and enforces that every row and column inside the box contains some foreground, the condition that MixPolyp's subspace projection loss encodes (MixPolyp). For a tag, it zeroes absent classes. Iteration stops when $\|m_{t+1}-m_t\|$ drops below a threshold. This is the fixed-point halting rule of Fixed-Point Reasoners, which that paper showed is more robust out of distribution than learned halting heads.
Relation to Prior Work
The mixed-supervision methods motivate the problem but leave its central difficulty to fixed components. Learning Semantic Segmentation with Diverse Supervision attaches tag, box and pixel branches to one network and resolves box ambiguity with a non-learned contour prior. MixPolyp uses a projection loss for boxes, entropy minimization for unscribbled regions, and a mixing regularizer. ORF-Net uses separate heads for boxes, dots and unlabeled scans, and its box-regression branch is trained only on boxes because a single forward pass cannot turn a dot into an extent. AGMM++ models class feature distributions with Gaussian mixtures and reports sensitivity to five loss weights. All four keep a feed-forward network and add one loss term per annotation type. We instead keep one step and change only its starting state and its projection.
The prompting line, WISH with SAM and MixSup with PointSAM, constrains our design. Both show that a strong pretrained mask generator is hard to beat. Both also document that the downstream model inherits that generator's failures, for example under poor camera–LiDAR calibration. Our loop is trained on in-domain masks and is small, so it is a learned, domain-specific replacement for the prompt-to-mask stage, not an addition to it.
The recurrent line supplies the method. Iterative Residual Refinement shows in optical flow that a weight-shared update rule can be both smaller and more accurate than stacked stages. Can You Learn an Algorithm? supplies the easy-to-hard extrapolation protocol. Fixed-Point Reasoners supplies pre-normalization with learnable residual scales and damping for stability. On Expressive Power of Looped Transformers supplies timestep modulation, which lets a tied block behave differently at early and late steps. That paper's "weight-tying bottleneck" is a real concern for us, since coarse-to-fine refinement plausibly needs different behavior early and late. We therefore include its modulation and ablate it. These looped models were validated on Sudoku, mazes, state tracking and ARC (LoopViT), not dense perception. Moving them to segmentation is part of what is being tested.
The papers the file lists as connecting the two directions do not do this. AceNAS uses "weight sharing" to mean one-shot architecture-search supernets. ULAREF and Iterative Label Refinement refine labels in outer training rounds on categorical noise, not inside a network's depth on spatial annotations.
Research Program
Training the refinement step. We train the step only on mask-labeled images. Each training example is a true mask $y$ and a synthetic annotation drawn from it: its bounding box, a scribble sampled along the mask skeleton, a few interior and exterior clicks, or its class tag. The loop is unrolled for a number of steps $T$ sampled per batch from a small range, with a mask loss on every iterate and a heavier weight on the last few. Following the progressive-training idea in Can You Learn an Algorithm?, we sometimes start the loss partway through the loop, so the step learns to improve from any state and not just to hit a target at a fixed $T$. Real weakly-labeled images also enter training, but only through the projection consistency of their final iterate. We add no new loss weights per annotation type.
Producing pseudo-masks. Each real weakly-labeled image is run until it halts. That yields a pseudo-mask, a step count $T^\star$, and a final residual $r^\star$.
Training the final segmenter. A standard segmenter (the same backbone MixPolyp uses) is then trained on true masks plus pseudo-masks. Each pseudo-mask is weighted by a fixed decreasing function of $r^\star$, which takes the place of per-type weights.
Synthetic-to-real gap. The main risk is that synthetic scribbles and clicks look different from real ones. To measure it, we hold out a slice of mask-labeled images, annotate it with real scribbles and clicks, and compare loop accuracy from real versus synthetic annotations of the same images.
Baselines
The do-nothing reference is the segmenter trained only on the mask subset. MixPolyp reports 80.6% Dice for this setting (MixPolyp). On PASCAL VOC with a 1:5:10 pixel:box:tag split, the corresponding pixel-only FCN reaches 51.08% mIU (Learning Semantic Segmentation with Diverse Supervision). Any gain we report must be measured against these.
The strongest existing method on our primary benchmark is MixPolyp itself. It reports a weighted-average Dice of 85.9% and IoU of 78.5% across Kvasir, CVC-ClinicDB, ColonDB, EndoScene and ETIS. Its box branch alone reaches 84.0% Dice. We will re-run it from released settings on the same splits: 1,451 masks, LDPolypVideo boxes, and SUN-SEG scribbles. It is the direct competitor because it uses exactly the same annotation mix and backbone and differs only in handling that mix through losses rather than a loop. Beating it means exceeding its re-run weighted-average Dice by more than the seed-to-seed spread across three seeds, with the same final segmenter, the same number of training images seen, and a matched tuning budget. The loop's own training compute counts against us.
The foundation-model alternative is a WISH-style pipeline (WISH): SAM prompted with each box, scribble points, or class-activation-map peaks produces pseudo-masks, which then train the same segmenter. There is no reported result found on Lacuna for SAM-prompted pseudo-labels on the polyp benchmarks, so we will measure it ourselves, both with frozen SAM and with SAM's decoder fine-tuned on the same 1,451 masks.
The key-ingredient ablation is an untied cascade. It has the same number of refinement steps and the same per-step architecture but separate weights per step, and therefore more parameters. It is trained identically. A second ablation removes timestep modulation, and a third removes the projection $\Pi_a$.
On PASCAL VOC the reference point is the diverse-supervision FCN at 57.51% mIU in the 1:5:10 setting. That backbone is old, so we will re-run that recipe on a modern backbone rather than compare against the old number.
Why not just…?
Why not just fine-tune SAM's mask decoder on the available masks and prompt it with each annotation? This is the most serious threat. SAM's prior is very strong, and on in-domain boxes it may simply win. The loop must justify itself in one of two ways. The first is accuracy on domains where SAM's prior is weak; low-contrast polyps and the CT setting of ORF-Net are the candidates, and MixSup documents such failures for PointSAM. The second is the step-count and residual signals, which SAM lacks. If fine-tuned SAM matches us on both accuracy and pseudo-label ranking, we will report that the loop is unnecessary for those annotation types.
Why not just use an untied refinement cascade, or deep supervision on a standard decoder's stages? An untied cascade of the same depth may match the loop on boxes and scribbles at the trained depth, and that would be a legitimate negative result. The claim the untied cascade cannot share is extrapolation. Trained only on box and scribble corruptions, it has no seventh stage to run on harder point or tag inputs. The decisive check below tests exactly this. The flow results of IRR suggest weight sharing may also help at matched depth, but we do not assume it.
Why not just add MixPolyp-style losses to a larger feed-forward backbone? Scaling may close part of the gap. We will run MixPolyp on a backbone whose parameter count matches backbone plus loop. However, the losses still require per-type weighting, which AGMM++ reports is dataset-sensitive. They also give no per-image confidence. If the larger MixPolyp ties us in Dice, the remaining question is whether residual-based weighting transfers across datasets without retuning while fixed loss weights do not, which we test on the VOC split.
Proposed Experiments and Decisive Checks
The first decisive check is easy-to-hard extrapolation. We train the step only on box and scribble corruptions and evaluate pseudo-mask IoU against true masks on held-out images, starting from points and from tag activation maps. We run the loop for 1× to 4× the training depth, alongside the untied cascade. The hypothesis survives only if tied-loop IoU on point and tag starts keeps rising past the training depth and exceeds the untied cascade. If accuracy instead peaks and then degrades, the model is "overthinking", the failure noted in Can You Learn an Algorithm?, and fixed-point halting must catch the peak.
The second check is whether convergence tracks label quality. On held-out mask-labeled images with synthetic and real weak annotations, we measure the rank correlation between pseudo-mask error and both $r^\star$ and $T^\star$. We also test whether $T^\star$ orders annotation types as expected, with tags slowest and boxes fastest. If the correlation is weak, residual weighting is dropped and the claim narrows to pseudo-mask accuracy.
The third check is downstream segmentation. We compare the full pipeline against all baselines on the five polyp test sets in Dice and IoU. Secondary evaluation uses PASCAL VOC 2012 in the 1:5:10 pixel:box:tag mix (mIoU), and optionally the rib-fracture CT data with boxes and dots, where turning dots into extents is exactly what ORF-Net could not learn. For every system we report parameters, wall-clock training cost, and average refinement steps, so the latency cost of iterating is visible next to any accuracy gain.
References
- Can You Learn an Algorithm? Generalizing from Easy to Hard Problems with Recurrent Networks
- MixPolyp: Integrating Mask, Box and Scribble Supervision for Enhanced Polyp Segmentation
- Fixed-Point Reasoners: Stable and Adaptive Deep Looped Transformers
- Learning Semantic Segmentation with Diverse Supervision
- ORF-Net: Deep Omni-Supervised Rib Fracture Detection from Chest CT Scans
- Modeling the Label Distributions for Weakly-Supervised Semantic Segmentation
- WISH: Weakly Supervised Instance Segmentation using Heterogeneous Labels
- MixSup: Mixed-grained Supervision for Label-efficient LiDAR-based 3D Object Detection
- Iterative Residual Refinement for Joint Optical Flow and Occlusion Estimation
- On Expressive Power of Looped Transformers: Theoretical Analysis and Enhancement via Timestep Encoding
- LoopViT: Scaling Visual ARC with Looped Transformers
- AceNAS: Learning to Rank Ace Neural Architectures with Weak Supervision of Weight Sharing
- ULAREF: A Unified Label Refinement Framework for Learning with Inaccurate Supervision
- Iterative Label Refinement Matters More than Preference Optimization under Weak Supervision