Connected, not centralized
Devices exchange information only with their neighbors in a communication graph.

dEngine: A Decentralized Learning Framework for Python
Collaborative learning across devices with siloed data.
Devices exchange information only with their neighbors in a communication graph.
Local data never leaves the device. Each node learns from its own distribution.
Every participant strengthens the shared model while keeping their data right where it belongs.
Under the hood
We try to solve a shared optimization problem across a network of devices without a central view of their data.
\(n\) devices, indexed by \(i \in \{1, \dots, n\}\), form a communication graph \(G = (V, E)\). Each device exchanges information only with its neighbors \(N_i = \{ j : (i, j) \in E \}\).
\(W \in \mathbb{R}^d\) represents the model parameters.
\(D_i\) is the local data distribution at device \(i\). It is private and never leaves the device. Different devices can have different distributions (non-IID data).
\[ F_i(W; D_i) = \mathbb{E}_{\xi \sim D_i} \big[ \ell(W; \xi) \big] \]
The local objective at device \(i\), where \(\ell(W; \xi)\) is the loss of model \(W\) on sample \(\xi\).
\(f(W)\) is the average of the local objectives. Device \(i\) can evaluate (stochastic) gradients of \(F_i\) only, never of \(f\).
Test it now
Install dEngine, grab a ready-made MNIST experiment and train it across a network of simulated devices, all from your terminal.
# 1. Install dEngine (requires Python 3.13+)
pip install git+https://github.com/DecentralizedLearning/dEngine.git
# 2. Download the MNIST experiment configuration
curl -O https://decentralizedlearning.github.io/builtins/mnist.yaml
# 3. Run the simulation
dengine-simulate --config mnist.yaml --seed 123 scenario.arguments.num_parallel_clients=50
Results are written to logs/ and the MNIST dataset is downloaded to ./datasets. Run dengine-simulate --help for all options.
Better, together
Explore the project, follow the research, and contribute on GitHub.
Get in touch
Want more info about dEngine, have an idea to share, or interested in collaborating? Drop us an email.