๐ค AI Summary
Distributed machine learning frameworks introduce subtle correctness errors through parallelization and optimization, severely degrading performance; existing verification approaches are either ad hoc or prohibitively expensive. This paper proposes Scalify, a lightweight semantic equivalence verification framework. Scalify introduces a novel relational modeling technique that unifies equivalence saturation with Datalog-based reasoning, coupled with symbolic bijection inference to achieve high-precision computational graph equivalence checking. To enhance scalability, it further designs rewrite template reuse, hierarchical memoization, and parallel rewrite partitioning. Evaluated on commodity hardware, Scalify completes end-to-end verification of ultra-large modelsโe.g., Llama-3.1-405Bโin minutes, accurately localizing erroneous code. Deployed in Amazonโs production environment, Scalify has uncovered five previously unknown defects.
๐ Abstract
Modern machine learning frameworks support very large models by incorporating parallelism and optimization techniques. Yet, these very techniques add new layers of complexity, introducing silent errors that severely degrade model performance. Existing solutions are either ad hoc or too costly for production.
We present Scalify, a lightweight framework that exposes silent errors by verifying semantic equivalence of computational graphs using equality saturation and Datalog-style reasoning. To scale, Scalify partitions graphs with parallel rewriting and layer memoization, reuses rewrite templates, and augments equality saturation with relational reasoning and symbolic bijection inference. It further localizes discrepancies to precise code sites, turning verification results into actionable debugging guidance. Scalify verifies models as large as Llama-3.1-405B within minutes on a commodity machine and exposed five unknown bugs in Amazon production machine learning frameworks.