🤖 AI Summary
Traditional program semantic graphs struggle to uniformly represent the multi-way colocation, routing constraints, and higher-order product structures of geometric algebra inherent in spatial computing, thereby hindering the co-optimization of compiler transformations and physical correctness. This work proposes the Program Hypergraph (PHG), which generalizes binary edges to arbitrary-arity hyperedges and formally introduces hypergraphs into compiler intermediate representations for the first time. PHG naturally encodes mesh topology and Clifford algebra gradings via k-simplices. Integrated with an Abelian group–based dimensional type system (DTS), PHG enables unified reasoning—within a single structure—over geometric correctness, memory layout, precision selection, and hardware partitioning. This framework achieves end-to-end physics-aware compilation with automatic sparsity inference, eliminating the need for manual specialization and significantly enhancing both performance and portability of geometric algebra neural networks.
📝 Abstract
The Program Semantic Graph (PSG) introduced in prior work on Dimensional Type Systems and Deterministic Memory Management encodes compilation-relevant properties as binary edge relations between computation nodes. This representation is adequate for scalar and tensor computations, but becomes structurally insufficient for two classes of problems central to heterogeneous compute: tile co-location and routing constraints in spatial dataflow architectures, which are inherently multi-way; and geometric algebra computation, where graded multi-way products cannot be faithfully represented as sequences of binary operations without loss of algebraic identity. This paper introduces the Program Hypergraph (PHG) as a principled generalization of the PSG that promotes binary edges to hyperedges of arbitrary arity. We demonstrate that grade in Clifford algebra is a natural dimension axis within the existing DTS abelian group framework, that grade inference derives geometric product sparsity eliminating the primary performance objection to Clifford algebra neural networks without manual specialization, and that the k-simplex structure of mesh topology is a direct instance of the hyperedge formalism. We assess the existing geometric algebra library ecosystem, identify the consistent type-theoretic gap that no current system addresses, and show that the PHG closes it within the Fidelity compilation framework. The result is a compilation framework where geometric correctness, memory placement, numerical precision selection, and hardware partitioning are jointly derivable from a single graph structure exposed as interactive design-time feedback.