Martin Trapp

Martin Trapp

KTH Royal Institute of Technology · WASP – Wallenberg AI, Autonomous Systems and Software Program
9 previous affiliations
73Machine learning papers tracked by Lacuna
Is this you?

Research Overview

Martin Trapp focuses on representing, quantifying, and reducing uncertainties to build more trustworthy machine learning systems, with particular emphasis on tractable probabilistic models and Bayesian deep learning. His trajectory spans foundational work in probabilistic circuits to scalable uncertainty quantification for large-scale architectures. Currently, he investigates efficient, post-hoc Bayesian inference techniques for vision-language models and deterministic approximations for sampling-free prediction.

Research Trajectory

Martin Trapp’s early research investigated the structural and learning properties of Sum-Product Networks (SPNs), a class of tractable probabilistic models. In 2017, he explored how these models could be applied to environments with limited labeled data, detailing these methods in Safe Semi-Supervised Learning of Sum-Product Networks. Recognizing that structure learning in SPNs often relied on ad-hoc heuristics, he subsequently introduced a principled framework to decompose the problem into computational graph layout and scope function learning in Bayesian Learning of Sum-Product Networks. This foundational interest in exact inference naturally led to his participation in the development of Einsum Networks: Fast and Scalable Learning of Tractable Probabilistic Circuits, a deep-learning-style implementation that significantly accelerated probabilistic modeling. Together, these efforts contributed to the broader research area of Tractable Probabilistic Circuits for Exact Inference.

As deep learning models grew in complexity, Trapp began examining the hidden risks of over-parameterization. In Disentangling Model Multiplicity in Deep Learning, he addressed the phenomenon where neural networks with identical test accuracy make divergent predictions on individual samples. By introducing "Representational Multiplicity" to measure internal model differences, this work advanced the research direction of Model Multiplicity and Predictive Arbitrariness.

Returning to the expressiveness of tractable models, Trapp explored novel representations beyond traditional density estimation. He proposed Characteristic Circuits, which represent probability distributions in the spectral domain using characteristic functions, enabling unified modeling of heterogeneous data types. Continuing to push the boundaries of circuit expressiveness, he collaborated on Subtractive Mixture Models via Squaring: Representation and Learning, which introduced Squared Non-Monotonic Probabilistic Circuits to allow for subtractive mixtures, exponentially boosting the model's representational capacity while ensuring non-negativity. Recognizing that the practical deployment of these models requires specialized infrastructure, he later co-authored Computing Tractable Probabilistic Models: A Hardware Perspective, which analyzed the underexplored potential for hardware acceleration in explicit decision-making systems.

A major theme in Trapp’s recent trajectory is making Bayesian deep learning computationally feasible for modern architectures. Dynamic Neural Networks, which save compute by exiting early on easy inputs, often suffer from severe overconfidence. To resolve this, he developed Fixing Overconfidence in Dynamic Neural Networks, utilizing last-layer Laplace approximations and internal ensembling to provide calibrated uncertainty. This work directly contributed to the research direction of Post-hoc Uncertainty Quantification via Laplace Approximation.

To further reduce the computational burden of Bayesian methods, Trapp’s group addressed the inefficiencies of Monte Carlo sampling during inference. In Posterior Inferred, Now What? Streamlining Prediction in Bayesian Deep Learning and its subsequent refinement, Streamlining Prediction in Bayesian Deep Learning, they introduced a deterministic, single-forward-pass method. By applying local linearisation on activation functions and local Gaussian approximations at linear layers, they enabled analytical computation of the posterior predictive distribution across MLPs, CNNs, and Transformers. This methodology advanced the research areas of Deterministic Moment Propagation for Sampling-Free Uncertainty and Linearized Bayesian Neural Networks.

Trapp has also applied these scalable Bayesian techniques to large pre-trained models. In Probabilistic Active Few-Shot Learning in Vision-Language Models, his team leveraged post-hoc uncertainty estimation via Laplace approximations to guide targeted support set selection in VLMs. This framework was formalized in Post-hoc Probabilistic Vision-Language Models, which introduced BayesVLM—a method that equips models like CLIP with reliable uncertainty estimates and analytical "ProbCosine" distributions without requiring additional training.

Parallel to his work on uncertainty, Trapp has investigated generalization and generative modeling. He demonstrated in Flatness Improves Backbone Generalisation in Few-Shot Classification that optimizing for loss landscape flatness via Sharpness-Aware Minimization significantly improves multi-domain few-shot performance. In the generative space, he collaborated on Sparsely Supervised Diffusion, revealing that heavily masking pixels during training acts as a strong regularizer that forces diffusion models to capture global structure rather than memorizing local textures. Additionally, his broader commitment to accessible probabilistic modeling is reflected in his contributions to the general-purpose probabilistic programming language detailed in Turing.jl: A General-Purpose Probabilistic Programming Language.

Current Directions

The most recent papers in the evidence indicate a strong focus on scaling Bayesian inference to foundation models and improving the efficiency of generative architectures. A primary direction is the development of post-hoc probabilistic frameworks for Vision-Language Models (VLMs). By applying Laplace approximations to the final layers of pre-trained models, this work seeks to extract reliable uncertainty estimates and improve active learning without incurring the massive computational costs typically associated with retraining or sampling large-scale architectures.

Simultaneously, ongoing research addresses the fundamental computational bottlenecks of Bayesian Deep Learning. Recent efforts focus on deterministic moment propagation and local linearisation techniques to replace Monte Carlo sampling entirely, allowing for single-forward-pass predictions that maintain high calibration and accuracy. Finally, work in generative modeling investigates novel regularization strategies—such as sparse supervision via extreme pixel masking—to decouple global structure from local texture, preventing memorization and improving the structural consistency of diffusion models.

Profile updated

See something wrong? Report a mistake