I build ML systems end to end, from data preparation and training to deployment and evaluation.
My work spans NLP and LLMs, transformers for longitudinal health records, and causal inference.
I like open-source tools that make hard methods easier to apply and explore.
- Causal Sandbox (source): learn causal inference in the browser. Guided lessons and a simulator with confounders, mediators, colliders and six estimators, checked against the known true effect.
- CausalEstimate (source): a Python library for treatment-effect estimation from propensity scores and outcome predictions. IPW, AIPW, TMLE, matching, bootstrap confidence intervals.
- BONSAI and BONSAI Causal: a framework for training transformers on electronic health records, and its extension for causal effect estimation. Main developer.
- statsmodels: four merged pull requests to
TreatmentEffect, adding overlap and balance diagnostics and ATET/ATC for AIPW, and fixing propensity clipping and the GMM moment conditions.
- Machine Learning Engineer, Aiomic (Copenhagen, 2025 to now). Designed and built the ML system for clinical document analysis from scratch and brought it into production. It combines gradient boosting, fine-tuned encoder transformers and LLMs in one workflow, and returns the supporting document excerpts for specialist review.
- PhD, University of Copenhagen (2022 to 2026). Scalable Causal Inference on Electronic Health Records Using Transformers. A method for estimating causal drug effects from the longitudinal records of more than 2 million patients, built for drug-safety screening in PHAIR, a project involving the Danish Medicines Agency.
- CORE-BEHRT: A Carefully Optimized and Rigorously Evaluated BEHRT. MLHC 2024 (PMLR vol. 252), joint first author. Outperformed the baseline on 24 of 25 clinical prediction tasks.
- MEDS — An Emerging Data Standard and Ecosystem for Health AI Research. NEJM AI, 2026, co-author.
- BONSAI: A framework for processing and analysing Electronic Health Records (EHR) data using transformer-based models. Journal of Open Source Software, 2025, co-author.
Full list on Google Scholar.
Python · PyTorch / Lightning · Hugging Face Transformers · scikit-learn · Hydra · Dask · Docker · Azure ML · GitHub Actions
Some professional work lives under my work account, @kvk-cmd.



