Advanced AI for Healthcare

Introduction to LSTMs

Dr. Greg Chism

U of A InfoSci + DataLab

Objective

Provide a conceptual overview of sequence modeling, focusing on the principles of LSTMs and their applications in handling sequential healthcare data.

No code today 🙂

Overview of topics

  1. Introduction to Sequence Modeling

  2. LSTMs in Healthcare

  3. Why Use LSTMs?

  4. Key Components of LSTMs

Introduction to Sequence Modeling

Introduction to Sequence Modeling

Definition: Sequence modeling involves predicting future values based on previous data points, capturing patterns and dependencies over time.

  • Examples of Sequential Data:

    • Time series (e.g., heart rate over time).

    • Text (e.g., clinical notes).

    • EHR data (e.g., patient vitals tracked over hospital stays).

  • Importance in Healthcare:

    • Helps predict patient outcomes, monitor disease progression, and tailor treatments based on sequential patterns in patient data.

Recurrent Neural Networks (RNNs)

  • Handles sequence data, like time series or language.

  • Captures dependencies over time.

  • Health Sciences Application: Predicting patient outcomes over time.

RNNs (another view)

  • X = input vector

  • A = hidden vector

  • h = output vector

Long Short-Term Memory (LSTM)

Widely because they retain context for extended periods.

Apple

Google

LSTMs in healthcare

  • Clinical Diagnosis & Prediction: Predict patient outcomes, like disease progression or readmission, from EHR time-series.

  • Drug Discovery: Predict drug efficacy and side effects from molecular sequences.

  • Medical Time-Series: Detect abnormalities (e.g., arrhythmias, epilepsy) from physiological signals like ECG and EEG.

  • Healthcare Speech Processing: Improve voice recognition in medical transcription and virtual assistants.

  • Patient Pathway Modeling: Analyze clinical event sequences to predict future healthcare needs.

  • Wearable Monitoring: Monitor health in real time through wearable data (e.g., heart rate, sleep patterns).

Why use LSTMs?

  • Sequential Data Processing: Ideal for analyzing time-series data like EHRs and vital signs.

  • Capturing Long-Term Patterns: Retains medical history for better predictions of outcomes and disease progression.

  • Anomaly Detection: Identifies irregularities in continuous data, such as ECG or blood pressure trends.

  • Natural Language Understanding: Enhances medical transcription and summarization of clinical notes.

  • Handles Irregular Data: Manages gaps and irregular intervals in patient records effectively.

  • Real-Time Monitoring: Powers wearable device data analysis for early alerts.

  • End-to-End Learning: Learns directly from raw healthcare data, minimizing manual preprocessing.

Long Short-Term Memory (LSTM)

Key components: Input state (\(X_t\))

Input state \(X_t\): The feature vector for the current time step.

Key components: Cell state (\(C_t\))

Cell state \(C_t\): The internal memory, updated at each time step, storing long-term information.

Key components: Input gates (σ)

Forget Gate:
Decides how much of the previous cell state \(c_{t-1}\)​ to keep or forget.

Input Gate:
Controls how much of the new input will be added to the cell state.

Output Gate: Determines how much of the cell state influences the next hidden state \(h_t\)

Key components: Tanh layer

Tanh (tanh): Creates candidate values for updating the cell state, with outputs between -1 and 1.

Key components: Multiplication (x)

Multiplication (x): Element-wise multiplication used in forget, input, and output gates to adjust the cell and hidden states.

Key components: Addition (+)

Addition (+): Combines the results of the forget and input gates to update the cell state.

Key components: Copy & Concatenate

Copy or concatenate information: helps retain information across time steps. The copy operation preserves the flow of important information.

Key components: Hidden state (\(h_t\))

Hidden state \(h_t\): The output at time step \(t\), filtered from the cell state and passed to the next cell.

Process flow

Process flow

Process flow

Process flow

Process flow

Process flow

Full picture

Thank You 😊