SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2503.03144 · CVPR · 2025

Temporal Separation with Entropy Regularization for Knowledge Distillation in Spiking Neural Networks

Hongwei Wang, Qiang Zhang, Shu Yang, Chengting Yu, Qi Xu, Xiaochen Zhao, Kairong Yu, Tianqing Zhang

arXiv · PDF · Open in the Atlas

Code that ran

3 of 4 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 1 has no contract verdict; 2 failures of our instrument; 1 no recorded run), measured 2026-11-23; 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/2503.03144.json · badge: /api/ran/2503.03144.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
yukairong/TSER community
Papers with Code archive
3 ran · 1 no recorded run
FunctionStatusWhere it lives
Distiller Ran
ran on a synthesized input
yukairong/TSER/model/distiller.py
code served (permissive licence) · get_code("4ee94b03e46c248e")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, class construct-then-call prompt, model not recorded) and returned Tensor, ndim 2, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch.nn as nn

# Define simple student and teacher models
class SimpleModel(nn.Module):
    def __init__(self, input_dim, hidden_dim, output_dim):
        super(SimpleModel, self).__init__()
        self.fc1 = nn.Linear(input_dim, hidden_dim)
        self.fc2 = nn.Linear(hidden_dim, output_dim)
    
    def forward(self, x):
        x = torch.relu(self.fc1(x))
        x = self.fc2(x)
        return (x,)  # Return tuple as expected by forward_train

class Distiller(nn.Module):

    def __init__(self, student, teacher):
        super(Distiller, self).__init__()
        self.student = student
        self.teacher = teacher

    def train(self, mode=True):
        if not isinstance(mode, bool):
            raise ValueError('training mode is expected to be boolean')
        self.training = mode
        for module in self.children():
            module.train(mode)
        self.teacher.eval()
        return self

    def get_learnable_parameters(self):
        return [v for k, v in self.student.named_parameters()]

    def get_extra_parameters(self):
        return 0

    def forward_train(self, image, target, **kwargs):
        return self.student(image)[0]

    def forward(self, image, target, **kwargs):
        if self.training:
            return self.forward_train(image, target, **kwargs)
        return self.forward_test(kwargs['image'])


# Create student and teacher models
student = SimpleModel(input_dim=4, hidden_dim=8, output_dim=3)
teacher = SimpleModel(input_dim=4, hidden_dim=8, output_dim=3)

INIT_ARGS = {
    'student': student,
    'teacher': teacher,
}

ARGS = {
    'image': torch.randn(2, 4),
    'target': torch.randint(0, 3, (2,)),
}
Setup block drafted by
a language model, class construct-then-call prompt, model not recorded
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 — no output shape is stated: observe_signature.py could not observe it (call:AttributeError)
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: torch and numpy seeded to 0 by the harness immediately before the class was constructed from INIT_ARGS (fixture_check.py)
FklLossWithReg Ran
ran; our contract draft was wrong, not the code
yukairong/TSER/model/distiller.py
code served (permissive licence) · get_code("4944f084b6f09509")
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) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensors for the function
batch_size = 2
num_classes = 4

# logits_student: shape (batch_size, num_classes) or (batch_size, seq_len, num_classes)
# Testing with 2D case first
logits_student = torch.randn(batch_size, num_classes)

# logits_teacher: same shape as logits_student
logits_teacher = torch.randn(batch_size, num_classes)

# target: not actually used in the function body, but it's a parameter
target = torch.randint(0, num_classes, (batch_size,))

# temperature: scalar float value
temperature = 4.0

ARGS = {
    "logits_student": logits_student,
    "logits_teacher": logits_teacher,
    "target": target,
    "temperature": temperature,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
tet_loss Ran
ran; our contract draft was wrong, not the code
yukairong/TSER/model/distiller.py
code served (permissive licence) · get_code("a18395efbc1ce095")
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 0, dtype family float, shape () 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
import torch.nn.functional as F

torch.manual_seed(0)

# Create small tensor arguments
# outputs: shape (T, batch_size, num_classes) - T time steps, batch of 2, 4 classes
T = 3
batch_size = 2
num_classes = 4
outputs = torch.randn(T, batch_size, num_classes)

# labels: shape (batch_size,) with class indices
labels = torch.randint(0, num_classes, (batch_size,))

# means: scalar value for MMD loss regularization
means = 0.5

# lamb: scalar weight for MMD loss (0 to 1, where 0 = no MMD, 1 = only MMD)
lamb = 0.3

ARGS = {
    "outputs": outputs,
    "labels": labels,
    "means": means,
    "lamb": lamb,
}
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 0, dtype family float, shape () — shape () 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
KDT2 Not yet run
unverified (harvested, no recorded run)
yukairong/TSER/model/distiller.py
code served (permissive licence) · get_code("dd59e2a73bc626e5")
How it ran

no invocation recorded.

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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.

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-23.

Repositories linked to this paper

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

Abstract

Spiking Neural Networks (SNNs), inspired by the human brain, offer significant computational efficiency through discrete spike-based information transfer. Despite their potential to reduce inference energy consumption, a performance gap persists between SNNs and Artificial Neural Networks (ANNs), primarily due to current training methods and inherent model limitations. While recent research has aimed to enhance SNN learning by employing knowledge distillation (KD) from ANN teacher networks, traditional distillation techniques often overlook the distinctive spatiotemporal properties of SNNs, thus failing to fully leverage their advantages. To overcome these challenge, we propose a novel logit distillation method characterized by temporal separation and entropy regularization. This approach improves existing SNN distillation techniques by performing distillation learning on logits across different time steps, rather than merely on aggregated output features. Furthermore, the integration of entropy regularization stabilizes model optimization and further boosts the performance. Extensive experimental results indicate that our method surpasses prior SNN distillation strategies, whether based on logit distillation, feature distillation, or a combination of both. Our project is available at https://github.com/yukairong/TSER.

For agents

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

get_harvested_code_for_paper("2503.03144")
get_code_for_paper("2503.03144")
have("2503.03144")

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

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

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

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

Connect an agent — have() is free.