In this work, we propose a unified abstraction for graph algorithms: the Extended General Einsums language, or EDGE. The EDGE language expresses graph algorithms in the language of tensor algebra, providing a rigorous, succinct, and expressive mathematical framework. EDGE leverages two ideas: (1) the well-known foundations provided by the graph-matrix duality, where a graph is simply a 2D tensor, and (2) the power and expressivity of Einsum notation in the tensor algebra world. In this work, we describe our design goals for EDGE and walk through the extensions we add to Einsums to support more complex operations common in graph algorithms. Additionally, we provide a few examples of how to express graph algorithms in our proposed notation. We hope that a single, mathematical notation for graph algorithms will (1) allow researchers to more easily compare different algorithms and different implementations of a graph algorithm; (2) enable developers to factor complexity by separating the concerns of what to compute (described with the extended Einsum notation) from the lower level details of how to compute; and (3) enable the discovery of different algorithmic variants of a problem through algebraic manipulations and transformations on a given EDGE expression.
翻译:本文提出了一种面向图算法的统一抽象框架——EDGE(Extended General Einsums)语言。该语言以张量代数形式表达图算法,构建了严谨、简洁且富有表现力的数学体系。EDGE语言基于两大核心思想:(1) 图-矩阵对偶性的成熟理论基础(图本质上可视为二维张量);(2) 爱因斯坦求和约定(Einsum)在张量代数领域的强大表达能力。本文阐述了EDGE语言的设计目标,详细介绍了针对复杂图算法运算需求对爱因斯坦求和约定进行的扩展,并通过实例演示如何用该符号体系表达图算法。我们期待这种统一的图算法数学符号能够:(1) 帮助研究者更便捷地比较不同图算法及其实现方案;(2) 通过分离计算内容(以扩展爱因斯坦求和约定描述)与底层计算实现细节,使开发者有效解耦复杂度;(3) 通过对EDGE表达式进行代数变换与推导,发现同一问题的多种算法变体。