Dynamic Gradient Calibration for CIM Neural Networks

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Computation-in-Memory (CIM) neural networks face accuracy reduction due to partial sum outputs from memory units not being full precision, leading to calculation errors in deep CNN accelerators, which affects the prediction accuracy of AI chips.

Innovation Solution

A dynamic gradient calibration method that includes a forward operating step with bit-wise multiply-accumulate, clamping, and comparing steps, and a backward operating step with partial differential operations to update weights, reducing power consumption without compromising accuracy.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If full precision is used for partial sum outputs in CIM hardware, then calculation accuracy is improved, but power consumption increases

Engineering Contradiction:
Improvecalculation accuracyVSAvoidpower consumption
Core Design Contradiction:
Measurement precisionVSUse of energy by moving object

Solution Approach 1:

The patent implements dynamic gradient calibration that adapts the precision of partial sum outputs based on the specific computational context and requirements of different neural network layers. The system dynamically adjusts the number of bits used for representing partial sums, transitioning between higher precision when accuracy is critical and lower precision when power savings are prioritized, thereby resolving the contradiction between calculation accuracy and power consumption

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The patent changes the parameter of precision (number of bits) for partial sum outputs from a fixed value to a dynamically adjustable parameter. By modifying this parameter based on calibration results and operational conditions, the system can optimize the balance between calculation accuracy and power consumption for different computational scenarios

Inventive Principle:
Principle #35Parameter changes

2Use of energy by moving object

If lower precision is used for partial sum outputs to reduce power consumption, then power consumption is reduced, but calculation accuracy deteriorates

Engineering Contradiction:
Improvepower consumptionVSAvoidcalculation accuracy
Core Design Contradiction:
Use of energy by moving objectVSMeasurement precision

Solution Approach 1:

The patent implements a feedback mechanism through gradient calibration that monitors the impact of reduced precision on calculation accuracy. The system uses calibration data and gradient information to detect when precision reduction begins to significantly degrade performance, then adjusts the precision level accordingly, creating a closed-loop control that maintains acceptable accuracy while minimizing power consumption

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS11763162B2Dynamic gradient calibration method for computing-in-memory neural network and system thereof
Publication Date: 2023.09.19 NATIONAL TSING HUA UNIVERSITY
  • US11763162B2 patent drawing
  • US11763162B2 patent drawing
  • US11763162B2 patent drawing

AI summary

A dynamic gradient calibration method for a computing-in-memory neural network is performed to update a plurality of weights in a computing-in-memory circuit according to a plurality of inputs corresponding to a correct answer. A forward operating step includes performing a bit wise multiply-accumulate operation on a plurality of divided inputs and a plurality of divided weights to generate a plurality of multiply-accumulate values, and performing a clamping function on the multiply-accumulate values to generate a plurality of clamped multiply-accumulate values according to a predetermined upper bound value, and comparing the clamped multiply-accumulate values with the correct answer to generate a plurality of loss values. A backward operating step includes performing a partial differential operation on the loss values relative to the weights to generate a weight-based gradient. The weights are updated according to the weight-based gradient.