# TensorFlow Eager: A Multi-Stage, Python-Embedded DSL for Machine Learning

arXiv: https://arxiv.org/abs/1903.01855 · HTML: https://mlsanity.com/paper/1903.01855/

## Key facts

- Cited by 22 papers in the map (data through 14 Oct 2026).
- First posted on arXiv 27 Feb 2019.

## Built on by (most cited first, 22 of 22)

- [CrypTen: Secure Multi-Party Computation Meets Machine Learning](https://mlsanity.com/paper/2109.00984/) (2021)
- [Tutorial on amortized optimization](https://mlsanity.com/paper/2202.00665/) (2022)
- [Pathways: Asynchronous Distributed Dataflow for ML](https://mlsanity.com/paper/2203.12533/) (2022)
- [Torch.fx: Practical Program Capture and Transformation for Deep Learning in Python](https://mlsanity.com/paper/2112.08429/) (2021)
- [DKM: Differentiable K-Means Clustering Layer for Neural Network Compression](https://mlsanity.com/paper/2108.12659/) (2021)
- [A domain-specific language for describing machine learning datasets](https://mlsanity.com/paper/2207.02848/) (2022)
- [LazyTensor: combining eager execution with domain-specific compilers](https://mlsanity.com/paper/2102.13267/) (2021)
- [Quantum Federated Learning: A Comprehensive Survey](https://mlsanity.com/paper/2508.15998/) (2025)
- [Closed-Form Diffeomorphic Transformations for Time Series Alignment](https://mlsanity.com/paper/2206.08107/) (2022)
- [Swift for TensorFlow: A portable, flexible platform for deep learning](https://mlsanity.com/paper/2102.13243/) (2021)
- [Bundle Adjustment in the Eager Mode](https://mlsanity.com/paper/2409.12190/) (2024)
- [TensorGP -- Genetic Programming Engine in TensorFlow](https://mlsanity.com/paper/2103.07512/) (2021)
- [Speed Benchmarking of Genetic Programming Frameworks](https://mlsanity.com/paper/2106.11919/) (2021)
- [Challenges in Migrating Imperative Deep Learning Programs to Graph Execution: An Empirical Study](https://mlsanity.com/paper/2201.09953/) (2022)
- [Data-Driven Adaptive Gradient Recovery for Unstructured Finite Volume Computations](https://mlsanity.com/paper/2507.16571/) (2025)
- [Terra: Imperative-Symbolic Co-Execution of Imperative Deep Learning Programs](https://mlsanity.com/paper/2201.09210/) (2022)
- [Tempo: Compiled Dynamic Deep Learning with Symbolic Dependence Graphs](https://mlsanity.com/paper/2501.05408/) (2025)
- [veScale: Consistent and Efficient Tensor Programming with Eager-Mode SPMD](https://mlsanity.com/paper/2509.07003/) (2025)
- [GraphMend: Code Transformations for Fixing Graph Breaks in PyTorch 2](https://mlsanity.com/paper/2509.16248/) (2025)
- [CLAIMED, a visual and scalable component library for Trusted AI](https://mlsanity.com/paper/2103.03281/) (2021)
- [RAMario: Experimental Approach to Reptile Algorithm -- Reinforcement Learning for Mario](https://mlsanity.com/paper/2305.09655/) (2023)
- [Speculative Automated Refactoring of Imperative Deep Learning Programs to Graph Execution](https://mlsanity.com/paper/2504.05424/) (2025)

## Abstract (arXiv)

TensorFlow Eager is a multi-stage, Python-embedded domain-specific language for hardware-accelerated machine learning, suitable for both interactive research and production. TensorFlow, which TensorFlow Eager extends, requires users to represent computations as dataflow graphs; this permits compiler optimizations and simplifies deployment but hinders rapid prototyping and run-time dynamism. TensorFlow Eager eliminates these usability costs without sacrificing the benefits furnished by graphs: It provides an imperative front-end to TensorFlow that executes operations immediately and a JIT tracer that translates Python functions composed of TensorFlow operations into executable dataflow graphs. TensorFlow Eager thus offers a multi-stage programming model that makes it easy to interpolate between imperative and staged execution in a single package.
