# Categorical Data Structures for Technical Computing

arXiv: https://arxiv.org/abs/2106.04703 · HTML: https://mlsanity.com/paper/2106.04703/

## Key facts

- Cited by 5 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 8 Jun 2021.

## Built on by (most cited first, 5 of 5)

- [A Probabilistic Generative Model of Free Categories](https://mlsanity.com/paper/2205.04545/) (2022)
- [A Categorical Framework for Modeling with Stock and Flow Diagrams](https://mlsanity.com/paper/2211.01290/) (2022)
- [A Categorical Representation Language and Computational System for Knowledge-Based Planning](https://mlsanity.com/paper/2305.17208/) (2023)
- [Automating Transfer of Robot Task Plans using Functorial Data Migrations](https://mlsanity.com/paper/2406.15961/) (2024)
- [da Costa and Tarski meet Goguen and Carnap: a novel approach for ontological heterogeneity based on consequence systems](https://mlsanity.com/paper/2602.15158/) (2026)

## Abstract (arXiv)

Many mathematical objects can be represented as functors from finitely-presented categories mathsfC to mathsfSet. For instance, graphs are functors to mathsfSet from the category with two parallel arrows. Such functors are known informally as mathsfC-sets. In this paper, we describe and implement an extension of mathsfC-sets having data attributes with fixed types, such as graphs with labeled vertices or real-valued edge weights. We call such structures "acsets," short for "attributed mathsfC-sets." Derived from previous work on algebraic databases, acsets are a joint generalization of graphs and data frames. They also encompass more elaborate graph-like objects such as wiring diagrams and Petri nets with rate constants. We develop the mathematical theory of acsets and then describe a generic implementation in the Julia programming language, which uses advanced language features to achieve performance comparable with specialized data structures.
