{"id":51292448,"url":"https://github.com/londopy/akribia","last_synced_at":"2026-07-01T12:00:33.163Z","repository":{"id":367237719,"uuid":"1279840623","full_name":"Londopy/akribia","owner":"Londopy","description":"One inference engine, three precision miscalibrations: an interactive model of predictive coding across autism, ADHD \u0026 PPCS. Rust + Python + a Tauri desktop app. Research tool, not diagnostic.","archived":false,"fork":false,"pushed_at":"2026-06-25T12:52:54.000Z","size":1167,"stargazers_count":1,"open_issues_count":10,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-30T11:36:09.107Z","etag":null,"topics":["adhd","autism","bayesian-inference","computational-psychiatry","predictive-coding","python","react","rust","scientific-computing","tauri"],"latest_commit_sha":null,"homepage":"https://londopy.github.io/akribia/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Londopy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-06-25T03:59:31.000Z","updated_at":"2026-06-26T01:40:41.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Londopy/akribia","commit_stats":null,"previous_names":["londopy/akribia"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Londopy/akribia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Londopy%2Fakribia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Londopy%2Fakribia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Londopy%2Fakribia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Londopy%2Fakribia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Londopy","download_url":"https://codeload.github.com/Londopy/akribia/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Londopy%2Fakribia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35005413,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-01T02:00:05.325Z","response_time":130,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["adhd","autism","bayesian-inference","computational-psychiatry","predictive-coding","python","react","rust","scientific-computing","tauri"],"created_at":"2026-06-30T11:32:13.385Z","updated_at":"2026-07-01T12:00:33.158Z","avatar_url":"https://github.com/Londopy.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# akribia\n### A unified computational model of precision-weighted Bayesian inference across autism, ADHD, and PPCS\n\n[![ci](https://github.com/Londopy/akribia/actions/workflows/ci.yml/badge.svg)](https://github.com/Londopy/akribia/actions/workflows/ci.yml)\n[![license: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE)\n\n***One inference engine. Three miscalibrations. Same math.***\n\n**▶ [Try the live demo](https://londopy.github.io/akribia/)** — the full dashboard runs in your browser, no install. · **[⬇ Download the desktop app](https://github.com/Londopy/akribia/releases)**\n\n\u003e ### This is not a diagnostic tool\n\u003e akribia is a computational-psychiatry **research replication and exploration**\n\u003e tool. It implements published mathematical models of precision-weighted Bayesian\n\u003e inference to illustrate *theoretical mechanisms* proposed in the literature for\n\u003e autism, ADHD, and PPCS. **It is not a diagnostic tool, has not been validated\n\u003e against patient data, and should not be used to assess, diagnose, or characterize\n\u003e any individual's condition** — including the author's. The autism\n\u003e precision-weighting literature in particular is actively contested (see\n\u003e [docs/THEORY.md](./docs/THEORY.md)); this project models competing hypotheses,\n\u003e not settled fact.\n\u003e\n\u003e akribia runs entirely on **synthetic, simulated data**. It does not collect,\n\u003e store, transmit, or process any personal, behavioral, or health information.\n\n## Desktop app — the interactive explorer\n\n[![akribia dashboard](docs/assets/app-preview.png)](https://londopy.github.io/akribia/)\n\n*The dark dashboard — baseline vs. a comorbid profile across all five tasks. [Open it live](https://londopy.github.io/akribia/) and drag the precision sliders.*\n\nakribia ships a rich, dark, **interactive desktop app** (Tauri + React + Tailwind):\npick a profile in the sidebar, drag a precision lever, and watch every task's\nbehaviour update **live** against the neurotypical baseline — all computed by the\nsame validated Rust core, no Python required.\n\n**Install (no build needed):** grab the installer for your OS from the\n**[Releases page](https://github.com/Londopy/akribia/releases)** — `.msi`/`.exe`\n(Windows), `.dmg` (macOS), `.AppImage`/`.deb` (Linux). These are built\nautomatically by GitHub Actions when a `v*` tag is pushed.\n\n\u003e **Installers are unsigned.** Windows: click \"More info\" → \"Run anyway\" on the\n\u003e SmartScreen prompt. macOS: right-click the app → Open (or\n\u003e `xattr -d com.apple.quarantine \u003cfile\u003e`).\n\n**Or build / run it yourself:**\n\n```bash\ncd gui\nnpm install\nnpm run tauri dev      # live dev window with hot reload\nnpm run tauri build    # installer lands in gui/src-tauri/target/release/bundle/\n```\n\nRequires Node, a current stable Rust toolchain, and WebView2 (preinstalled on\nWindows 10/11). The Python research layer (below) stays available for notebooks,\nsweeps and validation.\n\n## See the thesis demonstrated in ~90 seconds\n\n→ **[`notebooks/00_golden_path.ipynb`](./notebooks/00_golden_path.ipynb)** — baseline\nvs. one profile vs. one plot. The single image below is the whole idea: the *same*\nengine and the *same* task, under two precision parameterizations, produce different\nperceptual behaviour.\n\n![Golden path: baseline vs. autism_weak_prior illusion susceptibility](./docs/assets/golden_path.png)\n\nThe neurotypical `baseline` \"sees\" a Kanizsa illusory triangle (high\nillusion-susceptibility score); `autism_weak_prior` caps prior precision, so absent\nlocal evidence dominates and the illusion weakens — the literature's *reduced\nillusion* finding, reproduced.\n\n## Quickstart\n\n```bash\ngit clone https://github.com/Londopy/akribia.git \u0026\u0026 cd akribia\ndocker compose -f .devcontainer/docker-compose.yml up -d   # or: maturin develop \u0026\u0026 pip install -e \".[dev]\"\npython -m akribia.tasks.illusion_task --profile autism_weak_prior --plot\n```\n\nRuns the illusory-contour task under the weak-prior autism profile and saves a\ncomparison plot against baseline. Swap `--profile` for any entry in the\n[Profile Catalog](./wiki/Profile-Catalog.md). No Rust toolchain? It still runs — the\npackage falls back to a pure-Python core (`python -c \"from akribia import core;\nprint(core.BACKEND)\"`). Or launch the interactive app: `cd gui \u0026\u0026 npm run tauri dev`.\n\n## The thesis\n\nPredictive coding treats the brain as a hierarchical inference machine: a\n**prediction** meets **evidence**, the mismatch is a **prediction error**, and that\nerror is weighted by **precision** (inverse variance — how much the system trusts the\nsignal) before updating beliefs. The same precision-weighting math, miscalibrated at\ndifferent points in the hierarchy, produces phenotypically distinct conditions:\n\n| Condition | Where precision miscalibration lives | Core failure mode |\n|---|---|---|\n| **Autism** (perceptual) | sensory/perceptual priors, level 1–2 | inflexible precision — persistently high (overfitting) or low (raw-data dominant) |\n| **ADHD** (reward/valuation) | dopaminergic RPE, temporal discounting | discount rate too steep, or reward gain unstable |\n| **PPCS** (sensorimotor) | forward-model / efference-copy comparison | post-injury forward model miscalibrated; persistent unresolved mismatch |\n\nakribia implements **one** core engine with pluggable \"lesion profiles\" (one\n`PrecisionProfile` dataclass, six levers), plus a literature-grounded **comorbidity\n(AuDHD)** mode — because co-occurrence is common and the more realistic case to model.\n\n## Theory\n\nEach condition's module reproduces specific, *pre-registered* predictions from the\nliterature (encoded as `tests/test_predictions.py`):\n\n- **Autism** — weak priors reduce illusion susceptibility; HIPPEA (inflexible\n  precision) produces a *transient* reconvergence delay after a context switch.\n- **ADHD** — steep discounting collapses the delay-discounting AUC; unstable reward\n  gain produces erratic learning.\n- **PPCS** — an impaired forward-model update rate leaves a persistent vestibular\n  mismatch that does not habituate.\n- **AuDHD** — a *non-additive* signature: slow recovery (autism inertia) AND erratic\n  recovery (ADHD gain noise), distinct from the average of the two.\n\nFull literature review, with the competing hypotheses and the framework-level\ncritique of the Bayesian-brain paradigm itself, in **[docs/THEORY.md](./docs/THEORY.md)**\nand the **[Wiki](./wiki/Home.md)**.\n\n## Architecture\n\n```\n            core/  (Rust — the inference math, fast, no GC pauses)\n   kalman.rs · hgf.rs · td_learning.rs · forward_model.rs · error.rs\n         │ PyO3 (akribia._core)              │ rlib (direct link)\n         ▼                                   ▼\n   akribia/ (Python orchestration)     gui/src-tauri (Tauri/Rust)\n   profiles · tasks · viz · validation  React + Tailwind + shadcn/Radix\n         │ every task emits schemas/task_result.json\n         ▼\n   viz (plots) · validation (per-parameter recovery) · GUI (display)\n```\n\nThe Rust core is the numerical engine; the Python layer is the research surface\n(notebooks, sweeps, CI-enforced validation); the optional Tauri GUI links the same\nRust crate directly for live, interactive exploration. The pure-Python fallback core\nmirrors the Rust math so the project runs with or without a Rust toolchain. See\n**[docs/architecture.md](./docs/architecture.md)** for the ADR log and rationale.\n\n## Installation / dev environment\n\nOne command: open the repo in VS Code Dev Containers / GitHub Codespaces and the\n[devcontainer](./.devcontainer) builds the Rust+Python toolchain and runs\n`maturin develop` automatically. See [CONTRIBUTING.md](./CONTRIBUTING.md) for manual\nsetup and the extension points (adding a profile/task). `pre-commit install` runs the\nsame checks CI runs.\n\n## Validation \u0026 benchmarks (honestly reported)\n\n- **Per-parameter recovery** ([docs/LIMITATIONS.md](./docs/LIMITATIONS.md)):\n  `discount_factor` and `prior_precision_cap` recover cleanly (corr ≈ 1.0);\n  `precision_flexibility` is **weakly identified** (corr ≈ 0.44) and reported as\n  such. The CI gate is defined only on the reliably-recoverable parameters.\n- **Two independent core implementations** (Rust + Python) agree to ~1e-16.\n- **Performance** ([docs/BENCHMARKS.md](./docs/BENCHMARKS.md)): the boundary-free\n  Rust Kalman core is **~5.6× faster** than pure Python (measured, not asserted),\n  with an honest note about PyO3 boundary overhead on single calls.\n\n## Related work\n\n- **TAPAS** (Mathys et al.) — the reference HGF/computational-psychiatry toolbox.\n  akribia's contribution is the cross-condition profile framework (autism/ADHD/PPCS\n  under one engine) with a comorbidity mode, not a novel filtering algorithm. TAPAS\n  is GPL and is **compared against, never linked or copied from** (see\n  [docs/architecture.md](./docs/architecture.md) §5).\n- **PyHGF / pymdp** — Python-native HGF / active-inference libraries; viable\n  reference oracles.\n\n## Accessibility (spec 9)\n\nPlots use the **Okabe-Ito** colorblind-safe palette and pair colour with distinct\nline styles/markers (never colour alone), so figures read in grayscale and\ncolorblind vision. Theory pages open with a plain-language paragraph before the\nmath; jargon is defined in [docs/GLOSSARY.md](./docs/GLOSSARY.md). The Tauri GUI is\nbuilt on Radix UI, whose ARIA compliance is real accessibility infrastructure.\n\n## Roadmap\n\nPredictive coding's reach extends well past these three conditions. Each slots into\nthe *same* profile architecture (a new `profiles/\u003ccondition\u003e_\u003cmechanism\u003e.py` + a\nliterature-grounded parameterization + a demonstrating task): **schizophrenia**\n(aberrant precision in hierarchical message passing), **anxiety** (overestimated\nthreat precision), **depression** (biased reward valuation), **addiction**\n(pathological cue RPE). akribia \"happens to start with three conditions relevant to\nthe author,\" not \"models the author.\"\n\n## Links\n\n- [Wiki](./wiki/Home.md) — theory deep-dive \u0026 FAQ · [docs/THEORY.md](./docs/THEORY.md)\n- [docs/LIMITATIONS.md](./docs/LIMITATIONS.md) · [docs/architecture.md](./docs/architecture.md)\n- [CONTRIBUTING.md](./CONTRIBUTING.md) · [SECURITY.md](./SECURITY.md) · [CHANGELOG.md](./CHANGELOG.md)\n- [CITATION.cff](./CITATION.cff) — GitHub renders a \"Cite this repository\" button.\n\n\u003e **GUI installers are unsigned.** macOS Gatekeeper / Windows SmartScreen will block\n\u003e them by default. macOS: right-click → Open, or\n\u003e `xattr -d com.apple.quarantine \u003cfile\u003e`. Windows: \"More info\" → \"Run anyway\".\n\n## License\n\n[MIT](./LICENSE) © Londopy. *akribia* (ἀκρίβεια) — exactness, precision.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flondopy%2Fakribia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flondopy%2Fakribia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flondopy%2Fakribia/lists"}