Neural Network Data Flow Optimization via Global Variable Scope

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for data transfer between subgraphs in neural network computation are inefficient, particularly for models with cycle structures, leading to suboptimal data flow and memory usage.

Innovation Solution

A data flow method for neural network computation that initializes variable lifecycles, defines propagation rules for variables in use and redefined variables, analyzes valid variables and expressions, allocates memory cell blocks, and optimizes available expressions to improve computational efficiency and reduce memory usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If frequent swapping with memory through computational nodes is used for data transfer between subgraphs, then data flow can be maintained, but computational efficiency deteriorates and memory usage increases

Engineering Contradiction:
Improvecomputational efficiencyVSAvoidmemory transfer overhead
Core Design Contradiction:
ProductivityVSLoss of energy

Solution Approach 1:

The patent merges multiple subgraphs into a unified computational graph with global variable scope. This allows variables to be shared across subgraph boundaries without frequent memory swapping, as the global variable mechanism enables direct access to variable definitions throughout the entire computation graph, thereby improving computational efficiency and reducing memory transfer overhead.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces a global variable mechanism as an intermediary between subgraphs. Instead of directly swapping data between subgraph memory spaces, the global variable acts as a mediator that coordinates data flow across subgraph boundaries, enabling efficient data sharing without the overhead of frequent memory swaps.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Productivity

If a data flow algorithm is designed for each subgraph, then local data flow can be optimized, but global data flow efficiency for cyclic structures deteriorates

Engineering Contradiction:
Improvedata flow efficiencyVSAvoidalgorithm complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent implements a universal data flow algorithm that operates at the global computational graph level rather than requiring separate algorithms for each subgraph. This global algorithm handles all data flow scenarios uniformly, including cyclic structures, by maintaining a global variable scope and lifecycle management system that works consistently across the entire computation graph.

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent segments the computational graph into subgraphs for modular organization while maintaining global variable scope. This segmentation allows the system to handle complex cyclic structures by breaking them into manageable subgraph components that can be processed independently while still benefiting from global coordination through the unified variable management mechanism.

Inventive Principle:
Principle #1Segmentation

3Adaptability or versatility

If variables are frequently redefined in computational graphs, then computation flexibility is improved, but variable lifecycle management complexity increases

Engineering Contradiction:
Improvecomputation flexibilityVSAvoidlifecycle management complexity
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

The patent implements a feedback mechanism in the form of a global variable scope system that automatically tracks and manages variable lifecycles. When a variable is redefined, the system receives feedback about the new definition and automatically adjusts the variable's scope and lifetime, eliminating the need for manual lifecycle management and reducing complexity while maintaining computation flexibility.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11941507B2Data flow method and apparatus for neural network computation by determining input variables and output variables of nodes of a computational graph of a neural network
Publication Date: 2024.03.26 ZHEJIANG LAB
  • US11941507B2 patent drawing
  • US11941507B2 patent drawing
  • US11941507B2 patent drawing

AI summary

Disclosed are a data flow method and apparatus for neural network computation. The data flow method for neural network computation includes initializing the lifecycle of a variable in a computational graph; and defining a propagation rule for a variable in use to flow through a node. A definition of the variable is produced at a precursor node of the node, such that an input set of valid variables flowing through the node contains the variable. The method may be used on neural network computation in a deep learning training system.