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
Dimensionality of Intermediate Representations of Deep Neural Networks with Biological Constraints
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
Future Projects:
Building educational web applications in biology, biophysics, and neuroscience.