Learning Partitions from Context
Simon Buchholz
Abstract
In this paper, we study the problem of learning the structure of a discrete set of N tokens based on their interactions with other tokens. We focus on a setting where the tokens can be partitioned into a small number of classes, and there exists a real-valued function f defined on certain sets of tokens. This function, which captures the interactions between tokens, depends only on the class memberships of its arguments. The goal is to recover the class memberships of all tokens from a finite number of samples of f . We begin by analyzing this problem from both complexity-theoretic and information-theoretic viewpoints. We prove that it is NP-complete in general, and for random instances, we show that on the order of N ln( N ) samples, implying very sparse interactions, suffice to identify the partition. We then investigate the conditions under which gradient flow dynamics of token embeddings can reveal the class structure, finding that this is achievable in certain settings when given on the order of N 2 ln 2 ( N ) samples.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Builds on6
- Transformers learn to implement preconditioned gradient descent for in-context learningKwangjun Ahn, Xiang Cheng, Hadi Daneshmand, Suvrit SraNeurIPS 2023 · 324 citations
- Vision Transformers provably learn spatial structureSamy Jelassi, Michael E. Sander, Yuanzhi LiNeurIPS 2022 · 115 citations
- How Do Transformers Learn Topic Structure: Towards a Mechanistic UnderstandingYuchen Li, Yuanzhi Li, Andrej RisteskiICML 2023 · 87 citations
- Transformer Feed-Forward Layers Are Key-Value MemoriesMor Geva, Roei Schuster, Jonathan Berant, Omer LevyEMNLP 2021 · 33 citations
- Learning Associative Memories with Gradient DescentVivien Cabannes, Berfin Simsek, Alberto BiettiICML 2024 · 13 citations
Related papers
- Bounds and Complexity Results for Learning Coalition-Based Interaction Functions in Networked Social SystemsAbhijin Adiga, Chris J. Kuhlman, Madhav V. Marathe, S. S. Ravi et al.AAAI 2020 · 3 citations
- Minimax Rates for Learning Pairwise Interactions in Attention-Style ModelsShai Zucker, Xiong Wang, Fei Lu, Inbar SeroussiICLR 2026
- A multiscale analysis of mean-field transformers in the moderate interaction regimeGiuseppe Bruno, Federico Pasqualotto, Andrea AgazziNeurIPS 2025 · 29 citations
- Correlation Clustering Beyond the Pivot AlgorithmSoheil Behnezhad, Moses Charikar, Vincent Cohen-Addad, Alma Ghafari et al.ICML 2025
- A Theoretical Analysis on Feature Learning in Neural Networks: Emergence from Inputs and Advantage over Fixed FeaturesZhenmei Shi, Junyi Wei, Yingyu LiangICLR 2022 · 58 citations
