AI Tensor Verification and Error Classification Across Compilers

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing methods for comparing and validating machine learning (ML) model performance across different hardware systems are inadequate, particularly for large and complex ML models, as they often rely on final output verification which may not detect underlying errors or mismatches, and do not provide insights into the causes of discrepancies.

Innovation Solution

A method is introduced to compare tensors generated by a target system with those from a reference system by calculating relative errors and order of magnitude, using ML models to classify errors and identify their causes, focusing on tensors with smaller order of magnitude to detect significant issues.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Ease of operation

If conventional final output comparison is used for verification, then verification simplicity is maintained, but measurement precision and ability to detect underlying errors deteriorates

Engineering Contradiction:
Improveverification simplicityVSAvoiderror detection capability
Core Design Contradiction:
Ease of operationVSMeasurement precision

Solution Approach 1:

The patent segments the verification process into multiple stages: intermediate tensor verification at different computation stages, layer-by-layer comparison, and final output verification. This segmentation enables detection of errors at their source rather than only at the final output, thereby improving measurement precision while maintaining operational feasibility through systematic breakdown of the verification task

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies partial verification by selectively comparing only critical tensors and intermediate results that have significant impact on final output accuracy, rather than verifying every single tensor. This approach maintains verification simplicity while improving error detection capability by focusing computational resources on the most informative comparisons

Inventive Principle:
Principle #16Partial or excessive action

2Measurement precision

If layer-by-layer tensor comparison is performed, then measurement precision and error detection capability are improved, but device complexity and computational overhead increases

Engineering Contradiction:
Improveverification accuracyVSAvoidverification system complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies local quality by differentiating verification intensity across different layers and tensor types. Critical layers with higher impact on final accuracy receive more rigorous verification, while less critical layers use simplified comparison methods. This selective approach improves overall verification accuracy without uniformly increasing system complexity across all components

Inventive Principle:
Principle #3Local quality

Solution Approach 2:

The patent changes verification parameters dynamically based on layer characteristics, tensor dimensions, and computational complexity. Verification thresholds, sampling rates, and comparison granularity are adjusted according to local requirements, enabling high precision where needed while reducing complexity in less critical areas

Inventive Principle:
Principle #35Parameter changes

3Measurement precision

If all tensor values are compared for verification, then measurement precision is improved, but loss of time and computational resources increases

Engineering Contradiction:
Improveverification completenessVSAvoidverification time
Core Design Contradiction:
Measurement precisionVSLoss of time

Solution Approach 1:

The patent implements partial verification by comparing only the most informative tensor elements rather than all values. This includes focusing on tensors with larger magnitudes, critical intermediate results, and samples strategically selected to maximize detection probability. This approach maintains high verification completeness while dramatically reducing the time and computational resources required

Inventive Principle:
Principle #16Partial or excessive action

Solution Approach 2:

The patent performs preliminary filtering and prioritization of tensors before comparison, identifying which tensors are most likely to contain errors based on their position in the computation graph, their impact on final output, and statistical properties. This preliminary action enables focused verification that achieves high measurement precision with reduced time investment

Inventive Principle:
Principle #10Preliminary action

4Productivity

If conventional verification methods are used, then productivity is maintained, but reliability and ability to identify error sources deteriorates

Engineering Contradiction:
Improveverification throughputVSAvoiderror source identification
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent implements feedback mechanisms where verification results from intermediate tensors are used to guide subsequent verification steps. When errors are detected at intermediate stages, the system provides feedback to adjust verification focus, prioritize problematic areas, and identify error sources more reliably. This feedback loop improves reliability without significantly impacting productivity through intelligent resource allocation

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS20250265140A1Method and apparatus for generating an artificial intelligence (AI) model associated with tensor data verification and classification
Publication Date: 2025.08.21 MARVELL ASIA PTE LTD
  • US20250265140A1 patent drawing
  • US20250265140A1 patent drawing
  • US20250265140A1 patent drawing

AI summary

A system includes a machine learning (ML) accelerator running a first code generated by a first compiler that generates a first plurality of tensors associated with one or more ML operations of a ML model. The system includes a processor that receives the first and the second plurality of tensors associated with the ML model. The second plurality of tensors is generated by a second code generated by a second compiler running on a hardware executing the one or more ML operations of the ML model. The processor generates a plurality of relative errors associated with the first and second plurality of tensors. The processor calculates an order of magnitude associated with the first plurality of tensors. The processor extracts features from the plurality of relative errors and the plurality of order of magnitude values and generates the error classification model based on the one or more features.