Saved in:
Bibliographic Details
Main Authors: Maulen-Soto, Rodrigo, Marion, Pierre, Boyer, Claire
Format: Preprint
Published: 2025
Subjects:
Online Access:https://arxiv.org/abs/2505.13112
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866914116511203328
author Maulen-Soto, Rodrigo
Marion, Pierre
Boyer, Claire
author_facet Maulen-Soto, Rodrigo
Marion, Pierre
Boyer, Claire
contents Transformers have emerged as a powerful neural network architecture capable of tackling a wide range of learning tasks. In this work, we provide a theoretical analysis of their ability to automatically extract structure from data in an unsupervised setting. In particular, we demonstrate their suitability for clustering when the input data is generated from a Gaussian mixture model. To this end, we study a simplified two-head attention layer and define a population risk whose minimization with unlabeled data drives the head parameters to align with the true mixture centroids. This phenomenon highlights the ability of attention-based layers to capture underlying distributional structure. We further examine an attention layer with key, query, and value matrices fixed to the identity, and show that, even without any trainable parameters, it can perform in-context quantization, revealing the surprising capacity of transformer-based methods to adapt dynamically to input-specific distributions.
format Preprint
id arxiv_https___arxiv_org_abs_2505_13112
institution arXiv
publishDate 2025
record_format arxiv
spellingShingle Attention-based clustering
Maulen-Soto, Rodrigo
Marion, Pierre
Boyer, Claire
Machine Learning
Transformers have emerged as a powerful neural network architecture capable of tackling a wide range of learning tasks. In this work, we provide a theoretical analysis of their ability to automatically extract structure from data in an unsupervised setting. In particular, we demonstrate their suitability for clustering when the input data is generated from a Gaussian mixture model. To this end, we study a simplified two-head attention layer and define a population risk whose minimization with unlabeled data drives the head parameters to align with the true mixture centroids. This phenomenon highlights the ability of attention-based layers to capture underlying distributional structure. We further examine an attention layer with key, query, and value matrices fixed to the identity, and show that, even without any trainable parameters, it can perform in-context quantization, revealing the surprising capacity of transformer-based methods to adapt dynamically to input-specific distributions.
title Attention-based clustering
topic Machine Learning
url https://arxiv.org/abs/2505.13112