Skip to main content
QUICK REVIEW

[논문 리뷰] Accurate Low-Degree Polynomial Approximation of Non-polynomial Operators for Fast Private Inference in Homomorphic Encryption

Jianming Tong, Jingtian Dang|arXiv (Cornell University)|2024. 04. 04.
Cryptography and Data Security인용 수 4
한 줄 요약

이 논문은 비다항 연산자(예: ReLU, MaxPooling)를 저차수 다항근사식(PAFs)으로 대체함으로써 풀 허모모로픽 암호화(FHE)에서 정확하고 효율적인 프라이빗 추론을 가능하게 하는 SMART-PAF 프레임워크를 제안한다. 이를 위해 최적화 안정성과 정확도 저하 감소를 위해 Coefficient Tuning, Progressive Approximation, Alternate Training, Dynamic/Static Scaling의 네 가지 상호보완적인 기법을 도입하였으며, ResNet-18과 ImageNet-1k 기준으로 이전 방법 대비 최대 13.64배의 정확도 향상과 14.9배의 속도 향상을 달성하였다.

ABSTRACT

As machine learning (ML) permeates fields like healthcare, facial recognition, and blockchain, the need to protect sensitive data intensifies. Fully Homomorphic Encryption (FHE) allows inference on encrypted data, preserving the privacy of both data and the ML model. However, it slows down non-secure inference by up to five magnitudes, with a root cause of replacing non-polynomial operators (ReLU and MaxPooling) with high-degree Polynomial Approximated Function (PAF). We propose SmartPAF, a framework to replace non-polynomial operators with low-degree PAF and then recover the accuracy of PAF-approximated model through four techniques: (1) Coefficient Tuning (CT) -- adjust PAF coefficients based on the input distributions before training, (2) Progressive Approximation (PA) -- progressively replace one non-polynomial operator at a time followed by a fine-tuning, (3) Alternate Training (AT) -- alternate the training between PAFs and other linear operators in the decoupled manner, and (4) Dynamic Scale (DS) / Static Scale (SS) -- dynamically scale PAF input value within (-1, 1) in training, and fix the scale as the running max value in FHE deployment. The synergistic effect of CT, PA, AT, and DS/SS enables SmartPAF to enhance the accuracy of the various models approximated by PAFs with various low degrees under multiple datasets. For ResNet-18 under ImageNet-1k, the Pareto-frontier spotted by SmartPAF in latency-accuracy tradeoff space achieves 1.42x ~ 13.64x accuracy improvement and 6.79x ~ 14.9x speedup than prior works. Further, SmartPAF enables a 14-degree PAF (f1^2 g_1^2) to achieve 7.81x speedup compared to the 27-degree PAF obtained by minimax approximation with the same 69.4% post-replacement accuracy. Our code is available at https://github.com/EfficientFHE/SmartPAF.

연구 동기 및 목표

  • ReLU 및 MaxPooling과 같은 비다항 연산자로 인해 발생하는 FHE 기반 프라이빗 추론의 높은 지연 시간과 정확도 저하 문제를 해결한다.
  • 이전의 다항근사 방법이 고차수 다항식(예: 27차)에 의존하여 곱셈 체인 길이가 길어지고 성능이 열 劣하는 문제점을 해결한다.
  • 최적화 안정성과 정확도 유지 기반으로 저차수 PAFs(8–14차)를 사용한 모델 수렴을 가능하게 하는 새로운 학습 기법을 제공한다.
  • 최적의 지연 시간-정확도 트레이드오프를 달성하기 위해 저차수 PAFs를 체계적으로 탐색하고 최적화된 학습 전략을 적용한다.
  • 보안 다자간 계산 또는 가려진 회로를 포함하는 하이브리드 기법에 의존하지 않고, PAFs를 FHE 파이프라인에 완전히 통합함으로써 이를 제거한다.

제안 방법

  • Coefficient Tuning (CT): 학습 이전에 국소 입력 분포를 기반으로 PAF 계수를 조정하여 초기화 품질을 향상시키고 정확도 저하를 감소시킨다.
  • Progressive Approximation (PA): 비다항 연산자를 한 층씩 단계적으로 대체함으로써 SGD 기반 점진적 미세조정을 통해 안정적인 학습을 가능하게 한다.
  • Alternate Training (AT): PAF와 다른 선형 층 간의 학습을 분리하여 서로 간섭을 방지하고 수렴 성능을 향상시키기 위해 서로 다른 초모수를 사용한다.
  • Dynamic Scale (DS) 및 Static Scale (SS): 학습 중에 PAF 입력을 (−1, 1) 범위로 동적으로 스케일링하고, FHE 추론 시에는 실행 중 최대값을 고정하여 오버플로우를 방지한다.
  • SMART-PAF 프레임워크는 CT, PA, AT, DS/SS를 순차적으로 적용하고, 드롭아웃 및 SWA를 함께 활용하여 지연 시간-정확도 트레이드오프를 최적화한다.
  • 모델 및 데이터셋 간 최적의 PAF 차수와 구성 조합을 식별하기 위해 파레토 경계 탐색 전략을 활용한다.
Figure 1: SMART-PAF replaces ReLU and MaxPooling by low-degree PAFs, and achieves better accuracy-latency Pareto-frontier than prior works Lee et al. ( 2021 ; 2022 ); Cheon et al. ( 2020 ) on ResNet-18 (ImageNet-1k).
Figure 1: SMART-PAF replaces ReLU and MaxPooling by low-degree PAFs, and achieves better accuracy-latency Pareto-frontier than prior works Lee et al. ( 2021 ; 2022 ); Cheon et al. ( 2020 ) on ResNet-18 (ImageNet-1k).

실험 결과

연구 질문

  • RQ1ReLU 및 MaxPooling과 같은 비다항 연산자를 저차수 다항근사식(8–14차)으로 대체할 경우, FHE 기반 추론에서 높은 정확도를 달성할 수 있는가?
  • RQ2고차수 PAF에서 발생하는 학습 발산 문제를 어떻게 완화하여 수렴성과 정확도 유지가 가능한가?
  • RQ3선형 층과 다항근사 비선형성의 조합에서 최적화 안정성과 수렴 성능을 향상시키기 위한 학습 기법은 무엇인가?
  • RQ4다양한 모델 및 데이터셋에서 FHE 추론의 지연 시간과 정확도 간 최적의 트레이드오프를 체계적인 프레임워크로 식별할 수 있는가?
  • RQ5학습 시 동적 스케일링과 FHE 배포 시 정적 스케일링을 통해 수치 오버플로우를 효과적으로 방지하면서 정확도를 유지할 수 있는가?

주요 결과

  • SMART-PAF는 ResNet-18과 ImageNet-1k 기준으로 이전 연구 대비 최대 13.64배 높은 정확도를 달성하여 정확도-지연 시간 파레토 경계를 크게 향상시켰다.
  • 14차 PAF(f₁²∘g₁²)는 minimax 근사에서 유도된 27차 PAF 대비 7.81배의 속도 향상과 함께 69.4%의 후치 대체 정확도를 달성하였다.
  • ResNet-18과 ImageNet-1k 기준으로 SMART-PAF는 이전 방법 대비 6.79×에서 14.9×의 속도 향상과 1.42×에서 13.64×의 정확도 향상을 제공하였다.
  • Coefficient Tuning은 정밀조정 없이도 다양한 PAF 차수에서 초기 정확도를 1.04×에서 2.38×까지 향상시켰다.
  • Progressive Approximation는 표준 학습이 실패하는 저차수 PAFs(5차 이상)에 대해서도 모델 수렴을 가능하게 하였다.
  • 학습 시 동적 스케일링과 배포 시 정적 스케일링의 조합은 FHE 추론에서 오버플로우를 효과적으로 방지하고 수치 안정성을 유지하였다.
Figure 2: Overview of the FHE-base ML inference where original non-polynomial operators are replaced by Polynomial Approximated Activation (PAF).
Figure 2: Overview of the FHE-base ML inference where original non-polynomial operators are replaced by Polynomial Approximated Activation (PAF).

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

논문 읽기부터 검토까지, 연구 시간을 획기적으로 줄여보세요.

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

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