← Back to NeuroSpace Lab Overview
v1.6.0)NeuroSpace Lab (neurospace-lab) is an interactive safe-Rust (#![forbid(unsafe_code)]) workstation for exploring 15 neural network architectures—from a 1958 single-layer perceptron (M0) to sparse Mixture-of-Experts transformers (M14) and 6-layered histological cerebral cortex grey matter (M13)—with real-time structural plasticity, causal lesion/optogenetic interventions, and genuine FGSM/PGD adversarial evaluation.
1.75+ recommended via rustup).eframe/wgpu backend).rusqlite (features = ["bundled"]), requiring no external system SQLite library.# Run interactive 3D GUI in optimized release mode
cargo run --release
# Run all unit and integration tests
CARGO_BUILD_JOBS=4 cargo test --all-targets
# Build standalone release binary
cargo build --release
On Windows, src/main.rs uses #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] and automatically attaches to the parent console (AttachConsole) whenever CLI arguments are passed.
The workstation window (1440x900 default, 1024x680 minimum) is organized into four synchronized regions:
Run / Pause, Step (single tick), Rebuild Topology, and xSpeed (1..=8 steps/frame).Snapshot Run pins the current state into the Comparison Ledger and SQLite comparison_runs table; Sweep All 15 Models (Locked Dataset) or Sweep All 7 Datasets (Locked Model) runs an incremental non-blocking benchmark with a live ProgressBar and ✖ Cancel button.Export Workset... and Import Workset... save/restore SHA-256 verified .neuroworkset.json files.Live KPI Strip: Step, Somata, Synapses, primary task metric (Val Accuracy (%), R² Valuation Fit (%), Collision-Free Score (%), or QSAR Concordance (%)), Adv Margin (ε=...), task loss, and active Ablated | Severed counts.
Left Control Column (Sections 1–6):
M0–M14, toggle 🔒 Lock Model, or enable continual weight transfer across dataset switches.D1–D7 or toggle 🔒 Lock Data.MaxTaskFidelity, SparseEdgeEfficiency, AdversarialImmunity, FreeEnergyCalibration, or MetabolicBioEconomy.η, Momentum β, Synaptic Prune |w|, Neurogenesis / Sprout rate, River Stream Intensity, Cortical Capacity (0.5..=2.0), and Adversarial ε (0.0..=0.45, dynamically recomputing adversarial_margin even while paused).RenderMode (AutoAdaptive, MechanisticLattice, HybridCyberManifold, OrganicCorticalArbor, HistologicalGreyMatter3D), toggle Layer/Lamina zones, toggle Auto-Orbit (A), or click quick camera preset buttons (1:Iso, 2:Sag, 3:Cor, 4:Top, R:Reset).6. Causal Lesion & Optogenetics Lab: Switch ProbeTool (Inspect, Ablate, ChR2 (+), NpHR (-)), tune ChR2 Laser Drive (0.2..=1.8), trigger Sever Feedback, Sever Skip/Lat, Focal Stroke (25%), or Heal All, and monitor Pre/Acute/Now lesion recovery.
Center 3D Neural Space Viewport:
M13 & histological modes), tapered 3D apical trunks, L1 apical tufts, basal skirts, background pathways, and calm braided 3D cubic-Bezier tracer wisps (<= 22 sampled pathways).Hovering or clicking any soma opens the Soma Inspector Card showing Soma #ID, role, layer, (x, y, z), apical Ca2+ burst level, activation, Vm, bias, utility, and backprop gradient.
Bottom Lock Matrix & Telemetry Panel (toggleable via 📊 Lock Matrix):
pred vs. target progress bars) and cumulative +Sprouted | -Pruned | +Neurogenesis counters.lesion_events tag markers (Stroke, SeverFB, SeverLat, Ablate), Pre/Acute horizontal reference lines with top-right legend, and bottom X-axis sample ticks (#1, midpoint, #N).All single-key shortcuts (1–4, R, A, N, ., I, X, E, S, Space, F5, F9) require !ctx.wants_keyboard_input() and no modifier keys (Ctrl/Cmd/Alt), preventing interference with text fields or Ctrl+S export.
| Gesture / Key | Action |
|---|---|
Left-Drag |
Orbit camera (yaw / pitch) with smooth exponential damping |
Right-Drag or Middle-Drag |
Pan camera focal target in screen right/up plane |
Scroll Wheel |
Zoom camera distance (8.5 .. 54.0) with smooth damping |
1 |
Camera Preset: Isometric 3/4 view |
2 |
Camera Preset: Sagittal (X-Y) lateral profile |
3 |
Camera Preset: Coronal (Y-Z) transverse profile |
4 |
Camera Preset: Top-Down (X-Z) dorsal view |
R |
Reset camera target to origin, Isometric view, and resume Auto-Orbit |
A |
Toggle camera Auto-Orbit |
Space |
Play / Pause simulation |
N or . |
Pause and advance exactly 1 training step |
I |
Probe Tool: Inspect soma telemetry |
X |
Probe Tool: Focal Ablation (Shift+Click shortcut) |
E |
Probe Tool: Optogenetic ChR2 Excitation (Alt+Click shortcut) |
S |
Probe Tool: Optogenetic NpHR Photoinhibition |
F5 / F9 |
Save / Load SQLite WAL slot 'quicksave_f5' |
Ctrl/Cmd + S / Ctrl/Cmd + O |
Export / Import .neuroworkset.json |
F1 |
Toggle About, Shortcuts & Optogenetics Field Guide modal |
Esc |
Close F1 modal if open; otherwise clear selected neuron |
# Launch native GUI (default)
neurospace-lab gui
# Sweep all 15 models on locked D7 Molecular Properties for 80 steps
neurospace-lab bench-dataset --dataset D7 --steps 80
# Sweep all 7 datasets on locked M14 Frontier LLM for 60 steps
neurospace-lab bench-model --model M14 --steps 60
# Generate portable SHA-256 verified JSON workset to stdout
neurospace-lab export-sample-workset > sample.neuroworkset.json
# Render offscreen GPU screenshots for views 1, 2, or 3
neurospace-lab --headless-screenshot view1.png --screenshot-view 1
Valid dataset codes: D1, D2, D3, D4, D5, D6, D7.
Valid model codes: M0, M1, M2, M3, M4, M5, M6, M7, M8, M9, M10, M11, M12, M13, M14.
M13 (Cerebral Cortex Grey Matter) or M10 (Predictive Coding) for 40–60 steps until primary metric stabilizes.Pre baseline in Section 6 and the sparklines.Sever Feedback (cuts is_feedback pathways, collapsing L1 apical tuft Ca2+ bursts in M13 and top-down prediction subtraction in M10) or Focal Stroke (25%) (ablates a spatial cluster and sprouts compensatory bypass collaterals).ChR2 (E) or NpHR (S) on individual somata to clamp depolarization/hyperpolarization in real time.Heal All to restore intact circuitry and clear lesion markers.save_slots and comparison_runs in neurospace_lab.sqlite. If the working directory is read-only, the app falls back to in-memory operation and reports status in the footer..neuroworkset.json): Captures exact neurons, synapses, ablations, clamps, severed tracts, histories, and metrics, guarded by canonical SHA-256 digests (WorksetEnvelope::verify_digest()).--headless-screenshot fails: Ensure a Vulkan/DX12/Metal/OpenGL adapter is visible to wgpu (on headless Linux servers, verify Mesa/Vulkan ICD or xvfb/software adapter availability).ctx.wants_keyboard_input()) and no unintended modifier key (Ctrl/Alt) is held.SHA-256 checksum verification failed): The .neuroworkset.json file was edited or corrupted after export; re-export from a clean session.Export Workset... to save .neuroworkset.json directly.Licensed under GPL-3.0-or-later. See LICENSE.