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.

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 of them tie a paragraph to a whole file without 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 · block oscr:b:94C7ATWAVMT6K-J · Report a mismatch
  2. [2] § Materials and methods › A deep neural network for joint decoding of trial conditions and floor texture ↔ models/resnet.py, lines 33 to 100 · score 0.67 · fc_head1, fc_head2, linear, concatenating, layer · block oscr:b:7MXZYACZ0KCQK-G · 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 · 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 (how the code is found and 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.1371/journal.pone.0309709 [code]
Diffusion model-based image generation from rat brain activity.
Journal: PloS one
In common: PyTorch, NumPy, rat, 3 authors
[2] doi:10.7554/elife.97270 [code]
Distributed subthreshold representation of sharp wave-ripples by hilar mossy cells.
Journal: eLife
In common: NumPy, 2 authors
[3] doi:10.1371/journal.pcbi.1011792 [code]
High-performing neural network models of visual cortex benefit from high latent dimensionality.
Journal: PLoS computational biology
In common: PyTorch Lightning, h5py, PyTorch, 3 other tools, systems, 2 references
[4] doi:10.1002/advs.202406224 [code]
Sensory Encoding Alternates With Hippocampal Ripples across Cycles of Forebrain Spiking Cascades.
Journal: Advanced science (Weinheim, Baden-Wurttemberg, Germany)
In common: PyTorch Lightning, scikit-learn, pandas, 1 other tool, systems, 4 references
[5] 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
[6] doi:10.1038/s41586-025-08631-w [code]
Brain-wide presynaptic networks of functionally distinct cortical neurons.
Journal: Nature
In common: scikit-learn, pandas, NumPy, systems, 5 references
[7] doi:10.1038/s41467-026-69068-x [code]
Sensory encoding and memory retrieval are coordinated with propagating waves in the human brain.
Journal: Nature communications
In common: PyTorch Lightning, h5py, PyTorch, 3 other tools, 2 references
[8] doi:10.1038/s41467-025-56733-w [code]
Deciphering neuronal variability across states reveals dynamic sensory encoding.
Journal: Nature communications
In common: h5py, scikit-learn, pandas, 1 other tool, systems, 4 references
[9] doi:10.7554/elife.71890 [code]
Coupling of pupil- and neuronal population dynamics reveals diverse influences of arousal on cortical processing.
Journal: eLife
In common: systems, 6 references
[10] doi:10.7554/elife.91685 [code]
Factorized visual representations in the primate visual system and deep neural networks.
Journal: eLife
In common: PyTorch Lightning, h5py, PyTorch, 3 other tools, systems, 1 reference

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.

Add the badge to the code's README

OSCR: the badge of this paper

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 -->
[![OSCR](https://openscicode.org/badge/doi/10.7554/elife.106554.svg)](https://openscicode.org/badge/doi/10.7554/elife.106554)
<!-- oscr-badge:end -->
reStructuredText
.. oscr-badge:start

.. image:: https://openscicode.org/badge/doi/10.7554/elife.106554.svg
   :target: https://openscicode.org/badge/doi/10.7554/elife.106554
   :alt: OSCR

.. oscr-badge:end
HTML
<!-- oscr-badge:start -->
<a href="https://openscicode.org/badge/doi/10.7554/elife.106554"><img src="https://openscicode.org/badge/doi/10.7554/elife.106554.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.