From Softmax to Score: Transformers Can Effectively Implement In-Context Denoising Steps

Paul Rosu, Lawrence Carin, Xiang Cheng
1/1/2025
diffusion-flowtransformer-attention

No confident code implementation found for this paper.

Abstract

Transformers have emerged as powerful meta-learners, with growing evidence that they implement learning algorithms within their forward pass. We study this phenomenon in the context of denoising, presenting a unified framework that shows Transformers can implement (a) manifold denoising via Laplacian flows, (b) score-based denoising from diffusion models, and (c) a generalized form of anisotropic diffusion denoising.

Show full abstract

Our theory establishes exact equivalence between Transformer attention updates and these algorithms. Empirically, we validate these findings on image denoising tasks, showing that even simple Transformers can perform robust denoising both with and without context. These results illustrate the Transformer’s flexibility as a denoising meta-learner. Code available at https://github.com/paulrosu11/Transformers_are_ Diffusion_Denoisers

DOISemantic Scholar

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{rosu2025from,
  title  = {From Softmax to Score: Transformers Can Effectively Implement In-Context Denoising Steps},
  author = {Paul Rosu and Lawrence Carin and Xiang Cheng},
  year   = {2025},
  doi    = {10.52202/085713-4787},
  url    = {https://doi.org/10.52202/085713-4787},
  journal = {Neural Information Processing Systems}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/11a99f84dc030700005080218894a9bfc8daa680.svg)](https://codeofpaper.com/paper/11a99f84dc030700005080218894a9bfc8daa680)

Discussion