Arrow Research search

Author name cluster

Roey Magen

Possible papers associated with this exact author name in Arrow. This page groups case-insensitive exact name matches and is not a full identity disambiguation profile.

4 papers
1 author row

Possible papers

4

NeurIPS Conference 2025 Conference Paper

Benign Overfitting in Single-Head Attention

  • Roey Magen
  • Shuning Shang
  • Zhiwei Xu
  • Spencer Frei
  • Wei Hu
  • Gal Vardi

The phenomenon of benign overfitting, where a trained neural network perfectly fits noisy training data but still achieves near-optimal test performance, has been extensively studied in recent years for linear models and fully-connected/convolutional networks. In this work, we study benign overfitting in a single-head softmax attention model, which is the fundamental building block of Transformers. We prove that under appropriate conditions, the model exhibits benign overfitting in a classification setting already after two steps of gradient descent. Moreover, we show conditions where a minimum-norm/maximum-margin interpolator exhibits benign overfitting. We study how the overfitting behavior depends on the signal-to-noise ratio (SNR) of the data distribution, namely, the ratio between norms of signal and noise tokens, and prove that a sufficiently large SNR is both necessary and sufficient for benign overfitting.

NeurIPS Conference 2025 Conference Paper

Transformers are almost optimal metalearners for linear classification

  • Roey Magen
  • Gal Vardi

Transformers have demonstrated impressive in-context learning (ICL) capabilities, raising the question of whether they can serve as metalearners that adapt to new tasks using only a small number of in-context examples, without any further training. While recent theoretical work has studied transformers' ability to perform ICL, most of these analyses do not address the formal metalearning setting, where the objective is to solve a collection of related tasks more efficiently than would be possible by solving each task individually. In this paper, we provide the first theoretical analysis showing that a simplified transformer architecture trained via gradient descent can act as a near-optimal metalearner in a linear classification setting. We consider a natural family of tasks where each task corresponds to a class-conditional Gaussian mixture model, with the mean vectors lying in a shared $k$-dimensional subspace of $\mathbb{R}^d$. After training on a sufficient number of such tasks, we show that the transformer can generalize to a new task using only $\widetilde{O}(k / \widetilde{R}^4)$ in-context examples, where $\widetilde{R}$ denotes the signal strength at test time. This performance (almost) matches that of an optimal learner that knows exactly the shared subspace and significantly outperforms any learner that only has access to the in-context data, which requires $\Omega(d / \widetilde{R}^4)$ examples to generalize.

NeurIPS Conference 2023 Conference Paper

Initialization-Dependent Sample Complexity of Linear Predictors and Neural Networks

  • Roey Magen
  • Ohad Shamir

We provide several new results on the sample complexity of vector-valued linear predictors (parameterized by a matrix), and more generally neural networks. Focusing on size-independent bounds, where only the Frobenius norm distance of the parameters from some fixed reference matrix $W_0$ is controlled, we show that the sample complexity behavior can be surprisingly different than what we may expect considering the well-studied setting of scalar-valued linear predictors. This also leads to new sample complexity bounds for feed-forward neural networks, tackling some open questions in the literature, and establishing a new convex linear prediction problem that is provably learnable without uniform convergence.

TCS Journal 2023 Journal Article

Mirror games against an open book player

  • Roey Magen
  • Moni Naor

Mirror games were invented by Garg and Schneider (ITCS 2019). Alice and Bob take turns (with Alice playing first) in declaring numbers from the set { 1, 2, …, 2 n }. If a player picks a number that was previously played, that player loses the game and the other player wins. If all numbers are declared without repetition, the result is a draw. Bob has a simple mirror strategy that assures he won't lose the game and requires no memory. On the other hand, Garg and Schneider showed that every deterministic Alice requires memory of size that is proportional to n in order to secure a draw. Regarding probabilistic strategies, previous work showed that assuming Alice has access to a secret random perfect matching over { 1, 2, …, 2 n } allows her to achieve a draw in the game w. p. at least 1 − 1 n and using only polylog bits of memory. We show that the requirement for secret bits is crucial: for an ‘open book’ Alice with no secrets (Bob knows her memory but not future coin flips) and memory of at most n / 4 c bits for any c ≥ 2, there is a Bob that wins w. p. close to 1 − 2 − c / 2.

v2026.09.13