AMAlireza S. Mahani

Alireza S. Mahani

*This is an algorithmically generated author record based on publicly available information.

Alireza S. Mahani has a total of 20 co-authors. Here are the top co-authors by number of shared publications:


Latest Publications

  • Open Access

    Estimating the potential cardiovascular benefit of lifestyle risk factors using causal machine learning: Insights from UK Biobank

    by Christophe A.T. Stevens, Julia Brandts, Amany Elshorbagy, Fotios Barkas, Didac Llop Paredes, Kanika I. Dharmayat, Irene Karungi, Sunganani Kwilasi, Alireza Mahani, Mansour T.A. Sharabiani, et al.

  • Open Access

    TabuLLM: Feature Extraction and Interpretation of Text Columns in Tabular Data Using Large Language Models

    by Mansour T.A. Sharabiani, Alex Bottle, Alireza Mahani

    TabuLLM is a Python package for extracting and interpreting LLM-based text features from datasets that combine free-text and structured columns. Motivated by a clinical study predicting postoperative acute kidney injury in paediatric cardiopulmonary bypass patients from electronic health records, the package integrates large language model (LLM) embeddings into scikit-learn-compatible pipelines for tabular datasets containing text columns alongside structured features. The package provides three core components: 1) TextColumnTransformer wraps the LangChain embedding ecosystem in a scikit-learn transformer interface with native multi-column handling; 2) GMMFeatureExtractor extends scikit-learn's Gaussian mixture model with a transform() method that returns per-cluster log-joint features for dimensionality reduction; and 3) ClusterExplainer generates natural language cluster descriptions using LLMs with recursive summarization, optional outcome-based statistical testing, and narrative synthesis. On a fraud detection benchmark, incorporating text features via TabuLLM improves test AUC from 0.92 to 0.98, with stacking ensemble variants reaching 0.99. TabuLLM thus lowers the barrier to text-tabular integration: state-of-the-art embeddings become a drop-in addition to existing scikit-learn pipelines, with interpretability tools to understand what the text features capture. The package is available via pip install tabullm.

  • Open Access

    Towards goal-directed perfusion - Part II: Temperature dependence of Q 10 , oxygen-demand dependence on age and weight, further clinical insights

    by Mansour T. A. Sharabiani, Alireza S. Mahani, Richard W. Issitt, Yadav Srinivasan, Alex Bottle, Serban Stoica

    Background: Goal-directed perfusion (GDP) during cardiopulmonary bypass (CPB) seeks to match oxygen delivery with patient-specific metabolic demand, yet determinants of oxygen demand and dynamics of oxygen extraction ratio (OER) are not well characterised in paediatric populations. Building on our GARIX (Global AutoRegressive Integrated model with eXogenous variables and an equilibrium force) model from Part 1, we analysed minute-level intraoperative data to derive clinical insights. Methods: GARIX integrates autoregressive memory, exogenous clinical variables (cardiac index, haemoglobin, arterial oxygen saturation, temperature), and an equilibrium component defining indexed oxygen demand (tVO 2 i) as a function of age, weight, and temperature. We applied GARIX to 20,443 minutes of data from 293 paediatric CPB procedures to study: (1) age- and weight-related variation in oxygen demand; (2) temperature dependence of demand, estimating local and interval Q 10 ; (3) age-stratified OER responses to haemoglobin and other variables; and (4) time evolution of the mismatch between oxygen consumption and demand after step changes in oxygen delivery. Results: tVO 2 i followed a non-monotonic pattern, rising from birth to ∼3 years and declining thereafter. Metabolic demand decreased nonlinearly with temperature, with a 17% reduction from 37°C to 32°C and 39% further reduction to 27°C. Local Q 10 ranged from ∼1.3 near normothermia to ∼3.8 in deep hypothermia. OER responsiveness to haemoglobin was blunted in neonates and infants compared with older children. Simulations revealed transient over- and under-oxygenation following step changes in oxygen delivery due to lags in OER adaptation. Conclusions: We identify risks of over- and under-oxygenation during CPB despite normal OER readings, challenge the use of fixed targets and constant Q 10 , and highlight age- and weight-dependent dynamics. These findings support individualised, time-aware perfusion strategies and lay the groundwork for model-guided decision support and control.


  • Open Access

    Towards goal-directed perfusion – Part I: Developing physiology-inspired mathematical framework using high-resolution paediatric CPB data

    by Mansour T. A. Sharabiani, Alireza S. Mahani, Richard W. Issitt, Yadav Srinivasan, Alex Bottle, Serban Stoica

    Background: During cardiopulmonary bypass (CPB), goal-directed perfusion (GDP) seeks to match oxygen delivery to metabolic demand, but the dynamics of oxygen extraction and intraoperative oxygen demand remain poorly understood, especially in paediatric populations. Existing models rely on limited data and assume, for example, a linear relationship between log oxygen demand and temperature. Methods: We developed GARIX (Global AutoRegressive Integrated model with eXogenous variables and an equilibrium force) to predict minute-by-minute changes in oxygen extraction ratio (OER) using high-resolution intraoperative data. GARIX combines: (1) an autoregressive term group (ATG) encoding memory of past OER; (2) an exogenous term group (XTG) incorporating recent and planned changes in cardiac index (CI), haemoglobin (Hb), SaO 2 , and temperature; and (3) an equilibrium term group (ETG) that aligns oxygen consumption with demand via nonlinear temperature and patient-specific terms (log age, log weight, and interaction). A baseline model (bGARIX) used a linear temperature term and no patient-specific covariates. We trained on 20,443 min from 293 paediatric CPB procedures and evaluated performance through repeated K-fold cross-validation, simulations, and bootstrap confidence intervals. Results: GARIX reproduced physiologically plausible OER dynamics. Lagged coefficients captured adaptive responses to CI, Hb, SaO 2 , and temperature. Equilibrium analysis estimated a Q 10 of 2.5 with bGARIX, matching textbook values (2.4–2.7). Likelihood ratio tests confirmed GARIX’s improved fit, revealing age- and weight-related heterogeneity and nonlinearity in temperature dependence. Variable importance showed ATG and XTG dominated predictive accuracy, underscoring the role of system dynamics. Simulations indicated slow OER response to CI and Hb and faster adaptation to temperature. Conclusions: GARIX offers an interpretable, physiology-aligned model of oxygenation dynamics in paediatric CPB, enabling estimation of dynamic responses and latent demand. It provides a foundation for clinical insights and future real-time monitoring and intelligent perfusion control.


  • Open Access

    Mathematical Modelling of Oxygenation Dynamics using High-Resolution Perfusion Data – Part 2: Physiological Insights

    by Mansour T. A. Sharabiani, Alireza S. Mahani, Richard W. Issitt, Yadav Srinivasan, Alex Bottle, Serban Stoica

    Background: Accurate prediction of oxygen demand is essential for optimizing oxygen delivery during paediatric cardiopulmonary bypass (CPB), but traditional models may not fully account for the influences of temperature, age, and weight. We aimed to quantify these relationships and assess age-related variability in the oxygen extraction ratio (OER) response. Methods: We analysed data from 334 paediatric patients undergoing CPB, developing an extended GARIX model (eGARIX) that incorporates age, weight, and nonparametric temperature modelling via splines. Subgroup analyses compared OER responses to changes in haemoglobin and arterial oxygen saturation across different age groups. Results: eGARIX significantly improved model fit over GARIX (p < 0.001). Oxygen demand per body surface area exhibited a nonlinear relationship with age and weight, peaking around 3 years. In neonates and infants, oxygen demand positively correlated with weight; in adolescents, the correlation was negative. The temperature dependence was more complex than constant-Q 10 models predict, showing reduced sensitivity of oxygen demand to mild hypothermia and increased sensitivity at deep hypothermia. Younger patients showed a diminished OER response to haemoglobin changes. Conclusions: Age and weight significantly affect oxygen demand during paediatric CPB, highlighting the need for individualized models. Our findings challenge constant-Q 10 assumptions, indicating that nonparametric models better capture temperature effects. Personalized oxygen delivery strategies are essential; further validation is recommended.


  • Open Access

    GenAI Exceeds Clinical Experts in Predicting Acute Kidney Injury following Paediatric Cardiopulmonary Bypass 2

    by Mansour T.A. Sharabiani, Alireza S. Mahani, Alex Bottle, Yadav Srinivasan, Richard Issitt, Serban Stoica

    Motivation Embedding large language models (LLMs) hold promise for predictive analytics due to their natively consistent numeric output. This study explores the utility of general-purpose LLMs for extracting interpretable and actionable insights from electronic health record (EHR) text columns in tabular data, focusing on paediatric cardiopulmonary bypass (CPB). Methods We analysed data from 963 paediatric CPB operations in the UK (2019-2021), focusing on the severity of post-operative acute kidney injury (AKI) as a binary outcome, and using text columns documenting planned surgical procedures and patient diagnoses for each operation as features. We employed OpenAI’s text-embedding-3-large for embeddings and gpt-4-turbo for generating descriptive labels of patient clusters that were formed by applying spherical k-means to embedding vectors. These ‘AI clusters’ were compared against the ‘expert clusters’ - based on the Partial Risk Adjustment in Surgery (PRAiS) v2 protocol - for 1) consistency using adjusted rand index (ARI) between the clusters and 2) predictive performance using area under ROC (AUC) of logistic regression models using cluster memberships as a categorical variable. Results ‘AI clusters’ showed statistically significant levels of consistency with ‘expert clusters’, evidenced by their ARIs of 0.31 and 0.32 for planned procedures and diagnoses, respectively. The clusters demonstrated comparable discriminative power in predicting severe post-operative kidney injury, with AUCs of 0.63 vs. 0.60 (planned procedures) and 0.56 vs. 0.58 (diagnoses) for AI clusters vs. expert clusters. Notably, AI clusters identified three interventions with significant odds ratios for AKI severity, highlighting potential areas for clinical focus. Replacing k-means clustering followed by logistic regression with k-nearest-neighbours - applied to LLM text embeddings - further improved AUC to 0.66 and 0.63, for planned procedures and diagnoses, respectively. Conclusions Our findings affirm the potential of LLMs as effective tools in medical text analysis, facilitating both exploratory and predictive tasks. The integration of LLM-derived insights with traditional data analysis methods can significantly enhance risk stratification and outcome prediction in paediatric CPB, underscoring the value of AI-driven approaches in complex healthcare datasets.

  • Open Access

    Mathematical Modelling of Oxygenation Dynamics using High-Resolution Perfusion Data – Part 1: Statistical Framework

    by Mansour T. A. Sharabiani, Alireza S. Mahani, Richard W. Issitt, Yadav Srinivasan, Alex Bottle, Serban Stoica

    Background: Balancing oxygen supply and demand during cardiopulmonary bypass (CPB) is crucial to minimise adverse outcomes. This is managed by adjusting oxygen delivery components – cardiac index (CI), haemoglobin concentration (Hb), arterial oxygen saturation (SaO 2 ) – and metabolic demand through temperature (Temp) changes. The oxygen extraction ratio (OER) responds to these adjustments, affecting oxygen consumption, but this response is not well understood. We aimed to develop a mathematical model to capture OER dynamics during CPB and quantify oxygen demand’s dependence on temperature. Methods: We developed GARIX, a time-series model predicting minute-by-minute OER changes during CPB, incorporating exogenous variables (CI, Hb, SaO 2 , Temp) and an equilibrium term representing the difference between oxygen consumption and temperature-dependent oxygen demand, modelled linearly per the van’t Hoff specification (constant Q 10 ). The model was trained on data from 343 CPB operations (20,000 minutes) in 334 paediatric patients at a UK centre (2019–2021). We used variable importance analysis and simulations to study the model’s properties. Results: The model shows OER adapts to align oxygen consumption with demand. The adaptive response has a rapid phase (10 = 2.25, indicating oxygen demand doubles with every 8.5°C increase in temperature during CPB. Conclusions: Our model provides a physiologically plausible framework for explaining OER changes during CPB, capturing dynamic adjustments and steady-state oxygen consumption. These findings highlight the value of mathematical modelling in estimating key oxygenation parameters like Q 10 , given limitations on clinical experimentation.


  • Motion repulsion arises from stimulus statistics when analyzed with a clustering algorithm

    by Alireza S. Mahani, Anders E. Carlsson, Ralf Wessel

    Motion repulsion is the perceived enlargement of the angle between the directions of motion of two transparently moving patterns. An explanation of this illusion has long been sought for in the neural circuitry of the brain. We show that motion repulsion already arises from the statistical properties of the motion transparency problem when analyzed with a clustering algorithm.