Papers
Topics
Authors
Recent
Search
2000 character limit reached

Harmonic Weierstrass Encoder: Prime-Harmonic Embedding

Updated 4 July 2026
  • 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

  1. 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 2k2^k, are said to cover scales efficiently but to introduce large spectral gaps between octaves. They also generate harmonic relationships such as 2×2=42 \times 2 = 4 and 2×4=82 \times 4 = 8, 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.

  1. 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

  1. From the classical Weierstrass function to prime-harmonic embeddings

The classical Weierstrass function is given by

W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),

with $0 < a < 1$, bNb \in \mathbb{N}, and ab>1ab > 1 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 Ψ\Psi element-wise. For an input scalar xx and hidden channel jj,

2×2=42 \times 2 = 40

where 2×2=42 \times 2 = 41 is the 2×2=42 \times 2 = 42-th prime, 2×2=42 \times 2 = 43 is the spectral amplitude, 2×2=42 \times 2 = 44 is a learnable phase per channel, and 2×2=42 \times 2 = 45 is a learnable linear projection from the input to a scalar per channel.

The stated initialization is 2×2=42 \times 2 = 46, giving a pink-noise-like spectrum matching the 2×2=42 \times 2 = 47-style power spectral density commonly observed in natural chaotic systems. The prime set is fixed rather than trainable.

Quantity Definition Stated role
2×2=42 \times 2 = 48 2×2=42 \times 2 = 49-th prime Non-resonant frequency set
2×4=82 \times 4 = 80 2×4=82 \times 4 = 81 Pink-noise-like spectral amplitude
2×4=82 \times 4 = 82 2×4=82 \times 4 = 83 Learnable per-channel phase
2×4=82 \times 4 = 84 Learnable linear projection Maps input to per-channel scalar
2×4=82 \times 4 = 85 2×4=82 \times 4 = 86 Lower bound on composite period

For multi-dimensional inputs, 2×4=82 \times 4 = 87 maps 2×4=82 \times 4 = 88 into per-channel scalars before the prime-harmonic expansion is applied. The paper also gives an extension to explicit time dependence,

2×4=82 \times 4 = 89

although the experiments are reported as using state variables through a single projection.

A key period estimate is the primorial

W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),0

For W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),1, the paper states that the primorial exceeds W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),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

  1. Lifting, evolution, and projection

Within the Fractal Neural Operator, HWE is the lifting block. The architecture is given in three stages: W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),3 The encoder lifts the input state W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),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).

  1. Training setup and computational form

The canonical benchmark is Lorenz-63,

W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),5

with W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),6, W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),7, W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),8. Trajectories are generated via RK4 at W(x)=n=0ancos ⁣(bnπx),W(x) = \sum_{n=0}^{\infty} a^{n} \cos\!\big(b^{n} \pi x\big),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

  1. 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 bNb \in \mathbb{N}0 implies a discrete bNb \in \mathbb{N}1-like energy distribution over prime-indexed bands. The paper writes that if bNb \in \mathbb{N}2, then loosely the per-band energy scales as

bNb \in \mathbb{N}3

which maintains persistent energy in high frequencies compared to steeper exponential decays.

  1. Coprimality and suppression of false periodicity

The non-resonance argument is based on pairwise coprimality. Geometric sets bNb \in \mathbb{N}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 bNb \in \mathbb{N}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 bNb \in \mathbb{N}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

  1. 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 bNb \in \mathbb{N}7 is said to show a Lyapunov Horizon of bNb \in \mathbb{N}8 steps with MSE bNb \in \mathbb{N}9, compared with ab>1ab > 10 steps and MSE ab>1ab > 11 for geometric ab>1ab > 12 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

ab>1ab > 13

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 ab>1ab > 14 discretization. The paper treats these as consistent with the qualitative claim that HWE extends predictive validity deep into the chaotic regime.

  1. 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 ab>1ab > 15, 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

  1. Recommended operating regime

The practical guidance recommends using the first ab>1ab > 16 primes, with ab>1ab > 17 between 16 and 64 as a reasonable starting point. It identifies ab>1ab > 18 as effective, suggests steepening the decay toward ab>1ab > 19 if training is unstable, and flattening toward Ψ\Psi0 if high frequencies are underfit. Phases are initialized from Ψ\Psi1 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 Ψ\Psi2 to Ψ\Psi3 per channel, with normalized inputs and possible per-dimension scaling to avoid saturating cosines. For the GRU kernel, the guidance gives hidden size Ψ\Psi4 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.

  1. Known limitations

The paper identifies several limitations. Increasing Ψ\Psi5 linearly raises encoder cost, so very large Ψ\Psi6 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

  1. 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 Ψ\Psi7 (Wu et al., 2022). In the specific single-mode example at Ψ\Psi8, the paper reports Ψ\Psi9 for the square lattice and xx0 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 xx1, with a Weierstrass-type representation xx2 built from meromorphic data constrained by the outer involution and grading (Correia et al., 2014). Discrete harmonic surfaces in xx3 are generated from a trivalent graph, a holomorphic function, and a discrete holomorphic quadratic differential by the edge formula

xx4

with xx5, 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 xx6-forms xx7 and period correction by holomorphic differentials to obtain

xx8

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

xx9

is doubly periodic and harmonic away from the lattice, and is used to construct weight-jj0 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 jj1 (Alfes-Neumann et al., 2023), and to elliptic-curve settings in which Weierstrass mock modular forms and theta lifts encode central jj2-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 jj3 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

jj4

for harmonic maps with square dilatation jj5 (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).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Harmonic Weierstrass Encoder.