A type of potential-based recurrent neural networks implemented with PyTorch
Project description
Neural Fields – Old Idea, New Glory
About
In 1977, Shun-ichi Amari introduced neural fields, a class of potential-based recurrent neural networks [1]. This architecture was developed as a simplistic model of the activity of neurons in a (human) brain. It's main characteristic is the lateral in-/exhibition of neurons though their accumulated potential. Due to its simplicity and expressiveness, Amari’s work was highly influential and led to several follow-up papers such as [2-6] to only name a few.
Support
If you use code or ideas from this repository for your projects or research, please cite it.
@misc{Muratore_neuralfields,
author = {Fabio Muratore},
title = {neuralfields - A type of potential-based recurrent neural networks implemented with PyTorch},
year = {2023},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/famura/neuralfields}}
}
Features
- There are two variants of the neural fields implemented in this repository: one called
NeuralField
that matches the model of Amari closely using 1D convolutions, as well as another one calledSimpleNeuralField
that replaces the convolutions and introduces custom potential dynamics function. - Both implementations have by modern standards very few, i.e., typically less than 1000, parameters. I suggest that you
start with the
NeuralField
class since it is more expressive. However, theSimpleNeuralField
has the benefit of operating with typically less than 20 parameters, which allows you to use optimizers that otherwise might not scale. - Both,
NeuralField
andSimpleNeuralField
, model classes are subclasses oftorch.nn.Module
, hence able to process batched data and run on GPUs. - The examples contain a script for time series learning. However, it is also possible to use neural fields as generative models.
- This repository is a spin-off from SimuRLacra where the neural fields have
been used as the backbone for control policies. In
SimuRLacra
, the focus is on reinforcement learning for sim-to-real transfer. However, the goal of this repository is to make the implementation as general as possible, such that it could for example be used as generative model.
Time series learning example
Time series generation example
Getting Started
To install this package, simply run
pip install neuralfields
For further information, please have a look at the getting started guide. In the documentation, you can also find the complete reference of the source code.
References
[1] S-I. Amari. Dynamics of pattern formation in lateral-inhibition type neural fields. Biological Cybernetics.
1977.
[2] K. Kishimoto and S-I. Amari. Existence and stability of local excitations in homogeneous neural fields. Journal
of Mathematical Biology, 1979.
[3] W. Erlhagen and G. Schöner. Dynamic field theory of movement preparation. Psychological Review, 2002.
[4] S-I. Amari, H. Park, and T. Ozeki. Singularities affect dynamics of learning in neuromanifolds. Neural
Computation, 2006.
[5] T. Luksch, M. Gineger, M. Mühlig, T. Yoshiike, Adaptive Movement Sequences and Predictive Decisions based on
Hierarchical Dynamical Systems. International Conference on Intelligent Robots and Systems, 2012.
[6] C. Kuehn and J. M. Tölle. A gradient flow formulation for the stochastic Amari neural field model. Journal of
Mathematical Biology, 2019.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file neuralfields-0.4.5.tar.gz
.
File metadata
- Download URL: neuralfields-0.4.5.tar.gz
- Upload date:
- Size: 20.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9d5b095c73371d1b8355e2c402cdc225d4593562fbe521ede43cdb2a1c79a5b3 |
|
MD5 | be595b8b8b566cb4275bce449022a3ed |
|
BLAKE2b-256 | def339c9863f80457e187e4981c274ea335eafd32e5700463f5e538137eedaf1 |
File details
Details for the file neuralfields-0.4.5-py3-none-any.whl
.
File metadata
- Download URL: neuralfields-0.4.5-py3-none-any.whl
- Upload date:
- Size: 26.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.4 CPython/3.10.15 Linux/6.5.0-1025-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3424d6016a90a076eaeee82018a5914914f1871950da5ed207defe4e583f4ab6 |
|
MD5 | b46a0d282b85d0ae99eee9b2e91ccf08 |
|
BLAKE2b-256 | 9892267bf80cbcfd204be580889c47c026ffba9cfaf3534b772263cf2d4216ed |