Noise Flow: Noise Modeling With Conditional Normalizing Flows
Paper · 2019 · Abdelrahman Abdelhamed, Marcus A. Brubaker and Michael S. Brown
Summary
A camera can photograph the same scene repeatedly and produce different readings at the same spot. The size of those deviations depends in part on how much light reaches the sensor and how strongly the camera amplifies its readings. It also depends on the device. A method for removing noise benefits from training examples that reflect these differences. Noise Flow tackles the problem upstream of denoising. It learns a probability distribution for the errors in raw camera measurements, so it can score an observed patch of noise or produce a fresh sample for a given image and capture setting.
The authors start with a Gaussian source of random values and pass those values through a sequence of reversible transformations. One transformation scales noise according to the clean intensity at each location. Another adjusts it for ISO and camera identity. Between and after these adjustments, more flexible operations can learn relationships among the values in a patch. Reversing the sequence allows the authors to evaluate a sample’s probability density and account for how the transformations stretch or compress the space of possible samples. The design adapts operations from Glow and uses fewer than 2500 parameters to cover multiple devices and gain settings.
For each raw photograph in the Smartphone Image Denoising Dataset (SIDD), the authors subtract the corresponding clean reference to isolate the noise. They prepare roughly 500,000 patches and evaluate on held-out patches from cameras and ISO settings represented in training. On this test set, Noise Flow lowers negative log likelihood by 0.69 nats/pixel compared with a fitted constant-variance Gaussian and by 0.42 nats/pixel compared with Gaussian noise based on camera calibration. The authors’ conversion gives likelihood improvements of 99.4% and 51.6%, respectively. Histograms of the generated noise also agree more closely with those of real noise, a comparison that measures the distribution of individual values.
The authors then use the generator to make noisy training images for a DnCNN denoiser. On real photographs in SIDD-Validation, this training condition gives the highest reported peak signal-to-noise ratio and structural similarity among the tested alternatives. It slightly exceeds training on the available real pairs, an edge the authors attribute to the limited supply of those pairs. The denoising experiment shows that synthetic noise drawn from the fitted distribution can be useful for restoration under the conditions studied. The likelihood and histogram comparisons explain different parts of that result’s statistical context, while the denoiser puts the generated samples to a practical test.
Deep dive: Noise Flow: Noise Modeling With Conditional Normalizing Flows
Noise Flow learns how raw camera noise varies with light intensity, ISO, and camera type, then generates noise for training image denoisers. · about 36 minutes to read
The problem and its context
What a camera error distribution needs to describe
Consider a patch of a raw photograph that contains both a dim area and a brighter one. The clean signal is the reading of interest at each location. The measured value contains that signal along with a deviation. A denoiser faced with the measured image has to decide how much of a change between locations belongs to the scene and how much could plausibly have come from the camera. A statistical description of the deviations gives that distinction a concrete meaning. It specifies which departures are typical for a particular signal and which would be unusual.
The paper treats noise as an additive residual. Given a noisy observation and an appropriate clean reference, the deviation is what remains after subtraction. For the authors’ purpose, this residual is the object to describe. Its distribution can be studied separately from the question of what objects the photograph shows. The clean image still matters because it gives the intensities at which the deviations occurred. A simulator can use that information to assign different distributions to different parts of an otherwise fixed image.
The statistical demands go beyond deciding the usual size of an error. Imagine collecting the deviations in a patch and then moving them to different locations. The same set of values is still present, so a count of how frequently each value occurs stays the same. Their relationship to one another and to the underlying signal can change considerably. A distribution over entire noise patches has room to express those relationships. The paper’s examples of phenomena that make them relevant include cross-talk, where noise can be correlated across locations, and fixed-pattern noise, where the sensor can contribute recurring spatial structure.
Camera settings add another source of variation. If gain is applied to a measurement that already contains noise, the deviation is amplified along with the signal. The authors highlight the importance of this effect in low-light imaging, where higher gain is common. They also point out that a camera’s actual gain at a given ISO can depend on the device. A stated ISO and a clean intensity are therefore informative about noise even when they leave other details of the distribution uncertain.
These distinctions matter to a generator as much as to an estimator. A generator takes a clean image and returns a possible disturbance. Repeated draws let a researcher pair the same underlying image with different corrupted observations. This is especially relevant to learning a denoiser, since a useful training pair requires both a noisy input and a clean target. The generator controls which deviations the denoiser encounters during training. An error in the distribution changes the examples from which the denoiser learns what to remove.
The assumptions behind common descriptions
Additive white Gaussian noise is the simplest starting point discussed in the paper. Each pixel receives a random deviation drawn from the same Gaussian, or normal, distribution. The distribution is centered at zero and has a constant variance, a measure of how widely the values are spread. The draws are independent, so the value sampled at one location gives no information about the draw at another. A fit of this kind can estimate an overall scale from data. It has only that scale with which to describe the collection of deviations.
Photon noise motivates a different assumption. Its variance depends on the strength of the signal, so a distribution for it must change when the clean intensity changes. The paper introduces a Poisson expression to represent this dependence. In that construction the signal sets the Poisson rate and a sensor-specific factor scales the random reading. The quantity of interest is the departure of that reading from the underlying signal. The same discussion identifies components whose variation is independent of the signal. A Poisson–Gaussian description combines the two kinds of variation in one expression.
The more commonly used signal-dependent Gaussian approximation discards the Poisson shape in favor of a Gaussian whose variance is a function of intensity. This is called a heteroscedastic Gaussian because its variance can differ across observations. Its noise level function, abbreviated NLF, gives a variance for each clean intensity. The expression has a slope, which governs how fast variance grows with intensity, and an offset, which supplies a contribution independent of intensity. This is a more informative prescription than a constant variance when a patch contains both dim and bright locations.
The NLF also illustrates the distinction between specifying a variance and specifying all the behavior of noise. A simple Gaussian at each location gives a particular shape to the range of possible deviations. An intensity-to-variance rule leaves out how errors at different locations might vary together. Additionally, different locations with the same intensity can behave differently if a sensor has a spatial pattern or defective pixels. The paper also points to clipping, amplification noise and quantization as reasons the observations can depart from the simpler descriptions.
The paper describes earlier attempts to capture some of those departures. A clipped version of the signal-dependent distribution accounts for intensities limited by clipping. A Poisson mixture addresses the tails of the noise distribution, the regions corresponding to more extreme deviations. Each extends the description in a particular direction. The authors also discuss earlier synthesis with a generative adversarial network, where they see a difficulty in assessing the generated noise quantitatively. Their own design gives the probability density of an observed residual a central role in both fitting and comparison.
Why use a reversible transformation?
A normalizing flow represents a complicated distribution by starting with an easy one and moving its samples through reversible operations. The work the authors situate this in includes early density estimation with NICE and the use of flows for Variational Inference with Normalizing Flows. Reversibility lets an observed value be traced to an input of the flow. Differentiability lets the flow account for how a small region of inputs changes size when transformed. Together these properties yield a density for the observations, which can serve as a training objective.
Noise Flow uses this machinery for a conditional distribution. A condition is information held fixed while a random draw is made or evaluated. Here it includes the underlying signal and the camera and ISO information associated with the image. For instance, the same base draw can be sent through the transformations under different capture settings. The transformations then give different residuals because some of their scales depend on those settings. Equally, a real noise patch can be scored against the distribution associated with the conditions under which it was observed.
The paper’s design question is how much structure to specify in advance. Signal dependence and gain have simple relationships that can be built into reversible operations. Other characteristics are harder to specify with a short formula, so the authors give part of the task to transformations learned from data. In this construction the intensity-dependent Gaussian is a special case of the larger family. When a standard Gaussian draw goes through the intensity scaling alone, the result has the variance prescribed by an NLF. With the other operations available, the fitted distribution can express changes in shape and relationships between dimensions as well.
The method, step by step
From the reference image to a noise distribution
The method starts from a pair of raw images of the same scene, a noisy capture and its corresponding clean reference. Subtracting them gives a patch of observed deviations. For training, the authors supply such patches alongside the signal and capture information needed by the conditional layers. The fitting procedure works backward through the layers to determine what base draw would have produced each observed patch. It evaluates that draw under a simple Gaussian and adjusts the density to account for the space occupied by the transformed values.
After fitting, generation runs the layers forward. The input now is a random patch drawn from the Gaussian base. An intensity-dependent scale gives different dimensions of the patch different initial spreads. Reversible learned operations then let the dimensions interact. A gain layer changes the overall scale according to the ISO and the device. Further learned operations transform that result into the final residual. Adding the residual to the clean image creates a synthetic noisy image. The raw-to-sRGB rendering pipeline shown by the authors is used for displaying results.
How Noise Flow synthesizes a raw noise patch
The steps in order.
The additive description of a noisy image is written as follows.
y = x + n
The image y is the noisy observation, x is the underlying clean image in the same representation, and n is the noise residual. Addition combines corresponding entries of the arrays. In the actual training pairs, subtraction uses the clean reference supplied with the noisy photograph. Later, the signal-dependent layer uses an estimate of the intensity before gain. This is a different role for the clean image from that of the reference in the subtraction, since the two images being subtracted must be on the same measurement scale.
The variance relationship carried into the flow
The paper’s baseline and its signal-dependent layer are easier to relate if the ingredients of the older distributions are written explicitly. For additive white Gaussian noise, the distribution at each location is as follows.
nᵢ ∼ N(0, σ²)
The subscript i selects a pixel value, nᵢ denotes its noise, and the symbol ∼ means that the value follows the distribution on the right. The symbol N denotes a normal distribution, whose first argument 0 is the mean and whose second argument σ² is the variance. The quantity σ is the standard deviation. Under the white Gaussian assumption the values are independent, and under the constant-variance assumption the same σ is used throughout. A draw at a bright site and one at a dark site therefore obey identical rules.
For a signal-dependent Poisson contribution the paper writes the residual in the following form, with P denoting a random draw from the specified Poisson distribution.
nᵢ ∼ α P(xᵢ) − xᵢ
Here i and nᵢ retain their meanings, xᵢ is the clean signal at i, and α is a scale specific to the sensor. The argument xᵢ gives the rate of P, and hence both the mean and variance of the Poisson draw before the scaling and subtraction. The minus sign expresses the departure from the clean value. In this discussion the important change from constant-variance noise is that the distribution of the random contribution itself changes with the intensity.
The Poisson–Gaussian expression in the paper adds a contribution with signal-independent variance.
nᵢ ∼ a P(xᵢ) − xᵢ + N(0, b²)
The symbol a scales the Poisson contribution and b is the standard deviation of the additive Gaussian component. The Gaussian term has mean 0 and variance b² regardless of xᵢ. The remaining symbols have the same meanings as in the previous expressions. This describes a combination in which one term has a spread tied to the signal while the other can contribute deviations even where the clean intensity is small.
The paper gives the heteroscedastic Gaussian alternative using the same two component parameters.
nᵢ ∼ N(0, a²xᵢ + b²)
Here a² is the coefficient that multiplies the clean intensity xᵢ, and b² is the signal-independent contribution to variance. The two contributions appear within the variance argument of a single normal distribution. The noise value nᵢ therefore follows a zero-mean Gaussian with a spread that varies with i through xᵢ. The authors express the resulting noise level function with a separate pair of symbols for the coefficients.
Var(nᵢ) = β₁xᵢ + β₂
The function Var returns the variance. The coefficient β₁ is a² in the heteroscedastic expression and β₂ is b². The term β₁xᵢ changes with the clean signal at location i, and β₂ is the intercept. To use this formula in a flow, the authors take the square root of the variance and use it to scale a Gaussian input. This step matters because a factor applied to a random value multiplies its standard deviation by that factor. Its effect on variance is the square of the factor.
How the reversible sequence gives a likelihood
A patch can be treated as a vector by considering its pixel and channel values as entries of one ordered array. The paper uses an isotropic Gaussian with a mean of zero and an identity covariance matrix as its base distribution. Each dimension of a base draw has the same spread and the covariance between different dimensions is zero. This choice makes it straightforward to generate a base draw and to evaluate its density. The fitted transformations then reshape the distribution of the entire vector.
hⱼ = fⱼ(hⱼ₋₁)
The index j labels a transformation in the sequence. The vector hⱼ is the result after that transformation and hⱼ₋₁ is its input. The first input h₀ is the base draw, denoted z. Each fⱼ is a differentiable bijection, a mapping with a unique reverse on the spaces it connects. The final output of the sequence is n, the noise patch. The entire composition is denoted by F, so that a draw from the noise distribution is obtained by applying F to z. The clean intensity and acquisition conditions are held fixed in each use of the sequence.
Knowing the base draw that corresponds to a real noise patch is only part of the density calculation. Consider a scale that spreads nearby inputs farther apart. The probability mass carried by those inputs occupies a larger region after the transformation. A density calculated per unit of volume must decrease in that region. A contraction has the opposite effect. A normalizing flow can compute this adjustment for each layer and combine the adjustments along the route between the base draw and the observation.
p(n) = p₀(F⁻¹(n)) · ∏ⱼ |det Jⱼ(hⱼ₋₁)|⁻¹
The function p is the noise density under the fixed conditions, and p₀ is the base density. The inverse F⁻¹ recovers the base draw from n. The symbol ∏ⱼ takes the product over the layers. The matrix Jⱼ is the Jacobian of fⱼ, containing the derivatives of the output entries with respect to the input entries. It is evaluated at hⱼ₋₁, the appropriate intermediate value on the path through the flow. The determinant, written det, measures local volume scaling. The bars take its absolute value, and the inverse power takes the reciprocal, which adjusts the density in the transformed space.
At training time, the recorded patch and its metadata determine which inverse to apply. The layers are reversed from the end back to the beginning. That calculation also supplies the intermediate inputs for the corresponding forward layers, so their volume terms are evaluated along the same path. The likelihood used for fitting counts both the Gaussian density at the recovered base point and the local expansions or contractions that connect it to the observation. This makes the physical scale adjustments part of the probability calculation as well as part of synthesis.
The sum over observations takes the following log form.
ℒ(θ) = ∑ᵢ [log p₀(zᵢ) − ∑ⱼ log |det Jⱼ(hᵢ,ⱼ₋₁)|]
The objective ℒ is the data log likelihood and θ denotes all trainable parameters. The outer sum indexes noise patches by i, and the inner sum indexes the layers by j. For patch i, zᵢ is the recovered base point and hᵢ,ⱼ₋₁ is the input to layer j in the forward direction. Both depend on the parameters and conditions used for that patch. The function log is the natural logarithm. The inverse factors in the density become subtractions of log absolute determinants. Maximizing ℒ gives the same objective as minimizing negative log likelihood. The authors use that negative quantity as their training loss.
How coupling and channel mixing remain reversible
A linear operation with an offset is a basic example of the kind of transformation the construction can use.
f(h) = Ah + b
The function f acts on an input vector h. The square matrix A mixes its entries, and the vector b supplies an offset. Full rank of A ensures that every input can be recovered uniquely. The reverse operation is written as follows.
f⁻¹(k) = A⁻¹(k − b)
The symbol k is an output of the forward transformation, f⁻¹ maps it back to the input, and A⁻¹ is the inverse matrix. The subtraction first removes the offset b. Multiplying by the inverse then undoes the mixing. Because changes in h are multiplied by A regardless of where they occur, the derivative has a straightforward determinant.
det J = det A
The matrix J here is the Jacobian of f, and det gives the determinant of either square matrix. The offset b changes where an input ends up but has no effect on the derivative. The kind of invertible convolution that Noise Flow takes from Glow is a linear channel-mixing operation with a spatial footprint of 1 × 1. At a given site it lets the outgoing channel values depend on the incoming channels there. Its footprint explains why the authors associate it directly with cross-channel relationships.
The affine coupling operation has a different way of letting dimensions interact. It keeps part of the input available in its original form. That part supplies the parameters for the operation on the other part. Because the unchanged values are still present at the output, they can be used to calculate the same scale and offset during reversal. The parameter-generating function can therefore be expressive even though the entire layer needs a convenient inverse.
f(hᴬ, hᴮ) = (T(hᴬ, q(hᴮ)), hᴮ)
The vectors hᴬ and hᴮ hold disjoint subsets of the input dimensions. Their juxtaposition inside the parentheses gives the input pair. The function q takes hᴮ and produces parameters for T, the transformation applied to hᴬ. The output contains the transformed first subset and the unchanged second subset. For fixed values supplied by q, the map T is invertible in its first argument. The paper notes that Glow uses shallow residual networks to generate coupling parameters, connecting this part of the background to Deep Residual Learning for Image Recognition.
T(v, a, b) = diag(exp(a))v + b
In this affine form, v is the subset being changed and a and b are the vectors of parameters that specify scaling and shifting. The function exp takes the exponential of each entry of a, and diag puts those results on the diagonal of a matrix. Each scale is positive. Reversal subtracts b and divides each transformed entry by its scale. The vectors a and b in this expression are coupling-layer outputs produced from the unchanged subset. Their notation is local to this formula.
The Jacobian of the full coupling layer can be arranged in triangular blocks. One diagonal block is the derivative of T with respect to the changing subset. The other is an identity because the unchanged subset passes straight through. Derivatives of the scale and shift with respect to the unchanged subset can affect how the transformed entries respond. The triangular arrangement keeps them out of the determinant. Thus the flexible dependence of one subset on the other is compatible with a simple density correction based on the scales of the transformed entries.
To make up one unconditional flow step, the paper places a coupling operation before the invertible channel convolution. The term unconditional refers to the lack of a separate clean-image, ISO, or camera input to these operations. They still operate on intermediate values that can already have been changed by a conditional layer. The coupling supplies a way to express dependencies across dimensions, and channel mixing lets later operations work with combinations of channels. Which relationships the fitted sequence represents is determined through training on the residual patches.
Turning clean intensity into an invertible scale
The first conditional transformation takes a noise vector and scales each entry using the underlying clean intensity in the corresponding dimension. The scale comes from the same linear variance function as the heteroscedastic Gaussian.
s = √(β₁x + β₂)
The array x contains the estimated clean intensities before gain, and s is the array of scale values. The slope β₁ and intercept β₂ are the learned signal-dependent coefficients. The offset is applied to each entry of the scaled array, and the square root is also taken entry by entry. Every element of s is consequently a standard-deviation scale associated with its corresponding intensity.
fₛ(h) = s ⊙ h
The function fₛ is the signal-dependent layer, h is its input, and ⊙ denotes multiplication of corresponding entries. As this layer is first in the generating sequence, its input is the base Gaussian draw. For a fixed clean image the operation uses the same scales on every draw, while the random entries of h differ. A brighter entry in x can receive a larger spread through its larger scale. The inverse is the same kind of pointwise operation.
fₛ⁻¹(k) = s⁻¹ ⊙ k
The vector k is the output of the signal layer and the entries of s⁻¹ are the reciprocals of the entries in s. Multiplying by them recovers the input. During density evaluation the same clean intensity estimate that governs the forward scale governs this inverse. The derivatives with respect to h are diagonal when the conditioning image is fixed, so the layer’s contribution to the volume calculation has the following form.
log |det Jₛ| = ∑ᵢ₌₁ᵈ log(sᵢ)
The matrix Jₛ is the Jacobian of fₛ with respect to its input, d is the dimensionality of that input across pixels and channels, and i indexes those entries. The entry sᵢ is the scale applied at index i. The sum of log scales comes from the product of the positive diagonal entries in the determinant. When many entries receive larger scales, the adjustment accounts for the greater volume occupied by their transformed random values.
The authors learn unconstrained quantities and convert them to positive coefficients using exponentiation.
βⱼ = exp(bⱼ), j ∈ {1, 2}
The index j here selects either of the two variance coefficients, and bⱼ is its corresponding trainable quantity. The symbol ∈ means that the index belongs to the indicated set. The exponential gives positive values, so the intercept ensures a positive standard deviation at zero intensity and the slope makes it increase as intensity rises. The initialization is b₁ at -5.0 and b₂ at 0. Consequently β₁ begins close to 0 and β₂ begins at 1.0, giving scales close to 1.0 at initialization. The first layer thus begins by making little change to the base draw while retaining the ability to learn intensity-dependent variation.
Putting ISO and camera identity into the gain
The gain layer operates later in the sequence and uses a common positive scale for all entries of its current vector. The paper first gives the ISO-dependent scale without the camera adjustment.
g(I) = u(I) × I
The symbol I is the image’s ISO setting and g(I) is the corresponding gain scale. The function u(I) is a positive learned factor. Multiplication by I supplies the basic dependence on ISO and u(I) lets the gain vary from strict proportionality. Since the authors have observations at a limited set of discrete ISO settings, they assign a trainable value to each setting included in the fit.
u(I) = exp(vᵢₛₒ)
The subscript iso denotes the entry associated with the value I, and vᵢₛₒ is the trainable quantity stored for that setting. Exponentiation turns it into a positive multiplier. The authors initialize the multiplier at roughly 1/200 to account for the numerical scale of the ISO values. The actual initial gain still depends on I. The table of trainable values gives the fit freedom at the observed settings without specifying a continuous rule for how the multipliers vary between them.
Different cameras can implement different gains at corresponding ISO levels. The authors give each device a positive scale that multiplies the shared ISO term.
g(I, c) = w꜀ × u(I) × I
The symbol c identifies the camera and w꜀ is its learned positive adjustment. The gain g(I, c) is a scalar for the supplied camera and ISO. The same u(I) is shared across devices, so a camera’s adjustment acts as a multiplier across its ISO terms. This keeps the device-specific part small and makes the acquisition metadata sufficient to select it in the experiments.
fᵍ(h) = g(I, c) ⊙ h
The notation fᵍ denotes the gain layer, h is the vector it receives, and ⊙ here multiplies every entry by the same scalar g(I, c). Reversal divides by that scalar. For fixed conditions the derivative is diagonal with the gain on every diagonal entry, which gives the log-determinant used in likelihood evaluation.
log |det Jᵍ| = d log(g(I, c))
The matrix Jᵍ is the gain layer’s Jacobian, and d counts the dimensions of its input across pixels and channels. The same log gain is contributed by each entry. This is the uniform-scale counterpart of the sum in the signal-dependent layer, where each entry can contribute a different log scale because it has a different underlying intensity.
Fit the layers jointly on paired raw images
SIDD supplies clean references after gain. The intensity required by the signal-dependent layer is the latent clean value before gain, so the paper uses its learned gain to obtain an estimate.
x = xᵍ / g(I, c)
The array xᵍ is the gain-amplified clean reference, and x is the estimated intensity array before that amplification. The division acts on each entry using the scalar gain determined by ISO I and camera c. The estimate changes as the learned gain changes during training. Accordingly, the gain has two roles in the construction. It scales the intermediate noise directly, and it helps determine the intensity fed to the signal-dependent layer earlier in the sequence.
The full sequence has the signal-dependent layer first, a group of unconditional steps, the gain layer, and another group of unconditional steps. The paper denotes the number of steps in each group by K and ordinarily uses K = 4. In the authors’ label S-Ax4-G-Ax4-CAM, S is signal dependence, G is gain, CAM indicates the camera-specific adjustment of that gain, and Ax4 denotes a group of four coupling and convolution steps. Reading the label with the gain equation makes clear where the camera information enters the computation.
For each raw pair, the authors subtract the ground-truth reference from the noisy image, form patches, and retain the conditions needed for those patches. The resulting residuals are observations for the density objective. They train by minimizing negative log likelihood, using Adam to update the parameters. After fitting, a new Gaussian draw can be transformed at a chosen camera and ISO while conditioning its intensity scale on a clean reference. The authors make the Noise Flow code and trained parameters publicly available.
Experiments and results
The raw data and how the comparisons are set up
The Smartphone Image Denoising Dataset contains thousands of noisy photographs with corresponding ground-truth references. The photographs come from repeated captures of ten scenes by five smartphone cameras, with changes in illumination and ISO. The dataset includes ISO values from 50 to 10,000 and provides both raw-RGB and sRGB images. The authors work in raw-RGB because rendering into sRGB changes the distribution of noise. The raw residual is their subject in the density and synthesis comparisons, and sRGB rendering is used to present images for visual inspection.
Subtracting the references and arranging the data into patches yields roughly 500,000 patches of 64 × 64 pixels. Approximately 70% go into training and roughly 30% into testing. The same collection of cameras and ISO settings is represented on both sides of the split. The test therefore asks how well the fitted distribution scores withheld examples under the represented acquisition conditions. In their analysis of gain the authors also specify that ISO 200 is omitted from both sets because SIDD has too few images at that setting. The overall ISO range describes the dataset’s coverage and the exclusion identifies a concrete gap in the experiments.
The authors compare Noise Flow with a Gaussian whose variance is constant and a Gaussian whose variance comes from camera calibration. For the first baseline they estimate a single variance by maximum likelihood using the training noise. In other words, the variance is chosen to make the training residuals as probable as possible under the assumption of a zero-mean univariate Gaussian. This gives the baseline the benefit of a scale fitted to the same empirical noise that motivates the more flexible method.
The second baseline uses the NLF provided by SIDD for each image. The calibration coefficients supply the relationship between intensity and variance, so the spread of noise can differ across an image as well as across captures with different calibrations. This comparison asks whether Noise Flow improves on a baseline that already incorporates the major fact about photon noise that the constant-variance distribution leaves out. The procedures used to set the baseline parameters differ. The former estimates its shared variance from training data, and the latter uses image-specific calibration associated with the dataset.
Held-out noise density
Negative log likelihood evaluates how much density each approach assigns to the observed noise, with lower values indicating a better fit. Averaging the score per pixel gives the units used in the paper’s numerical comparison. The flow scores a patch through the joint transformation of its entries. If part of the fitted gain comes simply from adjusting scales more appropriately, that can improve the score. If the learned transformations match relationships among entries better, that can improve the score as well. The score itself combines those effects.
On the SIDD test set Noise Flow reduces negative log likelihood by 0.69 nats/pixel relative to the constant-variance Gaussian and by 0.42 nats/pixel relative to the camera-calibrated NLF. The paper also expresses the differences as improvements in the exponentiated negative score. On that likelihood scale it reports gains of 99.4% against the fitted Gaussian and 51.6% against the camera NLF. The percentages refer to that particular conversion of the per-pixel score. Each comparison has its own baseline as the point of reference.
Relative test likelihood of Noise Flow against SIDD baselines
The reported likelihood gain is larger over the fitted Gaussian than over the camera-calibrated noise level function.
The numbers
| System or setting | likelihood improvement % |
|---|---|
| Noise Flow vs. fitted Gaussian (this paper) | 99.4 |
| Noise Flow vs. camera NLF | 51.6 |
The two margins are informative because the baselines embody different amounts of knowledge about capture. The constant-variance baseline supplies a reference for how far the observations depart from a common Gaussian scale. The camera NLF already changes spread with signal and uses the respective image’s calibration, so the improvement over it is the comparison most directly related to the authors’ motivation for adding flexibility. The ablations then ask how much of the better fit can be traced to camera adjustment and how much depends on additional reversible steps.
How the synthetic values compare with real ones
A likelihood test begins with an observation and asks how the fitted distribution scores it. The synthesis test begins with a draw from the generator and asks how the resulting values are distributed. For a test image, the authors construct a histogram of real residual values and a histogram of generated residual values. They compare the two with discrete Kullback–Leibler divergence, abbreviated KL divergence. A lower divergence indicates closer agreement under this histogram comparison.
This is described as a marginal comparison because each histogram pools individual noise values. The number of values landing in different parts of the distribution matters, while the positions of those values are lost in pooling. A histogram can consequently show whether a generator tends to produce deviations with plausible magnitudes or frequencies. A direct assessment of relationships across positions or channels would require information beyond the pooled counts. This distinction is especially relevant for Noise Flow because its flexible layers are intended to capture relationships as well as individual value distributions.
Averaged over the samples evaluated on SIDD testing data, the authors report a marginal KL improvement of 97.9% relative to the constant-variance Gaussian and 84.1% relative to the camera NLF. Those are reported reductions relative to the two references. The improvement rises as the underlying divergence falls.
Relative marginal KL reductions for synthesized SIDD test noise
Noise Flow yields closer noise histograms than either Gaussian sampling procedure.
The numbers
| System or setting | marginal KL divergence improvement % |
|---|---|
| Noise Flow vs. constant-variance Gaussian (this paper) | 97.9 |
| Noise Flow vs. camera NLF | 84.1 |
The figures accompany these scores with examples of real noisy patches, clean references, and samples made by each synthesis procedure. The illustrated ISO settings are given as {100, …, 1600}, and the examples include both normal and low light. The authors judge the Noise Flow samples visibly closer to the real captures and report better marginal divergence for those samples. Showing the reference alongside the corruptions helps the reader distinguish scene features from the extra variation introduced by each noise source. The visual comparisons concern the displayed cases, while the average histogram result concerns the synthesis test as a whole.
What changes when the noise is used to train a denoiser
To test the practical value of synthesis, the authors keep DnCNN as the denoising architecture and vary the source of its noisy training inputs. For synthetic training, the clean ground-truth images come from SIDD-Medium. Each synthesis procedure creates a possible noisy counterpart to a clean image. The separate real-data condition uses the observed noisy photographs and their references from SIDD-Medium, with no noise augmentation. All these conditions are assessed on SIDD-Validation, where the input images have real noise and their corresponding clean images permit scoring the restorations.
For DnCNN-Gauss, the authors draw Gaussian standard deviations from the range [0.24, 11.51]. This differs from the single fitted variance in the density experiment. The synthetic training procedure exposes the denoiser to Gaussian noise at different scales. For DnCNN-CamNLF, the authors randomly choose from camera calibration functions and synthesize noise using the chosen intensity–variance relationship. For DnCNN-NF, they supply randomly chosen camera identifiers and ISO settings to Noise Flow along with a clean image. The Gaussian range, calibration functions, device identities, and ISO settings come from SIDD. The observed-pair training condition is called DnCNN-Real.
The paper compares the best test results for peak signal-to-noise ratio, or PSNR, and structural similarity, or SSIM. PSNR reflects pixel reconstruction error relative to the range of the signal. SSIM evaluates similarity in image structure. Higher scores indicate closer agreement with the clean reference on both measures. For expressing relative changes, the authors also discuss root-mean-square error and structural dissimilarity. They prefer these error-oriented quantities for reporting relative improvements because PSNR and SSIM become less sensitive as reconstruction errors shrink.
Of the training conditions, DnCNN-NF achieves the highest reported aggregate scores for both PSNR and SSIM. It also puts synthetic examples from Noise Flow slightly ahead of training on the available real pairs. The authors attribute that small edge to the limited real training collection. Synthetic augmentation can supply different noisy versions of a clean image from a learned distribution, while the real-pair condition draws directly on the captures present in SIDD-Medium. The comparison puts those two ways of getting training examples in the same task and evaluates them on real noise.
The per-image examples give a more detailed picture of the ranking. The authors observe instances of excessive smoothing with DnCNN-Gauss and artifacts or saturated pixels with DnCNN-CamNLF. The denoiser trained with Noise Flow does not achieve the highest PSNR on every displayed image. The authors describe its results as the most stable across the six examples. That assessment and the aggregate ranking address different aspects of performance. The ranking concerns the reported validation metrics, while the examples show how the choice of training noise can affect individual restorations.
What the ablations show
A camera adjustment helps beyond a shared ISO scale
The architectural ablations compare versions of Noise Flow with different combinations of layers. The labels identify which mechanisms are present. S is the signal-dependent scaling layer, G is the ISO gain layer, and CAM adds a device-specific gain multiplier. The comparison around S-G-CAM tests whether a shared intensity relationship and a shared set of ISO gains benefit from an adjustment selected by camera identity. The authors find an improvement in both test negative log likelihood and marginal KL divergence when the camera-specific parameters are added.
This comparison makes device information consequential in a specific way. The camera adjustment is simple, so an improvement indicates that even a common multiplicative correction for a given camera can represent regularities that the shared scale misses. Its effect is visible both in scoring observed patches and in the distribution of generated values. The comparison addresses the value of the parameterization on the represented cameras. It leaves open how well a gain multiplier alone would describe a device with different characteristics from the phones used in the fit.
The authors also follow the camera weights as training proceeds. The weights differ across devices, and the authors compare their pattern with the differences among the cameras’ calibrated β₁ values. Recall that β₁ governs how quickly variance rises with intensity in the NLF. The authors describe the learned camera scales as consistent with differences in this calibration coefficient. They qualify the comparison for the iPhone and G4, whose narrower ISO ranges make the relationship with the gain weights less clear.
The two observations answer different questions about the camera terms. The performance comparison shows that adding the terms helps the fitted distribution in the reported tests. The relationship to the calibration coefficients is a check on the interpretation of what the parameters are doing. A device whose calibration indicates stronger signal-dependent variation can also differ in its learned scaling of the noise. Since the first conditional layer and the gain both affect scaling, the calibration comparison is best understood as evidence of compatible behavior across devices.
The added flow steps improve the density fit
The authors next compare versions that include the flexible steps from Glow. Ax1 denotes a group with one unconditional step, composed of affine coupling followed by an invertible 1 × 1 convolution. Adding Ax1 blocks improves test negative log likelihood. Increasing the groups from Ax1 to Ax4 brings a further improvement that the paper describes as slight. The resulting full architecture uses the deeper groups around the gain layer, together with the signal and camera terms.
This supports a role for operations beyond simple scaling. The conditional layers directly encode how to change the spread at each intensity and how to scale the residual according to ISO and camera. A coupling block can use some of the values already present in an intermediate patch to choose how to change other values. Channel mixing can make combinations available to the following transformations. The better density score shows that this combined flexibility helps with structure left to learn after the explicit conditioning.
The experiments evaluate coupling and channel convolution together within each step. The improvement from adding a step is therefore measured for the pair of operations. The paper interprets it as evidence for learning additional pixel relationships, and the changes in joint density fit are compatible with that interpretation. The setup leaves the individual contribution of channel mixing and of coupling undetermined. It also leaves open how much of the measured improvement is due to the fit of each entry’s distribution and how much is due to dependencies between entries.
The depth comparison provides a narrower conclusion. More steps increase the number of opportunities to reshape a patch between the variance and gain adjustments and after gain. For the depths the authors compare, that extra flexibility improves the objective by a small amount. The comparison establishes the direction and qualitative size of the change in this setting. Its scope is the configurations evaluated in the paper, with the same basic physical layers and the given raw training data.
The signal and gain terms show the intended trends
The parameter analyses investigate whether the learned explicit terms behave in a way that makes sense for the roles assigned to them. The paper plots the signal-dependent coefficients during training. It reports that β₁, the coefficient of intensity, becomes the dominant coefficient, and β₂, the additive variance term, is smaller. This agrees with the authors’ expectation that the Poisson-like component plays a prominent role. The effect of the slope on any specific dimension still depends on the intensity that multiplies it, so the observation describes the fitted coefficients and their role in the curve.
Because the coefficients are exponentiated, positivity is guaranteed by construction. The relative magnitudes they reach are a product of fitting. This distinction helps interpret the plots. The parameterization encodes increasing variance with intensity, while the fit chooses how steep that increase is and how much baseline variance to assign. The other layers are trained at the same time and can further shape the distribution produced by those scales.
The gain plots show factors consistent with their associated ISO levels. This is partly a check on the adjustment to proportionality. The formula includes ISO as a multiplier, so the learned gains are already structured around it. The per-setting multiplier still gives the fit room to depart from that relationship and can change the relative gains selected for different settings. The pattern that emerges from training is consistent with the amplification interpretation the authors intend for the layer.
Taken together, the parameter plots and the architectural comparisons give complementary evidence. The comparisons show improvements when device-specific gain and flexible steps enter the construction. The plots show how the fitted coefficients in the explicit layers behave in relation to intensity, ISO, and device calibration. Their physical interpretation is supported to the extent that these patterns agree with the intended relationships. The principal statistical evidence remains the scores on held-out residuals and generated noise, because those evaluate the combined sequence that will actually be used.
Limitations
Boundaries acknowledged by the authors
The authors explicitly limit what the marginal KL comparison observes. A histogram aggregates pixel values, so it omits information about correlations. A generator can distribute values across bins in the same proportions as real noise while distributing them differently across the image. The paper includes the joint likelihood and visual examples alongside the histogram score. The likelihood measures the overall fit of the joint density, and the examples show possible manifestations in actual patches. The marginal comparison by itself establishes only agreement of pooled values.
The authors choose a discrete ISO representation because their data contain a limited set of settings. This gives each evaluated setting its own adjustable multiplier. They omit ISO 200 from training and testing for lack of enough images, and they note that the relationship between learned camera weights and NLF coefficients is harder to interpret for the iPhone and G4 because of narrower ISO coverage. These are concrete constraints from the data. A wide range of ISO values at the dataset level can coexist with sparse coverage at a particular setting or within a particular device’s recordings.
The raw space is also an explicit choice. The paper points out that the rendering process changes the distribution and uses rendered images for visualization. What the experiments characterize is therefore noise in the raw representation. The examples viewed after rendering illustrate the appearance of the resulting corruptions, while the likelihood comparison uses residuals obtained directly from raw pairs. A density learned or evaluated in rendered image space would pose a separate statistical problem.
The denoising discussion recognizes two limits within the reported experiment. The supply of real training pairs is relatively small, which the authors offer as their explanation for the slight aggregate advantage of DnCNN-NF over DnCNN-Real. The sample restorations also show variation from image to image, and the Noise Flow training condition does not give the top PSNR on every displayed case. The authors’ assessment of stability and the higher aggregate scores both apply to the particular DnCNN and SIDD comparison.
Boundaries that follow from the experimental design
The train and test splits share the camera identities and ISO support. This controls the meaning of performance on held-out patches. It gives evidence of fit on fresh examples for conditions known during training. Performance on a smartphone held out from the fitting process remains an open question. The authors propose adapting to a new device by fitting camera-specific gain parameters and treating the other layers as shared. Assessing that proposal would require evidence about how the fitted distribution and generated noise behave on the new device.
Similarly, the explicit ISO multiplier and the learned table of ISO adjustments make distinct contributions. The formula has an ISO argument, but evaluating it at an unsupported setting requires supplying a value for the adjustment at that setting. Performance under such a choice is outside the demonstrated coverage. The separable camera multiplier is also a constraint. It assigns each device one scaling factor across its ISO terms, so the experiment tests the usefulness of that kind of device adjustment under the observed capture conditions.
The residuals are defined relative to SIDD’s clean references. Any discrepancy between a supplied clean reference and the underlying clean image can affect the subtraction used to extract noise. At the same time, the intensity conditioning relies on a latent estimate formed with the learned gain. There is no separate experimental estimate here of how uncertainty in the reference or in the gain correction affects the density results. The fitted distribution is best read as a description of raw residuals constructed with the given reference procedure and conditioning variables.
The same dependence matters when interpreting individual parameters. The signal-dependent layer influences the spread of the base draw, the gain layer rescales an intermediate draw, and the learned gain also participates in the estimate of clean intensity. The other transformations can learn additional rescalings and shifts. The paper shows that the resulting parameter trends are consistent with known signal and gain behavior. Identifying unique physical values for each internal term would require separating effects that the fitted sequence can express in several places.
Likewise, the motivation names fixed patterns, defective pixels, clipping, cross-talk, and other features of real camera noise. The reported statistics assess overall fit or value histograms, and the paper supplies visual examples. These results establish a better fit for the full system against the tested Gaussian alternatives. Individual validation of each named phenomenon lies beyond those comparisons. For example, changes in the pooled histogram can be measured directly using marginal KL, whereas evidence about a recurring spatial pattern would require retaining its location across captures.
The two explicit baseline comparisons address widely used forms of Gaussian noise. The introduction places clipped distributions, Poisson mixtures, and adversarial synthesis in the earlier literature, while the quantitative comparisons focus on the fitted constant-variance Gaussian and camera NLF. The strength of the empirical ranking comes from knowing exactly how those two Gaussian references were constructed. A ranking that extended to the other approaches discussed in the background would need corresponding tests.
The restoration experiment measures the effect of the training sources on one denoising architecture, with SIDD-Medium training images and real observations in SIDD-Validation. The data sources can differ in the diversity of examples they provide. In particular, resampling Noise Flow changes the supply of corruptions available for a given clean image. The comparison with real pairs assesses the two training procedures as used. It leaves the separate contributions of realism and diversity to the small performance edge unresolved. Better results on this task also leave performance with other denoisers and other restoration settings open.
Finally, the count of fewer than 2500 parameters establishes compactness in the number of learned quantities. Sampling cost, training time, and memory use depend on the operations applied to image patches as well as the number of parameters. The reported count supplies a size measure for the representation. A runtime or memory conclusion would need measurements of those costs under the relevant use conditions.
What came after
The paper points forward to robust image classification and burst image deblurring as possible uses for noise synthesis. The classification proposal changes the purpose of the generated data. The question becomes whether samples with plausible camera noise help a system recognize content in noisy photographs. The burst deblurring proposal concerns restoration with a different objective from the single-image denoising experiment. Both are prospective applications identified by the authors. Outcomes established by later studies remain undocumented here.
The discussion of camera adaptation leaves another direction open. The proposal is to take the signal and coupling transformations as shared and adjust the gain parameters for the incoming device. Its attraction follows from the small amount of information made camera-specific in the original construction. The experiments on shared camera and ISO support provide the starting evidence for that proposal. Applying it to a new camera would put the shared representation to a different test, by asking whether changing the device scale is sufficient to reproduce that camera’s residual distribution.
Cite
Cite as Abdelrahman Abdelhamed, Marcus A. Brubaker and Michael S. Brown. 2019. Noise Flow: Noise Modeling With Conditional Normalizing Flows. IEEE/CVF International Conference on Computer Vision (ICCV).
@inproceedings{abdelhamed2019noise,
title = {{Noise Flow: Noise Modeling With Conditional Normalizing Flows}},
author = {Abdelrahman Abdelhamed, Marcus A. Brubaker and Michael S. Brown},
booktitle = {IEEE/CVF International Conference on Computer Vision (ICCV)},
year = {2019},
doi = {10.1109/iccv.2019.00326},
eprint = {1908.08453},
archivePrefix = {arXiv},
url = {https://doi.org/10.1109/iccv.2019.00326}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/abdelhamed-2019-noise-flow-noise-modeling-conditional/
References
- Abdelrahman Abdelhamed, Stephen Lin, and Michael S Brown. A High-Quality Denoising Dataset for Smartphone Cameras. In CVPR, 2018. OpenAlex ↗ · Scholar ↗
- Miika Aittala and Frédo Durand. Burst Image Deblurring Using Permutation Invariant Convolutional Neural Networks. In ECCV, 2018. OpenAlex ↗ · Scholar ↗
- Jingwen Chen, Jiawei Chen, Hongyang Chao, and Ming Yang. Image Blind Denoising with Generative Adversarial Network Based Noise Modeling. In CVPR, 2018. OpenAlex ↗ · Scholar ↗
- Steven Diamond, Vincent Sitzmann, Stephen Boyd, Gordon Wetzstein, and Felix Heide. Dirty Pixels: Optimizing Image Classification Architectures for Raw Sensor Data. arXiv preprint arXiv:1701.06487, 2017. OpenAlex ↗ · Scholar ↗
- Laurent Dinh, David Krueger, and Yoshua Bengio. NICE: Non-linear Independent Components Estimation. In ICLR Workshop, 2015. OpenAlex ↗ · Scholar ↗
- Laurent Dinh, Jascha Sohl-Dickstein, and Samy Bengio. Density Estimation using Real NVP. In ICLR, 2017. OpenAlex ↗ · Scholar ↗
- Alessandro Foi. Clipped Noisy Images: Heteroskedastic Modeling and Practical Denoising. Signal Processing, 89(12):2609–2629, 2009. OpenAlex ↗ · Scholar ↗
- Alessandro Foi, Mejdi Trimeche, Vladimir Katkovnik, and Karen Egiazarian. Practical Poissonian-Gaussian Noise Modeling and Fitting for Single-Image Raw-Data. TIP, 17(10):1737–1754, 2015. OpenAlex ↗ · Scholar ↗
- Ryan D. Gow, David Renshaw, Keith Findlater, Lindsay Grant, Stuart J. McLeod, John Hart, and Robert L. Nicol. A Comprehensive Tool for Modeling CMOS Image-Sensor-Noise Performance. IEEE Transactions on Electron Devices, 54(6):1321–1329, 2007. OpenAlex ↗ · Scholar ↗
- Samuel W Hasinoff, Frédo Durand, and William T Freeman. Noise-Optimal Capture for High Dynamic Range Photography. In CVPR, 2010. OpenAlex ↗ · Scholar ↗
- Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep Residual Learning for Image Recognition. In CVPR, 2016. our card
- Glenn E. Healey and Raghava Kondepudy. Radiometric CCD Camera Calibration and Noise Estimation. TPAMI, 16(3):267–276, 1994. OpenAlex ↗ · Scholar ↗
- Gerald C Holst. CCD Arrays, Cameras, and Displays. SPIE Optical Engineering Press, USA, second edition, 1998. OpenAlex ↗ · Scholar ↗
- Youngbae Hwang, Jun Sik Kim, and In So Kweon. Difference-based Image Noise Modeling Using Skellam Distribution. TPAMI, 34(7):1329–1341, 2012. OpenAlex ↗ · Scholar ↗
- Xiaodan Jin and Keigo Hirakawa. Approximations to Camera Sensor Noise. In Image Processing: Algorithms and Systems XI, 2013. OpenAlex ↗ · Scholar ↗
- Diederik P. Kingma and Jimmy Ba. Adam: A Method for Stochastic Optimization. In ICLR, 2015. our card
- Diederik P. Kingma and Prafulla Dhariwal. Glow: Generative Flow with Invertible 1x1 Convolutions. In NeurIPS, 2018. our card
- Darwin T Kuan, Alexander A Sawchuk, Timothy C Strand, and Pierre Chavel. Adaptive Noise Smoothing Filter for Images with Signal-Dependent Noise. TPAMI, 7(2):165–177, 1985. OpenAlex ↗ · Scholar ↗
- Ce Liu, Richard Szeliski, Sing Bing Kang, C. Lawrence Zitnick, and William T. Freeman. Automatic Estimation and Removal of Noise from a Single Image. TPAMI, 30(2):299–314, 2008. OpenAlex ↗ · Scholar ↗
- Xinhao Liu, Masayuki Tanaka, and Masatoshi Okutomi. Practical Signal-Dependent Noise Parameter Estimation from a Single Noisy Image. TIP, 23(10):4361–4371, 2014. OpenAlex ↗ · Scholar ↗
- Artur Łoza, Lyudmila Mihaylova, David Bull, and Nishan Canagarajah. Structural Similarity-based Object Tracking in Multimodality Surveillance Videos. Machine Vision and Applications, 20(2):71–83, 2009. OpenAlex ↗ · Scholar ↗
- Markku Mäkitalo and Alessandro Foi. Optimal Inversion of the Generalized Anscombe Transformation for Poisson-Gaussian Noise. TIP, 22(1):91–103, 2013. OpenAlex ↗ · Scholar ↗
- Amr M. Mohsen, Michael F. Tompsett, and Carlo H. Sèquin. Noise Measurements in Charge-Coupled Devices. IEEE Transactions on Electron Devices, 22(5):209–218, 1975. OpenAlex ↗ · Scholar ↗
- Firouz Naderi and Alexander A Sawchuk. Estimation of Images Degraded by Film-Grain Noise. Applied Optics, 17(8):1228–1237, 1978. OpenAlex ↗ · Scholar ↗
- Seonghyeon Nam, Youngbae Hwang, Keti Yasuyuki Matsushita, and Seon Joo Kim. A Holistic Approach to Cross-Channel Image Noise Modeling and its Application to Image Denoising. In CVPR, 2016. OpenAlex ↗ · Scholar ↗
- Tobias Plötz and Stefan Roth. Benchmarking Denoising Algorithms with Real Photographs. In CVPR, 2017. OpenAlex ↗ · Scholar ↗
- Danilo Jimenez Rezende and Shakir Mohamed. Variational Inference with Normalizing Flows. In ICML, 2015. our card
- Tamara Seybold, Christian Keimel, Marion Knopp, and Walter Stechele. Towards an Evaluation of Denoising Algorithms with Respect to Realistic Camera Noise. In IEEE International Symposium on Multimedia, 2013. OpenAlex ↗ · Scholar ↗
- H Joel Trussell and R Zhang. The Dominance of Poisson Noise in Color Digital Cameras. In ICIP, 2012. OpenAlex ↗ · Scholar ↗
- Zhou Wang, Alan C Bovik, Hamid R Sheikh, and Eero P Simoncelli. Image Quality Assessment: From Error Visibility to Structural Similarity. Technical Report 4, 2004. OpenAlex ↗ · Scholar ↗
- Andrew R Webb. Statistical Pattern Recognition. John Wiley & Sons, 2003. OpenAlex ↗ · Scholar ↗
- Jiachao Zhang and Keigo Hirakawa. Improved Denoising via Poisson Mixture Modeling of Image Sensor Noise. TIP, 26(4):1565–1578, 2017. OpenAlex ↗ · Scholar ↗
- Kai Zhang, Wangmeng Zuo, Yunjin Chen, Deyu Meng, and Lei Zhang. Beyond a Gaussian Denoiser: Residual Learning of Deep CNN for Image Denoising. TIP, 26(7):3142–3155, 2017. OpenAlex ↗ · Scholar ↗