Digital Health Transformers and Opportunities for Artificial Intelligence–Enabled Nephrology

The rapid evolution of clinical artificial intelligence (AI) has been spurred by the increasing scope and scale of digital patient data and the emergence and adaptation of specialized machine learning (ML) algorithms. Among others, the field of nephrology is poised to become a prime benefactor of the medical AI revolution, with several retrospective studies highlighting the potential for augmented clinical decision support through data-driven phenotyping and earlier and more accurate prediction of AKI, CKD, renal cell carcinoma, and kidney allograft failure.1 The rise of patient-level ML risk models from retrospective electronic health record (EHR) data suggests the opportunity for more granular and personalized inpatient care strategies. As state-of-the-art AI approaches begin to enter routine clinical practice, it will be critical for multilevel stakeholders to become versed in core AI concepts and methods for harmonious integration of data-driven predictions with existing practices and standards of care. AI is an umbrella term encompassing a diverse set of data-driven methodologies, and none have been as impactful in recent years as deep learning, the subfield of AI focused on automatically learning optimal representations of raw data. Deep learning has garnered increased interest in the AI-supported nephrology community through positive results from retrospective studies, such as the continuous, early, and accurate forecasting of AKI risk from multidimensional longitudinal patient data using recurrent neural networks (RNNs), a deep learning model designed to understand sequential or temporal data inputs.2 RNNs iteratively examine a patient's longitudinal data record step-by-step through time, and with enough patients, such models can learn global patterns that are optimal for a given prediction target such as AKI. Because deep learning is guided by the principle of automatic pattern discovery, it has the potential to derive novel patient-specific data representations and digital biomarkers that could lead to more precise and tailored treatment strategies. One of the most significant AI breakthroughs in recent years has been the development of the deep learning transformer model.3 The transformer is functionally similar to an RNN, but instead of analyzing data elements one at a time in chronological order like the RNN, the transformer develops an understanding of an input data sequence by simultaneously comparing the similarity between every pair of elements, resulting in enhanced computational efficiency and a more intuitive way to model each element in a sequence (e.g., in language, the meaning of a word often depends on its relationship to surrounding words). The process of comparing each element in a sequence with all other elements is known as self-attention and is the driving computational force behind the transformer model architecture. Originally popularized for natural language processing (NLP) tasks, transformers can also aid nephrologists through personalized predictions of patient risk (e.g., short-term AKI, long-term CKD) from a patient's sequence of clinical data measurements commonly found in digital health records (e.g., laboratory tests, vital signs, medications, medical images, clinical notes, and more). Each distinct measurement in a patient's longitudinal health record can be thought of as a health token (similar to how a sentence comprises a sequence of word tokens), and analyzing tokens with transformers can reveal interesting intertoken relationships (such as correspondence between continuous serum creatinine and patient narrative text) that may enable more complex data-driven understandings of overall kidney health and the discovery of subtle digital biomarkers of reduced kidney function. Using AI to analyze relationships between input patient measurements and outcomes can highlight potentially modifiable risk factors that are most influential for prediction. For example, on the basis of the attention similarity score between serum creatinine and urine output measurements, a transformer could infer that for a patient with nonoliguric AKI, the probability of early kidney recovery is associated with urine output volume. Such opportunities for enhanced transparency can lead to better clinician understanding of AI-driven predictions and facilitate a higher level of clinical trust in prognostication and clinical decision making. Transformers offer additional benefits in modeling high-dimensional and sparse EHR data where, because of their flexibility due to self-attention, common technical preprocessing steps such as longitudinal resampling and missing data imputation can both be obviated. Transformers are also more adept at capturing longer-term temporal relationships (such as associating signs of drug-induced nephrotoxicity days after initial exposure), a critical step for accurately modeling a patient's entire health history. AI is currently experiencing a fundamental paradigm shift in which transformers are replacing many traditional deep learning models and are reshaping the way researchers approach many sequential learning applications. While predominantly known for state-of-the-art results in NLP,4,5 transformers are now beginning to demonstrate superior performance across several clinical applications with longitudinal patient data (e.g., Bidirectional Electronic Health Records Transformers for predicting patient diagnoses6). The successful translation of NLP modeling approaches to longitudinal EHR data is best understood through metaphor: Just as text documents are composed of hierarchical sequences of paragraphs, sentences, words, and characters, longitudinal EHRs can be thought of as analogous compositional and temporal sequences of hospital admissions, outpatient clinic visits, medical and diagnostic treatment codes, vital signs, laboratory tests, and even radiography, pathology, and natural language text. A critical component to the success of many transformer-based approaches is the symbiotic notion of pretraining and transfer learning. In the NLP domain, transformers have shown a remarkable capability to understand the intricacies of human language by learning to predict subsequent (Generative Pre-Trained Transformer 3) or masked (Bidirectional Encoder Representations from Transformers) words from massive corpora of unlabeled text. These pretrained language models can be fine-tuned and adapted to a wide-ranging diversity of downstream prediction tasks. While currently most notable for NLP applications, we anticipate similar effects in the clinical domain using patient data at unprecedented scale made possible by the rise of private and secure pseudo-data sharing techniques such as federated learning.7 Transformer models have already resulted in remarkable advancements in computer vision and NLP and are beginning to make an effect in retrospective patient-level prediction studies. Above all, clinical support tools using health care data and complex transformer technology (Figure 1) offer nephrologists a solution for automatically and intelligently connecting complementary sources of patient data. Personalized models of kidney health resulting from a data-driven understanding across modalities can be used to provide patient-specific risk scores earlier and more accurately than existing approaches and may be able to identify novel digital biomarkers of impaired kidney function.Figure 1: Overview of a multimodal transformer framework for modeling longitudinal patient data. EHR, electronic health record.Given the potential for harm in a nephrology and broader clinical setting, the emergence of these AI frameworks and their eventual integration into patient-facing tools carry significant societal and ethical implications.8 Similar to other AI technologies, transformers carry the potential to perpetuate structural inequities and bias in our health care system. As the representational capacity and predictive capability of transformer-based neural networks continue to rapidly evolve and make their way into clinical practice, it will be critical for nephrologists and medical AI researchers to share a common vocabulary and clearly set expectations and guiding principles to ensure positive and equitable predictions for patients affected by their decisions. We are in the midst of a fundamental shift and methodological convergence across the AI continuum, and by raising awareness of fundamental transformer modeling approaches across the nephrology community, we can directly engage clinical stakeholders to influence the evolution of these important emerging AI models.