Learning and Optimization with Seasonal Patterns 1: Regret Upper Bound for the Two-Stage Period-Estimation and Confidence-Bound PolicyResearch Paper
Motivation
Many demand, traffic and click-through series are seasonal: their mean repeats after a fixed number of periods (a week of days, a year of months), while the length of that cycle is not known in advance. A retailer choosing among promotions, or a platform choosing among recommendations, then faces a multi-armed bandit whose arms have time-varying but periodic mean rewards. Standard stochastic bandit algorithms assume stationary means and fail here, and fully adversarial or arbitrarily drifting models give up the structure that periodicity offers.
N. Chen, C. Wang and L. Wang (arXiv:2005.08088, Operations Research, 2025) propose a two-stage policy for this problem: a spectral first stage that estimates every arm's period from a short exploration phase, and a confidence-bound second stage that learns and exploits the resulting "effective arms". Their main upper bound, Theorem 1, shows that the policy's regret grows like up to logarithmic factors. This mission formalizes that theorem and the chain of lemmas behind it. The matching lower bound (Theorem 3 of the paper) is the subject of a separate mission of this series.
Setting
At each epoch a decision maker pulls one of arms. Pulling arm at epoch yields the reward . The mean has a minimum period : for all , and no smaller positive shift has this property. The standing assumptions are:
- Assumption 1: .
- Assumption 2: the noises are independent and sub-Gaussian with parameter , i.e. for all real and .
The pseudo-regret of an arm sequence is , and the number of effective arms is : arm at phase is one effective arm.
Stage one (Algorithm 1). Each arm is pulled times in a row. From its rewards the policy computes the periodogram , the modulus of the discrete Fourier transform , on . A data-driven threshold is computed from the constants (sums of sinc-type maxima), and . The algorithm repeatedly takes the highest peak above in , snaps it to the nearest fraction with , and removes a -neighbourhood. The period estimate is the least common multiple of the selected reciprocals.
Stage two (Algorithm 2). At every later epoch an -round screening tournament, , compares the arms at their current phases modulo . It uses estimated means and widths pooled from the stage-one samples and from round-specific index sets . The weak oracle runs the same policy with the true periods in place of .
The parameters are fixed by (7): , , . Assumption 3 asks , and . Assumption 4 asks the smallest present Fourier coefficient of each arm to dominate a combination of and the largest coefficient .
Formalization targets
Goal: Theorem 1
Under Assumptions 1–4 and (7), the two-stage policy satisfies
with depending only on and , and with Algorithm 2 run at .
Stage one: correct period identification
- Lemma 1: uniform noise bound for the periodogram, .
- Lemmas 2–3: leakage bounds , , and .
- Lemmas 4–5: the threshold separates the neighbourhoods of the present frequencies from the rest, with probability .
- Lemmas 6–7: the sharper noise bound near possible present frequencies, and the location of the peaks within of them.
- Theorem 2: .
Stage two: the oracle's regret
- Lemma 15: an anytime sub-Gaussian deviation bound.
- Lemma 9: the confidence event has probability at least .
- Lemma 10: on the optimal arm survives screening, and each epoch's gap is at most , or .
- Lemma 16: the summed widths of a round are at most .
- Lemma 11: the oracle's expected regret is at most with depending only on .
Significance
The theorem shows that unknown seasonality costs only the factor that would be paid if every phase of every arm were a separate stationary arm. Up to logarithmic factors this matches the rate of the classical stationary bandit with arms in place of . Together with the paper's lower bound it locates the minimax regret of periodic bandits within a factor . Stage one is a non-asymptotic, finite-sample period-identification guarantee for a thresholded periodogram, which is of independent use in spectral estimation.
The paper proves these results; none of them is machine-checked. A complete development yields a verified finite-sample periodogram theory (noise bounds for random trigonometric polynomials, Dirichlet-kernel leakage estimates), a verified anytime sub-Gaussian inequality, and a verified analysis of a nested elimination algorithm with data reuse. The formalization also pins down several points the printed text leaves open: the constant of Lemma 6 and the exponent of Lemma 7 and Theorem 2 are slightly stronger than what the proofs give, and the printed claim that Theorem 1's constant is independent of is not established by the printed argument.
Difficulty
Two steps resist the obvious approach. In stage one, the periodogram has to be controlled at uncountably many frequencies at once. A union bound over is unavailable, and the leakage of each present frequency spreads over the whole spectrum, so both the noise and the signal must be bounded uniformly in with explicit constants. In stage two, the samples used to estimate an effective arm are selected with the estimated periods, which were computed from the same stage-one data, so the usual independence behind confidence bounds fails. Lemmas 9–11 are therefore stated for the weak oracle, whose sample selection does not depend on the data; on the event the definitions make the oracle's run and the policy's run the same function of the noise path.
Formalization scope
Epochs are natural numbers ; arms are Fin K (the paper's arm is index ), and . The noise is a sequence on a probability space, independent, with Mathlib's HasSubgaussianMGF at variance proxy , plus the printed tail clause. Both algorithms are defined in full, as deterministic functions of the noise path, with canonical tie-breaking: smallest maximizer, smallest closest candidate, smallest arm index. Algorithm 1's loop runs at most passes, and is the least common multiple of the reduced denominators of the selected frequencies. Algorithm 2 takes its period vector as an argument; the two-stage policy and the oracle are its two instances. Expected regret is an outer expectation: an integrable majorant of the regret whose integral obeys the bound. Probability bounds bound the outer measure of the bad event. Every DFT uses the absolute stage-one epochs, as in Step 8 of Algorithm 1.
Disclosed deviations: Theorem 1's constant depends on and (the printed proof does not give uniformity in ), and is fixed as in the proof of Lemma 11. Lemma 6 uses for the printed ; Lemma 7 and Theorem 2 use for the printed . Lemma 7 covers the nonzero present frequencies. Lemma 11 states the standing Assumption 3 and the parameters (7) as hypotheses, as its proof uses them.
The algorithm is the object of the theorem. Replacing Algorithm 1 by "any estimator that is correct with high probability", or Algorithm 2 by "any policy with the oracle's regret", would make the goal a different and much weaker statement. So would placing the constant after the horizon or the instance, since the regret is at most , or using a bare Lebesgue integral of a possibly non-measurable regret.
A complete development needs discrete Fourier analysis of finite sequences, Bernstein's inequality for complex polynomials on the unit disc (Lemma 14 of the paper, from Nagy and Totik), sinc-function estimates, anytime concentration for sub-Gaussian sums, and a bookkeeping layer for the nested index sets of Algorithm 2. The concentration and polynomial-inequality parts are reusable beyond this mission. Proofs of individual lemmas, helper lemmas such as the closed form (6) of the frequency components, and alternative arguments are welcome.
Selected references
- N. Chen, C. Wang, L. Wang, Learning and Optimization with Seasonal Patterns, arXiv:2005.08088v4, 2021; Operations Research, 2025. https://arxiv.org/abs/2005.08088
- P. Auer, Using Confidence Bounds for Exploitation-Exploration Trade-offs, Journal of Machine Learning Research 3, 397–422, 2002. https://www.jmlr.org/papers/v3/auer02a.html
- L. Li, Y. Lu, D. Zhou, Provably Optimal Algorithms for Generalized Linear Contextual Bandits, ICML 2017. https://arxiv.org/abs/1703.00048
- B. Nagy, V. Totik, Bernstein's Inequality for Algebraic Polynomials on Circular Arcs, Constructive Approximation 37, 223–232, 2013.