Verify Implementation Equivalence of Large Models
Qi Zhan, Xing Hu, Xin Xia, Shanping Li

TL;DR
Emerge is a framework that automatically verifies the equivalence of large-model implementations across frameworks by synthesizing and validating rewrite rules, aiding debugging and ensuring correctness.
Contribution
Emerge introduces an automated, rule-synthesis based approach for implementation equivalence verification of large models, reducing manual effort and improving bug detection.
Findings
Successfully verifies equivalence in practical scenarios
Detects 10 of 13 known bugs and finds 8 new issues
Synthesizes effective block-level rewrite rules
Abstract
Verifying whether two implementations of the same large model are equivalent across frameworks is difficult in practice. Even when they realize the same computation, their graphs may differ substantially in operator decomposition, tensor layout, and the use of fused or opaque kernels, making manual rewrite rules hard to build and maintain. We present Emerge, a framework for checking Implementation Equivalence over computation graphs of large-model implementations. Instead of writing rules manually, Emerge represents the two implementations in an e-graph, infers candidate relations from execution values, and synthesizes rewrite rules on demand when existing rules are insufficient. Each synthesized rule is validated using the strongest applicable method, including SMT- based checking for symbolically tractable cases and constraint-aware randomized testing for opaque kernels,…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsModel-Driven Software Engineering Techniques · Software System Performance and Reliability · Software Engineering Research
