OSCR

Enhanced tactile coding in rat neocortex under darkness.

Code ↔ Paper

2 matches between paragraphs of the paper and lines of its authors' code, computed by the harvester (lexical-v1). Click a colored paragraph or line to see its counterpart.

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

  1. import torch
  2. from torchmetrics import Accuracy, MeanMetric, MetricCollection
  3. from torchmetrics.classification import ConfusionMatrix
  4. import lightning as L
  5. class LightningModel(L.LightningModule):
  6. def __init__(self, model, cfg, class_weights):
  7. super().__init__()
  8. self.cfg = cfg
  9. self.model = model
  10. if class_weights is not None:
  11. self.register_buffer("class_weights", torch.from_numpy(class_weights).type(torch.FloatTensor))
  12. else:
  13. self.class_weights = None
  14. self.test_step_outputs = {'y_hat': [], 'y': []}
  15. self.metrics = MetricCollection(
  16. dict(
  17. train_acc_t = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
  18. train_acc_l = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
  19. train_loss = MeanMetric(),
  20. val_acc_t = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
  21. val_acc_l = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
  22. val_loss = MeanMetric()
  23. )
  24. )
  25. self.confusion_matrix = MetricCollection(
  26. dict(
  27. texture = ConfusionMatrix(task="binary", num_classes=self.cfg.param.num_classes),
  28. ld = ConfusionMatrix(task="binary", num_classes=self.cfg.param.num_classes)
  29. )
  30. )
  31. self.pred_acc = MetricCollection(
  32. dict(
  33. texture = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro"),
  34. ld = Accuracy(task="binary", num_classes=self.cfg.param.num_classes, average="macro")
  35. )
  36. )
  37. def forward(self, x):
  38. return self.model(x)
  39. def training_step(self, batch, batch_idx):
  40. # forward pass
  41. outputs = self(batch[0])
  42. # calculate loss
  43. loss = self.criterion(outputs, batch[1])
  44. self.metrics["train_loss"].update(loss.detach())
  45. # calulate accuracy
  46. self.metrics["train_acc_t"].update(outputs[0], batch[1][0])
  47. self.metrics["train_acc_l"].update(outputs[1], batch[1][1])
  48. return loss
  49. def validation_step(self, batch, batch_idx):
  50. # forward pass
  51. outputs = self(batch[0])
  52. # calculate loss
  53. loss = self.criterion(outputs, batch[1])
  54. self.metrics["val_loss"].update(loss.detach())
  55. # calulate accuracy
  56. self.metrics["val_acc_t"].update(outputs[0], batch[1][0])
  57. self.metrics["val_acc_l"].update(outputs[1], batch[1][1])
  58. def on_validation_epoch_end(self):
  59. log_tmp = dict()
  60. log_metrics = self.metrics.compute()
  61. log_metrics = {k: v.item() for k, v in log_metrics.items()}
  62. log_tmp.update(log_metrics)
  63. self.metrics.reset()
  64. self.log_dict(log_tmp, prog_bar=True, sync_dist=True)
  65. def predict_step(self, batch, batch_idx):
  66. # forward pass
  67. outputs = self(batch[0])
  68. # Calculate confusion matrix
  69. self.confusion_matrix['texture'].update(outputs[0], batch[1][0])
  70. self.confusion_matrix['ld'].update(outputs[1], batch[1][1])
  71. # Calculate accuracy
  72. self.pred_acc['texture'].update(outputs[0], batch[1][0])
  73. self.pred_acc['ld'].update(outputs[1], batch[1][1])
  74. self.test_step_outputs['y_hat'].append(outputs[0])
  75. self.test_step_outputs['y'].append(batch[1].argmax(dim=1)[0])
  76. return 0
  77. def on_predict_end(self) -> None:
  78. self.confusion_matrix.compute()
  79. self.pred_acc.compute()
  80. self.test_step_outputs['y_hat'] = torch.stack(self.test_step_outputs['y_hat'])
  81. self.test_step_outputs['y'] = torch.stack(self.test_step_outputs['y'])
  82. def configure_optimizers(self):
  83. optimizer = torch.optim.Adam(
  84. self.trainer.model.parameters(), lr=self.cfg.param.lr
  85. )
  86. return optimizer
  87. def criterion(self, pred, target):
  88. # Define loss function
  89. if self.cfg.model.criterion == "BCEWithLogitsLoss":
  90. criterion = torch.nn.BCEWithLogitsLoss(weight=self.class_weights)
  91. elif self.cfg.model.criterion == "CrossEntropyLoss":
  92. criterion = torch.nn.CrossEntropyLoss(weight=self.class_weights)
  93. elif self.cfg.model.criterion == "MSELoss":
  94. criterion = torch.nn.MSELoss(weight=self.class_weights)
  95. return criterion(pred, target)

lightningmodel.py at commit 35d0551, under MIT · at the source

Overview

Authors: Kotaro Yamashiro1, Shiyori Tanaka1, Nobuyoshi Matsumoto1,2, Yuji Ikegaya1,2,3
  1. Graduate School of Pharmaceutical Sciences, The University of Tokyo Tokyo Japan
  2. Institute for AI and Beyond, The University of Tokyo Tokyo Japan
  3. Center for Information and Neural Networks, National Institute of Information and Communications Technology Suita City Japan
Journal: eLife, volume 14, article RP106554
Dates: published online 21 September 2026
Type: Research article · Language: English
License: CC BY
Identifiers: DOI 10.7554/elife.106554 · PMID 42765594 · PMCID PMC13592814 · OpenAlex W4412991288
Open access: gold, a free copy (OpenAlex)
Status: code verified
Categories: extracellular electrophysiology (units, LFP) (modality), rat (organism), systems (subfield)
Methods: Connectivity, Statistics, Machine learning, Preprocessing
Keywords: somatosensory cortex, rat, tactile encoding, visual deprivation
MeSH: Darkness*, Neocortex*, Somatosensory Cortex*, Touch*, Touch Perception*, Animals, Local Field Potential Measurement, Male, Rats, Rats, Long-Evans (* major topic)
Journal subjects: Neuroscience
Topic: Neural dynamics and brain function (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: not cited yet (Europe PMC); 61 references in the paper

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

License: MIT
State: the link answers, verified on 26 September 2026
Evidence: files inventoried
Commit: 35d0551cf4740cc20ddf8e66058a2126c5f564dc, 18 September 2026
Languages: Python (7)
Size: 12 files, 7 scripts
Software Heritage: not archived
Found in: “Data availability”
Holds: README, license file, environment (requirements.txt)
Not found: CITATION.cff, tests, continuous integration, documentation
Tools: PyTorch (4 files), PyTorch Lightning (2 files), NumPy (2 files), h5py (1 file), pandas (1 file), scikit-learn (1 file)
Availability: 1 check, the latest on 26 September 2026: the link answers
  • 26 September 2026: the link answers
9 files

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://github.com/UT-yakusaku/Yamashiro-eLife-2024 copy archived at Yamashiro, 2026).

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://doi.org/10.7554/elife.106554

BibTeX

@article{yamashiro2026enhanced,
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/elife.106554},
url = {https://doi.org/10.7554/elife.106554},
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/09/21
VL - 14
SP - RP106554
SN - 2050-084X
PB - eLife Sciences Publications, Ltd
DO - 10.7554/elife.106554
UR - https://doi.org/10.7554/elife.106554
LA - en
ER -

CSL-JSON

{
"id": "10.7554/elife.106554",
"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": "eLife",
"volume": "14",
"page": "RP106554",
"DOI": "10.7554/elife.106554",
"PMID": "42765594",
"PMCID": "PMC13592814",
"ISSN": "2050-084X",
"publisher": "eLife Sciences Publications, Ltd",
"URL": "https://doi.org/10.7554/elife.106554",
"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: eLife
In 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: eLife
In 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 communications
In 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 advances
In 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<sup>-/y</sup> 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 <i>Ciona</i> Dorsal Motor Ganglion and Vertebrate Cerebellum: Did a Chordate Ancestor Already Show D/V Subdivision within a Hindbrain Precursor?
Journal: eNeuro
In 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 medicine
In 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: Neuroinformatics
In 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 communications
In 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.

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.