We introduce Graphical Quadratic Algebra (GQA), a string diagrammatic calculus extending the language of Graphical Affine Algebra with a new generator characterised by invariance under rotation matrices. We show that GQA is a sound and complete axiomatisation for three different models: quadratic relations, which are a compositional formalism for least-squares problems, Gaussian stochastic processes, and Gaussian stochastic processes extended with non-determinisms. The equational theory of GQA sheds light on the connections between these perspectives, giving an algebraic interpretation to the interplay of stochastic behaviour, relational behaviour, non-determinism, and conditioning. As applications, we discuss various case studies, including linear regression, probabilistic programming, and electrical circuits with realistic (noisy) components.
翻译:我们提出图形二次代数(GQA),这是一种字符串图式演算,它扩展了图形仿射代数的语言,并引入了一个由旋转矩阵下的不变性刻画的新生成元。我们证明GQA是对三种不同模型的完备且可靠的公理化:二次关系(一种针对最小二乘问题的组合形式体系)、高斯随机过程以及扩展了非确定性的高斯随机过程。GQA的等式理论揭示了这些视角之间的联系,为随机行为、关系行为、非确定性和条件作用的相互作用给出了代数解释。作为应用,我们讨论了各种案例研究,包括线性回归、概率编程以及包含实际(含噪声)元件的电路。