{
  "File Number": "1033",
  "Title": "Adaptive Denoising via GainTuning",
  "7 Limitations": "As shown in Section 5, GainTuning improves the state of the art on benchmark datasets, adapts well to out-of-distribution noise and image content, and outperforms all existing methods on an application to real world electron-microscope data. A crucial component in the success of GainTuning is restricting the parameters that are optimized at test time. However, this constraint also limits the potential improvement in performance one can achieve, as seen when fine-tuning for test images from the Urban100 and IUPR datasets, each of which contain many images with highly repetitive structure. In these cases, we observe that fine-tuning all parameters, and even training only on the test data using Self2Self can outperform GainTuning. This raises the question of how to effectively leverage training datasets for such images.\nIn addition, when the pre-trained denoiser is highly optimized, and the test image is within distribution, GainTuning occasionally causes a slight degradation of performance. This is atypical (3 occurrences in 412 GainTuning experiments using DnCNN and SURE), and the decreases are quite small (maximum PSNR degradation of about 0.02dB, compared to maximum improvement of nearly 12dB; see Figure 14).",
  "Reviewer Comment": "Reviewer_1: It would be better if the paper presents qualitative analysis on real noisy images\nCould authors explain why the improvements are minor in the table3 and table 4\nIt would be better if the paper presents changes in runtime and parameter comparisons due to GainTuning.\nIs there any specific reason for why in the GainTunning only multiplicative scaling parameters are used why not other types of parameters?\nLimitations And Societal Impact:\nNone\nEthical Concerns:\nNone\nNeeds Ethics Review: No\nEthics Review Area: I don’t know\nTime Spent Reviewing: 3\n\nReviewer_2: I think there are two issues. One is the lack of explanation as to why the proposed method should work. The other is insufficient experimental comparisons.\nThe study extends existing studies with their optimization procedures. The extension is to confine the parameters optimized in the fine-tuning stage to the multiplicative scalars of the channels of the layers. The authors state that the existing methods suffer from overfit and employ several remedies to avoid it. They then claim that optimizing much fewer parameters leads to better results than the existing methods.\nTwo questions then arise. Although it is reasonable that optimizing fewer parameters will contribute to avoiding overfitting, it is unclear why the method should work. Why does optimizing the “gaining parameters” help generalize to novel input distribution? Why isn’t the “regularization” too strong? Without a reasonable explanation, the paper is better regarded as a report of an empirical finding.\nAnother question is concerned with the experimental validation. GainTuning shares the application scenario (i.e., either scratch-training a model or fine-tuning a pretrained-model on a test image without label) with many recent methods. Then, it will be necessary to compare against the best-performing method w/o GainTuning. For instance, only Self2Self is considered in the experiments of Fig.3 of Table SM4 etc., but there are several others in the category of self-supervised training a model on an input image. Table SM4 shows the method is worse than Self2Self; it will be worse than more recent methods.\nMoreover, we may regard the method as a regularization method. As the authors also state (ll87), the previous studies employ early stopping [52] or a special architecture [56]. There will be many more standard regularization methods that can be performed during the fune-tuning. It may also be necessary to compare with them.\nLimitations And Societal Impact:\nWe first need clarify the contribution of the study. See above.\nNeeds Ethics Review: No\nTime Spent Reviewing: 4\n\nReviewer_3: Originality: The work is a combination of known techniques, however with limited novelty. To some extent it differs from other methods by the set of parameters it chooses to learn at test time.\nQuality: The submission is technically sound but lacks theoretical analysis/justification and somewhat in terms of the experimental results provided in the main manuscript. Some experimental details also need to be added (see comments).\nClarity: The submission is clearly written and well organized but could benefit from extended details around the ‘gain’ parameters that are manipulated for various methods. There are also a few typos (see comments).\nSignificance: The submission does address a difficult task but the importance of the results is limited and the advancement of the state of the art not demonstrable.\nFor in-distribution data, the majority of improvements are smaller than 0.03dB-0.04dB on the BSD68 dataset which is the main benchmark for the BSD400 training set. And such an improvement would be expected since the method is an incremental fine-tuning over pre-trained models.\nFor out-of-distribution noise, simply using the original denoiser pretrained blindly (full range of noise levels up to 100) is better than using the proposed method (which also requires some extra test time optimization). And similarly using the bias free model of [35] is also better.\nFor out-of-distribution data, the chosen settings are not very relevant. Urban/natural images are easily obtainable and AWGN is easy to synthesize, so models can be easily pretrained on these distributions. Piecewise constant images as well. The improvements here are more interesting, up to 0.71dB for natural images to scanned documents for instance, however, please add the information on the pretrained model that was used and how it was fine-tuned.\nThe application to TEM is the most interesting one in my opinion as it comes close to what can be needed in real applications, but it is lightly addressed in the main manuscript. Conclusions are drawn based on one shown visual example and we have no quantitative measures.\nIs GainTuning done exactly the same way for all experiments? For all denoiser networks?\nCan you provide more results on real image denoising where ground-truth cannot be easily obtained (unlike AWGN)? For instance microscopy imaging.\nLastly, as the authors rightfully mention in their limitations, choosing to fine-tune the gains, or any other subset of parameters, is quite arbitrary, and because the authors provide little support for why they made that choice, the theoretical justification is less strong. How many parameters should be fine-tuned and where is the limit between overfitting and adaptation, is in fact a key question. The whole concept of a “prior” learned from a distribution is questioned by methods that adapt to test images and this should not be taken lightly when merging “prior-based methods” and “self-supervised” methods that work at test time. It would be interesting if the authors look into denoising (or any image restoration) methods that study blind denoising, and priors in denoising. Mixing this with self-supervised techniques is not straight-forward from a theoretical ground. As it stands, the paper exploits an interesting idea but develops it in a somewhat empirical manner, which to me is the main weakness next to the experiments provided in the main manuscript.\nComments:\nFigure 4 (Sec 5.2 & 5.3), all your comparisons are against a “pre-trained CNN” denoiser, please specify exactly which denoiser it is, and how it was trained, this information is critical there.\nTypo: Figure 4 caption “on test imageS with noise outside”\nTypo: L201: “(see Figure 4 and)” there is something missing, you say comparison to pretrained denoisers (plural) while there is only one in Fig 4, so I assume the ‘and’ should refer to SM there.\nTypo: L277 “for different architectureS”\nSec 5.2 Why is the ‘gold-standard’ a blind model, rather than a model trained on the same noise level as the test noise level for instance?\nLimitations And Societal Impact:\nAdequately addressed.\nEthical Concerns:\nno\nNeeds Ethics Review: No\nTime Spent Reviewing: 3h\n\nReviewer_4: The idea is simple and easy to understand. However, I have the following concerns:\nI think one crucial usage for training a denoising network in an unsupervised way is for the noises whose distributions are unknown. For Gaussian noises with unknown noise levels, we can simply train a network to cover a large range of variance and achieve good performance which is shown in the first table in Fig. 4. However, almost all the experiments are for removing Gaussian noises except for the atomic-resolution transmission electron microscope image. There is plenty of real nature image denoising datasets currently, the authors should validate their method in these datasets.\nThe improvement of the proposed method is marginal. In Fig. 3, the differences between 'Pre-trained' with 'GainTunning' are at most 0.12dB and most of the improvements are less than 0.1dB. As to Fig.4, 'Gaintunning' does not perform better than 'Trained on [0,100]'. Even though 'Gaintunning' performs better than 'Pre-trained', the comparison is unfair. Since 'Pre-trained' is trained with smaller noise variance.\nTo avoid overfitting during finetune, the authors propose to use GainTunning. However, there are many other ways to only adjust fewer parameters in the network. For example, we can only finetune some layers in the network. Can the authors explain why GainTunning is the best choice? Also, can the authors provide some visual results to demonstrate how Gain Tunning works after finetuning?\nSec. 4 is not relevant to this paper. These losses are proposed by existing arts. Also, the authors do not analyze the pros and cons of these losses in the proposed method.\nIn Ln. 177, should '(3)' be '(2)'?\nLimitations And Societal Impact:\nyes\nNeeds Ethics Review: No\nTime Spent Reviewing: 2h",
  "abstractText": "Deep convolutional neural networks (CNNs) for image denoising are typically trained on large datasets. These models achieve the current state of the art, but they do not generalize well to data that deviate from the training distribution. Recent work has shown that it is possible to train denoisers on a single noisy image. These models adapt to the features of the test image, but their performance is limited by the small amount of information used to train them. Here we propose “GainTuning”, a methodology by which CNN models pre-trained on large datasets can be adaptively and selectively adjusted for individual test images. To avoid overfitting, GainTuning optimizes a single multiplicative scaling parameter (the “Gain”) of each channel in the convolutional layers of the CNN. We show that GainTuning improves state-of-the-art CNNs on standard image-denoising benchmarks, boosting their denoising performance on nearly every image in a held-out test set. These adaptive improvements are even more substantial for test images differing systematically from the training data, either in noise level or image type. We illustrate the potential of adaptive GainTuning in a scientific application to transmission-electronmicroscope images, using a CNN that is pre-trained on synthetic data. In contrast to the existing methodology, GainTuning is able to faithfully reconstruct the structure of catalytic nanoparticles from these data at extremely low signal-to-noise ratios.",
  "Unlabeled Sections": "Deep convolutional neural networks (CNNs) for image denoising are typically trained on large datasets. These models achieve the current state of the art, but they do not generalize well to data that deviate from the training distribution. Recent work has shown that it is possible to train denoisers on a single noisy image. These models adapt to the features of the test image, but their performance is limited by the small amount of information used to train them. Here we propose “GainTuning”, a methodology by which CNN models pre-trained on large datasets can be adaptively and selectively adjusted for individual test images. To avoid overfitting, GainTuning optimizes a single multiplicative scaling parameter (the “Gain”) of each channel in the convolutional layers of the CNN. We show that GainTuning improves state-of-the-art CNNs on standard image-denoising benchmarks, boosting their denoising performance on nearly every image in a held-out test set. These adaptive improvements are even more substantial for test images differing systematically from the training data, either in noise level or image type. We illustrate the potential of adaptive GainTuning in a scientific application to transmission-electronmicroscope images, using a CNN that is pre-trained on synthetic data. In contrast to the existing methodology, GainTuning is able to faithfully reconstruct the structure of catalytic nanoparticles from these data at extremely low signal-to-noise ratios.",
  "1 Introduction": "Like many problems in image processing, the recovery of signals from noisy measurements has been revolutionized by the development of convolutional neural networks (CNNs) [66, 8, 67]. These models are typically trained on large databases of images, either in a supervised [37, 66, 8, 68, 67] or an unsupervised fashion [62, 3, 27, 29]. Once trained, these solutions are evaluated on noisy test images. This approach achieves state-of-the-art performance when the test images and the training data belong to the same distribution. However, when this is not the case, the performance of these models is often substantially degraded [59, 37, 68]. This is an important limitation for many practical applications, in which it is challenging (or even impossible) to gather a training dataset that is comparable in noise and signal content to the images encountered at test time. Overcoming this limitation requires adaptation to the test data.\nA recent unsupervised method (Self2Self) has shown that CNNs can be trained exclusively on individual test images, producing impressive results [46]. Despite this, the performance of Self2Self is limited by the small amount of available training information, and is generally inferior to CNN models trained on large databases.\n35th Conference on Neural Information Processing Systems (NeurIPS 2021).\nIn this work, we propose GainTuning, a framework to bridge the gap between models pre-trained on large datasets, and models trained exclusively on test images. In the spirit of two recent methods [55, 59], GainTuning adapts pre-trained CNN models to individual test images by minimizing an unsupervised denoising cost function, thus fusing the generic capabilities obtained from the training data with specific refinements matched to the structure of the test data. Rather than adapt the full parameter set (filter weights and additive constants) to the test image, GainTuning instead optimizes a single multiplicative scaling parameter (the “Gain”) for each channel within each layer of the CNN. The dimensionality of this reduced parameter set is a small fraction (⇡ 0.1% in our examples) of that of the full parameter set. We demonstrate through extensive examples that this prevents overfitting to the test data. The GainTuning procedure is general, and can be applied to any CNN denoising model, regardless of the architecture or pre-training process.\nOur contributions. GainTuning provides a novel method for adapting CNN denoisers trained on large datasets to a single test image. GainTuning improves state-of-the-art CNNs on standard imagedenoising benchmarks, boosting their denoising performance on nearly every image in held-out test sets. Performance improvements are even more substantial when the test images differ systematically from the training data. We showcase this ability through controlled experiments in which we vary the distribution of the noise and image structure of the test data. Finally, we evaluate GainTuning in a real scientific-imaging application where adaptivity is crucial: denoising transmission-electronmicroscope data at extremely low signal-to-noise ratios. As shown in Figure 2, both CNNs pre-trained on simulated images and CNNs trained only on the test data produce denoised images with substantial artefacts. In contrast, GainTuning achieves effective denoising, accurately revealing the atomic structure in the real data.",
  "2 Related Work": "Denoising via deep learning. In the last five years, CNN-based methods have clearly outperformed previous state-of-the-art denoising methods [13, 53, 6, 45, 14, 21, 10]. Denoising CNNs are typically trained in a supervised fashion, minimizing mean squared error (MSE) over a large database of example ground-truth clean images and their noisy counterparts [66, 37, 8]. Unsupervised methods have also been developed, which do not rely on ground-truth images. There are two main strategies to achieve this: use of an empirical Bayes objective, such as Stein’s unbiased risk estimator (SURE) [13, 33, 48, 36, 55, 56], and architectural “blind-spot” methods [27, 29, 3, 62] (see Section 4 for a more detailed description).\nGeneralization to out-of-distribution noise. Previous studies have shown that CNN denoisers fail to generalize when the noise encountered at test time differs from that of the training data [68, 37]. Ref. [37] proposes the use of a modified CNN architecture without additive bias terms, which is able to generalize to noise with variance well beyond that encountered in the training set. Here, we show\n(a) Noisy image (b) Unsupervised training only on (a) [46] (c) Supervised training on simulated data [38] (d) GainTuning on CNN trained on sim. data (c) (e) Estimated reference image\nthat augmenting a generic architecture with GainTuning yields comparable performance to removing bias.\nGeneralization to out-of-distribution images. In order to adapt CNNs to operate on test data with characteristics differing from the training set, recent publications propose fine-tuning the networks using an additional training dataset that is more aligned with the test data [59, 18]. This is a form of transfer learning, a popular technique in classification problems [12, 64]. However, it is often challenging to obtain relevant additional training data. Here, we show that GainTuning can adapt CNN denoisers to novel test images.\nFeature normalization. Normalization techniques such as batch normalization (BN) [23] are a standard component of deep CNNs. BN consists of two stages: (1) centering and normalizing the features corresponding to each channel, (2) scaling and shifting the normalized features using two learned parameters per channel (a scaling factor and a shift). The scaling parameter is analogous to the gain parameter introduced in GainTuning. However, in BN this parameter is adjusted during training and fixed during test time, whereas GainTuning adjusts it adaptively, for each test image.\nGain normalization. Motivated by gain control properties observed in biological sensory neurons [5], adaptive local normalization of response gains has been previously applied in object recognition [24], density estimation [1], and compression [2]. In contrast to these approaches, which adjust gains based on local responses, GainTuning adjusts a global gain for each channel by optimizing an unsupervised objective function.\nAdapting CNN denoisers to test data. Two recent publications have developed methods of adapting CNN denoisers to test data [56, 59]. Ref. [56] include the noisy test images in the training set. In a recent extension, the authors fine-tune a pre-trained CNN on a single test image using the SURE cost function [55]. Ref. [59] does the same using a novel cost function based on noise resampling (see Section 4 for a detailed description). As shown in Section E fine-tuning the full set of CNN parameters using only a single test image can lead to overfitting. Ref. [55] avoids this using early stopping, selecting the number of fine-tuning steps beforehand. Ref. [59] uses a specialized architecture with a reduced number of parameters. Here, we show that several unsupervised cost functions can be used to perform adaptation without overfitting, as long as we only optimize a subset of the model parameters (specifically, the gain of each channel).\nAdjustment of channel parameters to improve generalization in other tasks. Adjustment of channel parameters, such as gains and biases, has been shown to improve generalization in multiple machine-learning tasks, such as the vision-language problems [43, 11], image generation [7], style transfer [17], and image restoration [20]. In these methods, the adjustment is carried out while training the model by minimizing a supervised cost function. In image classification, recent studies have proposed performing adaptive normalization [25, 41, 51] and optimization [61] of channel parameters during test time, in the same spirit as GainTuning.",
  "3 Proposed Methodology: GainTuning": "In this section we describe the GainTuning framework. Let f✓ be a CNN denoiser parameterized by weight and bias parameters, ✓. We assume that we have available a training database and a test image ytest that we aim to denoise. First, the networks parameters are optimized on the training database\n✓pre-trained = argmin ✓\nX\ny2training database Lpre-training(y, f✓(y)). (1)\nThe cost function Lpre-training used for pre-training can be supervised, if the database contains clean and noisy examples, or unsupervised, if it only contains noisy data.\nA direct method of adapting the pre-trained CNN to the test data is to finetune all the parameters, as is done in all prior work on test-time adaptation [59, 55, 18]. Unfortunately this can lead to overfitting the test data (see Section E). Due to the large number of degrees of freedom, the model is able to minimize the unsupervised cost function without denoising the noisy test data effectively. This can be avoided to some extent by employing CNN architectures with a small number of parameters [59], or by only optimizing for a short time (“early stopping”) [55]. Unfortunately, using a CNN with reduced parameters can limit performance (see Section 5), and it is unclear how to choose a single criterion for early stopping that can operate correctly for all test images. Here, we propose a different strategy: tuning a single parameter (the gain) in each channel of the CNN. GainTuning can be applied to any pre-trained CNN.\nWe denote the gain parameter of the cth channel of the the lth layer as [l, c], and the conventional parameters of that channel by ✓pre-trained[l, c] (a vector containing the filter weights). The adapted GainTuning parameters are the product of these:\n✓GainTuning( )[l, c] = [l, c] ✓pre-trained[l, c]. (2)\nWe estimate the gains by minimizing an unsupervised loss that only depends on the noisy image:\n̂ = argmin LGainTuning(ytest, ✓GainTuning( )) (3)\nThe final denoised image is f✓GainTuning(̂)(ytest). Section 4 describes several possible choices for the cost function LGainTuning. Since we use only one scalar parameter per channel, the adjustment performed by GainTuning is very low-dimensional (⇡ 0.1% of the dimensionality of ✓). This makes optimization quite efficient, and prevents overfitting (see Section E). Further, in Section E we show that performing GainTuning provides better performance when compared to fine-tuning only the last few layers of the pre-trained network.",
  "4 Cost Functions for GainTuning": "A critical element of GainTuning is the use of an unsupervised cost function, which is minimized in order to adapt the pre-trained CNN to the test data. Here, we describe three different choices, each of which are effective for the GainTuning framework, but which have different benefits and limitations.\nBlind-spot loss. This loss measures the ability of the denoiser to reproduce the noisy observation, while excluding the identity solution. To achieve this, the CNN must estimate the jth pixel yj of the noisy image y as a function of the other pixels y{j}c , excluding the pixel itself. As long as the noise degrades pixels independently, the network to learn a nontrivial denoising function that exploits the relationships between pixels arising from the underlying clean image(s). The resulting loss can be written as\nLblind-spot(y, ✓) = E ⇥ (f✓(y{j}c)j yj)2 ⇤ . (4)\nHere the expectation is over the data distribution and the selected pixel. This “blind spot” can be enforced through architecture design [29], or by masking [3, 27] (see also [46] and [62] for related approaches). The blind-spot loss has a key property that makes it very powerful in practical applications: it makes no assumption about the noise distribution beyond pixel-wise independence. When combined with GainTuning it achieves effective denoising of real electron-microscope data at very low SNRs (see Figure 2 and Section 5.4, F.5).\nStein’s Unbiased Risk Estimator (SURE). Let x be an N -dimensional ground-truth random vector x and let y := x+ n be a corresponding noisy observation, where n ⇠ N (0, 2nI). SURE provides an expression for the MSE between x and a denoised estimate f✓(y), which only depends on the noisy observation y:\nE  1\nN kx f✓(y)k2 = E\n\" 1\nN ky f✓(y)k2 2 +\n2 2\nN\nNX\nk=1\n@(f✓(y)k)\n@yk\n# := LSURE(y, ✓). (5)\nThe last term in Equation 8 is the divergence of f✓, which can be approximated using Monte Carlo techniques [47] (Section D). The divergence is the sum of the partial derivatives of each denoised pixel with respect to the corresponding input pixel. Intuitively, penalizing it forces the denoiser to not rely as heavily on the jth noisy pixel to estimate the jth clean pixel. This is similar to the blind-spot strategy, with the added benefit that the jth noisy pixel is not ignored completely. To further illustrate this connection, consider a linear convolutional denoising function f✓(y) = ✓ ~ y, where the center-indexed parameter vector is ✓ = [✓ k, ✓ k+1, . . . , ✓0, . . . , ✓k 1, ✓k]. The SURE cost function (Equation 8) reduces to\nEn  1\nN ky ✓ ~ yk2\n2 + 2 2✓0 (6)\nThe SURE loss equals the MSE between the denoised output and the noisy image, with a penalty on the “self” pixel. As this penalty is increased, the self pixel will be ignored, so the loss tends towards the blind-spot cost function. When integrated into the GainTuning framework, the SURE loss is limited to additive Gaussian noise, for which it outperforms the blind-spot loss. Extensions of SURE to many other stochastic observation models have been developed [49], and may offer alternative objectives for GainTuning.\nNoise Resampling. Ref. [59] introduced a novel procedure for adaptation which we call noise resampling. Given a pre-trained denoiser f✓ and a test image y, first one obtains an initial denoised image by applying f✓ to y, x̂ := f✓pre-trained(y). This denoised image is then artificially corrupted x̂ by simulating noise from the same distribution as the data of interest to create synthetic noisy examples. Finally, the denoiser is fine-tuned by minimizing the MSE between x̂ and the synthetic examples. If we assume additive noise, the resulting loss is of the form\nLnoise resampling(y, ✓) = En ⇥ k(f✓(x̂+ n) x̂k2 ⇤ . (7)\nNoise resampling is reminiscent of Refs. [40, 63], which add noise to an already noisy image. When integrated in the GainTuning framework, we find the noise-resampling loss results in effective denoising in the case of additive Gaussian noise, although it generally underperforms the SURE loss.",
  "5 Experiments and Results": "We performed three different types of experiment to evaluate the performance of GainTuning Indistribution (test examples held out from the training set); out-of-distribution noise (noise level or distribution of test examples differs from training set); and out-of-distribution signal (test images differ in features or context from the training set). We also apply GainTuning to real data from a transmission electron microscope.\nOur experiments make use of four datasets: The BSD400 natural image database [34] with test sets Set12 and Set68 [66], the Urban100 images of urban environments [22], the IUPR dataset of scanned documents [4], and a set of synthetic piecewise constant images [31] (see Section B). We demonstrate the broad applicability of GainTuning by using it in conjunction with multiple architectures for image denoising: DnCNN [66], BFCNN [37], UNet [50] and Blind-spot net [29] (see Section A). Finally, we compare our results to several benchmarks: (1) models trained on the training database, (3) CNN models adapted by fine-tuning all parameters (as opposed to just the gains), (3) a model trained only on the test data, (4) LIDIA, a specialized architecture and adaptation strategy proposed in [59]. We provide details on training and optimization in Section C.",
  "5.1 GainTuning surpasses state-of-the-art performance for in-distribution data": "Experimental set-up. We use BSD400, a standard natural-image benchmark, corrupted with Gaussian white noise with standard deviation sampled uniformly from [0, 55] (relative to pixel intensity range [0, 255]). Following [66], we evaluate performance on two independent test sets: Set12 and BSD68, corrupted with Gaussian noise with 2 {30, 40, 50}. Comparison to pre-trained CNNs. GainTuning consistently improves the performance of pretrained CNN models. Figure 3 shows this for two different models, DnCNN [66] and UNet [50] (see also Section F.1). The SURE loss outperforms the blind-spot loss, and is slightly better than noise resampling (Table 7). The same holds for other architectures, as reported in Section F.1. On average the improvement is modest, but for some images it is quite substantial (up to 0.3 dB in PSNR for = 30, see histogram in Figure 3).\nComparison to other baselines. GainTuning outperforms fine-tuning based on optimizing all the parameters for different architectures and loss functions (see Section E). GainTuning clearly outperforms a Self2Self model, which is trained exclusively on the test data (Figure 3). It also outperforms the specialized architecture and adaptation process introduced in [59], with a larger gap in performance for higher noise levels.",
  "5.2 GainTuning generalizes to new noise distributions": "Experimental set-up. The same set-up as Section 5.1 is used, except that the test sets are corrupted with Gaussian noise with 2 {70, 80} (both beyond the training range of 2 [0, 55]). Comparison to pre-trained CNNs. Pre-trained CNN denoisers fail to generalize in this setting. GainTuning consistently improves their performance (see Figure 4).\nThe SURE loss again outperforms the blind-spot loss, and is slightly better than noise resampling (see Section F.2). The same holds for other architectures, as reported in Section F.2. The improvement in performance for all images is substantial (up to 12 dB in PSNR for = 80, see histogram in Figure 4).\nComparison to other baselines. GainTuning achieves comparable performance to a gold-standard CNN trained with supervision at all noise levels (Figure 4). GainTuning matches the performance of a bias-free CNN [37] specifically designed to generalize to out-of-distribution noise (Figure 4). GainTuning outperforms fine-tuning based on optimizing all the parameters for different architectures and loss functions (see Section E). GainTuning clearly outperforms a Self2Self model trained exclusively on the test data (Section F.2), and the LIDIA adaptation method [59].\nGaussian to Poisson generalization: Section F.2 and Figure 5 show that GainTuning can effectively adapt a CNN pre-trained for Gaussian noise removal to restore images corrupted with Poisson noise as well.",
  "5.3 GainTuning generalizes to out-of-distribution image content": "Experimental set-up. We evaluate the performance of GainTuning on test images that have different characteristics from the training images. We perform the following controlled experiments:\n(a) Simulated piecewise constant images ! Natural images. We pre-train CNN denoisers on simulated piecewise constant images. These images consists of constant regions (of different intensities values) with the boundaries having varied shapes such as circle and lines with different orientations (see Section B for some examples). Piecewise constant images provide a crude model for natural images [35, 44, 31]. We use GainTuning to adapt a CNN trained on this dataset to generic natural images (Set12). This experiment demonstrates the ability of GainTuning to adapt from a simple simulated dataset to a significantly more complex real dataset.\n(b) Generic natural images ! Images with high self-similarity. We apply GainTuning to adapt a CNN trained on generic natural images to images in Urban100 dataset. Urban100 consists of images of buildings and other structures typically found in an urban setting, which contain substantially more repeating/periodic structure (see Section B) than generic natural images.\n(c) Generic natural images ! Images of scanned documents. We apply GainTuning to adapt a CNN trained on generic natural images to images of scanned documents in IUPR dataset (see Section B).\nAll CNNs were trained for denoising Gaussian white noise with standard deviation 2 [0, 55] and evaluated at = 30.\nComparison to pre-trained CNNs. GainTuning consistently improves the performance of pretrained CNNs in all the three experiments. Figure 4 shows this for DnCNN when GainTuning is based on SURE loss. We obtain similar results with other architectures (see Section F.3). In experiment (a), all test images show substantial improvements over the pre-trained results (average increase of roughly 1.3dB, and best case more than 3 dB, at = 30). We observe similar trends for experiments (b) and (c) as well, with improvements being better on an average for experiment (c). Note that we obtain similar performance increases when both image and noise are out-of-distribution as discussed in Section F.4.\nComparison to other baselines. In experiment (a), GainTuning outperforms methods that optimize all parameters over different architectures and loss functions (Section E). However, Self2Self trained only on test data outperforms GainTuningin this case, because the test images contain content that differs substantially from the training images. Self2Self provides the strongest form of adaptation, since it is trained exclusively on the test image, whereas the denoising properties of GainTuning are partially due to the pretraining (see Sections 7, F.3). We did not evaluate LIDIA [59] for this experiment. For experiments (b) and (c), training all parameters clearly outperforms GainTuning for case (b), but has similar performance for (c). GainTuning outperforms LIDIA on experiments (b) and (c). Self2Self trained exclusively on test data outperforms GainTuning(and LIDIA) on (b) and (c) (see Sections 7, F.3).",
  "5.4 Application to Electron microscopy": "Scientific motivation. Transmission electron microscopy (TEM) is a popular imaging technique in materials science [54, 58]. Recent advancements in TEM enable to image at high frame rates [16, 15]. These images can for example capture the dynamic, atomic-level rearrangements of catalytic systems [57, 19, 30, 32, 9], which is critical to advance our understanding of functional materials. Acquiring image series at such high temporal resolution produces data severely degraded by shot noise. Consequently, there is an acute need for denoising in this domain.\nThe need for adaptive denoising. Ground-truth images are not available in TEM, because measuring at high SNR is often impossible. Prior work has addressed this by using simulated training data [38, 60], whereas others have trained CNNs directly on noisy real data [52].\nDataset. We use the training set of 5583 simulated images and the test set of 40 real TEM images from [38, 60]. The data correspond to a catalytic platinum nanoparticle on a CeO2 support (Section B).\nComparison to pre-trained CNN. A CNN [29] pre-trained on the simulated data fails to reconstruct the pattern of atoms faithfully (green box in Figure 2 (c), (e)). GainTuning applied to this CNN using the blind-spot loss correctly recovers this pattern (green box in Figure 2 (d), (e)) reconstructing the small oxygen atoms in the CeO2 support. GainTuning with noise resampling failed to reproduce the support pattern (probably because it is absent from the initial denoised estimate) (Section F.5).\nComparison to other baselines. GainTuning clearly outperforms Self2Self, which is trained exclusively on the real data. The denoised image from Self2Self shows missing atoms and substantial artefacts (see Section F.5). We also compare GainTuning dataset to blind-spot methods using the 40 test frames [29, 52]. GainTuning clearly outperforms these methods (see Section F.5). Finally, GainTuning outperforms fine-tuning based on optimizing all the parameters, which overfits heavily (see Section E).",
  "6 Analysis": "In this section, we perform a qualitative analysis of the properties of GainTuning.\nWhich images benefit most from GainTuning adaptation? Section G.1 shows the images in the different test datasets for which GainTuning achieves the most and the least improvement in PSNR. The result is quite consistent over multiple architectures: the improvement in performance achieved by GainTuning is larger if the test image contains highly repetitive patterns. This makes intuitive sense; the repetitions effectively provide multiple examples from which to learn these patterns during the unsupervised refinement.\nGeneralization via GainTuning. Section G.2 shows that GainTuning can achieve generalization to images that are similar to the test image used for adaptation.\nHow does GainTuning adapt to out-of-distribution noise? Generalization to out-of-distribution noise provides a unique opportunity to understand how GainTuning modifies the denoising function. Ref. [37] shows that the first-order Taylor approximation of denoising CNNs trained on multiple noise levels tend to have a negligible constant term, and that the growth of this term is the primary culprit for the failure of these models when tested on new noise levels. GainTuning reduces the amplitude of this constant term, facilitating generalization (See Section G.3 for more details).\nHow does GainTuning adapt to out-of-distribution images? Figure 5 shows the result of applying a Bias-free CNN [37] trained on piecewise-constant images to natural images. Due to its learned prior, the CNN averages over large areas, ignoring fine textures. This is apparent in the equivalent linear filters obtained from a local linear approximation of the denoising function [37]. After GainTuning the model is better able to preserve the fine features, which is reflected in the equivalent filters (see Section G.4 for more details).",
  "8 Conclusions": "We’ve introduced GainTuning an adaptive denoising methodology for adaptively fine-tuning a pre-trained CNN denoiser on individual test images. The method, which is general enough to be used with any denoising CNN, improves the performance of state-of-the-art CNNs on standard\ndenoising benchmarks, and provides even more substantial improvements when the test data differ systematically from the training data, either in noise level, noise type, or image type. We demonstrate the potential of adaptive denoising in scientific imaging through an application to electron microscopy. Here, GainTuning is able to jointly exploit synthetic data and test-time adaptation to reconstruct meaningful structure (the atomic configuration of a nanoparticle and its support), which cannot be recovered through alternative approaches. A concrete challenge for future research is to combine the unsupervised denoising strategy of Self2Self, which relies heavily on dropout and ensembling, with pre-trained models. More generally, it is of interest to explore whether GainTuning can provide benefits for other image-processing tasks.\nFinally, we would like to comment on the potential negative societal outcomes of our work. The training of CNN models on large computational clusters contributes to carbon emissions, and therefore global warming. We hope that these effects may be offset to some extent by the potential applications of these approaches to tackle challenges such as global warming. In particular, the catalytic system studied in this work is representative of catalysts used in clean energy conversion and environmental remediation [39, 65, 42].\nAcknowledgments and Disclosure of Funding\nWe gratefully acknowledge financial support from the National Science Foundation (NSF): NSF NRT HDR Award 1922658 partially supported SM. NSF CBET 1604971 supported JLV and PAC, and NSF OAC-1940263 supported RM and PAC. NSF OAC-1940097 and OAC-2103936 supported CFG. Funding from the Simons Foundation supported SM and EPS. Thanks to ASU Research Computing and NYU HPC for high performance computing resources, and the John M. Cowley Center for High Resolution Electron Microscopy at Arizona State University.",
  "Reviewer Summary": "Reviewer_1: The paper proposes an adaptive denoising method that improves the performance of the test images by learning multiplicative scaling parameters for each channel in the CNN network. The paper also presents GainTunning test time adaptation of CNN, by performing the experiments where CNN is trained on synthetic data and adapted to real transmission-electron-microscope images.\n\nReviewer_2: The paper considers image denoising in the problem setting recently proposed in the literature, i.e., fine-tuning a pretrained-model on a test image in an unsupervised fashion. The method modifies the optimization procedure of the fine-tuning.\n\nReviewer_3: The goal of the paper is to adapt pretrained denoisers to denoise new images; novel noise distribution or data distribution. The authors, inspired by self-supervised denoisers and methods using channel manipulation, propose to fine-tune the gain of CNN denoiser channels to the test image. This fine tuning is tried out with multiple known losses.\n\nReviewer_4: This paper proposes a method to finetune the pre-trained denoising network, which is trained in a supervised manner, in an unsupervised way to adapt the network to the tested noisy image. To avoid overfitting, they propose GainTuning which only adjusts each channel in the convolutional layers. The experimental results show that the proposed method can improve the denoising performance of existing supervised trained networks."
}