DeepAI AI Chat
Log In Sign Up

Data-Parallel Algorithms for String Diagrams

by   Paul Wilson, et al.

We give parallel algorithms for string diagrams represented as structured cospans of ACSets. Specifically, we give linear (sequential) and logarithmic (parallel) time algorithms for composition, tensor product, construction of diagrams from arbitrary Σ-terms, and application of functors to diagrams. Our datastructure can represent morphisms of both the free symmetric monoidal category over an arbitrary signature as well as those with a chosen Special Frobenius structure. We show how this additional (hypergraph) structure can be used to map diagrams to diagrams of optics. This leads to a case study in which we define an algorithm for efficiently computing symbolic representations of gradient-based learners based on reverse derivatives. The work we present here is intended to be useful as a general purpose datastructure. Implementation requires only integer arrays and well-known algorithms, and is data-parallel by constuction. We therefore expect it to be applicable to a wide variety of settings, including embedded and parallel hardware and low-level languages.


page 1

page 2

page 3

page 4


Promonads and String Diagrams for Effectful Categories

Premonoidal and Freyd categories are both generalized by non-cartesian F...

Border Algorithms for Computing Hasse Diagrams of Arbitrary Lattices

The Border algorithm and the iPred algorithm find the Hasse diagrams of ...

Completeness of Nominal PROPs

We introduce nominal string diagrams as string diagrams internal in the ...

The Cost of Compositionality: A High-Performance Implementation of String Diagram Composition

String diagrams are an increasingly popular algebraic language for the a...

Fast Automated Reasoning over String Diagrams using Multiway Causal Structure

We introduce an intuitive algorithmic methodology for enacting automated...

Pictures of Processes: Automated Graph Rewriting for Monoidal Categories and Applications to Quantum Computing

This work is about diagrammatic languages, how they can be represented, ...

Double pushout rewriting of C-sets

We generalize a pushout complement algorithm from graph rewriting to fin...