{"id":18401679,"url":"https://github.com/borealisai/constant-memory-anp","last_synced_at":"2026-07-03T17:33:34.830Z","repository":{"id":247796094,"uuid":"806696828","full_name":"BorealisAI/constant-memory-anp","owner":"BorealisAI","description":null,"archived":false,"fork":false,"pushed_at":"2024-07-08T17:46:46.000Z","size":1184,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-16T03:35:58.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BorealisAI.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-27T17:51:36.000Z","updated_at":"2024-11-26T23:02:59.000Z","dependencies_parsed_at":"2024-07-10T17:48:22.923Z","dependency_job_id":"4d41645f-648f-48a1-8c35-dea4e378e35a","html_url":"https://github.com/BorealisAI/constant-memory-anp","commit_stats":null,"previous_names":["borealisai/constant-memory-anp"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorealisAI%2Fconstant-memory-anp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorealisAI%2Fconstant-memory-anp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorealisAI%2Fconstant-memory-anp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BorealisAI%2Fconstant-memory-anp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BorealisAI","download_url":"https://codeload.github.com/BorealisAI/constant-memory-anp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248610362,"owners_count":21132920,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-06T02:39:38.128Z","updated_at":"2025-10-30T05:05:59.004Z","avatar_url":"https://github.com/BorealisAI.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Memory Efficient Neural Processes via Constant Memory Attention Block\n\nThis is the official implementation of the paper [Memory Efficient Neural Processes via Constant Memory Attention Block](https://openreview.net/forum?id=xtwCf7iAs2). \n\nThis repository includes our implementation of Constant Memory Attention Block (CMAB) and Constant Memory Attentive Neural Processes (CMANPs).\n\nCMAB is a novel attention block that (i) is permutation invariant, (ii) computes its output in constant memory, and (iii) performs constant computation updates.\n\u003cimg width=\"100%\" src=\"./CMAB.png\"\u003e\n\nCMANP is a NP variant that builds on CMAB, requiring only constant memory unlike previous existing attention-based NPs. Empirically, CMANPs achieve results competitive with other SOTA NPs on popular benchmarks while requiring only constant memory.\n\n\u003cimg width=\"100%\" src=\"./CMANPs.png\"\u003e\n\n\n## Install\n\nCreate and activate a conda environment. Install the dependencies as listed in `requirements.txt`:\n\n```\nconda create --name cmanp python=3.7\nconda activate cmanp\npip install -r requirements.txt\n```\n\n## Usage\n\nPlease check the `regression` directory for specific usage.\n\n## Reference\n\nFor technical details, please check the conference version of our paper.\n```\n@inproceedings{\n    feng2024memory,\n    title={Memory Efficient Neural Processes via Constant Memory Attention Block},\n    author={Leo Feng and Frederick Tung and Hossein Hajimirsadeghi and Yoshua Bengio and Mohamed Osama Ahmed},\n    booktitle={International Conference on Machine Learning},\n    year={2024},\n    url={https://openreview.net/forum?id=xtwCf7iAs2}\n}\n```\n\n## Acknowledgement\n\nThis code is based on the official code base of [Latent Bottlenecked Attentive Neural Processes](https://github.com/BorealisAI/latent-bottlenecked-anp).\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborealisai%2Fconstant-memory-anp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fborealisai%2Fconstant-memory-anp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fborealisai%2Fconstant-memory-anp/lists"}