SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.11984 · ICLR · 2024

Hebbian Learning based Orthogonal Projection for Continual Learning of Spiking Neural Networks

Di He, Zhouchen Lin, Mingqing Xiao, Qingyan Meng, Zongpeng Zhang

arXiv · PDF · Open in the Atlas

Code that ran

5 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 5 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.11984.json · badge: /api/ran/2402.11984.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
pkuxmq/HLOP-SNN canonical (classifier label)
classifier basis: census
5 ran · 1 no recorded run
pkuxmq/hlop-snn canonical (classifier label)
classifier basis: classifier_2025
0 ran · 1 no recorded run
FunctionStatusWhere it lives
kernel_dot_product Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
pkuxmq/HLOP-SNN/modules/functional.py
code served (permissive licence) · get_code("c01282b01e9a917a")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 2) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create small tensor arguments
# x and y should be shape [N, M] where N=2 (batch size), M=4 (feature dimension)
x = torch.randn(2, 4)
y = torch.randn(2, 4)

# Test with linear kernel (no extra args needed)
ARGS = {
    'x': x,
    'y': y,
    'kernel': 'linear',
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 2) — shape (2, 2) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
rate_spikes Ran
ran; our contract draft was wrong, not the code
pkuxmq/HLOP-SNN/modules/neuron_dsr.py
code served (permissive licence) · get_code("a2fe26394a48727d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 3, dtype family float, shape (2, 4, 3) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# The function expects:
# - data: a tensor that can be indexed with .size() and .view()
# - timesteps: an integer used to reshape the data

# Looking at the function:
# - data.size()[1:] extracts all dimensions except the first
# - data.view(timesteps, -1, *chw) reshapes data into (timesteps, batch_size, *chw)
# - torch.mean(..., 0) computes mean over dimension 0
# 
# So data should have shape (timesteps * batch, *chw)
# Let's use timesteps=2, batch=2, and spatial dims 4x3

timesteps = 2
batch = 2
height = 4
width = 3

# Create data with shape (timesteps * batch, height, width) = (4, 4, 3)
data = torch.randn(timesteps * batch, height, width)
# This way data.size()[1:] = (4, 3)
# and data.view(2, -1, 4, 3) = (2, 2, 4, 3)

ARGS = {
    "data": data,
    "timesteps": timesteps
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
spike_cluster Ran
ran; our contract draft was wrong, not the code
pkuxmq/HLOP-SNN/modules/functional.py
code served (permissive licence) · get_code("27d5ccfa4adc06b3")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch

torch.manual_seed(0)

# Create a small voltage tensor with shape [T, N]
# T = 5 time steps, N = 4 neurons
v = torch.randn(5, 4) * 10  # Scale up to make threshold crossing meaningful

# v_threshold can be a float or a tensor of shape [N]
v_threshold = 0.5

# T_in is the temporal distance threshold for spike clustering
T_in = 2

ARGS = {
    "v": v,
    "v_threshold": v_threshold,
    "T_in": T_in,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
sum_tensor Ran
ran; our contract draft was wrong, not the code
pkuxmq/HLOP-SNN/modules/neuron_dsr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from qymeng94/DSR, is pointer only (licence: NONE) · get_code("87c74170924e3caa")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from qymeng94/DSR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

weight_rate_spikes Ran
ran; our contract draft was wrong, not the code
pkuxmq/HLOP-SNN/modules/neuron_dsr.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from qymeng94/DSR, is pointer only (licence: NONE) · get_code("661427fd6fb1467e")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from qymeng94/DSR, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

HLOP Not yet run
unverified (harvested, no recorded run)
pkuxmq/hlop-snn/modules/hlop_module.py
code served (permissive licence) · get_code("d4ffbbcf81d424e8")
How it ran

no invocation recorded.

spike_similar_loss Not yet run
unverified (harvested, no recorded run)
pkuxmq/HLOP-SNN/modules/functional.py
code served (permissive licence) · get_code("d57151343446a891")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 0 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
kernel_dot_product 1 other paper
1 dated earlier
2210.04195 (2022-10)
Online Training Through Time for Spiking Neural Networks
spike_similar_loss 1 other paper
1 dated earlier
2210.04195 (2022-10)
Online Training Through Time for Spiking Neural Networks
sum_tensor 1 other paper
1 dated earlier
2205.00459 (2022-05)
Training High-Performance Low-Latency Spiking Neural Networks by Differentiation on Spike Representation
weight_rate_spikes 1 other paper
1 dated earlier
2205.00459 (2022-05)
Training High-Performance Low-Latency Spiking Neural Networks by Differentiation on Spike Representation

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Neuromorphic computing with spiking neural networks is promising for energyefficient artificial intelligence (AI) applications. However, different from humans who continually learn different tasks in a lifetime, neural network models suffer from catastrophic forgetting. How could neuronal operations solve this problem is an important question for AI and neuroscience. Many previous studies draw inspiration from observed neuroscience phenomena and propose episodic replay or synaptic metaplasticity, but they are not guaranteed to explicitly preserve knowledge for neuron populations. Other works focus on machine learning methods with more mathematical grounding, e.g., orthogonal projection on high dimensional spaces, but there is no neural correspondence for neuromorphic computing. In this work, we develop a new method with neuronal operations based on lateral connections and Hebbian learning, which can protect knowledge by projecting activity traces of neurons into an orthogonal subspace so that synaptic weight update will not interfere with old tasks. We show that Hebbian and anti-Hebbian learning on recurrent lateral connections can effectively extract the principal subspace of neural activities and enable orthogonal projection. This provides new insights into how neural circuits and Hebbian learning can help continual learning, and also how the concept of orthogonal projection can be realized in neuronal systems. Our method is also flexible to utilize arbitrary training methods based on presynaptic activities/traces. Experiments show that our method consistently solves forgetting for spiking neural networks with nearly zero forgetting under various supervised training methods with different error propagation approaches, and outperforms previous approaches under various settings. Our method can pave a solid path for building continual neuromorphic computing systems. The code is available at https://github.com/pkuxmq/HLOP-SNN.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.11984")
get_code_for_paper("2402.11984")
have("2402.11984")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2402.11984.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2402.11984.svg)](https://syntology.ai/paper/2402.11984)

Connect an agent — have() is free.