Niklas Pfister
· 2 previous affiliations
- Lakera AISince 2024
- Researcher · Since 2024
- University of CopenhagenCurrent
- Current
- Associate Professor · 2020–2024
Research Overview
Niklas Pfister focuses on statistical methodology for complex data structures, causal inference, and the safety of generative artificial intelligence. His earlier work developed robust statistical tools for causal discovery and invariant prediction under distribution shifts. More recently, his research addresses the security of large language models, investigating adaptive threat models and defense mechanisms for autonomous AI agents.
Research Trajectory
Pfister’s early research established foundational methods in non-parametric statistics and causal discovery. In 2017, he introduced a flexible framework for testing joint independence among an arbitrary number of random variables in Kernel-Based Tests for Joint Independence. By leveraging kernel embeddings in Hilbert spaces, this work provided a robust alternative to traditional pairwise tests, proving particularly useful for complex causal discovery tasks. He subsequently extended the "Invariant Causal Prediction" framework to sequential data with Invariant Causal Prediction for Sequential Data (2018). This method exploited non-stationarity in time-ordered data to detect instantaneous causal effects without requiring knowledge of specific intervention times or locations, contributing to the research direction of Instantaneous Causal Discovery for High Frequency Time Series and the related area of Causal Discovery from Nonstationary Distribution Shifts. Continuing his work on complex noise structures, he and his collaborators developed coroICA in Robustifying Independent Component Analysis by Adjusting for Group-Wise Stationary Noise (2019), an algorithm designed to decompose multivariate observations corrupted by hidden, group-wise stationary confounding.
By 2022, Pfister’s focus had broadened to address the challenges of distribution generalization and high-dimensional causal inference. In A Causal Framework for Distribution Generalization (2022), he formalized the problem of distribution shift, a major hurdle when deploying machine learning models in novel environments. Concurrently, he investigated the use of exogenous heterogeneity to learn causal structures in Identifiability of Sparse Causal Effects using Instrumental Variables (2022). This work provided conditions under which causal coefficients in linear models become identifiable even with a small number of instruments, advancing the broader area of Sparsity for Causal Identification in High Dimensions.
Throughout 2023 and 2024, Pfister continued to refine statistical tools for non-ideal data environments. He explored prediction under unobserved confounding in Boosted Control Functions (2023) and applied invariance principles to reinforcement learning in Effect-Invariant Mechanisms for Policy Generalization (2023), seeking features where the relationship between context and reward remains stable across environments. He also formalized methods for hypothesis testing across domains in Statistical testing under distributional shifts (2023), demonstrating how resampling techniques can preserve statistical guarantees even when target distributions differ from training data. In Extrapolation-Aware Nonparametric Statistical Inference (2024), he addressed the tendency of flexible non-parametric models to produce overconfident or arbitrary predictions when extrapolating outside their training range. Returning to instrumental variables, he introduced the spaceTSIV framework in Sparse Causal Effect Estimation using Two-Sample Summary Statistics in the Presence of Unmeasured Confounding (2024). This method enabled the estimation of causal effects in high-dimensional genetic studies using only summary statistics, contributing to work in the area of Robust Causal Inference Under Weak Identification.
In his recent work as a Staff Research Scientist at Lakera AI, Pfister’s published research has expanded to address the safety and security of large language models (LLMs). In 2025, he contributed to Gandalf the Red: Adaptive Security for LLMs, which introduced a dynamic threat model (D-SEC) for evaluating LLM defenses. Supported by a massive dataset of adaptive prompt attacks from a gamified red-teaming platform, the research highlighted the necessity of multi-layered defenses and the trade-offs between security and usability. He further investigated the vulnerabilities of language models deployed as autonomous agents in Breaking Agent Backbones: Evaluating the Security of Backbone LLMs in AI Agents (2026), aligning with the research direction of Internal Reasoning as a Defense Mechanism.
Concurrently, Pfister has continued to advance methodological research on non-stationary environments, building on his long-standing interest in the area of Invariant Representation Learning Across Diverse Environments. In 2026, he formalized a framework for splitting conditional distributions into time-invariant and time-dependent components in Invariant Subspace Decomposition, allowing models to exploit historical data even as underlying distributions change. Similarly, Invariance-Based Dynamic Regret Minimization (2026) applied these invariance principles to online recommendation systems and algorithmic trading, demonstrating how to identify stable patterns amidst shifting environmental rules.
Current Directions
Based on his most recent publications, Pfister’s current research operates at the intersection of generative AI security and robust statistical methodology for dynamic environments. A major focus is the safety of large language models, particularly when deployed as autonomous agents. This work involves developing adaptive threat models, scaling safety evaluations through gamified red-teaming, and understanding the trade-offs between robust security measures and the degradation of normal model performance.
Alongside his applied work in AI safety, he continues to develop theoretical frameworks for machine learning in non-stationary settings. Recent papers investigate how to minimize dynamic regret and decompose conditional distributions in environments that shift over time. By identifying invariant subspaces that remain constant despite external changes, this research aims to build models that can safely leverage long-term historical data in fast-moving domains like algorithmic trading and sequential decision-making.
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