Toggle Main Menu Toggle Search

Open Access padlockePrints

Targeted-BEHRT: Deep Learning for Observational Causal Inference on Longitudinal Electronic Health Records

Lookup NU author(s): Dr Ali HassaineORCiD, Dr Dexter CanoyORCiD



This work is licensed under a Creative Commons Attribution 4.0 International License (CC BY 4.0).


AuthorObservational causal inference is useful for decision-making in medicine when randomized clinical trials (RCTs) are infeasible or nongeneralizable. However, traditional approaches do not always deliver unconfounded causal conclusions in practice. The rise of “doubly robust” nonparametric tools coupled with the growth of deep learning for capturing rich representations of multimodal data offers a unique opportunity to develop and test such models for causal inference on comprehensive electronic health records (EHRs). In this article, we investigate causal modeling of an RCT-established causal association: the effect of classes of antihypertensive on incident cancer risk. We develop a transformer-based model, targeted bidirectional EHR transformer (T-BEHRT) coupled with doubly robust estimation to estimate average risk ratio (RR). We compare our model to benchmark statistical and deep learning models for causal inference in multiple experiments on semi-synthetic derivations of our dataset with various types and intensities of confounding. In order to further test the reliability of our approach, we test our model on situations of limited data. We find that our model provides more accurate estimates of relative risk least sum absolute error (SAE) from ground truth compared with benchmark estimations. Finally, our model provides an estimate of class-wise antihypertensive effect on cancer risk that is consistent with results derived from RCTs.

Publication metadata

Author(s): Rao S, Mamouei M, Salimi-Khorshidi G, Li Y, Ramakrishnan R, Hassaine A, Canoy D, Rahimi K

Publication type: Article

Publication status: Published

Journal: IEEE Transactions on Neural Networks and Learning Systems

Year: 2022

Pages: epub ahead of print

Online publication date: 23/06/2022

Acceptance date: 12/06/2022

Date deposited: 24/11/2022

ISSN (print): 2162-237X

ISSN (electronic): 2162-2388

Publisher: Institute of Electrical and Electronics Engineers Inc.


DOI: 10.1109/TNNLS.2022.3183864


Altmetrics provided by Altmetric


Funder referenceFunder name
10.13039/501100000274-British Heart Foundation (BHF) (Grant Number: FS, 21/29110 and PG/18/65/33872)
FS, 21/29110
UK Research and Innovation (UKRI) through the Global Challenges Research Fund (GCRF) (Grant Number: ES/P0110551/1)