Homeostatic dendritic neuron based on co-integrated volatile and non-volatile memristors for neuromorphic processing.
2 blocks of code here have a permanent identifier (oscr:b:…), listed with the matches below: citable for good, with a page of its own. Select a match and press Cite to copy it. What a block identifier is.
The 2 matches
- [1] § Methods › Preprocessing for the speech command dataset ↔ GSC/data.py, lines 33 to 149 · score 0.70 · speech commands, 4 kHz, spectrograms, Mel, word, audio · block
oscr:b:PJYKBD68F9ED9-9· Report a mismatch - [2] § Methods › Preprocessing for the fault diagnosis dataset ↔ CWRU/data_process_CRWU.py, lines 43 to 118 · score 0.52 · inner, outer, diameters, ball, baseline, fault · block
oscr:b:569JA7C12C0FX-0· Report a mismatch
Paper
Loaded from Europe PMC by your browser; OSCR does not store it: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 167 lines · 5.6 KB · no license · 1 match
- import torch
- import torchaudio
- import matplotlib.pyplot as plt
- import IPython.display as ipd
- from torchaudio.datasets import SPEECHCOMMANDS
- import os
- import json
- import numpy as np
- import torch
- import librosa
- from sklearn.preprocessing import normalize
- import numpy as np
- import librosa
- class SubsetSC(SPEECHCOMMANDS):
- def __init__(self, subset: str = None):
- super().__init__(r"/root/", download=False)
- def load_list(filename):
- filepath = os.path.join(self._path, filename)
- with open(filepath) as fileobj:
- return [os.path.join(self._path, line.strip()) for line in fileobj]
- if subset == "validation":
- self._walker = load_list("validation_list.txt")
- elif subset == "testing":
- self._walker = load_list("testing_list.txt")
- elif subset == "training":
- excludes = load_list("validation_list.txt") + load_list("testing_list.txt")
- excludes = set(excludes)
- self._walker = [w for w in self._walker if w not in excludes]
- class SpeechCommandsDataset:
- def __init__(self, batch_size=256, device="cuda"):
- self.device = torch.device(device)
- self.batch_size = batch_size
- self.train_set = SubsetSC("training")
- self.test_set = SubsetSC("testing")
- self.val_set = SubsetSC("validation")
- self.labels_file = "speechcommand_labels.json"
- if os.path.exists(self.labels_file):
- with open(self.labels_file, 'r') as f:
- self.labels = json.load(f)
- else:
- self.labels = sorted(list(set(datapoint[2] for datapoint in self.train_set)))
- with open(self.labels_file, 'w') as f:
- json.dump(self.labels, f)
- self.train_loader = self._create_data_loader(self.train_set, shuffle=True)
- self.test_loader = self._create_data_loader(self.test_set, shuffle=False)
- self.val_loader = self._create_data_loader(self.val_set, shuffle=False)
- def _create_data_loader(self, dataset, shuffle):
- if self.device == "cuda":
- num_workers = 8
- pin_memory = True
- else:
- num_workers = 0
- pin_memory = False
- return torch.utils.data.DataLoader(
- dataset,
- batch_size=self.batch_size,
- shuffle=shuffle,
- collate_fn=self.collate_fn,
- num_workers=num_workers,
- pin_memory=pin_memory,
- )
- def label_to_index(self, word):
- return torch.tensor(self.labels.index(word))
- def index_to_label(self, index):
- return self.labels[index]
- def pad_sequence(self, batch):
- batch = [item.t() for item in batch]
- batch = torch.nn.utils.rnn.pad_sequence(batch, batch_first=True, padding_value=0.)
- return batch.permute(0, 2, 1)
- def mel_spectrogram(self, wav):
- sr =16000
- delta_order=2
- stack=True
- S = librosa.feature.melspectrogram(y=wav,
- sr=sr,
- n_fft=int(30e-3*sr),
- hop_length=int(10e-3*sr),
- n_mels=40,
- fmax=4000,
- fmin=20
- )
- M = np.max(np.abs(S))
- if M > 0:
- feat = np.log1p(S / M)
- else:
- feat = S
- if delta_order is not None:
- feat_list = [feat.T]
- for k in range(1, delta_order + 1):
- feat_list.append(librosa.feature.delta(feat, order=k).T)
- if stack:
- return np.stack(feat_list)
- else:
- return np.expand_dims(feat.T, 0)
- else:
- return np.expand_dims(feat.T, 0)
- def rescale(self, input):
- std = np.std(input, axis=1, keepdims=True)
- std[std == 0] = 1
- return input / std
- def collate_fn(self, batch):
- tensors, targets = [], []
- for waveform, _, label, *_ in batch:
- tensors += [waveform]
- targets += [self.label_to_index(label)]
- tensors = self.pad_sequence(tensors)
- tensors = self.mel_spectrogram(tensors.numpy())
- tensors = self.rescale(tensors)
- tensors = torch.tensor(tensors, dtype=torch.float64).squeeze(3).permute(3, 0, 1, 2)
- targets = torch.stack(targets)
- return tensors, targets
- def play_audio(self, index=0):
- waveform, sample_rate = self.train_set[index][0], self.train_set[index][1]
- return ipd.Audio(waveform.numpy(), rate=sample_rate)
- def play_resampled_audio(self, index=0, new_sample_rate=8000):
- waveform, sample_rate = self.train_set[index][0], self.train_set[index][1]
- transform = torchaudio.transforms.Resample(orig_freq=sample_rate, new_freq=new_sample_rate)
- transformed = transform(waveform)
- return ipd.Audio(transformed.numpy(), rate=new_sample_rate)
- def plot_audio(self,index=0):
- waveform, sample_rate, *_ = self.train_set[index]
- print("Shape of waveform: {}".format(waveform.size()))
- print("Sample rate of waveform: {}".format(sample_rate))
- plt.plot(waveform.t().numpy())
- if __name__ == "__main__":
- dataset = SpeechCommandsDataset()
- dataset.test_loader
- dataset.train_loader
- dataset.play_audio()
- dataset.play_resampled_audio()
- dataset.plot_audio()
- a = dataset.test_loader
- for batch_idx, (inputs, targets) in enumerate(a):
- print(f"Batch {batch_idx + 1}:")
- print(f"Inputs: {inputs.shape}")
- print(f"Targets: {targets.shape}")
- if batch_idx == 1:
- break
data.py at commit c0d39bd, no license · at the source
Overview
- New Cornerstone Science Laboratory, Guangdong Provincial Key Laboratory of In-Memory Computing Chips, School of Electronic and Computer Engineering, Shenzhen Graduate School, Peking University,Shenzhen, China
- Peng Cheng Laboratory,Shenzhen, China
- New Cornerstone Science Laboratory, Beijing Advanced Innovation Center for Integrated Circuits, School of Integrated Circuits, Peking University,Beijing, China
- Center for Brain Inspired Intelligence, Chinese Institute for Brain Research (CIBR),Beijing, China
Abstract
The abstract is not reproduced here: the paper's license (CC BY-NC-ND) does not allow it. Read it in the paper, at the publisher or on Europe PMC.
Repositories
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
Zenodo 20073414
Availability: 1 check, the latest on 28 September 2026: the link answers (HTTP 200)
- 28 September 2026: the link answers (HTTP 200)
13 files
- CWRU/
STFT_conv.py , Python, 129 lines - CWRU/
Surrogate_gradient.py , Python, 44 lines - CWRU/
data_process_CRWU.py , Python, 122 lines - CWRU/
model.py , Python, 133 lines - CWRU/
neuro.py , Python, 308 lines - CWRU/
utils.py , Python, 15 lines - GSC/
data.py , Python, 167 lines - GSC/
gradient.py , Python, 38 lines - GSC/
model_trainer.py , Python, 164 lines - GSC/
models.py , Python, 27 lines - GSC/
readout_layer.py , Python, 39 lines - GSC/
snn_neuron.py , Python, 126 lines - README.md, Text, 2 lines
lichengzhangcim/homeostatic-dendritic-neuron
c0d39bd18fc41af4c68bd4985ba85d0b0f9a3a31, 16 December 2025Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
13 files
- CWRU/
STFT_conv.py , Python, 129 lines - CWRU/
Surrogate_gradient.py , Python, 44 lines - CWRU/
data_process_CRWU.py , Python, 122 lines, 1 match - CWRU/
model.py , Python, 133 lines - CWRU/
neuro.py , Python, 308 lines - CWRU/
utils.py , Python, 15 lines - GSC/
data.py , Python, 167 lines, 1 match - GSC/
gradient.py , Python, 38 lines - GSC/
model_trainer.py , Python, 164 lines - GSC/
models.py , Python, 27 lines - GSC/
readout_layer.py , Python, 39 lines - GSC/
snn_neuron.py , Python, 126 lines - README.md, Text, 2 lines
Code availability statement
The paper has a code availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to the authors' code: Zenodo 20073414
Read it in the paper: doi.org/10.1038/s41467-026-73669-x.
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 2 repositories of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 24 scripts, each with its path and the digest of its content;
- 2 matches between paragraphs of the paper and lines of the code (method lexical-v1);
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
Datasets cited
- zenodo:20072736, at Zenodo; found in “Data availability”
Data availability statement
The paper has a data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:
- it points to a dataset: Zenodo 20072736
Read it in the paper: doi.org/10.1038/s41467-026-73669-x.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 6 authors, 1 keyword, 7 MeSH terms, 62 references.
Cite
This paper
Zhang, L., Zhang, T., Tiw, P. J., Wu, X., Su, Y., & Yang, Y. (2026). Homeostatic dendritic neuron based on co-integrated volatile and non-volatile memristors for neuromorphic processing. Nature communications, 17(1), 6918. https://
BibTeX
@article{zhang2026homeos
author = {Zhang, Licheng and Zhang, Teng and Tiw, Pek Jun and Wu, Xulei and Su, Yuqi and Yang, Yuchao},
title = {{Homeostatic dendritic neuron based on co-integrated volatile and non-volatile memristors for neuromorphic processing}},
journal = {Nature communications},
year = {2026},
month = may,
volume = {17},
number = {1},
pages = {6918},
publisher = {Nature Publishing Group},
issn = {2041-1723},
doi = {10.1038/
url = {https://
pmid = {42209470},
pmcid = {PMC13388921}
}
RIS
TY - JOUR
AU - Zhang, Licheng
AU - Zhang, Teng
AU - Tiw, Pek Jun
AU - Wu, Xulei
AU - Su, Yuqi
AU - Yang, Yuchao
TI - Homeostatic dendritic neuron based on co-integrated volatile and non-volatile memristors for neuromorphic processing
T2 - Nature communications
J2 - Nat Commun
PY - 2026
DA - 2026/
VL - 17
IS - 1
SP - 6918
SN - 2041-1723
PB - Nature Publishing Group
DO - 10.1038/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1038/
"type": "article-journal",
"title": "Homeostatic dendritic neuron based on co-integrated volatile and non-volatile memristors for neuromorphic processing",
"container-title": "Nature communications",
"author": [
{
"family": "Zhang",
"given": "Licheng"
},
{
"family": "Zhang",
"given": "Teng"
},
{
"family": "Tiw",
"given": "Pek Jun"
},
{
"family": "Wu",
"given": "Xulei"
},
{
"family": "Su",
"given": "Yuqi"
},
{
"family": "Yang",
"given": "Yuchao"
}
],
"container-title-short":
"volume": "17",
"issue": "1",
"page": "6918",
"DOI": "10.1038/
"PMID": "42209470",
"PMCID": "PMC13388921",
"ISSN": "2041-1723",
"publisher": "Nature Publishing Group",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
5,
28
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1038/s41467-026-68905-3 [code]
- Homogeneous integration of two-dimensional material-based optoelectronic neurons and ferroelectric synapses for neuromorphic vision.Journal: Nature communicationsIn common: PyTorch, SciPy, Matplotlib, 1 other tool, 1 reference, 3 authors
- [2] doi:10.1038/s41467-022-31747-w [code]
- A calibratable sensory neuron based on epitaxial VO<sub>2</
sub> for spike-based neuromorphic multisensory system. Journal: Nature communicationsIn common: PyTorch, NumPy, 2 references, 2 authors - [3] doi:10.3389/fnins.2024.1449181 [code]
- Exploring neural oscillations during speech perception via surrogate gradient spiking neural networks.Journal: Frontiers in neuroscienceIn common: PyTorch, SciPy, Matplotlib, 1 other tool, 5 references
- [4] doi:10.1038/s41467-022-35747-8 [code]
- Introducing the Dendrify framework for incorporating dendrites to spiking neural networks.Journal: Nature communicationsIn common: SciPy, Matplotlib, NumPy, 6 references
- [5] doi:10.3389/fnins.2022.865897 [code]
- A surrogate gradient spiking baseline for speech command recognition.Journal: Frontiers in neuroscienceIn common: PyTorch, NumPy, 5 references
- [6] doi:10.1038/s41467-026-68858-7 [code]
- Bioinspired spiking architecture enables energy constrained touch encoding.Journal: Nature communicationsIn common: SciPy, Matplotlib, NumPy, 4 references
- [7] doi:10.1038/s41467-024-52132-9 [code]
- An emergent attractor network in a passive resistive switching circuit.Journal: Nature communicationsIn common: 2 references, author Yuchao Yang
- [8] doi:10.3389/fnins.2022.945037 [code]
- MAP-SNN: Mapping spike activities with multiplicity, adaptability, and plasticity into bio-plausible spiking neural networks.Journal: Frontiers in neuroscienceIn common: PyTorch, SciPy, Matplotlib, 1 other tool, 4 references
- [9] doi:10.1038/s41467-025-63771-x [code]
- Efficient and robust temporal processing with neural oscillations modulated spiking neural networks.Journal: Nature communicationsIn common: PyTorch, scikit-learn, SciPy, 2 other tools, 3 references
- [10] doi:10.3389/fnins.2022.1079357 [code]
- STSC-SNN: Spatio-Temporal Synaptic Connection with temporal convolution and attention for spiking neural networks.Journal: Frontiers in neuroscienceIn common: PyTorch, scikit-learn, SciPy, 2 other tools, 3 references
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 2 repositories of the authors' code, each at its verified commit and with its license, 24 scripts, and 2 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:b2acd81d61717995…
Add the badge to the code's README
If you are an author or a maintainer of this paper's code, you can add this badge. It says what OSCR knows of the paper (its code, its validated tracing map) and links the code to this page. Paste one of these snippets under the README's title. Keep the two marks around it, so that the badge can be replaced in place and is never added twice. OSCR changes nothing in your repository.
Markdown
<!-- oscr-badge:start -->
[](https://openscicode.org/badge/doi/10.1038/s41467-026-73669-x)
<!-- oscr-badge:end -->reStructuredText
.. oscr-badge:start
.. image:: https://openscicode.org/badge/doi/10.1038/s41467-026-73669-x.svg
:target: https://openscicode.org/badge/doi/10.1038/s41467-026-73669-x
:alt: OSCR
.. oscr-badge:endHTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.1038/s41467-026-73669-x"><img src="https://openscicode.org/badge/doi/10.1038/s41467-026-73669-x.svg" alt="OSCR"></a>
<!-- oscr-badge:end -->On GitHub, open the README, choose Edit (the pencil), paste the snippet under the title, then "Commit changes".
If you choose to, you can have the badge kept up to date for you, with oscr badge --write from the command line or with the GitHub Action in your repository's workflows. Every other form and option (a card, AsciiDoc, LaTeX, shields.io) is on the badge page.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: code errors and mismatches between the code and the paper about this paper and its code, from readers and its authors, beside the paper and its tracing map.
Report a mismatch between the code and the paper · Report a code error (signed in)
Reproductions: reports from readers who ran the authors' code and did not get the paper's result, what they ran, with which environment, commit and data.
Report a reproduction failure (signed in)
Versions of its code: the releases of its code tied to a version of this paper (the preprint, the accepted manuscript, the version of record…), each with the tracing map versioned with it.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
