Graph-Based API for Recurrent Neural Network Definition
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing application programming interfaces (APIs) for implementing recurrent neural networks (RNNs) are complex and result in inefficient code, making them in need of improvement.
Innovation Solution
A graph-based API is introduced that allows for the definition and execution of RNNs by utilizing functions for creating graphs, adding tensors and operations, and associating recurrence attributes with graphs, which simplifies the process and optimizes execution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If traditional APIs are used to implement recurrent neural networks, then the implementation is possible, but the code becomes complex and inefficient
Solution Approach 1:
The patent introduces a graph-based intermediate representation layer between the traditional API and the RNN execution. This graph structure serves as a mediator that automatically manages the complex tensor operations and iteration logic, allowing users to work with a simplified API while the graph handles the computational complexity internally through node and edge definitions.
Solution Approach 2:
The patent replaces manual code-based RNN implementation with an automated graph execution system. Instead of writing explicit loops and tensor management code, the system compiles the RNN definition into a graph that is automatically executed, substituting manual mechanical coding with automated graph-based computation management.
2Ease of operation
If manual code is written to manage tensor access and iteration in RNNs, then fine-grained control is achieved, but the code becomes inefficient and complex
Solution Approach 1:
The patent requires users to define the RNN computation graph in advance before execution, specifying all tensor operations, data flows, and iteration logic upfront. This preliminary definition is then compiled into an optimized execution plan, allowing the system to prepare and optimize the computation path before actual runtime, improving execution efficiency while maintaining ease of definition.
Solution Approach 2:
The patent creates a dynamic execution engine that adapts the pre-defined graph to runtime conditions. The system automatically manages tensor allocation, memory optimization, and iteration control based on the graph structure, providing both ease of definition through static graph specification and execution efficiency through dynamic runtime optimization.
Data Source
AI summary
Apparatuses, systems, and techniques to implement a recurrent neural network. In at least one embodiment, an application programming interface receives one or more API calls comprising a graph definition and a recurrence attribute, and executes a recurrent neural network based on the graph definition.


