Leo Gagnon
· 2 previous affiliations
- Université de MontréalSince 2018
- PhD student · 2022–2028
- Baccalauréat, Mathématiques et informatique · 2018–2021
- Undergrad student · 2019–2021
- Undergraduate Student Researcher · 2019
- Maîtrise, Intelligence artificielle · 2022–2023
- Undergraduate Student Researcher · 2021
Research Overview
Leo Gagnon focuses on the theoretical foundations of in-context learning, latent variable extraction in language models, and the mechanics of next-token prediction. His work investigates how transformers aggregate context and whether explicitly modeling task parameters improves generalization. Recently, he has explored ambiguity-sensitive prediction methods and the relationship between sequence modeling and algorithmic simplicity.
Research Trajectory
Gagnon’s published work begins in 2024 with collaborative research in the area of The Algorithmic Mechanics of In-Context Learning. In Explicit Knowledge Factorization Meets In-Context Learning: What Do We Gain?, he and his co-authors investigated whether separating a Transformer's context aggregation—the process of inferring task parameters—from its predictive modeling offers tangible benefits over standard, implicit in-context learning. The study revealed that while explicit factorization enhances interpretability and control, it does not consistently yield performance gains, indicating that current decoder architectures struggle to effectively utilize these inferred latent variables.
In 2025, Gagnon contributed to theoretical work connecting sequence modeling to data compression. The paper In-Context Learning and Occam's Razor established a mathematical equivalence between the next-token prediction objective and prequential coding. This research demonstrated that in-context learning explicitly minimizes both training error and model complexity, offering a theoretical explanation for the model's effectiveness in the research direction of Addressing Overfitting in Few-Shot Learning and the broader area of Algorithmic Simplicity Bias in Universal Induction.
Building on these insights into sequence modeling, Gagnon led the development of new approaches for handling uncertain inputs. In Next-Token Prediction Should be Ambiguity-Sensitive : A Meta-Learing Perspective, he argued that standard Transformers fail to adapt their computational effort when faced with ambiguous contexts. To address this, he introduced a synthetic benchmark, MetaHMM, and proposed a Monte Carlo predictor that decouples task inference from token prediction, demonstrating improved performance in ambiguous scenarios. This work contributes to the emerging area of Inference Time Compute Scaling for Complex Reasoning.
Continuing his investigation into latent structures, Gagnon collaborated on Does learning the right latent variables necessarily improve in-context learning?. This study asked whether forcing a model to extract correct underlying rules via an architectural bottleneck improves its ability to generalize. Surprisingly, the findings showed that while the bottleneck successfully isolates the correct variables—advancing work in the area of Structured Latent Spaces for Controllable Language Models—the downstream prediction engine fails to use them robustly for out-of-distribution data. This highlights ongoing challenges in the research direction of Statistical Shortcuts and the Illusion of Machine Reasoning.
Current Directions
The most recent papers in the evidence, all published in 2025, suggest a continued focus on the limitations and theoretical underpinnings of next-token prediction architectures. A central theme in Gagnon's current work is the tension between a model's ability to infer latent task structures and its capacity to actually utilize those structures for robust generalization. His research highlights that simply extracting the correct variables or rules does not automatically translate to better out-of-distribution performance. Furthermore, his recent investigations into ambiguity-sensitive prediction indicate an ongoing interest in designing mechanisms that allow language models to dynamically adjust their computational effort when processing uncertain or complex contexts.
Profile updated
Loading new papers…
Other researchers whose papers cluster into the same research directions — a proxy for overlapping technical interests and shared intellectual neighborhoods.
See something wrong? Report a mistake