# Recursive Function Definitions in Static Dataflow Graphs and their Implementation in TensorFlow

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

## Key facts

- No citing papers in the map yet (data through 14 Oct 2026).
- Builds on 6 of its 29 references that are in the map.
- First posted on arXiv 26 Oct 2024.

## Builds on (most cited first, 6 of 6)

- [Theano: A Python framework for fast computation of mathematical expressions](https://mlsanity.com/paper/1605.02688/) (2016)
- [DyNet: The Dynamic Neural Network Toolkit](https://mlsanity.com/paper/1701.03980/) (2017)
- [Deep Learning with Dynamic Computation Graphs](https://mlsanity.com/paper/1702.02181/) (2017)
- [Top-down Tree Long Short-Term Memory Networks](https://mlsanity.com/paper/1511.00060/) (2015)
- [Dynamic Control Flow in Large-Scale Machine Learning](https://mlsanity.com/paper/1805.01772/) (2018)
- [Improving the Expressiveness of Deep Learning Frameworks with Recursion](https://mlsanity.com/paper/1809.00832/) (2018)

## Abstract (arXiv)

Modern machine learning systems represent their computations as dataflow graphs. The increasingly complex neural network architectures crave for more powerful yet efficient programming abstractions. In this paper we propose an efficient technique for supporting recursive function definitions in dataflow-based systems such as TensorFlow. The proposed approach transforms the given recursive definitions into a static dataflow graph that is enriched with two simple yet powerful dataflow operations. Since static graphs do not change during execution, they can be easily partitioned and executed efficiently in distributed and heterogeneous environments. The proposed technique makes heavy use of the idea of tagging, which was one of the cornerstones of dataflow systems since their inception. We demonstrate that our technique is compatible with the idea of automatic differentiation, a notion that is crucial for dataflow systems that focus on deep learning applications. We describe the principles of an actual implementation of the technique in the TensorFlow framework, and present experimental results that demonstrate that the use of tagging is of paramount importance for developing efficient high-level abstractions for modern dataflow systems.
