Mehran S. Moghadam♣+, Sercan Aygun♠+, Faeze S. Banitaba♠, and M. Hassan Najafi♣
♣ Case School of Engineering, Case Western Reserve University
♠ School of Computing & Informatics, University of Louisiana at Lafayette
All You Need is Unary:
End-to-End Bit-Stream Processing in Hyperdimensional Computing
�
International Symposium on Low Power Electronics and Design (ISLPED 2024)
August 5-7, 2024
Newport Beach, CA, USA
+ Equal Contribution
2
Outline
ISLPED
2024
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding Methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
3
Introduction
3
ISLPED
2024
Emerging Computing
II. Hyperdimensional Computing (HDC)
IV.
Approximate Computing (AC)
V.
Quantum Computing (QC)
I.
Unary Bit-stream Computing
III.
Stochastic Computing (SC)
...
4
Introduction
4
ISLPED
2024
+
Emerging Computing
II. Hyperdimensional Computing (HDC)
IV.
Approximate Computing (AC)
V.
Quantum Computing (QC)
I.
Unary Bit-stream Computing
End-to-End
Bit-Stream Processing in Hyperdimensional Computing
Our Proposal
Exploiting the Unary Computing in HDC
Migrating from Random Process to Deterministic Computing
Target
III.
Stochastic Computing (SC)
...
5
Introduction
5
ISLPED
2024
☒
☑
Conventional Neural Networks
❶
6
Introduction
6
ISLPED
2024
☒
☑
iterations
Conventional Neural Networks
❶
❷
7
Introduction
7
ISLPED
2024
☒
☑
iterations
Conventional Neural Networks
❶
❷
>
>
>
>
>
>
>
8
Introduction
8
ISLPED
2024
☒
☑
ε
Error Calculation
iterations
Conventional Neural Networks
❶
❷
>
>
>
>
>
>
>
9
Introduction
9
ISLPED
2024
☒
☑
ε
Error Calculation
iterations
Conventional Neural Networks
❶
❷
Backprop.
>
>
>
>
>
>
>
>
>
>
10
Introduction
10
ISLPED
2024
☒
☑
ε
Error Calculation
iterations
Conventional Neural Networks
❶
❷
❸
Backprop.
>
>
>
>
>
>
>
>
>
>
11
Introduction
11
ISLPED
2024
☒
☑
ε
Error Calculation
iterations
Conventional Neural Networks
❶
❷
❸
❹
Backprop.
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
12
Introduction
12
ISLPED
2024
Single-pass learning
❷
No error check & backprop.
Light model�(model compression)
❸
Direct data processing
❹
HDC
❶
13
Introduction
13
ISLPED
2024
Single-pass learning
❷
No error check & backprop.
Light model�(model compression)
❸
Direct data processing
❹
HDC
❶
: Hypervector
(atomic data)
| | | |
+1
+1
...
-1
Encoding
Training Data
Training and Inference in HDC
14
ISLPED
2024
❶
Encoding
Training
Training Data
| | | |
+1
-1
...
-1
Training and Inference in HDC
15
ISLPED
2024
❶
Encoding
Training
Training Data
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Training and Inference in HDC
16
ISLPED
2024
❶
❷
Encoding
Training
Training Data
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
Training and Inference in HDC
17
ISLPED
2024
❷
❶
Encoding
Training
Training Data
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
...
h1D
|
|
|
|
h12
h11
Training and Inference in HDC
18
ISLPED
2024
❷
❶
Encoding
Training
Training Data
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
...
h1D
|
|
|
|
h12
h11
query
Training and Inference in HDC
19
ISLPED
2024
❷
❶
Encoding
Training
Training Data
Item Memory
Assoc.�Memory
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
...
h1D
|
|
|
|
h12
h11
query
Training and Inference in HDC
20
ISLPED
2024
❸
❷
❶
Encoding
Training
Training Data
Item Memory
Assoc.�Memory
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
...
h1D
|
|
|
|
h12
h11
Similarity
query
Training and Inference in HDC
21
ISLPED
2024
❹
Encoding
Training
Training Data
Item Memory
Assoc.�Memory
| | | |
+1
-1
...
-1
| | | |
...
Class
C0D
C02
C01
Encoding
Testing Data
...
h1D
|
|
|
|
h12
h11
Similarity
query
Applications
22
ISLPED
2024
EEG, iEEG, ECG,
EMG, GSR, ECoG
DNA
MNIST COCO CIFAR
RNA
Voice
Letter
Encoding
Training and Inference in HDC
23
ISLPED
2024
Binding
Bundling
Permutation
Hypervector Generation
Hypervector Mapping
POP++
-1
1
1
…
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
24
ISLPED
2024
Stream Generators
25
ISLPED
2024
Stream Generators
26
ISLPED
2024
Stream Generators
27
ISLPED
2024
Stream Generators
28
ISLPED
2024
Energy
Efficient
👍
Stream Generators
29
ISLPED
2024
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
Stream Generators
30
ISLPED
2024
Pseudo-Randomness vs. Quasi-Randomness
31
ISLPED
2024
Pseudo-Randomness
Quasi-Randomness
Scattering
High-Discrepancy
Low-Discrepancy
Sequence-1
Sequence-2
Sequence-1
Sequence-2
Pseudo-Randomness vs. Quasi-Randomness
32
ISLPED
2024
Pseudo-Randomness
Quasi-Randomness
Scattering
High-Discrepancy
Distribution
Low-Discrepancy
Sequence-1
Sequence-2
Sequence-1
Sequence-2
Non-Uniform
Uniform
Probability
Population
High-Discrepancy
Low-Discrepancy
Probability
Population
Pseudo-Randomness vs. Quasi-Randomness
33
ISLPED
2024
Pseudo-Randomness
Quasi-Randomness
Scattering
High-Discrepancy
Distribution
Low-Discrepancy
Sequence-1
Sequence-2
Sequence-1
Sequence-2
Non-Uniform
Uniform
Probability
Population
High-Discrepancy
Low-Discrepancy
Probability
Population
Orthogonality
Vector-1
Vector-2
Vector-1
Vector-2
Weaker
Orthogonality
Strong
Orthogonality
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
34
ISLPED
2024
Vector Symbolic Representation
Orthogonality
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
35
ISLPED
2024
Vector Symbolic Representation
1
-1
1
…
D
Symbol-1
Orthogonality
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
36
ISLPED
2024
Vector Symbolic Representation
1
-1
1
…
D
Symbol-1
Symbol-2
-1
1
1
…
Symbol-n
1
-1
-1
…
Orthogonal
Orthogonality
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
37
ISLPED
2024
Vector Symbolic Representation
1
-1
1
…
D
Symbol-1
Orthogonality
Symbol-2
-1
1
1
…
Symbol-n
1
-1
-1
…
Orthogonal
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
38
ISLPED
2024
Vector Symbolic Representation
1
-1
1
…
D
Symbol-1
Orthogonality
Symbol-2
-1
1
1
…
Symbol-n
1
-1
-1
…
Orthogonal
n different LFSRs!!
Weaker
Orthogonality
Orthogonality
👍
Strong
Orthogonality
👍
Pseudo-Randomness vs. Quasi-Randomness
39
ISLPED
2024
Vector Symbolic Representation
1
-1
1
…
D
Symbol-1
Orthogonality
Symbol-2
-1
1
1
…
Symbol-n
1
-1
-1
…
Orthogonal
Can be a single source possible?
n different LFSRs!!
Unbinding randomness from HV generation (Position & Level HVs)
Utilizing quasi-random/deterministic sequences for HV generation
Targets
40
ISLPED
2024
Outline
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding Methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
ISLPED
2024
41
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
Single-Source Position Generator
Position Hypervector Generation
Strong
Orthogonality
👍
Proposed
Novel Encoding Methods
42
ISLPED
2024
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
Position Hypervector Generation
Novel Encoding Methods
43
ISLPED
2024
🔍
M. S. Moghadam, S. Aygun, M. R. Alam and M. H. Najafi, "P2LSG: Powers-of-2 Low-Discrepancy Sequence Generator for Stochastic Computing," 2024 29th Asia and South Pacific Design Automation Conference (ASP-DAC), Incheon, Korea
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
Position Hypervector Generation
Novel Encoding Methods
44
ISLPED
2024
🔍
M. S. Moghadam, S. Aygun, M. R. Alam and M. H. Najafi, "P2LSG: Powers-of-2 Low-Discrepancy Sequence Generator for Stochastic Computing," 2024 29th Asia and South Pacific Design Automation Conference (ASP-DAC), Incheon, Korea
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
CMP
Single-Source Position Generator
Position Hypervector Generation
Strong
Orthogonality
👍
Proposed
Novel Encoding Methods
45
ISLPED
2024
T
Q
T-FF
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
XOR
CMP
CLK
Single-Source Position Generator
Position Hypervector Generation
Strong
Orthogonality
👍
Proposed
Novel Encoding Methods
46
ISLPED
2024
T
Q
T-FF
VDC-2
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
Q
T
CLK
Vcc
Tff7
Tff6
Tff5
Tff4
Tff3
Tff2
Tff1
Tff0
MSB
LSB
V7
V6
V5
V4
V3
V2
V1
V0
XOR
CMP
🔍
e.g.,110101…1010
CLK
Single-Source Position Generator
Position Hypervector Generation
Strong
Orthogonality
👍
Proposed
Novel Encoding Methods
47
ISLPED
2024
Outline
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding Methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
48
ISLPED
2024
Outline
Proposed
Novel Encoding Methods
49
ISLPED
2024
MNIST Sample Data
(Number 7)
Pixel value
8-bit
✻
Unary-based Level Generator
Level Hypervector Generation
Proposed
Novel Encoding Methods
50
ISLPED
2024
MNIST Sample Data
(Number 7)
CNT
D
Q
Wth
. .
D
Q
1th
CLK
Q
W-bit
Pixel value
8-bit
✻
CMP
Unary-based Level Generator
Level Hypervector Generation
Proposed
Novel Encoding Methods
51
ISLPED
2024
MNIST Sample Data
(Number 7)
CNT
D
Q
Wth
. .
D
Q
1th
CLK
Q
W-bit
Left Shifter
Pixel value
8-bit
✻
# of shifts
c
✻
CMP
Unary-based Level Generator
Level Hypervector Generation
Proposed
Novel Encoding Methods
52
ISLPED
2024
MNIST Sample Data
(Number 7)
CNT
D
Q
Wth
. .
D
Q
1th
CLK
111..11
000..00
e.g., pixel value = 75
111..11
1
00..00
Q
W-bit
Left Shifter
Pixel value
8-bit
✻
# of shifts
c
✻
e.g., pixel value = 76
consecutive Pixel values
🔍
CMP
Unary-based Level Generator
Level Hypervector Generation
End-to-End Design
53
ISLPED
2024
Outline
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
ISLPED
2024
54
Position Hypervector Generation
Power consumption reduction by 98%
Energy efficiency improvement by 15%
Considering MNIST images || CPL: Critical Path Latency
Results
55
ISLPED
2024
Level Hypervector Generation
Considering 8-bit gray-scale image pixels within the [0,255] interval
Results
56
ISLPED
2024
Power consumption reduction ≈ 68×
Area × Delay improvement ≈ 39×
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding Methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
Outline
57
ISLPED
2024
Medical MNIST Performance
Ref: medmnist.com
Results
58
ISLPED
2024
Medical MNIST Performance
Ref: medmnist.com
Results
59
ISLPED
2024
Medical MNIST Performance
Ref: medmnist.com
Results
60
ISLPED
2024
Medical MNIST Performance
Ref: medmnist.com
Results
61
ISLPED
2024
Outline
① Introduction, Background, and Motivations
- Hyperdimensional Computing (HDC)
- Stream Generators
- Pseudo-Randomness vs. Quasi-Randomness
② Novel Encoding Methods
- Single-source Position Hypervector (Position HV)
- Unary-based Level Hypervector (Level HV)
③ Results
- Hardware Efficiency
- Medical MNIST Performance
④ Conclusions
⑥
62
ISLPED
2024
Conclusions
63
ISLPED
2024
THANK YOU
sercan.aygun@louisiana.edu
ISLPED
2024
64