This project explores the integration of dynamical systems and neural networks for learning motion primitives from demonstrations. Specifically, we investigate how to transfer the stability properties of known dynamical systems to unknown systems inferred from human demonstrations. This falls under the domain of Imitation Learning.
While several frameworks combine neural models with stable dynamics, few explicitly address multi-stability — the ability to encode and reproduce multiple trajectories with distinct end-points. Our approach introduces and evaluates architectures capable of learning such multi-stable behaviors.
We integrate multi-attractor dynamics into the latent space of a neural network. After observing a few demonstrations, the model learns to reach target configurations from arbitrary initial states. Using a multivariate gaussian dynamic we are able to learn a potential infinite number of attractor in R^n, while using a continuous set of attraction point we can constrain the final configuration to reach a continuous curve of attraction, allowing a robot to select any grasping point on a particular object. Finally, with a multivariate gaussian dynamic on a spherical manifold, we are able to control also the orientation of the robot.
Encoding different attractors in memory enhances model flexibility and allows shaping of the underlying vector field used for planning. 🎯
This project uses Poetry for dependency and environment management.
git clone <https://github.com/gg-dema/SQUID.git> your_repo && cd your_repo
poetry install
poetry shell
Make sure you have Poetry installed beforehand. You can find installation instructions at python-poetry.org.
All model variants use the same entry point:
cd src
python train.py --params <config_file>
Configuration files are located in src/params/ and define the type of task:
- Discrete attractor points: Use files like
Discrete_Squid_{SPACE}{DIM}_1o.py. Space could beSfor spherical manifold orRfor use euclidean metrics. - Continuous attractor curves: Use files prefixed with
shape_SHAPENAME.py
- For discrete attractors, you only need a dataset of demonstrations (see examples under
multi_attractors/andkuka/). - For continuous attractors, two inputs are required:
- The main contour/curve of the attraction region
- A set of hard negatives (non-attractor points)
python src/tool/hard_neg_extraction.py
The reference dynamics used in the project are the multivariate gaussian dynamic in R^n and in S^n, a "continuous curve" dynamic. All of these are define in the src/agent/neural_networks.py file.
In lower dimension, here you can have a look at the vector field generated from them:
7-dim motion, where the state q is composed by 3 element for the position (x, y, z) and 4 element for the orientation (quaternion) (alpha, beta, gamma, w)
This project builds upon the foundational work in the following repositories:
We thank the original authors for making their work publicly available.


