NeuroSim / Engineering
How NeuroSim works.
NeuroSim is a local-first computational environment. Nothing crosses the network after the page loads, and no part of the model leaves the browser.
The system
Where the work happens.
There is no simulation API, no job queue, no database and no external service in the path of any computation. The circuit is generated on first use and every step after that is integrated on the device that opened the page.
- 01BrowserThe whole system runs here
- 02InterfaceControls, readouts, navigation
- 03VisualisationLayered canvas, reads transferred buffers
- 04WorkerEvery numerical operation, off the main thread
- 05CircuitSparse graph generated from published architecture
- 06Simulation engineIntegrate and fire, exponential Euler, delayed delivery
- 07Reference backendTyped arrays, the arbiter of correctness
- 08Accelerated backendGPU compute, enabled only once verified
- 09Experiment harnessSeeded conditions, identical measurement
Principles
Four constraints, accepted at the start.
Local compute
The visitor's hardware executes the model. No simulation state needs to leave the browser, and there is no compute server whose budget can quietly end the demo.
Sparse neural state
Work scales with spikes multiplied by out-degree, not with the square of the neuron count. Nothing is allocated inside the step loop.
Deterministic execution
One seeded generator drives circuit construction, noise and input. The same seed reproduces the same run anywhere, which is what makes an experiment worth reading.
Verified acceleration
The GPU path is refused unless it reproduces the reference implementation on a start-up probe. Plausible-looking wrong output is worse than no acceleration.
Implementation
Under the hood.
Expand any row for the mechanism. Everything here is in the repository.
Deployment
Nothing to operate.
The application builds to standard output with no server-side dependency beyond rendering. Every environment variable is optional and public, and the build succeeds with none of them set. Security response headers travel with the code rather than living in platform settings.
npm install
npm run dev # http://localhost:3000
npm run build # production build
npm run typecheck # tsc --noEmit