How Zalando forecasts fashion demand at fifteen prices
In May 2023 sixteen authors, almost all from Zalando, described the model behind its discounts. It forecasts what customers would buy rather than what they bought, at every price from full to 70% off, and it is built so that a deeper discount never means less demand. The benchmark is narrow and there is no profit figure. Three years on, Zalando still runs it, next to a tree model for sales events.

A fashion buyer orders most of the season's stock months before it arrives. After that, the only lever left is the price.
Zalando, the Berlin-based online fashion platform, described the forecaster behind that lever in Deep Learning based Forecasting: a case study from the online fashion industry, posted on arXiv on 23 May 2023. It has sixteen authors; fourteen were at Zalando and two had done the work there before moving on. There is only one version on arXiv, and the same title later appeared as a chapter in a Palgrave book, which we did not read. The paper's licence does not allow reuse of its figures, so every diagram here is our own. Every result is Zalando's; nobody outside checked it, and no code or data was released.
The problem: stock you cannot reorder
The paper opens with the constraint: "The arguably most peculiar challenge in the fashion industry stems from a fixed inventory assumption where a meaningful part of the inventory arrives at the beginning of a season". Much of that stock cannot be reordered mid-season. So, unlike a grocer, Zalando does not mainly forecast to restock: "Instead, a primary use-case for forecasting is pricing/discounting". The reason is plain: "pricing presents a major lever to reduce the risk to be overstocked at the end of the season".
Three things make the data hard. Much of the range is new every season: "Complications that arise from the fixed inventory assumptions include the prominence of cold start problems (a large part of the catalogue is renewed each season) and short history." Most items barely sell: "Most articles do not sell on most days, but there are a few high-selling products." And the scale is large: "Zalando is active in 25 European markets, its catalog comprises of >6500 brands with >50M active customers." The paper counts 1.6 million articles on the platform in the third quarter of 2021.
The model has been around for a while: "It has been in use at Zalando in different versions since 2019". The paper does not say what it replaced.
The design: three choices that matter
1. Forecast demand, not sales
A shop records sales. What it needs is demand: "Demand corresponds to what the customers want to purchase, and materialises only when enough stock is available." When one size runs out, the sales number for that week is too low, and a model trained on it learns to forecast too low for exactly the items that sell well.
Zalando fixes the target before training. In the paper's words: "If some sizes are out of stock, the demand is in fact (partially) unobserved and we cannot directly obtain it from the sales data." It learns how an article's demand splits across sizes in weeks when every size was in stock, and uses that split to estimate the missing sizes in weeks when some were gone. During training, "not only zero padded values are masked out but also all data points with zero stock availability." And the estimated weeks are kept out of scoring: "special care has to be taken by not evaluating our model on extrapolated data, but rather exclude this data from evaluation".

This is the most portable idea in the paper, and it costs nothing but a stock history per size.
2. One model, fifteen prices
There is one global model for the whole assortment, an encoder-decoder Transformer that reads each article's history: demand, discounts, stock, stock arrivals, brand, category and the original price. One detail matters for speed: "Different to the original transformer architecture, the decoder is non-autoregressive, allowing to compute each future state in parallel."
The output is not one number per week. "The demand forecast model generates article level demand predictions for 14 different countries in the price range of 0 to 70% discount in 5 percentage point discount steps." That is fifteen price levels, for each article, country and week, up to 26 weeks ahead. The paper calls it a demand grid and puts its size at up to 5.5 billion records.
A separate optimiser turns the grid into prices: "Based on the discount dependent demand forecast grid, the down-stream price optimizer then selects an article specific future price trajectory that maximizes the achievable profit of the individual article in the bounds of certain business rules like stock levels and maximum discount steps." The authors are clear about what counts: "While our demand forecasts and price elasticities have some value in themselves, the most important artefact are discount decisions."
3. A deeper discount can never lower demand
History is a poor teacher on price. A shop discounts what is already selling badly, so in the raw data deep discounts sit next to low sales. The paper names the trap: "the underlying causal mechanism is subject to confounding, resulting in counter intuitive demand and discount curves". A model that learns that more discount means fewer sales would steer the optimiser towards nonsense.
So price gets its own path: "Instead of feeding future discounts into the decoder, we directly provide them to the monotonic demand layer". That last layer is a piecewise-linear curve over discount levels, built so that it can only rise. The paper's justification is short: "The monotonicity is a standard assumption in econometrics". The model still learns how steep the curve is for each article. It just cannot learn the wrong sign.
Two smaller choices round it out. There are two decoders, one for the weeks where prices are actually set and one for later: "We set 5 week as the threshold for near future, and 5 to 20 week forecast will be considered as far future." And the loss aims at the average, because the business case is close to linear: "we are primarily interested in maximizing expected profit and profit is a (mostly) linear function." It is trained on the estimated demand, not raw sales: "The loss is not computed on the observed sales but on the inferred demand".
Serving: a weekly run
The setup is unglamorous: "We use a standard forecasting system set-up combining Spark and Amazon SageMaker". The model has about 53 million parameters. Training cost is given exactly: "A standard time to train the model is about 45 hours on a four GPU instance (ml.g4dn.12xlarge) at a cost of approximately 275 US$." The paper does not say whether every weekly retrain is a full run.
Retraining is weekly: "experiments reported in Figure 12 have shown that a weekly retraining scheme offers best results." Two checks guard it in production. The forecasts are watched against reality: "we have extensive monitoring metrics that compare incoming live sales data with our forecasts and alarm us, if we observe a deterioration in practice." And the inputs are watched too: "Third, we monitor the input data distribution to scan it for distribution shifts."
How they measured it
The metric is Zalando's own, a squared-error measure weighted by the article's original price, "to place a higher importance on more expensive articles as a proxy for the overall value for Zalando", reported with a separate bias figure. They chose a squared error on purpose: "It turns out that outliers are an important factor for the performance so that a metric that resembles the RMSE more closely will have the best result with respect to the downstream pricing application."
The test set is small and specific: "For the experiments, we chose 10 weeks in 2022, using all sales data from Germany from the category Textil. In Zalando this is the largest category, and performance here is highly indicative of the performance on the whole assortment." And: "We focus primarily on the performance of the first weeks forecast."
| Forecaster | Demand error | Bias |
|---|---|---|
| Naive (repeat last week) | 0.603 | 0.079 |
| DeepAR | 0.593 | 0.090 |
| LightGBM | 0.489 | 0.296 |
| Zalando Transformer | 0.449 | -0.047 |
Mean over the 10 weeks, from the paper's Table 2; lower error is better, bias closest to zero is better. By our arithmetic the Transformer's error is about 8% below LightGBM's and about 26% below naive.
The paper reads the tree model fairly: "While tree based models seem to be a close competitor in terms of demand error and were much faster to train, we saw a significantly higher bias." It is also candid about the simplest baseline: "It is worth mentioning that the naive baseline performs quite competitively on the one week forecast." The gap opens when demand swings: "During the end of season sale in 2022 for example we observed a demand error of 0.877 for the naive forecaster while our transformer model reached a much more stable demand error of 0.491."
A second test trained the model on growing slices of the assortment. "Interestingly, the naive forecaster is already outperformed by training our model on a small fraction of the assortment (between 0.2% and 6.6% for the three start dates under consideration)." The authors add: "We believe that this is the first time that evidence for scaling laws for transformers in forecasting was presented." Of their own claim of superiority, they write: "Clearly, the above experiment is only a first step in understanding a potential superiority of the transformer-based approach."
What the test does not show
- No business result. There is no A/B test, profit or overstock number for this forecaster. Everything is forecast error.
- One slice. One country, one category, ten weeks, first-week forecast. The standard deviations across those weeks (0.04 for the Transformer, 0.066 for LightGBM) are about as large as the gap between them, and there is no significance test.
- Few baselines. Naive, DeepAR and LightGBM only. The paper says of newer deep models: "We have not yet compared ourselves against these baselines for practical reasons". Nothing says the LightGBM was tuned.
- Loose ends in the text. The model is used for 26 weeks, but the far decoder is described as covering weeks 5 to 20. The paper's retraining chart is noisy: the error at two weeks old is lower than at one week, and only the 20-week-old model is clearly worse.
- A point forecast. "Note that the approach described here is a point forecast." Fine for an optimiser on a linear profit, less fine for someone deciding how much to buy.
- Not causal. The monotone layer gets the sign right; it does not prove the size of the effect. The authors say so: "We leave a more comprehensive causal treatment for future work".
What has changed since
The Transformer is still in production. A Zalando paper posted on 11 June 2026, High-Frequency Pricing at Scale for E-Commerce, with seven of the original authors among its ten, says: "our production solution for predicting weekly article-level demand during non-sales-event periods is based on a Transformer model outlined in Kunz et al. [2023]." Same 14 countries, same 26 weeks.
Sales events got their own tree model. The same 2026 paper adds a daily system for campaigns, built on LightGBM, and inside its own comparison writes: "Gradient Boosted Trees perform the best." The headline result: "We validate our approach through 23 A/B tests across 12 markets during 2023-2024 sales campaigns at Zalando", where "the new pricing system achieves approximately 6% higher profit while maintaining equivalent performance on sales and revenue compared to the previous manual-algorithmic hybrid approach." That 6% belongs to the new daily system against the old way of running sales, not to the 2023 Transformer.
Restocking chose trees too. A Zalando engineering post from June 2025, Building a dynamic inventory optimisation system, describes forecasting for partner stock: "After extensive experimentation with deep learning models like TFT and other machine learning approaches, we selected the LightGBM model integrated with Nixtla’s MLForecast interface as the foundation of our demand forecasting pipeline." And: "Our weekly forecasting pipeline processes 3 years of historical data for 5 million SKUs (size and colour) using a sliding window approach, and takes less than 2 hours." Three years of weekly history is the size of data an Indonesian brand actually has.
The causal gap got a paper. In Causal Forecasting for Pricing (December 2023, revised January 2024), Zalando authors report that "we demonstrate on real-world data that our method outperforms forecasting methods in off-policy settings (i.e., when there's a change in the pricing policy) while only slightly trailing in the on-policy setting." Whether it runs in production is not stated.
Pretrained forecasting models arrived. Chronos-2, posted in October 2025 by Amazon authors, is "a pretrained model capable of handling univariate, multivariate, and covariate-informed forecasting tasks in a zero-shot manner." Covariates matter here, because discount is one. Its retail comparisons are against other pretrained models only; we found no test against LightGBM on discounted fashion data. None of the later Zalando pages we read mentions using such a model.
The company grew and widened. Zalando's full-year 2025 results report "active customers reaching a new high of 62 million", after it took over ABOUT YOU in July 2025. In its Q3 2026 results, "Zalando introduces Zalando Extended, adding products from other online shops, which Zalando does not sell itself, to the platform." Its 2025 annual report names a risk every seasonal forecaster knows: "Climate change continues to cause volatility in seasonal patterns, resulting in “blurred” seasons."
Why it matters for your business
Indonesian fashion sells through the same squeeze: stock bought ahead, then discounts to clear it. And the calendar is harder than Europe's.
The biggest peak moves. Under the government's joint decree, Idulfitri 2026 fell on "21–22 Maret (Sabtu-Minggu): Idulfitri 1447 H" (Setneg), and for 2027 the decree lists "Rabu-Kamis, 10-11 Maret 2027: Idulfitri 1448 Hijriah;" (Setneg), with the final date set later by the religious affairs minister. That is eleven days earlier in one year. A model that uses week of the year puts the Lebaran ramp in the wrong place every year.
The peak is concentrated. A February 2026 Okezone report says: "Penjualan gamis, hijab, mukena, dan sarung biasanya meningkat signifikan menjelang Ramadhan dan Lebaran." With two or three years of history, a brand has seen two or three Lebarans. That is very few examples of its most important weeks.
Platform campaigns stack on top. Shopee's 2026 11.11 campaign ran for weeks, not a day: "Berlangsung mulai 25 Oktober hingga 11 November 2026" (Shopee). A platform voucher is not the same thing as your own markdown, and a model that sees only the final price cannot tell them apart. The market is large enough to care: the e-Conomy SEA 2025 report, as summarised by Google Indonesia, projects that e-commerce "Nilai sektor ini diproyeksikan tumbuh lebih dari 14% menjadi US$71 miliar". We found no reliable figure for the fashion share.
Data law mostly stays out of the way, if you keep it that way. A forecast of units per SKU per week is not data about a person. It changes if you feed in customer-level histories or set prices per customer. UU 27/2022 (UU PDP) gives people the right to object to decisions made only by automated processing, including profiling (Pasal 10), and asks for an impact assessment when processing covers "evaluasi, penskoran, atau pemantauan yang sistematis" (Pasal 34). The implementing PP 33/2026, in a regional government's copy, was enacted on 16 July 2026 and takes effect six months later (Pasal 225). Our reading, not legal advice: article-level markdowns are fine; per-customer prices set by a model are where to get advice.
How we would build it today

Picture an Indonesian fashion brand: 500 to 5,000 SKUs, two to three years of weekly sales across its own site and two marketplaces, frequent discounts, and a Lebaran peak that makes the year.
- Fix the target before the model. Keep stock per size per week. Where a size sold out, fill its demand from that article's size split in fully stocked weeks, or at least flag the week and leave it out of training and scoring. This is Zalando's best idea, and it needs no machine learning at all.
- Record every discount as data. Start date, end date, depth, channel, and whether it was your markdown or a platform campaign such as a flash sale or a 11.11 voucher. Feed depth as a number and the campaign as a separate flag.
- Put Lebaran on the calendar the right way. Weeks before and after Idulfitri, taken from the official decree for each year, plus flags for Ramadan, the final week before Lebaran and the two weeks after. Never week of the year.
- Use a tree model, not a Transformer. One LightGBM model over all SKU-week rows, with lags, category, colour, price tier and the features above. Zalando's own forecaster needed a sizeable slice of 1.6 million articles to beat a naive forecast; a few thousand SKUs is far below that, and Zalando itself picked LightGBM for three years of weekly data. MLForecast handles the lag plumbing.
- Constrain the price effect. LightGBM has a monotone constraints setting: mark discount depth as increasing, and the model cannot learn that a deeper discount sells less. That is the cheap version of Zalando's monotone layer.
- Forecast ranges for buying. For a markdown decision the average is enough. For a buying decision, where one overbuy can tie up a large share of cash, ask for the 10th, 50th and 90th percentiles.
- Seed new items from similar ones. A new style starts from the first weeks of the nearest past styles in the same category, colour and price tier, then updates once one or two weeks of real sales exist.
- Test on the weeks that matter. Backtest on whole seasons, never random rows. Score the last Lebaran ramp and the 11.11 window separately from normal weeks. The model has to beat two baselines: last week's sales, and last year's Lebaran weeks shifted to this year's date. If it cannot beat naive for next week, use naive for next week.
- Report two numbers, every week. Error weighted by revenue, and bias, per category. A model that is accurate on average but always under-forecasts best-sellers will empty your shelves before Lebaran.
- Try a pretrained model as a challenger, not the plan. Run Chronos-2 on the same Lebaran backtest with discount as a covariate. Keep it if it wins there; we have no evidence either way.
A first version, cleaned demand, the tree model, the Lebaran backtest and a weekly report, is three to four weeks for one data person working with the merchandiser who sets the discounts.