mlsanityData to 7 Oct 2026

Learning to Scale Temperature in Masked Self-Attention for Image Inpainting

arXiv 2302.06130 ↗First posted 13 Feb 2023cs.CVcited by 3

Not on the map. Why?

Abstract (arXiv)

Recent advances in deep generative adversarial networks (GAN) and self-attention mechanism have led to significant improvements in the challenging task of inpainting large missing regions in an image. These methods integrate self-attention mechanism in neural networks to utilize surrounding neural elements based on their correlation and help the networks capture long-range dependencies. Temperature is a parameter in the Softmax function used in the self-attention, and it enables biasing the distribution of attention scores towards a handful of similar patches. Most existing self-attention mechanisms in image inpainting are convolution-based and set the temperature as a constant, performing patch matching in a limited feature space. In this work, we analyze the artifacts and training problems in previous self-attention mechanisms, and redesign the temperature learning network as well as the self-attention mechanism to address them. We present an image inpainting framework with a multi-head temperature masked self-attention mechanism, which provides stable and efficient temperature learning and uses multiple distant contextual information for high quality image inpainting. In addition to improving image quality of inpainting results, we generalize the proposed model to user-guided image editing by introducing a new sketch generation method. Extensive experiments on various datasets such as Paris StreetView, CelebA-HQ and Places2 clearly demonstrate that our method not only generates more natural inpainting results than previous works both in terms of perception image quality and quantitative metrics, but also enables to help users to generate more flexible results that are related to their sketch guidance.

Key facts. Cited by 3 papers in the map (data through 7 Oct 2026). Builds on 32 of its 53 references that are in the map. First posted on arXiv 13 Feb 2023.

Builds on

32 of 53 references.

References · 32

  1. 2017Attention Is All You Needcited by 59,932
  2. 2014Adam: A Method for Stochastic Optimizationcited by 36,960
  3. 2021Learning Transferable Visual Models From Natural Language Supervisioncited by 33,456
  4. 2020A Simple Framework for Contrastive Learning of Visual Representationscited by 11,979
  5. 2015Distilling the Knowledge in a Neural Networkcited by 10,076
  6. 2017Progressive Growing of GANs for Improved Quality, Stability, and Variationcited by 2,967
  7. 2016Perceptual Losses for Real-Time Style Transfer and Super-Resolutioncited by 2,678
  8. 2017Improved Training of Wasserstein GANscited by 2,223
  9. 2018Spectral Normalization for Generative Adversarial Networkscited by 1,618
  10. 2016Context Encoders: Feature Learning by Inpaintingcited by 1,424
  11. 2019An Introduction to Variational Autoencoderscited by 997
  12. 2018Self-Attention Generative Adversarial Networkscited by 809
20 more
  1. 2021Resolution-robust Large Mask Inpainting with Fourier Convolutionscited by 730
  2. 2018Free-Form Image Inpainting with Gated Convolutioncited by 594
  3. 2018Generative Image Inpainting with Contextual Attentioncited by 578
  4. 2018Image Inpainting for Irregular Holes Using Partial Convolutionscited by 505
  5. 2018Why ReLU networks yield high-confidence predictions far away from the training data and how to mitigate the problemcited by 323
  6. 2017Geometric GANcited by 232
  7. 2021Pixel Difference Networks for Efficient Edge Detectioncited by 167
  8. 2019Pluralistic Image Completioncited by 162
  9. 2021High-Fidelity Pluralistic Image Completion with Transformerscited by 134
  10. 2018Neural Nearest Neighbors Networkscited by 98
  11. 2018Language GANs Falling Shortcited by 97
  12. 2019Coherent Semantic Attention for Image Inpaintingcited by 97
  13. 2016High-Resolution Image Inpainting using Multi-Scale Neural Patch Synthesiscited by 89
  14. 2021WaveFill: A Wavelet-based Generation Network for Image Inpaintingcited by 44
  15. 2020Self-supervised Knowledge Distillation for Few-shot Learningcited by 41
  16. 2021Bridging Global Context Interactions for High-Fidelity Image Completioncited by 40
  17. 2020Temperature check: theory and practice for training models with softmax-cross-entropy lossescited by 31
  18. 2021Temperature as Uncertainty in Contrastive Learningcited by 25
  19. 2020Texture Memory-Augmented Deep Patch-Based Image Inpaintingcited by 22
  20. 2018Learning When to Concentrate or Divert Attention: Self-Adaptive Attention Temperature for Neural Machine Translationcited by 10

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2024: 1; 2025: 1; 2026: 1.

3 papers.