mlsanityData to 7 Oct 2026

Patch-Based Stochastic Attention for Image Editing

arXiv 2202.03163 ↗First posted 7 Feb 2022cs.CVcited by 3

Not on the map. Why?

Abstract (arXiv)

Attention mechanisms have become of crucial importance in deep learning in recent years. These non-local operations, which are similar to traditional patch-based methods in image processing, complement local convolutions. However, computing the full attention matrix is an expensive step with heavy memory and computational loads. These limitations curb network architectures and performances, in particular for the case of high resolution images. We propose an efficient attention layer based on the stochastic algorithm PatchMatch, which is used for determining approximate nearest neighbors. We refer to our proposed layer as a "Patch-based Stochastic Attention Layer" (PSAL). Furthermore, we propose different approaches, based on patch aggregation, to ensure the differentiability of PSAL, thus allowing end-to-end training of any network containing our layer. PSAL has a small memory footprint and can therefore scale to high resolution images. It maintains this footprint without sacrificing spatial precision and globality of the nearest neighbors, which means that it can be easily inserted in any level of a deep architecture, even in shallower levels. We demonstrate the usefulness of PSAL on several image editing tasks, such as image inpainting, guided image colorization, and single-image super-resolution. Our code is available at: https://github.com/ncherel/psal

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

Builds on

24 of 44 references.

References · 24

  1. 2017Attention Is All You Needcited by 59,932
  2. 2018BERT: Pre-training of Deep Bidirectional Transformers for Language Understandingcited by 40,204
  3. 2020Denoising Diffusion Probabilistic Modelscited by 20,851
  4. 2021Swin Transformer: Hierarchical Vision Transformer using Shifted Windowscited by 12,082
  5. 2020End-to-End Object Detection with Transformerscited by 7,384
  6. 2017Non-local Neural Networkscited by 2,290
  7. 2020Transformers are RNNs: Fast Autoregressive Transformers with Linear Attentioncited by 1,979
  8. 2020Big Bird: Transformers for Longer Sequencescited by 1,673
  9. 2020Reformer: The Efficient Transformercited by 1,658
  10. 2020Rethinking Attention with Performerscited by 1,584
  11. 2019Generating Long Sequences with Sparse Transformerscited by 1,523
  12. 2020Linformer: Self-Attention with Linear Complexitycited by 1,462
12 more
  1. 2016Context Encoders: Feature Learning by Inpaintingcited by 1,424
  2. 2018Image Super-Resolution Using Very Deep Residual Channel Attention Networkscited by 1,256
  3. 2018Self-Attention Generative Adversarial Networkscited by 809
  4. 2020Efficient Transformers: A Surveycited by 784
  5. 2018Image Transformercited by 770
  6. 2018Generative Image Inpainting with Contextual Attentioncited by 578
  7. 2019Stand-Alone Self-Attention in Vision Modelscited by 542
  8. 2018Non-Local Recurrent Network for Image Restorationcited by 160
  9. 2016Combining Markov Random Fields and Convolutional Neural Networks for Image Synthesiscited by 102
  10. 2018Neural Nearest Neighbors Networkscited by 98
  11. 2018Shift-Net: Image Inpainting via Deep Feature Rearrangementcited by 87
  12. 2019SCRAM: Spatially Coherent Randomized Attention Mapscited by 1

Built on by

Cited by year (2026 to 7 Oct)

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

3 papers.