You may find more information about the kinds of works that are being done in NeuroAILab in these slides.
Dimensionality of Intermediate Representations of Deep Neural Networks with Biological Constraints
It is generally believed that deep neural networks and animal brain solve a vision task by changing the dimen-sionality of input stimuli across deep hierarchy. However, so far the evidence shows that in object recognition task, deep neural networks first expand and then compress the dimensionality of stimuli, while primate brains do the opposite and first compress and then expand the dimensionality of stimuli across deep hierarchy. In this project, it is shown that if two biological constraints - namely the non-negativity of activities and energy efficiency in both activities and weights - are imposed on deep neural networks - the trend of dimensionality across deep neural networks and primate brain matches to each other and in both of these cases the dimension- ality of stimuli is first compressed and then expanded. This result shows that how neuroscience can help better understanding in artificial intelligence.
Code: https://github.com/aslansd/neuroinspired-vision
Slide: https://drive.google.com/file/d/12LeMcfJXpwQBZGZT_LApU8G6Y-H-8ctE/view?usp=drive_link
Predictive coding theory as a unified theory of brain formulating intelligence as a hierarchical process in which the brain builds an unsupervised world model and tries to predict the next states of the world by minimising the prediction errors. This process can be implemented in a variant of artificial neural networks, called energy-based networks or predictive coding networks, trained by a biologically plausible learning rule named prospective configuration. In each step of prospective configuration, first the neuronal activities of intermediate layers are adjusted to reflect the activities required to produce the targets and then synaptic weights of intermediate layers are adjusted to consolidate these neuronal activities. While in recent years, there is a good progress on theoretical understanding of predictive coding networks trained by prospective configuration algorithm, the inner machinery and the internal representations of these neural networks compared to usual feedforward neural networks are still unknown. This project aims to fill this gap by applying interpretability techniques to well-defined vision tasks. To this end, a few recently published methods are used to measure the internal representations of predictive coding networks to compare them with usual feedforward neural networks. The project is performed by simple vision tasks such as relatively simple predictive coding networks trained on relatively simple synthesised or well-known datasets. The results show that the internal machinery of predictive coding networks are different from usual feedforward neural networks.
Code: https://github.com/aslansd/pcx-nla-vision-interpretability-methods
PCX-Based Predictive Coding Reinforcement Learning: Benchmarking on Classic Control Tasks
This repository contains a comprehensive JAX/Equinox notebook implementing and benchmarking Predictive Coding (PCX) based Reinforcement Learning agents against traditional RL methods (A2C-GAE and PPO-GAE) on four classic control tasks. The project explores how biologically-inspired predictive coding principles—specifically free-energy minimization and hierarchical Vode (latent variable) inference—can be integrated into policy and value networks for RL.
Key Contributions:
- PCX-Based Policy Networks: Neural networks with internal Vode (latent state) layers that iteratively infer hidden representations via energy minimization during both forward passes and learning.
- PCX-Based Value Networks: Predictive coding value functions with clamped output Vodes for TD target prediction.
- Two-Phase PCX Training: Alternating inference (Vode optimization) and weight learning phases integrated with PPO.
- Comprehensive Benchmarking: Direct comparison of A2C-GAE, PPO-GAE, and PCX-PPO on identical environments.
- Policy Visualization: 2D policy heatmaps showing action landscapes for all four tasks.
Code: https://github.com/aslansd/pcx-rl-interpretability-methods
Predictive Coding Large Language Models: PCX & PCL Framework Comparison
This project contains a comprehensive JAX/Equinox notebook implementing and comparing Predictive Coding (PCX/PCL) based Large Language Models against standard Transformer architectures. The project explores how biologically-inspired predictive coding principles—specifically free-energy minimization and Winner-Take-All (WTA) sparsity—can be integrated into modern LLMs.
Key Contributions:
- PC-Self-Attention: A novel attention mechanism where the attention output is treated as a *prediction* that undergoes iterative inference (Vode optimization) rather than a single forward pass.
- PCL-Inspired WTA Sparsity: Winner-Take-All masking that forces each query to attend to only the top‑k keys, promoting sparse attention patterns.
- Predictive Coding Training Loop: Two-phase optimization—(1) inference of hidden states (Vodes) via gradient descent on energy, (2) weight updates on the generative model.
- Interpretability Metrics: Attention sparsity, Vode error dynamics, attention peakiness, and MLP gradient norms for comparing PC vs. standard models.
- Progressive Scaling: Three model sizes (Simple → Nano → Micro) to study how PC principles scale with capacity.
Code: https://github.com/aslansd/pcx-language-interpretability-methods
Interpretability Methods on Simplified JEPA Models
This project contains a comprehensive Colab notebook that implements and trains six self‑supervised / world‑model architectures (I‑JEPA, V‑JEPA, V‑JEPA2, V‑JEPA2.1, C‑JEPA, and LeWorldModel) on simple synthetic or real datasets (CIFAR‑10, MovingMNIST, and custom bouncing‑digit environments). After training, the notebook applies a suite of mechanistic interpretability tools to each model, including CKA similarity, attention visualisation, activation patching, sparse autoencoders (SAE) with feature visualisation, and logit‑lens style decoders.
Code: https://github.com/aslansd/JEPA-Mechanistic-Interpretability
Learning-Rule Transplants
Five self-contained notebooks that take the local plasticity rules of the EIANN framework — Galloni, Peddada, Chennawar & Milstein (2026), Cellular and subcellular specialization enables biology-constrained deep learning, Cell Reports 45:117159 · Milstein-Lab/EIANN — and drop them into four unrelated published models: an active-inference Pong agent, a 3→3 auto-associator, an information-theoretic plasticity estimator, a β-VAE rate–distortion study, and a generative cognitive map for planning.
Copying Task: Vanilla Transformer vs. Spike-Driven Transformer
A single self-contained notebook that trains a vanilla attention-only Transformer and a causally-adapted Spike-Driven Transformer (SDSA-3, LIF neurons) on the same synthetic copying task, with the same data pipeline, optimizer, and evaluation protocol — then compares their in-distribution (ID) and out-of-distribution (OOD) error curves.
Mini Sensorimotor Agency in Lenia
A small-scale, CPU-only, NumPy-only replication of the central qualitative claim of "Discovering sensorimotor agency in cellular automata using diversity search" (Hamon, Etcheverry, Chan, Moulin-Frier & Oudeyer, Science Advances, 2025 — paper · arXiv:2402.10236 · official code): gradient-guided search over a differentiable cellular automaton finds patterns that travel further through an obstacle field than undirected random search does, **without** trading away robustness to get there.
Code: https://github.com/aslansd/Mini-Sensorimotor-Agency-in-Lenia
Cognitive Maps, Planning, and Abstraction
Ten self-contained notebooks that take recent papers in computational neuroscience and cognitive science, re-implement their models from the equations and the released source, and put them on shared tasks so they can be compared, combined, and falsified rather than admired one at a time. Each notebook does one of three things: 1) benchmarks models from different papers against each other on a single common task (and, where the task has them, against human data), 2) combines two papers that have never been combined, at a specific technical joint, and tests whether the combination does what the theory predicts, 3) transplants a framework into a domain its authors never targeted — usually ARC-AGI — to find out which of its claims are about the framework and which were about the original benchmark.
Code: https://github.com/aslansd/Cognitive-Maps-Planning-and-Abstraction
Testing the Compositionality Continuum
A computational test suite for Riveland, Pouget & Driscoll (2026), The compositionality continuum as a principle for studying the neural basis of intelligence, Nature Neuroscience 29, 2067–2080. The Perspective argues that compositionality is not a binary trait but a continuum with two axes — module expressivity andsyntactic complexity — and that compositional behaviour can come apart from compositional implementation. This repository operationalizes both axes, validates the measurements against synthetic ground truth, and runs 13 experiments across four model classes to test 13 specific claims.
Code: https://github.com/aslansd/Compositionality-Continuum-Experiments
Homeostasis, Allostasis, and Degeneracy
A single self-contained notebook that evolves small artificial agents whose only selection pressure is staying alive, and then asks what mechanism they actually acquired. Motivation in organisms is not supplied by an external reward signal. It derives from the need to hold essential physiological variables inside a viability zone, which is why water is worth something to a dehydrated animal and nothing to a sated one. Grounding artificial agents in the same constraint is an attractive route to autonomy, but it raises a question that is rarely asked: if motivation is allowed to emerge rather than being engineered, how do we establish which mechanism an agent ended up with?
Code: https://github.com/aslansd/Homeostasis-Allostasis-Degeneracy
Closure-Bench
Decisive tests of computational closure in a whole nervous system. A ladder of models — from wiring-only to self-modifying — is fitted to the C. elegans signal-propagation atlas and scored on held-out optogenetic interventions against a noise ceiling, turning an argument about levels of description into a measurement. Closure under intervention appears at a connectome-constrained nonlinear network (held-out FEVE 0.488, against 0.428 for wiring alone and 0.32 for a black box), but fails in spontaneous activity.
Global Latent Workspace
A laptop-scale implementation of the Global Workspace architecture proposed by VanRullen and Kanai (2021). Frozen vision, attribute and language autoencoders are joined through a shared twelve-dimensional workspace trained on unpaired data with cycle-consistency, then tested on zero-shot cross-modal translation and cross-sense policy transfer. A reverberation loop retains workspace content after a stimulus is removed, but produces no all-or-none ignition.
Numerosity & Geometric Deep Learning
Invariant object counting built from the symmetry group of number rather than learned from scale: C4-equivariant local features, then a local density, then sum pooling — a 17k-parameter network that counts circles, squares and triangles, and their total, in a single forward pass. A plain CNN, a density CNN and the equivariant counter are compared on exact symmetry, extrapolation to more objects and larger images, area confounds and unseen shapes. A third notebook puts the model beside the number-sense literature — Zorzi, Nieder and Summerfield — testing unsupervised emergence, number-selective units, Weber scaling, number-line geometry and zero-shot counting.
Code: https://github.com/aslansd/Numerosity-Geometric-Deep-Learning
Mixed vs Disentangled
When does the brain mix its variables, and when does it keep them apart? Seven notebooks argue that both come out of one optimization: non-negative firing rates and an energy cost favour codes that factorise along the axes where the joint support of the latent variables is rectangular — correlation alone does not decide it. Nonlinear readouts, sparse energy-limited classification and feedback push the other way. Across sixteen nonlinear tasks the share of nonlinearly mixed neurons rises from 0.54 to 1.00; dendritic branches take a single neuron from 40% to 100% of the Boolean functions of three inputs; and in a sensory-to-association network without feedback the sensory regions come out disentangled while the association regions mix.
Brain Hierarchy Revised
Revisits the system hierarchy for brain-inspired computing of Zhang et al. (Nature, 2020) in light of Romain Brette's argument that the brain has no hardware/software split. The first notebook rebuilds the 2020 pipeline — POG, compiler, EPG — and the rest simulate what follows if the split is dropped: write ledgers, device drift and plastic weights that make a "program" depend on its own history; a self-organising substrate that repairs itself after lesions; a map grown from a seven-number genome and remapped after damage; and closed-loop agents, where an ultrastable agent is set against a programmed controller as the environment changes. A final benchmark puts the two hierarchies head to head on a P-ultrastability criterion. The argument itself is written out in FRAMEWORK.md.
Image–Action Compositionality: Diffusion vs APC
A laptop-scale benchmark putting two accounts of hierarchical, compositional structure on the same data — diffusion models and Active Predictive Coding — where the latent hierarchy is known exactly. Diffusion models are trained on images from a Random Hierarchy Model and compared against exact Bayes-optimal inference by belief propagation, so the yardstick is the true posterior rather than another network. APC is ported to PyTorch from the authors' own vision code and extended to planning with REINFORCE-trained options and shooting-based MPC, then set against diffusion planners on a rooms navigation task. Five notebooks measure per-level validity and novelty, phase-transition curves, probe accuracy and goal-reaching.
Code: https://github.com/aslansd/Image-Action-Compositionality-Diffusion-vs-APC-Benchmark
ICL Symmetry Groups Benchmark
A controlled PyTorch benchmark evaluating how geometric deep learning symmetry groups shape in-context learning across eleven architectures — from MLPs, LSTMs, 1D-CNNs, DeepSets, and kNN-GNNs to linear, softmax, and HYLA transformers plus a Σn × O(d)-invariant Gram network. Models are trained under a unified protocol on in-context linear regression, drifting tasks, and compositional fuzzy-logic DNF functions, then evaluated with test-time group-action probes. Results show that built-in O(d) rotation invariance eliminates the finite-task memorization regime and yields strong sample efficiency, whereas positional encodings trade length extrapolation for sequence-order tracking.
Code: https://github.com/aslansd/ICL-Symmetry-Groups-Benchmark
A comprehensive web application for biophysical simulation of *C. elegans* neural networks using **Jaxley** (JAX-based biophysical neural simulation) and **OpenWorm** c302 connectome data, with a modern React frontend
### 🔬 Biophysical Simulation
- **302 neurons** with Hodgkin-Huxley ion channels
- **95 muscle cells** with calcium dynamics
- **Full connectome** from OpenWorm c302
- **GPU-accelerated** via JAX/XLA
- **Real-time parameter tuning** with WebSocket streaming
### 🧠 NeuroML → SWC Converter
- Custom converter for OpenWorm NeuroML2 to Jaxley-compatible SWC
- Handles multicompartmental morphologies (Level D)
- Preserves 3D coordinates and segment types
### 💪 Muscle Integration
- Muscle activation computed from membrane voltages
- Sibernetic-compatible output format
- Body movement visualization
### 🎨 Interactive Web UI
- **3D morphology viewer** (Three.js)
- **Real-time voltage traces** with spike detection
- **Parameter sliders** for ion channels and synapses
- **Stimulus pattern editor** (step, ramp, pulse train, sinusoidal)