{"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/memory-based-meta-learning-on-non-stationary","title":"Memory-Based Meta-Learning on Non-Stationary Distributions","arxiv_id":"2302.03067","date":"2023-02-06","proceeding":null,"authors":["Tim Genewein","Grégoire Delétang","Anian Ruoss","Li Kevin Wenliang","Elliot Catt","Vincent Dutordoir","Jordi Grau-Moya","Laurent Orseau","Marcus Hutter","Joel Veness"],"abstract":"Memory-based meta-learning is a technique for approximating Bayes-optimal predictors. Under fairly general conditions, minimizing sequential prediction error, measured by the log loss, leads to implicit meta-learning. The goal of this work is to investigate how far this interpretation can be realized by current sequence prediction models and training regimes. The focus is on piecewise stationary sources with unobserved switching-points, which arguably capture an important characteristic of natural language and action-observation sequences in partially observable environments. We show that various types of memory-based neural models, including Transformers, LSTMs, and RNNs can learn to accurately approximate known Bayes-optimal algorithms and behave as if performing Bayesian inference over the latent switching-points and the latent parameters governing the data distribution within each segment.","url_abs":"https://arxiv.org/abs/2302.03067v2","url_pdf":"https://arxiv.org/pdf/2302.03067v2.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":"memory-based-meta-learning-on-non-stationary","repo_url":"https://github.com/deepmind/nonstationary_mbml","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"bayesian-inference","task_name":"Bayesian Inference"},{"task_slug":"meta-learning","task_name":"Meta-Learning"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.03067","atlas_url":"https://app.syntology.ai/?focus=2302.03067","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.03067"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/deepmind/nonstationary_mbml","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":7,"unverified":3},"by_repo_kind":{"official":{"samples":10,"ran":7,"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":0,"samples":[{"code_sha256_prefix":"9ef6aa69c3f44f19","entry":"broadcast_params_with_ones","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"experiments/distributions.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/experiments/distributions.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9ef6aa69c3f44f19"}},{"code_sha256_prefix":"1cb4ff823f79cdaf","entry":"compute_sliding_window_mask","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/transformer.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/transformer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1cb4ff823f79cdaf"}},{"code_sha256_prefix":"68e27970b95ab0f2","entry":"make_cnn","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/basic.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/basic.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"68e27970b95ab0f2"}},{"code_sha256_prefix":"ee3072eb25987bed","entry":"make_mlp","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/basic.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/basic.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ee3072eb25987bed"}},{"code_sha256_prefix":"5db9086edd37b0e5","entry":"make_rnn","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/basic.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/basic.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5db9086edd37b0e5"}},{"code_sha256_prefix":"59b8b0486e25ba13","entry":"relative_shift","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/positional_encodings.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/positional_encodings.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"59b8b0486e25ba13"}},{"code_sha256_prefix":"565e280575548c15","entry":"sinusoid_position_encoding","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/positional_encodings.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/positional_encodings.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"565e280575548c15"}},{"code_sha256_prefix":"a9386608a261c842","entry":"compute_attention_with_relative_encodings","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/positional_encodings.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/positional_encodings.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a9386608a261c842"}},{"code_sha256_prefix":"5d83309868b4e1a6","entry":"layer_norm","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"models/transformer.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/models/transformer.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"5d83309868b4e1a6"}},{"code_sha256_prefix":"4f8a3c3645fbb810","entry":"split_params","repo":"deepmind/nonstationary_mbml","repo_kind":"official","path":"experiments/distributions.py","file_url":"https://github.com/deepmind/nonstationary_mbml/blob/HEAD/experiments/distributions.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4f8a3c3645fbb810"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}