Differentiate Everything with a Reversible Embeded Domain-Specific Language

Jin-Guo Liu, Taine Zhao
3/10/2020
cs.PLcs.LG

No official code found. Best implementation: GiggleLiu/NiLang.jl (251 stars, Julia, Apache-2.0, last commit 2026-09-08).

Abstract

Reverse-mode automatic differentiation (AD) suffers from the issue of having too much space overhead to trace back intermediate computational states for back-propagation. The traditional method to trace back states is called checkpointing that stores intermediate states into a global stack and restore state through either stack pop or re-computing.

Show full abstract

The overhead of stack manipulations and re-computing makes the general purposed (not tensor-based) AD engines unable to meet many industrial needs. Instead of checkpointing, we propose to use reverse computing to trace back states by designing and implementing a reversible programming eDSL, where a program can be executed bi-directionally without implicit stack operations. The absence of implicit stack operations makes the program compatible with existing compiler features, including utilizing existing optimization passes and compiling the code as GPU kernels. We implement AD for sparse matrix operations and some machine learning applications to show that our framework has the state-of-the-art performance.

View on arXivView PDF

Code Implementations(1)

GiggleLiu/NiLang.jlCommunity100%
Apache-2.0

A differential eDSL that can run faster than light and go back to the past.

25114Julia, TeXNov 20, 20192 months agoApache-2.0

Similar Papers

Cite this paper

@article{liu2020differentiate,
  title  = {Differentiate Everything with a Reversible Embeded Domain-Specific Language},
  author = {Jin-Guo Liu and Taine Zhao},
  year   = {2020},
  eprint = {2003.04617},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2003.04617}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2003.04617.svg)](https://codeofpaper.com/paper/2003.04617)

Discussion