Harmonic Weierstrass Encoder: Prime-Harmonic Embedding
- The paper introduces the Harmonic Weierstrass Encoder as a prime-harmonic embedding that mitigates spectral bias by using coprime frequency allocation and a power-law amplitude schedule.
- It replaces traditional geometric frequency encodings with an arithmetic allocation based on prime numbers, avoiding resonance and ensuring dense high-frequency coverage for chaotic attractors.
- Empirical studies on Lorenz-63 demonstrate extended predictive horizons and improved stability, underscoring the encoder's effectiveness in modeling fractal latent dynamics.
The Harmonic Weierstrass Encoder (HWE) is a learnable prime-harmonic embedding introduced as the lifting stage of the Fractal Neural Operator for chaotic dynamical systems. Its stated purpose is to counter the spectral bias of standard deep architectures by replacing geometric frequency allocation with a prime-harmonic basis and a power-law amplitude schedule, thereby injecting dense high-frequency structure into the latent representation of trajectories on strange attractors (Awadhiya, 22 Jun 2026).
1. Spectral-bias motivation and problem setting
- Chaotic attractors and spectral bias
Deep learning models, particularly Transformers and Neural Operators, are described as exhibiting a well-documented spectral bias, effectively acting as low-pass filters that smooth out high-frequency information. In fluid or other smooth PDE regimes this can be benign or even desirable, but for chaotic dynamical systems it is characterized as catastrophic, because the attractor’s invariant measure lives on a fractal manifold with microscopic roughness and effectively requires a representation rich in high-frequency content and, in the limit, an infinite spectral density (Awadhiya, 22 Jun 2026).
Standard geometric encodings, such as positional encodings with frequencies growing as , are said to cover scales efficiently but to introduce large spectral gaps between octaves. They also generate harmonic relationships such as and , which promote leakage and aliasing in the learned representation. HWE addresses this by replacing geometric allocation with arithmetic allocation: prime-harmonic frequencies that are pairwise coprime, thereby avoiding resonance and ensuring dense, non-periodic spectral coverage.
- Targeted failure mode of conventional encodings
The central claim is not merely that chaos contains high frequencies, but that the relevant latent geometry is fractal and effectively rough across scales. The encoder is therefore designed to avoid false periodicity, large spectral holes, and harmonic collapse. This motivates a non-resonant basis in which the latent does not spuriously repeat on any practical training or inference window.
2. Classical origin and formal definition
- From the classical Weierstrass function to prime-harmonic embeddings
The classical Weierstrass function is given by
with $0 < a < 1$, , and as a sufficient condition for nowhere differentiability. HWE adapts this idea to a learnable encoder designed for chaotic attractors, but it swaps geometric frequency growth for a prime-harmonic basis while preserving amplitude decay intended to yield roughness consistent with the fractal manifold (Awadhiya, 22 Jun 2026).
The paper defines the Prime-Weierstrass Embedding element-wise. For an input scalar and hidden channel ,
0
where 1 is the 2-th prime, 3 is the spectral amplitude, 4 is a learnable phase per channel, and 5 is a learnable linear projection from the input to a scalar per channel.
The stated initialization is 6, giving a pink-noise-like spectrum matching the 7-style power spectral density commonly observed in natural chaotic systems. The prime set is fixed rather than trainable.
| Quantity | Definition | Stated role |
|---|---|---|
| 8 | 9-th prime | Non-resonant frequency set |
| 0 | 1 | Pink-noise-like spectral amplitude |
| 2 | 3 | Learnable per-channel phase |
| 4 | Learnable linear projection | Maps input to per-channel scalar |
| 5 | 6 | Lower bound on composite period |
For multi-dimensional inputs, 7 maps 8 into per-channel scalars before the prime-harmonic expansion is applied. The paper also gives an extension to explicit time dependence,
9
although the experiments are reported as using state variables through a single projection.
A key period estimate is the primorial
0
For 1, the paper states that the primorial exceeds 2, implying an effectively infinite fundamental period on any finite training or inference window (Awadhiya, 22 Jun 2026).
3. Architectural role inside the Fractal Neural Operator
- Lifting, evolution, and projection
Within the Fractal Neural Operator, HWE is the lifting block. The architecture is given in three stages: 3 The encoder lifts the input state 4 into a high-dimensional fractal latent, a causal GRU acts as the discretized evolution operator, and a small MLP maps the hidden state back to physical space. The paper explicitly motivates the GRU choice as enforcing strict causality and continuous-time consistency without relying on FFT assumptions of periodicity or smoothness (Awadhiya, 22 Jun 2026).
- Training setup and computational form
The canonical benchmark is Lorenz-63,
5
with 6, 7, 8. Trajectories are generated via RK4 at 9. The dataset has 25,000 steps, reported as 250 Lyapunov times, and is split 60/40 train/test.
The loss is one-step mean squared error, optionally rolled out for multi-step accumulation,
$0 < a < 1$0
The stated implementation choices include fixed prime frequencies, learnable phases, trainable $0 < a < 1$1, and gradient clipping because the GRU benefits from it under the high-frequency latent. The reported per-time-step complexity is:
- HWE: $0 < a < 1$2 trigonometric evaluations and linear projections
- GRU evolution: $0 < a < 1$3
- Decoder: $0 < a < 1$4
The paper highlights $0 < a < 1$5, notes that larger $0 < a < 1$6 increases spectral resolution linearly in compute cost, and gives a pseudocode-level sketch with precomputed primes, $0 < a < 1$7, learned phases, iterative rollout at inference, and MSE minimization during training.
4. Spectral mechanism, non-resonance, and fractal latent structure
- Infinite spectral resolution and rough embeddings
In the limit $0 < a < 1$8, the paper argues that superposing prime-harmonic cosines with decaying amplitudes injects arbitrarily high frequencies into the latent space, producing a fractal, effectively nowhere-differentiable embedding akin to the Weierstrass function. In practice the encoder is truncated at finite $0 < a < 1$9, but the stated goal is to materially increase high-frequency coverage relative to geometric encodings (Awadhiya, 22 Jun 2026).
The amplitude schedule 0 implies a discrete 1-like energy distribution over prime-indexed bands. The paper writes that if 2, then loosely the per-band energy scales as
3
which maintains persistent energy in high frequencies compared to steeper exponential decays.
- Coprimality and suppression of false periodicity
The non-resonance argument is based on pairwise coprimality. Geometric sets 4 generate deterministic harmonics whose sums and differences land on existing bins or their multiples, amplifying spectral leakage. By contrast, distinct primes are pairwise coprime, sums or differences of distinct primes rarely land on prime bins, and the composite period lower bound 5 is astronomically large. On any practical window the latent is therefore treated as aperiodic.
The paper states that this suppresses false repetitions that can lure recurrent or attention mechanisms into erroneous phase-locking. It further contrasts HWE with several established alternatives:
- geometric encodings 6, which leave octave-sized spectral gaps;
- Random Fourier Features, which in low dimension can cluster or leave gaps;
- SIREN, which enables learning high frequencies but does not enforce non-resonance or a fractal amplitude schedule;
- wavelets and scattering transforms, which use dyadic scales and inherit geometric gaps;
- Transformer positional encodings, which are commonly geometric and are described as aggravating spectral bias in chaotic settings.
5. Empirical performance on Lorenz-63 and comparative behavior
- Reported horizon extension
The reported Lorenz-63 experiments attribute a substantial long-horizon gain to the Prime-Weierstrass operator. A Monte Carlo Lyapunov analysis with 7 is said to show a Lyapunov Horizon of 8 steps with MSE 9, compared with 0 steps and MSE 1 for geometric 2 encodings, while also outperforming raw identity inputs. Stability, measured as variance of failure times, is reported to improve by 14\% relative to the geometric baseline (Awadhiya, 22 Jun 2026).
The paper defines Lyapunov time as
3
and explicitly notes a presentation difference: the abstract states a horizon of 347 Lyapunov times and a 2.3× gain over Reservoir Computing baselines, whereas the main table reports 347 steps under the 4 discretization. The paper treats these as consistent with the qualitative claim that HWE extends predictive validity deep into the chaotic regime.
- Residual spectra and frequency ablations
Power spectral density analysis of residuals is reported to show that geometric encodings exhibit a high-frequency drop-off, interpreted as spectral gaps, whereas the prime-harmonic encoder maintains energy up to the Nyquist limit. The ablations also isolate the role of fixed primes: frequencies fixed to primes outperform Random Fourier Features and trainable frequencies. When frequencies are trainable, the optimizer is said often to collapse them into resonant clusters such as 5, improving short-term MSE but degrading long-term stability.
The abstract therefore concludes that “chaos” is not inherently unpredictable to neural networks, but rather requires non-differentiable, fractal embedding manifolds.
6. Implementation guidance, limitations, and open directions
- Recommended operating regime
The practical guidance recommends using the first 6 primes, with 7 between 16 and 64 as a reasonable starting point. It identifies 8 as effective, suggests steepening the decay toward 9 if training is unstable, and flattening toward 0 if high frequencies are underfit. Phases are initialized from 1 and allowed to train; frequencies are kept fixed as primes because trainable frequencies risk resonant clustering (Awadhiya, 22 Jun 2026).
For the projection layer, the recommendation is a modest-width linear map from 2 to 3 per channel, with normalized inputs and possible per-dimension scaling to avoid saturating cosines. For the GRU kernel, the guidance gives hidden size 4 in the 64–256 range, gradient clipping, and possible layer normalization. A small MLP decoder is said to suffice, and unnecessary depth is discouraged.
The training schedule is described as using teacher forcing for one-step losses early, then progressively increasing rollout length to emphasize stability. Monitoring the power spectral density of residuals is recommended as a way to verify high-frequency fidelity.
- Known limitations
The paper identifies several limitations. Increasing 5 linearly raises encoder cost, so very large 6 may be prohibitive without fused kernel implementations. High-frequency content can amplify measurement noise, so robust training may require denoising or spectral regularization. The current Fractal Neural Operator uses a GRU evolution kernel, and extension to spatially extended PDEs or high-dimensional chaotic systems is posed as future work, potentially by integrating prime-harmonic encodings into Fourier Neural Operators or Transformers while retaining non-resonance. Formal approximation bounds for chaotic flows with prime-harmonic embeddings are also described as an open direction.
A plausible implication is that the principal unresolved issue is not only approximation power but also how to preserve the non-resonant structure when moving from low-dimensional autonomous systems such as Lorenz-63 to operator-learning settings with explicit spatial kernels.
7. Broader Weierstrass-encoder interpretations in adjacent fields
- Related but distinct usages
A broader comparative reading of the supplied literature suggests that “Harmonic Weierstrass Encoder” is not a single cross-disciplinary standard object, but a family resemblance among constructions that use Weierstrass-type data to encode geometry, dynamics, or arithmetic.
In quantum information, an encoder interpretation is attached to Gaussian GKP-stabilizer oscillator-to-oscillator codes under iid additive Gaussian noise: data modes are entangled with GKP ancilla through two-mode squeezing, decoded by modular-syndrome estimation, and optimized in terms of geometric mean error 7 (Wu et al., 2022). In the specific single-mode example at 8, the paper reports 9 for the square lattice and 0 for the hexagonal lattice; in the two-mode case it reports D4 as superior to product lattices.
In differential geometry and integrable-systems settings, Weierstrass-type data encode harmonic or conformal immersions through loop-group or DPW procedures. Harmonic two-spheres into outer symmetric spaces are classified by pairs 1, with a Weierstrass-type representation 2 built from meromorphic data constrained by the outer involution and grading (Correia et al., 2014). Discrete harmonic surfaces in 3 are generated from a trivalent graph, a holomorphic function, and a discrete holomorphic quadratic differential by the edge formula
4
with 5, and Goldberg–Coxeter refinement is reported to converge to the corresponding classical minimal surface (Kotani et al., 2023). Harmonic parametrization of surfaces of arbitrary genus likewise uses meromorphic 6-forms 7 and period correction by holomorphic differentials to obtain
8
on punctured compact Riemann surfaces (Connor, 2016).
A further analytic-arithmetic strand treats Eisenstein’s completion of the Weierstrass zeta function as a harmonic kernel. The completed zeta
9
is doubly periodic and harmonic away from the lattice, and is used to construct weight-0 harmonic Maass forms and canonical lifts under the Bruinier–Funke operator (Rolen, 2015). This viewpoint is generalized to vector-valued Jacobi–Weierstrass constructions for cusp forms of weight 1 (Alfes-Neumann et al., 2023), and to elliptic-curve settings in which Weierstrass mock modular forms and theta lifts encode central 2-values and derivatives for quadratic twists (Alfes et al., 2014).
Finally, several results on harmonic mappings use Weierstrass–Enneper lifts as an encoding of planar harmonic data into minimal surfaces. Quasiconformal extensions of these lifts to 3 are derived under Ahlfors–Weill-type bounds involving the harmonic Schwarzian and curvature (Chuaqui et al., 2013), while a separate class of lifts is shown to satisfy the Duren–Osgood–Chuaqui univalence criterion through bounds on
4
for harmonic maps with square dilatation 5 (Chuaqui et al., 2018).
Within that broader landscape, the specific Harmonic Weierstrass Encoder of current machine-learning usage remains the prime-harmonic latent construction introduced for the Fractal Neural Operator on chaotic attractors (Awadhiya, 22 Jun 2026).