In-Band Neural Network Debugging via Inference API

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for profiling and debugging neural networks executed on remote servers introduce complexity due to out-of-band data collection, which complicates correlation with the original neural network graph and requires additional APIs, leading to inconsistent execution paths.

Innovation Solution

In-band annotation of profiling and debugging data using indicators within the inference request message allows for metadata collection and annotation back into the original neural network graph, utilizing the same API path for request and response, ensuring consistent execution and easy correlation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If out-of-band data collection is used for profiling and debugging neural networks on remote servers, then debugging and profiling functionality is provided, but system complexity increases and execution paths become inconsistent

Engineering Contradiction:
Improvedebugging and profiling functionalityVSAvoidsystem complexity
Core Design Contradiction:
Ease of operationVSDevice complexity

Solution Approach 1:

The patent combines profiling and debugging data collection with the existing inference request-response workflow. Indicators are embedded within the inference request message, and metadata is returned within the inference response message, merging previously separate out-of-band operations into the standard inference path. This eliminates the need for separate data collection mechanisms while maintaining full debugging and profiling functionality.

Inventive Principle:
Principle #5Merging (Combining)

2Loss of information

If out-of-band data collection is used, then profiling and debugging data can be gathered, but correlation with the original neural network graph becomes complicated

Engineering Contradiction:
Improvedata correlation capabilityVSAvoidcorrelation complexity
Core Design Contradiction:
Loss of informationVSDevice complexity

Solution Approach 1:

The patent implements feedback by annotating the neural network graph with profiling and debugging metadata collected during inference execution. The metadata includes execution times, resource usage, and intermediate results that are directly correlated with specific graph nodes and edges. This feedback loop allows automatic correlation between the original graph structure and the collected performance data without requiring complex external processing.

Inventive Principle:
Principle #23Feedback

3Adaptability or versatility

If additional APIs are introduced for data collection, then profiling and debugging capabilities are enhanced, but the execution path consistency deteriorates

Engineering Contradiction:
Improveprofiling and debugging capabilitiesVSAvoidexecution path consistency
Core Design Contradiction:
Adaptability or versatilityVSStability of the object's composition

Solution Approach 1:

The patent makes the existing inference API multi-functional by adding indicator parameters to the inference request message and metadata fields to the inference response message. The same API endpoint handles both the original inference function and the additional profiling/debugging data collection. Indicators such as debug mode flags, profiling granularity levels, and specific measurement requests are embedded within the standard inference protocol, allowing a single API to serve multiple purposes without creating separate execution paths.

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

Data Source

PatentUS11531578B1Profiling and debugging for remote neural network execution
Publication Date: 2022.12.20 AMAZON TECH INC
  • US11531578B1 patent drawing
  • US11531578B1 patent drawing
  • US11531578B1 patent drawing

AI summary

Remote access for debugging or profiling a remotely executing neural network graph can be performed by a client using an in-band application programming interface (API). The client can provide indicator flags for debugging or profiling in an inference request sent to a remote server computer executing the neural network graph using the API. The remote server computer can collect metadata for debugging or profiling during the inference operation using the neural network graph and send it back to the client using the same API. Additionally, the metadata can be collected at various granularity levels also specified in the inference request.