AI, adult ADHD, and what changes when a model must distinguish one diagnosis from another.
Before a machine-learning model in Sweden could become good at predicting adult ADHD, its researchers had to change the group it was comparing ADHD against.
The original group included psychiatric outpatients without a recorded ADHD diagnosis or relevant medication history. Most had a recorded diagnosis of depression or anxiety, conditions whose symptoms can overlap with ADHD.
The researchers excluded that subgroup. It represented 62.8 percent of the original control group. In the authors' words, the model "only achieved strong performance when patients with depression or anxiety diagnoses were removed."¹
They reported the decision and explained why they considered it clinically justified.
What matters is how that decision changed the question the model was asked to answer.
A classifier does not simply learn what ADHD looks like. It learns a distinction between people assigned to one group and people assigned to another. If the second group changes, so does the distinction.
In medicine, the other group is not a collection of interchangeable negative examples. It may consist of people who also have trouble concentrating, whose mood or anxiety affects daily functioning, or who have several conditions at once.
They are precisely the people a clinician may need to distinguish, not because their symptoms are identical, but because they can be similar enough to complicate an assessment.
The first question, before looking at a score, is therefore not how sophisticated the algorithm is.
It is who the algorithm was asked to tell apart.
Before the model had a score
The Swedish team used electronic health records to explore whether a transformer-based model could flag adults who would receive an ADHD diagnosis months later.¹ Rather than creating a new test, it analyzed information already recorded by health services, including diagnoses, medication codes, and demographic information across time.
There is a practical attraction to this approach. Records are produced during routine care. If they contain patterns associated with a later diagnosis, a system might help identify patients worth assessing earlier.
But the study's target was a future recorded diagnosis. It was not a clinician independently re-examining every person to establish the true cause of their difficulties.
The initial comparison was also demanding. The controls were psychiatric outpatients without an ADHD code or medication marker, not a handpicked group of volunteers with no mental health history. When the researchers used that broader group, their model struggled. They explored exclusions and found substantially better separation after removing control patients with depression or anxiety diagnoses.¹
That left a more tractable comparison, which the researchers defended on clinical and statistical grounds. The problem is not that the narrower comparison should never have been studied. It is that the result belongs to that narrower comparison.
The reported six-month model achieved an AUROC of 0.79.¹ That is a measure of separation across thresholds, not a statement that 79 percent of people arriving at an outpatient clinic would receive the right diagnosis.
Two other details limit a simple reading. The final ADHD and control groups differed considerably in age, with reported means around 32 and 53 years, and age group was among the model's inputs. The paper also gives inconsistent cohort totals in its abstract and main text. Neither issue proves which signals drove performance. Both matter when imagining the result in a different clinical population.
So the Swedish case presents a legitimate early case-finding experiment and a boundary around its interpretation.
It may tell us something useful about flagging records associated with ADHD before a diagnosis is entered. It does not establish performance on the psychiatric outpatients the model no longer had to distinguish.
The excluded patients are not a footnote to that question. They are the question.
What a virtual classroom can distinguish
A team in Bonn studied a different kind of evidence. They put participants in a virtual seminar room, asked them to perform an attention task, and introduced distractions. Researchers collected task performance, eye movements, head activity, EEG, and the participants' own ratings of their symptoms.
In a 2024 study, they trained a classifier on 25 adults with ADHD and 25 healthy controls. They then tested it on an independent group of 18 adults with ADHD and 18 healthy controls. The selected model achieved 81 percent accuracy on that separate test sample. EEG did not contribute to the final feature set.²
A small independent test is worth having. It provides more evidence about generalization than evaluating only the people used to develop a model.
The missing EEG result is also instructive. The measurement that sounds most like neuroscience was not necessary for the team's strongest selected classifier. Behavioral and subjective signals had their own value.
But the study's comparison remained explicit: ADHD against healthy controls. Some participants in the ADHD group could have coexisting conditions; the researchers did not simply exclude all comorbidity. The point is that the opposite group was healthy.
It is a controlled experiment asking a defined research question, not a complete diagnostic service.
The ADHD-versus-depression question remained open.
This problem was hardly invented with the current generation of AI. In 2020, Hanna Christiansen and colleagues had already used machine learning to distinguish adults with ADHD, problematic gambling, obesity, and controls using a standard ADHD rating scale, reporting an overall four-group accuracy of 0.80.³ These experiments had different methods and populations, but they shared an interest in comparisons beyond the easiest binary contrast.
The clinically interesting question was already in view: if we change the condition on the other side of the classifier, what happens to the measurements that seemed so informative?
In October 2026, researchers in Bonn, including Annika Wiebe from the earlier seminar-room study, approached that question using a different virtual environment.
An office that changed the question
On October 14, 2026, Julian Pakos and colleagues published a machine-learning analysis using data from a virtual office.⁴
Participants sat at a simulated desk in an open-plan workplace. Their job was to sort incoming emails into categories, such as spam, existing customers, new customers, or messages to forward. The environment contained distractions. The researchers could track how people handled the task, where they looked, and how their heads moved.
The participants also reported how inattentive, hyperactive, or impulsive they felt during the task.
These were not competing explanations of what a person is. They were different measurements the model might use to distinguish defined groups.
The analysis pooled participants from two experiments: 43 adults with ADHD tested without medication that day, 23 with ADHD who were medicated, 16 with major depressive disorder, and 21 controls without known mental disorders.⁴
Rather than treating "ADHD detection" as a single operation, the team constructed separate classification tasks. For this story, two are crucial.
The first was relatively familiar: distinguish unmedicated adults with ADHD from controls without known mental disorders.
Using support vector machines and repeated nested cross-validation, the researchers explored what combination of subjective reports and observed measures separated those groups best.
The strongest model achieved 0.85 balanced accuracy.
It used exactly one feature: how inattentive the participant said they felt while completing the task. The best model using only the objective measures achieved 0.68. Adding gaze, motion, and performance measures did not improve the best single-feature result in this comparison.⁴
A virtual office equipped with tracking technology had produced its strongest distinction using what a participant reported about themselves.
The result complicates the idea that more elaborate sensing necessarily reveals a stronger diagnostic signal.
Participants already knew their diagnoses, which the authors acknowledge could have influenced their symptom ratings. Self-report was useful for distinguishing these experimental groups, not an independent confirmation of anyone's condition. The added sensors did not improve the strongest classifier for this particular comparison.
Then the researchers changed the other group.
The person with depression on the other side
The new task was to distinguish adults with ADHD tested without medication from adults with major depressive disorder.
Both groups might report problems concentrating. Both might find the email-sorting task difficult. The researchers were no longer looking for a signal that separated ADHD from an absence of known mental disorders.
This time, the best-performing model used 13 features across subjective reports and objective measurements. It reached 0.75 balanced accuracy. The strongest objective-only model reached 0.62, a result that was not significantly better than chance in the study's permutation test.⁴
Within this ADHD-versus-depression comparison, the best combined model exceeded the best subjective-only model by 0.06 in balanced accuracy, with a reported confidence interval of 0.03 to 0.09.⁴ Unlike the first contrast, the selected model here drew on measured behavior as well as self-report.
The same virtual task was no longer answering the same clinical question.
In the first comparison, a single subjective rating was most discriminative. In the second, the best result drew from subjective experience and measured behavior together.
There is a tempting but incorrect way to describe those findings: the algorithm scored 85 percent until researchers made the test harder, when it dropped to 75 percent.
That would suggest that one fixed classifier faced a new set of patients. It did not. The researchers selected different models and features for different binary classification problems. The scores cannot be interpreted as a clean causal effect of replacing healthy controls with participants who had depression.
Nor can this study establish that the second model will work well in a clinic.
Only 16 people were in the depression group. Their reported depressive symptom severity was, on average, low to moderate. The team used repeated nested cross-validation within the available dataset, not a separate external test cohort. Even a careful validation procedure cannot turn 16 participants into a representative clinical population.⁴
The strongest finding is therefore not that a virtual-office model has solved differential diagnosis. It is that the study asked the differential question directly and exposed a change in which information was useful for the comparison.
The distinction lies in the clinical question, not in a hierarchy of supposedly more objective devices.
But there is a patient the binary experiment still struggles to represent.
The patient who belongs to both groups
A classifier can draw a boundary between two separately recruited groups. A person can live on both sides of it.
ADHD and depression are not mutually exclusive. Problems with concentration can arise at different times, from different causes, and sometimes from conditions that coexist. A clinical assessment has to consider when difficulties began, how they changed, and what other diagnoses might explain or accompany them.
A 2025 review in World Psychiatry describes differential diagnosis as part of a comprehensive adult ADHD evaluation. It also finds insufficient evidence for ancillary biomarkers to replace that clinical assessment.⁵
The virtual-office experiment compared ADHD and depression as separate groups. That made it possible to study which observations distinguish them. It did not test a model on patients who have both conditions, or establish how the classifier would behave in a clinic where those patients are common.
That limitation does not empty the experiment of value. The question it asks is already more clinically specific than a comparison against healthy controls. Its central contribution is the evidence that the selected features changed when the alternative diagnosis changed.
The Swedish records study addressed yet another legitimate task: finding patterns associated with a later recorded ADHD diagnosis. With appropriate validation, such a system might help identify patients who deserve further assessment. That is a different kind of assistance from telling a clinician whether concentration problems reflect ADHD, depression, or both.
A person who needs that assessment is not simply a positive or negative label. The model's opposing class may be someone with another condition whose symptoms deserve an explanation just as much as the first patient's.
The research can be careful, its technology sophisticated, and its result useful within the comparison it was built to make. None of that removes the need to name the comparison when describing what the model can do.
Before asking how accurately a model identifies ADHD, we have to finish the question:
ADHD, compared with whom?
References
Hamed, O., Etminani, F., Jacobsson, P., and Davidsson, T. (2026). Early detection of adults ADHD using electronic health records: A machine learning study. European Psychiatry, 69(1), e38. Original study | DOI. Source note: The abstract reports 2,973 ADHD patients and 4,447 controls, while the main study description reports 3,570 ADHD patients and 5,126 controls after exclusion. The article does not reconcile these totals. No new cohort totals are calculated from them here.
Wiebe, A., et al. (2024). Virtual reality-assisted prediction of adult ADHD based on eye tracking, EEG, actigraphy and behavioral indices: a machine learning analysis of independent training and test samples. Translational Psychiatry, 14, 508. Original study | DOI.
Christiansen, H., et al. (2020). Use of machine learning to classify adult ADHD and other conditions based on the Conners' Adult ADHD Rating Scales. Scientific Reports, 10, 18871. Original study | DOI.
Pakos, J., et al. (2026). Virtual reality (bio-)markers differentiate ADHD from depression and controls. European Archives of Psychiatry and Clinical Neuroscience. Published October 14, 2026. Original study | DOI.
Cortese, S., et al. (2025). Attention-deficit/hyperactivity disorder (ADHD) in adults: evidence base, uncertainties and controversies. World Psychiatry, 24(3), 347-371. Original review | DOI.
About the Author
Diego Liñan is a Technical Program Manager with a background in software engineering, solution architecture, and technical delivery. He writes about how AI changes real technical work: decision-making, delivery, governance, automation, and the boundaries of human judgment and accountability.