← Latest papers
🤖 machine learning

Improving Patient Subtyping on Longitudinal Data using Representations from Mamba-based Architecture

This paper proposes a self-supervised Mamba-based model that learns effective representations from irregular longitudinal electronic health record data to significantly improve patient subtyping and precision medicine outcomes compared to existing baseline models.

Original authors: Md Mozaharul Mottalib, Rahmatollah Beheshti

Published 2026-06-30
📖 5 min read🧠 Deep dive

Original authors: Md Mozaharul Mottalib, Rahmatollah Beheshti

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

The Big Picture: Sorting Patients Like a Librarian

Imagine a hospital as a massive library where every patient has a "book" of their medical history. These books are messy. Some pages are missing, some are written in different languages, and the entries are scattered randomly across time (like a patient getting a blood test on Monday, an X-ray three weeks later, and a check-up six months after that).

Doctors need to group these patients into "clubs" or subtypes based on how their diseases progress. This helps them treat people more precisely. However, sorting these messy, irregular books is incredibly hard for computers.

The Problem: The "Quadratic" Bottleneck

The paper explains that previous computer models (called Transformers) were like librarians who tried to read every single page of every book against every other page to find similarities.

  • The Analogy: If you have 10 books, it's easy to compare them all. But if you have 1,000 books, the librarian has to do a million comparisons. If you have 10,000 books, they have to do 100 million comparisons. This is called quadratic complexity (O(L2)O(L^2)).
  • The Result: To avoid the computer crashing, these old models had to throw away long patient histories or chop them into tiny, rigid chunks (like forcing a long story into a 50-word summary). This meant they missed the subtle, long-term patterns of how a disease actually develops.

The Solution: The "Mamba" Train

The authors built a new model called Triplet-Mamba. Instead of a librarian comparing every page to every other page, they used a Mamba architecture.

  • The Analogy: Think of Mamba as a high-speed train moving through the patient's history. It doesn't stop to compare every single station to every other station. Instead, it moves linearly (one step at a time), remembering the important context as it goes. This is linear complexity (O(L)O(L)).
  • Why it matters: It can handle a patient's entire life history (even if it spans years) without the computer running out of memory. It's fast and efficient.

How It Handles Messy Data: The "Triplet" System

Real medical data is irregular. A patient might get a temperature reading at 2:00 PM and a blood test at 4:30 PM the next day. Old models often forced this data into a neat grid (like a spreadsheet), which loses the exact timing.

Triplet-Mamba treats every piece of data as a Triplet:

  1. Time: When it happened.
  2. Feature: What it was (e.g., "Blood Pressure").
  3. Value: How much (e.g., "120").
  • The Analogy: Instead of forcing a messy diary into a calendar, the model reads the diary exactly as written: "On Tuesday, I felt dizzy (Time: Tuesday, Feature: Dizziness, Value: High)." This preserves the exact, messy reality of the patient's life.

The Training: Learning Without a Teacher

The paper describes a Self-Supervised approach.

  • The Analogy: Imagine teaching a student to understand a story by having them read a book with the last page missing and asking them to guess what happens next. They aren't being told the answer by a teacher; they are learning the structure of the story by trying to predict the future.
  • In the paper: The model looks at a patient's past records and tries to predict their future lab results. By doing this millions of times, it learns a deep, internal map of how diseases progress. It learns the "shape" of the disease, not just memorizing labels.

The Results: Better Grouping

The researchers tested this new model on real-world data (including ICU patients and children with weight management issues) and compared it to the best existing models (like STraTS and DuETT).

  1. Better "Clubs": When they used the model's internal map to group patients, the groups were much tighter and more distinct.
    • The Metric: They used a score called the Silhouette Score. Think of this as a "grouping quality" score. Triplet-Mamba got the highest scores, meaning the patients in each group were very similar to each other and very different from patients in other groups.
  2. Better Predictions: The model was also slightly better at predicting outcomes (like mortality or weight loss) than the competition.
  3. Stability: The groups the model found were stable. If you gave the model slightly different data, it still found the same groups. This suggests the groups are real patterns, not just random noise.

The Takeaway

The paper claims that by switching from "quadratic" models (which get slow and messy with long data) to "linear" Mamba models, and by treating data as flexible triplets rather than rigid grids, they created a system that understands long, messy patient histories much better. This leads to more accurate ways of grouping patients, which is the first step toward personalized medicine.

What the paper does NOT claim:

  • It does not claim this is currently being used in hospitals to treat patients today.
  • It does not claim the model can read medical text (like doctor's notes) or look at X-rays yet (it currently focuses on numbers and timestamps).
  • It does not promise that this will cure diseases, only that it improves the grouping and prediction tools used by researchers.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →