A Predict-then-Correct Loop Based on Few-Shot Continuous Contextual Bandit for Demand Forecasting
This paper proposes a "predict-then-correct" framework that combines a static machine learning forecast with a few-shot continuous contextual bandit correction policy to significantly improve retail demand forecasting accuracy and reduce inventory costs, particularly in scenarios with sparse labels and rapidly shifting demand patterns.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to guess how many people will show up to your school's annual bake sale. You have a super-smart computer program that looks at last year's data, the weather forecast, and the price of cupcakes to make a prediction. This is what scientists call "demand forecasting," and it's the backbone of keeping stores stocked with the right amount of stuff. But here's the tricky part: what if this year is totally different? Maybe a new viral trend makes everyone want a specific flavor, or a sudden rainstorm keeps everyone home. The old computer program, trained on last year's boring data, doesn't know this yet. It's like a GPS that hasn't been updated with new road closures; it keeps telling you to drive straight into a wall.
In the world of retail, this is a huge problem. Stores have millions of different items (like different flavors of soda or sizes of shoes), and sometimes new items appear with no history at all. If the store guesses wrong, they either run out of product (angry customers) or have too much sitting on shelves (wasted money). Traditionally, to fix a bad guess, you'd have to stop everything, feed the computer a mountain of new data, and retrain it from scratch. But that takes too long. By the time the computer learns, the trend might be over. This paper explores a smarter way to handle these surprises without hitting the "reset" button.
The researchers behind this study, Zhiwei Lei, Benedict Jun Ma, and Ilya Jackson, propose a clever two-step trick they call "Predict-then-Correct" (PtC). Think of it like having a seasoned chef (the first computer model) who makes a great base soup based on a classic recipe. Then, instead of throwing the soup away and starting over when a customer asks for "a little more spice," you have a quick-thinking sous-chef (the correction system) who tastes the soup and adds just the right amount of salt or pepper in real-time.
Here is how their "sous-chef" works. First, the main computer model makes its best guess about how much of a product people will buy. Then, a special "contextual bandit" system steps in. "Contextual" just means it looks at the current situation (is it a holiday? is it the weekend?), and "bandit" is a fancy name for a learning system that tries different actions and sees which one pays off. In this case, the "action" is adjusting the chef's prediction up or down. The system tries a tiny adjustment, sees if the actual sales match better, and gets a "reward" if it was right. If it was wrong, it learns not to do that again.
The real magic happens when there isn't much data to learn from, like when a brand-new product is launched. Usually, computers get confused and forget what they knew before when they try to learn from just a few new numbers. This paper suggests a "few-shot" strategy, which is like teaching a student with only a few practice problems. To make this work, the system looks for other products that are similar to the new one (like comparing a new spicy soda to an old spicy soda) to borrow some clues. It also uses a "Top-p masked update" rule. Imagine the computer's brain has thousands of knobs. Instead of turning all of them at once (which might break the machine), this rule only turns the tiny, sensitive knobs that need a little tweak, while leaving the big, important knobs that hold the main knowledge alone. This stops the computer from "forgetting" everything it learned in the past.
The team tested this idea using real data from Walmart and a major beverage company. They found that their "Predict-then-Correct" loop was a clear winner. Across different types of products—whether they sold a lot of stable items, a few stable items, or weird, unpredictable items—the new method reduced prediction errors significantly. In one test, it improved the average accuracy by 9.52% compared to just using the original computer model. Even more importantly, when they used these better guesses to decide how much stock to order, the stores ended up spending less money on holding extra inventory or losing sales to empty shelves.
The paper explicitly argues against the idea that you need to completely retrain your models every time the market changes, or that you need massive amounts of new data to make a correction. They also show that simply adding a reinforcement learning layer without being careful about how you update the model can actually make things worse, leading to instability. Instead, their findings suggest that a lightweight, adaptive layer that tweaks the existing forecast in real-time is the sweet spot. It bridges the gap between the slow, heavy learning of the past and the fast, chaotic reality of the present, proving that sometimes the best way to fix a prediction isn't to start over, but to just listen to the feedback and adjust the dial.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.