{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/training-language-models-for-deeper","title":"Training language models to summarize narratives improves brain alignment","arxiv_id":"2212.10898","date":"2022-12-21","proceeding":null,"authors":["Khai Loong Aw","Mariya Toneva"],"abstract":"Building systems that achieve a deeper understanding of language is one of the central goals of natural language processing (NLP). Towards this goal, recent works have begun to train language models on narrative datasets which require extracting the most critical information by integrating across long contexts. However, it is still an open question whether these models are learning a deeper understanding of the text, or if the models are simply learning a heuristic to complete the task. This work investigates this further by turning to the one language processing system that truly understands complex language: the human brain. We show that training language models for deeper narrative understanding results in richer representations that have improved alignment to human brain activity. We further find that the improvements in brain alignment are larger for character names than for other discourse features, which indicates that these models are learning important narrative elements. Taken together, these results suggest that this type of training can indeed lead to deeper language understanding. These findings have consequences both for cognitive neuroscience by revealing some of the significant factors behind brain-NLP alignment, and for NLP by highlighting that understanding of long-range context can be improved beyond language modeling.","url_abs":"https://arxiv.org/abs/2212.10898v2","url_pdf":"https://arxiv.org/pdf/2212.10898v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"training-language-models-for-deeper","repo_url":"https://github.com/awwkl/brain_language_narratives","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"training-language-models-for-deeper","repo_url":"https://github.com/awwkl/brain_language_summarization","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"open-question","task_name":"Open-Ended Question Answering"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2212.10898","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2212.10898"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"deterministic:regex_extraction","url":"https://github.com/awwkl/brain","reach":{"status":"gone","observed_at":"2026-09-17","how":"tree_404+repo_404"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/awwkl/brain_language_summarization","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/awwkl/brain_language_narratives","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":1,"repositories":2}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"57aff233884a8087","entry":"extract_brain_score","repo":"awwkl/brain_language_summarization","repo_kind":"official","path":"all_scripts/figures_paper/plot_fig_1a_brain_score.py","file_url":"https://github.com/awwkl/brain_language_summarization/blob/HEAD/all_scripts/figures_paper/plot_fig_1a_brain_score.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"57aff233884a8087"}},{"code_sha256_prefix":"596ce83d4d70c143","entry":"extract_brain_scores_per_roi","repo":"awwkl/brain_language_narratives","repo_kind":"official","path":"all_scripts/figures_paper/plot_fig_2b_RoI_brain_score.py","file_url":"https://github.com/awwkl/brain_language_narratives/blob/HEAD/all_scripts/figures_paper/plot_fig_2b_RoI_brain_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"596ce83d4d70c143"}},{"code_sha256_prefix":"f486206c6dfc37de","entry":"extract_rouge_results","repo":"awwkl/brain_language_narratives","repo_kind":"official","path":"all_scripts/plot_rouge_score.py","file_url":"https://github.com/awwkl/brain_language_narratives/blob/HEAD/all_scripts/plot_rouge_score.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f486206c6dfc37de"}},{"code_sha256_prefix":"962b05407e9aebd5","entry":"save_layer_representations","repo":"awwkl/brain_language_narratives","repo_kind":"official","path":"extract_nlp_features.py","file_url":"https://github.com/awwkl/brain_language_narratives/blob/HEAD/extract_nlp_features.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"962b05407e9aebd5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}