Skip to content
View kirilklein's full-sized avatar
:octocat:
:octocat:

Block or report kirilklein

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Content in all repositories owned by your account will be closed.
Maximum 250 characters. Please don’t include any personal information such as legal names or email addresses. Markdown is supported. This note will only be visible to you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
kirilklein/README.md

Kiril Klein

Machine Learning Engineer · Causal Inference & Clinical NLP · PhD

LinkedIn Google Scholar Email

I build ML systems for clinical data: transformers pre-trained on longitudinal electronic health records, clinical NLP pipelines, and causal-inference methods for estimating treatment effects from observational data. PhD in Machine Learning and Causal Inference, University of Copenhagen.


Work

Aiomic (Copenhagen) — building the product ML stack from scratch: transformers combined with classical NLP/ML in a single pipeline, from data preparation and training through validation to Docker-based services and CI/CD.

PhD, University of CopenhagenScalable Causal Inference on Electronic Health Records Using Transformers. Pre-training transformers on structured longitudinal EHR and using them for outcome prediction and treatment-effect estimation.

Currently — maintaining CausalEstimate and contributing treatment-effect fixes to statsmodels.


Open source

CausalEstimate
Author. Pandas-native library for treatment-effect estimation: TMLE, AIPW, IPW, matching, bootstrap inference. Bring your own propensity and outcome models.

PyPI Stars
statsmodels
Contributor. Bug fixes to TreatmentEffect: consistent propensity-score clipping (#10223) and corrected GMM moment conditions for AIPW-WLS / IPW-RA (#10221).

2 merged PRs
BONSAI
Core contributor. Collaborative codebase for transformer-based modeling of EHR; successor to CORE-BEHRT.

Stars Forks
PHAIR-EHR
Author. Research extension of CORE-BEHRT for causal analyses on EHR data; codebase behind the PhD thesis.

Stars Forks

Selected publications

MEDS — An Emerging Data Standard and Ecosystem for Health AI Research
NEJM AI, 2026. Co-author. (website · GitHub org)

CORE-BEHRT: A Carefully Optimized and Rigorously Evaluated BEHRT
PMLR vol. 252 (MLHC), 2024. Joint first author.

Full list on Google Scholar.


Python · PyTorch / Lightning · Hydra · scikit-learn · Dask · Docker · Azure · GitHub Actions

Some professional work lives under my work account, @kvk-cmd.

Pinned Loading

  1. FGA-DIKU/BONSAI FGA-DIKU/BONSAI Public

    A BERT-based framework for processing and analyzing Electronic Health Records (EHR) data. It provides an end-to-end pipeline for data preprocessing, model training, and clinical outcome prediction.

    Python 11 6

  2. mikkelfo/CORE-BEHRT mikkelfo/CORE-BEHRT Public

    Jupyter Notebook 19 5

  3. CausalEstimate CausalEstimate Public

    Lightweight causal inference from precomputed propensity scores and outcome predictions: IPW, AIPW, TMLE, matching, bootstrap CIs. Pandas-native.

    Python 3 2

  4. bonsai-causal bonsai-causal Public

    BONSAI Causal: transformer (ModernBERT) pipeline for EHR data in MEDS format, extended for causal inference — cohort matching, joint exposure/outcome finetuning, calibration, IPW/AIPW/TMLE effect e…

    Python 2 2

  5. FGA-DIKU/ehr2meds FGA-DIKU/ehr2meds Public

    Scripts for transforming raw EHR data into the structured MEDS format

    Python 4 2