Choosing a VSA Model¶
HoloVec provides 7 different VSA models. This guide helps you choose the right model for your use case.
Quick Selection Guide¶
Quick Recommendations:
Decision Tree¶
Do you need exact similarity reversal (unbinding)?
├─ YES → Consider FHRR, HRR, GHRR, VTB
│ │
│ ├─ Need smooth encodings (continuous data)?
│ │ └─ YES → FHRR (best choice)
│ │
│ ├─ Working with symbolic data only?
│ │ └─ YES → HRR (classic, well-studied)
│ │
│ └─ Need advanced features?
│ ├─ Exact encoding/decoding → GHRR
│ └─ Variable binding strength → VTB
│
└─ NO → Consider MAP, BSC, BSDC
│
├─ Need maximum speed?
│ └─ YES → MAP (binary, ultra-fast)
│
├─ Working with sparse data?
│ └─ YES → BSC or BSDC
│
└─ Need hardware efficiency?
└─ YES → MAP or BSC (binary operations)
Model Comparison Table¶
Feature |
MAP |
FHRR |
HRR |
BSC |
BSDC |
GHRR |
VTB |
|---|---|---|---|---|---|---|---|
Data Type |
Binary |
Complex |
Real |
Binary |
Binary |
Complex |
Real |
Unbinding |
Approx |
Exact |
Exact |
Approx |
Approx |
Exact |
Exact |
Speed |
⭐⭐⭐⭐⭐ |
⭐⭐⭐ |
⭐⭐⭐ |
⭐⭐⭐⭐ |
⭐⭐⭐⭐ |
⭐⭐ |
⭐⭐ |
Memory |
Lowest |
Medium |
Medium |
Low |
Low |
Medium |
Medium |
Hardware |
Best |
Good |
Good |
Best |
Best |
Good |
Good |
FPE Support |
No |
Yes |
Yes |
No |
No |
Yes |
Yes |
Best For |
Speed |
General |
Classic |
Sparse |
Sparse |
Advanced |
Research |
Detailed Model Descriptions¶
MAP (Multiply-Add-Permute)¶
Type: Binary hypervectors
Key Properties:
Ultra-fast operations (binary XOR, shifts)
Lowest memory footprint (1 bit per dimension)
Hardware-friendly (FPGA, ASIC implementations)
Approximate unbinding
Best For:
Real-time applications
Edge devices with limited resources
Maximum speed requirements
Hardware implementations
Limitations:
Cannot use
FractionalPowerEncoderLess precise similarity measurements
Approximate rather than exact unbinding
Example Use Cases:
Gesture recognition on wearables
Real-time sensor fusion
Embedded systems
Mobile applications
See Also:
Demo: Basic VSA Operations - MAP examples
Models - Full API reference
FHRR (Fourier Holographic Reduced Representations)¶
Type: Complex-valued hypervectors
Key Properties:
Exact unbinding via complex conjugate
Smooth similarity for continuous values
Supports FractionalPowerEncoder
Well-suited for numerical data
Best For:
Continuous data (temperature, time, coordinates)
Applications requiring exact reversal
General-purpose VSA tasks
Symbolic + numeric fusion
Limitations:
Higher memory than binary models
Complex arithmetic overhead
May need normalization
Example Use Cases:
Time series analysis
Sensor data processing
Multimodal data fusion
Scientific computing
See Also:
Fractional Power Encoder Deep Dive - FPE with FHRR
Gesture Recognition from Motion Trajectories - Trajectory encoding
Models - Full API reference
HRR (Holographic Reduced Representations)¶
Type: Real-valued hypervectors
Key Properties:
Classic model (well-studied since 1990s)
Circular convolution for binding
Exact unbinding via correlation
Supports FractionalPowerEncoder
Best For:
Classic VSA applications
Research with established baselines
Symbolic reasoning
Applications with existing HRR code
Limitations:
Slower than FHRR for some operations
Higher memory than binary models
Example Use Cases:
Natural language processing
Knowledge representation
Analogical reasoning
Cognitive modeling
See Also:
../examples/03_binding_and_unbinding - Binding examples
Models - Full API reference
BSC (Binary Spatter Codes)¶
Type: Binary hypervectors
Key Properties:
Very sparse representations
Fast binary operations
Low memory footprint
Hardware-friendly
Best For:
Sparse data
Fast similarity search
Large-scale storage
Hardware implementations
Limitations:
Cannot use FractionalPowerEncoder
Approximate unbinding
Requires careful capacity management
Example Use Cases:
Document retrieval
Large vocabulary applications
Recommendation systems
Content-based search
See Also:
Models - Full API reference
BSDC (Binary Spatter Codes with Discrete Cleanup)¶
Type: Binary hypervectors with cleanup
Key Properties:
Enhanced BSC with cleanup mechanism
Better error correction
Improved similarity discrimination
Best For:
BSC applications requiring better accuracy
Noisy environments
Complex retrieval tasks
See Also:
Models - Full API reference
GHRR (Generalized Holographic Reduced Representations)¶
Type: Complex-valued with advanced features
Key Properties:
Generalization of HRR/FHRR
Flexible encoding/decoding
Research-oriented features
Best For:
Advanced VSA research
Custom encoding schemes
Specialized applications
See Also:
Models - Full API reference
VTB (Variable Binding)¶
Type: Real-valued with variable binding strength
Key Properties:
Tunable binding strength
Research model for variable binding
Flexible unbinding
Best For:
Research on binding mechanisms
Applications requiring variable binding strength
See Also:
Models - Full API reference
Use Case Recommendations¶
By Application Domain¶
Text Classification / NLP
Alternative:
MAPModelfor speedReason: Symbolic data with optional continuous features (word embeddings)
Example: Document Classification with N-grams
Image Recognition
Primary:
FHRRModelAlternative:
MAPModelfor edge devicesReason: Spatial encoding benefits from smooth similarity
Example: Image Pattern Recognition
Gesture Recognition / Motion
Primary:
FHRRModelAlternative:
MAPModelfor wearablesReason: Continuous trajectories, real-time requirements
Time Series / Sensor Fusion
Primary:
FHRRModelReason: Continuous temporal data, exact unbinding helpful
Example: Demonstration of Trajectory Encoder for continuous sequence encoding.
Symbolic Reasoning
Reason: Classic applications, exact unbinding essential
Example: ../examples/16_compositional_structures
Large-Scale Retrieval
By Hardware Platform¶
Desktop / Server (No Constraints)
Recommended:
FHRRModelReason: Best general-purpose capabilities
Mobile / Edge Devices
Recommended:
MAPModelReason: Lowest memory and compute requirements
FPGA / ASIC Implementation
GPU Acceleration
Recommended:
FHRRModelwith PyTorch backendReason: Complex operations parallelize well
By Performance Requirements¶
Maximum Speed
Minimum Memory
MAPModel- 1 bit/dimensionBSCModel- 1 bit/dimensionFHRRModel- 16 bytes/dimension (complex float64)
Best Accuracy
Performance Trade-offs¶
Speed vs Accuracy¶
Model |
Speed Characteristics |
Accuracy Characteristics |
|---|---|---|
MAP |
Ultra-fast (binary XOR) |
Approximate (discrete similarity) |
BSC/BSDC |
Very fast (binary ops) |
Good (sparse codes) |
FHRR |
Fast (optimized FFT) |
Excellent (smooth similarity) |
HRR |
Moderate (convolution) |
Excellent (exact unbinding) |
GHRR/VTB |
Moderate to slow |
Research models |
Memory vs Capacity¶
Memory per dimension:
Binary (MAP, BSC, BSDC): 1 bit
Real (HRR, VTB): 8 bytes (float64)
Complex (FHRR, GHRR): 16 bytes (complex128)
Capacity (number of distinct items):
All models: ~dimension / 100 for good orthogonality
Example: 10,000 dimensions → ~100 items
Trade-off:
Higher dimensions → More capacity but more memory
Binary models → Less memory per dimension
Choose dimension based on application needs
Switching Models¶
Changing models is easy - just modify the create() call:
from holovec import VSA
# Try different models with same code
model = VSA.create('FHRR', dim=10000) # Complex-valued
# model = VSA.create('MAP', dim=10000) # Binary
# model = VSA.create('HRR', dim=10000) # Real-valued
# Rest of code stays the same
a = model.random(seed=1)
b = model.random(seed=2)
c = model.bind(a, b)
Important: Some encoders only work with specific models:
FractionalPowerEncoderrequires FHRR, HRR, GHRR, or VTBThermometerEncoderandLevelEncoderwork with all models
See Encoding Data for encoder selection guidance.
Frequently Asked Questions¶
Q: Which model should I start with?
A: FHRRModel - It’s the most versatile and works for most applications.
Q: When should I use MAP instead of FHRR?
A: When speed and memory are critical (embedded systems, real-time applications, hardware implementations).
Q: Can I mix models in one application?
A: No - hypervectors from different models are incompatible. Choose one model for your entire application.
Q: How do I know if my model has enough capacity?
A: Rule of thumb: dimension / 100 items. Use ../examples/06_cleanup_and_retrieval to test retrieval accuracy.
Q: Does model choice affect encoding?
A: Yes - some encoders (like FractionalPowerEncoder) only work with certain models. See Encoding Data.
Q: Can I change models after development?
A: Switching is usually straightforward, but you’ll need to re-encode all data. Test thoroughly.
Q: Which model has the best theoretical foundations?
A: HRRModel (classic, well-studied) and FHRRModel (modern, mathematically elegant).
Next Steps¶
Encoding Data - Learn about encoding different data types
Backends and Performance - Choose the right backend for performance
HoloVec Examples - See models in action
Models - Complete model API reference
Theory Guide: Hyperdimensional Computing & Vector Symbolic Architectures - Theoretical foundations
See Also¶
VSA - Main API - VSA factory class
Models - Model implementations
VSA Models Comparison Guide - Hands-on comparison