Real-Valued Hyperdimensional Sequence Representations with Hadamard Product Binding and Shift Equivariance
Organizations: Chemnitz University of Technology, Germany · Luleå University of Technology, Sweden · Örebro University, Sweden · Institute of Information Technologies and Systems, Ukraine ·
Abstract
Encoding temporal order is a fundamental requirement for sequence representations in Hyperdimensional Computing. Fractional Power Encoding provides similarity-preserving position vectors whose inner products approximate shift-invariant kernels, and it supports shift-equivariant transformations of encoded sequence representations. However, standard formulations of Fractional Power Encoding are primarily designed for binding operations such as circular convolution or complex-valued multiplication, which limits their compatibility with Hadamard product binding of real-valued vectors. This paper develops real-valued position encodings motivated by Random Fourier Features, aiming to retain the desirable properties of Fractional Power Encoding while supporting Hadamard-based operations. We propose three real-valued position-encoding variants: a real-valued baseline based on the inverse Fourier transform, and Sinusoid and Cosine-only representations derived from Random Fourier Features. Among them, the Sinusoid variant provides an explicit algebraic shift operator, allowing temporal shifts to be applied directly to the vector-encoded sequence representation without re-encoding the shifted sequence. Experiments on time-series classification datasets show that the proposed real-valued representations achieve performance comparable to standard Fractional Power Encoding while enabling computationally efficient Hadamard product binding. The Sinusoid variant offers the most favorable trade-off, combining efficient real-valued implementation with exact shift-equivariant transformations.
Figures & tables
| Property | Circular Convolution / Complex Hadamard | Variant A: Real Hadamard + Original FPE | Variant B: Real Hadamard + Sinusoidal | Variant C: Real Hadamard + Cosine |
| Representation of features and positions ( Eq. 2 ) | and , or and | and | and | and |
| Implementation of FPE | ||||
| with , for | ||||
| Hadamard binding compatibility (R1) | (complex Hadamard) or (circular convolution) | (real-valued Hadamard) | (real-valued Hadamard) | (real-valued Hadamard) |
| Similarity kernel approximation (R2) | preserved via complex exponential representation | preserved (constant offset in exponent) | preserved via RFF approximation | preserved via RFF approximation |
| Position vector norm (R3) | constant due to unit-magnitude complex phasors | constant after inverse Fourier transform | constant by Sinusoidal embedding | approximately constant by Cosine embedding |
| Model | HDC | Num DS | Mean ACC | Worst ACC | Relative Change in ACC | Relative Change in Error | ||
| Mean | Max | Mean | Min | |||||
| MiniROCKET | 38 | 80.79 | 29.27 | |||||
| HDC original HRR | HRR | 38 | 82.22 | 32.61 | 1.43 | 14.42 | -8.0 | -40.0 |
| Standard FPE | MAP | 38 | 82.23 | 30.56 | 1.44 | 14.00 | -6.0 | -77.0 |
| Sinusoid FPE | MAP | 38 | 82.22 | 30.36 | 1.43 | 14.06 | -6.0 | -76.0 |
| Cosine FPE | MAP | 38 | 82.24 | 30.55 | 1.45 | 14.77 | -6.0 | -77.0 |
Positional Encoding
Positional encoding gives Transformers signals about token order, distance, and spatial or temporal relationships.
See all 117 papers