{"id":34048162,"url":"https://github.com/famura/neuralfields","last_synced_at":"2026-04-08T17:31:04.664Z","repository":{"id":77611516,"uuid":"605553489","full_name":"famura/neuralfields","owner":"famura","description":"A type of potential-based recurrent neural networks implemented with PyTorch","archived":false,"fork":false,"pushed_at":"2024-11-20T13:44:56.000Z","size":2790,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-15T17:26:33.237Z","etag":null,"topics":["neural-field-model","neural-fields","pytorch","recurrent-neural-network","time-series"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/famura.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"docs/contributing.md","funding":null,"license":"LICENSE.txt","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":"2023-02-23T12:02:46.000Z","updated_at":"2025-02-28T15:08:19.000Z","dependencies_parsed_at":"2024-07-09T14:42:04.465Z","dependency_job_id":null,"html_url":"https://github.com/famura/neuralfields","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"purl":"pkg:github/famura/neuralfields","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fneuralfields","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fneuralfields/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fneuralfields/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fneuralfields/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/famura","download_url":"https://codeload.github.com/famura/neuralfields/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/famura%2Fneuralfields/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31566685,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["neural-field-model","neural-fields","pytorch","recurrent-neural-network","time-series"],"created_at":"2025-12-14T00:01:14.326Z","updated_at":"2026-04-08T17:31:04.648Z","avatar_url":"https://github.com/famura.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Fields \u0026ndash; Old Idea, New Glory\n\n[![license][license-badge]][license]\n[![docs][docs-stable-badge]][docs-stable]\n[![docs][docs-latest-badge]][docs-latest]\n[![pre-commit][pre-commit-badge]][pre-commit]\n[![bandit][bandit-badge]][bandit-hp]\n[![isort][isort-badge]][isort-hp]\n[![black][black-badge]][black]\n[![ci][ci-badge]][ci]\n[![tests][tests-badge]][tests]\n[![coverage][coverage-badge]][coverage]\n\n## About\n\nIn 1977, Shun-ichi Amari introduced _neural fields_, a class of potential-based recurrent neural networks [1].\nThis architecture was developed as a simplistic model of the activity of neurons in a (human) brain.\nIt's main characteristic is the lateral in-/exhibition of neurons though their accumulated potential.\nDue to its simplicity and expressiveness, Amari’s work was highly influential and led to several follow-up papers such\nas [2-6] to only name a few.\n\n## Support\n\nIf you use code or ideas from this repository for your projects or research, **please cite it**.\n\n```\n@misc{Muratore_neuralfields,\n  author = {Fabio Muratore},\n  title = {neuralfields - A type of potential-based recurrent neural networks implemented with PyTorch},\n  year = {2023},\n  publisher = {GitHub},\n  journal = {GitHub repository},\n  howpublished = {\\url{https://github.com/famura/neuralfields}}\n}\n```\n\n## Features\n\n* There are two variants of the neural fields implemented in this repository: one called `NeuralField` that matches\n  the model of Amari closely using 1D convolutions, as well as another one called `SimpleNeuralField` that replaces the\n  convolutions and introduces custom potential dynamics function.\n* Both implementations have by modern standards very few, i.e., typically less than 1000, parameters. I suggest that you\n  start with the `NeuralField` class since it is more expressive. However, the `SimpleNeuralField` has the benefit of\n  operating with typically less than 20 parameters, which allows you to use optimizers that otherwise might not scale.\n* Both, `NeuralField` and `SimpleNeuralField`, model classes are subclasses of `torch.nn.Module`, hence able to process\n  batched data and run on GPUs.\n* The [examples](https://github.com/famura/neuralfields/blob/main/examples) contain a script for time series learning.\n  However, it is also possible to use neural fields as generative models.\n* This repository is a spin-off from [SimuRLacra](https://github.com/famura/SimuRLacra) where the neural fields have\n  been used as the backbone for control policies. In `SimuRLacra`, the focus is on reinforcement learning for\n  sim-to-real transfer. However, the goal of this repository is to make the implementation **as general as possible**,\n  such that it could for example be used as generative model.\n\n### Time series learning example\n![](examples/time_series_learning.png) ![](exported/examples/time_series_learning.png)\n\n### Time series generation example\n![](examples/time_series_generation.png) ![](exported/examples/time_series_generation.png)\n\n## Getting Started\n\nTo install this package, simply run\n\n```sh\npip install neuralfields\n```\n\nFor further information, please have a look at the [getting started guide][docs-getting-started].\nIn the documentation, you can also find the [complete reference of the source code][docs-code-reference].\n\n---\n### References\n\n[1] S-I. Amari. _Dynamics of pattern formation in lateral-inhibition type neural fields_. Biological Cybernetics.\n1977.\u003cbr /\u003e\n[2] K. Kishimoto and S-I. Amari. _Existence and stability of local excitations in homogeneous neural fields_. Journal\nof Mathematical Biology, 1979.\u003cbr /\u003e\n[3] W. Erlhagen and G. Schöner. _Dynamic field theory of movement preparation_. Psychological Review, 2002.\u003cbr /\u003e\n[4] S-I. Amari, H. Park, and T. Ozeki. _Singularities affect dynamics of learning in neuromanifolds_. Neural\nComputation, 2006.\u003cbr /\u003e\n[5] T. Luksch, M. Gineger, M. Mühlig, T. Yoshiike, _Adaptive Movement Sequences and Predictive Decisions based on\nHierarchical Dynamical Systems_. International Conference on Intelligent Robots and Systems, 2012.\u003cbr /\u003e\n[6] C. Kuehn and  J. M. Tölle. _A gradient flow formulation for the stochastic Amari neural field model_. Journal of\nMathematical Biology, 2019.\n\n\n\u003c!-- URLs --\u003e\n[bandit-badge]: https://img.shields.io/badge/security-bandit-green.svg\n[bandit-hp]: https://github.com/PyCQA/bandit\n[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg\n[black]: https://github.com/psf/black\n[ci-badge]: https://github.com/famura/neuralfields/actions/workflows/ci.yaml/badge.svg\n[ci]: https://github.com/famura/neuralfields/actions/workflows/ci.yaml\n[coverage-badge]: https://famura.github.io/neuralfields/latest/exported/coverage/badge.svg\n[coverage]: https://famura.github.io/neuralfields/latest/exported/coverage/report\n[docs-stable-badge]: https://img.shields.io/badge/docs-stable-informational\n[docs-latest-badge]: https://img.shields.io/badge/docs-latest-informational\n[docs-code-reference]: https://famura.github.io/neuralfields/stable/reference\n[docs-getting-started]: https://famura.github.io/neuralfields/stable/getting_started\n[docs-stable]: https://famura.github.io/neuralfields/stable\n[docs-latest]: https://famura.github.io/neuralfields/latest\n[isort-badge]: https://img.shields.io/badge/imports-isort-green\n[isort-hp]: https://pycqa.github.io/isort/\n[license-badge]: https://img.shields.io/badge/license-MIT--v4-informational\n[license]: https://github.com/famura/neuralfields/LICENSE.txt\n[pre-commit-badge]: https://img.shields.io/badge/pre--commit-enabled-green\n[pre-commit]: https://github.com/pre-commit/pre-commit\n[tests-badge]: https://famura.github.io/neuralfields/latest/exported/tests/badge.svg\n[tests]: https://famura.github.io/neuralfields/latest/exported/tests/report\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamura%2Fneuralfields","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffamura%2Fneuralfields","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffamura%2Fneuralfields/lists"}