OSCR

Narrative "twist" shifts within-individual neural representations of dissociable story features.

A correction to this paper has been published: the notice, 42150088, from Europe PMC.

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. [1] § Results › Representations of the Narrative Model. ↔ code/Fig2._narrativemodel/1.4._compute_samples_matched_length_set_up_df.ipynb, lines 30–88 · score 0.52 · intra SC, matched length, post twist, pretwist, timepoint, median
  2. [2] § Results › Representations of the Narrative Model. › Greater neural shifts in the pre-twist segment. ↔ code/Fig2._narrativemodel/1.1._prepost_lmer_set_up_LMER_pre_post_twist.ipynb, lines 10–47 · score 0.51 · intra SC, post twist, pre twist, timepoint, hippocampus, correlation

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

Jupyter notebook · 96 lines · 2.8 KB · no license · 1 match

  1. # %% [markdown]
  2. # ### The goal of this code is to generate the matched length iterations of the pre and post-twist segments
  3. # %%
  4. import pandas as pd
  5. import numpy as np
  6. import os
  7. # %%
  8. timepoints_cut_off = 20
  9. timepoints_cut_off_end = 10
  10. stim_end = 1107 #because it is 1105 seconds + 2 seconds!
  11. pre_twist = 552
  12. post_twist = 752
  13. node = 1
  14. sub = 0
  15. sub_corr_reint = np.load(f'../../../darkend/data/_multivariate_intraSC/intraSC_pattern_all_node{node}_pearsonr.npy',allow_pickle=True).item()
  16. pre_length = len(sub_corr_reint[sub][timepoints_cut_off:pre_twist])
  17. post_length = len(sub_corr_reint[sub][post_twist:])
  18. # %%
  19. nodes = list(range(1,101)) + ['hippocampus_L','hippocampus_R']
  20. node = nodes[0]
  21. # %%
  22. sub_list = []
  23. r_val = [] #actually adding in the Fisher z-transformed valued
  24. node_list = []
  25. iteration_list = []
  26. label = []
  27. node = nodes[0]
  28. sub_corr_reint = np.load(f'../../../darkend/data/_multivariate_intraSC/intraSC_pattern_all_node{node}_pearsonr.npy', allow_pickle=True).item()
  29. sample_pretwist = sub_corr_reint[0][timepoints_cut_off:pre_twist]
  30. sample_posttwist = sub_corr_reint[0][post_twist:stim_end]
  31. pre_length = len(sample_pretwist)
  32. post_length = len(sample_posttwist)
  33. # Calculate the number of possible iterations
  34. num_iterations = pre_length - post_length + 1
  35. print(f"Number of possible iterations: {num_iterations}")
  36. # Iterate through nodes
  37. for node in nodes:
  38. sub_corr_reint = np.load(f'../../../darkend/data/_multivariate_intraSC/intraSC_pattern_all_node{node}_pearsonr.npy', allow_pickle=True).item()
  39. for sub in range(len(sub_corr_reint.keys())):
  40. pretwist_this_sub = sub_corr_reint[sub][timepoints_cut_off:pre_twist]
  41. posttwist_this_sub = sub_corr_reint[sub][post_twist:stim_end]
  42. for i in range(num_iterations):
  43. pre_segment = pretwist_this_sub[i:i + post_length]
  44. post_segment = posttwist_this_sub
  45. pre_segment = [np.arctanh(r) for r in pre_segment]
  46. post_segment = [np.arctanh(r) for r in post_segment]
  47. # Append results for pre-twist
  48. sub_list.append(sub)
  49. r_val.append(np.median(pre_segment))
  50. node_list.append(node)
  51. iteration_list.append(i + 1) # Iteration number
  52. label.append('pre')
  53. # Append results for post-twist (same iteration)
  54. sub_list.append(sub)
  55. r_val.append(np.median(post_segment))
  56. node_list.append(node)
  57. iteration_list.append(i + 1) # Iteration number
  58. label.append('post')
  59. # Create DataFrame
  60. results_df = pd.DataFrame({
  61. 'Node': node_list,
  62. 'Subject': sub_list,
  63. 'Iteration': iteration_list,
  64. 'Median_R_Value': r_val,
  65. 'Label': label
  66. })
  67. results_df
  68. # %%
  69. results_df.to_csv('1.6._pretwist_posttwist_matched_length_median_segments_subcortical_new.csv', index=False)
  70. # %%

1.4._compute_samples_matched_length_set_up_df.ipynb at commit 7c37a04, no license · at the source

Overview

Authors: Clara Sava-Segal1, Clare Grall1, Emily S. Finn1
  1. Department of Psychological and Brain Sciences, Dartmouth College, Hanover, NH 03755
Institutions: Dartmouth College (United States)
Dates: received 17 May 2025; accepted 30 January 2026; published online 13 March 2026; in print 17 March 2026
Type: Research article · Language: English
License: CC BY-NC-ND
Identifiers: DOI 10.1073/pnas.2512071123 · PMID 41824498 · PMCID PMC12994196 · OpenAlex W7135181464
Open access: hybrid, a free copy (OpenAlex)
Status: code verified
Categories: fMRI (modality), human (organism), cognitive (subfield)
Methods: Machine learning, Statistics, fMRI & imaging
Keywords: naturalistic neuroimaging, functional MRI, cognitive neuroscience, narratives
MeSH: Auditory Perception*, Brain*, Comprehension*, Narration*, Acoustic Stimulation, Adult, Brain Mapping, Female, Humans, Magnetic Resonance Imaging, Male, Young Adult (* major topic)
Journal subjects: Biological Sciences, Psychological and Cognitive Sciences, Social Sciences
Topic: Memory and Neural Mechanisms (Cognitive Neuroscience, Neuroscience), according to OpenAlex
Citations: cited by 3 papers (Europe PMC); 67 references in the paper
Notices: A correction to this paper has been published (42150088, from Europe PMC)

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.

Repository

Its files are read in the Code ↔ Paper reader above, with 2 matches between paragraphs and lines of code.

thefinnlab/darkend_narrative_rep

License: none: the authors keep all their rights
State: the link answers, verified on 30 September 2026
Evidence: files inventoried
Commit: 7c37a048bc3e80abdca0a85ae1e26db31b2ed45e, 16 May 2026
Languages: Jupyter (19), R (3), Python (2)
Size: 239 files, 24 scripts
Software Heritage: not archived
Found in: “Data, Materials, and Software Availability”
Holds: README, 9 notebooks
Not found: license file, CITATION.cff, environment file, tests, continuous integration, documentation
Tools: NumPy (21 files), pandas (19 files), Matplotlib (15 files), BrainSpace (12 files), NiBabel (12 files), Nilearn (12 files), neuromaps (11 files), statsmodels (11 files), seaborn (6 files), SciPy (5 files), lme4 (3 files), lmerTest (3 files), tidyverse (2 files)
Availability: 1 check, the latest on 30 September 2026: the link answers
  • 30 September 2026: the link answers
25 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;
  • 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

Code and data availability statement

The paper has a code and data availability statement. Its license (CC BY-NC-ND) does not allow reproducing it here; in short, from what the harvester recognized in it:

Read it in the paper: doi.org/10.1073/pnas.2512071123.

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, 30 September 2026: the first record

Recorded: type, language, journal, volume, issue, pages, dates, 3 authors, 4 keywords, 12 MeSH terms, 2 funders, 59 references, 1 integrity notice.

Cite

This paper

Sava-Segal, C., Grall, C., & Finn, E. S. (2026). Narrative "twist" shifts within-individual neural representations of dissociable story features. Proceedings of the National Academy of Sciences of the United States of America, 123(11), e2512071123. https://doi.org/10.1073/pnas.2512071123

BibTeX

@article{savasegal2026narrative,
author = {Sava-Segal, Clara and Grall, Clare and Finn, Emily S.},
title = {{Narrative "twist" shifts within-individual neural representations of dissociable story features}},
journal = {Proceedings of the National Academy of Sciences of the United States of America},
year = {2026},
month = mar,
volume = {123},
number = {11},
pages = {e2512071123},
publisher = {National Academy of Sciences},
issn = {0027-8424},
doi = {10.1073/pnas.2512071123},
url = {https://doi.org/10.1073/pnas.2512071123},
pmid = {41824498},
pmcid = {PMC12994196}
}

RIS

TY - JOUR
AU - Sava-Segal, Clara
AU - Grall, Clare
AU - Finn, Emily S.
TI - Narrative "twist" shifts within-individual neural representations of dissociable story features
T2 - Proceedings of the National Academy of Sciences of the United States of America
J2 - Proc Natl Acad Sci U S A
PY - 2026
DA - 2026/03/13
VL - 123
IS - 11
SP - e2512071123
SN - 0027-8424
PB - National Academy of Sciences
DO - 10.1073/pnas.2512071123
UR - https://doi.org/10.1073/pnas.2512071123
LA - en
ER -

CSL-JSON

{
"id": "10.1073/pnas.2512071123",
"type": "article-journal",
"title": "Narrative \"twist\" shifts within-individual neural representations of dissociable story features",
"container-title": "Proceedings of the National Academy of Sciences of the United States of America",
"author": [
{
"family": "Sava-Segal",
"given": "Clara"
},
{
"family": "Grall",
"given": "Clare"
},
{
"family": "Finn",
"given": "Emily S."
}
],
"container-title-short": "Proc Natl Acad Sci U S A",
"volume": "123",
"issue": "11",
"page": "e2512071123",
"DOI": "10.1073/pnas.2512071123",
"PMID": "41824498",
"PMCID": "PMC12994196",
"ISSN": "0027-8424",
"publisher": "National Academy of Sciences",
"URL": "https://doi.org/10.1073/pnas.2512071123",
"language": "en",
"issued": {
"date-parts": [
[
2026,
3,
13
]
]
}
}

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-71428-6 [code]
Binding items to contexts through conjunctive neural representations with the method of loci.
Journal: Nature communications
In common: lmerTest, Nilearn, lme4, 8 other tools, 7 references
[2] doi:10.1038/s41467-026-73914-3 [code]
Cortical reinstatement of causally related events sparks narrative insights by updating neural representation patterns.
Journal: Nature communications
In common: lmerTest, Nilearn, lme4, 6 other tools, cognitive, 7 references
[3] doi:10.1038/s44271-026-00481-0 [code]
Natural language processing captures memory content associated with shared neural patterns at encoding and retrieval.
Journal: Communications psychology
In common: lmerTest, lme4, tidyverse, cognitive, 9 references
[4] doi:10.1038/s41467-026-73895-3 [code]
Sign language narrative reveals universal and modality-specific features of cortical timescale hierarchy.
Journal: Nature communications
In common: Nilearn, NiBabel, statsmodels, 5 other tools, fMRI, cognitive, 7 references
[5] doi:10.1038/s41467-026-71151-2 [code]
Common and distinct neural correlates of social interaction processing and theory of mind in narratives.
Journal: Nature communications
In common: Nilearn, NiBabel, statsmodels, 5 other tools, cognitive, 5 references
[6] doi:10.1371/journal.pbio.3003684 [code]
The retrieval of previously learned motor memories is facilitated by the reinstatement of default mode network manifold structures.
Journal: PLoS biology
In common: neuromaps, BrainSpace, Nilearn, 6 other tools, fMRI, cognitive, 3 references
[7] doi:10.1038/s41467-026-76452-0 [code]
Music evokes shared neural representations of imagined narratives across sensory modalities.
Journal: Nature communications
In common: Nilearn, NiBabel, statsmodels, 5 other tools, cognitive, 5 references
[8] doi:10.1038/s42003-026-09794-6 [code]
The role of dorsal anterior cingulate cortex in dynamic attitude changes in naturalistic settings.
Journal: Communications biology
In common: Nilearn, NiBabel, statsmodels, 5 other tools, 5 references
[9] doi:10.1162/imag.a.1278 [code]
Young and old adult brains experience opposite effects of acute sleep restriction on the functional connectivity network.
Journal: Imaging neuroscience (Cambridge, Mass.)
In common: neuromaps, Nilearn, lme4, 8 other tools, fMRI, 1 reference
[10] doi:10.1002/agm2.70073 [code]
Foreign Language Learning in Older Adults Modifies Resting-State Functional Connectivity Between the Subcortical Structures and the Cortex.
Journal: Aging medicine (Milton (N.S.W))
In common: neuromaps, BrainSpace, Nilearn, 7 other tools, fMRI, 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.

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.