IP Library Granted Patent US 12699892
Granted Patent B2
US 12699892 · App. 17/088,771 · Granted Aug 4, 2026

Neural network method and apparatus

Inventors: Yousun Ko (Cambridge, GB); Alex Chadwick (Cambridge, GB); Robert Mullins (Cambridge, GB); Daniel Bates (Cambridge, GB)
Assignees: Samsung Electronics Co., Ltd.; CAMBRIDGE ENTERPRISE LIMITED
G06N3/08G06N3/04
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 12699892
App. No.
17/088,771
Granted
Aug 4, 2026
Kind
B2
Abstract

A method and apparatus for processing data of a neural network. The method includes: obtaining one or more bit representations of data used for processing a neural network; generating a plurality of candidate profiles based on the bit representations; determining a final profile by comparing compression performances for each of the candidate profiles; and determining an optimal configuration for compressing data of the neural network based on the determined final profile.

Claims (66)

1 . A method of processing data of a neural network, comprising:

obtaining one or more bit representations of data;

generating a plurality of candidate profiles, each candidate profile including information of splitting methods and information of compression techniques including compression pipeline configuration, wherein the one or more of the bit representations are to be split, using the splitting methods, into one or more lanes, respectively, and the compression pipeline configuration including a lossy transform stage and a lossless compression stage is applied to each of the lanes;

determining a compression performance for each of the plurality of candidate profiles, wherein the compression performance comprises:

calculating, for each candidate profile, a composite compression rate defined as a product of a compression rate of the lossy transform stage and a compression rate of the lossless compression stage;

determining a time complexity of each candidate profile; and

determining a size of a required memory space of each candidate profile;

determining, by comparing a respective result of the compression performance of each of the candidate profiles, a final profile from among the plurality of candidate profiles, wherein the final profile is a candidate profile having the greatest compression rate among the calculated compression rates among the plurality of candidate profiles;

determining, from the determined final profile, splitting methods and compression techniques for one or more lanes as an optimal configuration for compressing data of the neural network, including skipping compression of a lane including a least significant bit (LSB) dependent on the determined final profile, and

compressing the data of the neural network according to the determined optimal configuration by splitting the bit representations into the one or more lanes and compressing each lane using the compression techniques defined by the optimal configuration,

wherein the candidate profiles comprise profiles to which the splitting methods, in which the number of lanes for dividing the bit representations into a plurality of bit segments and bit widths of the bit segments corresponding to each of the lanes are differently set from each other, are applied.

2 . The method of claim 1 , wherein generating the plurality of candidate profiles comprises:

generating the candidate profiles by differently applying at least one of the splitting methods for splitting the bit representations into the one or more lanes and the compression techniques.

3 . The method of claim 2 , wherein the candidate profiles comprise profiles having sparsity distributions of the lanes different from each other according to the number and bit width of the lanes.

4 . The method of claim 2 , wherein the candidate profiles comprise profiles to which compression techniques different from each other are applied for each of the lanes.

5 . The method of claim 1 , wherein the candidate profiles comprise profiles to which compression techniques having algorithmic parameters different from each other are applied.

6 . The method of claim 1 , wherein the data of the neural network comprise at least one of activations, weights, and gradients of the neural network.

7 . The method of claim 1 , wherein the candidate profiles comprise a profile to which a compression technique that does not compress the lane including the least significant bit (LSB) among the lanes is applied.

8 . A computer-readable non-transitory recording medium recording a program for executing the method of claim 1 on a computer.

9 . An apparatus for processing data of a neural network, comprising:

a memory configured to store at least one program; and

a processor configured to compress the data by executing the at least one program, wherein

the processor:

obtains one or more bit representations of data used for processing the neural network;

generates a plurality of candidate profiles, each candidate profile including information of splitting methods and information of compression techniques including compression pipeline configuration, wherein the one or more of the bit representations are to be split, using the splitting methods, into one or more lanes, respectively, and the compression pipeline configuration, including a lossy transform stage and a lossless compression stage, is applied to each of the lanes;

determines a compression performance for each of the plurality of candidate profiles, wherein the compression performance comprises:

calculating, for each candidate profile, a composite compression rate defined as a product of a compression rate of the lossy transform stage and a compression rate of the lossless compression stage;

determining a time complexity of each candidate profile; and

determining a size of a required memory space of each candidate profile;

determines, by comparing a respective result of the compression performance of each of the candidate profiles, a final profile from among the plurality of candidate profiles, wherein the final profile is a candidate profile having the greatest compression rate among the calculated compression rates;

determines, from the determined final profile, splitting methods and compression techniques for one or more lanes as an optimal configuration for compressing data of the neural network, including skipping compression of a lane including a least significant bit (LSB) dependent on the determined final profile; and

compresses the data of the neural network according to the determined optimal configuration by splitting the one or more bit representations into the one or more lanes and compressing each lane using the compression techniques defined by the optimal configuration,

wherein the processor generates the splitting methods in which the number of lanes for dividing the bit representations into a plurality of bit segments and bit widths of the bit segments corresponding to each of the lanes are differently set from each other, are applied.

10 . The apparatus of claim 9 , wherein the processor generates the candidate profiles by differently applying at least one of the splitting methods for splitting the bit representations into the one or more lanes and the compression techniques.

11 . An apparatus for processing data of a neural network comprising:

one or more processors including:

a splitter configured to obtain an optimal configuration predetermined by a final profile in which compression techniques set for each lane are defined by splitting, using a splitting method included in the final profile, the data of the neural network into one or more lanes, to obtain bit representations of data used for processing the neural network, and to split the bit representations into the one or more lanes by using a splitting method of the optimal configuration,

wherein the final profile is determined from among a plurality of candidate profiles based on a compression performance for each of the candidate profiles,

wherein the compression performance comprises:

a composite compression rate defined as a product of a compression rate of a lossy transform stage and a compression rate of a lossless compression stage of a compression pipeline configuration;

a time complexity of each candidate profile; and

a size of a required memory space of each candidate profile,

wherein the final profile is a candidate profile having the greatest compression rate among the compression rates, and

wherein the compression techniques include the compression pipeline configuration including the lossy transform stage and the lossless compression stage;

a plurality of compressors configured to compress the data of the neural network by compressing each of the split lanes using the compression techniques defined by the optimal configuration and output the compressed lanes, including skipping compression of a lane including a least significant bit (LSB) dependent on the optimal configuration predetermined by the final profile; and

a concatenator configured to concatenate the compressed lanes and output compressed bit representations,

wherein the candidate profiles comprise profiles to which the splitting methods, in which the number of lanes for dividing the bit representations into a plurality of bit segments and bit widths of the bit segments corresponding to each of the lanes are differently set from each other, are applied.

12 . The apparatus of claim 11 , wherein the plurality of compressors is configured to compress the split lanes using a compression technique applied to each lane in the optimal configuration in each compressor.

13 . The apparatus of claim 11 , wherein the concatenator is configured to insert a stop code for synchronizing the compressed lanes output from the plurality of compressors.

14 . The apparatus of claim 13 , wherein the concatenator is configured to check whether the stop code is inserted, and to insert a bit value indicating whether the stop code is inserted according to the check result.

15 . An apparatus for processing data of a neural network comprising:

one or more processors including:

a splitter configured to obtain an optimal configuration predetermined by a final profile in which compression techniques set for each lane are defined by splitting, using a splitting method included in the final profile, the data of the neural network into one or more lanes, obtain compressed bit representations of compressed data of the neural network including skipping compression of a lane including a least significant bit (LSB) dependent on the optimal configuration predetermined by the final profile, and split the compressed bit representations into one or more compressed lanes based on a splitting method of the optimal configuration,

wherein the final profile is determined from among a plurality of candidate profiles based on a compression performance for each of the candidate profiles,

wherein the compression performance comprises:

a composite compression rate defined as a product of a compression rate of a lossy transform stage and a compression rate of a lossless compression stage of a compression pipeline configuration;

a time complexity of each candidate profile; and

a size of a required memory space of each candidate profile,

wherein the final profile is a candidate profile having the greatest compression rate among the compression rates, and

wherein the compression techniques include the compression pipeline configuration including the lossy transform stage and the lossless compression stage;

a plurality of decompressors configured to decompress the data of the neural network by decompressing each of the split compressed lanes based on the optimal configuration and output the decompressed lanes;

a concatenator configured to concatenate the decompressed lanes and output the decompressed bit representations,

wherein the candidate profiles comprise profiles to which the splitting methods, in which the number of lanes for dividing the bit representations into a plurality of bit segments and bit widths of the bit segments corresponding to each of the lanes are differently set from each other, are applied.

16 . The apparatus of claim 15 , wherein the splitter is configured to predict bit widths of the compressed lanes constituting each of the compressed bit representations based on the optimal configuration, and to split the compressed bit representations into one or more compressed lanes based on the predicted bit widths.

17 . The apparatus of claim 16 , wherein the splitter is configured to check a stop code included in the compressed bit representations.

18 . The apparatus of claim 17 , wherein the splitter is configured to check a bit value indicating whether the stop code is inserted, and to delete the stop code according to a check result.