Super-resolution is ambiguous. A blurry low-resolution patch is consistent with many sharp high-resolution patches, so a good model has to pick one answer and keep that choice consistent across neighbouring regions. Today's fastest generative super-resolution systems work on discrete image tokens, meaning entries in a learned visual vocabulary. They produce the image by iterative unmasking: predict all tokens, keep the confident ones, re-predict the rest, and repeat. We argue that most of those repeated network passes exist for one reason. If every token is predicted independently in a single pass, two neighbouring tokens can commit to different plausible answers and leave a seam. We propose to handle that coupling with a cheap probabilistic step instead. A single network pass supplies per-token candidate scores plus learned compatibility scores between adjacent tokens. We then draw an exact joint sample from this model restricted to a randomly chosen spanning tree of the token grid, which is a loop-free subset of the neighbour connections that still touches every token. On a tree, exact sampling is two sweeps of dynamic programming, takes no network evaluations, and cannot oscillate.
The idea draws on three areas. The first is message passing on graphs with loops ("loopy belief propagation"), which is known to oscillate or stall on image grids. The second is the one-to-many ambiguity of super-resolution, which forces the joint choice in the first place. The third is the latency cost of iterative refinement, which is what we aim to remove. If it works, the result is a super-resolution sampler with a fixed, small number of network passes. It gives coherent samples, uses exact rather than heuristic inference over a well-defined (if approximate) joint model, and produces per-token uncertainty for free.
Core Claim
The extra steps in discrete-diffusion super-resolution mainly buy joint coherence between neighbouring tokens under an ambiguous posterior. A learned tree-structured conditional random field over tokens can supply that coherence after one network pass. A conditional random field is a model that scores whole configurations through per-token terms and pairwise terms between neighbours. We fit ours by its exact likelihood on random spanning trees and sample from it by forward-filtering and backward-sampling along the tree. The concrete, falsifiable claim is that one network pass plus tree sampling, with at most one cheap repair sweep, matches the perceptual quality of ITER's 8-step token refinement on RealSR and DRealSR. It should also clearly beat ITER truncated to the same number of network passes, and the gap should widen as ambiguity grows from 4× to 8× upscaling.
What is new relative to existing work is specific. STAR uses uniform spanning trees only as an ordering for an autoregressive transformer, so it still needs one network pass per token. From Fields to Random Trees does exact belief propagation on sampled trees, but for hand-specified discrete MAP problems with no learned potentials and no image generation. Sun et al. apply multi-tree MAP inference to denoising, using hand-crafted priors and median-filter merging. None of these learns the tree potentials from data for an ambiguous inverse problem, and none uses tree sampling to remove refinement passes.
Research Program
Model. We start from ITER's decomposition: a pretrained VQGAN (a vector-quantized autoencoder that turns an image into a grid of codebook indices) and a convolutional/attention encoder that maps the low-resolution input $y$ to per-token logits. We keep the encoder's output as the per-token term $\phi_i(z_i)$, where $z_i$ is the codebook index at grid position $i$. We restrict each position to its top-$k$ candidates, with $k$ between 16 and 32, so tree inference costs $O(Nk^2)$ for $N$ tokens rather than $O(NK^2)$ over the full codebook of size $K$.
We add a pairwise head. It scores compatibility between candidate pairs at horizontally and vertically adjacent positions through a low-rank bilinear form on the candidates' codebook embeddings, modulated by local features from the same encoder pass. For a spanning tree $T$ of the token grid, the model is
$$p_T(z \mid y) \propto \prod_i \phi_i(z_i) \prod_{(i,j)\in T} \psi_{ij}(z_i, z_j)^{1/\rho_{ij}},$$
where $\psi_{ij}$ is the pairwise compatibility and $\rho_{ij}$ is the probability that edge $(i,j)$ appears in a uniform spanning tree. Following From Fields to Random Trees, the exponent $1/\rho_{ij}$ makes the expected tree energy equal the full-grid energy.
The $O(MN^3)$ effective-resistance cost that the file flags as that method's bottleneck mostly disappears on image grids. In the infinite square lattice, the effective resistance between adjacent nodes is 1/2, so $\rho_{ij}\approx 1/2$ in the interior. Only edges near the boundary deviate. We estimate those empirically from a few hundred Wilson's-algorithm samples on the fixed token grid, computed once.
Training. Because the partition function of a tree model is exact via sum-product, we can train by maximizing the expected exact log-likelihood of the ground-truth tokens $z^\star$ over random trees:
$$\mathcal{L} = -\,\mathbb{E}_{T \sim \mathrm{UST}}\big[\log p_T(z^\star \mid y)\big].$$
Every term is differentiable. Each minibatch draws a fresh tree from a precomputed bank, so the pairwise head cannot overfit to one tree. Training data follows ITER: DIV2K with second-order degradation simulation.
Inference. We run the network once and draw one tree. Messages pass from the leaves up to a root, and then a joint sample is drawn root-to-leaves. These sweeps are sequential in tree depth, which is a real cost, because uniform spanning trees on grids have long paths. Each step, however, is a batched $k\times k$ product with no network call. The output is a coherent token grid plus exact tree marginals, whose entropy gives a per-token ambiguity map.
Grid edges omitted from the tree can still leave seams. An optional repair sweep handles them: one checkerboard-parallel Gibbs update of tokens touching high-energy cut edges, again with no network call. A second, optional, entropy-guided network pass on the highest-entropy tokens tests the belief-guided refinement that IPR lists as future work, where it notes that random region selection drives its cost to about 13× a single pass.
Baselines
The naive reference point is independent one-pass decoding. It takes the per-token encoder output (argmax, or a sample per token) with no pairwise terms and no refinement, which amounts to ITER's Stage II alone. It shows how much coherence the transformer already provides on its own. If our method does not beat it clearly on seam and coherence measures, the pairwise model is unnecessary.
The strongest existing method is ITER. It refines discrete VQGAN tokens over 8 steps, uses a learned token-evaluation network to skip confident regions, and reports the best NIQE and PI on RealSR and DRealSR against Real-ESRGAN, SwinIR-GAN and LDM-BSR. The file states this ranking but gives no numeric NIQE/PI values: no reported result found on Lacuna for ITER's exact NIQE/PI on RealSR/DRealSR. We will therefore re-run ITER ourselves. We use the same VQGAN, the same Stage II encoder weights where possible, the same training data and degradation pipeline, and the same GPU for timing. We run it at 8 steps and at truncated budgets of 1, 2 and 4 steps, with its threshold tuned on a held-out split under the same tuning budget as our method. Beating it means matching its 8-step NIQE/PI within run-to-run noise at 1–2 network passes, and strictly beating truncated ITER at equal network passes.
For high-ambiguity face super-resolution we compare against SR3. SR3 is continuous diffusion conditioned on the bicubic upsample, using up to 100 steps, and reports a human fool rate close to 50% on 8× face super-resolution versus a maximum of 34% for FSRGAN and PULSE. We treat SR3 as a quality ceiling and a latency floor, not as something we expect to beat in realism.
Three ablations isolate the key ingredient. The first uses the same learned pairwise potentials but runs damped loopy belief propagation on the full grid instead of trees. It tests whether the tree restriction matters, given the oscillation documented by Nguyen et al. and Wan et al., and given the Sun et al. denoising result of 30.33 dB for multi-tree inference versus 24.26 dB for accelerated LBP. The second uses one fixed tree throughout training and inference. The third removes the $1/\rho_{ij}$ reweighting.
Why not just…?
Why not just run ITER with fewer steps? This is the main threat, and the experiment is built around it. If 2-step ITER already reaches 8-step quality, our pairwise model adds nothing. Our hypothesis predicts a specific pattern. Truncated ITER should degrade mostly in coherence, meaning seams, mixed textures inside one region, and inconsistency with the low-resolution input. It should degrade less in per-token sharpness. The degradation should also be larger at 8× than at 4×. If truncated ITER degrades uniformly or not at all, we will report that and narrow the claim.
Why not just sample autoregressively along the spanning tree, as STAR does? STAR gets exact conditioning from a full transformer, which is more expressive than our pairwise model, and reports FID 1.55 on ImageNet generation. The cost is one network pass per token. Tree dynamic programming gives exact joint sampling under a weaker model at essentially no network cost. The two are compared on the quality-versus-wall-clock curve. A STAR-style sampler is the right upper bound on what tree-ordered conditioning can achieve.
Why not just distill a few-step continuous diffusion model or use a one-pass GAN? Single-step distillation exists (DCFold in protein structure), but the file notes that heavy step compression tends to bring back blur or mode collapse. One-pass GANs show the artifact problem directly. NatSR's natural-manifold discriminator scores EnhanceNet at 0.367 and SRGAN at 0.832, against 1.000 for its constrained model. Neither approach gives calibrated per-region uncertainty, which tree marginals do. We include Real-ESRGAN-style output as a reference row, but do not claim superiority over a well-tuned distilled diffusion model we have not run.
Why not just add a mean-field CRF layer? Mean-field updates on a grid are iterative fixed-point updates on a loopy graph. They inherit the convergence and loose-relaxation problems analyzed by Sontag et al., and they produce a factorized approximation rather than a joint sample. The loopy-BP ablation stands in for this family.
Proposed Experiments
The first experiment is a controlled ambiguity test that decides whether the mechanism is real. We build synthetic textures in which two high-resolution patterns, for example a stripe pattern at two phases, downsample to an identical low-resolution patch. We then measure mode purity: the fraction of each ambiguous region decoded consistently from one mode. Independent decoding should mix modes across tokens. ITER should recover purity only as steps increase. Tree sampling should achieve high purity in one pass. Purity should fail mainly across cut edges, which is the case the repair sweep addresses.
The main evaluation trains on DIV2K and reports NIQE and PI on RealSR and DRealSR at 4×. For 8× faces on CelebA-HQ/FFHQ, it reports FID and low-resolution consistency. Low-resolution consistency is measured as PSNR between the degraded output and the input, so that perceptual gains cannot come from hallucinating away from the evidence, which is the concern raised by Blecher et al.. Every method is plotted on a curve of quality against measured wall-clock latency and number of network passes. We also report diversity across samples with the same input, and an edge-seam score computed along token boundaries.
Finally, we test whether tree-marginal entropy predicts actual reconstruction error, in the spirit of Tanno et al.'s uncertainty maps. We check whether spending one extra network pass on the top-entropy 10–20% of tokens closes the remaining gap to 8-step ITER more efficiently than ITER's own learned skipping or IPR-style random region selection.
The proposal fails if any of the following holds. Truncated ITER matches 8-step ITER. Tree sampling does not beat independent decoding on purity and seams. Loopy BP with the same potentials performs as well as tree sampling.
References
- Iterative Token Evaluation and Refinement for Real-World Super-resolution
- Spanning Tree Autoregressive Visual Generation
- From Fields to Random Trees
- Efficient Image Denoising by MRF Approximation with Uniform-Sampled Multi-spanning-tree
- Inference-Time Scaling in Diffusion Models through Iterative Partial Refinement
- Image Super-Resolution via Iterative Refinement
- Approximate Inference Using DC Programming For Collective Graphical Models.
- H3DFact: Heterogeneous 3D Integrated CIM for Factorization with Holographic Perceptual Representations
- DCFold: Efficient Protein Structure Generation with Single Forward Pass
- Natural and Realistic Single Image Super-Resolution With Explicit Natural Manifold Discrimination
- Tree Block Coordinate Descent for MAP in Graphical Models
- How to GAN Higher Jet Resolution
- Bayesian Image Quality Transfer with CNNs: Exploring Uncertainty in dMRI Super-Resolution