DendriCL methodology for dendritic in-context learning in single-layer spiking neural networks. Shows that ICL requires neither attention, depth, nor inference-time plasticity: a single compartment with online-LMS dynamics is sufficient. Use when building SNNs with in-context learning capabilities, dendritic computation models, or biologically plausible learning mechanisms.
Scanned 9/11/2026
Install to Claude Code
npx -y skills add hiyenwong/ai_collection --skill dendritic-in-context-learning-snn --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Dendritic In Context Learning Snn?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/hiyenwong-dendritic-in-context-learning-snn-ai-collection)More formats (shields.io, HTML) on the badges page.
---
name: dendritic-in-context-learning-snn
description: "DendriCL methodology for dendritic in-context learning in single-layer spiking neural networks. Shows that ICL requires neither attention, depth, nor inference-time plasticity: a single compartment with online-LMS dynamics is sufficient. Use when building SNNs with in-context learning capabilities, dendritic computation models, or biologically plausible learning mechanisms."
category: ai_collection
trigger_words:
- dendritic in-context learning
- dendriCL
- SNN ICL
- dendritic compartment
- online LMS spiking
- compartmental spiking
- apical recurrence
- Garg-2022 benchmark
- Widrow-Hoff SNN
- seed-stable ICL
---
# Dendritic In-Context Learning in Single-Layer Spiking Neural Networks (DendriCL)
## Overview
DendriCL demonstrates that in-context learning (ICL) in Spiking Neural Networks requires **neither attention, depth, nor inference-time plasticity** — a single compartment with online-LMS dynamics is sufficient. This collapses the architectural depth required for general-purpose ICL to a single layer.
**Paper**: [Dendritic In-Context Learning in a Single-Layer Spiking Neural Network](https://arxiv.org/abs/2607.02283)
**Authors**: Juwei Shen, Yujie Wu, Changwen Chen
**arXiv**: 2607.02283v1 (July 2, 2026)
## Core Insight
The subthreshold dynamics of a **single dendritic compartment** already implements a complete online learning algorithm. By treating the compartment as the **computational substrate** rather than a passive conduit for error/teacher signals, DendriCL achieves ICL in a single-layer compartmental spiking architecture.
## Key Technical Contributions
### 1. Structural Identity with Online LMS
The apical recurrence in DendriCL is structurally identical to **leaky online Widrow-Hoff LMS**:
```
Δw = η · (error) · (input) - λ · w
```
This dynamics-only update means the learning algorithm is **structurally embedded in the dynamics** rather than implicitly discovered during training.
### 2. Seed Stability at Super-Dimensional ICL
- DendriCL is **uniquely seed-stable** at super-dimensional Garg-2022 ICL benchmarks
- Dense Transformers exhibit **grokking-style instability** and fail past moderate task dimensions
- DendriCL maintains stability across all tested task dimensions
### 3. Linear Probe Recovery
A linear probe recovers the reference online-LMS trajectory directly from the apical membrane at **R² = 0.93**, confirming the algorithm is structurally embedded in the dynamics.
## Architecture
### Single-Layer Compartmental SNN
```
Input → Dendritic Compartment → Somatic Spiking → Output
```
- **Dendritic compartment**: Implements online-LMS dynamics in subthreshold membrane potential
- **Somatic layer**: Generates spikes based on dendritic integration
- **No backpropagation required**: Learning is built into the compartment dynamics
- **No inference-time synaptic plasticity**: Adaptation is purely dynamic
### Comparison with Prior SNNs
| Property | Prior SNNs | DendriCL |
|----------|-----------|----------|
| ICL capability | Fails Garg-2022 benchmark | Succeeds at all dimensions |
| Architecture depth | Multi-layer required | Single layer sufficient |
| Learning mechanism | Inference-time plasticity | Subthreshold dynamics |
| Seed stability | Unstable at high dimensions | Seed-stable |
| Attention required | Sometimes | No |
## Implementation Guidelines
### Dendritic Compartment Dynamics
```python
# Conceptual implementation of DendriCL compartment
class DendriticCompartment:
def __init__(self, n_inputs, learning_rate=0.01, leak=0.001):
self.w = np.random.randn(n_inputs) # Synaptic weights
self.lr = learning_rate
self.leak = leak
self.membrane = 0.0
def step(self, inputs, target=None):
# Forward pass: weighted sum + leak
self.membrane = np.dot(self.w, inputs) - self.leak * self.membrane
# Online LMS update (embedded in dynamics)
if target is not None:
error = target - self.membrane
self.w += self.lr * error * inputs - self.leak * self.w
# Spiking output
spike = 1.0 if self.membrane > threshold else 0.0
return spike, self.membrane
```
### Garg-2022 Benchmark
When implementing ICL for SNNs:
- Test at **multiple task dimensions** (not just trivial ones)
- Check **seed stability** across random initializations
- Verify **linear probe recovery** of the learning trajectory
## Key Findings
1. **ICL ≠ Attention**: Transformers use attention for ICL, but DendriCL shows it's not necessary
2. **ICL ≠ Depth**: Multi-layer architectures are not required for general-purpose ICL
3. **ICL ≠ Inference-time Plasticity**: Adaptation can be purely dynamic, not synaptic
4. **Dendrites as Computers**: The dendritic compartment is not a passive conduit — it's a complete learning algorithm
5. **Structural Embedding**: The learning algorithm is embedded in the architecture, not discovered during training
## Practical Applications
- **Neuromorphic Hardware**: Single-layer SNNs with dendritic compartments for on-chip ICL
- **Edge AI**: Low-power inference with built-in adaptation
- **Biological Plausibility**: More realistic model of how biological neurons might perform ICL
- **SNN Benchmarking**: New standard for evaluating SNN ICL capabilities
## Related Work
- Garg et al. (2022): Benchmark for in-context learning capabilities
- Widrow-Hoff LMS: Classic online learning algorithm
- Compartmental neuron models: Multi-compartment neuron modeling
- Spiking Neural Networks: Event-based neural computation
## Pitfalls
- **Prior SNN ICL failures**: Existing SNN designs route adaptation through inference-time synaptic plasticity, viewing dendrites as passive conduits — this is the wrong assumption
- **Garg-2022 benchmark**: Must test at non-trivial task dimensions; many SNNs fail here
- **Transformer grokking**: Dense Transformers exhibit grokking-style instability at super-dimensional ICL — DendriCL avoids this
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!