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
Where q represents quality and g represents time discount.
Medical Triaging Levels
Triaging categorizes patients based on immediate need and resource requirements:
- Immediate Risk of Death: Highest priority.
- Serious Immediate Medical Need: High priority.
- 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
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
Empirical survival curves are step functions.
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.
Log-Rank Test
Used to compare observed versus expected survival curves.
Where m is the number of failures and n is the risk set.
The result is distributed according to the Chi-squared distribution.
Cox Proportional Hazard Model
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:
- Common Support:
(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.
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.
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
by learning a dataset predictor.
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