Understanding Hyperdimensional Computing for Parallel Single-Pass Learning

Overview

Understanding Hyperdimensional Computing for Parallel Single-Pass Learning

Authors:

*: Equal Contribution

Introduction

This repo contains implementation of the group VSA and binary HDC model with random Fourier feature (RFF) encoding, described in the paper Understanding Hyperdimensional Computing for Parallel Single-Pass Learning.

Our RFF method and group VSA can outperform the state-of-the-art HDC model while maintaining hardware efficiency. For example, on MNIST,

Model 1-Epoch Accuracy 10-Epoch Accuracy Circuit-Depth Complexity
Percep. 94.3 % 94.3 % 1299
SOTA HDC NA 89.0 % 295
RFF HDC 95.4 % 95.4 % 295
RFF G(2^3)-VSA 96.3 % 95.7 % 405

Dependencies and Data

Numpy and PyTorch>=1.0.0 are required to run the implementation. Supported datasets include MNIST, Fashion-MNIST, CIFAR-10, ISOLET and UCI-HAR. We provide the ISOLET and UCI-HAR data in dataset folder.

Usage

Please create the ./encoded_data folder before running the following code.

$ python main.py [-h] [-lr LR] [-gamma GAMMA] [-epoch EPOCH] [-gorder GORDER] [-dim DIM] 
[-data_dir DATA_DIR] [-model MODEL]
optional arguments:
  -h, --help            show this help message and exit
  -lr LR                learning rate for optimizing class representative
  -gamma GAMMA          kernel parameter for computing covariance
  -epoch EPOCH          epochs of training
  -gorder GORDER        order of the cyclic group required for G-VSA
  -dim DIM              dimension of hypervectors
  -resume               resume from existing encoded hypervectors
  -data_dir DATA_DIR    Directory used to save encoded data (hypervectors)
  -dataset {mnist,fmnist,cifar,isolet,ucihar}
                        dataset (mnist | fmnist | cifar | isolet | ucihar)
  -raw_data_dir RAW_DATA_DIR
                        Raw data directory to the dataset
  -model {rff-hdc,linear-hdc,rff-gvsa}
                        feature and model to use: (rff-hdc | linear-hdc | rff-gvsa)

For example,

$ python main.py -gamma 0.3 -epoch 10 -gorder 8 -dim 10000 -dataset mnist -model rff-gvsa

Citation

If you find this repo useful, please cite:


Owner
Cornell RelaxML
Chris De Sa's Research Group
Cornell RelaxML
Kaggle Lyft Motion Prediction for Autonomous Vehicles 4th place solution

Lyft Motion Prediction for Autonomous Vehicles Code for the 4th place solution of Lyft Motion Prediction for Autonomous Vehicles on Kaggle. Discussion

44 Jun 27, 2022
AI-UPV at IberLEF-2021 EXIST task: Sexism Prediction in Spanish and English Tweets Using Monolingual and Multilingual BERT and Ensemble Models

AI-UPV at IberLEF-2021 EXIST task: Sexism Prediction in Spanish and English Tweets Using Monolingual and Multilingual BERT and Ensemble Models Descrip

Angel de Paula 1 Jun 08, 2022
(CVPR 2022 Oral) Official implementation for "Surface Representation for Point Clouds"

RepSurf - Surface Representation for Point Clouds [CVPR 2022 Oral] By Haoxi Ran* , Jun Liu, Chengjie Wang ( * : corresponding contact) The pytorch off

Haoxi Ran 264 Dec 23, 2022
Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition"

Code for Two-stage Identifier: "Locate and Label: A Two-stage Identifier for Nested Named Entity Recognition", accepted at ACL 2021. For details of the model and experiments, please see our paper.

tricktreat 87 Dec 16, 2022
[NeurIPS 2021] Large Scale Learning on Non-Homophilous Graphs: New Benchmarks and Strong Simple Methods

Large Scale Learning on Non-Homophilous Graphs: New Benchmarks and Strong Simple Methods Large Scale Learning on Non-Homophilous Graphs: New Benchmark

60 Jan 03, 2023
The official implementation of VAENAR-TTS, a VAE based non-autoregressive TTS model.

VAENAR-TTS This repo contains code accompanying the paper "VAENAR-TTS: Variational Auto-Encoder based Non-AutoRegressive Text-to-Speech Synthesis". Sa

THUHCSI 138 Oct 28, 2022
Generate image analogies using neural matching and blending

neural image analogies This is basically an implementation of this "Image Analogies" paper, In our case, we use feature maps from VGG16. The patch mat

Adam Wentz 3.5k Jan 08, 2023
Realistic lighting in ursina!

Ursina Lighting Realistic lighting in ursina! If you want to have realistic lighting in ursina, import the UrsinaLighting.py in your project and use t

17 Jul 07, 2022
Reusable constraint types to use with typing.Annotated

annotated-types PEP-593 added typing.Annotated as a way of adding context-specific metadata to existing types, and specifies that Annotated[T, x] shou

125 Dec 26, 2022
Point Cloud Registration using Representative Overlapping Points.

Point Cloud Registration using Representative Overlapping Points (ROPNet) Abstract 3D point cloud registration is a fundamental task in robotics and c

ZhuLifa 36 Dec 16, 2022
Lorien: A Unified Infrastructure for Efficient Deep Learning Workloads Delivery

Lorien: A Unified Infrastructure for Efficient Deep Learning Workloads Delivery Lorien is an infrastructure to massively explore/benchmark the best sc

Amazon Web Services - Labs 45 Dec 12, 2022
Scaling and Benchmarking Self-Supervised Visual Representation Learning

FAIR Self-Supervision Benchmark is deprecated. Please see VISSL, a ground-up rewrite of benchmark in PyTorch. FAIR Self-Supervision Benchmark This cod

Meta Research 584 Dec 31, 2022
Benchmark spaces - Benchmarks of how well different two dimensional spaces work for clustering algorithms

benchmark_spaces Benchmarks of how well different two dimensional spaces work fo

Bram Cohen 6 May 07, 2022
基于pytorch构建cyclegan示例

cyclegan-demo 基于Pytorch构建CycleGAN示例 如何运行 准备数据集 将数据集整理成4个文件,分别命名为 trainA, trainB:训练集,A、B代表两类图片 testA, testB:测试集,A、B代表两类图片 例如 D:\CODE\CYCLEGAN-DEMO\DATA

Koorye 3 Oct 18, 2022
One-line your code easily but still with the fun of doing so!

One-liner-iser One-line your code easily but still with the fun of doing so! Have YOU ever wanted to write one-line Python code, but don't have the sa

5 May 04, 2022
Implementation of the ivis algorithm as described in the paper Structure-preserving visualisation of high dimensional single-cell datasets.

Implementation of the ivis algorithm as described in the paper Structure-preserving visualisation of high dimensional single-cell datasets.

beringresearch 285 Jan 04, 2023
Diffusion Probabilistic Models for 3D Point Cloud Generation (CVPR 2021)

Diffusion Probabilistic Models for 3D Point Cloud Generation [Paper] [Code] The official code repository for our CVPR 2021 paper "Diffusion Probabilis

Shitong Luo 323 Jan 05, 2023
A benchmark dataset for emulating atmospheric radiative transfer in weather and climate models with machine learning (NeurIPS 2021 Datasets and Benchmarks Track)

ClimART - A Benchmark Dataset for Emulating Atmospheric Radiative Transfer in Weather and Climate Models Official PyTorch Implementation Using deep le

21 Dec 31, 2022
IGCN : Image-to-graph convolutional network

IGCN : Image-to-graph convolutional network IGCN is a learning framework for 2D/3D deformable model registration and alignment, and shape reconstructi

Megumi Nakao 7 Oct 27, 2022
A library for augmentation of a YOLO-formated dataset

YOLO Dataset Augmentation lib Инструкция по использованию этой библиотеки Запуск всех файлов осуществлять из консоли. GoogleCrawl_to_Dataset.py Это ск

Egor Orel 1 Dec 10, 2022