Skip to main content

Overview

Ablation modes allow you to test whether the CL1 biological neurons are genuinely learning, or if the decoder network is doing all the work. By replacing real neural spikes with controlled alternatives, you can isolate and validate the neurons’ contribution to gameplay.
Ablations are critical for scientific validation. Without them, you cannot prove that the biological neurons (rather than the decoder/PPO policy) are responsible for learned behavior.

Available Ablation Modes

none (Default)

Use actual spike data from the CL1 hardware. This is the standard training/evaluation mode.
In this mode, spike features flow directly from collect_spikes() to the decoder:

zero

Replace all spike counts with zeros. This tests what happens when the decoder receives no neural input.
Implementation:
With zero ablation, you should observe no learning. If the agent still improves, the decoder bias or encoder is compensating, which invalidates the claim that neurons are learning.

random

Replace spike counts with random values sampled uniformly from [0, 1]. This tests whether structured neural responses are necessary, or if any input works.
Used in training:
With random ablation, learning should be severely impaired or absent. If performance matches real spikes, the decoder is learning a static policy independent of neural input.

FAQ: Why Ablations Matter

No, this is precisely why there are ablations. The footage you see in the video was taken using a 0-bias full linear readout decoder, meaning that the action selected is a linear function of the output spikes from the CL1; the CL1 is doing the learning. There is a noticeable difference when using the ablation (both random and 0 spikes result in zero learning) versus actual CL1 spikes.Source: README.md FAQ section
This question largely assumes that the cells are static, which is incorrect; it is not a memory-less “feed X in, get Y” machine. Both the policy and the cells are dynamical systems; biological neurons have an internal state (membrane potential, synaptic weights, adaptation currents).The same stimulation delivered at different points in training will produce different spike patterns, because the neurons have been conditioned by prior feedback. During testing, we froze encoder weights and still observed improvements in the reward.Source: README.md FAQ section

Configuration Recommendations

When running ablations, ensure your decoder configuration isolates neural contributions:

Key Settings Explained

decoder_zero_bias=True Keeps bias at zero so decoded actions depend solely on encoder output. This helped prevent decoder-sided learning in testing, but may behave differently on actual hardware since the SDK spikes were random. This should definitely be tested with ablations! decoder_use_mlp=False Default linear decoder keeps hardware mapping transparent. Enable the MLP when you require richer non-linear policies (expect higher sample complexity; decoder also tends to start becoming a policy head, but this might be due to random spike noise from the SDK). Source: README.md lines 30-32

Running Ablation Experiments

1. Baseline (Real Spikes)

2. Zero Ablation

3. Random Ablation

Interpreting Results

Monitor these TensorBoard metrics across all three conditions:

Expected Outcomes

If zero/random ablations show learning curves similar to real spikes, investigate:
  • Is decoder_zero_bias=False? (Bias may be compensating)
  • Is decoder_use_mlp=True? (MLP may be learning a static policy)
  • Is encoder adapting to compensate? (Check encoder entropy metrics)

Visualizing Ablation Differences

Use TensorBoard to compare runs side-by-side:
Key plots:
  • Training/Episode_Reward
  • Training/Kill_Count
  • Decoder/forward_wx_bias_ratio
  • Encoder/freq_mean and Encoder/amp_mean

Code Reference

Ablation logic is implemented in ppo_doom.py: Tensor ablation (during training):
NumPy ablation (during rollout collection):
Default configuration: