A Predict-then-Correct Loop Based on Few-Shot Continuous Contextual Bandit for Demand Forecasting

arXiv cs.LG Papers

Summary

The paper proposes a Predict-then-Correct (PtC) framework using a few-shot continuous contextual bandit to adaptively correct base ML forecasts in retail demand forecasting, achieving significant improvements in error metrics and inventory costs over baselines.

arXiv:2607.16354v1 Announce Type: new Abstract: Retail demand forecasting remains difficult when demand shifts faster than static forecasting models can be retrained, especially in early demand cycles where newly observed labels are sparse. To address this, this study aims to improve adaptive retail forecasting by proposing a predict-then-correct (PtC) framework that retains a first-stage machine learning (ML) forecast and applies a few-shot continuous contextual bandit correction policy with similar-SKUs augmentation and top-p masked updating. Across Walmart retail data and an exclusive beverage dataset, PtC delivers statistically significant reductions in MAPE, MAE, and RMSE across stable & high volume, stable & low volume, and erratic & intermittent demand patterns, improves average RMSE by 9.52% over the ML-only baseline in the ablation study, and yields lower inventory costs than base-stock, proximal policy optimization, and soft actor-critic policies under the tested lead-time settings. These findings show that online forecast correction can bridge offline demand learning and real-time retail decision-making by adapting to sparse feedback without fully retraining the base forecasting model.
Original Article
View Cached Full Text

Cached at: 07/21/26, 06:48 AM

# A Predict-then-Correct Loop Based on Few-Shot Continuous Contextual Bandit for Demand Forecasting
Source: [https://arxiv.org/html/2607.16354](https://arxiv.org/html/2607.16354)
Zhiwei Leia, Benedict Jun Maaand Ilya Jacksonb aThrust of Intelligent Transportation, Hong Kong University of Science and Technology \(Guangzhou\), China; bCenter for Transportation and Logistics, Massachusetts Institute of Technology, USA;

###### Abstract

Retail demand forecasting remains difficult when demand shifts faster than static forecasting models can be retrained, especially in early demand cycles where newly observed labels are sparse\. To address this, this study aims to improve adaptive retail forecasting by proposing a predict\-then\-correct \(PtC\) framework that retains a first\-stage machine learning \(ML\) forecast and applies a few\-shot continuous contextual bandit correction policy with similar\-SKUs augmentation and top\-ppmasked updating\. Across Walmart retail data and an exclusive beverage dataset, PtC delivers statistically significant reductions in MAPE, MAE, and RMSE across stable & high volume, stable & low volume, and erratic & intermittent demand patterns, improves average RMSE by 9\.52% over the ML\-only baseline in the ablation study, and yields lower inventory costs than base\-stock, proximal policy optimization, and soft actor\-critic policies under the tested lead\-time settings\. These findings show that online forecast correction can bridge offline demand learning and real\-time retail decision\-making by adapting to sparse feedback without fully retraining the base forecasting model\.

Keywords:demand forecasting; predict\-then\-correct; contextual bandit; few\-shot learning\.

## 1Introduction

Retail supply chains are high\-dimensional, uncertain, and complex decision systems that tightly couple demand forecasting, inventory control, and multi\-stage logistics operations\(Cohenet al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib23)\)\. This system\-level complexity is driven primarily by three interrelated dimensions: stochastic demand, network structure, and dynamic decision\-making\. First, customer demand is non\-stationary and volatile, often affected by exogenous market conditions, pricing mechanisms, and promotional activities\(Fahimniaet al\.,[2025](https://arxiv.org/html/2607.16354#bib.bib3)\)\. Second, managing millions of stock\-keeping units \(SKUs\) across multi\-echelon distribution networks introduces intricate product\-level relationships, such as substitution effects, complementarity, and cross\-item resource sharing\(Maet al\.,[2016](https://arxiv.org/html/2607.16354#bib.bib26)\)\. Third, key operational decisions, including inventory allocation\(Khouja and Zhou,[2019](https://arxiv.org/html/2607.16354#bib.bib115); Kimet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib117)\), dynamic pricing\(Zhonget al\.,[2020](https://arxiv.org/html/2607.16354#bib.bib119)\), and robust procurement\(Wagner,[2015](https://arxiv.org/html/2607.16354#bib.bib113); Liet al\.,[2024a](https://arxiv.org/html/2607.16354#bib.bib114)\), exhibit complex time\-dependent characteristics\(Huanget al\.,[2019](https://arxiv.org/html/2607.16354#bib.bib28)\)\. Consequently, inaccurate demand forecasts can propagate beyond the forecasting stage and distort downstream operational decisions, leading to severe stockouts or costly backlogs that degrade overall supply chain performance\(Cohenet al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib23)\)\.

With the rapid development of artificial intelligence \(AI\) and enterprise big data infrastructures, modern supply chains are actively evolving into data\-driven cyber\-physical systems that achieve real\-time perception and dynamic closed\-loop optimization\(Punia and Shankar,[2022](https://arxiv.org/html/2607.16354#bib.bib6); Mandania and Oliveira,[2023](https://arxiv.org/html/2607.16354#bib.bib118)\)\. In this context, demand forecasting constitutes a fundamental analytical function for such intelligent supply chain systems\. Industry evidence suggests that AI\-driven forecasting frameworks can reduce prediction errors by 20% to 50%, lower holding costs by 5% to 10%, and reduce lost sales by up to 65%\(McKinsey,[2022](https://arxiv.org/html/2607.16354#bib.bib1)\)\. Methodologically, this development has accelerated a shift in forecasting research from classical parametric time\-series models toward supervised machine learning \(ML\) architectures, such as long short\-term memory \(LSTM\) networks\(Hochreiter and Schmidhuber,[1997](https://arxiv.org/html/2607.16354#bib.bib11)\), gradient boosting machines \(GBM\)\(Friedman,[2001](https://arxiv.org/html/2607.16354#bib.bib14)\), XGBoost\(Chen and Guestrin,[2016](https://arxiv.org/html/2607.16354#bib.bib12)\), and deep learning \(DL\) architectures such as transformer\-based variants\(Zhanget al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib13); Liet al\.,[2024b](https://arxiv.org/html/2607.16354#bib.bib15)\)\. Due to the abilities of nonlinear mapping, these data\-driven approaches have demonstrated decisive algorithmic superiority over traditional statistical benchmarks in large\-scale forecasting\(Makridakiset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib17); Leiet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib16)\)\.

Despite these advances, offline\-trained ML models remain limited when deployed in rapidly changing and non\-stationary market environments\. During a new demand cycle or a product launch period, market dynamics often suffer from sharp structural breaks compared to historical regimes, inducing acute data sparsity and prominent “cold\-start” challenges\(Petropouloset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib18)\)\. Because traditional supervised pipelines rely on rigid, batch\-oriented training and require massive data pools for expensive offline retraining, they cannot seamlessly ingest real\-time demand feedback\. In practice, the correction of forecast bias therefore remains largely reactive\(Wanget al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib19)\)\. Once a base model is trained and deployed, it operates as an open\-loop predictor that lacks the capacity for real\-time calibration against short\-term operational fluctuations and concurrent temporal shifts\. This reveals a critical methodological void: the absence of a systematic, sample\-efficient mechanism engineered to explicitlylearn to correctbaseline prediction errors on the fly\.

To bridge this gap, this study proposes a novelpredict\-then\-correct\(PtC\) loop framework designed for adaptive demand calibration\. Instead of treating forecast\-error correction as a passive label\-fitting task, we reformulate real\-time forecast adjustment as a contextual bandit \(CB\) problem\. In the proposed framework, an offline ML model first generates baseline predictions, after which an online few\-shot continuous contextual bandit \(FSCCB\) policy dynamically fine\-tunes these predictions by selecting bounded, continuous corrective actions from streaming market contexts based on immediate reward feedback\. The core advantage of this architecture lies in its decoupled, closed\-loop design: it preserves the structural, historical knowledge captured by the offline base model, while enabling the system with real\-time, step\-by\-step responsiveness as market observations gradually unfold\. To resolve data scarcity and the stability\-plasticity dilemma inherent in early\-cycle launches, the framework further integrates a feature\-similar sequence data augmentation strategy and a sparse parameter update mechanism\(Mazumderet al\.,[2021](https://arxiv.org/html/2607.16354#bib.bib61)\)that updates only highly sensitive policy parameters while freezing the primary structural network\. Ultimately, this framework shifts the operational forecasting paradigm from static prediction to autonomous, self\-calibrating intelligent control\.

The main contributions of this paper are summarized as follows:

\(1\) We propose a two\-stage PtC framework that couples AI/ML forecasting with a CB correction model\. This transforms static, open\-loop demand forecasting into an adaptive, closed\-loop system, significantly enhancing prediction responsiveness to market fluctuations\.

\(2\) To tackle real\-time data scarcity, we develop a few\-shot continuous updating strategy\. A base model is pretrained on historical data for initialization, and then dynamically fine\-tuned via streaming data augmentation and a selective parameter update mechanism, enabling rapid adaptation to new demand patterns while preventing overfitting and catastrophic forgetting\.

The remainder of the paper is organized as follows\. Related works are reviewed in the next section\. Section[3](https://arxiv.org/html/2607.16354#S3)describes the details of the two\-stage framework\. The experimental results are discussed in Section[4](https://arxiv.org/html/2607.16354#S4)\. Section[5](https://arxiv.org/html/2607.16354#S5)discusses the application of PtC in the inventory management system\. Conclusions are presented in Section[6](https://arxiv.org/html/2607.16354#S6)\.

## 2Literature review

### 2\.1Traditional statistical methods for demand forecasting

Classical demand forecasting research first developed around extrapolative time\-series models\. Naive, moving\-average, exponential\-smoothing, and ARIMA\-family models remain widely used because they are transparent, computationally efficient, and effective when demand contains stable level, trend, or seasonal components\(Taylor,[2003](https://arxiv.org/html/2607.16354#bib.bib120); Nikolopouloset al\.,[2011](https://arxiv.org/html/2607.16354#bib.bib121); Hyndman and Athanasopoulos,[2018](https://arxiv.org/html/2607.16354#bib.bib75)\)\. Exponential\-smoothing models place greater weight on recent observations and therefore provide a simple way to adapt to gradual level or trend changes, while ARIMA\-type models use autoregressive and moving\-average structures to capture serial dependence after differencing\. These models are especially attractive in operational environments because they are easy to implement and require limited feature engineering\. Retail applications extended these ideas to volatile and skewed demand settings: early work on retailer demand forecasting identified promotions, competitor actions, weather, and holidays as important drivers\(Geurts and Kelly,[1986](https://arxiv.org/html/2607.16354#bib.bib32)\), while later studies developed interval forecasts, hybrid SARIMAX quantitative methods, and intermittent\-demand aggregation strategies for demand series with irregular arrivals or heavy\-tailed errors\(Taylor,[2007](https://arxiv.org/html/2607.16354#bib.bib24); Arunraj and Ahrens,[2015](https://arxiv.org/html/2607.16354#bib.bib31); Nikolopouloset al\.,[2011](https://arxiv.org/html/2607.16354#bib.bib121)\)\. The strength of this stream is its clarity: the source of each forecast is usually traceable to level, seasonality, trend, or a small set of lagged terms\. Its limitation is equally clear\. Once the functional form has been specified, the model has limited flexibility to represent nonlinear promotion effects, changing consumer response, cross\-SKU substitution, or sudden shifts in demand regimes\. Thus, classical statistical models provide reliable baselines, but they are less suited to settings where the main forecasting challenge is rapid adaptation rather than stable extrapolation\.

A second stream uses causal, multivariate, and econometric models to incorporate explanatory factors into demand forecasts\. In retail systems, demand is rarely driven by time alone\. All prices, discounts, display activities, holidays, competitive information, search intensity, weather, social\-media signals, and product attributes can alter realized sales\. Therefore, operations and forecasting studies have examined how external information can be integrated into forecast pipelines and how judgmental or promotional adjustments affect forecast quality\(Fildeset al\.,[2008](https://arxiv.org/html/2607.16354#bib.bib122); Traperoet al\.,[2013](https://arxiv.org/html/2607.16354#bib.bib123); Steinkeret al\.,[2017](https://arxiv.org/html/2607.16354#bib.bib130); Booneet al\.,[2018](https://arxiv.org/html/2607.16354#bib.bib131); Cuiet al\.,[2018](https://arxiv.org/html/2607.16354#bib.bib132); Fildeset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib133)\)\. In fast\-moving consumer goods and retail settings at the SKU\-level, variable selection and structured econometric models have been used to address high\-dimensional promotional variables, competitive effects, and time\-varying marketing impacts\(Maet al\.,[2016](https://arxiv.org/html/2607.16354#bib.bib26); Huanget al\.,[2014](https://arxiv.org/html/2607.16354#bib.bib27),[2019](https://arxiv.org/html/2607.16354#bib.bib28); Yeet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib33)\)\. Hierarchical Bayesian and finite\-mixture extensions further examine whether store\-level heterogeneity improves forecast and elasticity estimation\(Andrewset al\.,[2008](https://arxiv.org/html/2607.16354#bib.bib34)\)\. These studies make an important contribution by linking prediction to interpretable business mechanisms: instead of treating demand as an autonomous time series, they show how observed operational levers can improve forecast accuracy and managerial understanding\. However, this gain in explanatory richness creates a practical tradeoff\. Causal and multivariate models require well\-measured covariates, stable relationships between covariates and demand, and enough observations to estimate the effects reliably\. When many promotional, price, calendar, and competitive variables are included, the model can face sparse event coverage and a heavy variable\-selection burden\(Traperoet al\.,[2015](https://arxiv.org/html/2607.16354#bib.bib124)\)\. These difficulties are particularly acute for new products, short sales windows, and low\-volume SKUs, where the data needed to estimate a rich explanatory model may not yet exist\.

Large\-scale empirical evidence also warns that model complexity does not automatically translate into better forecasts\. The M\-competitions showed that statistically sophisticated methods may fail to outperform simpler alternatives on broad forecasting benchmarks\(Makridakiset al\.,[1982](https://arxiv.org/html/2607.16354#bib.bib126),[1993](https://arxiv.org/html/2607.16354#bib.bib127); Makridakis and Hibon,[2000](https://arxiv.org/html/2607.16354#bib.bib128)\), and related evidence argues that excessive model complexity can reduce accuracy, increase error opportunities, and weaken managerial usability\(Green and Armstrong,[2015](https://arxiv.org/html/2607.16354#bib.bib125)\)\. This finding is important for retail supply chains because forecasting is not an isolated statistical exercise\. Forecasts are inputs to replenishment, allocation, pricing, and inventory\-control decisions, so a method that is marginally more accurate but difficult to maintain may still be unattractive in practice\. Studies in fast\-fashion inventory and online\-retail analytics illustrate that demand forecasts create value only when they are timely and operationally usable\(Caro and Gallien,[2010](https://arxiv.org/html/2607.16354#bib.bib129); Ferreiraet al\.,[2016](https://arxiv.org/html/2607.16354#bib.bib135)\)\. A forecast produced after a long retraining cycle may be too late for ordering decisions; a model that requires extensive manual feature redesign may be too costly for thousands of SKUs; and a method that performs well on average may still fail when early\-cycle observations are sparse\.

### 2\.2Machine learning and deep learning models

ML and DL methods have expanded the forecasting toolkit by allowing nonlinear mappings, high\-dimensional covariates, and large\-scale pattern learning\. Review studies report a broad adoption of ML tools in supply\-chain demand forecasting, supplier selection, order allocation, and related operational prediction tasks\(Aameret al\.,[2021](https://arxiv.org/html/2607.16354#bib.bib138); Ingleet al\.,[2021](https://arxiv.org/html/2607.16354#bib.bib140); Islamet al\.,[2021](https://arxiv.org/html/2607.16354#bib.bib141); Feizabadi,[2022](https://arxiv.org/html/2607.16354#bib.bib139); Malviya and Bhandari,[2024](https://arxiv.org/html/2607.16354#bib.bib142)\)\. In retail demand prediction, richer information sources and supervised\-learning methods have enabled models to use weather, promotion, search, social\-media, product\-attributes and price information on a scale that is difficult for traditional statistical models\(Steinkeret al\.,[2017](https://arxiv.org/html/2607.16354#bib.bib130); Booneet al\.,[2018](https://arxiv.org/html/2607.16354#bib.bib131); Cuiet al\.,[2018](https://arxiv.org/html/2607.16354#bib.bib132); Leiet al\.,[2023](https://arxiv.org/html/2607.16354#bib.bib134); Ferreiraet al\.,[2016](https://arxiv.org/html/2607.16354#bib.bib135); Alleyet al\.,[2023](https://arxiv.org/html/2607.16354#bib.bib136)\)\. The 2020 M5 Accuracy competition further illustrates this shift: leading methods were ML\-based and achieved strong accuracy improvements over traditional statistical benchmarks on large\-scale hierarchical Walmart sales data\(Makridakiset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib17)\)\. This line of work shows that data\-intensive models can represent complex retail patterns, pool signals across products, and exploit high\-dimensional covariates\. It also changes the role of forecasting in supply chains\. Forecasting is no longer only an extrapolation task based on a single SKU history; it becomes a pattern\-learning problem that uses cross\-product, temporal, promotional, and contextual signals to infer future demand\.

Within this broad family, different model classes address different sources of complexity\. Tree\-based ensemble models, such as gradient boosting frameworks, are effective when forecasting is based on tabular covariates, nonlinear interactions, and heterogeneous feature effects\. Neural networks and deep sequence models capture nonlinear relationships and temporal dependencies\. Early evidence of ANN, CNN\-based time\-series models, LSTM architectures, attention mechanisms, and Transformer variants have been used to improve retail or time\-series forecasting\(Adya and Collopy,[1998](https://arxiv.org/html/2607.16354#bib.bib36); Alonet al\.,[2001](https://arxiv.org/html/2607.16354#bib.bib35); Aburto and Weber,[2007](https://arxiv.org/html/2607.16354#bib.bib37); Zhanget al\.,[2019](https://arxiv.org/html/2607.16354#bib.bib38); Graves and Schmidhuber,[2005](https://arxiv.org/html/2607.16354#bib.bib40); Mamdouhet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib41); Gaoet al\.,[2023](https://arxiv.org/html/2607.16354#bib.bib42); Zhanget al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib13); Liet al\.,[2024b](https://arxiv.org/html/2607.16354#bib.bib15)\)\. These models are attractive because they can learn representations rather than requiring researchers to specify all interactions manually\. In the retail setting, this is especially useful when demand is jointly affected by price, promotion, calendar, assortment, and historical sales signals\. At the same time, deep models can be data\-hungry, sensitive to distribution shifts, and difficult to interpret\. Their empirical success often depends on the availability of large training histories and on whether future conditions resemble the historical regimes used for training\. When demand changes after deployment, simply relying on the offline model may be insufficient, even if the model was strong on the original test set\.

Other ML streams complement deep sequence forecasting by addressing uncertainty, dependency, and robustness\. Gaussian process and neural network applications in agricultural, commodity, real\-estate, and financial price series demonstrate the value of flexible nonlinear learning and uncertainty\-aware prediction in related time\-series environments\(Xu and Zhang,[2021](https://arxiv.org/html/2607.16354#bib.bib143),[2023](https://arxiv.org/html/2607.16354#bib.bib145); Jin and Xu,[2025b](https://arxiv.org/html/2607.16354#bib.bib149)\)\. Graph and causal structure methods address interconnected markets and contemporaneous dependencies, which are relevant to retail systems where products may substitute, complement, or share demand drivers\(Jin and Xu,[2025a](https://arxiv.org/html/2607.16354#bib.bib152)\)\. Ensemble and composite forecasts improve robustness by combining multiple base learners and reducing dependence on a single model specification\(Guoet al\.,[2025](https://arxiv.org/html/2607.16354#bib.bib137)\)\. These approaches broaden the modeling landscape, but they also highlight a recurring limitation\. However, the literature has developed many powerful first\-stage predictors, but the second\-stage question of real\-time forecast correction remains less developed\.

The need for adaptation has motivated online learning, reinforcement learning, and continual\-learning approaches in operations and forecasting\. Online\-learning studies emphasize updating models as new data arrive, while reinforcement\-learning studies show how operational policies can learn from repeated interaction with uncertain environments\(Petropouloset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib18); Wanget al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib19); Bouteet al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib21); Gijsbrechtset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib22)\)\. These studies are important because they move beyond purely static prediction and recognize that decisions and observations unfold sequentially\. However, a direct reinforcement\-learning formulation may be excessive for demand correction when the immediate goal is not to learn an entire inventory policy but to adjust a baseline forecast before downstream decisions are made\. Similarly, online retraining can be costly and unstable when only a few new observations are available\. Continual\-learning and few\-shot studies further show that unrestricted parameter updates can cause overfitting or catastrophic forgetting under limited new data\(Kirkpatricket al\.,[2017](https://arxiv.org/html/2607.16354#bib.bib53); Tianet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib54); Bethuneet al\.,[2025](https://arxiv.org/html/2607.16354#bib.bib55); Mazumderet al\.,[2021](https://arxiv.org/html/2607.16354#bib.bib61)\)\. This creates a stability\-plasticity dilemma: a model must adapt enough to correct new bias, but not so much that it destroys the useful structure learned from previous demand cycles\.

The closest unresolved issue is therefore not whether advanced forecasting models can be accurate offline, but how their forecasts should be adapted online after new demand feedback is observed\. Most demand forecasting pipelines still generate static predictions, select among static models, or require costly retraining when demand changes\. They rarely treat each forecast as a decision that can be immediately corrected using contextual feedback\. This distinction is central to our study\. The PtC framework does not attempt to replace statistical, machine\-learning, or deep\-learning forecasters\. Instead, it uses them as the first stage and adds a CB\-based correction policy as the second stage\. The CB formulation is appropriate because each correction action receives immediate feedback through the change in forecast error, which makes the learning signal local, interpretable, and sample efficient\. The few\-shot continuous updating design further addresses the limited\-data setting by updating only selected parameters through the Top\-ppmechanism, thus preserving prior correction knowledge while allowing local adaptation\.

## 3Solution methods

### 3\.1AI/ML prediction and data augmentation

Figure[1](https://arxiv.org/html/2607.16354#S3.F1)illustrates the overall framework of the proposed PtC method\. In the first stage, using average demand, coefficient of variation \(CoV\), and intermittency as clustering features, SKUs will be divided into four categories: stable & high volume, stable & low volume, erratic & intermittent, and lumpy\(Maet al\.,[2025](https://arxiv.org/html/2607.16354#bib.bib77)\)\. Each category is then associated with an ML algorithm for prediction\. For the target SKU, the first step is to identify its category and then generate a baseline forecast using the corresponding ML model\. The resulting baseline forecast is used as input to the second stage\. Augmentation data selection within each cluster is provided in Appendix[Appendix C: Augmentation Data Selection](https://arxiv.org/html/2607.16354#Ax3)\.

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/total_framework.png)Figure 1:Total framework of the proposed method\.In the second stage, we adopt the CB as the correction model to adjust the ML\-predicted demand by real\-time observations within a sliding window\. To support timely prediction and avoid delaying operational decisions, only five or seven days of demand information can be collected; otherwise, the correction loses its practical relevance\. In this setting, real\-time demand information from a single SKU is insufficient to train an effective correction policy and may cause severe overfitting or catastrophic forgetting\. Therefore, it is necessary to design a data augmentation strategy to expand the training set and alleviate these risks\.

For the target SKU, there are often numerous SKUs within the same cluster that share similar characteristics\. Thus, we first rank candidate SKUs by their Euclidean distance to the target SKU and then select thekknearest SKUs to augment the training set\. Meanwhile, an upper distance thresholddisd\_\{\\mathrm\{is\}\}is set to avoid selecting SKUs that are too dissimilar from the target SKU\. If fewer thankkSKUs satisfy this threshold, we apply same\-trend perturbations to both historical demand and ML\-predicted demand until a pre\-specified minimum training\-set size is reached\. Clustering, scaling, neighbor selection, and augmentation parameters are estimated using training\-period information only to prevent test\-period leakage\.

### 3\.2FSCCB

#### 3\.2\.1State, action, and reward design

With full observation enabled, the observed state, or context, of the PtC system at time stepttis denoted as:

st=\{grd,gxd,ged,gh​rd,gh​xd,gsd,gdt,grt,gwt,ght,gst\}\.s\_\{t\}=\\left\\\{g^\{d\}\_\{r\},g^\{d\}\_\{x\},g^\{d\}\_\{e\},g^\{d\}\_\{hr\},g^\{d\}\_\{hx\},g^\{d\}\_\{s\},g^\{t\}\_\{d\},g^\{t\}\_\{r\},g^\{t\}\_\{w\},g^\{t\}\_\{h\},g^\{t\}\_\{s\}\\right\\\}\.\(1\)
The description of each component is shown in Table[1](https://arxiv.org/html/2607.16354#S3.T1)\. Specifically,grdg^\{d\}\_\{r\}represents the historical real demand,gxdg^\{d\}\_\{x\}represents the historical ML\-predicted demand, andgedg^\{d\}\_\{e\}represents the historical prediction error\. In addition,gh​rdg^\{d\}\_\{hr\}andgh​xdg^\{d\}\_\{hx\}denote the mean historical real demand and the mean historical ML\-predicted demand, respectively, whilegsdg^\{d\}\_\{s\}measures the historical slope of the real demand\. Time\-related features include the current time step, the remaining time before the end of the cycle, and binary indicators for weekend, holiday and shopping festival effects\.

Table 1:State representation components\.In the CB framework,sts\_\{t\}is used as the contextual information available before making the correction decision\. The policy network uses this context to determine how the original ML prediction should be adjusted\.

In this study, the action is defined as the continuous adjustment factor applied to the ML\-predicted demand\. Given the observed contextsts\_\{t\}, the policy network outputs the mean and standard deviation of a Gaussian correction distribution, denoted byμθ​\(st\)\\mu\_\{\\theta\}\(s\_\{t\}\)andσθ​\(st\)\\sigma\_\{\\theta\}\(s\_\{t\}\), respectively\. During training and online adaptation, the correction action is sampled as

a~t∼𝒩​\(μθ​\(st\),σθ2​\(st\)\),at=clip⁡\(a~t,−1,2\)\.\\tilde\{a\}\_\{t\}\\sim\\mathcal\{N\}\\left\(\\mu\_\{\\theta\}\(s\_\{t\}\),\\sigma\_\{\\theta\}^\{2\}\(s\_\{t\}\)\\right\),\\qquad a\_\{t\}=\\operatorname\{clip\}\\left\(\\tilde\{a\}\_\{t\},\-1,2\\right\)\.\(2\)
Here,ata\_\{t\}denotes the sampled relative correction ratio\. A negative value indicates that the original ML prediction should be reduced, while a positive value indicates that the original ML prediction should be increased\. The action range is limited to\[−1,2\]\[\-1,2\]to prevent the correction model from generating unreasonable adjustment values\. The stochastic sampling in Eq\. \([2](https://arxiv.org/html/2607.16354#S3.E2)\) provides local exploration over possible upward and downward forecast adjustments\.

Given the original ML\-predicted demandy^tM​L\\hat\{y\}^\{ML\}\_\{t\}, the corrected demand is calculated as:

y^tC​B=y^tM​L​\(1\+at∗\),\\hat\{y\}^\{CB\}\_\{t\}=\\hat\{y\}^\{ML\}\_\{t\}\(1\+a\_\{t\}^\{\*\}\),\(3\)wherey^tC​B\\hat\{y\}^\{CB\}\_\{t\}denotes the demand value corrected by the CB model\.

Therefore, the CB policy does not directly predict the final demand\. Instead, it learns how to adjust the baseline ML prediction according to the observed context\.

The reward is defined as the relative degree of improvement after correction\. At each time steptt, the prediction error of the original ML model is calculated as:

eM​L,t=\|y^tM​L−yt\|,e\_\{ML,t\}=\\left\|\\hat\{y\}^\{ML\}\_\{t\}\-y\_\{t\}\\right\|,\(4\)whereyty\_\{t\}denotes the actual demand\.

Similarly, the prediction error after the CB correction is calculated as:

eC​B,t=\|y^tC​B−yt\|\.e\_\{CB,t\}=\\left\|\\hat\{y\}^\{CB\}\_\{t\}\-y\_\{t\}\\right\|\.\(5\)
To evaluate whether the correction action improves the original ML prediction, the reward function is designed as:

rt=τ​\(eM​L,t−eC​B,t\),r\_\{t\}=\\tau\\left\(e\_\{ML,t\}\-e\_\{CB,t\}\\right\),\(6\)whereτ\\tauis a scaling factor used to normalize the reward into a suitable numerical range\.

According to Eq\. \([6](https://arxiv.org/html/2607.16354#S3.E6)\), a positive reward indicates that the CB correction reduces the prediction error compared with the original ML prediction\. A negative reward means that the correction worsens the prediction result\. Therefore, maximizing the reward is equivalent to learning a correction policy that improves the forecasting accuracy of the baseline ML model\.

#### 3\.2\.2CB for forecast correction

In this study, the forecast correction problem is formulated as a continuous contextual bandit problem\. The proposed PtC framework first uses the baseline ML model to generate an initial demand prediction\. Then, the CB model samples a continuous correction action according to the stochastic policyπθ\(⋅∣st\)\\pi\_\{\\theta\}\(\\cdot\\mid s\_\{t\}\), the main steps are provided in Figure[2](https://arxiv.org/html/2607.16354#S3.F2)\.

The correction process can be represented as:st→at∗→rt,s\_\{t\}\\rightarrow a\_\{t\}^\{\*\}\\rightarrow r\_\{t\},wherests\_\{t\}denotes the observed context,at∗a\_\{t\}^\{\*\}denotes the correction action, andrtr\_\{t\}denotes the reward measuring the improvement after correction\. At each time steptt, the correction model first observes the contextsts\_\{t\}, which is constructed from recent demand, baseline ML forecasts, historical forecast errors, and time\-related features\. The policy then samples a continuous correction actionata\_\{t\}fromπθ\(⋅∣st\)\\pi\_\{\\theta\}\(\\cdot\\mid s\_\{t\}\)and applies it to the baseline forecast\. This stochastic action\-selection mechanism enables exploration around the current policy mean and allows the model to test whether increasing, decreasing, or retaining the baseline forecast is more beneficial under the current context\.

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/Bandit.png)Figure 2:Main steps of the second stage in PtC\.The bandit feedback structure is essential in this formulation\. Before the actual demandyty\_\{t\}is observed, the model only has access tosts\_\{t\}and must commit to one correction actionata\_\{t\}\. Afteryty\_\{t\}is realized, the rewardrtr\_\{t\}is computed by comparing the baseline forecast error and the corrected forecast error\. The model uses the reward of the selected action to update the policy, while no supervised target action is imposed\. The newly observed tuple:\(st,at,rt,log⁡πθ​\(at∣st\)\)\(s\_\{t\},a\_\{t\},r\_\{t\},\\log\\pi\_\{\\theta\}\(a\_\{t\}\\mid s\_\{t\}\)\)is then added to the sliding\-window feedback set and used for future policy updates\. Therefore, PtC learns from bandit feedback by increasing the probability of correction actions that receive positive rewards and decreasing the probability of actions that worsen the baseline forecast\.

#### 3\.2\.3Learning Objective of the CB Correction Model

Let the chronological feedback set be:

𝒟=\{\(st,at∗,rt\)\}t=1T,\\mathcal\{D\}=\\left\\\{\(s\_\{t\},a\_\{t\}^\{\*\},r\_\{t\}\)\\right\\\}\_\{t=1\}^\{T\},\(7\)where each tuple contains the context, the correction action, and the realized reward\. The goal is to learn a policyπθ\\pi\_\{\\theta\}that maps the observed context to a continuous correction ratio:

at∗=πθ​\(st\)\.a\_\{t\}^\{\*\}=\\pi\_\{\\theta\}\(s\_\{t\}\)\.\(8\)
Given the first\-stage forecasty^tM​L\\hat\{y\}^\{ML\}\_\{t\}, the corrected forecast induced by this policy is:

y^tC​B=y^tM​L​\(1\+πθ​\(st\)\)\.\\hat\{y\}^\{CB\}\_\{t\}=\\hat\{y\}^\{ML\}\_\{t\}\\left\(1\+\\pi\_\{\\theta\}\(s\_\{t\}\)\\right\)\.\(9\)Thus, the policy network does not replace the first\-stage forecasting model\. It only learns a context\-dependent adjustment factor for the existing forecast\.

At the population level, the CB correction policy is trained to maximize the expected reward obtained after correction:

πθ∗=arg⁡maxπθ⁡𝔼st∼𝒟​\[rt​\(st,πθ​\(st\)\)\]\.\\pi\_\{\\theta\}^\{\*\}=\\arg\\max\_\{\\pi\_\{\\theta\}\}\\mathbb\{E\}\_\{s\_\{t\}\\sim\\mathcal\{D\}\}\\left\[r\_\{t\}\(s\_\{t\},\\pi\_\{\\theta\}\(s\_\{t\}\)\)\\right\]\.\(10\)This objective is appropriate for forecast correction because each action is evaluated by its immediate effect on the current prediction error\. Unlike a full reinforcement\-learning formulation, no long\-horizon value function is required; the correction model only needs to learn whether the current context calls for increasing, decreasing or retaining the baseline forecast\.

In empirical training, the expected objective is approximated by the average reward over the feedback set:

θ∗=arg⁡maxθ⁡1T​∑t=1Trt\.\\theta^\{\*\}=\\arg\\max\_\{\\theta\}\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}r\_\{t\}\.\(11\)
Substituting the reward definition from Eq\. \([6](https://arxiv.org/html/2607.16354#S3.E6)\) into Eq\. \([11](https://arxiv.org/html/2607.16354#S3.E11)\) gives:

θ∗=arg⁡maxθ⁡1T​∑t=1Tτ​\(\|y^tM​L−yt\|−\|y^tM​L​\(1\+πθ​\(st\)\)−yt\|\)\.\\theta^\{\*\}=\\arg\\max\_\{\\theta\}\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\tau\\left\(\\left\|\\hat\{y\}^\{ML\}\_\{t\}\-y\_\{t\}\\right\|\-\\left\|\\hat\{y\}^\{ML\}\_\{t\}\\left\(1\+\\pi\_\{\\theta\}\(s\_\{t\}\)\\right\)\-y\_\{t\}\\right\|\\right\)\.\(12\)
The first error term in Eq\. \([12](https://arxiv.org/html/2607.16354#S3.E12)\) is determined by the baseline ML forecast and does not depend onθ\\theta\. Therefore, maximizing the reward is equivalent to minimizing the corrected prediction error:

ℒ​\(θ\)=1T​∑t=1T\|y^tM​L​\(1\+πθ​\(st\)\)−yt\|\.\\mathcal\{L\}\(\\theta\)=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\left\|\\hat\{y\}^\{ML\}\_\{t\}\\left\(1\+\\pi\_\{\\theta\}\(s\_\{t\}\)\\right\)\-y\_\{t\}\\right\|\.\(13\)This equivalence connects the reward\-based contextual bandit formulation with the standard forecasting objective: a high reward means that the correction policy reduces the absolute error of the first\-stage forecast\.

###### Proposition 1\.

LetLP​t​C∗L\_\{PtC\}^\{\*\}andLM​LL\_\{ML\}denote the optimal corrected and ML\-only expected losses induced by any nonnegative forecasting lossℓ\\ell\. If0∈𝒜0\\in\\mathcal\{A\}andπ0​\(s\)=0∈Π\\pi\_\{0\}\(s\)=0\\in\\Pi, thenLP​t​C∗≤LM​LL\_\{PtC\}^\{\*\}\\leq L\_\{ML\}\.

Proposition[1](https://arxiv.org/html/2607.16354#Thmproposition1)establishes a hypothesis\-class containment result at the population optimum\. Since the zero\-correction policyπ0​\(s\)=0\\pi\_\{0\}\(s\)=0is included in the PtC policy class, PtC contains the ML\-only forecast as a special case, and its optimal population loss is no larger than that of the ML\-only forecast\. When the correction action is zero for every context, the corrected forecast exactly reduces to the original ML forecast\. This result should be interpreted as an expressiveness and containment property of the PtC hypothesis class, rather than as a finite\-sample performance guarantee: it does not imply that the estimated PtC model will necessarily outperform the ML\-only baseline with limited samples or at every online decision step\. A proof of Proposition[1](https://arxiv.org/html/2607.16354#Thmproposition1)is provided in Appendix[Appendix D: Proof of Proposition 1](https://arxiv.org/html/2607.16354#Ax4)\.

In implementation, historical demand cycles are replayed in chronological order to initialize the policy, and the same feedback structure is used during online deployment\. This design preserves the decision timing of the CB formulation: the policy observessts\_\{t\}, selectsat∗a\_\{t\}^\{\*\}, receivesrtr\_\{t\}after demand is realized and then updates itself for future correction decisions\.

#### 3\.2\.4Top\-ppupdate

In a new demand cycle, customer demand is gradually observed over time\. The CB correction model must update its parameters to incorporate new information from the demand environment\. However, in such a data\-scarce scenario, frequent parameter updates may lead to overfitting or catastrophic forgetting of previously learned knowledge\(Kirkpatricket al\.,[2017](https://arxiv.org/html/2607.16354#bib.bib53); Tianet al\.,[2024](https://arxiv.org/html/2607.16354#bib.bib54); Bethuneet al\.,[2025](https://arxiv.org/html/2607.16354#bib.bib55)\)\. To mitigate this risk, we adopt a parameter update rule based on the proportion of parameters\.

We adopt a top\-ppmasked update rule to control the degree of online adaptation\. Specifically, we select the top\-ppproportion of parameters with the smallest absolute values and update only these parameters, while the remaining parameters are frozen\. Small\-magnitude parameter selection is a heuristic intended to preserve highly expressed pretrained parameters; its effectiveness must therefore be established empirically\. Intuitively, parameters with larger absolute values are treated as more strongly expressed components of the pretrained correction policy, whereas smaller\-magnitude parameters provide a limited adaptation subspace for learning new\-cycle feedback\.

To implement this rule, we first sort the parameters in each layer by their absolute values\. The thresholdδk\\delta^\{k\}is then set to the largest magnitude within the smallestp%p\\%parameters of layerkk\. Parameters whose absolute values are no larger thanδk\\delta^\{k\}are selected for online updating, while the remaining parameters are kept fixed\.

After the threshold is determined, we adopt a binary mask matrix in equation \([14](https://arxiv.org/html/2607.16354#S3.E14)\) to record which parameters need to be updated as follows:

M​\(θjk\)=\{1,\|θjk\|≤δk0,otherwiseM\(\\theta\_\{j\}^\{k\}\)=\\begin\{cases\}1,&\|\\theta\_\{j\}^\{k\}\|\\leq\\delta^\{k\}\\\\ 0,&\\text\{otherwise\}\\end\{cases\}\(14\)whereθjk\\theta\_\{j\}^\{k\}is thejj\-th parameter in layerkk\. IfM​\(θjk\)=1M\(\\theta\_\{j\}^\{k\}\)=1, the parameterθjk\\theta\_\{j\}^\{k\}is selected to be updated\. The shift of the update rule can be found in equation \([15](https://arxiv.org/html/2607.16354#S3.E15)\)\.

θjk←θjk−η​gjk→θjk←θjk−η​M​\(θjk\)​gjk\\theta\_\{j\}^\{k\}\\leftarrow\\theta\_\{j\}^\{k\}\-\\eta\\,g\_\{j\}^\{k\}\\quad\\rightarrow\\quad\\theta\_\{j\}^\{k\}\\leftarrow\\theta\_\{j\}^\{k\}\-\\eta\\,M\(\\theta\_\{j\}^\{k\}\)\\,g\_\{j\}^\{k\}\(15\)whereη\\etarepresents the learning rate\. In our research, we set the learning rate to a very small value to enable fine\-tuning updates, thereby avoiding disruption of the knowledge learned before\(Zhanget al\.,[2023](https://arxiv.org/html/2607.16354#bib.bib57); Taoet al\.,[2020](https://arxiv.org/html/2607.16354#bib.bib58)\)\.

###### Proposition 2\.

LetΘp=\{θ0\+Δ:supp⁡\(Δ\)⊆Sp\}\\Theta\_\{p\}=\\\{\\theta^\{0\}\+\\Delta:\\operatorname\{supp\}\(\\Delta\)\\subseteq S\_\{p\}\\\}andSp1⊆Sp2S\_\{p\_\{1\}\}\\subseteq S\_\{p\_\{2\}\}forp1≤p2p\_\{1\}\\leq p\_\{2\}\. ThenGa​d​\(p\)=infθ∈Θpℒn​e​w​\(θ\)−infθ∈Θ1ℒn​e​w​\(θ\)G\_\{ad\}\(p\)=\\inf\_\{\\theta\\in\\Theta\_\{p\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)\-\\inf\_\{\\theta\\in\\Theta\_\{1\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)is non\-increasing inpp\. If\|gju\|≤G\|g\_\{j\}^\{u\}\|\\leq G, then‖θpU−θ0‖2≤η​U​G​⌈p​d⌉\\\|\\theta\_\{p\}^\{U\}\-\\theta^\{0\}\\\|\_\{2\}\\leq\\eta UG\\sqrt\{\\lceil pd\\rceil\}, so the forgetting\-risk bound is non\-decreasing inpp\.

Proposition[2](https://arxiv.org/html/2607.16354#Thmproposition2)characterizes the adaptation–stability tradeoff induced by the top\-ppupdate rule\. The first part states that increasingppenlarges the set of trainable parameters\. SinceΘp1⊆Θp2\\Theta\_\{p\_\{1\}\}\\subseteq\\Theta\_\{p\_\{2\}\}whenp1≤p2p\_\{1\}\\leq p\_\{2\}, a larger update set cannot increase the best achievable loss on the new demand cycle\. Therefore, the adaptation gapGa​d​\(p\)G\_\{ad\}\(p\)is non\-increasing inpp\. This explains why updating too few parameters may limit the ability of the correction policy to adapt to a new demand pattern\. proof of Proposition[2](https://arxiv.org/html/2607.16354#Thmproposition2)is provided in Appendix[Appendix E: Proof of Proposition 2](https://arxiv.org/html/2607.16354#Ax5)\.

###### Proposition 3\.

Let𝒥ϵ​\(θ\)=𝔼𝒟,at∼πθ​\[ρϵ​\(y^tM​L​\(1\+at\)−yt\)\]\\mathcal\{J\}\_\{\\epsilon\}\(\\theta\)=\\mathbb\{E\}\_\{\\mathcal\{D\},a\_\{t\}\\sim\\pi\_\{\\theta\}\}\[\\rho\_\{\\epsilon\}\(\\hat\{y\}\_\{t\}^\{ML\}\(1\+a\_\{t\}\)\-y\_\{t\}\)\]be lower bounded andLL\-smooth\. Underθu\+1=θu−η​mu⊙∇𝒥ϵ​\(θu\)\\theta^\{u\+1\}=\\theta^\{u\}\-\\eta\\,m\_\{u\}\\odot\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)with0<η≤1/L0<\\eta\\leq 1/L, the PtC correction policy satisfies𝒥ϵ​\(θu\+1\)≤𝒥ϵ​\(θu\)\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\+1\}\)\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)foru=0,1,…u=0,1,\\ldots\.

Proposition[3](https://arxiv.org/html/2607.16354#Thmproposition3)provides a stability guarantee for the masked update when the correction objective is represented by a smooth surrogate loss\. The absolute forecasting error is not differentiable at zero, soρϵ​\(⋅\)\\rho\_\{\\epsilon\}\(\\cdot\)is introduced as a smooth approximation of the correction error\. If this surrogate objective is lower bounded andLL\-smooth, then the standard descent lemma implies that a masked gradient step with step size0<η≤1/L0<\\eta\\leq 1/Ldoes not increase the objective value\. A proof of Proposition[3](https://arxiv.org/html/2607.16354#Thmproposition3)is provided in Appendix[Appendix F: Proof of Proposition 3](https://arxiv.org/html/2607.16354#Ax6)\.

Pseudo\-code of top\-ppmasked update is described in Appendix[Appendix G: Top\-ppMasked Bandit Update](https://arxiv.org/html/2607.16354#Ax7)\.

## 4Experiment

### 4\.1Experimental design

#### 4\.1\.1Datasets and implementation

All algorithms were implemented in Python 3\.11 \(64\-bit\)\. The experiments were conducted on a workstation equipped with an Intel Core i7\-14700KF CPU @ 5\.6 GHz, 32 GB DDR5 RAM, and an NVIDIA RTX 4070 Ti GPU\.

We evaluate the proposed PtC framework using the Walmart sales data released through the M5 Accuracy competition in 2020\(Makridakiset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib17)\)\. Specifically, we use 6,875 SKUs from Walmart stores “CA\_1” to “CA\_3”, covering more than 1,500 daily observations\.

The beverage dataset is an external industrial benchmark collected from a major North American beverage manufacturer\. It contains 156 weeks of weekly shipment records 49 bottling plants and over 12,000 distribution nodes\.

The lumpy category is defined in Section 3 for completeness of SKU segmentation, but it is omitted from the later experiments because lumpy demand has long zero\-demand periods and irregular spikes, making statistical and AI/ML models largely ineffective; therefore, we recommend a qualitative CPFR\-based approach instead of reporting model\-comparison results\.

Details of dataset splitting can be found in Appendix[Appendix A: Dataset Splitting](https://arxiv.org/html/2607.16354#Ax1), and detailed descriptions of the parameter values of the set are provided in Appendix[Appendix B: Principal Hyperparameter Settings](https://arxiv.org/html/2607.16354#Ax2)\.

#### 4\.1\.2Evaluation metrics

We evaluate the precision of the forecast by mean absolute percentage error \(MAPE\), mean absolute error \(MAE\), and root mean squared error \(RMSE\)\. For a test sequence with actual demandyty\_\{t\}and forecasty^t\\hat\{y\}\_\{t\}, the metrics are defined as:

M​A​P​E=100T​∑t=1T\|yt−y^tmax⁡\(\|yt\|,ϵ\)\|,MAPE=\\frac\{100\}\{T\}\\sum\_\{t=1\}^\{T\}\\left\|\\frac\{y\_\{t\}\-\\hat\{y\}\_\{t\}\}\{\\max\(\|y\_\{t\}\|,\\epsilon\)\}\\right\|,\(16\)M​A​E=1T​∑t=1T\|yt−y^t\|,R​M​S​E=1T​∑t=1T\(yt−y^t\)2\.MAE=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\|y\_\{t\}\-\\hat\{y\}\_\{t\}\|,\\quad RMSE=\\sqrt\{\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\(y\_\{t\}\-\\hat\{y\}\_\{t\}\)^\{2\}\}\.\(17\)whereϵ\\epsilonis a small positive constant used to avoid division by zero\.

MAPE provides a scale\-free percentage error, MAE reflects the average absolute deviation, and RMSE emphasizes large forecast errors\.

For the demand\-category comparison, we report the relative error reduction:

R​e​d​u​c​t​i​o​n​\(M,q\)=Eqr​e​f−EqMEqr​e​f×100%,Reduction\(M,q\)=\\frac\{E\_\{q\}^\{ref\}\-E\_\{q\}^\{M\}\}\{E\_\{q\}^\{ref\}\}\\times 100\\%,\(18\)whereEqME\_\{q\}^\{M\}denotes the error of methodMMunder metricqq, andEqrefE\_\{q\}^\{\\mathrm\{ref\}\}denotes the corresponding error of the ML\-only reference forecast\. A positive value indicates an improvement over the reference forecast, whereas a negative value indicates a deterioration in forecasting performance\.

#### 4\.1\.3Benchmark methods

ETS\(Gardner Jr,[1985](https://arxiv.org/html/2607.16354#bib.bib81)\)is an exponential smoothing method that recursively updates level, trend, and seasonal components\. A representative additive ETS forecast is given by

y^∗t\+hE​T​S=ℓt\+h​bt\+s∗t\+h−m,\\hat\{y\}\*\{t\+h\}^\{ETS\}=\\ell\_\{t\}\+hb\_\{t\}\+s\*\{t\+h\-m\},\(19\)whereℓt\\ell\_\{t\},btb\_\{t\}, andsts\_\{t\}denote the level, and seasonal states, respectively, andmmis the seasonal period\.

ARIMA is a classical linear time\-series model that captures autocorrelation through autoregressive and moving\-average terms after differencing\. The model can be written as

ϕ​\(B\)​\(1−B\)d​yt=c\+θ​\(B\)​εt,\\phi\(B\)\(1\-B\)^\{d\}y\_\{t\}=c\+\\theta\(B\)\\varepsilon\_\{t\},\(20\)whereBBis the backshift operator,ddis the differencing order, andεt\\varepsilon\_\{t\}is the innovation term\.

LightGBM\(Keet al\.,[2017](https://arxiv.org/html/2607.16354#bib.bib80)\)is a gradient boosting decision tree model that builds an additive ensemble of regression trees\. Its prediction can be expressed as

y^∗t=∑∗k=1K​fk​\(xt\),fk∈ℱ,\\hat\{y\}\*t=\\sum\*\{k=1\}^\{K\}f\_\{k\}\(x\_\{t\}\),\\qquad f\_\{k\}\\in\\mathcal\{F\},\(21\)wherextx\_\{t\}is the input feature vector andfk​\(⋅\)f\_\{k\}\(\\cdot\)denotes thekk\-th regression tree\.

XGBoost\(Chen and Guestrin,[2016](https://arxiv.org/html/2607.16354#bib.bib12)\)is another boosted\-tree model that learns additive regression trees by minimizing a regularized objective:

ℒ\(k\)=∑t=1Tl​\(yt,y^t\(k−1\)\+fk​\(xt\)\)\+Ω​\(fk\),\\mathcal\{L\}^\{\(k\)\}=\\sum\_\{t=1\}^\{T\}l\\left\(y\_\{t\},\\hat\{y\}\_\{t\}^\{\(k\-1\)\}\+f\_\{k\}\(x\_\{t\}\)\\right\)\+\\Omega\(f\_\{k\}\),\(22\)wherel​\(⋅\)l\(\\cdot\)is the loss function andΩ​\(fk\)\\Omega\(f\_\{k\}\)penalizes tree complexity\.

N\-BEATS is a deep neural forecasting model composed of stacked fully connected residual blocks\. Each block generates a backcast for residual updating and a forecast, while the final prediction is obtained by summing the block\-level forecasts\.

TiDE is a dense encoder–decoder forecasting model that maps historical demand and covariates into multi\-step forecasts\.

TFT is an attention\-based deep forecasting model that integrates static features, time\-varying covariates, gating mechanisms, and temporal attention for multi\-horizon forecasting\.

### 4\.2Results

#### 4\.2\.1Numerical experiment on the Walmart dataset

Table[2](https://arxiv.org/html/2607.16354#S4.T2)reports the average relative error reduction on the Walmart retail dataset across three distinct demand categories\. The results are calculated based on Eq\. \([18](https://arxiv.org/html/2607.16354#S4.E18)\), where positive values indicate a performance improvement over the LightGBM ML\-only reference forecast, and negative values denote an algorithmic decrease\.

Table 2:Comparison result of Average relative error reduction on the Walmart dataset\.Note: Positive values indicate improvement relative to the ML\-only reference forecast, while negative values indicate performance decrease\. \*p<0\.10p<0\.10, \*\*p<0\.05p<0\.05, \*\*\*p<0\.01p<0\.01\.

Across all demand patterns, the proposed PtC framework consistently shows superior adaptability compared to both traditional statistical methods and DL architectures\. Notably, PtC is the only method evaluated that achieves positive relative error reduction across all three metrics in every reported setting\. Furthermore, all observed improvements are statistically significant at thep<0\.01p<0\.01level\.

The empirical results expose the structural vulnerabilities of static baseline models when subjected to the highly stochastic nature of retail supply chains\. Deep forecasting architectures, such as N\-BEATS, TiDE, and TFT, exhibit moderate success under “Stable & Low Volume” conditions but degrade substantially when applied to “Erratic & Intermittent” demand\. Specifically, N\-BEATS shows a \-26\.85% decrease in MAPE for intermittent items\. This underscores a limitation of pure data\-driven models: their susceptibility to overfitting the noisy, sparse signals inherent in intermittent demand, which subsequently induces severe predictive bias\. Conversely, traditional time\-series methods like ETS and ARIMA struggle significantly with “Stable & High Volume” series\. This is likely driven by their constrained parametric forms, which fail to capture the complex, non\-linear dynamics characterizing high\-throughput retail operations\.

In contrast, the performance of the PtC architecture achieves average error reductions between 5\.68% and 8\.94% even in the highly challenging erratic category, validating its underlying mathematical design\. Rather than overriding the historical distributions captured by the base ML model, the FSCCB correction layer dynamically fine\-tunes the forecast via online reward feedback\. This decoupled architecture effectively bridges the methodological gap between offline historical generalization and online correction\.

#### 4\.2\.2Numerical experiment on the beverage dataset

To better validate the performance of the proposed correction mechanism, we conduct a supplementary numerical experiment on a beverage distribution dataset\. Table[3](https://arxiv.org/html/2607.16354#S4.T3)details the average relative error reduction under the previously established evaluation framework\.

Table 3:Comparison result of Average relative error reduction on the beverage dataset\.Note: Positive values indicate improvement relative to the ML\-only reference forecast, while negative values indicate a performance decrease\. \*p<0\.10p<0\.10, \*\*p<0\.05p<0\.05, \*\*\*p<0\.01p<0\.01\.

In this data environment, traditional methods like ARIMA and tree\-based models like XGBoost exhibit severe performance decrease in the “Stable & High Volume” category\. Furthermore, DL models such as N\-BEATS, TFT, yield highly inconsistent results across different metrics within identical demand categories\. Such metric instability indicates that these base models are highly sensitive to shifting data distributions and lack the continuous learning capability required to mitigate real\-time prediction errors under structural volatility\.

Conversely, PtC maintains substantial, balanced, and statistically significant \(p<0\.01p<0\.01\) improvements among all conditions\. The error reductions peak in the “Stable & High Volume” category, achieving 14\.64%, 14\.85%, and 13\.40% error reduction for MAPE, MAE and RMSE, respectively\. By retaining the base ML model’s structural understanding of baseline demand while deploying an online CB to correct for micro\-level volatility, PtC shifts the forecasting paradigm from a static, open\-loop prediction task to an adaptive, closed\-loop correction system\.

### 4\.3Sensitivity analysis

We further analyze the sensitivity of the top\-ppparameter update proportion and the depth of the correction network\.

Figure[3](https://arxiv.org/html/2607.16354#S4.F3)compares the sensitivity of the update proportionppon the North American beverage company dataset and the Walmart retail dataset\. The two curves show that updating too few parameters limits the performance of the correction model, while updating too many parameters increases the risk of overfitting or forgetting previously learned demand patterns\. On the beverage\-company dataset, the improvement rises rapidly from a small update proportion and reaches its peakp=0\.16p=0\.16, after which performance declines steadily\. On the Walmart dataset, the improvement is already significant under small update proportions and reaches its highest valuep=0\.10p=0\.10; further increasingppleads to a gradual decrease in improvement\. This cross\-dataset evidence suggests that FSCCB benefits from selective adaptation rather than full\-network updating\.

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/update_ratio.png)\(a\)North American beverage company dataset
![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/update_ratio_improve_in_Walmart.png)\(b\)Walmart retail dataset

Figure 3:Parameter sensitivity analysis of the update proportionppacross two datasets\.Figure[4](https://arxiv.org/html/2607.16354#S4.F4)reports the sensitivity to network depth\. A shallow correction network has limited representation capacity and may fail to capture nonlinear relationships between context features and correction actions\. However, an overly deep correction network increases the number of trainable parameters and becomes less stable under few\-shot updates\. The observed pattern supports the use of a moderate\-depth policy network for the CB correction model\.

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/LSA.png)Figure 4:Network depth sensitivity analysis\.
### 4\.4Ablation study

To isolate the contribution of the CB correction layer and the few\-shot selective update rule, we conduct an ablation study using N\-BEATS as the first\-stage ML forecast\. We compare three variants as follows:

\(1\) ML\-only: Forecasting relies on the N\-BEATS prediction without second\-stage correction;

\(2\) ML\+CB: A CB correction model is applied, but all correction\-network parameters are updated during adaptation;

\(3\) ML\+FSCCB: FSCCB is applied, where only the selected top\-ppparameters are updated during adaptation\.

The reported Gap is the relative RMSE reduction compared with the ML\-only baseline\. A positive Gap indicates that the correction module improves the N\-BEATS forecast\.

Table[4](https://arxiv.org/html/2607.16354#S4.T4)reports the average ablation results of the proposed few\-shot continuous CB method\. Compared with the original N\-BEATS model, the standard N\-BEATS\-CB only achieves a marginal RMSE reduction of 0\.34%\. Moreover, although its average RMSE is slightly lower than that of N\-BEATS, its average MAE becomes higher\. This indicates that simply introducing a CB\-based correction network does not provide a sufficiently stable improvement under limited observations from a new demand cycle\.

Table 4:Average prediction performance comparison of N\-BEATS, N\-BEATS\-CB, and PtC\.By contrast, PtC achieves a much larger average improvement\. It reduces the average RMSE from 11\.4086 to 10\.3372 and the average MAE from 8\.7993 to 7\.8193, corresponding to an average RMSE Gap of 9\.52%\. This result shows that the proposed FSCCB method can more effectively adapt the forecasting model to a new demand cycle\.

The improvement mainly comes from the few\-shot selective update mechanism\. Instead of updating all parameters of the correction network, FSCCB updates only a small subset of low\-magnitude parameters while freezing the remaining parameters\. This strategy helps preserve the general correction knowledge learned from historical demand cycles and prevents the model from overfitting short\-term noise in the new cycle\. Therefore, the ablation results confirm that FSCCB provides a more stable and effective correction mechanism than the standard CB model, making the proposed PtC framework better suited for demand forecasting under data scarcity\.

## 5PtC in Inventory Management System

### 5\.1Model Formulation in Inventory Management System

The forecasting experiments show that PtC improves prediction accuracy, but the operational value of a forecast depends on how it affects downstream decisions\. We therefore embed the corrected forecasts into a periodic\-review inventory management system\. At the beginning of periodtt, the retailer observes the inventory positionI​PtIP\_\{t\}, outstanding replenishment orders, and the current demand context\. A replenishment policy then chooses an order quantityqt≥0q\_\{t\}\\geq 0\. Orders arrive after a deterministic lead timeLL, and demandyty\_\{t\}is realized at the end of the period\.

LetItI\_\{t\}denote the net inventory after demand is realized, where positive values represent inventory and negative values represent unmet demand\. The inventory transition is written as:

It\+1=It\+qt−L−yt,I\_\{t\+1\}=I\_\{t\}\+q\_\{t\-L\}\-y\_\{t\},\(23\)whereqt−Lq\_\{t\-L\}is the order placedLLperiods earlier\. The single\-period inventory cost is:

Ct=h​\[It\+1\]\+\+b​\[−It\+1\]\+,C\_\{t\}=h\[I\_\{t\+1\}\]^\{\+\}\+b\[\-I\_\{t\+1\}\]^\{\+\},\(24\)wherehhis the unit holding\-cost coefficient,bbis the unit shortage\-cost coefficient, and\[x\]\+=max⁡\{x,0\}\[x\]^\{\+\}=\\max\\\{x,0\\\}\. The objective is to minimize the average cost over the evaluation horizon:

C¯=1T​∑t=1TCt\.\\bar\{C\}=\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}C\_\{t\}\.\(25\)
PtC enters this system through the demand signal used for replenishment\. The baseline ML forecasty^tM​L\\hat\{y\}\_\{t\}^\{ML\}is first corrected by the learned contextual\-bandit actionata\_\{t\}, producing:

y^tP​t​C=y^tM​L​\(1\+at\)\.\\hat\{y\}\_\{t\}^\{PtC\}=\\hat\{y\}\_\{t\}^\{ML\}\(1\+a\_\{t\}\)\.\(26\)The corrected forecast is then used to estimate lead\-time demand\. For a lead timeLL, the PtC\-based replenishment target can be expressed as:

D^t,LP​t​C=∑j=0L−1y^t\+jP​t​C,\\hat\{D\}\_\{t,L\}^\{PtC\}=\\sum\_\{j=0\}^\{L\-1\}\\hat\{y\}\_\{t\+j\}^\{PtC\},\(27\)and the corresponding order quantity is:

qtP​t​C=max⁡\{0,D^t,LP​t​C−I​Pt\}\.q\_\{t\}^\{PtC\}=\\max\\\{0,\\hat\{D\}\_\{t,L\}^\{PtC\}\-IP\_\{t\}\\\}\.\(28\)This formulation keeps the inventory decision simple while allowing the order quantity to respond to online forecast corrections\.

### 5\.2Baseline Policies and Experiment Settings

We compare PtC with three inventory\-control baselines: base\-stock \(BS\), proximal policy optimization \(PPO\), and soft actor\-critic \(SAC\)\. BS is a classical order\-up\-to policy that replenishes inventory toward a target level based on the estimated lead\-time demand\. It provides a transparent operational benchmark for forecast\-driven inventory control\.

PPO and SAC represent deep reinforcement learning policies for inventory management, a setting in which the policy learns order decisions from repeated interaction with the inventory simulator\(Bouteet al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib21); Gijsbrechtset al\.,[2022](https://arxiv.org/html/2607.16354#bib.bib22)\)\. PPO is an on\-policy actor\-critic algorithm that updates the policy through a clipped surrogate objective, which improves training stability by limiting overly large policy updates\. SAC is an off\-policy actor\-critic algorithm that maximizes both expected return and policy entropy, encouraging exploration in continuous\-control problems\(Haarnojaet al\.,[2018](https://arxiv.org/html/2607.16354#bib.bib66)\)\. In this experiment, both RL baselines observe the same inventory state information and are trained to minimize the cumulative inventory cost\.

All policies are evaluated under the same demand sequences, cost parameters, and lead\-time settings\. We vary the lead time fromL=2L=2toL=4L=4to test whether the policies remain robust when the replenishment decision must anticipate demand further into the future\. Inventory cost is reported in millions, and lower values indicate better downstream operational performance\.

### 5\.3Numerical Results

Figure[5](https://arxiv.org/html/2607.16354#S5.F5)reports the inventory\-cost comparison across the tested lead\-time settings\. PtC achieves the lowest inventory cost across the reported settings, indicating that the forecast improvements observed in the earlier experiments translate into downstream cost reductions\. The result is important because a lower forecast error does not automatically guarantee a lower inventory cost; the correction must also improve the timing and order quantities of replenishment under the uncertainty of lead time\.

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/Inventory_cost.png)Figure 5:Inventory\-cost comparison of BS, PPO, SAC and PtC under different lead times\.The comparison also shows different failure modes across baselines\. PPO yields the highest inventory costs in the reported settings, suggesting that the learned policy is less stable for this demand\-correction task\. SAC performs better than PPO but remains above PtC, indicating that a generic continuous\-control policy may still struggle when the main uncertainty comes from demand forecasting errors\. BS is competitive in some settings because it directly links replenishment to estimated lead\-time demand, but it does not adapt the forecast itself when real\-time demand feedback reveals bias\. PtC combines these two advantages: it preserves a simple forecast\-driven replenishment structure and improves the input forecast through online correction\.

As the lead time increases, inventory decisions become more sensitive to forecast bias because orders must cover a longer demand interval\. PtC maintains the lowest cost under the tested lead times, suggesting that correcting the forecast before the replenishment decision can reduce both excess inventory and shortage risk\. These results provide downstream evidence for the practical value of the PtC loop in inventory management systems\.

## 6Conclusion

This paper studies adaptive demand forecasting in retail supply chains, where replenishment, pricing, purchasing, and inventory decisions require timely forecasts but demand patterns can shift before static forecasting models are fully retrained\. To address this problem, we propose a PtC framework that preserves the base forecast generated by an offline machine\-learning model and then applies a few\-shot CB correction policy to adjust the forecasts as new feedback arrives\. The main finding is that forecast correction can be treated as a sequential learning problem: instead of replacing the original forecaster, a lightweight correction layer can improve predictive reliability and downstream decision quality while retaining the structure learned from historical demand\.

This study contributes to the forecasting and retail operations literature by filling a gap between static forecasting and full model retraining\. Existing forecasting models often produce predictions as fixed outputs, while many operational decision models assume that demand information is already available in a usable form\. PtC connects these two views by modeling the post\-forecast stage as an adaptive correction process, thereby making demand forecasting part of a continuous learning loop\. The similar\-SKU augmentation and top\-ppmasked update further clarify how a correction policy can balance responsiveness to new observations with the preservation of previously learned demand regularities\. In practice, this design can be embedded into existing forecast pipelines with limited disruption, helping retailers update forecasts for early\-cycle, sparse, low\-volume, or intermittent items without rebuilding the entire forecasting system\.

The strength of this study lies in its modular design and its direct connection between forecast accuracy and operational usefulness\. Because PtC is placed after the base forecaster, it can work as an adaptive layer rather than as a replacement for existing forecasting models, which makes the framework easier to interpret and deploy\. At the same time, the current study has several limitations\. The correction policy is built at the SKU level and does not yet explicitly model substitution, complementarity, shelf\-space competition, or capacity coupling across products\. The downstream decision setting is also simplified, and the robustness of the correction range and top\-ppupdate needs further examination under more diverse retail conditions\.

Future research can extend this work in several directions\. First, multi\-product correction policies can be developed by incorporating graph, hierarchical, or attention\-based structures to capture dependencies across SKUs\. Second, forecast correction can be integrated more closely with replenishment, pricing, allocation, and purchasing decisions so that prediction and decision optimization are learned in a more unified loop\. Third, future studies should examine online deployment issues such as delayed feedback, changing assortment structures, promotion shocks, stochastic lead times, and service\-level constraints\. These extensions would move PtC from adaptive forecast correction toward a broader closed\-loop decision framework for retail supply chains\.

## Data Availability Statement

The data that support the findings of this study are available from the corresponding author upon reasonable request\.

## References

- Data analytics in the supply chain management: review of machine learning applications in demand forecasting\.Operations and Supply Chain Management: An International Journal14\(1\),pp\. 1–13\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- L\. Aburto and R\. Weber \(2007\)Improved supply chain management based on hybrid demand forecasts\.Applied Soft Computing7\(1\),pp\. 136–144\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- M\. Adya and F\. Collopy \(1998\)How effective are neural networks at forecasting and prediction? a review and evaluation\.Journal of Forecasting17\(5\-6\),pp\. 481–495\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- M\. Alley, M\. Biggs, R\. Hariss, C\. Herrmann, M\. L\. Li, and G\. Perakis \(2023\)Pricing for heterogeneous products: analytics for ticket reselling\.Manufacturing & Service Operations Management25\(2\),pp\. 409–426\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- I\. Alon, M\. Qi, and R\. J\. Sadowski \(2001\)Forecasting aggregate retail sales:: a comparison of artificial neural networks and traditional methods\.Journal of Retailing and Consumer Services8\(3\),pp\. 147–156\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- R\. L\. Andrews, I\. S\. Currim, P\. Leeflang, and J\. Lim \(2008\)Estimating the scan⁎ pro model of store sales: hb, fm or just ols?\.International Journal of Research in Marketing25\(1\),pp\. 22–33\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- N\. S\. Arunraj and D\. Ahrens \(2015\)A hybrid seasonal autoregressive integrated moving average and quantile regression for daily food sales forecasting\.International Journal of Production Economics170,pp\. 321–335\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- L\. Bethune, D\. Grangier, D\. Busbridge, E\. Gualdoni, M\. Cuturi, and P\. Ablin \(2025\)Scaling laws for forgetting during finetuning with pretraining data injection\.arXiv Preprint arXiv:2502\.06042\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1),[§3\.2\.4](https://arxiv.org/html/2607.16354#S3.SS2.SSS4.p1.1)\.
- T\. Boone, R\. Ganeshan, R\. L\. Hicks, and N\. R\. Sanders \(2018\)Can Google Trends improve your sales forecast?\.Production and Operations Management27\(10\),pp\. 1770–1774\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- R\. N\. Boute, S\. M\. Disney, M\. R\. Lambrecht, B\. Mantin, and J\. Gijsbrechts \(2022\)Deep reinforcement learning for inventory control: a roadmap\.European Journal of Operational Research298\(2\),pp\. 401–412\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1),[§5\.2](https://arxiv.org/html/2607.16354#S5.SS2.p2.1)\.
- F\. Caro and J\. Gallien \(2010\)Inventory management of a fast\-fashion retail network\.Operations Research58\(2\),pp\. 257–273\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1)\.
- T\. Chen and C\. Guestrin \(2016\)Xgboost: a scalable tree boosting system\.InProceedings of the 22nd acm sigkdd international conference on knowledge discovery and data mining,pp\. 785–794\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1),[§4\.1\.3](https://arxiv.org/html/2607.16354#S4.SS1.SSS3.p4.3)\.
- M\. C\. Cohen, P\. Gras, A\. Pentecoste, and R\. Zhang \(2022\)Demand prediction in retail: a practical guide to leverage data and predictive analytics\.Springer\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- R\. Cui, S\. Gallino, A\. Moreno, and D\. J\. Zhang \(2018\)The operational value of social media information\.Production and Operations Management27\(10\),pp\. 1749–1769\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- B\. Fahimnia, T\. Tan, and N\. Tahirov \(2025\)Service\-level anchoring in demand forecasting: the moderating impact of retail promotions and product perishability\.International Journal of Forecasting41\(2\),pp\. 554–570\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- J\. Feizabadi \(2022\)Machine learning demand forecasting and supply chain performance\.International Journal of Logistics Research and Applications25\(2\),pp\. 119–142\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- K\. J\. Ferreira, B\. H\. A\. Lee, and D\. Simchi\-Levi \(2016\)Analytics for an online retailer: demand forecasting and price optimization\.Manufacturing & Service Operations Management18\(1\),pp\. 69–88\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- R\. Fildes, S\. Ma, and S\. Kolassa \(2022\)Retail forecasting: research and practice\.International Journal of Forecasting38\(4\),pp\. 1283–1318\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- R\. Fildes, K\. Nikolopoulos, S\. F\. Crone, and A\. Syntetos \(2008\)Forecasting and operational research: a review\.Journal of the Operational Research Society59\(9\),pp\. 1150–1172\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- J\. H\. Friedman \(2001\)Greedy function approximation: a gradient boosting machine\.The Annals of Statistics29\(5\),pp\. 1189–1232\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- C\. Gao, N\. Zhang, Y\. Li, Y\. Lin, and H\. Wan \(2023\)Adversarial self\-attentive time\-variant neural networks for multi\-step time series forecasting\.Expert Systems with Applications231,pp\. 120722\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- E\. S\. Gardner Jr \(1985\)Exponential smoothing: the state of the art\.Journal of Forecasting4\(1\),pp\. 1–28\.Cited by:[§4\.1\.3](https://arxiv.org/html/2607.16354#S4.SS1.SSS3.p1.5)\.
- M\. D\. Geurts and J\. P\. Kelly \(1986\)Forecasting retail sales using alternative models\.International Journal of Forecasting2\(3\),pp\. 261–272\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- J\. Gijsbrechts, R\. N\. Boute, J\. A\. Van Mieghem, and D\. J\. Zhang \(2022\)Can deep reinforcement learning improve inventory management? performance on lost sales, dual\-sourcing, and multi\-echelon problems\.Manufacturing & Service Operations Management24\(3\),pp\. 1349–1368\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1),[§5\.2](https://arxiv.org/html/2607.16354#S5.SS2.p2.1)\.
- A\. Graves and J\. Schmidhuber \(2005\)Framewise phoneme classification with bidirectional lstm and other neural network architectures\.Neural Networks18\(5\-6\),pp\. 602–610\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- K\. C\. Green and J\. S\. Armstrong \(2015\)Simple versus complex forecasting: the evidence\.Journal of Business Research68\(8\),pp\. 1678–1685\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1)\.
- X\. Guo, K\. C\. Lichtendahl, and Y\. Grushka\-Cockayne \(2025\)Bayesian ensembles of exponentially smoothed life\-cycle forecasts\.Manufacturing & Service Operations Management27\(1\),pp\. 230–248\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p3.1)\.
- T\. Haarnoja, A\. Zhou, P\. Abbeel, and S\. Levine \(2018\)Soft actor\-critic: off\-policy maximum entropy deep reinforcement learning with a stochastic actor\.InInternational conference on machine learning,pp\. 1861–1870\.Cited by:[§5\.2](https://arxiv.org/html/2607.16354#S5.SS2.p2.1)\.
- S\. Hochreiter and J\. Schmidhuber \(1997\)Long short\-term memory\.Neural Computation9\(8\),pp\. 1735–1780\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- T\. Huang, R\. Fildes, and D\. Soopramanien \(2014\)The value of competitive information in forecasting fmcg retail product sales and the variable selection problem\.European Journal of Operational Research237\(2\),pp\. 738–748\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- T\. Huang, R\. Fildes, and D\. Soopramanien \(2019\)Forecasting retailer product sales in the presence of structural change\.European Journal of Operational Research279\(2\),pp\. 459–470\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1),[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- R\. J\. Hyndman and G\. Athanasopoulos \(2018\)Forecasting: principles and practice\.OTexts\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- C\. Ingle, D\. Bakliwal, J\. Jain, P\. Singh, P\. Kale, and V\. Chhajed \(2021\)Demand forecasting: literature review on various methodologies\.In2021 12th International Conference on Computing Communication and Networking Technologies,pp\. 1–7\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- S\. Islam, S\. H\. Amin, and L\. J\. Wardley \(2021\)Machine learning and optimization models for supplier selection and order allocation planning\.International Journal of Production Economics242,pp\. 108315\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- B\. Jin and X\. Xu \(2025a\)A study of contemporaneous residential real estate price causation across major Jiangsu province cities: methodology using vector error\-correction models and directed acyclic graphs\.Economics Open,pp\. 2550008\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p3.1)\.
- B\. Jin and X\. Xu \(2025b\)High\-frequency CSI300 spot and futures price predictions via the neural network\.Journal of Uncertain Systems,pp\. 2550008\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p3.1)\.
- G\. Ke, Q\. Meng, T\. Finley, T\. Wang, W\. Chen, W\. Ma, Q\. Ye, and T\. Liu \(2017\)Lightgbm: a highly efficient gradient boosting decision tree\.Advances in Neural Information Processing Systems30\.Cited by:[§4\.1\.3](https://arxiv.org/html/2607.16354#S4.SS1.SSS3.p3.4)\.
- M\. Khouja and J\. Zhou \(2019\)Early sale of seasonal inventory in the newsvendor problem\.IISE Transactions51\(6\),pp\. 672–689\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- B\. Kim, J\. G\. Kim, and S\. Lee \(2024\)A multi\-agent reinforcement learning model for inventory transshipments under supply chain disruption\.IISE Transactions56\(7\),pp\. 715–728\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- J\. Kirkpatrick, R\. Pascanu, N\. Rabinowitz, J\. Veness, G\. Desjardins, A\. A\. Rusu, K\. Milan, J\. Quan, T\. Ramalho, A\. Grabska\-Barwinska,et al\.\(2017\)Overcoming catastrophic forgetting in neural networks\.Proceedings of the National Academy of Sciences114\(13\),pp\. 3521–3526\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1),[§3\.2\.4](https://arxiv.org/html/2607.16354#S3.SS2.SSS4.p1.1)\.
- D\. Lei, Y\. Qi, S\. Liu, D\. Geng, J\. Zhang, H\. Hu, and Z\. M\. Shen \(2024\)Pooling and boosting for demand prediction in retail: a transfer learning approach\.Manufacturing & Service Operations Management\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- D\. Lei, H\. Hu, D\. Geng, J\. Zhang, Y\. Qi, S\. Liu, and Z\. M\. Shen \(2023\)New product life cycle curve modeling and forecasting with product attributes and promotion: a Bayesian functional approach\.Production and Operations Management32\(2\),pp\. 655–673\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- S\. Li, Y\. He, H\. Huang, J\. Lin, and D\. Ivanov \(2024a\)Supply chain hoarding and contingent sourcing strategies in anticipation of price hikes and product shortages\.IISE Transactions56\(7\),pp\. 746–761\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- X\. Li, Y\. Xu, R\. Law, and S\. Wang \(2024b\)Enhancing tourism demand forecasting with a transformer\-based framework\.Annals of Tourism Research107,pp\. 103791\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- B\. J\. Ma, I\. Jackson, M\. Huang, S\. Villegas, and J\. Macias\-Aguayo \(2025\)A data\-driven and context\-aware approach for demand forecasting in the beverage industry\.International Journal of Logistics Research and Applications,pp\. 1–28\.Cited by:[§3\.1](https://arxiv.org/html/2607.16354#S3.SS1.p1.1)\.
- S\. Ma, R\. Fildes, and T\. Huang \(2016\)Demand forecasting with high dimensional data: the case of sku retail sales forecasting with intra\-and inter\-category promotional information\.European Journal of Operational Research249\(1\),pp\. 245–257\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1),[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- S\. Makridakis, A\. Andersen, R\. Carbone, R\. Fildes, M\. Hibon, R\. Lewandowski, J\. Newton, E\. Parzen, and R\. Winkler \(1982\)The accuracy of extrapolation \(time series\) methods: results of a forecasting competition\.Journal of Forecasting1\(2\),pp\. 111–153\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1)\.
- S\. Makridakis, M\. Hibon, E\. Lusk, and M\. Belhadjali \(1993\)The M2\-competition: a real\-time judgmentally based forecasting study\.International Journal of Forecasting9\(1\),pp\. 5–22\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1)\.
- S\. Makridakis and M\. Hibon \(2000\)The M3\-competition: results, conclusions and implications\.International Journal of Forecasting16\(4\),pp\. 451–476\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p3.1)\.
- S\. Makridakis, E\. Spiliotis, and V\. Assimakopoulos \(2022\)M5 accuracy competition: results, findings, and conclusions\.International Journal of Forecasting38\(4\),pp\. 1346–1364\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1),[§4\.1\.1](https://arxiv.org/html/2607.16354#S4.SS1.SSS1.p2.1)\.
- P\. Malviya and V\. Bhandari \(2024\)A systematic study on effective demand prediction using machine learning\.Journal of Integrated Science and Technology12\(1\),pp\. 711\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- M\. Mamdouh, M\. Ezzat, and H\. Hefny \(2024\)Improving flight delays prediction by developing attention\-based bidirectional lstm network\.Expert Systems with Applications238,pp\. 121747\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- R\. Mandania and F\. S\. Oliveira \(2023\)Dynamic pricing of regulated field services using reinforcement learning\.IISE Transactions55\(10\),pp\. 1022–1034\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- P\. Mazumder, P\. Singh, and P\. Rai \(2021\)Few\-shot lifelong learning\.InProceedings of the AAAI conference on artificial intelligence,Vol\.35,pp\. 2337–2345\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p4.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1)\.
- McKinsey \(2022\)Stronger forecasting in operations management—even with weak data\.Note:Accessed December 19, 2025External Links:[Link](https://www.mckinsey.com/capabilities/operations/our-insights/stronger-forecasting-in-operations-management-even-with-weak-data)Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- K\. Nikolopoulos, A\. A\. Syntetos, J\. E\. Boylan, F\. Petropoulos, and V\. Assimakopoulos \(2011\)An aggregate\-disaggregate intermittent demand approach \(ADIDA\) to forecasting: an empirical proposition and analysis\.Journal of the Operational Research Society62\(3\),pp\. 544–554\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- F\. Petropoulos, D\. Apiletti, V\. Assimakopoulos, M\. Z\. Babai, D\. K\. Barrow, S\. B\. Taieb, C\. Bergmeir, R\. J\. Bessa, J\. Bijak, J\. E\. Boylan,et al\.\(2022\)Forecasting: theory and practice\.International Journal of Forecasting38\(3\),pp\. 705–871\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p3.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1)\.
- S\. Punia and S\. Shankar \(2022\)Predictive analytics for demand forecasting: a deep learning\-based decision support system\.Knowledge\-Based Systems258,pp\. 109956\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1)\.
- S\. Steinker, K\. Hoberg, and U\. W\. Thonemann \(2017\)The value of weather information for e\-commerce operations\.Production and Operations Management26\(10\),pp\. 1854–1874\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p1.1)\.
- X\. Tao, X\. Hong, X\. Chang, S\. Dong, X\. Wei, and Y\. Gong \(2020\)Few\-shot class\-incremental learning\.InProceedings of the IEEE/CVF conference on computer vision and pattern recognition,pp\. 12183–12192\.Cited by:[§3\.2\.4](https://arxiv.org/html/2607.16354#S3.SS2.SSS4.p4.6)\.
- J\. W\. Taylor \(2003\)Exponential smoothing with a damped multiplicative trend\.International Journal of Forecasting19\(4\),pp\. 715–725\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- J\. W\. Taylor \(2007\)Forecasting daily supermarket sales using exponentially weighted quantile regression\.European Journal of Operational Research178\(1\),pp\. 154–167\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p1.1)\.
- S\. Tian, L\. Li, W\. Li, H\. Ran, X\. Ning, and P\. Tiwari \(2024\)A survey on few\-shot class\-incremental learning\.Neural Networks169,pp\. 307–324\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1),[§3\.2\.4](https://arxiv.org/html/2607.16354#S3.SS2.SSS4.p1.1)\.
- J\. R\. Trapero, N\. Kourentzes, and R\. Fildes \(2015\)On the identification of sales forecasting models in the presence of promotions\.Journal of the Operational Research Society66\(2\),pp\. 299–307\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- J\. R\. Trapero, D\. J\. Pedregal, R\. Fildes, and N\. Kourentzes \(2013\)Analysis of judgmental adjustments in the presence of promotions\.International Journal of Forecasting29\(2\),pp\. 234–243\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- M\. R\. Wagner \(2015\)Robust purchasing and information asymmetry in supply chains with a price\-only contract\.IISE Transactions47\(8\),pp\. 819–840\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.
- X\. Wang, H\. Wang, S\. Li, and H\. Jin \(2024\)A reinforcement learning\-based online learning strategy for real\-time short\-term load forecasting\.Energy305,pp\. 132344\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p3.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p4.1)\.
- X\. Xu and Y\. Zhang \(2021\)Corn cash price forecasting with neural networks\.Computers and Electronics in Agriculture184,pp\. 106120\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p3.1)\.
- X\. Xu and Y\. Zhang \(2023\)Price forecasts of ten steel products using Gaussian process regressions\.Engineering Applications of Artificial Intelligence126,pp\. 106870\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p3.1)\.
- L\. Ye, N\. Xie, J\. E\. Boylan, and Z\. Shang \(2024\)Forecasting seasonal demand for retail: a fourier time\-varying grey model\.International Journal of Forecasting40\(4\),pp\. 1467–1485\.Cited by:[§2\.1](https://arxiv.org/html/2607.16354#S2.SS1.p2.1)\.
- G\. P\. Zhang, Y\. Xia, and M\. Xie \(2024\)Intermittent demand forecasting with transformer neural networks\.Annals of Operations Research339\(1\),pp\. 1051–1072\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p2.1),[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- G\. Zhang, L\. Wang, G\. Kang, L\. Chen, and Y\. Wei \(2023\)Slca: slow learner with classifier alignment for continual learning on a pre\-trained model\.InProceedings of the IEEE/CVF International Conference on Computer Vision,pp\. 19148–19158\.Cited by:[§3\.2\.4](https://arxiv.org/html/2607.16354#S3.SS2.SSS4.p4.6)\.
- W\. Zhang, Y\. Yu, Y\. Qi, F\. Shu, and Y\. Wang \(2019\)Short\-term traffic flow prediction based on spatio\-temporal analysis and cnn deep learning\.Transportmetrica A: Transport Science15\(2\),pp\. 1688–1711\.Cited by:[§2\.2](https://arxiv.org/html/2607.16354#S2.SS2.p2.1)\.
- F\. Zhong, Z\. Zhou, and M\. Leng \(2020\)Game\-theoretic analyses of strategic pricing decision problems in supply chains\.IISE Transactions53\(6\),pp\. 704–718\.Cited by:[§1](https://arxiv.org/html/2607.16354#S1.p1.1)\.

Supplemental Online Materials to “A Predict\-then\-Correct Loop Based on Few\-Shot Continuous Contextual Bandit for Demand Forecasting”

## Appendix A: Dataset Splitting

Table A1:Dataset and splitting
## Appendix B: Principal Hyperparameter Settings

Table B1:Principal hyperparameter settingsSettingValueBatch size64Learning rate3×10−43\\times 10^\{\-4\}OptimizerAdamHidden dimension256Action dimension1Observation dimension15Entropy coefficientα\\alpha0\.02Network layers3Parameter update ratio for the Walmart dataset0\.10Parameter update ratio for the beverage dataset0\.16Sliding\-window length3
## Appendix C: Augmentation Data Selection

![Refer to caption](https://arxiv.org/html/2607.16354v1/fig/cluster.png)Figure C1:Augmentation data selection within each cluster\.
## Appendix D: Proof of Proposition 1

###### Proof of Proposition[1](https://arxiv.org/html/2607.16354#Thmproposition1)\.

Since0∈𝒜0\\in\\mathcal\{A\}andπ0​\(st\)=0\\pi\_\{0\}\(s\_\{t\}\)=0belongs to the policy classΠ\\Pi, the PtC framework can choose the zero\-correction policy\. Under this policy, the corrected forecast becomes

y^tP​t​C​\(π0\)=y^tM​L​\(1\+π0​\(st\)\)=y^tM​L\.\\hat\{y\}\_\{t\}^\{PtC\}\(\\pi\_\{0\}\)=\\hat\{y\}\_\{t\}^\{ML\}\(1\+\\pi\_\{0\}\(s\_\{t\}\)\)=\\hat\{y\}\_\{t\}^\{ML\}\.Therefore, the ML\-only prediction is a special case of the PtC prediction class\. Since the PtC framework optimizes over a feasible policy class that contains the zero\-correction policy, taking the infimum overΠ\\Picannot yield a larger expected loss than the loss attained byπ0\\pi\_\{0\}\. Hence,

infπ∈Π𝔼​\[1T​∑t=1Tℓ​\(yt,y^tM​L​\(1\+π​\(st\)\)\)\]≤𝔼​\[1T​∑t=1Tℓ​\(yt,y^tM​L​\(1\+π0​\(st\)\)\)\]\.\\inf\_\{\\pi\\in\\Pi\}\\mathbb\{E\}\\left\[\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\ell\\left\(y\_\{t\},\\hat\{y\}\_\{t\}^\{ML\}\(1\+\\pi\(s\_\{t\}\)\)\\right\)\\right\]\\leq\\mathbb\{E\}\\left\[\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\ell\\left\(y\_\{t\},\\hat\{y\}\_\{t\}^\{ML\}\(1\+\\pi\_\{0\}\(s\_\{t\}\)\)\\right\)\\right\]\.Usingπ0​\(st\)=0\\pi\_\{0\}\(s\_\{t\}\)=0, the right\-hand side reduces to

𝔼​\[1T​∑t=1Tℓ​\(yt,y^tM​L\)\]\.\\mathbb\{E\}\\left\[\\frac\{1\}\{T\}\\sum\_\{t=1\}^\{T\}\\ell\\left\(y\_\{t\},\\hat\{y\}\_\{t\}^\{ML\}\\right\)\\right\]\.∎

## Appendix E: Proof of Proposition 2

###### Proof of Proposition[2](https://arxiv.org/html/2607.16354#Thmproposition2)\.

Letℒn​e​w​\(θ\)\\mathcal\{L\}\_\{new\}\(\\theta\)denote the loss on the new demand cycle, and define the feasible parameter space under top\-ppupdating as

Θp=\{θ0\+Δ:supp⁡\(Δ\)⊆Sp\}\.\\Theta\_\{p\}=\\left\\\{\\theta^\{0\}\+\\Delta:\\operatorname\{supp\}\(\\Delta\)\\subseteq S\_\{p\}\\right\\\}\.Then the adaptation gap

Ga​d​\(p\)=infθ∈Θpℒn​e​w​\(θ\)−infθ∈Θ1ℒn​e​w​\(θ\)G\_\{ad\}\(p\)=\\inf\_\{\\theta\\in\\Theta\_\{p\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)\-\\inf\_\{\\theta\\in\\Theta\_\{1\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)is monotone non\-increasing with respect topp, and satisfiesGa​d​\(1\)=0G\_\{ad\}\(1\)=0\.

Moreover, suppose that the masked gradient update is performed forUUsteps:

θpu\+1=θpu−η​mp⊙gpu,u=0,…,U−1,\\theta^\{u\+1\}\_\{p\}=\\theta^\{u\}\_\{p\}\-\\eta\\,m\_\{p\}\\odot g^\{u\}\_\{p\},\\quad u=0,\\ldots,U\-1,whereθp0=θ0\\theta^\{0\}\_\{p\}=\\theta^\{0\},η\>0\\eta\>0is the learning rate, and every gradient coordinate is bounded as\|\(gpu\)j\|≤G\|\(g^\{u\}\_\{p\}\)\_\{j\}\|\\leq G\. Then the parameter drift satisfies

‖θpU−θ0‖2≤η​U​G​⌈p​d⌉\.\\\|\\theta^\{U\}\_\{p\}\-\\theta^\{0\}\\\|\_\{2\}\\leq\\eta UG\\sqrt\{\\lceil pd\\rceil\}\.Therefore, the upper bound on parameter drift is monotone non\-decreasing with respect toppand equals zero whenp=0p=0\. If the old\-cycle lossℒo​l​d​\(θ\)\\mathcal\{L\}\_\{old\}\(\\theta\)isLo​l​dL\_\{old\}\-Lipschitz continuous, then

ℒo​l​d​\(θpU\)−ℒo​l​d​\(θ0\)≤Lo​l​d​η​U​G​⌈p​d⌉,\\mathcal\{L\}\_\{old\}\(\\theta^\{U\}\_\{p\}\)\-\\mathcal\{L\}\_\{old\}\(\\theta^\{0\}\)\\leq L\_\{old\}\\eta UG\\sqrt\{\\lceil pd\\rceil\},which implies that the forgetting\-risk bound is also monotone non\-decreasing with respect topp\.

We first prove the plasticity result\. For anyp1≤p2p\_\{1\}\\leq p\_\{2\}, the nesting property of the Top\-ppselected sets givesSp1⊆Sp2S\_\{p\_\{1\}\}\\subseteq S\_\{p\_\{2\}\}\. Therefore, any parameter perturbation supported onSp1S\_\{p\_\{1\}\}is also supported onSp2S\_\{p\_\{2\}\}, which implies

Θp1⊆Θp2\.\\Theta\_\{p\_\{1\}\}\\subseteq\\Theta\_\{p\_\{2\}\}\.SinceΘp2\\Theta\_\{p\_\{2\}\}is a larger feasible parameter space, minimizing the new\-cycle loss overΘp2\\Theta\_\{p\_\{2\}\}cannot yield a larger optimal value than minimizing overΘp1\\Theta\_\{p\_\{1\}\}\. Hence,

infθ∈Θp2ℒn​e​w​\(θ\)≤infθ∈Θp1ℒn​e​w​\(θ\)\.\\inf\_\{\\theta\\in\\Theta\_\{p\_\{2\}\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)\\leq\\inf\_\{\\theta\\in\\Theta\_\{p\_\{1\}\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)\.Subtracting the constant full\-update benchmarkinfθ∈Θ1ℒn​e​w​\(θ\)\\inf\_\{\\theta\\in\\Theta\_\{1\}\}\\mathcal\{L\}\_\{new\}\(\\theta\)from both sides gives

Ga​d​\(p2\)≤Ga​d​\(p1\)\.G\_\{ad\}\(p\_\{2\}\)\\leq G\_\{ad\}\(p\_\{1\}\)\.Thus, the adaptation gap is monotone nonincreasing inpp\. Whenp=1p=1, all parameters are allowed to update, soΘp=Θ1\\Theta\_\{p\}=\\Theta\_\{1\}and therefore

We next prove the stability result\. By the masked update rule,

θpU−θ0=−η​∑u=0U−1mp⊙gpu\.\\theta^\{U\}\_\{p\}\-\\theta^\{0\}=\-\\eta\\sum\_\{u=0\}^\{U\-1\}m\_\{p\}\\odot g^\{u\}\_\{p\}\.Taking the Euclidean norm and applying the triangle inequality yields

‖θpU−θ0‖2≤η​∑u=0U−1‖mp⊙gpu‖2\.\\\|\\theta^\{U\}\_\{p\}\-\\theta^\{0\}\\\|\_\{2\}\\leq\\eta\\sum\_\{u=0\}^\{U\-1\}\\\|m\_\{p\}\\odot g^\{u\}\_\{p\}\\\|\_\{2\}\.Since the maskmpm\_\{p\}contains exactly⌈p​d⌉\\lceil pd\\rceilnonzero entries and each gradient coordinate is bounded byGG, we have

‖mp⊙gpu‖2≤G​⌈p​d⌉\.\\\|m\_\{p\}\\odot g^\{u\}\_\{p\}\\\|\_\{2\}\\leq G\\sqrt\{\\lceil pd\\rceil\}\.Therefore,

‖θpU−θ0‖2≤η​U​G​⌈p​d⌉\.\\\|\\theta^\{U\}\_\{p\}\-\\theta^\{0\}\\\|\_\{2\}\\leq\\eta UG\\sqrt\{\\lceil pd\\rceil\}\.Because⌈p​d⌉\\lceil pd\\rceilis monotone non\-decreasing inpp, the parameter\-drift upper bound is also monotone non\-decreasing inpp\. Whenp=0p=0, no parameter is selected for updating, somp=0m\_\{p\}=0and

‖θ0U−θ0‖2=0\.\\\|\\theta^\{U\}\_\{0\}\-\\theta^\{0\}\\\|\_\{2\}=0\.
Finally, ifℒo​l​d\\mathcal\{L\}\_\{old\}isLo​l​dL\_\{old\}\-Lipchitz continuous, then

ℒo​l​d​\(θpU\)−ℒo​l​d​\(θ0\)≤Lo​l​d​‖θpU−θ0‖2\.\\mathcal\{L\}\_\{old\}\(\\theta^\{U\}\_\{p\}\)\-\\mathcal\{L\}\_\{old\}\(\\theta^\{0\}\)\\leq L\_\{old\}\\\|\\theta^\{U\}\_\{p\}\-\\theta^\{0\}\\\|\_\{2\}\.Substituting the drift bound gives

ℒo​l​d​\(θpU\)−ℒo​l​d​\(θ0\)≤Lo​l​d​η​U​G​⌈p​d⌉\.\\mathcal\{L\}\_\{old\}\(\\theta^\{U\}\_\{p\}\)\-\\mathcal\{L\}\_\{old\}\(\\theta^\{0\}\)\\leq L\_\{old\}\\eta UG\\sqrt\{\\lceil pd\\rceil\}\.Thus, increasingppexpands the adaptable parameter space and improves plasticity, but it also increases the upper bound on parameter drift and forgetting risk\. This establishes the stability\-plasticity trade\-off of the top\-ppupdating rule\. ∎

## Appendix F: Proof of Proposition 3

###### Proof of Proposition[3](https://arxiv.org/html/2607.16354#Thmproposition3)\.

Define the smoothed expected correction objective

𝒥ϵ​\(θ\)=𝔼\(st,yt,y^tM​L\)∼𝒟,at∼πθ​\[ρϵ​\(y^tM​L​\(1\+at\)−yt\)\],\\mathcal\{J\}\_\{\\epsilon\}\(\\theta\)=\\mathbb\{E\}\_\{\(s\_\{t\},y\_\{t\},\\hat\{y\}\_\{t\}^\{ML\}\)\\sim\\mathcal\{D\},\\,a\_\{t\}\\sim\\pi\_\{\\theta\}\}\\left\[\\rho\_\{\\epsilon\}\\left\(\\hat\{y\}\_\{t\}^\{ML\}\(1\+a\_\{t\}\)\-y\_\{t\}\\right\)\\right\],whereρϵ​\(z\)=z2\+ϵ2\\rho\_\{\\epsilon\}\(z\)=\\sqrt\{z^\{2\}\+\\epsilon^\{2\}\}\. The smoothing parameterϵ\>0\\epsilon\>0avoids the non\-differentiability of the absolute value while preserving the MAE\-type correction objective asϵ→0\\epsilon\\to 0\. The notationat∼πθa\_\{t\}\\sim\\pi\_\{\\theta\}means that the correction action at timettis generated by the policy parameterized byθ\\theta\.

At update stepuu, the top\-pprule defines a binary maskmu∈\{0,1\}dm\_\{u\}\\in\\\{0,1\\\}^\{d\}\. The masked policy update can be written as

θu\+1=θu−η​mu⊙∇𝒥ϵ​\(θu\)\.\\theta^\{u\+1\}=\\theta^\{u\}\-\\eta\\,m\_\{u\}\\odot\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\.Let

du=mu⊙∇𝒥ϵ​\(θu\)\.d\_\{u\}=m\_\{u\}\\odot\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\.Thenθu\+1−θu=−η​du\\theta^\{u\+1\}\-\\theta^\{u\}=\-\\eta d\_\{u\}\. Since𝒥ϵ\\mathcal\{J\}\_\{\\epsilon\}isLL\-smooth, the descent lemma gives

𝒥ϵ​\(θu\+1\)≤𝒥ϵ​\(θu\)\+∇𝒥ϵ​\(θu\)⊤​\(θu\+1−θu\)\+L2​‖θu\+1−θu‖22\.\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\+1\}\)\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\+\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)^\{\\top\}\(\\theta^\{u\+1\}\-\\theta^\{u\}\)\+\\frac\{L\}\{2\}\\\|\\theta^\{u\+1\}\-\\theta^\{u\}\\\|\_\{2\}^\{2\}\.Substitutingθu\+1−θu=−η​du\\theta^\{u\+1\}\-\\theta^\{u\}=\-\\eta d\_\{u\}yields

𝒥ϵ​\(θu\+1\)≤𝒥ϵ​\(θu\)−η​∇𝒥ϵ​\(θu\)⊤​du\+L​η22​‖du‖22\.\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\+1\}\)\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\-\\eta\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)^\{\\top\}d\_\{u\}\+\\frac\{L\\eta^\{2\}\}\{2\}\\\|d\_\{u\}\\\|\_\{2\}^\{2\}\.Becausemum\_\{u\}is a binary mask,

∇𝒥ϵ​\(θu\)⊤​du=∇𝒥ϵ​\(θu\)⊤​\(mu⊙∇𝒥ϵ​\(θu\)\)=‖du‖22\.\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)^\{\\top\}d\_\{u\}=\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)^\{\\top\}\\left\(m\_\{u\}\\odot\\nabla\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\\right\)=\\\|d\_\{u\}\\\|\_\{2\}^\{2\}\.Therefore

𝒥ϵ​\(θu\+1\)≤𝒥ϵ​\(θu\)−η​\(1−L​η2\)​‖du‖22\.\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\+1\}\)\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\-\\eta\\left\(1\-\\frac\{L\\eta\}\{2\}\\right\)\\\|d\_\{u\}\\\|\_\{2\}^\{2\}\.If0<η≤1/L0<\\eta\\leq 1/L, then1−L​η/2≥1/21\-L\\eta/2\\geq 1/2, and thus

𝒥ϵ​\(θu\+1\)≤𝒥ϵ​\(θu\)−η2​‖du‖22≤𝒥ϵ​\(θu\)\.\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\+1\}\)\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\-\\frac\{\\eta\}\{2\}\\\|d\_\{u\}\\\|\_\{2\}^\{2\}\\leq\\mathcal\{J\}\_\{\\epsilon\}\(\\theta^\{u\}\)\.This proves the monotonic decrease of the expected correction loss after each policy update\. ∎

## Appendix G: Top\-ppMasked Bandit Update

Algorithm G1Top\-ppmasked bandit update for the CB correction policy1:Input:Feedback data

𝒟n​e​w\\mathcal\{D\}\_\{new\}, initial policy

πθ0\\pi\_\{\\theta^\{0\}\}, update ratio

pp, learning rate

η\\eta, mini\-batch size

BB, and update steps

UU
2:Output:Updated correction policy

πθU\\pi\_\{\\theta^\{U\}\}
3:for

u=0,…,U−1u=0,\\ldots,U\-1do

4:Sample a mini\-batch

ℬu⊂𝒟n​e​w\\mathcal\{B\}\_\{u\}\\subset\\mathcal\{D\}\_\{new\}, where

\|ℬu\|=B\|\\mathcal\{B\}\_\{u\}\|=B
5:For all

t∈ℬut\\in\\mathcal\{B\}\_\{u\}, compute

μθu​\(st\)\\mu\_\{\\theta^\{u\}\}\(s\_\{t\}\)and

σθu​\(st\)\\sigma\_\{\\theta^\{u\}\}\(s\_\{t\}\), sample

a~t∼𝒩​\(μθu​\(st\),σθu2​\(st\)\),\\tilde\{a\}\_\{t\}\\sim\\mathcal\{N\}\\left\(\\mu\_\{\\theta^\{u\}\}\(s\_\{t\}\),\\sigma\_\{\\theta^\{u\}\}^\{2\}\(s\_\{t\}\)\\right\),and set

at=clip⁡\(a~t,−1,2\)a\_\{t\}=\\operatorname\{clip\}\(\\tilde\{a\}\_\{t\},\-1,2\)
6:Compute the corrected forecasts and rewards:

rt=τ​\(\|y^tM​L−yt\|−\|y^tC​B−yt\|\)r\_\{t\}=\\tau\\left\(\|\\hat\{y\}^\{ML\}\_\{t\}\-y\_\{t\}\|\-\|\\hat\{y\}^\{CB\}\_\{t\}\-y\_\{t\}\|\\right\)
7:Estimate the bandit policy gradient:

∇^θ​J​\(θu\)=1\|ℬu\|​∑t∈ℬu\(rt−bt\)​∇θlog⁡πθu​\(at∣st\)\\widehat\{\\nabla\}\_\{\\theta\}J\(\\theta^\{u\}\)=\\frac\{1\}\{\|\\mathcal\{B\}\_\{u\}\|\}\\sum\_\{t\\in\\mathcal\{B\}\_\{u\}\}\(r\_\{t\}\-b\_\{t\}\)\\nabla\_\{\\theta\}\\log\\pi\_\{\\theta^\{u\}\}\(a\_\{t\}\\mid s\_\{t\}\)
8:For each layer

kk, construct mask

MMby selecting the smallest

qk=⌈p​\|θk\|⌉q\_\{k\}=\\left\\lceil p\|\\theta^\{k\}\|\\right\\rceilparameters according to

\|θjk\|\|\\theta\_\{j\}^\{k\}\|
9:Update:

θu\+1=θu\+η​M⊙∇^θ​J​\(θu\)\\theta^\{u\+1\}=\\theta^\{u\}\+\\eta M\\odot\\widehat\{\\nabla\}\_\{\\theta\}J\(\\theta^\{u\}\)
10:endfor

11:Return

πθU\\pi\_\{\\theta^\{U\}\}

Similar Articles

Behavior-Aware Auxiliary Corrections for Off-Policy Temporal-Difference Prediction

arXiv cs.AI

This paper proposes behavior-aware auxiliary corrections for off-policy temporal-difference prediction, introducing BA-TDC and BA-TDRC algorithms that replace the auxiliary covariance matrix with the behavior Bellman matrix to improve stability and convergence. Theoretical analysis and experiments on standard benchmarks validate the effectiveness of the proposed methods.