graph-neural-network

A Rust-native graph neural network built from first principles on a Bevy ECS substrate, exploring how graph topology and aggregation strategy affect long-range signal propagation.

A Rust-native graph neural network built from first principles. Graph neural networks operate on data where the connections between items are part of the input: molecules with chemical bonds, social networks, citation graphs. They learn by passing messages between connected nodes, so the shape of the graph determines what information can flow.

This project is built using Bevy ECS, an entity-component-system pattern from game engine architecture. ECS is a data-oriented pattern: entities are IDs, components are data fields attached to them, and relationships between them are themselves first-class entities. For a graph neural network this is a natural fit. Nodes are entities, edges are entities, activation and gradient state ride on the edge entities. The computation graph and the entity registry are the same structure — no autograd library, no parallel adjacency matrix to maintain.

Structural choices about graph topology and aggregation are under exploration: how they shape what a network can learn over long-range connections. These come from observations about the connectivity of the avian pallium, but the network itself is the experimental instrument rather than a model of biology.

The repository is private and available on request — reach out at contact@usuallyinflux.dev.