论文精选

AI编译器中的溯源追踪:基于余代数的新方法

Provenance Tracking in AI Compilers through the Lens of Coalgebra

精选理由

AI编译器开发者终于有了不侵入代码的溯源方案——COVAN在重写后仍能稳定追踪张量来源,做模型优化和调试的团队可以直接参考论文实现。

AI 摘要

AI编译器在重写计算图时,常导致张量和操作符的溯源信息丢失,影响调试和验证。现有方法要么侵入性强,要么在非单射图重写下失效。研究者提出一种基于观测语义的轻量级溯源方法,通过余代数模型和双模拟来保持溯源稳定性,即使中间节点被消除也能追踪。该方法在原型编译器COVAN中实现,证明了低工程开销下的可靠溯源。

原文 · arXiv cs.AI

Provenance Tracking in AI Compilers through the Lens of Coalgebra

AI compilers aggressively rewrite computation graphs through normalization, lowering, and optimization, making it difficult to track the provenance of tensors and operators across compilation. Reliable provenance is essential for attaching platform-specific postprocessing, debugging compiler behavior, and validating transformations, yet existing solutions are either invasive or ad hoc under non-injective graph rewrites. We present a lightweight, generative approach to provenance tracking based on observational semantics. Instead of propagating identifiers through compiler passes, we observe graph transformations and reason about provenance in terms of observable computational actions. We formalize this approach using a coalgebraic model and bisimulation, which preserves provenance even when intermediate nodes are eliminated. Furthermore, we implement this approach in a prototype AI compiler COVAN, demonstrating stable provenance across compilation pipelines with minimal engineering overhead.