Wolfgang Lehrach
· 7 previous affiliations
- Google (United Kingdom)Since 2022
- Researcher · Since 2022
- Vicarious Inc.2012–2022
- Senior Researcher · 2012–2022
- Halcyon Molecular2011–2012
- Director of Sequencing · 2011–2012
- Alacris (Germany)2010–2011
- Researcher · 2010–2011
- Microsoft (United States)2008–2010
- Postdoc · 2008–2010
- Biomathematics and Statistics Scotland2003–2008
- PhD student + continuing research · 2003–2008
- University of Edinburgh2003–2007
- PhD student · 2003–2007
Research Overview
Wolfgang Lehrach focuses on the intersection of probabilistic graphical models, world models for reinforcement learning, and the synthesis of symbolic representations using large language models. His work addresses the fundamental tension between computational tractability and model expressivity, evolving from generative models for computer vision to the development of verifiable, code-based world models for strategic planning. His current research emphasizes the creation of agents capable of navigating complex, partially observed environments by learning structured latent representations and synthesizing executable rule engines.
Research Trajectory
Lehrach’s early contributions centered on generative approaches to computer vision, specifically addressing the challenges of character recognition and segmentation under conditions of data scarcity. In Generative Shape Models: Joint Text Recognition and Segmentation with Very Little Training Data, he participated in the development of a generative framework that outperformed discriminative methods by utilizing orders of magnitude less training data. This work established an early interest in Robust Object Detection under Partial Occlusion and deformation, prioritizing models that could generalize from minimal supervision.
By 2019, Lehrach’s focus shifted toward the theoretical and practical limitations of Learning Effective Parameters for Approximate Inference. This period of his work addressed the "notoriously hard" problem of learning undirected graphical models (UGMs) with hidden variables. The primary challenge in this domain is the intractability of the partition function and the compounding errors that arise when learning and inference are decoupled. Lehrach co-developed "Query Training" (QT), a paradigm that optimizes the parameters of a probabilistic model specifically for the approximate inference algorithm that will be used at test time. This approach, detailed in Learning undirected models via query training, allows for the training of inference networks that generalize to unseen probabilistic queries, effectively bypassing the need for exact partition function calculations.
In the mid-2020s, Lehrach transitioned into the study of world models and their application to reinforcement learning (RL) and planning. This shift reflected a broader interest in Mapping Computational Principles to Biological Neural Architectures, particularly how agents represent space and history. He investigated how transformers could be adapted to learn "cognitive maps" in partially observed environments. By introducing discrete bottlenecks into transformer architectures, his work enabled the compression of observation histories into interpretable latent codes, facilitating efficient path planning where standard sequence models often fail.
Most recently, Lehrach has led research into the synthesis of symbolic world models using large language models (LLMs). This work moves beyond the limitations of Zero-Shot Visual Editing via Masked Generative Transformers and standard next-token prediction, which often struggle with logical consistency and legal move generation in strategic games. His current focus is on "Code World Models," where LLMs are used to synthesize executable Python code that serves as a verifiable rule engine for classical search algorithms.
Current Directions
Lehrach’s current research program is organized around three primary axes: the synthesis of executable world models, data-efficient reinforcement learning, and the robustness of agents in visually complex environments.
A central theme of his recent work is the integration of neural and symbolic methods. In Code World Models for General Game Playing, he demonstrates how LLMs can be leveraged to generate formal environment specifications. This approach addresses the "hallucination" problem in standard LLM agents by providing a grounded, executable framework that can be paired with Monte Carlo Tree Search (MCTS) to achieve superior strategic depth. This direction also encompasses the automatic synthesis of "code harnesses" to prevent illegal actions in competitive environments, as seen in his collaborative work on AUTOHARNESS: IMPROVING LLM AGENTS BY AUTOMATICALLY SYNTHESIZING A CODE HARNESS.
In the domain of reinforcement learning, Lehrach contributes to improving the sample efficiency of Transformer World Models (TWM). This involves refining how models reason about future tokens and how they are warmed up using real and imaginary data. His participation in the development of the DMC-VB: A Benchmark for Representation Learning for Control with Visual Distractors highlights a commitment to evaluating agent robustness against non-essential visual variations, such as background changes or camera viewpoints.
Finally, Lehrach continues to explore the intersection of Reduced Order Modeling of Biophysical Neuron Dynamics and Goal-Driven Models of the Primate Dorsal Visual Pathway. While much of his work is applied to artificial agents, the underlying motivation remains the discovery of computational principles that allow for flexible, multi-step reasoning and planning in complex, high-dimensional worlds.
Representative Work
Code World Models for General Game Playing As the lead author, Lehrach proposes a shift from using LLMs as direct actors to using them as synthesizers of executable Python "Code World Models" (CWMs). By generating these rule engines, the method enables the use of classical search algorithms like MCTS, resulting in agents that are more strategically capable and less prone to illegal moves than standard LLM-based approaches.
Query Training: Learning a Worse Model to Infer Better Marginals in Undirected Graphical Models with Hidden Variables In this work, Lehrach explores the counterintuitive idea that learning a "worse" model—one that does not necessarily capture the true data distribution—can lead to better marginal inference if the model is optimized for the specific approximate inference algorithm used at test time. This research provides a robust framework for handling undirected models where exact inference is intractable.
Learning Cognitive Maps from Transformer Representations for Efficient Planning in Partially Observed Environments Lehrach co-developed the Transformer with Discrete Bottlenecks (TDB) to address the difficulty of planning in environments with perceptual aliasing. The model learns to compress observation and action histories into discrete latent codes, effectively forming a "cognitive map" that supports navigation and path planning in complex, partially observed spaces.
Improving Transformer World Models for Data-Efficient RL As part of a larger team, Lehrach contributed to several architectural and procedural improvements for transformer-based world models. These include "block teacher forcing" for joint reasoning about future tokens and a "nearest neighbor tokenizer" for image patches, which together enabled state-of-the-art performance on the Craftax-classic benchmark, exceeding human performance in a data-efficient manner.
Learning undirected models via query training This paper introduces the foundational concepts of query training, proposing an inference network architecture that generalizes to unseen probabilistic queries. Lehrach’s work here demonstrates how to perform inference tasks in undirected graphical models without the need to compute the intractable partition function directly.
Generative Shape Models: Joint Text Recognition and Segmentation with Very Little Training Data In this early work, Lehrach contributed to a generative model for object shapes that achieved high performance on scene text recognition. The model's strength lies in its ability to perform fine-grained instance segmentation and its robustness to affine and non-affine deformations, even when trained on very small datasets.
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