Matteo Pagliardini

Matteo Pagliardini

1 previous affiliation
22Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Matteo Pagliardini focuses on the optimization and architectural efficiency of deep learning systems, with specific emphasis on transformer scaling, robust generalization, and minimax dynamics. His trajectory spans foundational work in representation learning and optimization algorithms to recent innovations in hardware-aware attention mechanisms and test-time compute scaling for large language models.

Research Trajectory

Pagliardini’s early research explored efficient representation learning for natural language. In 2018, he developed an unsupervised objective to train distributed representations of sentences in Unsupervised Learning of Sentence Embeddings Using Compositional n-Gram Features, demonstrating that compositional n-gram features could yield robust, general-purpose sentence embeddings that outperformed existing unsupervised models on benchmark tasks.

His focus subsequently expanded into the theoretical and practical challenges of training complex generative models. Addressing the notorious instability of Generative Adversarial Networks, he co-authored Taming GANs with Lookahead-Minmax in 2021. This work adapted the Lookahead algorithm for minmax optimization, utilizing a backtracking step to naturally handle rotational game dynamics and high variance. This contribution advanced the research direction of Stabilizing Gradient Dynamics in Minimax Optimization.

Between 2022 and 2023, Pagliardini extensively investigated the implicit "simplicity bias" of gradient-based learning algorithms and its detrimental effect on out-of-distribution (OOD) generalization. To combat the tendency of neural networks to rely on narrow decision margins and spurious features, he introduced a training framework in Improving Generalization via Uncertainty Driven Perturbations that perturbs data points to maximize model uncertainty, effectively widening classification margins. Concurrently, he developed the D-BAT method, first presented in Diversity through Disagreement for Better Transferability and further formalized in Agree to Disagree: Diversity through Disagreement for Better Transferability. This approach trains ensembles to disagree on OOD data while agreeing on in-distribution data, mitigating shortcut learning and encouraging the discovery of diverse, transferable features.

As transformer models scaled to process increasingly long sequences, Pagliardini turned his attention to the architectural bottlenecks of self-attention. In 2023, he addressed the quadratic scaling of attention mechanisms with Fast Attention Over Long Sequences With Dynamic Sparse Flash Attention. Recognizing that many theoretical sparse attention patterns fail to achieve practical speedups due to memory access inefficiencies, this work optimized sparsity for GPU hardware. This research significantly impacted the area of Hardware-Aware Sparse Attention for Long Contexts and the related field of Hardware-Aware Sparse Attention for Long-Context Transformers. Continuing to refine transformer architectures, he introduced DenseFormer: Enhancing Information Flow in Transformers via Depth Weighted Averaging in 2024. By allowing each transformer block to access the outputs of all preceding blocks, DenseFormer achieved the performance of much deeper models while improving speed and memory efficiency.

In 2024, Pagliardini also contributed to several advancements in optimization and pretraining methodologies. He participated in developing a first-order primal-dual method in A Primal-Dual Approach to Solving Variational Inequalities with General Constraints, which achieved last-iterate convergence for monotone operators without requiring Lipschitz smoothness, contributing to the broader area of Robust Convergence for Non-Lipschitz Variational Inequalities. Returning to momentum-based optimizers, he questioned the standard use of a single Exponential Moving Average (EMA) for gradients in AdEMAMix: Better and Faster Training with Older Gradients, proposing a method to better balance the influence of immediate and older gradients. Additionally, he co-authored DOGE: Domain Reweighting with Generalization Estimation, a framework that uses a small proxy model to automatically determine optimal data domain mixtures during LLM pretraining. This work advanced the research direction of Automated Data Mixture Optimization for Language Models.

Most recently, in 2025, Pagliardini's research has focused on scaling inference compute and internalizing reasoning processes. With collaborators, he developed CoTFormer: A Chain of Thought Driven Architecture with Budget-Adaptive Computation Cost at Inference, an architecture that treats internal recurrent passes as implicit tokens, enabling dynamic compute allocation for difficult sequences. This aligns with his ongoing work in the area of Dynamic Token Level Computation in Transformers. He further explored test-time compute scaling in Thinking Slow, Fast: Scaling Inference Compute with Distilled Reasoners, investigating how smaller, subquadratic models like Mamba can be distilled from pretrained transformers to leverage superior generation throughput for complex reasoning tasks.

Current Directions

Pagliardini’s most recent work investigates the intersection of architectural efficiency and test-time compute scaling for large language models. A major focus is budget-adaptive inference, where models dynamically allocate computational resources to specific tokens or reasoning steps based on difficulty. This involves internalizing Chain-of-Thought reasoning directly into the transformer architecture through latent recurrence, allowing models to "think" longer on complex problems without uniformly increasing the cost of all forward passes.

Additionally, his current research addresses the distillation of reasoning trajectories into highly efficient, subquadratic architectures. By training hybrid and pure state-space models to replicate the reasoning processes of larger transformers, this work aims to overcome the generation throughput limitations of standard self-attention. Alongside these architectural innovations, he continues to explore data-centric optimization, specifically the automated curation and reweighting of pretraining data mixtures to maximize downstream generalization and reasoning capabilities.

Profile updated

See something wrong? Report a mistake