Terra: Imperative-Symbolic Co-Execution of Imperative Deep Learning
Programs
- URL: http://arxiv.org/abs/2201.09210v1
- Date: Sun, 23 Jan 2022 09:04:48 GMT
- Title: Terra: Imperative-Symbolic Co-Execution of Imperative Deep Learning
Programs
- Authors: Taebum Kim, Eunji Jeong, Geon-Woo Kim, Yunmo Koo, Sehoon Kim,
Gyeong-In Yu, Byung-Gon Chun
- Abstract summary: Imperative programming allows users to implement their deep neural networks (DNNs) easily.
Several systems have been proposed to combine the usability of imperative programming with the optimized performance of symbolic graph execution.
We propose Terra, an imperative-symbolic co-execution system that can handle any imperative DL programs while achieving the optimized performance of symbolic graph execution.
- Score: 7.656446581986389
- License: http://creativecommons.org/licenses/by/4.0/
- Abstract: Imperative programming allows users to implement their deep neural networks
(DNNs) easily and has become an essential part of recent deep learning (DL)
frameworks. Recently, several systems have been proposed to combine the
usability of imperative programming with the optimized performance of symbolic
graph execution. Such systems convert imperative Python DL programs to
optimized symbolic graphs and execute them. However, they cannot fully support
the usability of imperative programming. For example, if an imperative DL
program contains a Python feature with no corresponding symbolic representation
(e.g., third-party library calls or unsupported dynamic control flows) they
fail to execute the program. To overcome this limitation, we propose Terra, an
imperative-symbolic co-execution system that can handle any imperative DL
programs while achieving the optimized performance of symbolic graph execution.
To achieve this, Terra builds a symbolic graph by decoupling DL operations from
Python features. Then, Terra conducts the imperative execution to support all
Python features, while delegating the decoupled operations to the symbolic
execution. We evaluated the performance improvement and coverage of Terra with
ten imperative DL programs for several DNN architectures. The results show that
Terra can speed up the execution of all ten imperative DL programs, whereas
AutoGraph, one of the state-of-the-art systems, fails to execute five of them.
Related papers
- Dolphin: A Programmable Framework for Scalable Neurosymbolic Learning [18.50192747078987]
We propose a framework to scale neurosymbolic learning at a fundamental level by mapping forward chaining and backward gradient propagation in symbolic programs to vectorized computations.
Dolphin introduces a set of abstractions and primitives built directly on top of a high-performance deep learning framework like PyTorch.
We evaluate Dolphin on a suite of 13 benchmarks across 5 neurosymbolic tasks that combine deep learning models for text, image, or video processing with symbolic programs.
arXiv Detail & Related papers (2024-10-04T12:12:36Z) - NAMER: Non-Autoregressive Modeling for Handwritten Mathematical Expression Recognition [80.22784377150465]
Handwritten Mathematical Expression Recognition (HMER) has gained considerable attention in pattern recognition for its diverse applications in document understanding.
This paper makes the first attempt to build a novel bottom-up Non-AutoRegressive Modeling approach for HMER, called NAMER.
NAMER comprises a Visual Aware Tokenizer (VAT) and a Parallel Graph (PGD)
arXiv Detail & Related papers (2024-07-16T04:52:39Z) - Can Graph Learning Improve Planning in LLM-based Agents? [61.47027387839096]
Task planning in language agents is emerging as an important research topic alongside the development of large language models (LLMs)
In this paper, we explore graph learning-based methods for task planning, a direction that is to the prevalent focus on prompt design.
Our interest in graph learning stems from a theoretical discovery: the biases of attention and auto-regressive loss impede LLMs' ability to effectively navigate decision-making on graphs.
arXiv Detail & Related papers (2024-05-29T14:26:24Z) - NExT: Teaching Large Language Models to Reason about Code Execution [50.93581376646064]
Large language models (LLMs) of code are typically trained on the surface textual form of programs.
We propose NExT, a method to teach LLMs to inspect the execution traces of programs and reason about their run-time behavior.
arXiv Detail & Related papers (2024-04-23T01:46:32Z) - Towards Safe Automated Refactoring of Imperative Deep Learning Programs
to Graph Execution [4.786072763033669]
More natural, less error-prone imperative DL frameworks encouraging eager execution have emerged at the expense of run-time performance.
We present our ongoing work on an automated approach that assists developers in specifying whether and how their otherwise imperative DL code could be reliably and efficiently executed as graphs.
The approach is being implemented as a PyDev Eclipse plug-in and uses the WALA Ariadne analysis framework.
arXiv Detail & Related papers (2023-08-22T20:50:19Z) - DyCL: Dynamic Neural Network Compilation Via Program Rewriting and Graph
Optimization [8.701484095864744]
tool is a general approach that enables any existing DL compiler to successfully compile DyNNs.
tool tackles the dynamic nature of DyNNs by converting a dynamic neural network into multiple sub-neural networks.
compiled executables generated by tool exhibit significantly improved performance, running between $1.12times$ and $20.21times$ faster than the original DyNNs executed on general-purpose DL frameworks.
arXiv Detail & Related papers (2023-07-11T01:53:19Z) - Natural Language to Code Translation with Execution [82.52142893010563]
Execution result--minimum Bayes risk decoding for program selection.
We show that it improves the few-shot performance of pretrained code models on natural-language-to-code tasks.
arXiv Detail & Related papers (2022-04-25T06:06:08Z) - Challenges in Migrating Imperative Deep Learning Programs to Graph
Execution: An Empirical Study [4.415977307120617]
We conduct a data-driven analysis of challenges -- and resultant bugs -- involved in writing reliable yet performant imperative DL code.
We put forth several recommendations, best practices, and anti-patterns for effectively hybridizing imperative DL code.
arXiv Detail & Related papers (2022-01-24T21:12:38Z) - High-performance symbolic-numerics via multiple dispatch [52.77024349608834]
Symbolics.jl is an extendable symbolic system which uses dynamic multiple dispatch to change behavior depending on the domain needs.
We show that by formalizing a generic API on actions independent of implementation, we can retroactively add optimized data structures to our system.
We demonstrate the ability to swap between classical term-rewriting simplifiers and e-graph-based term-rewriting simplifiers.
arXiv Detail & Related papers (2021-05-09T14:22:43Z) - GRAPHSPY: Fused Program Semantic-Level Embedding via Graph Neural
Networks for Dead Store Detection [4.82596017481926]
We propose a learning-grained approach to identify unnecessary memory operations intelligently with low overhead.
By applying several prevalent graph neural network models to extract program semantics, we present a novel, hybrid program embedding approach.
Results show that our model achieves 90% of accuracy and incurs only around a half of time overhead of the state-of-art tool.
arXiv Detail & Related papers (2020-11-18T19:17:15Z) - Learning to Execute Programs with Instruction Pointer Attention Graph
Neural Networks [55.98291376393561]
Graph neural networks (GNNs) have emerged as a powerful tool for learning software engineering tasks.
Recurrent neural networks (RNNs) are well-suited to long sequential chains of reasoning, but they do not naturally incorporate program structure.
We introduce a novel GNN architecture, the Instruction Pointer Attention Graph Neural Networks (IPA-GNN), which improves systematic generalization on the task of learning to execute programs.
arXiv Detail & Related papers (2020-10-23T19:12:30Z)
This list is automatically generated from the titles and abstracts of the papers in this site.
This site does not guarantee the quality of this site (including all information) and is not responsible for any consequences.