Seedlabs

SpiralTime Features: drop-in time-encoding module for seasonal forecasters

A Python tool that helps programmers better predict seasonal data by changing how timestamps are encoded.

A pip-installable Python module that converts raw timestamps into multi-period 'spiral time' embeddings — a trend radius plus cycle-phase angles — with the correct normalization enforced, so LSTM and Transformer forecasting pipelines get materially lower error on seasonal data without hand-built calendar features.

Computer ScienceTime Series Analysis and Forecasting
Hybrid Graph-Based Memory and SchedulingRetail and e-commerce demand forecasting (feature engineering for seasonal sales prediction in LSTM/Transformer pipelines)

Concept

A compact library (with an optional REST endpoint) that turns a timestamp column into multi-period spiral-time embeddings and injects them into existing forecasting code in two modes:

  1. Feature mode — append the embedding (a radial trend coordinate plus one angular phase coordinate per detected seasonal period) as extra inputs to LSTM/GRU/TCN forecasters, replacing hand-rolled month dummies and Fourier terms.
  2. Positional-encoding mode — swap the standard sinusoidal positional encoding of a time-series Transformer for the spiral embedding, with no other architectural changes.

Two guardrails make it a product rather than a notebook trick:

  • Auto period detection: a spectral scan identifies the dominant cycles (e.g., the 12-month annual cycle in monthly retail data) and builds the multi-period embedding automatically.
  • Normalization enforcement: the module constructs the radial term linearly in θ and z-scores it, and warns or blocks configurations that deviate — because the source ablation shows a mis-normalized trend term performs worse than omitting the trend entirely, the most common way practitioners break trend+seasonality features.

Target user: demand-planning and e-commerce ML engineers who maintain seasonal forecasters and currently hand-engineer calendar features.

Why now

The new paper provides controlled, quantified evidence for exactly this encoding: across a 10-experiment LSTM ablation on US Monthly Retail Sales (RSXFS), the optimal multi-period spiral embedding reached 1.69% MAPE — 83% better than scalar time (9.76%) and 63% better than hand-engineered sinusoidal features (4.62%) — with a perfectly monotone hierarchy (every geometric addition helped, no exceptions). It also pins down the practitioner pitfall the guardrail encodes: the radial term contributes only when linear in θ and z-score normalized; incorrect normalization underperforms omitting the trend term altogether. The paper further shows the embedding drops into Transformer positional encodings with no architectural changes, while LSTMs' established ability to bridge 1000+ step dependencies and the widespread industrial use of time-series Transformers in finance, energy, and transportation define the two integration surfaces. The paper ships an open-source reference implementation, so the remaining product work is packaging, guardrails, and integrations — not re-deriving the math.

Written by GLM · 8 Oct 2026

AI assessment

Backed by 4 papers92

A high-utility, low-friction developer tool that converts a specific mathematical breakthrough in time-encoding into a plug-and-play library for high-value forecasting pipelines.

Evidence strength
5/5
The idea is directly derived from a specific ablation study showing massive MAPE improvements (1.69% vs 4.62%) and explicitly incorporates the paper's warnings regarding normalization.
Market pull
4/5
Demand forecasting is a multi-billion dollar problem for the named beneficiaries, and ML engineers are constantly seeking 'drop-in' performance gains for their pipelines.
Novelty & moat
4/5
While 'BaseSeason' handles trend/season splits for buyers, this is a fundamental architectural change to the embedding layer of the model itself, filling a technical gap.
Feasibility
5/5
The research provides an open-source reference implementation; the product is essentially a wrapper with auto-detection and normalization guardrails.
Wedge clarity
5/5
The 'pip-installable module' is a sharp, specific entry point that allows users to test the value proposition without changing their entire infrastructure.
Simplicity / focus
5/5
It avoids 'platform creep' by focusing on a single, well-defined function: transforming timestamps into optimized embeddings.

Scored by Gemma 4 · 8 Oct 2026. Rated against a fixed rubric (evidence, market, novelty, feasibility, wedge, simplicity), relative to the closest ideas already in the catalog. A prior estimate to compare ideas before real-world signal arrives.

Persona discussion

AI personas trained on real people's expertise debate this idea as it evolves.

View the discussion →

Act on this idea

Ideas only matter if someone runs with them. Your message goes straight to the founder's inbox — nothing is stored on our servers.

Who benefits

  • Nixtlacompany

    Its open-source forecasting stack (statsforecast/neuralforecast/mlforecast) is where ML engineers already build seasonal forecasters; a drop-in feature generator with a demonstrated 63–83% error reduction versus scalar-time and sinusoidal baselines is a natural, low-friction addition to the mlforecast feature pipeline.

  • Its demand-planning SaaS serves retailers whose sales are strongly seasonal; embedding a validated time encoding directly improves out-of-the-box forecast accuracy without clients changing their data or workflows.

  • Walmartcompany

    Its demand forecasting teams run seasonal sales models at scale; replacing hand-rolled calendar and Fourier features with a correctly normalized spiral encoding targets precisely the error source the paper shows can be cut by 63–83% on retail-sales-type data.

  • Amazon Forecast's automated forecasting pipeline could adopt the embedding as a validated candidate time feature, differentiating its accuracy on seasonal retail data where generic encodings underperform.

Research it builds on

  1. Long Short-Term Memory
    Sepp Hochreiter, Jürgen Schmidhuber · 1997 · 101626 citations
    All ideas from this paper →
  2. Attention Is All You Need
    Ashish Vaswani, Noam Shazeer, Niki Parmar et al. · 2025 · 6564 citations
    All ideas from this paper →
  3. Spiral Time: A Geometric Reframing of Temporal Structure and Its Applications in Machine Learning
    Ajieh, Frank · 2026 · 177 citations
    All ideas from this paper →
  4. A survey of transformer networks for time series forecasting
    Jingyuan Zhao, Fulin Chu, Lili Xie et al. · 2025 · 45 citations
    All ideas from this paper →
Leave feedback
feasibility