Profile

Settings

Loading…

← Papers

Help

FAQ

Which features require signing in?

You can read the commentary, paper info, Model Structure and related papers of public papers without signing in. Sign in to manage your account or contact us about your inquiries.

Can I upload a PDF file?

Upload papers with an arXiv or DOI link; the commentary is public to everyone. Papers whose source and terms of use can't be verified, so the commentary can't be made public, can't be uploaded. Uploading PDF files and keeping papers private are for subscribers only, and a paper uploaded as a file is saved as private only. Searching for official info by title runs only when you press the button.

Are the figures and AI commentary accurate?

Figures come only from the original paper, and only those whose terms of use are verified are shown. The commentary is written by AI and may be wrong. Check important claims, numbers and figure context against the evidence in the original paper.

I want to report a copyright issue.

Terms of use and the source of the original paper are on the Paper info tab. If there's a problem, choose "Paper content, figures and copyright" under Contact us and send the paper link, the part in question, and evidence that you hold the rights. Receiving your report doesn't confirm any rights or remove anything right away. You can see the result of the review under My inquiries.

I forgot my password.

If you signed up with email, use Forgot password in the sign-in window to reset it with your verified email. If you signed up with Google, Naver or Kakao, change your password with that service.

What should I include in an inquiry?

Tell us which screen you were on and what you were doing when the problem happened, along with the paper link. Don't include personal information such as passwords, API keys, verification codes or phone numbers. Inquiries and replies are stored in Refivu and you can see them under My inquiries.

How do I delete my account?

In Settings, under My account, press Delete account. Review what will be deleted and complete identity verification to delete your account. For other requests, choose "Account" under Contact us.

Paper commentary

Loss Functions for Neural Networks for Image Processing

Perceptual loss functions make image restoration networks produce more pleasing results

  • Problem The default L2 loss treats noise the same everywhere in an image, but human vision does not. As a result, networks leave splotchy artifacts in smooth regions.
  • Method Mix is a new loss that adds a Gaussian-weighted L1 term to an MS-SSIM term, instead of the default L2. The network architecture stays fixed and only the training loss changes.
  • Results Mix reached a PSNR of 34.61 on denoising, compared to 34.42 for L1 training.

Why the default loss gets stuck

Most image restoration networks are trained with the squared 𝓁2 error, and Caffe offered only that loss for image processing. The choice is easy to understand, because 𝓁2 is convex, differentiable, and gives the maximum likelihood estimate under independent, identically distributed Gaussian noise. That convenience rests on assumptions about the image, and some of them don't hold in practice.

The most visible assumption is that the impact of noise doesn't depend on local image content. Human vision, however, reacts to local luminance, contrast and structure. In flat regions this shows up as splotchy artifacts: the network removes most of the noise but leaves blotches behind. Because 𝓁2 punishes large errors and tolerates small ones, it accepts small blotchy errors in smooth areas.

The problem also reaches evaluation, because PSNR is derived from 𝓁2 and it correlates poorly with perceived quality as well. So a network trained with 𝓁2 is tuned toward a score that people don't judge the same way they judge images.

Changing the loss, not the network

The authors keep the network architecture fixed and change only the error that drives training. Their starting point is that a perceptually motivated error should steer learning toward images people find pleasing.

They test 𝓁1, SSIM and MS-SSIM as replacements for 𝓁2, and then define Mix, which combines MS-SSIM with 𝓁1. The pairing makes sense because 𝓁1 keeps colors and luminance, while MS-SSIM keeps contrast in high-frequency regions.

Mix is a weighted sum of the two losses, written as \( L_{\text{Mix}} = \alpha\, L_{\text{MS-SSIM}} + (1-\alpha)\, G_{\sigma_M} \cdot L_{\ell_1} \). The authors report that small changes in α didn't change the results much. The Gaussian weights multiply the 𝓁1 term pointwise, because MS-SSIM spreads the error at each pixel according to that pixel's weight in the center value.

How the 𝓁1 and SSIM terms send error to pixels

For 𝓁1, the patch loss is the mean absolute difference over the N pixels, \( L_{\ell_1}(P)=\frac{1}{N}\sum_{p\in P}|x(p)-y(p)| \). Its derivative with respect to a processed pixel is the sign of that pixel's error. Where the error is zero, the sign is set to zero, so the weights aren't updated. Although the loss is defined over the whole patch, each pixel receives its own derivative.

SSIM multiplies a luminance-type term by a contrast-structure term, both computed with a Gaussian window of standard deviation σG. Because the window covers a neighborhood, SSIM can't be evaluated near the boundary of a patch, unlike 𝓁1 and 𝓁2. The authors therefore write the loss as \( 1-\text{SSIM}(\tilde p) \), evaluated only at the center pixel of the patch.

That works because the trained kernels are applied to every pixel, so the error still reaches the pixels inside the Gaussian support.

Even with its simple derivative, 𝓁1 already beats 𝓁2 and removes the splotchy artifacts in the sky of one example. Yet 𝓁1 still leaves artifacts in the sky and at the building boundary, which motivates the search for better losses.

Why MS-SSIM replaces a tuned σG

The choice of σG changes the SSIM-trained result: small values bring back splotches in flat regions, and large values keep noise near edges. Instead of tuning σG, the authors use MS-SSIM, which combines SSIM-type terms across several scales.

MS-SSIM is written as \( \text{MS-SSIM}(p) = l_M(p)^{\alpha} \prod_{j=1}^{M} cs_j(p)^{\beta_j} \), with α and every βj set to one. Building an image pyramid for every patch at every iteration is expensive, so the authors approximate it. They use five Gaussian filters with σG set to 0.5, 1, 2, 4 and 8, each applied to the full-resolution patch.

Both SSIM and MS-SSIM are insensitive to uniform biases, so they can shift brightness or colors, which tend to look duller. That is why the MS-SSIM network dulls colors, even though it handles noise near edges better than SSIM.

Denoising and demosaicking setup

The network is fully convolutional and takes a 31×31×3 input. Its first layer has 64 filters of size 9×9×3, the second layer 64 filters of size 5×5×64, and the output layer is 3×5×5×64. PReLU layers follow the inner convolutional layers. A 31×31 Bayer patch is first interpolated bilinearly into a 31×31×3 RGB patch.

Training used 700 RGB images from the MIT-Adobe FiveK Dataset, resized to 999×666. Each image was corrupted with photon shot noise and zero-mean Gaussian noise, plus clipping, using the Foi et al. model with a = 0.005 and b = 0.0001. After adding noise, the average PSNR of the testing images was 28.24 dB. The authors trained a separate network for each cost function, including SSIM with σG of 5 and 9.

Testing used 40 images from the same dataset, which the network did not see during training. As a non-learned reference, the authors ran BM3D in the Bayer domain after a variance stabilizing transform, followed by standard demosaicking.

Denoising and demosaicking scores

Training with 𝓁1 instead of 𝓁2 gave a better value on every row of the denoising table. The 𝓁1-trained network reached a PSNR of 34.42, compared to 33.18 for the 𝓁2-trained network. Its 1000·𝓁2 loss was 0.43, compared to 0.56 for the network trained with 𝓁2. The authors look into why in their discussion of convergence.

Mix gave the best value on every row of the denoising table among the training losses and BM3D. Its PSNR was 34.61, compared to 34.42 for 𝓁1 and 34.05 for BM3D, and its SSIM was 0.9564, compared to 0.9535 for 𝓁1. Some differences are hard to see in side-by-side views, so the authors point to the additional material for flipping between results.

They also tested 𝓁2 combined with MS-SSIM, and Mix still scored higher on these indexes.

MS-SSIM alone scored a PSNR of 33.29, below the 34.42 of the 𝓁1-trained network. The authors tie this to the color shifts that MS-SSIM causes in flat areas. So the authors read the gain of Mix as coming from pairing the two terms rather than from either one alone.

Super-resolution and JPEG de-blocking

For super-resolution, the authors adapted the Dong et al. network with PReLU layers and bilinear initialization. They switched to bilinear initialization because bicubic interpolation introduces high-frequency artifacts that hurt learning. Mix reached a PSNR of 31.34, slightly above 31.26 for 𝓁1 and above 30.66 for 𝓁2.

For JPEG de-blocking, the corrupted inputs came from JPEG compression at quality 25 in Matlab's imwrite. Mix reached a PSNR of 33.25, compared to 32.96 for 𝓁1 and 27.66 for MS-SSIM alone. Visually, the authors say Mix removes the ringing around edges better than either 𝓁1 or 𝓁2.

MS-SSIM alone falls far behind on PSNR for this task, which suggests the 𝓁1 term matters here too.

Does a better loss also reach a better 𝓁2 solution?

Even after convergence, a network trained with 𝓁1 scored better on the 𝓁2 loss than the network trained with 𝓁2.

To test this, they took one network trained with 𝓁1 and one trained with 𝓁2, and trained each again with the other loss until convergence. The 𝓁2 loss on the testing set then fell for both networks. The network trained with 𝓁1 first and 𝓁2 afterwards reached 0.3896 on the 1000·𝓁2 scale, compared to 0.3939 for the opposite order.

The authors read this as confirming that the 𝓁2-only network had convergence issues. Neither switched network beat Mix on any of the perceptual metrics the authors use. The experiment covers only the denoising task, with the networks trained from several initializations.

Why SSIM and MS-SSIM trail 𝓁1 on color

Table I also shows SSIM and MS-SSIM trailing 𝓁1, and the authors trace this to the design of the losses rather than to convergence. Smaller σG keeps edges sharp but worsens flat regions, and larger σG does the opposite. In a toy example, the SSIM value at a pixel near an edge rose with window size, from 0.2084 at σG of 1 to 0.9806 at σG of 9.

A larger window spans both sides of the edge, so it sees the edge and tolerates the same noise more easily. The authors connect this to an edge masking effect in human vision. SSIM is also insensitive to a uniform bias in bright regions, because its contrast-based term shrinks when the background is bright.

MS-SSIM fixes the noise near edges through its multi-scale nature, but not the color changes in flat areas such as the sky. The authors note that SSIM losses were designed for grayscale images, so applying them to color is an approximation. A color metric such as FSIMc would fit better, but no differentiable version was found, and the authors leave this to future work.

Limitations

The authors acknowledge that generating training and testing data with the same forward process could amount to an inverse crime. They argue that the forward model resembles how a lens and sensor blur and sample light, and that their study isolates the effect of the loss.

When the Gaussian standard deviation of the synthetic data changed from 3 to 5 pixels, the Mix network's MS-SSIM fell from 0.9829 to 0.9752. The networks trained with 𝓁1 and 𝓁2 reached 0.9744 and 0.9748 on the changed data. The authors read the similar drop across losses as evidence that the ranking between losses holds.

The weight α was set empirically, and the authors did not perform a thorough search over it. The evaluation covers three restoration tasks, and the SSIM-type losses are approximations for color images. A differentiable color-aware metric is the open question the authors name.

Paper info

Authors
Hang Zhao, Orazio Gallo, Iuri Frosio, Jan Kautz
Venue
arXiv · Preprint
First published
2015-11-28
Added
2026-11-12
Updated
2018-4-20
Version
v3
arXiv
1511.08861
Category
cs.CV
Original paper terms
arXiv non-exclusive 1.0
What we show
Paper info and commentary

AI commentary is a separate explanation from the original paper and may contain errors. The original paper and figures follow each source's terms of use and any rights noted separately.

Quote from the paper

Hang Zhao, Orazio Gallo, Iuri Frosio, Jan Kautz (2015). Loss Functions for Neural Networks for Image Processing. arXiv:1511.08861v3. https://arxiv.org/abs/1511.08861v3

BibTeX
@misc{zhao2015loss,
  title = {{Loss Functions for Neural Networks for Image Processing}},
  author = {Hang Zhao and Orazio Gallo and Iuri Frosio and Jan Kautz},
  year = {2015},
  eprint = {1511.08861},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1511.08861v3}
}

See related papersBrowse other papers

Paper preview
Account security

Connect Google account

If you connect a Google account, you can sign in with it too.

Refivu

Delete account

Refivu
Refivu

Sign up