I’ve released ex_graphblas v0.2.0, an Elixir library for sparse linear algebra and graph computation inspired by the GraphBLAS standard.
What is it?
ex_graphblas lets you express graph algorithms as sparse matrix operations using semiring algebra. This is the approach behind the GraphBLAS standard – the same mathematical foundation used by MATLAB’s sparse operations and Python’s python-graphblas.
What’s it good for
GraphBLAS is especially powerful for massive, sparse graphs—where most possible connections don’t exist, which is the reality for domains like social networks (users ↔ relationships), financial systems (accounts ↔ transactions), knowledge graphs (entities ↔ relationships), and infrastructure maps (services ↔ dependencies). By representing these structures as sparse matrices and operating on them with linear algebra, GraphBLAS delivers highly efficient, parallelizable computation for tasks like traversal, ranking, and pathfinding, while its semiring abstraction lets you change the meaning of computation (e.g., shortest path, reachability, risk propagation) without rewriting algorithms. Backed by optimized implementations like SuiteSparse:GraphBLAS, it provides near-HPC performance on a single machine, making it an ideal foundation for large-scale graph analytics and knowledge-driven systems.
What’s included
- Sparse matrices and vectors – COO construction, element-wise operations, transpose, dup
- 12 built-in semirings –
plus_times,min_plus,lor_land,max_min, and type-specific variants - Masks and descriptors – Structural and complement masks on all compute operations
- 7 graph algorithms – BFS (reach + levels), SSSP, triangle count, connected components, degree, PageRank
- Knowledge-graph queries –
GraphBLAS.Relationwith multi-predicate traversal and transitive closure
Backends:
- Pure Elixir reference backend for development and testing (no dependencies)
- SuiteSparse:GraphBLAS native backend via Zigler NIFs for production performance. The SuiteSparse backend wraps the same C library that powers MATLAB’s sparse operations and Python’s
python-graphblas. If you’re doing graph analytics, recommendation engines, or knowledge-graph queries in Elixir, this gives you a path from prototype (pure Elixir) to production (native NIFs) without changing your application code.
The pure Elixir backend works out of the box. For the SuiteSparse backend, precompiled NIFs are downloaded automatically on supported platforms.
Links:
- Hex: ex_graphblas | Hex
- Docs: ex_graphblas v0.2.0 — Documentation
- Changelog: ex_graphblas/CHANGELOG.md at main · thanos/ex_graphblas · GitHub
- GitHub:
Roadmap
- 0.3.x: Better error messages, instrumentation hooks
- 0.4.x: Higher-level graph APIs, richer Relation combinators
- 0.5.x: Nx integration exploration
This is the first external release, so I’d appreciate any feedback on the API design, documentation, or use cases you’d like to see supported. Happy to answer questions.






















