acceptodds
Under review as a conference paper at ICLR 2027

CACRNET: COMPRESSION-AWARE CONTEXT ROUTING FOR JPEG ARTIFACT REMOVAL

Abstract

Blind JPEG image restoration is a practical yet challenging task, as compression artifacts are spatially non-uniform and highly entangled with genuine image structures. Existing methods typically rely on either local restoration or global prompts alone. As a result, heavily degraded regions may receive insufficient contextual compensation, while artifact-contaminated shallow features can still leak into the decoder through skip connections. To address these limitations, we propose a Compression-Aware Context Routing Network, a restoration framework that uses local degradation evidence to coordinate both contextual compensation and skip-feature selection. Specifically, we proposed a Spatial-Channel Interaction (SCI) module derives local degradation cues and uses them to retrieve location-specific contextual prompts. These prompts are drawn from a Contextual Codebook Bank, which recursively aggregates multiscale encoder features into a compact set of image-adaptive tokens, and are injected into the decoder through efficient factorized spatial attention. In parallel, we design a Compression-Aware Gated Fusion (CAGF) module to recalibrate skip features before fusion, suppressing artifacts while preserving reliable structural details. Extensive experiments on blind, non-blind, and double JPEG restoration benchmarks demonstrate that CACRNet achieves superior quantitative performance and faithfully restores structural details across different compression settings.

Primary area:
applications to computer vision, audio, language, and other modalities
Keywords:
JPEG artifact removal,compressed image restoration,degradation-aware context modeling

Reviews

Among:
Shape:
1234this paper, Top 49%
Figure 1. Mean review rating of the reviewed papers at ICLR 2027. This paper averages 2.33 over 3 reviews, above 51% of the others.
Reviewer_bzkBOpenReview ↗
Rating
2
Confidence
4
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

This paper proposes a Compression-Aware Context Routing Network, a restoration framework that uses local degradation evidence to coordinate both contextual compensation and skipfeature selection. Specifically, a Spatial-Channel Interaction (SCI) module is proposed to derive local degradation cues and uses them to retrieve location-specific contextual prompts. These prompts are drawn from a Contextual Codebook Bank, which recursively aggregates multiscale encoder features into a compact set of image-adaptive tokens, and are injected into the decoder through efficient factorized spatial attention. In parallel, a Compression-Aware Gated Fusion (CAGF) module is designed to recalibrate skip features before fusion, suppressing artifacts while preserving reliable structural details. Extensive experiments on blind, non-blind, and double JPEG restoration benchmarks demonstrate that CACRNet achieves superior quantitative performance.

Critical strengths

A new state-of-the-art method for JPEG artifact removal on blind, non-blind, and double restoration benchmarks with superior quantitative performance.

Critical weaknesses

The novelty of the proposed method is insufficient and the proposed designs, i.e., a Spatial-Channel Interaction module and Compression-Aware Gated Fusion module, are adopted previous works in other low-level vision tasks. Compared them, author should provide the clear and detailed comparison. The core novelty and contributions should be clarified. The more discussion for recent JPEG artifact removal in related works should be provided.

Some recent works should be discussed and compared, such as [1] OAPT: Offset-aware partition transformer for double jpeg artifacts removal. ECCV 2024 [2] Blind Quality Enhancement of Compressed Video via Fine-Grained Degradation-Guided Sequential Inference. TCSVT 2026 [3] CPGA: Coding priors-guided aggregation network for compressed video quality enhancement. CVPR 2024 [4] Blind JPEG Artifacts Removal via Inverse JPEG Compression. Tcsvt 2026 [5] Compression-aware one-step diffusion model for jpeg artifact removal. ICCV 2025 [6] SODiff: Semantic-oriented diffusion model for JPEG compression artifacts removal. AAAI 2026

Questions for authors

Please view Critical Weaknesses

2 comments

Response to Question 1

Thank you for asking us to clarify the specific contributions and their relationship to existing attention and gating designs. CACRNet introduces a task-specific context construction-and-routing framework that connects contextual retrieval with skip-feature regulation. The motivation is that JPEG compression can weaken genuine structures while introducing additional local variations, making restoration dependent on both what structure is present and how compression affects it.

SCI: structure-and-distortion-conditioned contextual retrieval. Compared with directly reweighting the current feature map, SCI uses complementary G/V/D descriptors to condition decoder queries that retrieve information from an image-specific contextual bank. The computational distinction concerns both the conditioning signal and the information being selected: G/V/D describe local transitions, feature variation, and channel dispersion, while CCB supplies contextual candidates constructed from the current image’s multiscale encoder features. Compared with PromptCIR’s spatially weighted learned prompt bases, this makes the candidate content itself image-dependent. These choices organize contextual information around the structural and compression-dependent characteristics of the input.

CAGF: cross-level regulation of skip transmission. CAGF uses the decoder representation as a complementary reference when regulating encoder features. Compared with attention weights generated from the skip features alone, its cross-level conditioning accounts for the relationship between the information being transmitted and the decoder state receiving it. Relative to the backbone’s existing feature-correction pathway, CAGF adds multiplicative control before fusion, with an exponential gain that permits both attenuation and amplification.

Controlled comparisons. To evaluate these design choices, we replace SCI’s query conditioning or CAGF’s weight generator while retaining the remaining architecture and training/evaluation protocol. The results on LIVE1 at QF40 are:

ConfigurationPSNR (dB)
Full CACRNet32.94
SCI replaced with Generic query gating32.87
CAGF replaced with Generic skip gating32.89
CAGF replaced with CBAM weighting32.84

Full improves over these alternatives by approximately 0.07, 0.05, and 0.10 dB, respectively. These comparisons demonstrate the restoration benefits of the proposed conditioning and skip-regulation designs over the evaluated alternatives. We have added the controlled comparisons and corresponding visualizations to the appendix.

Response to Question 2

Thank you for suggesting these relevant works. We have expanded Section 2.1 to discuss all six studies, including OAPT, IJCN, CODiff, SODiff, and the related compressed-video enhancement methods CPGA and fine-grained degradation-guided sequential inference. The added discussion summarizes their contributions to compression-aware restoration, as follows.

OAPT predicts compression offsets and groups similar compression patterns for attention-based double JPEG restoration [1]. IJCN compensates for quantization errors and color distortions through learned rounding offsets and quantization-table guidance [2]. CODiff learns compression-aware visual embeddings to guide one-step diffusion [3], while SODiff combines semantic-aligned image prompts with quality-aware timestep prediction for detail reconstruction [4]. In compressed-video enhancement, CPGA exploits coding priors to guide temporal and spatial aggregation [5], while Yu et al. [6] combine fine-grained, multiscale degradation representations with sequential inference that adapts the number of restoration stages to compression severity.

[1] Qiao Mo et al. “OAPT: Offset-Aware Partition Transformer for Double JPEG Artifacts Removal.” ECCV, 2024.

[2] Shuai Liu et al. “Blind JPEG Artifacts Removal via Inverse JPEG Compression.” IEEE Transactions on Circuits and Systems for Video Technology, 2026.

[3] Jinpei Guo et al. “Compression-Aware One-Step Diffusion Model for JPEG Artifact Removal.” ICCV, 2025.

[4] Tingyu Yang et al. “SODiff: Semantic-Oriented Diffusion Model for JPEG Compression Artifacts Removal.” AAAI, 2026.

[5] Qiang Zhu et al. “CPGA: Coding Priors-Guided Aggregation Network for Compressed Video Quality Enhancement.” CVPR, 2024.

[6] Li Yu et al. “Blind Quality Enhancement of Compressed Video via Fine-Grained Degradation-Guided Sequential Inference.” IEEE Transactions on Circuits and Systems for Video Technology, 2026.

Thank you for the responses and additional experiments. The authors have provided clarifications and have mainly addressed my concerns regarding novelty and the designed comparisons. These modifications should be presented in the new version. Since the original novelty is insufficient, I maintain my original rating.

Reviewer_fzyHOpenReview ↗
Rating
3(+1)
Confidence
4
Informativeness
2
Presentation
3
Soundness
2
Read review
Paper summary

CACRNet addresses blind JPEG artifact removal using a Fourier-RWKV-based encoder–decoder network. It constructs an image-specific contextual token bank from multiscale encoder features. Spatial-Channel Interaction (SCI) uses image gradients and feature statistics to retrieve location-dependent prompts, while Compression-Aware Gated Fusion (CAGF) reweights skip features using encoder–decoder variance differences. The network is trained with pixel-, frequency-, and gradient-domain losses and evaluated under blind, fixed-QF, and double-JPEG compression settings.

Critical strengths
  • The paper addresses a practical restoration task with broad evaluation coverage. Experiments include unknown compression quality, fixed quality factors, and both aligned and misaligned double JPEG compression. And the reported results show consistent improvements over recent baselines.

  • The paper provides useful component and loss ablations. At QF 40, adding SCI or CAGF individually improves PSNR on all three evaluated datasets. The loss ablations also examine the effects of frequency- and gradient-domain supervision. These results support the empirical usefulness of the proposed additions.

Critical weaknesses

-The proposed method is insufficiently verified to operate as claimed.

The paper claims that SCI selects reliable context and that CAGF suppresses artifacts while preserving genuine details. However, no analysis directly verifies these claims. Table 4 shows improvements in restoration performance after adding the modules, but does not establish whether the improvements arise from recognizing compression degradation. Analyses of attention and gate maps, along with controlled experiments varying the QF for the same original image, are needed. The authors should distinguish whether the proposed cues respond to actual degradation or merely to image content.

  • The additional contribution over existing spatially adaptive restoration methods is unclear.

PromptCIR [1] already generates location-specific prompt weights to adapt to image content and compression conditions. Therefore, spatially varying restoration alone does not sufficiently explain the distinctiveness of the proposed method. CACRNet differs by constructing a contextual token bank from the current image and reweighting skip features. However, the paper does not separately validate the effect of replacing learned prompt bases with an image-specific bank, or explain why the proposed gate is advantageous over generic attention or gating. The additional value provided by the proposed architecture should be demonstrated more clearly.

  • Computational comparisons are insufficient to assess the practical value of the performance gains.

Table 1 compares parameter counts, but does not report FLOPs, inference time, or peak memory usage. Computational costs should be compared with existing methods. The current results are insufficient to assess the trade-off between performance and computational cost.

[1] Bingchen Li et al. “PromptCIR: Blind Compressed Image Restoration with Prompt Learning.” CVPR Workshops, 2024.

Questions for authors
  • Why use Fourier-based processing instead of a DCT-based design, given that JPEG compression operates on blockwise DCT coefficients?

  • Could the authors report FLOPs, inference time, and peak memory usage for CACRNet and the baselines under the same input resolution and hardware?

  • How do the authors verify that the proposed routing and gating adapt restoration appropriately to texture complexity and actual compression degradation, as claimed?

2 comments

Response to Question 1

Thank you for raising this question. JPEG's blockwise DCT is a useful coding prior, but restoration also depends on how transformed representations are processed. Yang et al. [1] report that JPEG DCT coefficients' altered correlation structure can limit conventional convolution and spatial attention.

Fourier-WKV [2] mixes projected learned features, avoiding conventional spatial operators on JPEG DCT coefficient maps. It transforms feature keys and values into the spectral domain, applies Bi-WKV mixing, and maps the result back. Fourier components span the feature map, enabling interaction across distant regions. Combined with local spatial processing, this joins broad context with local structure, while recurrent WKV avoids a dense spatial attention matrix. D2LNet [1] provides a JPEG restoration precedent, combining spatial information with amplitude and phase correction.

Response to Question 2

Thank you for this suggestion. We measured computational costs using 512×512 RGB inputs on the same NVIDIA RTX 3090.

MethodParams (M)FLOPs (G)Time (ms)Peak memory (GiB)
FBCNN [3]71.9221457.81482.8910.576
CRLM [4]13.8845144.042353.9361.898
PromptIR [5]35.5921265.126385.8252.371
PromptCIR [6]34.7551681.221268.7157.582
MaIR [7]22.6882323.8337433.5884.427
MambaIRv2 [8]36.2753683.55914293.4835.793
Q-MambaIR [9]23.9231500.2868123.1534.735
CACRNet23.4501034.034216.9661.145

CACRNet requires 216.97 ms per image and 1.145 GiB of peak allocated memory. These costs and restoration quality indicate a favorable performance–cost balance.

Response to Question 3

Thank you for raising this question. Controlled comparisons and same-image multi-QF maps examine how routing and gating consider local structure and compression effects.

SCI: cue-conditioned contextual retrieval. Generic generates query gates using a two-layer pointwise MLP. Both retain the same bank, retrieval, injection, and remaining architecture. LIVE1/QF40 results:

Query conditioningGate parameters/stagePSNR (dB)
SCI5,47232.94
Generic5,34632.87

SCI improves PSNR by approximately 0.07 dB with comparable gate capacity. G captures spatial transitions, V local feature variation, and D channel dispersion. Their joint use conditions contextual selection on structure and compression-dependent changes. Supplementary Fig. 8 uses identical crops and fixed color scales at QF10/40/70: G highlights persistent contours, while V and D exhibit compression-dependent changes.

CAGF: decoder-conditioned skip transmission. Encoder features contain useful details and compression perturbations. CAGF uses decoder features as a complementary reference for regulating transmission. Both controls retain skip correction and final fusion. Generic skip retains encoder–decoder conditioning and exponential gain but replaces CAGF's descriptor with learned concatenation/projection; CBAM generates channel and spatial weights from skip features alone. Related gating and a CBAM restoration application appear in [10,11].

Skip configurationLIVE1/QF40 PSNR (dB)
Full CAGF32.94
Generic skip32.89
CBAM32.84

CAGF improves PSNR by approximately 0.05/0.10 dB over Generic/CBAM. Decoder conditioning regulates encoder transmission, while exponential gain permits attenuation and amplification. Supplementary Fig. 9 shows compression errors, encoder–decoder diagnostics, and native gains at QF10/40/70. Gains vary spatially and with compression level for fixed content, complementing the controlled restoration comparisons.

References: [1] Yang et al. Dual-Domain Learning for JPEG Artifacts Removal. EasyChair Preprint 11261, 2023. [2] Zheng et al. Fourier-RWKV: A Multi-State Perception Network for Efficient Image Dehazing. arXiv, 2025. [3] Jiang et al. Towards Flexible Blind JPEG Artifacts Removal. ICCV, 2021. [4] Wang et al. JPEG Artifacts Removal via Contrastive Representation Learning. ECCV, 2022. [5] Potlapalli et al. PromptIR: Prompting for All-in-One Image Restoration. NeurIPS, 2023. [6] Li et al. PromptCIR: Blind Compressed Image Restoration with Prompt Learning. CVPRW, 2024. [7] Li et al. MaIR: A Locality- and Continuity-Preserving Mamba for Image Restoration. CVPR, 2025. [8] Guo et al. MambaIRv2: Attentive State Space Restoration. CVPR, 2025. [9] Chen et al. Q-MambaIR: Accurate Quantized Mamba for Efficient Image Restoration. CVPR Findings, 2026. [10] Rahman et al. EMCAD: Efficient Multi-scale Convolutional Attention Decoding for Medical Image Segmentation. CVPR, 2024. [11] Walia et al. FUSION: Frequency-guided Underwater Spatial Image recOnstructioN. CVPRW, 2025.

I've confirmed that most of the concerns have been addressed. Although a minor issue with W1 still remains, I think it's acceptable at this point. The method seems to work as intended. While it is not the fastest, it requires fewer FLOPs, less memory, and less computation time than more recent methods. I am willing to raise my score.

Reviewer_EskdOpenReview ↗
Rating
2
Confidence
3
Informativeness
2
Presentation
2
Soundness
2
Read review
Paper summary

CACRNet adds local context retrieval and gated skip fusion to a Fourier-RWKV JPEG restoration network. SCI retrieves tokens from an image-specific multiscale bank using local image cues; CAGF filters encoder features before skip fusion. The paper evaluates blind, fixed-QF, and double-JPEG restoration.

Critical strengths

The idea of adapting context and skip features to local degradation is sensible.

Critical weaknesses

My main concern is that the experiments do not make clear what drives the improvement. The gradients, local variance, and channel disagreement used by SCI can also reflect ordinary image structure, so the results do not show whether these cues help identify JPEG artifacts specifically. Table 4 evaluates SCI as a complete block, and CCB is not tested on its own. It is therefore difficult to tell whether the gains come from the proposed cues and recursive Haar design, or whether a simpler content-conditioned retrieval module would perform similarly. Separate ablations for SCI and CCB, along with a comparison to a simpler baseline, would help clarify this.

Questions for authors
  1. The evidence for the main claim currently comes from a module-level ablation. Can the authors compare SCI with a capacity-matched generic feature-conditioned attention module, and show that its cue maps respond differently to JPEG artifacts than to genuine edges and textures?
  2. Can the CCB be tested separately from SCI, for example against pooled multiscale features or learned context tokens? Without this comparison, it is unclear whether the Haar-based recursive bank contributes to the reported gain.
  3. The model is trained with quality factors sampled from 10 to 70, while the fixed-QF and double-JPEG tests use values within that range. Could you also test quality factors outside the training range? This would show whether CACRNet generalizes to unseen compression levels.
1 comment

Response to Question 1

Thank you for suggesting this comparison. We compare SCI with a representative capacity-matched generic feature-conditioned attention module [1]. Both retain the same contextual bank, retrieval, injection, and remaining architecture. LIVE1/QF40 results are:

Query conditioningGate parameters/stagePSNR (dB)
SCI5,47232.94
Generic5,34632.87

SCI improves PSNR by approximately 0.07 dB with comparable gate capacity. Whereas Generic generates gates directly from decoder features, SCI conditions retrieval queries jointly on Sobel_Grad/Local_ Var/ Channel_Std descriptors, incorporating local structural and compression-sensitive cues into context selection.

Fig. 8 in the supplementary material compares identical crops at QF10/40/70 using fixed color scales. G remains aligned with genuine edges, including wing contours and building boundaries. It also responds to genuine texture, such as the repeated roof-tile patterns in Buildings. In contrast, V and D exhibit stronger, more spatially extensive responses at QF10 that weaken at QF40/70, including within the same textured roof and patterned wing regions. Thus, the examples show persistent responses to genuine edges and textures alongside compression-dependent changes. Because JPEG affects genuine edges and textures as well as introducing artifacts, these responses can overlap spatially. SCI uses the cues jointly to describe structure and its compression-affected representation. We acknowledge that our original wording could suggest that these cues exclusively identify compression artifacts. We have revised the corresponding descriptions in the manuscript to clarify that they jointly characterize local structure and its compression-affected representation, with the changes highlighted in blue.

Response to Question 2

Thank you for suggesting this comparison. We isolate CCB using three bank variants while retaining SCI conditioning, retrieval, injection, and the remaining architecture: CCB-Pooled independently pools multiscale features before fusion; CCB-LearnedDown retains recursive fusion but replaces Haar filtering with learnable stride-2 downsampling; CCB-SharedTokens uses image-independent learned tokens. All banks contain 256 tokens with 144 channels.

Bank constructionLIVE1/QF40 PSNR (dB)
CCB32.94
CCB-Pooled32.84
CCB-LearnedDown32.83
CCB-SharedTokens32.77

CCB improves over these variants by approximately 0.10, 0.11, and 0.17 dB, respectively. Unlike independent pooling, CCB exposes local averages and directional differences for recursive cross-scale fusion before final token pooling. Compared with learned downsampling, fixed Haar filters provide an explicit analysis basis, leaving subsequent fusion layers to learn how to combine its components. Unlike shared tokens, CCB makes the candidate content itself image-dependent, allowing retrieval to draw on patterns present in the current image.

Response to Question 3

Thank you for this suggestion. We evaluated QF5/80/90/95, outside CACRNet's training interval of 10-70. LIVE1 PSNR results are:

MethodQF5QF80QF90QF95Average
JPEG input23.264235.240738.437541.793834.6840
FBCNN [5]24.484536.482839.440042.321335.6821
CRLM [6]24.591936.592139.528342.367735.7700
PromptIR [7]24.692036.694139.610542.411035.8519
PromptCIR [8]24.738336.741139.648542.431035.8897
MaIR [9]24.708536.710839.624042.418135.8653
MambaIRv2 [10]24.726336.728939.638742.425835.8799
Q-MambaIR [11]24.808636.812739.706342.461435.9472
CACRNet25.049037.057439.903842.565336.1439

CACRNet achieves the highest PSNR at every tested QF, averaging 36.1439 dB: approximately 0.20 dB above Q-MambaIR and 1.46 dB above JPEG input. Its gains over Q-MambaIR are 0.2404/0.2447/0.1975/0.1039 dB at QF5/80/90/95. These results demonstrate restoration outside the training QF range for both stronger and weaker compression.

References: [1] Qiu et al. Gated Attention for Large Language Models. NeurIPS, 2025. [5] Jiang et al. Towards Flexible Blind JPEG Artifacts Removal. ICCV, 2021. [6] Wang et al. JPEG Artifacts Removal via Contrastive Representation Learning. ECCV, 2022. [7] Potlapalli et al. PromptIR: Prompting for All-in-One Image Restoration. NeurIPS, 2023. [8] Li et al. PromptCIR: Blind Compressed Image Restoration with Prompt Learning. CVPRW, 2024. [9] Li et al. MaIR: A Locality- and Continuity-Preserving Mamba for Image Restoration. CVPR, 2025. [10] Guo et al. MambaIRv2: Attentive State Space Restoration. CVPR, 2025. [11] Chen et al. Q-MambaIR: Accurate Quantized Mamba for Efficient Image Restoration. CVPR Findings, 2026.

From OpenReview, CC BY 4.0. Authors as signed there; shown unedited.

Related papers

Loading the map…

Discussion (0)

Sign in to comment.