1 of 29

Contact: hanqiu.chen@ece.gatech.edu

ECE, Georgia Institute of Technology

Rapid-INR: Storage Efficient CPU-free DNN Training Using Implicit Neural Representation

Hanqiu Chen, Hang Yang§, Stephen Fitzmeyer§ and Cong (Callie) Hao

(§Equal contribution)

Sharc Lab

2 of 29

Challenges in Computer Vision Task Training

2

Large data communication overhead and unsaturated computing resource

Training dataset is getting larger

(Hennessy, John L., and David A. Patterson. Computer architecture: a quantitative approach)

Storage Explosion

Memory Wall

3 of 29

Challenges in Computer Vision Task Training

3

Storage Explosion

Memory Wall

Implicit neural representation!

  • A powerful tool to compress image datasets so that
    • Achieves storage efficiency
    • Alleviates memory wall

How to reduce training dataset storage and thus alleviate memory wall?

4 of 29

Implicit Neural Representation (INR)

4

RGB image

Neural Network for INR

 

 

 

 

 

 

 

Inputs to the INR NN: pixel coordinates

Outputs: rgb values

5 of 29

Implicit Neural Representation (INR)

5

RGB image

Neural Network for INR

 

 

 

 

 

 

 

Inputs to the INR NN: pixel coordinates

Outputs: rgb values

Why is INR beneficial for training?

6 of 29

INR Benefits Training Because…

6

Training dataset in JPEG format (e.g., ImageNet)

Training dataset in RGB format

Dedicated decoding

(CPU/GPU)

Many rounds of data movement to GPU

7 of 29

INR Benefits Training Because…

7

Training dataset in JPEG format (e.g., ImageNet)

Training dataset in RGB format

Dedicated decoding

(CPU/GPU)

Many rounds of data movement to GPU

Single round to GPU

Easy Decoding!

Training dataset in INR format (i.e., NN model weights)

ImageNet can be compressed from 138GB to 14GB

138GB

~2TB

14GB

8 of 29

INR Benefits Training Because…

8

Training dataset in JPEG format (e.g., ImageNet)

Training dataset in RGB format

Dedicated decoding

(CPU/GPU)

Many rounds of data movement to GPU

Single round to GPU

Easy Decoding!

Training dataset in INR format (i.e., NN model weights)

138GB

~2TB

14GB

Compact and general

Storage efficient

Continuous and smooth

9 of 29

Previous Works and Motivations

9

INR models

Advantages

Limitations

COIN[1]

The pioneer work using INR for image encoding

Cannot beat JPEG if high reconstruction quality is needed

COIN++[2]

Use meta-learning to improve reconstruction quality

3x slower decoding speed compared with COIN

[1] Dupont, Emilien, Adam Goliński, Milad Alizadeh, Yee Whye Teh, and Arnaud Doucet. "Coin: Compression with implicit neural representations." arXiv:2103.03123 (2021).

[2] Dupont, Emilien, Hrushikesh Loya, Milad Alizadeh, Adam Goliński, Yee Whye Teh, and Arnaud Doucet. "COIN++: Neural compression across modalities." arXiv:2201.12904 (2022).

10 of 29

Previous Works and Motivations

10

INR models

Advantages

Limitations

COIN[1]

The pioneer work using INR for image encoding

Cannot beat JPEG if high reconstruction quality is needed

COIN++[2]

Use meta-learning to improve reconstruction quality

3x slower decoding speed compared with COIN

[1] Dupont, Emilien, Adam Goliński, Milad Alizadeh, Yee Whye Teh, and Arnaud Doucet. "Coin: Compression with implicit neural representations." arXiv:2103.03123 (2021).

[2] Dupont, Emilien, Hrushikesh Loya, Milad Alizadeh, Adam Goliński, Yee Whye Teh, and Arnaud Doucet. "COIN++: Neural compression across modalities." arXiv:2201.12904 (2022).

Our Rapid-INR

Can beat JPEG in terms of both storage efficiency and reconstruction quality

Can achieve high decoding speed which is naturally suitable for GPUs

11 of 29

Rapid-INR v.s. Other Pipelines

11

NVIDIA DALI: https://docs.nvidia.com/deeplearning/dali/user-guide/docs/pipeline.html

PyTorch

RGB

Disk

Many batches repeatedly

One batch

DALI

Disk

Decoding… (slow)

Decoding… (faster)

RGB

Rapid-INR

Disk

Decoding… (fastest!)

RGB

INR

Copy once

No CPU!

12 of 29

Contributions

12

CPU-free training with exceptional speedup.

Rapid-INR

High decoding parallelism without specialized hardware

Optimized compression method for efficient storage.

Ease of use with high generality.

Up to 6x speedup compared with PyTorch training framework baseline.

Achieve pixel-level parallelism on general GPUs.

Dynamic pruning and layer-wise quantization for INR weights helps reduce 95% storage space.

Spatial resolution agnostic decoding allows for flexible and easy integration with mainstream CV training pipelines.

INR image compression

Training acceleration

13 of 29

Rapid-INR Key Techniques

13

1

Offline INR encoder for image compression: dataset only needed to be encoded once, then can be applied to multiple tasks.

2

Highly parallelized and low latency on-device INR decoder without specialized hardware.

3

Dynamic pruning based on reconstructed image quality.

Layer-wise quantization based on INR weights distribution of different layers. We quantize the hidden layers to 8 bits.

4

5

Design space exploration for optimized INR architectures.

14 of 29

Rapid-INR Key Techniques

14

1

Offline INR encoder for image compression: dataset only needed to be encoded once, then can be applied to multiple tasks.

2

Highly parallelized and low latency on-device INR decoder without specialized hardware.

3

Dynamic pruning based on reconstructed image quality.

Layer-wise quantization based on INR weights distribution of different layers. We quantize the hidden layers to 8 bits.

4

5

Design space exploration for optimized INR architectures.

15 of 29

Rapid-INR Encoding Architecture

15

RGB images

Disk

Weights encoded

Each image encoded with different MLPs

Offline encoding: Datasets only need to be encoded once, then can be reusable for different tasks.

Flexible INR size: The size of INR changes with the input image size to achieve a balance between storage efficiency and reconstruction quality.

16 of 29

Rapid-INR Decoding Architecture

16

Disk

Copy once!

CUDA memory

RGB image buffer

INR decoding

Data transferring before training starts

Pixel-level parallelism

Accelerated augmentation

Images are decoded batch by batch during backbone training

Backbone training

Specialized hardware General GPUs

17 of 29

Rapid-INR Key Techniques

17

1

Offline INR encoder for image compression: dataset only needed to be encoded once, then can be applied to multiple tasks.

2

Highly parallelized and low latency on-device INR decoder without specialized hardware.

3

Dynamic pruning based on reconstructed image quality.

Layer-wise quantization based on INR weights distribution of different layers. We quantize the hidden layers to 8 bits.

4

5

Design space exploration for optimized INR architectures.

18 of 29

Dynamic Pruning

18

Dynamic pruning: Different pruning ratios for images with different reconstruction quality (PSNR).

Different color richness and variety

Low PSNR images

Different PSNR

Reduce backbone training accuracy

Larger INR

Higher PSNR

Three empirical observations

19 of 29

Pruning Ratio Selection

  •  

19

 

Close to linear relationship

Findings

When pruning ratio increases from 0.1 ~ 0.8, the PSNR decreases linearly.

20 of 29

Pruning and Quantization Evaluation

20

21 of 29

Pruning and Quantization Evaluation

21

JPEG quality and size

22 of 29

Pruning and Quantization Evaluation

22

JPEG quality and size

Rapid-INR quality and size with quantization and pruning

23 of 29

Pruning and Quantization Evaluation

23

JPEG quality and size

Rapid-INR quality and size with quantization and pruning

  • Dynamic pruning can improve the PSNR under same storage consumption

  • Rapid-INR can beat JPEG baseline in terms of storage efficiency when quantizing the weights to 8 bits

24 of 29

Rapid-INR Key Techniques

24

1

Offline INR encoder for image compression: dataset only needed to be encoded once, then can be applied to multiple tasks.

2

Highly parallelized and low latency on-device INR decoder without specialized hardware.

3

Dynamic pruning based on reconstructed image quality.

Layer-wise quantization based on INR weights distribution of different layers. We quantize the hidden layers to 8 bits.

4

5

Design space exploration for optimized INR architectures.

25 of 29

Neural Architecture Search

25

We use less than 10 layers MLPs with uniformed structure (same hidden layers dimension)

……

 

 

 

 

 

Hidden layers with same dimension

uniformed structure

Uniformed structure MLP

26 of 29

Image Reconstruction Quality

26

highest quality

27 of 29

Backbone Training Accuracy

27

  • INR with dynamic pruning and 8-bit layer-wise quantization outperforms both JPEG compression techniques in terms of backbone training accuracy in image classification tasks.

14.1%

0.3%

2.5%

6.2%

3.4%

4%

28 of 29

Backbone Training Speedup

28

Backbone training time comparison across different pipelines and datasets using different numbers of CPU threads for preprocessing.

1.95x

6x

4.4x

1.2x

29 of 29

Summary & Thanks

29

Contact: hchen799@gatech.edu Sharc-lab @ Georgia Tech (https://sharclab.ece.gatech.e du/)

  • Implicit Neural Representation (INR) achieves storage efficiency and alleviate memory wall during training
  • Rapid-INR encoding-decoding architecture
    • Dynamic pruning and layer-wise quantization
    • Neural architecture search and hyperparameter tuning
  • Achieves high image reconstruction quality and accelerates training

Thank Xuebin Yao and Pradeep Subedi from Samsung for their insightful discussions!