Skip to main content
QUICK REVIEW

[논문 리뷰] Discovering Low-Precision Networks Close to Full-Precision Networks for Efficient Embedded Inference

Jeffrey L. McKinstry, Steven K. Esser|arXiv (Cornell University)|2018. 09. 11.
Advanced Neural Network Applications참고 문헌 28인용 수 46
한 줄 요약

이 논문은 활성화 범위 보정, 4비트의 경우 더 긴 훈련, 노이즈 인식 SGD 기법으로 사전 학습된 모델을 미세 조정하여 8비트 및 4비트 양자화 네트워크(가중치와 활성화)가 FP32 ImageNet 벤치마크에 필수적으로 근접하거나 이를 상회함을 보여준다.

ABSTRACT

To realize the promise of ubiquitous embedded deep network inference, it is essential to seek limits of energy and area efficiency. To this end, low-precision networks offer tremendous promise because both energy and area scale down quadratically with the reduction in precision. Here we demonstrate ResNet-18, -34, -50, -152, Inception-v3, Densenet-161, and VGG-16bn networks on the ImageNet classification benchmark that, at 8-bit precision exceed the accuracy of the full-precision baseline networks after one epoch of finetuning, thereby leveraging the availability of pretrained models. We also demonstrate ResNet-18, -34, -50, -152, Densenet-161, and VGG-16bn 4-bit models that match the accuracy of the full-precision baseline networks -- the highest scores to date. Surprisingly, the weights of the low-precision networks are very close (in cosine similarity) to the weights of the corresponding baseline networks, making training from scratch unnecessary. We find that gradient noise due to quantization during training increases with reduced precision, and seek ways to overcome this noise. The number of iterations required by SGD to achieve a given training error is related to the square of (a) the distance of the initial solution from the final plus (b) the maximum variance of the gradient estimates. Therefore, we (a) reduce solution distance by starting with pretrained fp32 precision baseline networks and fine-tuning, and (b) combat gradient noise introduced by quantization by training longer and reducing learning rates. Sensitivity analysis indicates that these simple techniques, coupled with proper activation function range calibration to take full advantage of the limited precision, are sufficient to discover low-precision networks, if they exist, close to fp32 precision baseline networks. The results herein provide evidence that 4-bits suffice for classification.

연구 동기 및 목표

  • 저전력 및 면적 효율이 높은 임베디드 추론을 저정밀 네트워크를 통해 촉진한다.
  • 8비트 네트워크가 최소한의 미세조정 후 FP32 벤치마스를 능가할 수 있음을 보여준다.
  • 4비트 네트워크가 여러 아키텍처에서 FP32 벤치마스에 맞먹을 수 있음을 보여준다.
  • 양자화 후에도 프리트레이닝된 고정밀 가중치가 저정밀 대응물에 가까운 상태를 유지한다는 근거를 제공한다.
  • 양자화로 인한 그래디언트 노이즈를 분석하고 미세조정과 보정을 통해 완화 전략을 제안한다.

제안 방법

  • 가중치와 활성화에 대해 사전 학습된 FP32 네트워크를 8비트 및 4비트 고정소수점 표현으로 양자화한다.
  • 가볍게 구성된 전방 패스를 통해 각 계층의 활성화 범위를 양자화되지 않은 모델로 보정한다.
  • 사전 학습된 가중치에서 시작하여 양자화된 네트워크를 미세조정한다(FAQ: Fine-tuning After Quantization).
  • 가중치/활성화에 대해 계층별 l 보정과 8/4비트 제약을 갖는 고정소수점 양자화기 Q_{b,l}를 사용한다.
  • 훈련 중 양자화 단계를 역전파하는 데 직관적 스루 추정기(straight-through estimator)를 적용한다.
  • 4비트 네트워크의 경우 학습률 스케줄링과 가중치 감소를 조정하고 그래디언트 노이즈를 감소시키기 위해 훈련을 110 에폭까지 확장한다.

실험 결과

연구 질문

  • RQ1사전 학습된 고정밀 네트워크를 8비트 또는 4비트로 양자화했을 때 미세조정을 거쳐 ImageNet에서 전체 정밀도 정확도를 매치하거나 초과할 수 있는가?
  • RQ2양자화로 인한 그래디언트 노이즈가 학습에 어떤 영향을 미치며, 더 큰 배치, 더 긴 훈련, 학습률 스케줄링과 같은 간단한 전략으로 이를 완화할 수 있는가?
  • RQ34비트 네트워크가 다수의 아키텍처에서 전체 정밀도 벤치마스와 동등한 성능을 달성하는가?
  • RQ4최종 저정밀 솔루션이 원래의 고정밀 초기화 근처에 위치하는가, 즉 처음부터 학습하는 것이 불필요하다는 것을 시사하는가?
  • RQ5FAQ 접근법이 ImageNet 외의 다른 데이터셋(CIFAR-10 등)으로 일반화되는가?

주요 결과

  • 8비트 네트워크가 여러 아키텍처에서 한 에폭의 미세조정 후 자체의 전체 정밀도 벤치마크를 능가한다.
  • 4비트 네트워크가 ResNet-18, ResNet-34, ResNet-50, ResNet-152, DenseNet-161, 및 VGG-16bn에서 전체 정밀도 벤치마크의 정확도와 일치한다.
  • 양자화는 정밀도가 낮아질수록 증가하는 그래디언트 노이즈를 유발하여 특히 4비트에서 미세조정에 영향을 준다.
  • 사전 학습된 FP32 네트워크에서 시작해 미세조정(FQA)을 수행하면 고정밀 초기화 근처의 거의 최적화된 저정밀 해를 찾는 데 도움이 된다.
  • 더 긴 미세조정(110 에폭)과 더 큰 배치 크기가 4비트 성능을 향상시키며, 보정된 활성화 범위가 중요하다(예: 첫 번째/마지막 계층은 8비트를 유지).
  • 코사인 유사도 분석은 FAQ 이후의 4비트 가중치가 초기 FP32 가중치와 매우 유사하게 남아 있음을 보여주며, 해가 고정밀 영역 근처에 위치함을 시사한다.

더 나은 연구,지금 바로 시작하세요

연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.

카드 등록 없음 · 무료 플랜 제공

이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.