Manuscript Offprint
arXiv:2610.25142Image Dehazing as In-Context Tabular Inference
Le-Anh Tran
Abstract—Image dehazing is traditionally addressed through handcrafted physical priors or task-specific deep learning models, often requiring carefully designed architectures or extensive model training. Recent advances in tabular foundation models (TFMs), however, offer an alternative learning paradigm in which continuous relationships can be inferred directly from contextual examples without task-specific model training. Motivated by this capability, this paper investigates whether single-image dehazing can be effectively reformulated as an in-context tabular regression problem and introduces DehazeTab, a framework that estimates atmospheric transmission from structured image-patch representations. Specifically, overlapping patches extracted from hazy images are transformed into tabular samples using handcrafted haze-related descriptors, pretrained visual embeddings, or their hybrid combinations, while corresponding transmission patches are summarized as scalar regression targets. A pretrained TFM then performs in-context regression using labeled reference patches to predict transmission values for unseen images without any further fine-tuning. These predictions are spatially aggregated into a transmission map, refined through guided filtering, and incorporated into the atmospheric scattering model to recover haze-free images. Experiments on benchmark datasets demonstrate competitive restoration performance and reveal that physically motivated handcrafted features can outperform pretrained visual embeddings, while hybrid representations offer complementary benefits. Further analyses examine the effects of feature representations, patch selection, and contextual reference configurations on restoration quality. Beyond image dehazing, the findings highlight the potential of TFMs as an alternative paradigm for addressing low-level vision tasks through structured and in-context inference.
Index Terms—Image dehazing, image restoration, foundation model, tabular foundation model, in-context learning.
I. INTRODUCTION
IMAGE dehazing seeks to recover clear scene information obscured by atmospheric haze, which reduces contrast, alters colors, and suppresses structural details, compromising visual quality and downstream vision tasks. Yet single-image dehazing is inherently ill-posed: distinct clear scenes can produce similar hazy observations. Recovering a plausible scene therefore requires physical priors or learned constraints. The widely used atmospheric scattering model describes this degradation as:
where and are the hazy observation and haze-free radiance, A denotes atmospheric light, and is transmission. This physically interpretable formulation makes transmission estimation central to restoration. Conventional methods estimate transmission from natural-image statistics. Dark channel prior (DCP) [1], for instance, exploits local intensity patterns, while saturation line prior (SLP) [2] uses
TABLE I
ILLUSTRATION OF THE PATCH-TO-TABULAR FORMULATION. LABELED PATCHES CONSTITUTE THE CONTEXT, WHILE UNSEEN PATCHES ARE PROVIDED WITHOUT TRANSMISSION TARGETS.
| Type | Patch | Features | Target | ||||
|---|---|---|---|---|---|---|---|
| Context | 0.61 | 0.18 | 0.43 | 0.52 | 0.78 | ||
| 0.73 | 0.11 | 0.57 | 0.66 | 0.61 | |||
| 0.45 | 0.27 | 0.31 | 0.48 | 0.84 | |||
| Unseen | 0.68 | 0.15 | 0.49 | 0.58 | × | ||
| 0.79 | 0.09 | 0.63 | 0.71 | × | |||
local saturation–brightness relationships to infer haze-related quantities. These approaches suggest an important observation: image patches contain structured cues from which transmission can be predicted as a continuous value. However, fixed priors may fail when scene characteristics violate their assumptions. Deep learning offers more flexible mappings, estimating transmission or directly restoring clear images from paired data [3]–[7]. Despite impressive results, such models often depend on task-specific training and substantial paired data, and synthetic-to-real domain shifts remain challenging. Some weakly supervised, synthetic-to-real, zero-shot, and unpaired methods also seek to alleviate these limitations [8]–[13].
Meanwhile, tabular foundation models (TFMs) [14]–[16] have introduced a different way to learn from structured data. Rather than optimizing a separate regressor for every task, a pretrained TFM can infer feature–target relationships in context, directly from labeled examples. This capability is particularly appealing for small- and medium-scale datasets, reducing the need for repeated training, hyperparameter tuning, and task-specific architecture design. It raises an interesting question: can image dehazing be solved through in-context tabular inference instead of training a dedicated network?
Motivated by this question, the paper proposes DehazeTab, which reformulates transmission estimation as patch-level tabular regression. Each hazy-image patch becomes a row of structured features, paired with a scalar transmission target, as illustrated in Table I. Given labeled reference patches, a pretrained TFM predicts transmission for patches from an unseen image without task-specific fine-tuning. Overlapping predictions are aggregated into a dense transmission map, refined by guided filtering [17] to preserve boundaries and reduce artifacts, and used in the atmospheric scattering model to recover the haze-free scene. Accordingly, feature representation is crucial to this formulation. Handcrafted haze descriptors
https://github.com/tranleanh/dehazetab explicitly encode physical and local statistical cues; pre-trained visual embeddings offer richer structural and semantic information; and hybrid representations may combine their strengths. DehazeTab therefore examines these complementary representations to understand what information supports effective in-context transmission prediction. In a nutshell, the main contributions include:
• The DehazeTab framework is introduced to reformulate single-image dehazing as patch-level structured regression using a pretrained TFM and contextual examples.
• A patch-to-tabular pipeline is developed to transform image features into transmission predictions, followed by spatial aggregation and image reconstruction.
• Handcrafted, pretrained visual, and hybrid feature representations are systematically investigated to examine their contributions to the framework’s performance.
• Benchmark comparisons and ablation studies are conducted to assess the feasibility and limitations of the proposed framework, highlighting its potential for broader image restoration applications.
The goal is not to claim state-of-the-art performance, but to examine whether structured in-context inference offers a viable alternative perspective on image restoration. Section II reviews related work; Section III details the DehazeTab framework; Section IV presents experiments and analysis; and Section V concludes the paper.
A. Prior-Based Approaches
Single-image dehazing is commonly formulated using the atmospheric scattering model, which relates a hazy observation to scene radiance, transmission, and atmospheric light. Since recovering these quantities from one image is ill-posed, traditional methods rely on statistical priors. The influential DCP [1] estimates transmission from the observation that most haze-free outdoor patches contain low-intensity pixels in at least one color channel. Subsequent approaches exploit other local color relationships. SLP [2] models local saturation-brightness relationships to estimate transmission. RSVT [18] uses saturation-value relationships and relatively stable hue information to improve restoration in bright and sky regions. Together, these studies establish an important insight: local image regions contain structured, physically meaningful cues for inferring haze-related quantities. While physically interpretable and free of data-driven training, such methods can fail when their assumptions do not hold, and their inference rules remain largely prescribed by handcrafted assumptions rather than adapted from contextual examples.
B. Learning-Based Approaches
Deep learning enables more flexible dehazing by learning transmission estimates or direct hazy-to-clear mappings from data. DehazeNet [3] predicts transmission with a convolutional network, whereas AOD-Net [4] supports end-to-end image reconstruction through a reformulation of the scattering model. Subsequent architectures, including EDN-GTM [19], FFA-Net [5], DPTE-Net [20], and DehazeFormer [7], improve restoration through guided transmission estimation, feature fusion, distillation, and attention-based representations. Despite strong benchmark performance, supervised approaches depend on paired training data, which are difficult to collect under real atmospheric conditions. Models trained predominantly on synthetic haze also face potential domain shifts.
To reduce these dependencies, RefineDNet [8] employs weak supervision, PSD [9] adapts synthetic-pretrained models using physical priors, and SDA-GAN [10] addresses synthetic-to-real discrepancies through semi-supervised domain alignment. Other methods avoid paired training collections: ZID [11] and YOLY [12] estimate atmospheric components through zero-shot or image-specific optimization, while UID-KAT [13] investigates unpaired restoration through latent feature transformation and adversarial learning. Although these directions relax supervision requirements, they generally retain specialized neural architectures, task-specific learning procedures, or image-specific optimization. This motivates exploring whether dehazing can instead be performed using a pretrained, general-purpose predictor conditioned on representative examples.
C. Tabular Foundation Models for Vision Problems
Tabular foundation models (TFMs) offer a distinct learning paradigm: rather than fitting a new predictor for every dataset, a pretrained model can infer feature-target relationships from labeled examples supplied as context. TabPFN [16], pretrained on synthetic tabular tasks, performs classification and regression through in-context inference without task-specific gradient-based optimization. Related advances include TABULA-8B [14], which investigates zero- and few-shot transfer across heterogeneous tables through language modeling, and LoCalPFN [15], which extends tabular prediction through retrieval and fine-tuning. These developments highlight the potential of TFMs to generalize statistical inference capabilities across structured data and in-context prediction.
Nevertheless, TFM research has largely concentrated on conventional tabular datasets, while their applicability to dense, low-level vision tasks remains comparatively unexplored. Addressing this gap, DehazeTab represents one of the early investigations of TFMs for single-image dehazing. It transforms overlapping image patches into structured feature vectors, uses contextual transmission labels for patch-level regression, and reconstructs haze-free images through the atmospheric scattering model. Unlike conventional dehazing networks, the proposed framework places the learning task in the tabular feature-to-transmission relationship, allowing a pretrained TFM to infer haze characteristics without dehazing-specific weight updates. Beyond restoration accuracy, this formulation explores a broader direction for connecting general-purpose in-context learning with image restoration.
III. METHODOLOGY
A. Overview and Problem Formulation
The core idea is to reformulate atmospheric transmission estimation as an in-context tabular regression problem, offering an alternative to conventional task-specific dehazing networks. Given a hazy image I and its corresponding transmission map

Fig. 1. Offline preparation of spatially aligned patch features and transmission targets for contextual table construction.
TABLE II REGRESSION INPUT CONFIGURATIONS FOR TRANSMISSION ESTIMATION USING TABULAR FOUNDATION MODELS.
| Type | Description | Research Question |
|---|---|---|
| (i) Handcrafted features | DCP, statistical, and texture features | Are physically motivated features effective for this reformulated task? |
| (ii) Local embedded features | Features from a pretrained CNN (e.g., ResNet) | Do local and hierarchical visual representations provide better transmission cues? |
| (iii) Global embedded features | Features from a pretrained ViT (e.g., ViT-Tiny) | Does global contextual information improve transmission estimation? |
| (iv) Hybrid features | Handcrafted + embedded features | Do handcrafted and learned features provide complementary information? |
T from a reference image pair, overlapping image patches are represented by compact feature vectors , while their aligned transmission patches provide scalar regression targets . The resulting contextual dataset is defined as:
where each row represents an image patch and its associated transmission value, as illustrated in Table I. Unlike conventional regressors that require task-specific optimization, a pretrained TFM directly conditions on these labeled examples to predict transmission values for unseen image patches without updating model parameters.
A key consideration in this formulation is how image patches should be represented for effective transmission inference. Accordingly, DehazeTab investigates four feature configurations, summarized in Table II: (i) handcrafted haze-related descriptors capturing physical and statistical cues, (ii) CNN-based embeddings encoding local and hierarchical visual structures, (iii) ViT-based embeddings incorporating broader contextual information [21], and (iv) hybrid representations combining handcrafted and learned features. These configurations systematically examine whether physically motivated features, learned visual representations, or their combination provide more effective transmission cues. Finally, the predicted patch-level transmission values are spatially aggregated and refined to construct a dense transmission map for haze-free image reconstruction.
B. Contextual Sample Construction
Transmission targets. Contextual examples are derived from paired hazy and haze-free reference images. Since atmospheric light A is not provided, it is estimated using DCP [1]: candidate pixels are identified from high dark-channel responses, and the brightest corresponding hazy-image pixel supplies the atmospheric-light estimate A. Given an aligned hazy–clear pair and the atmospheric scattering model in Eq. (1), a channel-shared transmission estimate is:
where ensures numerical stability, and the estimate is then clipped to [0, 1].
Patch-level targets. For each reference image, overlapping patches are extracted from the hazy image and its estimated transmission map using the same spatial coordinates. For patch region , the scalar regression target is defined as its mean transmission:

Fig. 2. Reference retrieval and in-context inference process of DehazeTab.
The corresponding hazy patch is represented by a feature vector , forming a labeled tabular sample . By using consistent patch coordinates for feature extraction and transmission-target construction, each feature vector is associated with the mean transmission of its corresponding spatial region, ensuring spatial alignment between the inputs and regression targets.
Context patch selection. Retaining all extracted patches would introduce substantial redundancy and increase the computational cost of in-context inference. To construct a compact and representative context table, only the top P patches are selected from each reference image. The primary strategy employs an informativeness score based on local contrast, intensity range, gradient strength, entropy, dark-channel variation, and saturation variation, together with a spatial-distance constraint to reduce near-duplicates. Alternatively, clustering-based selection identifies representative patches in feature space, promoting sample diversity beyond predefined local statistics. The effects of those selection strategies on dehazing performance are examined in Section IV-D.
C. Patch Feature Representations
- Handcrafted Haze-Related Features: The first representation tests whether physically meaningful local statistics provide sufficient information for transmission regression. Each hazy patch is characterized by RGB and grayscale intensity statistics, saturation and brightness, inter-channel differences, contrast, gradients, edge and texture descriptors, entropy, and Laplacian variance. Dark-channel statistics are additionally included because of their established relationship to haze. The resulting handcrafted feature vector is expressed as:
which defines the DehazeTab variant.
- Pretrained Visual Embeddings: The second representation investigates whether features learned for general visual understanding can provide useful cues for atmospheric transmission estimation. Rather than independently encoding each small image patch, a frozen pretrained encoder processes the entire hazy image to preserve broader visual context. Given a input RGB image:
the encoder produces an intermediate feature map, which is subsequently aligned with the overlapping patch grid used for transmission estimation.
For CNN-based features, a pretrained ResNet-18 encoder truncated after layer 2 is employed, producing:
Then a average-pooling operation with stride 1 is applied:
For ViT-based features, a pretrained ViT-Tiny/16 is adopted to incorporate broader contextual information through self-attention. Unlike the CNN encoder, ViT-Tiny/16 employs non-overlapping patch embeddings with a stride of 16. Consequently, a input naturally produces a spatial token grid, excluding the class token:
This resolution follows directly from the patch-embedding configuration of the pretrained model, rather than from an arbitrary choice of spatial downsampling. Obtaining a denser native token grid would require modifying the input resolution or adopting a different patch-embedding configuration, potentially increasing computational cost or changing the pretrained representation. Therefore, bilinear interpolation with aligned corners is employed to map the contextualized spatial tokens directly onto the overlapping patch grid:
Both feature representations are thus spatially aligned with the grid of overlapping image patches extracted with stride 8. For either encoder, the embedding associated with patch is obtained as:
where denotes the spatial grid coordinates of patch , and is the corresponding feature dimension. The same extraction procedure is applied during reference preparation and query inference. The CNN representation provides hierarchical spatial features, whereas the ViT representation captures broader contextual relationships through self-attention. These alternatives define and , respectively, allowing their effectiveness for patch-level transmission estimation to be systematically evaluated.
- Hybrid Feature Representation: Handcrafted descriptors explicitly capture haze-related statistics, while pretrained embeddings encode richer visual structures. To investigate their complementarity, the two representations are concatenated:
CNN-based embeddings are adopted for this hybrid representation because their local inductive biases are well suited to capturing haze-related spatial cues, whereas ViT-based embeddings emphasize broader contextual relationships, which may be less informative for local transmission estimation. This choice is further supported by the quantitative comparisons in Section IV-B. The hybrid construction uses the same selected patch coordinates for both feature types, ensuring spatial correspondence between handcrafted descriptors and learned embeddings. This configuration is denoted . The transmission targets and TFM regression mechanism remain unchanged across variants, allowing the effect of feature representation to be evaluated independently. The offline feature preparation process is illustrated in Figure 1.
D. In-Context Transmission Inference and Reconstruction
Reference retrieval. For each unseen hazy image, R reference images are identified using image-level embeddings from a pretrained ResNet encoder. The most similar references supply their previously constructed labeled patch tables, which are combined into , providing scene-relevant context for TFM with a contextual table containing labeled samples. The impacts of different numbers of references R and selected patches P are examined in Section IV-D.
In-context regression. The unseen image is represented using the same feature extraction scheme as the references. Given an unlabeled patch vector , the pretrained TFM predicts its transmission by conditioning on the labeled context:
Thus, the relationship between patch features and transmission is inferred from contextual examples, rather than learned by training a dehazing-specific regressor. TabPFN [16] is adopted as the TFM in this study due to its strong regression performance on small- and medium-scale tabular datasets and its proven ability to perform in-context inference.
Haze-free image recovery. Predicted patch-level transmission values are projected back onto their spatial regions and aggregated across overlapping patches to form a dense, coarse transmission map. Guided filtering [17] then refines this map to reduce patch artifacts while preserving structural boundaries. The refined transmission is resized to the original image resolution and combined with the estimated atmospheric light to recover the haze-free scene. The full process of reference retrieval and in-context inference of DehazeTab is illustrated in Figure 2.
IV. EXPERIMENTS AND ANALYSES
A. Experimental Setup
Datasets and evaluation protocol. Experiments are conducted with two subsets of RESIDE database [30]: SOTS-Outdoor (500 hazy/clean pairs) and HSTS (10 pairs). For contextual reference construction, the 500 SOTS-Outdoor pairs are processed as described in Section III-B. When evaluating a SOTS-Outdoor image, that image is excluded from its candidate reference pool. This is a leave-one-image-out contextual evaluation on SOTS-Outdoor, not a fully independent training/test split. The HSTS experiments provide a separate evaluation subset, using the full available SOTS-Outdoor reference pool.
Context construction and retrieval. Reference images are processed at resolution to estimate transmission and construct patch-level contextual samples. Overlapping patches with a stride of 8 yield 961 candidate patches per image, from which 100 representative patches ( ) are selected by default using the informativeness-based strategy described in Section III-B to construct compact contextual tables. During query inference, all 961 overlapping patches are retained for transmission prediction, enabling spatial aggregation of neighboring estimates to reduce block artifacts and improve the continuity of the reconstructed transmission map. A pretrained ResNet-50 encoder extracts image-level embeddings for reference retrieval. For each query image, the five most similar eligible references ( ) are retrieved, and their precomputed patch tables are combined to form a contextual dataset containing samples. This retrieval strategy avoids redundant feature extraction for reference images. The resulting transmission map is subsequently resized to the original image resolution for restoration.
Implementation and metrics. All variants employ the pretrained TabPFN-3.5 [16], with identical inference settings and normalized tabular features. Four feature representations are evaluated: DehazeTab , DehazeTab , DehazeTab , and DehazeTab . Reconstruction quality on paired benchmarks is assessed using PSNR and SSIM, where higher values indicate better performance. For real-world evaluation, NIQE and BRISQUE are employed to assess the perceptual quality of restored images without requiring haze-free ground truths; this evaluation is conducted on four representative natural hazy images commonly used in existing dehazing studies (shown in Figure 5), with lower NIQE and BRISQUE scores indicating better perceptual quality. Experiments are conducted on a Linux environment with an Intel Xeon Silver 4216 CPU 2.10 GHz and an NVIDIA GeForce RTX 3090 GPU 24 GB.
TABLE III PERFORMANCE COMPARISONS ON THE SOTS-OUTDOOR AND HSTS DATASETS (BOLD: BEST, UNDERLINE: SECOND-BEST).
| Method | Publication | Type | SOTS-Outdoor | HSTS | ||
|---|---|---|---|---|---|---|
| PSNR↑ | SSIM↑ | PSNR↑ | SSIM↑ | |||
| DCP [1] | TPAMI'11 | Prior | 18.38 | 0.819 | 17.01 | 0.803 |
| BCCR [22] | ICCV'13 | Prior | 15.71 | 0.769 | 15.21 | 0.747 |
| JEEF [23] | JVCIR'23 | Prior | 17.51 | 0.857 | 17.61 | 0.861 |
| RSVT [18] | PCS'24 | Prior | 22.31 | 0.903 | 21.53 | 0.887 |
| ZID [11] | TIP'20 | Zero-shot | 20.27 | 0.878 | 22.65 | 0.901 |
| YOLY [12] | IJCV'21 | Unsupervised | 20.39 | 0.889 | 21.02 | 0.905 |
| PSD [9] | CVPR'21 | Unsupervised | 20.49 | 0.844 | 19.37 | 0.824 |
| RefineDNet [8] | TIP'21 | Weakly-supervised | 20.81 | 0.877 | 20.66 | 0.890 |
| USID-Net [24] | TMM'22 | Unsupervised | 23.89 | 0.919 | 25.76 | 0.923 |
| HTFA [25] | KBS'22 | Unsupervised | 17.45 | 0.704 | 17.98 | 0.695 |
| VQDUID [26] | NN'23 | Unsupervised | 22.53 | 0.875 | 22.25 | 0.847 |
| SGDRL [27] | NN'24 | Unsupervised | 23.28 | 0.920 | 22.01 | 0.888 |
| HDUD [28] | NCAA'24 | Unsupervised | 24.18 | 0.869 | 25.88 | 0.922 |
| UCL-Dehaze [29] | TIP'24 | Unsupervised | 24.23 | 0.914 | 26.03 | 0.919 |
| UID-KAT [13] | PR'26 | Unsupervised | 24.57 | 0.917 | 27.16 | 0.930 |
| DehazeTabH | Proposed | In-context | 24.71 | 0.940 | 23.45 | 0.918 |
| DehazeTabCNN | Proposed | In-context | 23.74 | 0.898 | 23.27 | 0.893 |
| DehazeTabViT | Proposed | In-context | 23.06 | 0.884 | 21.18 | 0.858 |
| DehazeTabHybrid | Proposed | In-context | 24.87 | 0.942 | 23.36 | 0.916 |
B. Quantitative Comparisons
Table III compares DehazeTab against representative prior-based, zero-shot, unsupervised, and weakly supervised dehazing methods on SOTS-Outdoor and HSTS. The proposed variants are categorized as in-context, since they use labeled reference examples at inference time, but do not fine-tune TabPFN for dehazing.
Effect of feature representation. On SOTS-Outdoor, the handcrafted variant achieves 24.71 dB PSNR and 0.940 SSIM, outperforming the CNN (23.74/0.898) and ViT (23.06/0.884) variants. Notably, CNN-based embeddings consistently outperform ViT-based embeddings across both benchmarks. This may be attributed to the stronger local inductive biases of CNNs, which help preserve haze-sensitive cues. In contrast, the broader contextual representations learned by ViTs may be less effective for patch-level transmission prediction in the proposed framework. These findings provide empirical support for adopting CNN-based embeddings in the hybrid representation. By combining handcrafted descriptors with CNN features, the hybrid variant achieves the strongest SOTS-Outdoor performance among the four configurations, reaching 24.87 dB PSNR and 0.942 SSIM, although the improvement over handcrafted features is modest. On HSTS, the handcrafted variant achieves 23.45 dB and 0.918 SSIM, slightly outperforming the hybrid variant (23.36/0.916), while the CNN and ViT variants obtain 23.27/0.893 and 21.18/0.858, respectively. Overall, these results highlight the effectiveness of physically motivated haze-related descriptors and suggest that incorporating generic pretrained visual embeddings does not necessarily improve transmission estimation, although combining handcrafted and learned features can provide complementary benefits. The performance difference may also be influenced by the native spatial resolutions of the extracted representations, as CNN features originate from a denser spatial grid, whereas ViT features are interpolated from a coarser token grid. Thus, the
TABLE IV PERFORMANCE COMPARISONS ON NATURAL SCENES (BOLD: BEST, UNDERLINE: SECOND-BEST).
| Method | Type | Natural Images | |
|---|---|---|---|
| NIQE↓ | BRISQUE↓ | ||
| DCP [1] | Prior | 3.21 | 15.64 |
| BCCR [22] | Prior | 3.85 | 21.74 |
| RSVT [18] | Prior | 3.08 | 14.66 |
| USID-Net [24] | Unsupervised | 3.32 | 24.95 |
| SGDRL [27] | Unsupervised | 3.21 | 15.41 |
| UCL-Dehaze [29] | Unsupervised | 3.19 | 11.24 |
| UID-KAT [13] | Unsupervised | 3.29 | 13.90 |
| DehazeTabH | In-context | 3.10 | 14.56 |
| DehazeTabCNN | In-context | 3.08 | 15.32 |
| DehazeTabViT | In-context | 3.11 | 16.10 |
| DehazeTabHybrid | In-context | 3.08 | 14.59 |
observed advantage of CNN embeddings may reflect both their local inductive biases and their finer spatial sampling.
Comparison with established methods. DehazeTab produces competitive results despite relying on a general-purpose tabular regressor, its best SOTS-Outdoor result exceeds the reported PSNR of the compared methods such as UID-KAT or UCL-Dehaze, whereas on HSTS, they achieve higher PSNR than any DehazeTab variant. These comparisons support the feasibility of the proposed formulation, but do not establish a consistent performance advantage across datasets. In addition, because the compared methods differ in their supervision requirements, these results should be interpreted as indicative performance comparisons rather than evaluations under strictly identical data-access conditions. The primary objective is to examine the potential of in-context tabular inference for image restoration, rather than to claim state-of-the-art accuracy.
Natural-image evaluation. Table IV reports the NIQE and BRISQUE scores on a set of natural hazy scenes, where lower values indicate better perceptual quality. DehazeTab

Fig. 3. Typical visual results on SOTS-Outdoor.

Fig. 4. Typical visual results on HSTS.
achieves competitive performance compared with established prior-based and unsupervised methods. In terms of NIQE, both DehazeTab and DehazeTab obtain 3.08, matching the best score achieved by RSVT, while DehazeTab and DehazeTab achieve comparable scores of 3.10 and 3.11, respectively. For BRISQUE, DehazeTab obtains the lowest score among the proposed variants (14.56), followed closely by DehazeTab (14.59). Although UCL-Dehaze achieves the best overall BRISQUE score (11.24), the proposed methods outperform several competing approaches, including DCP, BCCR, and USID-Net, on this metric, suggesting that DehazeTab can produce perceptually competitive restorations on natural hazy scenes.
C. Qualitative Comparisons
Figures 3 and 4 present qualitative comparisons on the SOTS-Outdoor and HSTS datasets, respectively. Overall, DehazeTab effectively removes haze while maintaining natural color reproduction and preserving scene structures, producing results visually close to the ground truths. In particular, the proposed method improves visibility and contrast in distant regions, including buildings, vegetation, and road scenes. Compared with DCP, which often introduces excessive contrast and color distortion, DehazeTab provides more balanced restoration. Although several learning-based methods achieve strong haze suppression, some exhibit over-enhancement, unnatural darkening, or noticeable color shifts. In contrast, DehazeTab generally preserves more consistent illumination and natural colors, although slight residual haze remains in certain distant and low-contrast regions.
Figure 5 further evaluates generalization to the set of natural hazy scenes. DehazeTab improves scene visibility while largely preserving the original color characteristics and avoiding the strong saturation or contrast enhancement exhibited by some competing approaches. However, residual haze remains noticeable in challenging regions, particularly under dense

Fig. 5. Typical visual results on natural hazy scenes.
TABLE V ANALYSIS OF DIFFERENT PATCH SAMPLING METHODS.
| Method | Sampling | SOTS-Outdoor | HSTS | ||
|---|---|---|---|---|---|
| PSNR | SSIM | PSNR | SSIM | ||
| DehazeTab | Informative | 24.71 | 0.940 | 23.45 | 0.918 |
| DehazeTab | Informative | 23.74 | 0.898 | 23.27 | 0.893 |
| DehazeTab | Informative | 23.06 | 0.884 | 21.18 | 0.858 |
| DehazeTab | Informative | 24.87 | 0.942 | 23.36 | 0.916 |
| DehazeTab | Clustering | 24.85 | 0.940 | 23.29 | 0.908 |
| DehazeTab | Clustering | 24.01 | 0.908 | 22.91 | 0.880 |
| DehazeTab | Clustering | 22.92 | 0.882 | 21.06 | 0.849 |
| DehazeTab | Clustering | 25.13 | 0.943 | 23.37 | 0.910 |
or spatially complex atmospheric conditions. Overall, these comparisons suggest that the proposed in-context regression framework can achieve visually plausible dehazing across synthetic and natural scenes, while highlighting the remaining challenges in handling severe haze and recovering fine details.
D. Ablation Studies
The default configuration (baseline) uses informativeness-based patch selection, retrieves five reference images , and samples 100 patches from each reference . Ablation studies are conducted to assess the impact of these choices by varying each configuration independently while keeping the underlying regression framework unchanged.
- Effect of Patch Selection Strategy: Two strategies are compared: informativeness-based selection and feature-space clustering. The informativeness score ranks candidates by grayscale contrast, intensity range, gradient magnitude, entropy, dark-channel variation, and saturation variation, and discourages nearby duplicate patches through a minimum 12-pixel center-distance constraint; whereas the clustering-based approach employs K-Means to partition patch descriptors into clusters and select examples closest to the cluster centers.
Table V shows that neither strategy consistently dominates. On SOTS-Outdoor, clustering improves the hybrid variant from 24.87 to 25.13 dB and the CNN variant from 23.74 to 24.01 dB, while the ViT variant decreases slightly. On HSTS, informativeness-based selection generally gives stronger SSIM and often stronger PSNR; the hybrid variants achieve nearly identical PSNR (23.36 versus 23.37 dB) but different SSIM (0.916 versus 0.910). These results suggest that patch representativeness and local informativeness capture complementary aspects of the reference distribution, with their usefulness depending on both the representation and dataset.
TABLE VI ANALYSIS OF DIFFERENT NUMBERS OF REFERENCE IMAGES.
| Method | #References | SOTS-Outdoor | HSTS | ||
|---|---|---|---|---|---|
| PSNR | SSIM | PSNR | SSIM | ||
| DehazeTab | 5 | 24.71 | 0.940 | 23.45 | 0.918 |
| DehazeTab | 5 | 23.74 | 0.898 | 23.27 | 0.893 |
| DehazeTab | 5 | 23.06 | 0.884 | 21.18 | 0.858 |
| DehazeTab | 5 | 24.87 | 0.942 | 23.36 | 0.916 |
| DehazeTab | 7 | 24.79 | 0.942 | 23.38 | 0.919 |
| DehazeTab | 7 | 24.06 | 0.903 | 23.49 | 0.904 |
| DehazeTab | 7 | 23.13 | 0.885 | 20.94 | 0.866 |
| DehazeTab | 7 | 24.99 | 0.944 | 23.51 | 0.924 |
| DehazeTab | 10 | 25.10 | 0.946 | 24.84 | 0.934 |
| DehazeTab | 10 | 24.27 | 0.910 | 24.17 | 0.915 |
| DehazeTab | 10 | 23.28 | 0.890 | 21.58 | 0.883 |
| DehazeTab | 10 | 25.08 | 0.946 | 24.76 | 0.934 |
- Effect of the Number of Reference Images: Different numbers of retrieved references are tested, , with 100 patches per image (). This controls contextual diversity and table size while keeping the remaining pipeline unchanged. As shown in Table VI, increasing the reference count generally benefits restoration, particularly on HSTS. For example, DehazeTab improves from 23.45/0.918 with five references to 24.84/0.934 with ten, while DehazeTab improves from 23.36/0.916 to 24.76/0.934. On SOTS-Outdoor, the corresponding gains are smaller. Handcrafted features increase from 24.71 to 25.10 dB and hybrid features from 24.87 to 25.08 dB. Accordingly, five references
TABLE VII ANALYSIS OF DIFFERENT NUMBERS OF PATCHES PER IMAGE.
| Method | #Patches | SOTS-Outdoor | HSTS | ||
|---|---|---|---|---|---|
| PSNR | SSIM | PSNR | SSIM | ||
| DehazeTab | 50 | 24.33 | 0.934 | 22.82 | 0.900 |
| DehazeTab | 50 | 23.49 | 0.890 | 23.36 | 0.883 |
| DehazeTab | 50 | 22.96 | 0.885 | 20.89 | 0.851 |
| DehazeTab | 50 | 24.36 | 0.934 | 23.10 | 0.902 |
| DehazeTab | 100 | 24.71 | 0.940 | 23.45 | 0.918 |
| DehazeTab | 100 | 23.74 | 0.898 | 23.27 | 0.893 |
| DehazeTab | 100 | 23.06 | 0.884 | 21.18 | 0.858 |
| DehazeTab | 100 | 24.87 | 0.942 | 23.36 | 0.916 |
| DehazeTab | 150 | 25.03 | 0.942 | 23.28 | 0.913 |
| DehazeTab | 150 | 24.12 | 0.908 | 23.35 | 0.896 |
| DehazeTab | 150 | 23.12 | 0.885 | 21.05 | 0.860 |
| DehazeTab | 150 | 25.23 | 0.944 | 23.29 | 0.914 |
are retained as the default to maintain a comparatively compact inference context, while ten references provide an effectiveness-oriented alternative.
-
Effect of the Number of Patches per Reference: To assess contextual density, multiple numbers of selected patches per reference are examined, , using five references (). Table VII indicates that larger patch sets improve SOTS-Outdoor PSNR for the handcrafted, CNN, and hybrid representations, with the hybrid variant rising from 24.36 dB at 50 patches to 25.23 dB at 150. However, the HSTS results do not show the same trend, handcrafted and hybrid variants reach their highest PSNR at 100 patches, whereas CNN reaches its highest PSNR at 50 patches. Thus, increasing contextual density can add useful examples but may also introduce redundancy or less relevant patches. The default setting of 100 patches thus provides a reasonable trade-off across the two evaluated datasets.
-
Inference Time: Table VIII compares the per-image processing time of DehazeTab{Variant,FeatureDim} under different numbers of selected patches (P) and reference images (R). The reported time measures the entire per-image processing pipeline including query-image feature extraction, reference retrieval, TabPFN initialization and prediction, transmission reconstruction, atmospheric-light estimation, and haze-free image recovery. Initial feature-encoder loading and offline table data preparation are excluded.
At the smallest context size (, , 250 rows), DehazeTab requires 2.718 s, compared with 1.930 s for DehazeTab and 2.124 s for DehazeTab. Although handcrafted features have lower dimensionality, their extraction involves computing multiple texture statistics for individual patches. In contrast, the CNN and ViT variants obtain patch representations from whole-image encoder feature maps. The resulting difference in query-feature extraction overhead can outweigh the benefit of a smaller tabular input when the context is limited. The hybrid variant, which combines handcrafted descriptors with CNN embeddings, has the highest time at this setting (3.155 s).
As the context grows, the relative cost shifts toward TabPFN processing. With , increasing from 5 to 10 (500 to
TABLE VIII ANALYSIS OF INFERENCE TIME WITH DIFFERENT CONFIGURATIONS (IN SECONDS).
| #Patches (P) | 50 | 100 | 100 | 100 | 150 |
|---|---|---|---|---|---|
| #References (R) | 5 | 5 | 7 | 10 | 5 |
| #Context Rows | 250 | 500 | 700 | 1000 | 750 |
| DehazeTab | 2.718 | 3.151 | 3.286 | 3.352 | 3.248 |
| DehazeTab | 1.930 | 2.683 | 3.978 | 5.854 | 4.238 |
| DehazeTab | 2.124 | 3.186 | 4.621 | 6.714 | 4.896 |
| DehazeTab | 3.155 | 4.338 | 5.601 | 7.879 | 5.677 |

Fig. 6. Inference time comparison with different configurations.
1000 context rows) changes the processing time from 3.151 to 3.352 s for DehazeTab , but from 2.683 to 5.854 s for DehazeTab , from 3.186 to 6.714 s for DehazeTab , and from 4.338 to 7.879 s for DehazeTab . This trend is consistent with the greater computational demands of higher-dimensional inputs during TabPFN preprocessing and in-context regression, although the end-to-end measurements do not isolate the contribution of each stage. Increasing P from 100 to 150 at R = 5 similarly raises the context size from 500 to 750 rows and increases runtime for all variants. Overall, handcrafted features exhibit the most favorable runtime scaling as contextual data increase, while the hybrid representation incurs the largest processing cost. These results highlight a trade-off between feature richness, restoration quality, and end-to-end computational efficiency. Figure 6 visually illustrates the quantitative results reported in Table VIII.
E. Discussion and Limitations
In summary, the results demonstrate that image-derived structured features can support competitive transmission estimation through a pretrained TFM without dehazing-specific weight updates. The unexpectedly strong performance of handcrafted descriptors highlights the value of haze-aware inductive biases, whereas the mixed benefits of CNN, ViT, and hybrid representations caution against assuming that increasingly complex features automatically improve low-level restoration. The ablations further reveal that contextual reference selection is integral to the approach: the number, diversity, and relevance of examples can materially change reconstruction quality.
On the other hand, several limitations remain. First, transmission targets depend on an estimated atmospheric light and on the atmospheric scattering model, so inaccuracies in these components can propagate into the reconstruction. Second, patch-level scalar predictions may lose fine spatial variation, particularly in dense or spatially nonuniform haze. Finally, in-context inference requires storing and retrieving labeled reference patches, and its computational cost depends on context size and feature extraction.
V. CONCLUSIONS
This paper introduces DehazeTab, a framework that investigates single-image dehazing from the perspective of in-context tabular inference. By reformulating atmospheric transmission estimation as patch-level structured regression, DehazeTab enables a pretrained TFM to predict transmission values from contextual examples without task-specific model training. Experimental results demonstrate the feasibility of this formulation and provide several insights. Handcrafted haze-related features consistently outperform pretrained visual embeddings, highlighting the importance of physically meaningful local information for transmission estimation. CNN-based embeddings outperform ViT-based representations, suggesting that local spatial cues may be more relevant than global context in this setting. Hybrid features offer modest improvements, while ablation studies further reveal the influence of contextual reference and patch sampling on restoration quality.
Although DehazeTab remains limited by its dependence on contextual examples and the challenges of estimating transmission under complex scenes, the findings demonstrate the potential of TFMs beyond conventional tabular prediction. Rather than pursuing state-of-the-art performance, this study provides a preliminary investigation into reformulating low-level vision problems as structured in-context regression, opening opportunities for research on more effective representations, inference strategies, and broader applications.
REFERENCES
[1] K. He, J. Sun, and X. Tang, “Single image haze removal using dark channel prior,” IEEE transactions on pattern analysis and machine intelligence, vol. 33, no. 12, pp. 2341–2353, 2010.
[2] P. Ling, H. Chen, X. Tan, Y. Jin, and E. Chen, “Single image dehazing using saturation line prior,” IEEE Transactions on Image Processing, vol. 32, pp. 3238–3253, 2023.
[3] B. Cai, X. Xu, K. Jia, C. Qing, and D. Tao, “Dehazenet: An end-to-end system for single image haze removal,” IEEE Transactions on Image Processing, vol. 25, no. 11, pp. 5187–5198, 2016.
[4] B. Li, X. Peng, Z. Wang, J. Xu, and D. Feng, “Aod-net: All-in-one dehazing network,” in Proceedings of the IEEE International Conference on Computer Vision, 2017, pp. 4770–4778.
[5] X. Qin, Z. Wang, Y. Bai, X. Xie, and H. Jia, “Ffa-net: Feature fusion attention network for single image dehazing,” in Proceedings of the AAAI Conference on Artificial Intelligence, vol. 34, no. 07, 2020, pp. 11908–11915.
[6] L.-A. Tran and D.-C. Park, “Encoder-decoder networks with guided transmission map for effective image dehazing,” The Visual Computer, vol. 41, no. 1, pp. 359–382, 2025.
[7] Y. Song, Z. He, H. Qian, and X. Du, “Vision transformers for single image dehazing,” IEEE Transactions on Image Processing, vol. 32, pp. 1927–1941, 2023.
[8] S. Zhao, L. Zhang, Y. Shen, and Y. Zhou, “Refinednet: A weakly supervised refinement framework for single image dehazing,” IEEE Transactions on Image Processing, vol. 30, pp. 3391–3404, 2021.
[9] Z. Chen, Y. Wang, Y. Yang, and D. Liu, “Psd: Principled synthetic-to-real dehazing guided by physical priors,” in Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, 2021, pp. 7180–7189.
[10] Y. Dong, Y. Li, Q. Dong, H. Zhang, and S. Chen, “Semi-supervised domain alignment learning for single image dehazing,” IEEE Transactions on Cybernetics, vol. 53, no. 11, pp. 7238–7250, 2023.
[11] B. Li, Y. Gou, J. Z. Liu, H. Zhu, J. T. Zhou, and X. Peng, “Zero-shot image dehazing,” IEEE Transactions on Image Processing, vol. 29, pp. 8457–8466, 2020.
[12] B. Li, Y. Gou, S. Gu, J. Z. Liu, J. T. Zhou, and X. Peng, “You only look yourself: Unsupervised and untrained single image dehazing neural network,” International Journal of Computer Vision, vol. 129, no. 5, pp. 1754–1767, 2021.
[13] L.-A. Tran, “Unpaired image dehazing via kolmogorov-arnold transformation of latent features,” Pattern Recognition, p. 113304, 2026.
[14] J. Gardner, J. C. Perdomo, and L. Schmidt, “Large scale transfer learning for tabular data via language modeling,” in Advances in Neural Information Processing Systems, vol. 37, 2024.
[15] V. Thomas, J. Ma, R. Hosseinzadeh, K. Golestan, G. Yu, M. Volkovs, and A. Caterini, “Retrieval & fine-tuning for in-context tabular models,” in Advances in Neural Information Processing Systems, vol. 37, 2024.
[16] N. Hollmann, S. Müller, L. Purucker, A. Krishnakumar, M. Körfer, S. B. Hoo, R. T. Schirrmeister, and F. Hutter, “Accurate predictions on small data with a tabular foundation model,” Nature, vol. 637, no. 8045, pp. 319–326, 2025.
[17] K. He, J. Sun, and X. Tang, “Guided image filtering,” IEEE transactions on pattern analysis and machine intelligence, vol. 35, no. 6, pp. 1397–1409, 2012.
[18] L.-A. Tran, D. Kwon, and D.-C. Park, “Single image dehazing via regional saturation-value translation,” Procedia Computer Science, vol. 237, pp. 517–524, 2024.
[19] L.-A. Tran, S. Moon, and D.-C. Park, “A novel encoder-decoder network with guided transmission map for single image dehazing,” Procedia Computer Science, vol. 204, pp. 682–689, 2022.
[20] L.-A. Tran and D.-C. Park, “Distilled pooling transformer encoder for efficient realistic image dehazing,” Neural Computing and Applications, vol. 37, no. 6, pp. 5203–5221, 2025.
[21] A. Dosovitskiy, L. Beyer, A. Kolesnikov, D. Weissenborn, X. Zhai, T. Unterthiner, M. Dehghani, M. Minderer, G. Heigold, S. Gelly, J. Uszkoreit, and N. Houlsby, “An image is worth words: Transformers for image recognition at scale,” in International Conference on Learning Representations (ICLR), 2021.
[22] G. Meng, Y. Wang, J. Duan, S. Xiang, and C. Pan, “Efficient image dehazing with boundary constraint and contextual regularization,” in Proceedings of the IEEE International Conference on Computer Vision, 2013, pp. 617–624.
[23] N. H. Kaplan, “Real-world image dehazing with improved joint enhancement and exposure fusion,” Journal of Visual Communication and Image Representation, vol. 90, p. 103720, 2023.
[24] J. Li, Y. Li, L. Zhuo, L. Kuang, and T. Yu, “Usid-net: Unsupervised single image dehazing network via disentangled representations,” IEEE Transactions on Multimedia, vol. 25, pp. 3587–3601, 2022.
[25] H. Li, J. Gao, Y. Zhang, M. Xie, and Z. Yu, “Haze transfer and feature aggregation network for real-world single image dehazing,” Knowledge-Based Systems, vol. 251, p. 109309, 2022.
[26] A. Yang, Y. Liu, J. Wang, X. Li, J. Cao, Z. Ji, and Y. Pang, “Visual-quality-driven unsupervised image dehazing,” Neural Networks, vol. 167, pp. 1–9, 2023.
[27] T. Jia, J. Li, L. Zhuo, and J. Zhang, “Self-guided disentangled representation learning for single image dehazing,” Neural Networks, vol. 172, p. 106107, 2024.
[28] J. Li, L. Kuang, J. Jin, L. Zhuo, and J. Zhang, “Hdud-net: Heterogeneous decoupling unsupervised dehaze network,” Neural Computing and Applications, vol. 36, no. 6, pp. 2695–2711, 2024.
[29] Y. Wang, X. Yan, F. L. Wang, H. Xie, W. Yang, X.-P. Zhang, J. Qin, and M. Wei, “Ucl-dehaze: Toward real-world image dehazing via unsupervised contrastive learning,” IEEE Transactions on Image Processing, vol. 33, pp. 1361–1374, 2024.
[30] B. Li, W. Ren, D. Fu, D. Tao, D. Feng, W. Zeng, and Z. Wang, “Benchmarking single-image dehazing and beyond,” IEEE Transactions on Image Processing, vol. 28, no. 1, pp. 492–505, 2019.