Learning Spectral Methods by Transformers

Yihan He, Yuan Cao, Hong-Yu Chen, Dennis Wu, Jianqing Fan +1 more
1/2/2025
stat.MLcs.LGmath.ST

No confident code implementation found for this paper. 5 possible matches can be shown below.

Abstract

Transformers demonstrate significant advantages as the building block of modern LLMs. In this work, we study the capacities of Transformers in performing unsupervised learning. We show that multi-layered Transformers, given a sufficiently large set of pre-training instances, are able to learn the algorithms themselves and perform statistical estimation tasks given new instances. This learning paradigm is distinct from the in-context learning setup and is similar to the learning procedure of human brains where skills are learned through past experience. Theoretically, we prove that pre-trained Transformers can learn the spectral methods and use the classification of bi-class Gaussian mixture model as an example. Our proof is constructive using algorithmic design techniques. Our results are built upon the similarities of multi-layered Transformer architecture with the iterative recovery algorithms used in practice. Empirically, we verify the strong capacity of the multi-layered (pre-trained) Transformer on unsupervised learning through the lens of both the PCA and the Clustering tasks performed on the synthetic and real-world datasets.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 5 weaker matches are hidden by default — 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{he2025learning,
  title  = {Learning Spectral Methods by Transformers},
  author = {Yihan He and Yuan Cao and Hong-Yu Chen and Dennis Wu and Jianqing Fan and Han Liu},
  year   = {2025},
  eprint = {2501.01312},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2501.01312v3}
}

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/2501.01312.svg)](https://codeofpaper.com/paper/2501.01312)

Discussion