Skip to content

One-Layer Transformer Provably Learns Multiclass One-Nearest Neighbor in Context

Sep 2026 · 0 citations · 15 references
Computer Science Mathematics

TL;DR

It is shown that one-layer transformers with an argmax classification head behave identically to a one-nearest-neighbor classifier in the multiclass setting by leveraging the simplex encoding.

Abstract

We extend recent work establishing an equivalence between one-layer transformers and nearest-neighbor classifiers in the binary setting to the multiclass case. By leveraging the simplex encoding, we show that one-layer transformers with an argmax classification head behave identically to a one-nearest-neighbor classifier in the multiclass setting. This closes a gap left by prior work, whose multiclass result relied on a non-standard rounding-based approach rather than the typical argmax head used in practice.

View source

Similar papers

Conference

A Robust Twin Support Vector Machine Approach for Classification Problems with Uncertainty

In this presentation, we introduce a distributionally robust Twin Support Vector Machine (TSVM) model designed to tackle bi-class and multi-class classification challenges under uncertainty. Our model leverages first and second-order information to enhance robustness. By solving two interconnected chance-constrained SV...

Xin-Yue Xu · 0 citations
#artificial intelligence Preprint Sep 2026

Follow the Geometry, Not the Model: Cold Start Semi-Supervised Learning

VAST (Veracity-Aware Semi-Supervised Training) outperforms the strongest graph-based SSL baselines at every operating point across three datasets, with statistically significant gains in 7 of 9 comparisons, while producing a deployable inductive classifier rather than requiring transductive graph inference.

Itai David, D. Weinshall · 0 citations
#artificial intelligence Preprint Oct 2026

Retrieval-Centric Deep Learning in Growing Nonparametric Neural Networks

We investigate a general-purpose layer for deep learning that, instead of compressing arbitrary-size training data into fixed-size weight matrices, stores a new pair of key-value representations for every data point during training, and retrieves and recombines these representations through an attention mechanism at in...

Maximilian Schlegel, Rajai Nasser, Seijin Kobayashi et al. · 0 citations
Preprint Aug 2026

Cross-Domain Generalization in Machine Unlearning via Label-Conditioned Energy Magnitude Regularization

This paper studies what happens to the rest of the model when a class is forgotten, using a label-conditioned energy-based model (EBM) that assigns per-class energies, making the effect directly observable.

Syed Ali Ahmed, Syed Bilal Ahsan, Muhammad Zaigham Zaheer National University of Computer et al. · 0 citations
#machine learning Preprint Sep 2026

Minimal-Norm Univariate Two-Layer ReLU Classification: Exact Solutions and Global Optimality with Skip Connections

It is shown that adding a free affine skip connection leaves these function-space solutions unchanged but fundamentally improves the parameter-space landscape: every KKT point of the constrained problem becomes globally optimal, whereas suboptimal KKT points can occur without the skip connection.

Karolina Drabik, Ben Lewis, Antoni Puch et al. · 0 citations

Related blog posts

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.