Work About Get in Touch
Back to work
Case Study · BrainX
0-to-1 · Solo AI research tool Neuroscience × UX Open source

What happens in the brain when someone reads your copy?

BrainX is a research tool I designed and built with AI-assisted, agentic coding. You describe a reader, paste your copy, and BrainX simulates how that person would actually read it. It then runs Meta's TRIBEv2 brain-encoding model over that simulated read and returns five predicted circuit scores, the brain regions behind them, and rewrites that cite their evidence. It turns a question designers usually settle with opinion into something you can investigate before launch.

Role
Product design · AI-assisted build
Timeline
Apr to Oct 2026 · 151 commits
Models
Meta TRIBEv2 · DeepSeek
Stack
FastAPI · React · three.js

The launch film · 48 seconds, sound on · every number, region and sentence comes from one real BrainX run

A childhood question, finally testable.

Long before I was a designer, I was the kid reading psychology and signing up for courses on game theory. I was not interested in the theory for its own sake. I wanted to know how things land in our brains: why one sentence sticks and another slides off, why a small detail makes us hesitate, why we trust one button and not the one next to it.

UX design turned out to be that same question with a deadline. Yet in practice, teams still settle copy and layout by opinion in a review, or wait weeks for an A/B test that needs traffic and a launch. When Meta released TRIBEv2, a model trained to predict how the human cortex responds to what we see, hear and read, I saw a way to ask my old question before shipping instead of after.

Heatmaps tell you where the eyes go. I wanted to investigate what happens after that: load, emotion, memory, reward. And I wanted it for a specific reader, in a specific state of mind.

Akash Azad · on why BrainX exists

You cannot know how copy lands until people read it.

Designers, marketers and content teams make dozens of word and layout decisions a week. Every existing way to check them either comes too late or measures the wrong thing.

01

Opinion decides. The headline that ships is often the one the most senior person in the review liked. Nobody can say why a line works, only that it feels right.

02

Testing needs a launch. A/B tests need traffic and weeks of time. Moderated research needs recruiting. Both happen after the work is built, when changing it is expensive.

03

Tools measure the eye, not the reader. Attention heatmaps predict where gaze lands. They say nothing about whether a phrase adds cognitive load, triggers an emotional response, or will be remembered.

04

Context is missing. The same sentence lands differently for a stressed product manager on a phone and a relaxed one at a desk. A static screenshot carries none of that.

Four principles, decided before any code.

A tool that talks about brains can easily overclaim. I wrote these rules first, and every screen, label and model prompt was checked against them.

01 · Simulate first

Never judge a screen in a vacuum

A persona with goals, stress and a device reads the content first. TRIBEv2 runs on that simulated experience, so context changes the result.

02 · Predict, never claim

Honest language everywhere

“Predicted response”, “investigate”, “a suggestion to test”. BrainX never says it reads minds or measures real people. It is framed as a research preview.

03 · Show the evidence

No advice without a receipt

Every recommendation names its circuit, brain region and score, and points to the moment in the simulated read that caused it.

04 · Make waiting legible

A 15-minute run you can follow

Inference runs locally on CPU. The wait is designed: real stage names, an elapsed timer, honest warnings and real error messages.

One sentence, six stages.

Here is the real pipeline, shown with one real run from October 19, 2026. The content was a single line of SaaS copy: “Start your free trial today and cut meeting time in half.” The reader was a 34-year-old product manager at a desk, expert with tech, with medium attention, moderate stress, and one goal: ship faster.

01 · Simulation

A persona reads the content

DeepSeek plays the persona and writes a structured, timestamped log of the read: fixations, hesitations, click intent and emotional shifts.

5 events over 3.4 s
peak fixation 0.85 on “cut meeting time in half”
02 · Grounding check

The story must match the pixels

For images, a vision model checks the simulated narrative against what is actually on the screen, so the simulation cannot invent content. Text passes straight through.

pathway text
check not required
03 · Inference

TRIBEv2 predicts the cortex

The text is voiced, word-timed with WhisperX, and passed to Meta's TRIBEv2, which predicts activity across the cortical surface over time. It runs locally.

5 timesteps × 20,484 vertices
mesh fsaverage5 · device CPU
04 · ROI aggregation

Vertices become circuits

Using the Destrieux atlas, 14 cortical regions are pooled into five circuits a designer can reason about: Attention, Cognitive Load, Emotional Response, Memory Encoding and Reward.

14 regions → 5 circuits
top region S_front_inf 43.5
05 · Processing

Scores people can compare

Raw activations are rescaled to 0 to 100, overlays are baked for the 3D viewer, and continuity is computed across screens for multi-screen flows.

strongest Attention 31.6
weakest Memory Encoding 0.6
06 · Recommendations

Advice that has to prove itself

DeepSeek drafts copy and layout recommendations. A validator rejects any that do not cite real ROI evidence and real simulation events, with up to three attempts.

4 recommendations
types rewrite · layout · memory · emotion
Stage 01 output · simulated read “Cautiously interested; clarity-seeking PM scanning for concrete value.”
0 msFixationInitial full-line scan of the headline.
900 msFixationLocks onto “cut meeting time in half” as the quantified benefit.
1800 msHesitationQuestions what “free trial” entails: duration, commitment, card required.
2600 msClick intentConsiders clicking the trial CTA but wants clarity on terms first.
3400 msEmotional shiftPositive spike from the time-saving promise, aligned with the “ship faster” goal.

The persona's simulated read, verbatim from the run · bars show event intensity

Frames from the launch film's “Watch it think” sequence · rendered from the same mesh and the same run data the app stores

From a blank page to evidence in five steps.

Every screenshot below is the running app on my machine, showing the same real session. Click any screen to see it full size.

Step 1 · Persona

Pick a reader, not a demographic

A persona in BrainX is a state of mind as much as a profile. The fields come straight from what changes how people read.

  1. 1Who. Age, role and background, plus goals, values and motivations.
  2. 2State. Attention span, stress level and tech literacy, the variables that shift cognitive load.
  3. 3Where. Device and location, because a phone on a train is not a monitor in an office.
  4. 4Reusable. Saved personas become cards, so a team can test copy against the same readers every time.
Step 2 · Content

Paste the thing you are unsure about

Three content types share one step: UI screens, a static image such as an ad, or plain text. The persona stays pinned at the top as a chip, so you always know whose brain you are asking about, and can change it without losing your content.

  1. 1One focused field. A character count and an explicit save, so nothing runs by accident.
  2. 2Gated run. Run Analysis only unlocks once persona and content are both saved.
Step 3 · Running

Design the wait, do not hide it

A full run on CPU takes minutes, and this one took 15. A spinner would have felt broken. Instead the screen narrates real backend stages, polled every two seconds.

  1. 1Six real stages. The rail maps one to one to the backend pipeline, with completed stages checked.
  2. 2Honest timing. An elapsed timer and live process count. After two and ten minutes, plain messages explain what is happening.
  3. 3Real errors. If a stage fails, the failure card shows which stage and the actual error, never a generic “please retry”.
  4. 4Leave and return. State persists, so a refresh or a closed tab lands you back on the same run.
Step 4 · Results

Answer first, depth on demand

Results open on a one-sentence narrative and three tiles, the answer a busy marketer needs. Each tab then adds one layer of depth for people who want to dig.

  1. 1Overview. Strongest circuit, biggest engagement drop across screens, number of recommendations.
  2. 2Circuits. Five bars on one 0 to 100 scale. Circuit colours are reserved for circuit data and never reused as decoration.
  3. 3Brain Explorer. The cortex in 3D with a region table: every score traceable to a named region.
  4. 4Shareable. Each session has its own link and replays from stored data, with no new inference.
Step 5 · Recommendations

Every suggestion carries its receipt

This is the part I care about most. A recommendation is only useful if you can argue with it, so each card shows its reasoning and ends in a mono evidence line you can check against the region table.

  1. 1Four types. Copy rewrite, layout flag, memorability and emotional drop-off, filterable as chips.
  2. 2Severity. Low, moderate or high, so the one that matters stands out.
  3. 3Evidence line. Circuit · region · score, plus the simulation event that triggered it.

The benefit was seen. The offer was not remembered.

For this reader, the predicted response was led by Attention, with the strongest single region in the inferior frontal sulcus. Memory Encoding sat near zero. Read together with the simulated hesitation at 1800 ms, the story is clear: the promise caught the eye, but the vague “free trial” cost working memory and left nothing concrete to remember.

Attention31.6
Cognitive Load23.1
Emotional Response19.5
Reward15.2
Memory Encoding0.6

Predicted circuit scores, 0 to 100, product manager persona · model predictions, not measurements of real people

Original

Start your free trial today and cut meeting time in half.

BrainX's suggested rewrite

Cut meeting time in half:
start your 14-day free trial. No card required.

Cognitive Load · G_front_middle · 24.2/100 Hesitation · 1800 ms · “free trial” A suggestion to test, not a guaranteed result

The logic is the kind a good copywriter would arrive at, but here it comes with a trail: lead with the benefit that drew the strongest fixation, and answer the questions behind the hesitation (how long, is a card needed) before the reader has to ask them. A separate layout flag suggested moving the CTA next to the quantified claim so it carries equal visual weight.

Calm interface, loud data.

The subject is complex, so the interface stays quiet. I specified a documentation-style system (Inter for reading, Geist Mono for every data label, pill controls, whisper-thin borders) with light and dark themes. One brand mint marks actions. Five circuit colours mark data. Nothing else competes.

From AI concept to a working brain-encoding system.

BrainX started as an idea: simulate how a person reads content, then explore how that experience maps to brain activity. I took it from concept to a working application using AI-assisted, agentic coding. I shaped the architecture and the product workflow, coordinated the work across the frontend, the backend and the inference pipeline, and iterated through testing and debugging.

The result simulates reading, runs brain-encoding inference, maps the predictions to five cognitive circuits, and makes every run replayable for inspection. I did not hand-write the code. What I owned was the product: what it should do, how it should behave when it fails, and what it is allowed to claim.

151
commits from April to October 2026, planned and verified in 7 phases and 27 plans
58
test files across backend (pytest) and frontend (Vitest with mocked APIs)
20,484
cortical vertices predicted per timestep, stored and replayable per screen
0
sanitised error messages. Every failure keeps its stage and its real cause

The failure that taught me the most

For months, some runs died in the inference stage with a cryptic transcription failure. It looked random, so it looked like a flaky external tool. Tracing it with my coding agent, one controlled experiment at a time, showed it was not.

Symptom

Runs failed at whisperx returncode -15. Content length did not predict it. Restarting sometimes helped, which made it feel like luck.

Root cause

The model loader redirected HOME for the whole process to cache model weights. The transcription subprocess inherited it, could not find its managed Python, fell back to an old system Python, and hung while building dependencies until it was killed. Only cold runs paid that cost, which is why it looked random.

Fix and proof

Restore the real HOME for that child process only. An A/B on the exact failing audio went from hung for over six minutes to done in about 90 seconds. The patch is documented so a fresh install reproduces it.

Building BrainX pushed me beyond interface design. It meant understanding how the pieces fit together, investigating failures across the pipeline, and making reliability part of the product experience. After this pass the worker restarts itself if it dies, a timed-out inference thread gets a fresh executor instead of poisoning every later job, the queue is capped, and stale jobs are swept. For a user staring at a 15-minute progress screen, reliability is the experience.

A launch film where nothing is faked.

To launch BrainX I art-directed a 48-second product film, produced in code with Remotion and AI assistance. The rule was the same as the product's: show only what is real. The brain is the actual fsaverage5 cortex the app ships, coloured by TRIBEv2's actual prediction for the actual sentence. Every score, region and line of copy comes from the run on this page. Even the music is original, synthesised from code, with parts of it driven by the same data.

The story moves light, then dark, then light: the white page where copy is written, the dark inside of the model, and back to the white interface where you act on it. The running stage is labelled as a time-lapse of the real 15-minute run, and the rewrite is called a suggestion to test. The film ends on akashazad.com/brainx, which is this page.

What is not solved yet, and what comes next.

BrainX is a research preview, and I would rather list its gaps than have someone find them. Each one is a clear next step.

Science

Predictions, not people

TRIBEv2 predicts average cortical responses. The persona shapes the simulated read, not the brain model itself. BrainX is for generating hypotheses to test, and never a replacement for research with real users.

Next · close the loop

Re-score the rewrite automatically

Today the suggested rewrite is not re-run, so I do not claim it scores higher. Next: one click runs the rewrite through the same persona and shows the delta per circuit.

Interface

A better default brain view

The in-app viewer opens from above, where most mapped regions are hidden, and its overlay is subtle. The camera presets are not wired yet. Next: a lateral default and stronger contrast, closer to the film's rendering.

Scale and licence

Faster, and free to grow

CPU inference takes minutes per screen, and image analysis still needs live verification. TRIBEv2 is non-commercial, so the interpretation layer is model-agnostic by design, ready for an engine swap.

BrainX is open source.

The whole product is on GitHub: the pipeline, the interface and the tests. Run it locally, point it at your own copy, and tell me what your readers' brains are predicted to do.