[논문 리뷰] HDCC: A Hyperdimensional Computing compiler for classification on embedded systems and high-performance computing
HDCC는 고수준 Hyperdimensional Computing 분류 작업을 최적화된 독립 실행형 C 코드로 변환하는 오픈소스 컴파일러로, 임베디드 및 HPC 환경에서 다중 스레드 및 SIMD 가속 실행을 가능하게 하며 재현 가능한 결과와 Torchhd 대비 상당한 속도 향상을 제공합니다.
Hyperdimensional Computing (HDC) is a bio-inspired computing framework that has gained increasing attention, especially as a more efficient approach to machine learning (ML). This work introduces the ame{} compiler, the first open-source compiler that translates high-level descriptions of HDC classification methods into optimized C code. The code generated by the proposed compiler has three main features for embedded systems and High-Performance Computing: (1) it is self-contained and has no library or platform dependencies; (2) it supports multithreading and single instruction multiple data (SIMD) instructions using C intrinsics; (3) it is optimized for maximum performance and minimal memory usage. ame{} is designed like a modern compiler, featuring an intuitive and descriptive input language, an intermediate representation (IR), and a retargetable backend. This makes ame{} a valuable tool for research and applications exploring HDC for classification tasks on embedded systems and High-Performance Computing. To substantiate these claims, we conducted experiments with HDCC on several of the most popular datasets in the HDC literature. The experiments were run on four different machines, including different hyperparameter configurations, and the results were compared to a popular prototyping library built on PyTorch. The results show a training and inference speedup of up to 132x, averaging 25x across all datasets and machines. Regarding memory usage, using 10240-dimensional hypervectors, the average reduction was 5x, reaching up to 14x. When considering vectors of 64 dimensions, the average reduction was 85x, with a maximum of 158x less memory utilization.
연구 동기 및 목표
- 임베디드 시스템 및 HPC에 적합한 의존성 없는 독립 실행형 C 구현의 HDC 분류 제공.
- HDC 학습 작업을 위한 현대적 컴파일러 파이프라인(토크나이저, 문법, IR, 재타깃 백엔드) 제공.
- 성능 극대화를 위해 C 인트insics를 통한 다중 스레드 및 SIMD enable 및 메모리 사용 최소화.
- 재현 가능한 실험 및 데이터를 통한 오픈 소스 가용성 보장.
제안 방법
- HDCC는 입력으로 HDC 학습 작업의 고수준 설명을 받아 인코딩, 학습, 추론 구성요소를 갖춘 HDC 학습 모델로 번역합니다.
- 컴파일러는 인코딩 및 처리에 대해 바인딩 및 번들링 연산이 포함된 MAP(Multiply-Add-Permute) 초공간을 사용합니다.
- 임베딩은 무작위일 수 있거나 레벨-초기화 가능하며 MULTIBUNDLE, NGRAM, BATCHBIND 등의 인코딩 패턴을 포함합니다; 구현은 메모리와 속도를 위한 인코딩 최적화를 수행합니다.
- 학습은 인코딩된 샘플을 번들링하여 연결 기억(associative memory)을 업데이트합니다; 추론은 코사인 유사도를 사용하여 쿼리 하이퍼벡터를 클래스 프로토타입과 비교하고, 추론 속도를 높이기 위한 학습 후 정규화를 수행합니다.
- SIMD 벡터 인트insics, POSIX 스레드를 통한 다중 스레드 지원, 스트리밍 방식으로 데이터를 읽어 들이고 인코딩으로 인한 메모리 사용을 줄이는 메모리 효율적 접근 방식이 포함됩니다.
- 백엔드는 C 코드 생성을 재타깃 가능하며, OpenCL/OpenGL 백엔드를 통해 FPGA/GPU로 확장될 수 있습니다.
실험 결과
연구 질문
- RQ1오픈 소스 컴파일러가 임베디드 시스템 제약을 가진 HDC 분류 작업에 대해 효율적이고 독립 실행형 C 코드를 생성할 수 있는가?
- RQ2HDCC가 생성한 구현은 Torchhd와 비교했을 때 다수의 데이터셋 및 하이퍼스페이스 차원에서 학습/추론 속도 및 메모리 사용에서 어떤 차이가 있는가?
- RQ3다중 스레딩과 SIMD가 HDCC 생성 HDC 분류기의 성능 및 메모리 발자국에 어떤 영향을 미치는가?
- RQ4ISOLET, EMG, 언어 인식, MNIST 등 다양한 데이터셋과 하드웨어 플랫폼으로의 접근성이 얼마나 높은가?
- RQ5결과를 재현하고 컴파일러를 다른 벡터 기호 아키텍처로 확장하는 실질적인 단계는 무엇인가?
주요 결과
- HDCC는 10240 차원의 하이퍼벡터를 사용할 때 Torchhd 대비 학습 및 추론 속도향상을 최대 132배, 데이터셋과 기계에서 평균 25배 달성.
- 메모리 사용은 평균적으로 5배 감소, 10240 차원에서 최대 14배 감소, 64차원 벡터의 경우 Torchhd 대비 평균 최대 85배 감소 및 최대 158배 감소.
- HDCC 생성 코드는 자체 포함(외부 의존성 없음)이며 낮은 메모리와 높은 처리율에 최적화되어 임베디드 CPU 및 HPC 시스템에 적합.
- Torchhd와 비교했을 때 ISOLET, EMG, 유럽 언어, MNIST 데이터셋에서 유사한 정확도를 보이는 반면 속도와 메모리 이점이 큼.
- 실험은 Apple M2 및 Intel Xeon 플랫폼을 포함한 네 대의 기계에서 다수의 차원 설정(64–10240)을 사용해 수행되어 하드웨어에 대한 강건성을 보여줌.
더 나은 연구,지금 바로 시작하세요
연구 설계부터 논문 작성까지, 연구 시간을 획기적으로 줄여보세요.
카드 등록 없음 · 무료 플랜 제공
이 리뷰는 AI가 만들고, 인간 에디터가 검토했습니다.