Advanced Data Science and AI Techniques in Clinical Medicine

Posted by Anonymous and classified in Medicine & Health

Written on in English with a size of 386.27 KB

Foundational Concepts in Healthcare

Goals of Healthcare

  • Prevent morbidity
  • Prevent disability
  • Prevent mortality

WHO Definition of Health

The World Health Organization (WHO) defines health as: "complete physical, mental, and social well-being.”

Top Causes of Death

  • Heart disease
  • Cancer
  • Chronic lower respiratory diseases
  • Accidents
  • Stroke

Quality of Life Metrics

1VOuzS4qw0UAAAAASUVORK5CYII=

Where q represents quality and g represents time discount.

Medical Triaging Levels

Triaging categorizes patients based on immediate need and resource requirements:

  1. Immediate Risk of Death: Highest priority.
  2. Serious Immediate Medical Need: High priority.
  3. Levels 3, 4, 5: Priority is dependent on the number of resources needed (more resources required generally means a lower numerical level).

Types of Healthcare Data

  • Medical history
  • Medications
  • Vitals/Physical exam
  • Labs
  • Imaging
  • Pathology
  • Genetics
  • Notes
  • Billing
  • Administrative
  • Quantified self (e.g., diet, blood sugar)

Characteristics of an Ideal Medical Test

  • Non-invasive
  • Low-risk
  • Inexpensive
  • Accurately reflects the truth

Test Performance Metrics

  • Prevalence: (TP + FN) / N
  • Sensitivity (Recall): TP / (TP + FN)
  • Specificity: TN / (FP + TN)
  • Precision (Positive Predictive Value, PPV): TP / (TP + FP)
  • Negative Predictive Value (NPV): TN / (FN + TN)

Differential Diagnoses

The process involves:

  • Listing possible causes.
  • Considering the likelihood of each cause.
  • Evaluating the cost of diagnosis.
  • Determining the most informative test.

The Medical Cycle

g8fn5QL6U1IAAAAASUVORK5CYII=

Cognitive Theory of Diagnosis

This theory is analogous to applying the scientific method to medicine.

Sources of Clinical Data

  • Patients
  • Payers
  • Providers
  • Policymakers

Machine Learning and Data Modeling in Medicine

Risk Stratification

Grouping patients based on a specific condition (standard prediction, requiring large amounts of data). Key questions include: What is the target? What constitutes a good result?

Claims Data Characteristics and Challenges

  • Sparse data
  • Visit-level temporality
  • Long-term dependencies
  • Varying history per patient

Rule-Based Phenotyping

Setting a label based on a series of rules derived from data, enabling the training of a classifier.

Handling Time Shift in Data

Creating many data points for each patient, often dependent on the starting month (window-based approach).

Deep Models in Healthcare

Self Attention with Reverse Distillation (SARD): Uses patient-level embeddings for each visit and predicts outcomes using convolution.

Time Series Analysis

  • Traditional Approach: Peak detector, followed by feature analysis.
  • Data-Driven Approach: 1D Convolutional Network (Conv Net).

Large Language Models (LLMs) in Clinical Settings

Med-PALM and Med-PALM 2

  • Med-PALM: 540 billion parameters. Utilizes "instruction prompt tuning" (freezing model weights and optimizing with respect to prompt embeddings).
  • Med-PALM 2: An improved model featuring medical domain fine-tuning and "Chain of Retrieval Augmented Generation" (RAG). In this process, an answer is generated, then analyzed, researched, and a final, refined answer is generated.

AMIE (Articulate Medical Intelligence Explorer)

A system where multiple agents interact to facilitate learning and exploration.

Foundational NLP Models

ELMO Pretraining

Uses a bi-directional Long Short-Term Memory (LSTM) network to build an embedding for each token. Full phrases can be encoded by combining these embeddings.

Transformer Architecture

Composed of an Encoder (not masked) and a Decoder (masked).

BERT

An Encoder-only architecture.

General Purpose LLMs

For clinical applications, Chain of Thought prompting is particularly important.

Applications and Techniques of LLMs

  • Generative Applications: EHR Summaries, drafting notes/replies. (EHR summaries have been shown to reduce burden and burnout scores.)
  • Anti-Hallucination: Achieved through symbolic referencing (e.g., using JSON tags in generated data).
  • Retrieval Augmented Generation (RAG): Uses a vector database of embeddings, allowing search by semantic similarity.
  • Extractive Applications: Information extraction and de-identification.
  • Schema Enforcement: Using schemas to force structured outputs (e.g., JSON).

Survival Analysis

Empirical Survival Curves

gIxZqpkM1ZXAyNw4403Fn0WCz2vIoHRqyOqF+U6deoUDBgwoIGv2LrWygjYqjiVGaNYLYaAIWAIGAKGQIiAGTSFUNiOIWAIGAKGgCFQGQSMuVYGR6vFEDAEDAFDwBAIETDmGkJhO4aAIWAIGAKGQGUQMOZaGRytFkPAEDAEDAFDIETAmGsIhe0YAoaAIWAIGAKVQcCYa2VwtFoMAUPAEDAEDIEQAWOuIRS2YwgYAoaAIWAIVAYBY66VwdFqMQQMAUPAEDAEQgSMuYZQ2I4hYAgYAoaAIVAZBP4ffuc4eGJy7KwAAAAASUVORK5CYII=

Empirical survival curves are step functions.

wcMDc9lijAfvQAAAABJRU5ErkJggg==

Survival Distributions

  • Exponential: Assumes constant hazard (often used as a baseline).
  • Weibull: Allows for increasing or decreasing hazard (useful for recovering or actively ill patients whose condition is not improving).
  • Lognormal: Hazard increases until a peak, then decreases (common for standard illnesses).

Kaplan-Meier Estimator

Used specifically for censored data.

x+Pbe4RkcYQ5wAAAABJRU5ErkJggg==

Log-Rank Test

Used to compare observed versus expected survival curves.

gekIpOarDYBpAAAAABJRU5ErkJggg==

Where m is the number of failures and n is the risk set.

6ZYASFCVqGuAJXGw0rPigmB1LraFuEnEUkRdtohjy2QiGDoi63n41idENlHojYEtmutFR4M22uvcKXxsAWDsYJKQ70hmRSSE2RHA3cmooKrdxr16gv3PsIBKrFzhlgHRgVx8CpSuPV6VLu0U2k8yNghxVDtrX8tnU5EUgu2UtmmxEBT3rg35ZtOg24xBhKRtBh1qWKzYCARSbO86TTOFmPgv4aRoTya94fWAAAAAElFTkSuQmCC

The result is distributed according to the Chi-squared distribution.

Cox Proportional Hazard Model

MY8BgoiYHKUqWV7Iev7jHgMeAxUEsMeCZZy2nxnfIY8BioCwY8k6zLTPh+eAx4DNQSA55J1nJafKc8BjwG6oIBzyTrMhO+Hx4DHgO1xIBnkrWcFt8pjwGPgbpgwDPJusyE74fHgMdALTHgmWQtp8V3ymPAY6AuGPBMsi4z4fvhMeAxUEsMeCZZy2nxnfIY8BioCwY8k6zLTPh+eAx4DNQSA55J1nJafKc8BjwG6oIBzyTrMhO+Hx4DHgO1xIBnkrWcFt8pjwGPgbpg4D8sOGLz385tWwAAAABJRU5ErkJggg==

Causal Inference (Rubin-Neyman Framework)

Potential Outcomes

  • Y₀(x₁): Distribution of outcomes if the unit is not treated.
  • Y₁(x₁): Distribution of outcomes if the unit is treated.

Key Assumptions

  • Ignorability: B9cuSwxRipHxQAAAABJRU5ErkJggg==
  • Common Support: 3Dx9ctp2h2wAAAABJRU5ErkJggg== (Required for causal identifiability).

Causal Inference Methods

  • Covariate Adjustment: Fitting E[Y|X, T].
  • 1-NN Matching: Finding the nearest observation x in the other treatment group.
  • Propensity Scores: Calculating the Average Treatment Effect (ATE) by reweighting inversely by the propensity score. D8ix9zGbbkBygAAAABJRU5ErkJggg==

VpaTXbl3VjWKm3HTrTPltd5t2YwNoDQ2BmAiYZjYmUNbMEDAEDAFDwBAwBAwBQ6DyELAlYuXdExuRIWAIGAKGgCFgCBgChkBMBEyYjQmUNTMEDAFDwBAwBAwBQ8AQqDwETJitvHtiIzIEDAFDwBAwBAwBQ8AQiImACbMxgbJmhoAhYAgYAoaAIWAIGAKVh4AJs5V3T2xEhoAhYAgYAoaAIWAIGAIxETBhNiZQ1swQMAQMAUPAEDAEDAFDoPIQ+H+9D221qfq68QAAAABJRU5ErkJggg== Possible problems include high variance and easy miscalibration.

Instrumental Variables (IV)

An instrumental variable affects treatment assignment but does not directly affect the outcome. Example: Using a randomly assigned voucher to attend a private school (the voucher is the instrumental variable) to study the effect of private vs. public schooling.

IV Assumptions

  • The instrument is unconfounded.
  • The instrument has no effect on the outcome when conditioned on the treatment.
  • The instrument has a causal effect on the treatment.

LrLxaDhCQAgIASEgBISAEBACQkAICIHIISDHK3KnRB0SAkJACAgBISAEhIAQEAJCoNgQkONVbGdU4xECQkAICAEhIASEgBAQAkIgcgjI8YrcKVGHhIAQEAJCQAgIAdHFcnMAAADESURBVCEgBISAECg2BOR4FdsZ1XiEgBAQAkJACAgBISAEhIAQiBwCcrwid0rUISEgBISAEBACQkAICAEhIASKDQE5XsV2RjUeISAEhIAQEAJCQAgIASEgBCKHgByvyJ0SdUgICAEhIASEgBAQAkJACAiBYkNAjlexnVGNRwgIASEgBISAEBACQkAICIHIISDHK3KnRB0SAkJACAgBISAEhIAQEAJCoNgQkONVbGdU4xECQkAICAEhIASEgBAQAkIgcgj8P0FWl8fKCaqiAAAAAElFTkSuQmCC

Dataset Shift and Domain Adaptation

Types of Dataset Shift (P → Q)

  • Covariate Shift: P(Y|X) = Q(Y|X), but P(X) ≠ Q(X).
  • Label Shift: P(Y) ≠ Q(Y), but P(X|Y) = Q(X|Y).
  • Domain Shift: The observed space changes (e.g., switching from ICD-9 to ICD-10 coding systems).

Testing for Dataset Shift

  • For Label Shift: Plot distributions.
  • For Shift in X (Covariates): Compare distribution statistics (e.g., Maximum Mean Discrepancy, MMD) or compare the effectiveness of models trained on different domains.

Solutions for Covariate Shift

  • Train on sufficient data and avoid overfitting.
  • Importance reweighting wV8SaoXylwxsAAAAABJRU5ErkJggg== by learning a dataset predictor. B6rvY1fm6h0yAAAAAElFTkSuQmCC

Medical Imaging Modalities

  • X-ray, CT: Use electromagnetic radiation.
  • MRI: Uses a magnetic field.
  • Ultrasound: Uses sound waves.

Multimodal Learning in Medicine

Focuses on learning robust representations (e.g., using language models, contrastive learning, or Variational Autoencoders (VAEs)).

  • RadTex: Pretrains a model on generating reports conditioned on an image.
  • CLIP: Minimizes Contrastive Loss (CEL) and maximizes cosine similarity between text and image encoders.
  • MedTrinity-25M: Handles 10 modalities and includes annotations related to diseases.
  • BUSGen: A foundational generative model specifically for breast cancer images.
  • BiomedGPT: A vision-language foundation model capable of image analysis, understanding, summaries, and captions.
  • BiomedCLIP

Model Interpretability in Healthcare AI

Core Issues and Approaches

People tend to understand simple models, and they require understanding of complex decisions to build trust in AI systems.

  • Mycin: Used backward chaining to essentially create a decision tree.

Local vs. Global Interpretability

Global Interpretability

Aims to understand the entire model (e.g., feature ablation, weights, dependencies, filters).

  • Sparse Generalized Additive Models (GAMs): Additive models with feature expansions.
  • GRAND-SLAMN: A differentiable sparse GAM utilizing a smooth step function.
  • Supersparse Linear Integer Models

Local Interpretability

Aims to understand individual predictions (e.g., saliency maps, GradCAM).

Desiderata for Explanations

  • Interpretable: Depends on the audience and requires sparsity.
  • Local Fidelity: The explanation is not affected by small perturbations in the input.
  • Model-Agnostic: The technique can be applied to various model types.

Human-AI Collaboration

Guest Speakers

Faisal Mahmood

Related entries: