PyMCHDDMArviZ

The Challenge

Akili makes a digital therapeutic for ADHD — a video game, cleared by the FDA, that measurably improves cognitive function in children. Behind that product sits a hard statistical problem: how do you score cognitive assessments honestly?

Clinical instruments produce ordered categories ("strongly disagree" through "strongly agree"), not continuous measurements. Treating those categories as numbers on a ruler — as many analyses do — introduces systematic bias. Beyond scoring, Akili needed to validate that gameplay-derived cognitive metrics actually correspond to established clinical measures, track patient improvement over time despite messy real-world data, and do all of this at a scale that traditional inference methods couldn't handle.

Our Approach

Honest scoring for ordinal data

We started with the scoring problem. Clinical assessments produce ordered categories, so we modeled them as what they are — ordinal data with latent cognitive constructs underneath. This means estimating where the boundaries fall between response categories and what underlying cognitive ability each pattern of responses implies. The approach respects the structure of the data rather than forcing it into a shape that's convenient but wrong.

Tracking outcomes over time

For tracking outcomes over time, we built models that account for the natural nesting in clinical trial data — repeated measurements within patients, variation across assessors, and the messiness of real treatment schedules where people miss visits and drop out. Prior checks against clinical knowledge kept the models grounded before they ever saw data.

Making intractable models tractable

The computational challenge was the most interesting piece. Some cognitive process models that Akili needed to evaluate don't have tractable likelihood functions — you can simulate data from them, but you can't efficiently calculate the probability of observed data. We used neural networks trained to approximate those likelihoods, which made inference on these models fast enough to be practical across clinical trial scales.

Results

Akili got a validated scoring pipeline that produces honest uncertainty estimates on cognitive improvement metrics — not just "the patient improved by X points" but "we're this confident the improvement falls in this range." That distinction matters enormously in clinical trial analysis, where overconfident conclusions can mislead treatment decisions.

The approximation approach made previously impractical cognitive models computationally feasible, with better parameter recovery than earlier methods. We also worked closely with Akili's research team throughout, transferring knowledge so they could extend and maintain the models independently.

“This is by far the most successful collaboration that I've seen.”

Titi Alailima , VP of Applied Data, Akili Interactive

PyMC Labs Team

  • Eric Ma
  • Thomas Wiecki
  • Maxim
  • Virgile
  • Adrian

Let's Chat, We Respond Fast

Tell us about your problem. We typically respond within 24 hours.

Schedule a Consultation