June 22, 2026
5
min read
Research

Implementing transformer-based models and demand agents to improve time-series forecast accuracy

Today we’re launching agentic Demand Forecasting as a verticalized offering on Hyde’s platform. Our CPG and retail partners are already seeing strong results by applying transformer-based forecasting models and AI agents to auto-improve their forecast accuracy.

The structural ceiling facing time-series forecasting

Traditional forecasting approaches rely on static, single-pass forecasting that extrapolates future outcomes from historical data. While effective in stable environments, these models struggle with real-world complexity: demand volatility, sparse or noisy data, evolving consumer behavior, and unforeseen disruptions. As a result, many organizations hit a structural ceiling in forecasting accuracy.

This is a common challenge faced by enterprises in retail and CPG contexts, where specifically, traditional forecasting models struggle to overcome imperfect historical data and highly seasonal demand patterns driven by events such as festivals and promotional cycles.

AI-powered forecasting takes a fundamentally different approach to prediction than traditional statistical methods. First, transformer-based forecasting models leverage machine learning with real-world demand context to overcome long-tail and sparse forecasting. Second, agentic forecasting systems help build best in class models by actively evaluating uncertainty, incorporating new information, and iteratively refining as conditions evolve.

To assess these AI techniques in practice, we implemented both transformer-based models and Hyde demand forecasting agents in two separate enterprise settings. In both, AI systems consistently outperformed traditional forecasting methods, delivering more accurate forecasts, greater planning agility, and improved business outcomes.

1. Transformer-based models

Transformer architectures are rapidly reshaping the landscape of time-series forecasting. Unlike traditional statistical models that process data sequentially, transformers evaluate the full context window simultaneously, allowing them to selectively focus on the most relevant signals for prediction. This allows them to capture more complex temporal patterns, handle noisier or sparser data, and deliver more accurate long-range forecasting.

We worked with a retailer to uplift their forecast accuracy modelling. We started by creating a complex ARIMA + XGBoost/Light GBM tree-based model that drove a 5 percentage-point (pp) improvement in forecast accuracy. We then experimented with the transformer-based forecasting model where zero-shot and few-shot inference demonstrated 3pp gains. This suggests that transformer models do not work as effectively out-of-the-box.

We then developed a custom transformer-based forecasting model through targeted fine-tuning using the retailer's enterprise-specific data and operational context. The model was trained not only on historical demand patterns, but also on forecasting covariates that drive demand such as seasonality, festival cycles, and pay-day effects. We additionally trained the model with a custom loss function to better penalize forecast errors.

The resulting transformer model was able to uncover deeper temporal patterns that traditional statistical methods failed to detect, despite relatively limited historical data. Ultimately, it delivered a 7pp improvement in forecast accuracy over the existing ARIMA-based system while extending the forecasting horizon.

Accuracy improved by 7pp by fine-tuning a transformer model
2. Agents to code-gen classical ML for forecast self-discovery

Hyde's demand forecasting agents were able to run machine learning experiments and build models autonomously and at scale. Instead of a data scientist testing one hypothesis at a time, multiple AI agents operate in parallel, each exploring a distinct optimization path. Every experiment is evaluated against a shared objective and ranked on a common leaderboard, with only improvements to validation performance retained. In effect, model development becomes a competitive search process rather than a sequential one.

We applied this at a manufacturing and retail company where we gave the AI agents a clear objective: maximize forecast accuracy across the full demand cycle (peak period, low-demand period, and seasonal transitions) without disproportionately optimizing for larger stores at the expense of smaller ones. The agents were also provided with the full experimental history from the human team, including prior modelling approaches, observed failures, and the same underlying dataset. To ensure that the agents did not converge to a single approach, we implemented two conditions: the model had to improve across all four distinct seasonal windows, and each agent was assigned a distinct area of focus, including external data sources, feature engineering, model architecture, and fine tuning.

Run 1: Agents with full experimental history

The Hyde demand forecasting agents built models that produced forecasts that were 4pp more accurate than the best traditional model, while also improving consistency across seasonal periods by 60%. Performance gains were especially significant during the post-peak months, historically the largest blind spot in the manual forecasting pipeline, where forecast accuracy improved by nearly 25%.

These gains were achieved with remarkable efficiency: 174 experiments completed autonomously in just three hours.

Importantly, this approach had never been attempted by the human team despite extensive prior experimentation. This highlights the ability of agentic systems not only to optimize faster, but also to uncover non-obvious solutions beyond the conventional search space.

Run 2: Agents with a weaker context baseline

One important caveat in the initial experiments was that the agents had access to the full experimental history produced by the human team. To evaluate performance without this advantage, we conducted another experiment using a context baseline three times weaker than run 1.

Within 15 minutes, the agents matched six weeks of human effort. Within two hours, they surpassed it. These results highlight the speed and compounding nature of agentic experimentation, where agents learn from each other in real time.

Run 3: Agents with drift prevention

We conducted a final experiment to address the drift that was occurring between the agents. To solve for this, we hardcoded a prompt into each agent's context after every experiment to prevent convergence. Two agents working in separate lanes each found improvements the other had not, and one combined both into a solution that outperformed everything else. This produced the highest accuracy, more than 5pp higher than the best-performing traditional model.

Accuracy improved by 5.3pp in 6 hr agent run
3. Reinforcement learning for further improvement

Reinforcement learning techniques were further applied to enable the model to actively learn from the divergence between predictions and actuals, identifying the underlying drivers of that gap and feeding them back into model training. This shifts the system from a static model that gets periodically retrained to one that continuously adapts, improving its own decision-making through every forecasting cycle.

What this means for enterprises

AI time-series forecasting represents a step-change over traditional forecasting systems, overcoming the limitations of static models that fail to reflect real-world complexity. Hyde agents demonstrates that autonomous agents can surpass weeks of human experimentation in just hours, while transformer-based architectures unlock deeper pattern recognition even in sparse or noisy data environments.

For enterprises, this creates the opportunity for a fundamental improvement in forecast accuracy and operational resilience. By continuously reasoning over historical data, incorporating real-world changes in real time, and learning directly from the gap between forecasts and outcomes, AI forecasting systems can adapt as conditions evolve rather than relying on periodic retraining cycles.

The business impact extends across the enterprise, spanning both top-line and bottom-line metrics. As forecasting systems become more adaptive, enterprises can make faster, more confident operational decisions in increasingly volatile environments.

Ready to see how Hyde's demand agents can drive major forecast accuracy improvements vs legacy approaches?
Book a demo with us at bootcamps@buildwithhyde.com.