Three AI Agents Tackle Sleep Disorder Diagnosis With Transparent Reasoning

Every night, roughly one in three adults sleeps poorly enough to warrant clinical concern. Yet diagnosing sleep disorders remains stubbornly difficult, because the causes span so many domains: bedtime habits, stress levels, caffeine intake, physical activity patterns, heart rate variability, occupational demands. Standard statistical tools struggle to untangle which factors matter and how they interact.

Researchers at the University of Malaya in Kuala Lumpur have proposed a novel way to bridge that gap. Instead of feeding sleep data into a single machine learning model that produces an opaque prediction, they built a framework using three specialized large language model agents that work in sequence, each handling a different layer of the analysis.

The Fragmented Analysis Problem

Sleep research has long suffered from a methodological split. Traditional statistical approaches such as linear regression rely on assumptions that real world sleep data rarely satisfies. Machine learning models can capture complex nonlinear patterns, but they come with a trade off: they are largely uninterpretable.

If you value careful, fact-driven reporting, consider supporting 1ban.news.

Make a difference

A neural network that flags a patient as high risk for sleep apnea cannot explain why. In a clinical setting, that opacity is a liability. Physicians need to understand a model’s reasoning before acting on its output. And regulatory frameworks for medical AI increasingly demand transparency.

The University of Malaya team framed the problem as one of fragmented analysis. A data scientist sees correlations and p values. A sleep physician sees clinical phenotypes. A third reviewer sees contradictions in evidence. Each perspective is valuable, but no single analyst consistently integrates all three.

Three Specialized Agents, One Pipeline

The researchers designed a multi agent framework that explicitly mirrors this division of labor. The first agent, called the Data Analyst Agent, works directly with structured sleep health data. It computes pairwise bootstrap correlations, evaluates feature relevance, and identifies interaction effects among variables such as bedtime consistency, daily caffeine intake, light exposure before sleep, psychological stress, and heart rate.

That quantitative output passes to the second agent, the Physiology and Health Analyst Agent. This agent receives the statistical findings and interprets them in the language of sleep medicine. It does not simply report that caffeine intake correlates with reduced sleep duration. It contextualizes that correlation against known mechanisms of adenosine receptor blockade, circadian phase delay, and individual metabolic variability.

The third agent, the Validation Analyst Agent, performs an evidence grounded verification step. It checks each claim produced by the first two agents against established sleep research literature, flags internal inconsistencies, and either confirms the finding, suggests refinement, or signals insufficient support. The pipeline iterates: the validation agent’s output feeds back to the data and physiology agents for revision until the entire analysis reaches a stable, internally consistent state.

The authors describe this as a separation of concerns that preserves the strengths of each analytical mode while compensating for their individual blind spots. The data agent is fast and exhaustive but lacks domain context. The physiology agent is clinically informed but may overinterpret noise. The validation agent is skeptical but cannot generate new analysis on its own. Together they impose a discipline that no single model could achieve alone.

What the Agents Found

Applied to a combination of public sleep health datasets and a synthetic dataset designed for controlled distributional testing, the framework produced a pattern of results that is both informative and cautious.

Most pairwise associations between common lifestyle factors and continuous sleep outcomes such as total sleep time or sleep efficiency were weak or statistically uncertain. Bedtime consistency, light exposure before bed, caffeine intake, self reported stress, and resting heart rate each showed only modest correlations with sleep duration or quality when examined in isolation. This finding aligns with what sleep clinicians have long suspected: single factor explanations for sleep problems are rarely sufficient.

The agents did identify stronger signals under specific conditions. High caffeine intake was associated with elevated sleep disorder risk, a finding consistent with the well established dose response relationship between caffeine and sleep disruption. But the more nuanced discovery came from physical activity analysis. The type of exercise mattered considerably. Agility drills, jump tests, and lateral movement exercises were linked to insomnia symptoms. Endurance running was linked to sleep apnea. The agents surfaced this distinction because they examined activity type as a categorical variable rather than collapsing all exercise into a single metric of total activity volume.

Occupational context, psychological stress, stimulant use, and physiological indicators jointly influenced sleep disorder profiles in ways that no single variable explained on its own. The framework captured these interaction effects through its iterative cross agent workflow, identifying clusters of risk that would likely be missed by a conventional regression model.

The authors cautioned that several pairwise physiological associations remained weak and should be interpreted cautiously. The framework’s value, they argued, lies not in producing dramatic effect sizes but in structuring the evidence in a way that supports clinical reasoning without overclaiming statistical certainty.

Why Interpretable AI Matters for Sleep Medicine

The broader significance of this work is methodological. Sleep medicine, like many fields of clinical diagnosis, is moving toward data driven decision support. But the adoption of AI in practice depends on trust, and trust depends on understanding.

A model that outputs a sleep disorder probability without explanation forces clinicians to choose between blind acceptance and outright rejection. A model that walks through its reasoning step by step, citing the data it used and the physiological rationale it applied, invites the clinician into the diagnostic process.

The multi agent framework is not the first attempt at interpretable AI, but it is among the first to apply a collaborative LLM architecture specifically to sleep disorder analysis. By making each agent’s contribution legible and auditable, the system creates a verifiable reasoning chain from raw data to clinical inference.

This approach also has practical implications for model debugging and bias detection. If a particular agent consistently overweights certain variables or misinterprets a physiological relationship, the error is traceable to a specific component of the pipeline. In a monolithic model, such biases remain hidden.

Limitations and the Road Ahead

The study has important limitations. The most significant is that the second dataset used for cross dataset comparison was synthetic, generated to match the distributional properties of the real data. This makes the cross dataset analysis a test of distributional robustness rather than external clinical validation. The framework performed consistently across real and synthetic distributions, but that consistency does not imply that its findings would replicate in an independent clinical cohort.

The study was also exploratory in design. It was not intended to produce diagnostic thresholds or treatment recommendations. The sample sizes in the real world datasets were modest, and the synthetic dataset, while useful for methodological testing, cannot substitute for prospective clinical data collection.

Future work will need to validate the framework against polysomnography confirmed diagnoses, treatment outcome data, and diverse demographic populations before it can be considered ready for clinical deployment. The University of Malaya team notes that the modular design of the pipeline makes it adaptable, but that adaptability has yet to be tested in practice.

Source

Chongyang Fu, Syed Kamaruzaman Bin Syed Ali, Mohd Shahril Nizam Bin Shaharom. A multi-agent framework based on large language models for sleep disorder analysis. Frontiers in Neurology, Vol. 17, Article 1851192, 6 July 2026. DOI: 10.3389/fneur.2026.1851192. Open access.

Scroll to Top