When a camera pixel saturates, its value sticks at the maximum and every spatial gradient inside the blown-out patch becomes exactly zero. Networks that restore such images, from low dynamic range (LDR) photos to high dynamic range (HDR) radiance, are mostly convolutional. Convolutions build features from local intensity differences, so inside a large clipped region they have nothing to work with. The only evidence about what the region contains lies elsewhere: at its rim, in color channels that did not clip, and in distant unsaturated parts of the scene such as the sky gradient around the sun, a reflection on water, or the lit side of a building. A convolutional network's effective reach is far smaller than its nominal one and falls off like a Gaussian from the center. For a large hole, that reach often never gets outside the hole.
We propose a single-pass restoration network with one targeted change: a long-range attention layer whose queries come only from saturated positions and whose keys and values come only from valid, unsaturated evidence. Validity is judged per color channel, so a pixel whose red channel clipped but whose blue did not still contributes its blue. The claim is specific and falsifiable. If clipped regions fail because the receptive field is too local, then this layer's gains over a strong convolutional network should be near zero for small clipped regions and should grow with region size. The same attention without the saturation mask should recover most of the cost but much less of the gain.
Core Claim and How It Differs
Prior work splits along the two directions. On the saturation side, Deep HDR Hallucination for Inverse Tone Mapping trains a convolutional U-Net generator with an adversarial loss. It reports blob-like failures and wrong structure on large highlights such as the sun disc, and attributes them to limited context. That paper motivates our work. Learning Gain Map for Inverse Tone Mapping (GMNet) gets global context by downsampling into a separate luminance branch that predicts a single-channel gain. It is fast, 75.26 ms at 4K, but coarse in space and blind to color. Semantic Aware Diffusion Inverse Tone Mapping (DITMO) does route context across distant regions, but through a symbolic scene graph built from upstream segmentation feeding a diffusion inpainter, and it needs about 45 s per frame. Neural Exposure Fusion for High-Dynamic Range Object Detection uses attention across exposure brackets, but only at the same pixel. It therefore has nothing to attend to where every bracket clips.
On the receptive-field side, CCNet and Compact Generalized Non-local Network supply efficient long-range operators, built for segmentation and recognition. Semi-LAR is the closest existing hybrid: it applies linear attention to nighttime lens flare. Flare, however, is an additive scattering artifact over an intact background. Its attention is uniform over the image and has no notion of which pixels carry no information.
What is new here is that the attention pattern is defined by measurement validity. Every query is a clipped pixel and every key is valid evidence. This is learned inside the feature layers, unlike DITMO's external graph, and it reaches across space, unlike exposure fusion's same-pixel attention.
Research Program
The backbone is a NAFNet-style restoration network, the architecture behind the top AIM 2025 entries. At two decoder scales we insert a saturation-routed attention block. A per-channel validity mask $m_c(x) = \mathbb{1}[I_c(x) < \tau]$ is computed from the input, where $I_c(x)$ is channel $c$ at pixel $x$ and $\tau$ is a threshold just below the code ceiling. The mask is downsampled with soft pooling to each scale. Keys and values are built from features multiplied by the mask, and the mask is appended as an input channel so the network knows which channels are trustworthy. Queries are taken at positions where any channel is invalid. The block's output is added back only at those positions, which leaves well-exposed pixels to the local backbone.
To keep cost low, keys are pooled to a fixed grid of roughly 32×32 tokens. The cost then scales as the number of clipped positions times a constant, rather than quadratically in image size. We will also test a criss-cross variant following CCNet as a cheaper alternative. A known risk is that its two-hop recurrence routes through intermediate pixels that may themselves be clipped, which would break the valid-only design.
Training follows the AIM 2025 protocol and losses, with no adversarial or diffusion component. This isolates the question of whether routing alone closes the gap that motivated generative models.
Baselines
The naive reference points are two. The first is the clipped input mapped to linear radiance by inverting the display curve, with no restoration. The second is the AIM 2025 baseline U-Net, which the AIM 2025 report lists at 27.23 dB PU21-PSNR, a peak signal-to-noise ratio computed after a perceptually uniform encoding.
The strongest existing method is Team ToneMapper's NAFNet-based entry. The same report lists it at 34.49 dB PU21-PSNR and 0.95 PU21-SSIM, ahead of the Refusion diffusion entry at 34.33 dB and ITMFlow at 34.06 dB. It is the right competitor because it is the best single-pass model on the benchmark and shares our backbone, so any gain is attributable to the inserted block. We will reimplement it from the report's description on the same roughly 19,000 training pairs. If our reproduction falls short of 34.49 dB, we will report the reproduced number and compare against that. Every model gets the same GPU-hour budget and the same hyperparameter search.
GMNet is retrained on the same data as the strongest efficient global-context design. Its reported 47.63 dB PQ-domain PSNR is on a different dataset and is not comparable to the AIM numbers. For a generative reference we run the Refusion approach, measuring quality and runtime against our single pass.
Three ablations isolate the key ingredient. The first is a parameter- and FLOP-matched wider NAFNet. The second is the same attention block with no mask, applied everywhere. The third is a version with a luminance-only mask, which removes the per-channel validity.
Beating the strongest baseline means a statistically reliable improvement in PU21-PSNR measured only inside clipped regions, concentrated in the largest-region tercile, with whole-image PU21-PSNR no worse than ToneMapper and runtime within a small factor of NAFNet.
Why not just…?
Why not just make the convolutional network bigger? This is the most serious threat. The AIM leaders already reach 34.49 dB with no explicit long-range block, so extra capacity might be all that matters. The matched wider NAFNet tests this directly. If it equals our model on the largest clipped regions, the receptive-field explanation is wrong and we will report that. Our prediction is that the wider network improves all region sizes roughly uniformly while ours improves mainly the large ones.
Why not just use global self-attention everywhere, as Semi-LAR does for flare? Semi-LAR shows global attention helps when the corruption is spread out but the background is intact. With clipped inputs, unmasked attention spends much of its capacity matching clipped features to other clipped features, which are identical and uninformative. The unmasked ablation measures exactly this. If it matches the masked version, the mask is unnecessary and the contribution reduces to "add attention."
Why not just use a diffusion model? Diffusion entries do not beat the best regression entry on AIM PU21-PSNR (34.33 vs 34.49 dB). DITMO needs about 45 s per frame, so these models rule out video and robotics. We still report the diffusion entry's quality, accepting that it may win on perceptual realism.
Why not just inpaint the mask classically? The pixels bordering a clipped region are themselves near the ceiling. Boundary interpolation therefore fills the hole flat. It also cannot use distant cues such as sun position, which Learning High Dynamic Range from Outdoor Panoramas shows are needed to recover radiance. We include a biharmonic fill on the linearized input as a cheap reference.
Proposed Experiments
The main test is the AIM 2025 benchmark, 100 test images at 512×512. We report whole-image PU21-PSNR and PU21-SSIM, plus PU21-PSNR restricted to clipped pixels and split into terciles by connected clipped-region area.
For a controlled sweep, we take held-out HDR images and synthetically clip them at varying exposure. This produces clipped regions whose size we choose, with ground truth known, and lets us plot the gain over matched NAFNet against region size. A flat curve falsifies the core claim.
A chromatic test clips channels at different thresholds and measures hue error inside partially clipped pixels, comparing the per-channel mask, the luminance-only mask, and GMNet.
A structure test uses the 404 real LDR/HDR panoramas from Learning High Dynamic Range from Outdoor Panoramas, measuring sun-position error and sky MAE. That paper reports 2.55 MAE with a dedicated autoencoder trained with a rendering loss; we treat this as a reference rather than a target, since our model is not specialized for sky panoramas.
Finally, runtime at 512×512 and 4K is measured against NAFNet, GMNet, and the diffusion entry on one GPU. The decisive result is a size-dependent gain that the unmasked and wider controls do not reproduce, at near-NAFNet cost.
References
- Deep HDR Hallucination for Inverse Tone Mapping
- Learning Gain Map for Inverse Tone Mapping
- Semantic Aware Diffusion Inverse Tone Mapping
- Neural Exposure Fusion for High-Dynamic Range Object Detection
- CCNet: Criss-Cross Attention for Semantic Segmentation
- Compact Generalized Non-local Network
- Semi-LAR: Semi-supervised Contrastive Learning with Linear Attention for Removal of Nighttime Flares
- AIM 2025 challenge on Inverse Tone Mapping Report: Methods and Results
- Learning High Dynamic Range from Outdoor Panoramas