BioCausal AI

Healthcare & Human Wellbeing


Inspiration

For a rare or poorly understood disease, the hardest part of research isn't usually a lack of data — it's that the data already exists, scattered across tens of thousands of PubMed abstracts, pathway databases, phenotype ontologies, and protein structure repositories, with no single place that connects them. A researcher trying to answer a simple question — "which pathway does this gene drive, which organs does that affect, and is there a drug that might interrupt it?" — ends up doing archaeology: reading paper after paper, manually stitching gene → protein → pathway → organ → drug chains together in their head, with no easy way to show their work to a colleague, let alone a patient.

That gap — between what's known in the literature and what's usable by a human trying to reason about a disease — was the seed for BioCausal AI. I wanted a tool that treats biomedical literature not as a pile of PDFs to skim, but as a live, queryable causal system: type a disease or gene, and watch the evidence assemble itself into a graph you can actually interrogate, then zoom that graph out into something a clinician, a student, or a patient's family could look at and understand.

The Healthcare & Human Wellbeing track was a natural fit — this is fundamentally a project about compressing the time between "a mechanism exists in the literature" and "a person understands and can act on that mechanism."

What it does

BioCausal AI is a full-stack causal discovery and multi-scale simulation platform that takes a user from a patient description or a disease/gene query all the way down to molecular structure and back up to whole-body physiology, with every claim traceable to a source.

  • Phenotype → disease matching. Paste in a patient's symptoms and the system extracts phenotype-like features (with negation handling — "no seizures" isn't a positive match for seizures), expands the search against live Monarch Initiative phenotype–disease associations, and returns a ranked, explainable list of candidate diseases.
  • Causal literature synthesis. For a selected disease, BioCausal AI queries PubMed live and extracts directed causal triples — Gene → inhibits → Protein, Protein → activates → Pathway, and so on — spanning genes, proteins, pathways, metabolites, drugs, phenotypes, and diseases. Every single edge in the resulting graph keeps its supporting quote, confidence score, and PMID, so nothing is asserted without a source behind it.
  • Pathway Simulation Studio. An interactive systems-biology sandbox with healthy / disease / drug / combination scenarios, switchable Boolean, ODE, and probabilistic simulation modes, mutation-strength and drug-dose sliders, live activity charts, a 3D cellular scene, and an evidence ledger tying every simulated effect back to literature.
  • Human Body Simulation Lab. A layered anatomical model (skin → muscle → skeleton → organs → vessels → nervous system) that maps disease burden onto body regions, simulates PK/PD drug response, and surfaces live "vitals" so a user can watch, organ by organ, what a candidate intervention actually does.
  • Real protein structures. Molecular entities in the graph resolve to real UniProt, RCSB PDB, and AlphaFold DB structures, so a "protein" in the causal graph isn't just a label — you can rotate it, inspect ligands, and see the binding pocket a drug is meant to act on.
  • AI reasoning layer. Featherless.ai aggregates the current simulation state — pathway activity, organ-level effects, evidence strength — and produces a plain-language verdict on whether a candidate treatment looks promising, explicitly scoped to only the evidence present in that run, plus suggested next experiments.
  • Simple Mode. A one-click toggle that translates the same causal graph into plain-language sentences, aimed at patient advocacy groups, students, and anyone who isn't a computational biologist.

How we built it

The pipeline is designed around one hard rule: it must always work, with or without API keys, degrading gracefully rather than breaking.

🎙 Deepgram Nova-2 (voice)     →  Web Speech API (fallback)
🔥 Firecrawl (deep scrape)     →  PubMed E-utilities esearch/efetch (fallback, key-free)
🪶 Featherless.ai Qwen 3.8 →  deterministic biomedical extractor (fallback: entity
   (Zod-schema-validated JSON     dictionary + abbreviation resolution + relation patterns)
   triple extraction)
🕸 Graph synthesis + multi-hop traversal (drug-repurposing hypotheses,
   geometric-mean edge confidence, inhibition-parity net-effect reasoning)
🐘 PostgreSQL (Drizzle ORM) provenance store → Next.js dashboard

The frontend is Next.js 16 + React 19 + TypeScript + Tailwind CSS v4, styled around an Apple-inspired design system (glass-morphism cards, dark/light/system theming, a five-step guided tour for first-time users). Graph visualization runs on d3-force for the 2D/3D layout, with three.js and 3Dmol.js powering the cellular scene and the real protein-structure viewer respectively. Simulation state and drug PK/PD curves follow standard pharmacokinetic and systems-biology formalisms — for example, single-compartment first-order elimination for drug decay,

$$C(t) = C_0 \cdot e^{-k_e t}$$

and simple mass-action-style dynamics for pathway node activity,

$$\frac{d[X]}{dt} = k_{\text{syn}} - k_{\text{deg}}[X] + f(\text{upstream regulators})$$

which the Boolean and probabilistic modes then discretize or perturb with noise depending on the scenario. Every research run — its documents, extracted triples, and generated hypotheses — is persisted in PostgreSQL via Drizzle ORM, so past analyses are replayable rather than disposable.

One constraint shaped the whole build process more than any library choice: I don't have a personal computer. Every commit, every npm install, every debugging session for this project ran from a cyber café, with Claude handling repository operations, dependency triage, and code review over short, metered sessions. That forced a fairly disciplined workflow — plan the change before sitting down, keep diffs reviewable, and never leave a session with an uncommitted half-working state.

Challenges we ran into

  • Making unstructured text trustworthy. Extracting a directed, typed, confidence-scored causal triple from a free-text PubMed abstract — and getting the LLM to reliably emit valid, schema-conformant JSON (via Zod) rather than plausible-looking prose — took several iterations of prompt and schema tightening before the deterministic fallback extractor and the Featherless.ai path produced consistent, comparable output.
  • Zero-key-by-default, without becoming zero-substance. Building real fallbacks for voice (Web Speech API), literature (PubMed E-utilities), and extraction (a hand-built biomedical entity/relation extractor) meant essentially building three pipelines instead of one, and making sure the "cheap" path never silently produced worse provenance, only a smaller model.
  • Physiological plausibility at multiple scales. Keeping the Pathway Simulation Studio (molecular/cellular) and the Human Body Simulation Lab (organ/whole-body) mutually consistent — so a mutation strength slider in one view visibly, correctly propagates to organ-function changes in the other — required real care in how state flowed through simulation.ts and physiology.ts rather than treating them as two independent toys.
  • Real structural data is messy. UniProt, RCSB PDB, and AlphaFold don't always agree on identifiers for the same protein, and not every gene in a causal graph resolves cleanly to a solved or predicted structure — handling those gaps without the 3D viewer breaking (or lying) took extra defensive plumbing.
  • Building without a computer. Every session was cyber-café time-boxed, which meant debugging discipline mattered as much as code quality — there was no luxury of leaving something running overnight to see what broke.

Accomplishments that we're proud of

  • A single interactive environment that actually connects phenotype → literature → causal graph → protein structure → pathway simulation → whole-body physiology, instead of five disconnected tools with no shared state.
  • Provenance on every edge — no claim in the graph exists without a resolvable PMID and a supporting quote, which is the difference between a "cool visualization" and something a researcher could actually cite.
  • A genuinely usable zero-key mode: the whole pipeline, voice input included, works out of the box with no setup, and upgrades automatically as keys (Deepgram, Firecrawl, Featherless, NCBI) are added.
  • Simple Mode, which — as far as I could find in a competitive scan against tools like Causaly, TxGNN, SemMedDB, PrimeKG, and Euretos AI — none of the existing players offer: a genuine plain-language translation layer for non-specialists sitting right next to the expert-grade causal graph.
  • Real, live PDB/AlphaFold structure integration rather than static screenshots, so the "protein" nodes in a causal graph are actually inspectable molecules.

What we learned

  • Provenance is a design constraint, not a feature you bolt on. Deciding early that every edge needed a quote and a source URL shaped the extraction schema, the database design, and even the UI (an "evidence ledger" tab exists specifically because the data supports it) — trying to retrofit that later would have been much harder.
  • Multi-scale biology doesn't compose for free. Molecular, cellular, and organ-level simulations look independent but need to share state carefully, or you end up with a UI that looks connected but isn't actually reasoning consistently across scales.
  • Graceful degradation is a real engineering discipline. Designing three parallel paths (premium API → free API → deterministic fallback) for voice, ingestion, and extraction forced much clearer thinking about what each stage's contract actually was, independent of which engine served it.
  • Constraints sharpen scope. Building entirely from cyber cafés without a personal machine meant every session had to end in a working, committed state — which, if anything, made the codebase more disciplined than it might have been with unlimited iteration time.

What's next for BioCausal AI

  • PDF upload and full-text ingestion so researchers can bring their own papers into a run, not just what PubMed indexes.
  • Contradiction detection across papers — surfacing where the literature actually disagrees, rather than presenting a single flattened graph.
  • Clinical trial matching (ClinicalTrials.gov) and DrugBank enrichment, so a drug-repurposing hypothesis links directly to whether it's already being tested.
  • Gene-set analysis mode — upload a panel of genes and see the shared pathway/organ neighborhood, useful for interpreting sequencing panel results.
  • Time-based evolution view, showing how the understanding of a gene–disease link has changed year over year across the literature.
  • Team workspaces and shareable run links, so a research group — or a patient advocacy organization — can collaborate on and cite a specific analysis rather than re-running it from scratch.
  • An AI chat interface over the graph itself, letting a user ask follow-up questions ("why is this edge only 40% confidence?") without leaving the visualization.

BioCausal AI is a research prototype and is not medical advice.

Built With

  • deegram
  • featherlkess
  • firecrawl
  • nextjs
Share this project:

Updates

Submission history