Integer Scaling of Quantized Integers via Bit-Shifting

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Conventional quantization methods for artificial neural networks (ANNs) are computationally intensive due to expensive floating-point multiplication operations required for scaling quantized integers, which increases the cost and complexity of quantization, limiting their efficient implementation on computing hardware with fewer resources.

Innovation Solution

The method converts expensive floating-point operations into efficient bit-wise and integer arithmetic operations by shifting and scaling binary representations of input values using pre- and post-scaling adjustment values, eliminating the need for floating-point multiplication and enabling efficient scaling of quantized integers.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If conventional floating-point multiplication operations are used for scaling quantized integers, then accurate scaling can be achieved, but computational cost and complexity increase significantly

Engineering Contradiction:
Improvescaling accuracyVSAvoidcomputational complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent replaces floating-point multiplication operations with a combination of bit-shifting and integer multiplication operations. Specifically, the scaling operation is decomposed into: (1) right-shifting the input quantized integer by a pre-scaling adjustment value, (2) multiplying by an integer scaling factor, and (3) right-shifting the result by a post-scaling adjustment value. This substitution eliminates the need for computationally expensive floating-point multiplication while maintaining scaling accuracy through careful selection of shift values and integer factors.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent transforms the scaling operation by changing the parameter representation from floating-point to integer domain. The floating-point scaling factor is converted into an integer scaling factor combined with bit-shift adjustments. This parameter transformation allows the system to perform scaling using efficient integer arithmetic and bit-manipulation operations instead of floating-point multiplication, reducing computational complexity while preserving the mathematical equivalence of the scaling operation.

Inventive Principle:
Principle #35Parameter changes

2Measurement precision

If floating-point multiplication operations are used for scaling, then accurate quantization can be achieved, but processing time and computational resources increase

Engineering Contradiction:
Improvequantization accuracyVSAvoidprocessing speed
Core Design Contradiction:
Measurement precisionVSProductivity

Solution Approach 1:

The patent substitutes floating-point multiplication with faster integer multiplication and bit-shifting operations. The bit-shifting operations (right-shifts by pre and post scaling adjustment values) are executed in constant time on most hardware architectures, and integer multiplication is significantly faster than floating-point multiplication. This substitution maintains quantization accuracy while dramatically improving processing speed and reducing computational resource requirements.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent performs preliminary decomposition of the floating-point scaling factor into an integer scaling factor and bit-shift adjustment values before the actual scaling operation. The pre-scaling adjustment value and post-scaling adjustment value are pre-computed to optimize the subsequent integer multiplication and shifting operations. This preliminary preparation enables the system to execute the scaling operation efficiently using fast integer arithmetic instead of slower floating-point operations.

Inventive Principle:
Principle #10Preliminary action

3Measurement precision

If conventional quantization methods are used, then accurate scaling can be achieved, but the cost and complexity of quantization increase

Engineering Contradiction:
Improvescaling accuracyVSAvoidimplementation cost
Core Design Contradiction:
Measurement precisionVSEase of manufacture

Solution Approach 1:

The patent replaces expensive floating-point multiplication hardware requirements with simpler integer multiplication and bit-shifting circuitry. This substitution reduces the manufacturing cost of quantization systems, as integer arithmetic units and bit-manipulation logic are less expensive to implement than floating-point arithmetic units. The method maintains scaling accuracy while lowering the hardware cost barrier for implementing quantization in resource-constrained environments.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Data Source

PatentUS11023240B1Systems and methods for efficient scaling of quantized integers
Publication Date: 2021.06.01 META PLATFORMS INC
  • US11023240B1 patent drawing
  • US11023240B1 patent drawing
  • US11023240B1 patent drawing

AI summary

The disclosed computer-implemented method may include receiving an input value and a floating-point scaling factor and determining (1) an integer scaling factor based on the floating-point scaling factor, (2) a pre-scaling adjustment value representative of a number of places by which to shift a binary representation of the input value prior to a scaling operation, and (3) a post-scaling adjustment value representative of a number of places by which to shift the binary representation of the input value following the scaling operation. The method may further include calculating a scaled result value by (1) shifting rightwards the binary representation of the input value by the pre-scaling adjustment value, (2) scaling the shifted binary representation of the input value by the integer scaling factor, and (3) shifting rightwards the shifted and scaled binary value by the post-scaling adjustment value. Various other methods, systems, and computer-readable media are also disclosed.