Enhanced tactile coding in rat neocortex under darkness.
The 2 matches · 1 of them tie a paragraph to a whole file, not to given lines: a weak match, whose lines are not tinted
- [1] § Materials and methods › Training and evaluating the DNN ↔ models/lightningmodel.py, the whole file · a weak match · score 0.86 · BCEWithLogitsLoss, cross entropy, confusion matrix, Binary, validation, batch
- [2] § Materials and methods › A deep neural network for joint decoding of trial conditions and floor texture ↔ models/resnet.py, lines 33–100 · score 0.67 · fc_head1, fc_head2, linear, concatenating, layer
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
Python · 115 lines · 4.4 KB · MIT · 1 match
- import torch
- from torchmetrics import Accuracy, MeanMetric, MetricCollection
- from torchmetrics.classification import ConfusionMatrix
- import lightning as L
- class LightningModel(L.LightningModule):
- def __init__(self, model, cfg, class_weights):
- super().__init__()
- self.cfg = cfg
- self.model = model
- if class_weights is not None:
- self.register_buffer("class_weights", torch.from_numpy(class_weights).type(torch.FloatTensor))
- else:
- self.class_weights = None
- self.test_step_outputs = {'y_hat': [], 'y': []}
- self.metrics = MetricCollection(
- dict(
- train_acc_t = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
- train_acc_l = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
- train_loss = MeanMetric(),
- val_acc_t = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
- val_acc_l = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
- val_loss = MeanMetric()
- )
- )
- self.confusion_matrix = MetricCollection(
- dict(
- texture = ConfusionMatrix(task="binary", num_classes=self.cfg.param.num_classes),
- ld = ConfusionMatrix(task="binary", num_classes=self.cfg.param.num_classes)
- )
- )
- self.pred_acc = MetricCollection(
- dict(
- texture = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
- ld = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro")
- )
- )
- def forward(self, x):
- return self.model(x)
- def training_step(self, batch, batch_idx):
- # forward pass
- outputs = self(batch[0])
- # calculate loss
- loss = self.criterion(outputs, batch[1])
- self.metrics["train_loss"].update(loss.detach())
- # calulate accuracy
- self.metrics["train_acc_t"].update(outputs[0], batch[1][0])
- self.metrics["train_acc_l"].update(outputs[1], batch[1][1])
- return loss
- def validation_step(self, batch, batch_idx):
- # forward pass
- outputs = self(batch[0])
- # calculate loss
- loss = self.criterion(outputs, batch[1])
- self.metrics["val_loss"].update(loss.detach())
- # calulate accuracy
- self.metrics["val_acc_t"].update(outputs[0], batch[1][0])
- self.metrics["val_acc_l"].update(outputs[1], batch[1][1])
- def on_validation_epoch_end(self):
- log_tmp = dict()
- log_metrics = self.metrics.compute()
- log_metrics = {k: v.item() for k, v in log_metrics.items()}
- log_tmp.update(log_metrics)
- self.metrics.reset()
- self.log_dict(log_tmp, prog_bar=True, sync_dist=True)
- def predict_step(self, batch, batch_idx):
- # forward pass
- outputs = self(batch[0])
- # Calculate confusion matrix
- self.confusion_matrix['texture'].update(outputs[0], batch[1][0])
- self.confusion_matrix['ld'].update(outputs[1], batch[1][1])
- # Calculate accuracy
- self.pred_acc['texture'].update(outputs[0], batch[1][0])
- self.pred_acc['ld'].update(outputs[1], batch[1][1])
- self.test_step_outputs['y_hat'].append(outputs[0])
- self.test_step_outputs['y'].append(batch[1].argmax(dim=1)[0])
- return 0
- def on_predict_end(self) -> None:
- self.confusion_matrix.compute()
- self.pred_acc.compute()
- self.test_step_outputs['y_hat'] = torch.stack(self.test_step_outputs['y_hat'])
- self.test_step_outputs['y'] = torch.stack(self.test_step_outputs['y'])
- def configure_optimizers(self):
- optimizer = torch.optim.Adam(
- self.trainer.model.parameters(), lr=self.cfg.param.lr
- )
- return optimizer
- def criterion(self, pred, target):
- # Define loss function
- if self.cfg.model.criterion == "BCEWithLogitsLoss":
- criterion = torch.nn.BCEWithLogitsLoss(weight=self.class_weights)
- elif self.cfg.model.criterion == "CrossEntropyLoss":
- criterion = torch.nn.CrossEntropyLoss(weight=self.class_weights)
- elif self.cfg.model.criterion == "MSELoss":
- criterion = torch.nn.MSELoss(weight=self.class_weights)
- return criterion(pred, target)
lightningmodel.py at commit 35d0551, under MIT · at the source
Overview
- Graduate School of Pharmaceutical Sciences, The University of Tokyo Tokyo Japan
- Institute for AI and Beyond, The University of Tokyo Tokyo Japan
- Center for Information and Neural Networks, National Institute of Information and Communications Technology Suita City Japan
Abstract
Sensory systems are known for their adaptability, responding dynamically to changes in environmental conditions. A key example of this adaptability is the enhancement of tactile perception in the absence of visual input. Despite behavioral studies showing visual deprivation can improve tactile discrimination, the underlying neural mechanisms, particularly how tactile neural representations are reorganized during visual deprivation, remain unclear. In this study, we explore how the absence of visual input alters tactile neural encoding in the rat primary somatosensory cortex (S1). Rats were trained on a custom-designed treadmill with distinct tactile textures (rough and smooth), and local field potentials (LFPs) were recorded from S1 under light and dark conditions. Machine learning techniques, specifically a convolutional neural network, were used to decode the high-dimensional LFP signals. We found that the neural representations of tactile stimuli became more distinct in the dark, indicating a reorganization of sensory processing in S1 when visual input was removed. Notably, conventional amplitude-based analyses failed to capture these changes, highlighting the power of deep learning in uncovering subtle neural patterns. These findings offer new insights into how the brain rapidly adapts tactile processing in response to the loss of visual input, with implications for multisensory integration.
Reproduced under the paper's license (CC BY), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.
UT-yakusaku/Yamashiro-eLife-2024
35d0551cf4740cc20ddf8e66058a2126c5f564dc, 18 September 2026Availability: 1 check, the latest on 26 September 2026: the link answers
- 26 September 2026: the link answers
9 files
- main.py — Python, 55 lines
- models/
__init__.py — Python, 2 lines - models/
lightningmodel.py — Python, 115 lines, 1 match - models/
resnet.py — Python, 100 lines, 1 match - trainer.py — Python, 342 lines
- utils/
__init__.py — Python, 1 line - utils/
dataloader.py — Python, 87 lines - LICENSE — License, 21 lines
- README.md — Text, 42 lines
The paper's code and data availability statement is in the Data section.
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:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 7 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
No dataset and no data link were found in the paper.
Data availability
Custom code generated during this study for data analysis are available at (https://
Reproduced under the paper's license (CC BY), from the paper cited above.
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, 27 September 2026: the first record
Recorded: type, language, journal, volume, pages, dates, 4 authors, 4 keywords, 10 MeSH terms, 7 funders, 58 references.
Cite
This paper
Yamashiro, K., Tanaka, S., Matsumoto, N., & Ikegaya, Y. (2026). Enhanced tactile coding in rat neocortex under darkness. eLife, 14, RP106554. https://
BibTeX
@article{yamashiro2026en
author = {Yamashiro, Kotaro and Tanaka, Shiyori and Matsumoto, Nobuyoshi and Ikegaya, Yuji},
title = {{Enhanced tactile coding in rat neocortex under darkness}},
journal = {eLife},
year = {2026},
month = sep,
volume = {14},
pages = {RP106554},
publisher = {eLife Sciences Publications, Ltd},
issn = {2050-084X},
doi = {10.7554/
url = {https://
pmid = {42765594},
pmcid = {PMC13592814}
}
RIS
TY - JOUR
AU - Yamashiro, Kotaro
AU - Tanaka, Shiyori
AU - Matsumoto, Nobuyoshi
AU - Ikegaya, Yuji
TI - Enhanced tactile coding in rat neocortex under darkness
T2 - eLife
J2 - eLife
PY - 2026
DA - 2026/
VL - 14
SP - RP106554
SN - 2050-084X
PB - eLife Sciences Publications, Ltd
DO - 10.7554/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.7554/
"type": "article-journal",
"title": "Enhanced tactile coding in rat neocortex under darkness",
"container-title": "eLife",
"author": [
{
"family": "Yamashiro",
"given": "Kotaro"
},
{
"family": "Tanaka",
"given": "Shiyori"
},
{
"family": "Matsumoto",
"given": "Nobuyoshi"
},
{
"family": "Ikegaya",
"given": "Yuji"
}
],
"container-title-short":
"volume": "14",
"page": "RP106554",
"DOI": "10.7554/
"PMID": "42765594",
"PMCID": "PMC13592814",
"ISSN": "2050-084X",
"publisher": "eLife Sciences Publications, Ltd",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
9,
21
]
]
}
}
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.7554/elife.109717 [code]
- Retrosplenial cortex enables context-dependent goal-directed sensorimotor transformation.Journal: eLifeIn common: h5py, scikit-learn, pandas, 1 other tool, systems, 4 references
- [2] doi:10.7554/elife.105953 [code]
- Top-down feedback in deep neural networks leads to functional differences during audiovisual integration.Journal: eLifeIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools, 1 reference
- [3] doi:10.1038/s41467-026-76939-w [code]
- HIPPIE: a generative model for electrophysiological analysis across species, technologies, and modalities.Journal: Nature communicationsIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools, rat
- [4] doi:10.1126/sciadv.adz6495
- Pupil-linked arousal heterogeneously modulates cell-type-specific sensory processing.Journal: Science advancesIn common: systems, 5 references
- [5] doi:10.1002/advs.202519479 [code]
- Diminished Signal-to-Noise Ratio Disrupts Somatosensory Population Encoding and Drives Tactile Hyposensitivity in the Fmr1&
lt;sup& gt;-/ y& lt;/ sup& gt; Autism Model. Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)In common: h5py, scikit-learn, pandas, 1 other tool, 2 references - [6] doi:10.1523/eneuro.0362-25.2026 [code]
- Similarities between &
lt;i& gt;Ciona& lt;/ i& gt; Dorsal Motor Ganglion and Vertebrate Cerebellum: Did a Chordate Ancestor Already Show D/ V Subdivision within a Hindbrain Precursor? Journal: eNeuroIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools - [7] doi:10.1038/s41746-026-02946-2 [code]
- Fully-automated sleep staging for Parkinson's disease and isolated REM sleep behavior disorder.Journal: NPJ digital medicineIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools
- [8] doi:10.1007/s12021-026-09803-3 [code]
- NeuroFusion: A Unified Framework for Generalized Visual Stimulus Decoding from fMRI Across Datasets and Subjects.Journal: NeuroinformaticsIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools
- [9] doi:10.1038/s41467-026-75455-1 [code]
- Shared latent representations of speech production for cross-patient speech decoding.Journal: Nature communicationsIn common: PyTorch Lightning, h5py, PyTorch, 3 other tools
- [10] doi:10.1162/imag.a.1299 [code]
- A modular semantic-structural pipeline for visual decoding from primate spiking data via selective temporal integration.Journal: Imaging neuroscience (Cambridge, Mass.)In common: PyTorch Lightning, h5py, PyTorch, 3 other tools
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: 1 repository of the authors' code, each at its verified commit and with its license, 7 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:699d0e0cd138ea8d…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
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: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
