{"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/population-transformer-learning-population","title":"Population Transformer: Learning Population-level Representations of Neural Activity","arxiv_id":"2406.03044","date":"2024-06-05","proceeding":null,"authors":["Geeling Chau","Christopher Wang","Sabera Talukder","Vighnesh Subramaniam","Saraswati Soedarmadji","Yisong Yue","Boris Katz","Andrei Barbu"],"abstract":"We present a self-supervised framework that learns population-level codes for arbitrary ensembles of neural recordings at scale. We address key challenges in scaling models with neural time-series data, namely, sparse and variable electrode distribution across subjects and datasets. The Population Transformer (PopT) stacks on top of pretrained temporal embeddings and enhances downstream decoding by enabling learned aggregation of multiple spatially-sparse data channels. The pretrained PopT lowers the amount of data required for downstream decoding experiments, while increasing accuracy, even on held-out subjects and tasks. Compared to end-to-end methods, this approach is computationally lightweight, while achieving similar or better decoding performance. We further show how our framework is generalizable to multiple time-series embeddings and neural data modalities. Beyond decoding, we interpret the pretrained and fine-tuned PopT models to show how they can be used to extract neuroscience insights from large amounts of data. We release our code as well as a pretrained PopT to enable off-the-shelf improvements in multi-channel intracranial data decoding and interpretability. Code is available at https://github.com/czlwang/PopulationTransformer.","url_abs":"https://arxiv.org/abs/2406.03044v4","url_pdf":"https://arxiv.org/pdf/2406.03044v4.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":"population-transformer-learning-population","repo_url":"https://github.com/czlwang/populationtransformer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"representation-learning","task_name":"Representation Learning"},{"task_slug":"time-series-1","task_name":"Time Series"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2406.03044","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2406.03044"}},"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/czlwang/PopulationTransformer","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/czlwang/populationtransformer","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":4,"unverified":5},"by_repo_kind":{"official":{"samples":9,"ran":4,"repositories":1}},"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":9,"samples":[{"code_sha256_prefix":"ddf22734898a54ba","entry":"MultiSubjBrainPositionalEncoding","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ddf22734898a54ba"}},{"code_sha256_prefix":"e22f308f405efff8","entry":"SpecPredictionHead","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e22f308f405efff8"}},{"code_sha256_prefix":"8d79f41eb2fc6653","entry":"TransformerEncoder","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8d79f41eb2fc6653"}},{"code_sha256_prefix":"0245cc2a22d47844","entry":"TransformerEncoderLayer","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0245cc2a22d47844"}},{"code_sha256_prefix":"b5bcd025cac10763","entry":"PtModelCustom","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b5bcd025cac10763"}},{"code_sha256_prefix":"7ceb3d3df1032fbc","entry":"TransformerEncoderInput","repo":"czlwang/populationtransformer","repo_kind":"official","path":"models/pt_model_custom.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/models/pt_model_custom.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"7ceb3d3df1032fbc"}},{"code_sha256_prefix":"ba48370577a1257e","entry":"get_pretraining_data_and_labels","repo":"czlwang/populationtransformer","repo_kind":"official","path":"data/write_nsp_pretraining_data.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/data/write_nsp_pretraining_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ba48370577a1257e"}},{"code_sha256_prefix":"1db5ee3f9d325875","entry":"get_raw_data_and_labels","repo":"czlwang/populationtransformer","repo_kind":"official","path":"data/write_nsp_pretraining_data.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/data/write_nsp_pretraining_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1db5ee3f9d325875"}},{"code_sha256_prefix":"a23ef600fba89a6b","entry":"write_outputs","repo":"czlwang/populationtransformer","repo_kind":"official","path":"data/write_nsp_pretraining_data.py","file_url":"https://github.com/czlwang/populationtransformer/blob/HEAD/data/write_nsp_pretraining_data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"a23ef600fba89a6b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}