Maximilian Schlegel

Google (United States)
3 previous affiliations
    • Researcher · Since 2025
    • Student Researcher · 2024–2025
  • ETH Zurich2019–2026
    • MS student · 2024–2026
    • Undergrad student · 2019–2023
    • Bachelor of Science - BSc., Computer Science
  • Freibad Lübars, Berlin2019
    • Bademeister · 2019
4Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Maximilian Schlegel focuses on the internal mechanics of sequence models, specifically investigating how neural networks perform implicit optimization during their forward passes. His trajectory traces the discovery of mesa-optimization in Transformers to the development of novel recurrent architectures that leverage test-time training. Recently, his work explores emergent temporal abstractions to improve reinforcement learning in autoregressive models.

Research Trajectory

Schlegel's published work begins in 2023 with collaborative research into the internal mechanisms of large language models. In Uncovering mesa-optimization algorithms in Transformers, he and his co-authors demonstrated that Transformers trained on standard next-token prediction implicitly construct a "mesa-optimizer"—a gradient-based optimization algorithm that runs entirely within the model's forward pass. By reverse-engineering this mechanism, the research team explained the emergence of in-context learning and introduced a novel "mesa-layer" designed explicitly for efficient least-squares optimization. This work contributed to the research direction of Implicit Gradient Descent in Transformer Forward Passes, while also touching on broader areas such as Parallelizing Recurrent Models via Linear State Transitions and Deep Unfolding Networks for Inverse Problems. The study additionally provided insights relevant to the area of How Neural Networks Bypass the Curse of Dimensionality.

Building on these insights into internal optimization, Schlegel participated in the development of new recurrent architectures that explicitly engineer these mechanisms. In 2026, he co-authored MesaNet: Sequence Modeling by Locally Optimal Test-Time Training, which introduced a Recurrent Neural Network (RNN) designed to solve an internal optimization problem to optimality at every sequence step. Rather than relying on simple fast-weight updates, MesaNet utilizes a parallelizable Conjugate Gradient solver. This approach effectively trades additional test-time compute for improved performance on long-context tasks, offering a competitive alternative to other contemporary sequence models like Mamba and xLSTM. This publication advanced the research direction of Temporal Warm Starting for Iterative Optimization and addressed challenges in the area of The Memory Bottleneck of Fixed-Size Recurrent States.

That same year, Schlegel contributed to research intersecting sequence modeling and reinforcement learning (RL). In Emergent temporal abstractions in autoregressive models enable hierarchical reinforcement learning, the research team addressed the inefficiencies of token-by-token action sampling in large-scale autoregressive models fine-tuned with RL, particularly in sparse-reward environments. The study demonstrated that exploration and action can be conducted more efficiently within the internal representations of the model itself. To achieve this, the authors introduced a higher-order, non-causal sequence model that controls residual stream activations, enabling the discovery and utilization of temporally-abstract actions.

Current Directions

The most recent papers in the evidence indicate a focus on expanding the capabilities of sequence models beyond standard next-token prediction. Recent work investigates how internal model mechanisms—such as embedded optimization solvers and residual stream activations—can be explicitly controlled or engineered to improve downstream performance. This includes designing architectures that leverage test-time compute for better long-context sequence modeling, as well as developing methods to extract emergent temporal abstractions that facilitate more efficient hierarchical reinforcement learning.

Profile updated

See something wrong? Report a mistake