Manuscript Offprint
arXiv:2610.39540The Cost of Working Memory in Streaming Mean Estimation
Abstract
A streaming estimator must compute from the evidence that fits in memory. We determine when storing an accurate mean is easier than computing it. For Gaussian mean estimation over the Euclidean unit ball in , we establish the minimax rate under squared error with K persistent states, a known horizon, and a public time index:
Unrestricted computation followed by K-level encoding has rate . At a fixed sufficiently small error, statistically optimal sample size therefore requires order working bits, while order bits suffice to store the answer. The lower bound tracks repeated state compression through an entropy potential obtained by Gaussian smoothing. A matching construction combines a multiscale modular counter with workspace reused across coordinate groups. In one dimension, it attains the terminal rate . Any fixed confidence requirement that the realized loss not exceed the zero baseline preserves these rates. Increasing confidence creates a further memory requirement: at fixed nontrivial risk in every fixed dimension, failure probability requires and permits order working states for sufficiently small fixed . In the scalar problem, a fixed terminal alphabet suffices under the same protection. These bounds separate the memory needed to represent an answer from the memory needed to accumulate evidence and validate a decision.
Keywords: inference with finite memory; Gaussian location model; minimax risk; quantization; tradeoff between sample size and memory.
1 Introduction
Streaming estimation supports decisions from continuously arriving data, as in quantitative trading, where online algorithms update statistics of liquidity and volatility (Loveless et al., 2013). A related need to process long streams with bounded retained information arises in language model inference, where the attention cache must remain manageable as the sequence grows (Xiao et al., 2024). A streaming estimator must extract information before each observation is discarded. Its retained state is the evidence available for the next update, so a memory constraint can change statistical accuracy as well as storage cost. A running average appears to need just one vector, but this description counts real numbers rather than bits. With a finite bit budget, the same state must represent the current
Corresponding author.
estimate and retain enough evidence to improve it. The space needed for an accurate final answer may therefore understate the space needed to compute that answer.
We ask when answer storage suffices for statistically efficient computation. We study independent observations with , a known sample size , and at most persistent states at each time. The index is public, allowing scheduled measurements without a stored clock. All information obtained from the data passes through the current state. Comparing this model with unrestricted computation followed by a -level encoding isolates the statistical cost of working memory.
The main result separates that cost from sampling and answer representation:
with the total truncated at a constant. The last term is necessary for randomized procedures with arbitrary joint states and transitions that vary with time. A deterministic construction attains the same rate. Thus the memory budget determines how efficiently the stream can be converted into an estimate, even when the final answer already fits in that budget.
At a fixed sufficiently small target risk, the difference is an order factor in bits: order bits represent an adequate answer, whereas achieving that risk with order samples requires order working bits. Corollary 3.3 gives the precise relationship between sample size and memory. The separation also persists when accuracy improves with dimension: Corollary 3.4 gives sequences for which both risks vanish but their ratio diverges. Working memory is therefore a statistical resource beyond the precision of the output.
The matching bounds explain how this resource is used. In one dimension, a modular counter measures the mean at decreasing frequencies. Its counter shrinks as the estimate label grows, keeping their joint state space within budget and attaining . In higher dimensions, completed coordinate estimates are encoded jointly while the workspace is reused for the next group. The lower bound tracks the information lost at each state update through an entropy potential obtained by Gaussian smoothing. Its cumulative accounting yields the last term of (1.1) for arbitrary joint states, matching the workspace allocation in the construction.
Confidence introduces a second reason to retain working memory. We require the terminal estimate to have loss greater than that of zero with probability at most , uniformly over the mean. Fixed changes the rates only by constants. As decreases, validating a candidate introduces an asymmetric testing problem with its own tradeoff between sample size and the number of states. At fixed nontrivial risk, failure probability requires and permits order states, or bits, for sufficiently small fixed . We establish this law first in one dimension and then extend it to every fixed dimension by reusing the validation workspace across coordinates. Sections 3–5 develop the estimation cost; Section 6 explains the additional cost of confidence.
The distinction between the memory needed to represent a solution and the memory needed to learn it also motivates frameworks connecting learning with limited memory to statistical queries (Steinhardt et al., 2016). Lower bounds for protocols with information constraints, including online algorithms with bounded memory, establish separations between sample size and memory for detecting biased coordinates and estimating sparse covariance (Shamir, 2014). We resolve this tradeoff for the Gaussian location family through matching bounds in n, d, K, measured against a benchmark based on terminal encoding.
Quantized estimation measures the accuracy lost when an estimate must have a short description. Sharp asymptotic tradeoffs are available for Gaussian sequence models over Euclidean balls (Zhu and Lafferty, 2014). Our terminal benchmark permits the same access to all observations before encoding; the additional term in (1.1) measures the cost of imposing the alphabet bound at every update.
Estimation under communication constraints imposes a different restriction: each observation or device sends a limited message, while a central estimator may retain the transcript. Identities for conditional scores and Fisher information give powerful lower bounds in this setting (Barnes et al., 2020; Barnes and Özgür, 2021; Acharya et al., 2022). The sign reduction from a Gaussian location observation to a Bernoulli observation is also used in that literature (Acharya et al., 2022). Our lower bound must additionally account for recompression of the old state after every new observation. It does so by telescoping over time an entropy potential obtained by Gaussian smoothing. Gaussian smoothing and its properties in information theory have a broader history (Guo et al., 2005; Polyanskiy and Wu, 2016); the role of smoothing here is to charge the loss caused by repeated compression by conditional expectations.
Streaming estimation in high dimensions is itself well established. Robust mean estimation admits computationally efficient algorithms that use a single pass with space nearly linear in dimension, up to logarithmic factors (Diakonikolas et al., 2022). Our clean Gaussian experiment instead resolves the risk as a function of an arbitrary total state budget, including the logarithmic cost of working memory at statistically optimal sample size. Sample lower bounds under finite memory have also been developed for noiseless Gaussian regression (OpenAI, 2026). That experiment supplies exact linear equations for an unknown direction. The noisy location experiment studied here instead requires averaging independent perturbations, and its cost of working memory is measured against a terminal quantization benchmark. The upper bound uses a scalar procedure with finitely many states and encodes its outputs jointly inside a Euclidean ball. Its modular measurement also has a conceptual relative in modulo quantization with side information (Mayekar et al., 2021); here the side information is an evolving phase label and both the label and counter are charged to the same state budget.
Confidence guarantees for realized loss improvement provide comparisons against an incumbent estimator (Trippe et al., 2024). Taking zero as the incumbent, we determine how baseline protection changes the sample and working memory requirements at fixed target risk.
2 Statistical experiment and memory model
Let , where is Euclidean norm. We observe independently from and evaluate an action by
The zero action has worst-case loss 1/2.
Streaming procedures. A procedure starts in a state whose law is independent of the parameter and updates
The final estimate is decoded from , possibly using fresh independent randomness. The kernels may depend on the public quantities , but not on . They can involve arbitrary measurable computation within a step. All information retained between observations is part of . This includes any counter, scale, label, or random seed that depends on the data. Fresh independent randomization is allowed without storing a seed. A complete vector arrives at each step, and is the sole record carried to the next observation.
The time index and fixed program are free. Predetermined block and layer boundaries are therefore recognized without storing a clock. Within each block, observations are processed individually and discarded. The resource measured here is persistent memory, with unrestricted computation within each update, including codebook operations.
Baseline protection. A procedure is uniformly -safe if
This guarantee controls the realized loss relative to zero, while the minimax criterion below averages the loss. At , safety requires returning zero with probability at least .
Let denote the procedures satisfying (2.1) and (2.2). Define
We write for the analogous streaming risk with no safety constraint. All stated lower bounds for fixed confidence also apply to .
Terminal compression. For the terminal benchmark, an encoder may use all observations and unrestricted working memory, but sends one of K labels to the decoder. The final action must satisfy (2.2). Its minimax risk is . Both models impose the same restriction on the final label; only streaming imposes it on every intermediate state.
We take , with an integer. Bounds for other integer alphabet sizes follow by rounding with resources changing by at most a constant factor. The notation means that their ratio is bounded above and below by positive constants depending only on . Unsubscripted logarithms are natural, and denotes the logarithm to base two.
3 Minimax risk and memory requirements in high dimensions
We first give the benchmark that accounts only for representation of the answer. Its two terms are sampling error and the squared covering radius of a K-point codebook.
Theorem 3.1 (Terminal compression). For every fixed , uniformly in integers and ,
The lower bound holds without the safety requirement and allows randomized encoding and decoding.
The streaming problem charges the same state budget at every update. The resulting risk includes the cost of retaining evidence for future observations.
Theorem 3.2 (Optimal streaming risk). Put
For every fixed there is a finite such that
for all integers and , . The upper bound is achieved by a deterministic procedure whose transitions vary with time.
The factor
quantifies the sample penalty for limited working memory. If the available bits per coordinate are of order , the factor is bounded. If they remain bounded, it is of order . Increasing the number of states can therefore improve sample efficiency even after the answer has enough representational precision.
Corollary 3.3 (Sample efficiency requires working bits). Fix and let . If a streaming procedure has worst-case risk at most using observations, then
Conversely, for each fixed , risk at most is achievable with samples and persistent bits.
For fixed sufficiently small r and sufficiently large d, this gives a requirement of order for working memory at statistically optimal sample size. The terminal benchmark needs only order d bits at that same fixed risk. For decreasing r, both problems must also pay the cost of storing the answer, ; the corollary identifies when that cost dominates the extra workspace.
Corollary 3.4 (A separation with vanishing risks). Fix . For , set
Then, as ,
Their ratio is of order .
Thus the separation is visible even when both procedures consistently estimate the mean. A final codebook captures the desired precision, while repeated compression slows the accumulation of evidence.
Theorems 3.1–3.2 and both corollaries are proved in Appendix B. The next two sections explain the construction and information bound that produce the matching rate.
4 Scalar minimax risk and an optimal construction
Theorem 4.1 (Scalar equivalence). For every fixed ,
A deterministic streaming construction attains the upper bound.
In one dimension, the term for working memory in (3.1) is absorbed by . The constructive content is more informative: an alphabet of order M states can obtain squared error of order from order observations. Storing an exact count of those observations would require order states. The construction avoids that count by retaining only a modular remainder.
4.1 Modular measurements and scheduled layers
For , define . Then with , where . The inverse link is uniformly Lipschitz on this interval. It is therefore enough to estimate to squared accuracy . Gaussianity enters this upper bound through the link; the mechanism processes Bernoulli data using finitely many states.
Choose a dyadic resolution . The algorithm has layers, determined before data collection from the resource budgets. At layer , the frequency is . A measurement block consists of consecutive observations, with a fixed numerical constant . Throughout the block, the state contains
At its end, estimates modulo one with a fixed small error probability: its fluctuation scale is of order , independently of .
The old label approximates modulo one. If it is , there are two possible lifts to the current frequency, and , on the unit circle. The block measurement votes for the closer lift. Decreasing the frequency resolves a new ambiguity while preserving information from the previous layer. Each measurement block uses fresh samples and resets the counter, and the public clock determines the block and layer boundaries.
4.2 Amplification without storing votes
Each layer uses several rounds, each containing several independent block votes. The algorithm retains only two bits . The bit is the current candidate. At the start of a round, ; a vote agreeing with changes to zero. At the end of the round, is flipped exactly when is still one, that is, when every vote opposed it. The list of votes is never stored. This device is closely related to the tests with finite memory and transitions that vary with time of Cover (1969).
When each block vote is correct with probability at least 0.99, using votes per round and rounds reduces the decision error to . The inherited phase determines when this condition holds. Appendix A gives the explicit schedule and the recovery argument for the remaining layers.
4.3 The state budget and error accounting
At layer , the old label has values, the counter has values, and the amplifier has four states. Their joint state space therefore has size
The label grows at exactly the rate at which the counter shrinks. This exchange of capacity between state components is the allocation mechanism. The public clock supplies the scheduled round and block indices, so they require no additional memory.
The decreasing block lengths offset the increasing reliability of later decisions. In fact, . The error analysis charges an erroneous layer according to the final displacement it can cause. Later accurate layers recover from earlier errors up to the corresponding spatial scale. The geometrically decreasing make the weighted sum of these losses of order . Appendix A gives the recovery argument.
Choosing as the largest admissible power of two under the state and sample budgets gives . Safety at fixed confidence is then obtained by shrinking the decoded estimate toward zero. If has uniform mean squared error at most , radial soft thresholding at gives a -safe action with risk of order and requires no new persistent states (Lemma B.1). Thus fixed baseline protection changes constants but not the rates in one or several dimensions.
5 Information bounds and workspace allocation
Running d scalar engines simultaneously stores d working counters. Running them one after another saves states but discards most coordinates of each vector observation. The optimal construction balances these costs, and the lower bound shows that no joint encoding can avoid their statistical effect.
5.1 Information accumulation under a state constraint
Let and be the score of the current state. With , the identity for the conditional score is
Every observation adds a fresh Gaussian score, and the next state keeps only its conditional mean. The score variance is the trace of the state Fisher information. It need not increase: an update may erase information. The proof keeps these potentially negative increments throughout the entropy accounting.
We smooth the distribution of by an independent Gaussian. Its entropy above the smoothing noise is bounded by . An entropy comparison for conditional expectations bounds the loss from compression by the associated squared error. Choosing the smoothing variance according to remaining time and telescoping gives a harmonic information budget. Freezing the terminal state over a longer horizon and summing by parts converts this budget into
The numerator in measures the information that the state budget can retain; the logarithmic denominator comes from compression across time. The van Trees inequality converts this information bound into risk through integration by parts. For sample sizes at least the dimension, the logarithm of the horizon supplies the dimension dependence in the term for working memory. At smaller sample sizes, the sampling lower bound is already of constant order. Combining these bounds with the codebook lower bound proves the lower half of Theorem 3.2. The argument treats the whole state jointly and imposes no coordinatewise architecture.
5.2 Reusing workspace across groups
The upper bound gives stored and active coordinates different roles. Completed coordinates are rounded and encoded jointly as a point in a Euclidean ball. A new group uses parallel copies of the scalar engine on a fresh segment of the stream. Its counters are then discarded and its rounded answers join the stored label. The same workspace is reused for the next group. Each coordinate estimate is based on arriving samples; a group boundary never gives access to old observations.
Joint encoding matters. Encoding every coordinate in a separate interval that covers its full range incurs avoidable factors of . With grid spacing , a bounded ball in completed coordinates contains at most grid points. A norm check on each partial vector keeps it within a bounded codebook; the procedure returns zero if the check fails. All such failures lie in a single event controlled by the total estimation error, so their risk contribution stays of order .
The group schedule also adapts to available workspace. Write , , and let be the logarithmic state capacity available beyond answer encoding. A fraction approximately of the remaining coordinates is activated at each stage. Groups shrink as the stored part grows. Their scalar resolutions balance total squared error and stream duration. Writing and for its resource use, the resulting construction satisfies
for mean squared error of order . The first resource bound splits the state budget between answer precision and active workspace. Increasing the latter allows more coordinates to be processed together, reducing the sample cost in the second bound. Optimizing subject to gives the upper half of (3.2). Fine working precision is shared over time, while finished answers occupy a compact representation.
6 Baseline protection with increasing confidence
We first take and allow to decrease. A candidate estimate followed by validation on fresh observations achieves high confidence with a small state space. The validation step introduces a separate tradeoff between sample size and memory. Set
Fix and let
with the minimum of an empty set taken to be infinity.
Theorem 6.1 (Sample size and state requirements at fixed risk). For every fixed there are positive constants such that, whenever ,
The lower bound holds for every ; the upper bound holds when .
The confidence cost is samples. Below order U states, validation with finite memory adds a factor U/K. At order U states, sample complexity returns to the ordinary confidence scale. Thus a slowly growing state space recovers full sample efficiency; matching begins at the explicit threshold .
Corollary 6.2 (Exponential protection at a prescribed horizon). For each fixed there exists such that, for every fixed and , the smallest admissible number of states for risk at most satisfies
The minimum number of persistent bits is .
This guarantee concerns the decoded action at the prescribed horizon n. Under the same exponential baseline protection, a fixed terminal alphabet suffices at fixed risk for sufficiently small (Proposition C.9). The growing cost of working memory therefore comes from validating the decision to act. With bounded working states, the minimax risk instead tends to the value of the zero baseline, 1/2 (Proposition C.6).
Testing and validation. Safety at zero and risk improvement at a separated mean induce a test with small type I error and fixed positive power. Monotone reduction turns it into an ordered test with finitely many states. A bound on weighted certificate area, together with fixed power, yields a short acceptance certificate. Its probability under the null limits the achievable type I error. For a fixed Gaussian mean separation and fixed power, the test decision satisfies for large . Combining the state restriction with ordinary testing information yields the lower bound. Appendix C also gives the joint risk bound in (Theorem C.5).
The upper bound first forms a pilot estimate at fixed resolution. It then validates a conservative update using an AND of repeated OR tests on fresh blocks. The OR tests retain power; their AND suppresses unsafe acceptance. The public clock schedules these tests, and their work states are reused across a fixed collection of candidate scales. This asymmetric validation attains (6.2).
The same validation mechanism applies coordinate by coordinate in any fixed dimension. The constants then depend on the dimension and target risk, while the dependence on confidence and total states retains its scalar form. For dimension , let be the minimum sample size for a procedure in with worst-case risk at most , or infinity if none exists.
Corollary 6.3 (Confidence costs in fixed dimension). Fix an integer and . There are positive constants such that, for ,
The lower bound holds for every ; the upper bound holds for . Consequently, there is such that, for every fixed and , the minimum state and bit budgets for risk at most satisfy, as ,
Sequential coordinate blocks reuse one validation workspace, retaining completed candidate labels. Each coordinate receives failure probability ; restriction to a coordinate axis gives the matching lower bound. The scalar confidence law thus extends to every fixed dimension. Appendix C.7 gives the proof and resource accounting.
7 Conclusion
The memory required to compute a mean can exceed the memory required to represent it. At fixed confidence, scalar streaming estimation attains the rate for terminal encoding. In higher dimensions, statistically optimal sample size at a fixed sufficiently small risk requires order working bits, compared with order bits for the answer. Increasing confidence introduces a further cost: at fixed risk in every fixed dimension, failure probability for sufficiently small fixed requires and permits working bits.
The constructions attain these bounds by separating stored estimates from active computation. Completed estimates occupy compact labels, and the workspace is reused for modular measurements, coordinate groups, and validation. The matching lower bounds identify when this workspace is statistically necessary. Together, the results quantify how a memory budget controls answer precision, sample efficiency, and confidence.
Acknowledgments
This work was supported by the National Natural Science Foundation of China under Grant 32270689.
AI use statement
OpenAI's ChatGPT/Codex was used to assist with mathematical reasoning and proof checking, reference verification, and manuscript organization and language editing. The authors are responsible for the mathematical claims, citations, and final content of this manuscript.
References
Acharya, J., Canonne, C. L., Sun, Z., and Tyagi, H. (2022). Unified lower bounds for interactive high-dimensional estimation under information constraints. arXiv:2010.06562v6.
Barnes, L. P., Han, Y., and Özgür, A. (2020). Lower bounds for learning distributions under communication constraints via Fisher information. Journal of Machine Learning Research, 21(236), 1–30. jmlr.org/papers/v21/19-737.html.
Barnes, L. P., and Özgür, A. (2021). Fisher information and mutual information constraints. In 2021 IEEE International Symposium on Information Theory, 2179–2184. doi:10.1109/ISIT45174.2021.9518061.
Berg, T., Ordentlich, O., and Shayevitz, O. (2021). Deterministic finite-memory bias estimation. In Proceedings of the 34th Conference on Learning Theory, Proceedings of Machine Learning Research, 134, 566–585. PMLR 134:berg21a.
Berg, T., Ordentlich, O., and Shayevitz, O. (2024). Statistical inference with limited memory: A survey. IEEE Journal on Selected Areas in Information Theory, 5, 623–644. doi:10.1109/JSAIT.2024.3481296.
Cover, T. M. (1969). Hypothesis testing with finite statistics. The Annals of Mathematical Statistics, 40(3), 828–835. doi:10.1214/aoms/1177697590.
Cover, T. M., Freedman, M. A., and Hellman, M. E. (1976). Optimal finite memory learning algorithms for the finite sample problem. Information and Control, 30(1), 49–85. doi:10.1016/S0019-9958(76)90456-3.
Diakonikolas, I., Kane, D. M., Pensia, A., and Pittas, T. (2022). Streaming algorithms for high-dimensional robust statistics. In Proceedings of the 39th International Conference on Machine Learning, Proceedings of Machine Learning Research, 162, 5061–5117. PMLR 162:diakonikolas22a.
Guo, D., Shamai, S., and Verdú, S. (2005). Mutual information and minimum mean-square error in Gaussian channels. IEEE Transactions on Information Theory, 51(4), 1261–1282. doi:10.1109/TIT.2005.844072.
Hellman, M. E. (1974). Finite-memory algorithms for estimating the mean of a Gaussian distribution. IEEE Transactions on Information Theory, 20(3), 382–384. Author's reprint.
Hoeffding, W. (1963). Probability inequalities for sums of bounded random variables. Journal of the American Statistical Association, 58(301), 13–30. doi:10.1080/01621459.1963.10500830.
Mayekar, P., Suresh, A. T., and Tyagi, H. (2021). Wyner–Ziv estimators: Efficient distributed mean estimation with side-information. In Proceedings of the 24th International Conference on Artificial Intelligence and Statistics, Proceedings of Machine Learning Research, 130, 3502–3510. PMLR 130:mayekar21a.
OpenAI (2026). Subsphere methods for memory-sample lower bounds in noiseless Gaussian regression. Research manuscript, September 27. Public manuscript.
Polyanskiy, Y., and Wu, Y. (2016). Wasserstein continuity of entropy and outer bounds for interference channels. IEEE Transactions on Information Theory, 62(7), 3992–4002. doi:10.1109/TIT.2016.2562630.
Shamir, O. (2014). Fundamental limits of online and distributed algorithms for statistical learning and estimation. In Advances in Neural Information Processing Systems, 27, 163–171. NeurIPS proceedings.
Steinhardt, J., Valiant, G., and Wager, S. (2016). Memory, communication, and statistical queries. In Proceedings of the 29th Conference on Learning Theory, Proceedings of Machine Learning Research, 49, 1490–1516. PMLR 49:steinhardt16.
Trippe, B. L., Deshpande, S. K., and Broderick, T. (2024). Confidently comparing estimates with the c-value. Journal of the American Statistical Association, 119(546), 983–994. doi:10.1080/01621459.2022.2153688.
Wagner, T. J. (1972). Estimation of the mean with time-varying finite memory. IEEE Transactions on Information Theory, 18(4), 523–525. doi:10.1109/TIT.1972.1054853.
Zhu, Y., and Lafferty, J. (2014). Quantized estimation of Gaussian sequence models in Euclidean balls. In Advances in Neural Information Processing Systems, 27, 3662–3670. NeurIPS proceedings.
J. Loveless, S. Stoikov, and R. Waeber, “Online algorithms in high-frequency trading,” Communications of the ACM, vol. 56, no. 10, pp. 50–56, 2013. doi:10.1145/2507771.2507780.
G. Xiao, Y. Tian, B. Chen, S. Han, and M. Lewis, “Efficient streaming language models with attention sinks,” in Proc. 12th International Conference on Learning Representations, 2024. OpenReview.
Appendix: Proofs
The proofs follow the construction's dependency structure. Appendix A establishes the scalar engine; Appendix B combines it with the information bound and grouped allocation; Appendix C develops the asymmetric tests needed when baseline protection increases.
A Scalar estimation with a finite state space
This appendix proves the scalar construction used in Theorem 4.1 and in the upper bound for several dimensions. Its statistical input is a Bernoulli stream; Gaussianity enters only in the final conversion from a sign probability to a mean. Throughout this appendix, put
Write for distance on .
Lemma A.1 (Scalar estimation subroutine). Let and . For every power of two , there is a deterministic streaming estimator for observations , , which uses at most 2AM states and observations and satisfies
The sample schedule is fixed before any observations are read.
We first construct an estimator of a Bernoulli probability on the circle, then prove the lemma by decoding its final state.
A.1 Modular measurements and recovery from two candidates
For an integer frequency , a measurement uses observations and the counter
Only persists between observations. Since , the block output satisfies
Hoeffding's inequality (Hoeffding, 1963) gives, uniformly over ,
Thus states suffice to measure the phase to fixed accuracy with fixed confidence, using samples.
The next elementary observation explains how such measurements recover a probability while the frequencies decrease.
Lemma A.2 (Recovery from a doubled phase). Let , , and . For the two candidates and , their distances to are the unordered pair
If and , the candidate nearest to is the one nearest to , and its error is . If , either candidate has error at most .
Proof. Rotate the circle by , so the candidates become 0 and . If , their distances are and , while . This proves (A.5). When , the gap between the two distances is . Replacing by changes this gap by at most , so the nearer candidate remains nearer. When , the larger distance is .
The recovery case is essential: a mistaken earlier decision need not invalidate every later measurement. One accurate layer brings an arbitrary previous error into a region where subsequent accurate layers halve it.
A.2 Amplification with four states
Lemma A.3 (Amplifier with four states). Suppose independent, identically distributed votes satisfy for some fixed . For , define
There is a deterministic program with four states that reads votes and returns with probability at least .
Proof. The program stores a current decision and a flag . Each of T rounds contains votes. At the start of a round set and hold F fixed throughout that round. Whenever a vote equals F, set . At the end of the round, flip F if and only if . Thus a decision changes only when every vote in a round opposes it. The public clock gives the round boundaries; no votes or round counters are stored. This construction with prescribed runs is related to the tests with transitions that vary over time of Cover (1969); the following argument gives the bound on error probability used here.
Assume and let . At round boundaries, is a Markov chain with two states with transition probabilities
Since , . For , the recursion yields, for any initial decision,
(A.7)
Interchanging labels proves the other case. The only persistent variables are , giving four states.
A.3 The frequency schedule and its memory cost
Fix , , and predetermined target errors . Layer uses frequency and starts with the label
Keep this label fixed during the layer. Each fresh block of samples produces the modular measurement (A.3) and casts one vote for the nearer of the candidates and ; break ties in favor of the first candidate. Use the amplifier with target error and initial decision , producing its final decision after rounds of votes each. Set
The final output is .
At every sample time in layer j, all persistent information is
Its number of possible values is
In particular, the growing label and the shrinking counter exactly offset each other. A layer changes the interpretation of a common state set; it does not add a new state set to those of earlier layers.
For completeness, the implementation updates memory after every sample. An ordinary transition increments modulo . At a block boundary it first forms the updated counter, computes the vote temporarily, and updates . If that boundary also ends a round, it then applies the possible flip of and resets the flag for the next round. At a layer boundary it replaces the label by
which implements (A.8) exactly, and resets the work variables. The public sample index determines every block, round, and layer boundary. These operations compose into one transition, so neither the temporary vote nor its normalized phase needs an extra persistent state. The final M labels also fit in the same state set. After the scheduled computation, the program can freeze its state and ignore any remaining observations.
The total number of observations is exactly
For the construction at fixed confidence choose
Writing gives , , and
- Consequently,
(A.13)
Here we used and . The increasingly accurate decisions are affordable because the blocks become geometrically shorter.
A.4 Error analysis through the last incorrect layer
Lemma A.4 (Last incorrect layer). For the preceding algorithm with any predetermined , let and . Then
Proof. Call layer bad if and its amplifier chooses the candidate farther from the true phase . Let contain all observations read before this layer. Conditional on , the old label is fixed. If , Lemma A.2 and (A.4) imply that each vote chooses the unique nearer candidate with probability at least 99/100. The votes are conditionally independent and identically distributed: their sample blocks are fresh and disjoint, and their rule depends on the fixed old label, not on the current decision . Lemma A.3 thus gives
If , the bad event is empty by definition. Hence this conditional bound holds regardless of earlier errors.
On , Lemma A.2 gives ; if also , it gives . Because , the first good layer recovers a controlled error and every consecutive good layer thereafter halves it. If there are no bad layers, therefore,
If is the last bad layer, layer first restores an error of at most and the remaining layers halve it, giving
For the same bound follows from . Partition the sample space according to the last bad layer, including the event that none occurs. The event that is the last bad layer is contained in and has probability at most by (A.15). Summing its bound on squared error proves (A.14).
With (A.12) and , this yields
Together with (A.10) and (A.13), this proves the circular Bernoulli subroutine with states, samples, and squared error .
Proof of Lemma A.1. Form as each observation arrives. These are independent Bernoulli(p) observations with . Run the circular subroutine and decode its final label as
For every and ,
Indeed, if , circular and ordinary distances agree. Otherwise their circular distance is , whereas . Projection onto cannot increase distance to , and the derivative of on that interval is at most . Thus
Equation (A.16) proves the claimed mean squared error. The sign transformation is performed within a single transition and the transformation using the inverse cdf only at decoding, so neither changes the persistent state count.
The same construction estimates an arbitrary mean on . For , generate an independent uniform and form . Then . Decoding by and applying (A.18) with gives with the same resources. This reduction uses fresh randomness but no additional persistent memory.
A.5 The scalar minimax rate at fixed confidence
Proof of Theorem 4.1. For the upper bound, let
If , take the largest power of two , so that . Lemma A.1 fits within both resource budgets. Apply Lemma B.1 in one dimension with the deterministic threshold . The resulting safe estimator has risk at most
If , the zero estimator suffices: its risk is at most , and either or , so is bounded below by an absolute positive constant. The zero estimator is also available in the first case. Taking the better predetermined choice gives the asserted upper bound with the truncation at one.
The lower bound holds even for terminal compression without the safety requirement. For its statistical term, take , where . The relative entropy of the two observation laws is , so their total variation distance is at most by Pinsker's inequality. Any sign test has average error at least . Applying the test shows that the worst-case loss is at least .
For the memory term, put the uniform prior on and fix all independent algorithmic randomness, including output randomness. The resulting decoder has at most output values. The union of their intervals of radius has length at most one. At least half the prior mass is therefore at distance at least from every output value, even if an encoder were given the true parameter. Its loss averaged over the prior is at least . This bound survives averaging over the randomness. Combining the two terms yields
Finally, a terminal encoder can simulate every streaming program and transmit its final state. Its minimax risk is at most the streaming risk, so the same lower bound and the streaming upper bound also establish the scalar rate for terminal compression.
B Working memory in several dimensions
Throughout this appendix, independently, , and . Logarithms are natural. All state counts refer to the complete persistent state; the deterministic time index is public.
B.1 Safety and the terminal benchmark
The following observation allows safety at fixed confidence to be imposed after constructing an estimator with a mean squared error guarantee.
Lemma B.1 (Radial safety transformation). Suppose that is an estimator satisfying . For , set and
Then is uniformly -safe and . If is decoded from a finite state, this transformation requires no additional states.
Proof. On , write . When ,
Consequently . The same conclusion is immediate when . Markov's inequality bounds the probability of the complementary event by . Moreover, , so
Taking expectations proves the claim. If , use almost surely.
Lower bounds common to both memory models. Any estimator, even without a memory or safety restriction, satisfies
Indeed, let and consider for . Two parameters differing in one sign induce sample laws with relative entropy and hence total variation at most . For each coordinate, the average error probability of the test under the uniform sign prior is at least . A sign error incurs squared error at least . The Bayes risk is therefore at least , proving (B.1).
Any procedure whose final decoder receives at most K labels also satisfies
To see this, put the uniform volume prior on and fix the algorithm's random variables whose laws are independent of the parameter, including its decoder randomization. There are then at most possible decoded points. Their balls of radius cover at most half the volume of . At least half the prior parameters are at distance at least from every decoded point, even if the encoder is given the true parameter. The prior risk is at least for each fixed random seed. Averaging over the seed proves the randomized version. Combining the two bounds gives, for either memory model,
Proof of the terminal upper bound in Theorem 3.1. A maximal u-separated subset of is a u-net containing at most points: the disjoint balls of radius about its points lie in the ball of radius . If , take , so that the net has at most points. Project onto and encode its nearest net point . Projection does not increase distance to , and therefore
Lemma B.1 gives the safe upper bound, using the same labels. If , the quantization term exceeds 1/9 and the zero estimator suffices. Choosing the zero estimator also whenever the displayed rate exceeds a constant proves the bound with the outer minimum with 1. Together with (B.3), this proves Theorem 3.1.
B.2 A Fisher information bound for joint states
Fix and write
Only reachable states are included. Thus is the trace of the Fisher information matrix of the state . The random vector is a proof device, not additional algorithmic memory.
State probabilities are smooth: after integrating out the randomization, each is an integral of a bounded measurable function against the Gaussian sample density. Differentiation under the integral is valid on every compact parameter set. Positivity of Gaussian densities also implies that a state is either unreachable for every parameter or has positive probability for every parameter. Put . Differentiating the transition identity for gives the recursion for the conditional score
For completeness, if is the transition probability after integrating out fresh randomness, then
Its gradient is the same integral with an additional factor ; division by proves (B.4). Let . Since is independent of and has covariance , orthogonality of conditional expectation yields
In particular, , but need not be nonnegative.
Lemma B.2 (Entropy loss after Gaussian smoothing). Let satisfy , where has finite support and . If is independent of , then, for ,
Here h denotes differential entropy; both entropies are finite.
Proof. Let be the finite Gaussian mixture density of and . Direct differentiation gives
Consequently . Use and . The linear term has zero expectation because , whence
Relative entropy nonnegativity bounds by the cross entropy on the left. These operations are integrable: one positive mixture component bounds above by a constant plus a quadratic function, is bounded above, and . The Gaussian convolution of has a bounded density and finite second moment, which also guarantees its finite entropy.
Lemma B.3 (Fisher information retained by a finite state). For every and every randomized algorithm with transitions that vary over time whose complete state has at most values,
Proof. For a vector A taking finitely many values, define
This is , so . Apply Lemma B.2 to and . The hypothesis on the conditional mean holds because . Equations (B.4)–(B.5) and the Gaussian entropy formula give
For a fixed prefix length m, set and sum over . The information terms telescope, , and . Thus
where and .
For the proof only, extend the algorithm to time 2n by freezing its state after time n and ignoring subsequent observations. Then for . Sum (B.9) over to obtain
Although the increments can be negative, summation by parts and give
This proves (B.7). No coordinatewise factorization of the state, or restriction on the computation within a transition, was used.
Lemma B.4 (Risk bound from Fisher information). Define the prior density on by
Every decoder of satisfies
Proof. Projection onto the unit ball followed by averaging over independent decoder randomness cannot increase risk. It therefore suffices to consider fixed decoding points . The prior has total Fisher information : each coordinate contributes
Under the joint law put . The cross term between the prior and state scores is zero because . Hence
Integration by parts in each coordinate gives ; the boundary term vanishes because is zero on the boundary faces. Summing and applying Cauchy–Schwarz yields
All quantities are integrable: the Gaussian score identity implies . The worst-case risk is at least the prior average, proving the lemma.
Lower bound in Theorem 3.2. Set , , , and
Lemmas B.3 and B.4 give a risk lower bound
Combine this with (B.3) and use to obtain
If , then , and thus . If , the statistical lower bound already gives a positive constant. In both cases the desired lower bound follows with constant 1/256. The argument did not use safety.
B.3 A grouped construction with reusable working memory
We use the scalar engine of Lemma A.1 in its Gaussian form: for every power of two , it estimates any using at most 2AM states and observations, with output satisfying
where is absolute. Identical scalar programs can run in parallel on different coordinates of the same vector observations.
Proposition B.5 (Groups, resolution, and persistent states). There are absolute constants and such that, for every , , and , a deterministic streaming estimator has
Its schedule is determined before the observations arrive.
Proof. Put
Starting with unprocessed coordinates, form successive groups of sizes
until no coordinates remain, and let . For group choose the smallest power of two satisfying
Use a fresh consecutive block of vector observations for each group and run its scalar engines in parallel. Observations of inactive coordinates are discarded. After a group finishes, round its outputs to the grid , where , and retain only the rounded coordinates. If the completed partial vector has norm greater than 2, enter a permanent abort state and finally output zero. Otherwise, after all groups finish, project the completed rounded vector onto .
Bounds on group sizes. Every group satisfies . Therefore
Summation gives . Also , since and . Thus even when the maximum defining equals 1, and . In particular, the dyadic resolutions satisfy
Error. For analysis, define all scalar and rounded outputs , on their prespecified sample blocks even if the actual algorithm has aborted. Equation (B.15) gives
Since , . If a completed partial vector has norm greater than 2, its distance from the corresponding part of exceeds 1. The abort event is therefore contained in and has probability at most . Projection cannot increase error on the nonabort event, and the squared error of zero is at most 1. This proves (B.12) without requiring independence between errors.
State count. The number of grid points in the radius-2 ball in k completed coordinates obeys
Indeed, disjoint cubes of side centered at these grid points fit inside the radius-5/2 ball; its volume is at most . The volume bound for the unit ball follows directly from
Suppose coordinates are complete and the current group has size . The joint state consists of the partial grid label and the scalar working states. Put and . By (B.16) and (B.17), the logarithm of the number of nonabort states is at most
(B.18)
As usual, at . The final brace is at most . To verify this, if and , then
If , then and the brace is . In the remaining case , it is at most . Since , equation (B.18) bounds the number of nonabort states by
One extra abort state is absorbed by taking . At a group boundary the working states are replaced by the rounded label in the same transition; the old and new encodings are not retained together. All indices for groups and positions within groups follow the public schedule. Different stages reuse the same state alphabet, so their state counts are maximized, not added. The terminal grid state also satisfies the same bound.
Samples. All coordinates in a group read the same vector observations. Thus the number of vector observations is at most
Taking proves (B.14).
Upper bound in Theorem 3.2. Write and
Use the constants , of Proposition B.5. If , then and the zero estimator gives the desired bound after an absolute adjustment of the constant. Otherwise fix and set . The zero estimator also suffices when . When , choose
Because , we have and . Moreover, for and ,
The sample bound in Proposition B.5 is consequently at most . Freeze the state if the computation finishes before time . Lemma B.1 gives risk at most . Choosing zero when establishes the asserted outer minimum.
B.4 Consequences for representation and sample efficiency
Proof of Corollary 3.4. Let , , and . Integer rounding gives
The terminal risk is therefore . The additional streaming term equals
which dominates and still converges to zero. The claimed risk ratio follows from Theorem 3.2.
Proof of Corollary 3.3. The lower bound in Theorem 3.2 applies without safety. If the worst-case risk is at most , its rate expression is at most . In particular,
If also , the term for working memory implies
For , this yields . For sufficiency enlarge the constant in the upper bound to and take
The quantization term is then at most and the bracket in the sampling term is at most 2. Theorem 3.2 gives risk at most , with and . Rounding the sample size and bit budget up to integers changes neither order.
C Reliability and working memory
Throughout this appendix, , , and . The testing arguments allow randomized initial states, randomized transitions, and randomized terminal decisions. All constants denoted by C are numerical unless their dependence is indicated.
C.1 Reduction to monotone tests with finite memory
Lemma C.1 (Monotone reduction). Let and , where . For every K-state test of n independent observations and every , there is a deterministic K-state test with no larger weighted error
Its effective states at each time can be ordered so that every transition is nondecreasing in both the previous state and the current observation, and the terminal decision is nondecreasing in the final state. Consequently, if the original test has power at least c > 0 and false positive probability , the monotone test can be chosen with power at least c/2 and false positive probability at most . The same conclusions hold for independent, nonidentically distributed observations whose individual likelihood ratios are nondecreasing.
Proof. First fix an initial state whose weighted error does not exceed the average over the initial randomization. Modify the transitions in chronological order. Suppose that the preceding transitions have already been fixed and their effective states are ordered by the prefix likelihood ratios
Both probabilities are positive because the two experiments are equivalent. For each possible destination j, let and be, respectively, the type II and type I error probabilities of the current suffix program started from j. The suffix may still be randomized. Writing for the current observation density, the contribution of choosing destination j at is proportional to
A randomized transition is a convex combination of these quantities. Replace it by a pointwise minimizing destination.
The lower envelope of finitely many affine functions admits an ordered partition of into intervals on which a minimizing index is constant. Delete unnecessary functions and resolve each tie consistently. Ordering the destinations from left to right makes the selected index nondecreasing. Thus is nondecreasing in both and . Under , let denote the joint law of . For a destination interval , its new prefix likelihood ratio is
The conditional means over distinct ordered intervals of positive probability are strictly increasing. Indeed, independent draws from two such intervals are ordered almost surely, and equality of their means would force both draws to equal the same constant, contradicting the disjoint partition. Hence the new state ordering also agrees with its prefix likelihood ratios. Relabel the suffix entrance states, freeze this transition, and continue. Subsequent modifications cannot change the probabilities of an already fixed prefix. No step increases the number of states or the weighted error.
At the final time choose . This also minimizes the weighted error and is nondecreasing. Gaussian likelihood ratios are strictly increasing in , so the induction applies. It uses only independence and the current monotone likelihood ratio, proving the nonidentically distributed version as well. Finally, set . The original weighted error is at most , so each of the two nonnegative terms for the new test is at most this value. Its power is therefore at least , and its false positive probability is at most .
C.2 A weighted certificate bound
For a nonconstant monotone function and positive weights , a one-certificate is a set of coordinates whose being one forces ; a zero-certificate is defined analogously. Let and be the minimum total weights of these certificates.
Lemma C.2 (Certificate area and disjoint certificates). Suppose is computed by a deterministic monotone read-once program with at most states at every time, and put . Then
Moreover, writing , there are at least pairwise disjoint zero-certificates, each of weight at most 2KS/u. If Q is a product distribution with , then
If P is a product distribution with , then .
Proof. Associate to each nonconstant residual function the rectangle ; constant residual functions have empty rectangles. For the two children at coordinate , use the conventions and . Monotonicity gives
Apart from the coordinate axes, any point of the parent rectangle not covered by either child rectangle belongs to
Its area is at most . This includes constant children, since and remain finite for a nonconstant parent. Taking the union of rectangles in each layer, its area can increase by at most when the layer is traversed backward. The terminal union is empty. Summing proves (C.1).
For the disjoint certificates, let be the union of those already selected. While its weight is below , fix all coordinates in to one. The restricted function is nonconstant and has . It is still computed by a monotone program with at most states: simply compose the transitions for the fixed coordinates. By (C.1), it has a zero-certificate of weight at most , disjoint from . It is also a zero-certificate for , since lowering the fixed coordinates cannot increase its output. Repeat until . Each new certificate is nonempty, so the procedure terminates and selects at least certificates.
Under Q, each selected certificate is all zero with probability at least , and these events are independent. If any occurs, . Their product bound gives (C.2). Under P, a minimum one-certificate is all one with probability , which proves the final assertion.
If for , , , and , then
Indeed, (C.2) yields , so . When all , the condition is automatic, because .
C.3 Gaussian testing with limited working memory
Lemma C.3 (Testing bound in terms of the number of states). Let , and let a randomized K-state test of independent observations have power at least under . Define
For every ,
The bound remains valid for independent Gaussian observations with positive mean differences bounded by h.
Proof. Write . Equivalence of the experiments rules out , and is immediate. By Lemma C.1, replace the test by a deterministic monotone test with power at least and false positive probability at most .
Center each observation at and write , where . The vector of magnitudes has the same law M under both hypotheses. Conditional on this vector, the signs are independent, with
For a fixed magnitude vector, the conditional test is a monotone binary read-once program of width at most K. Conditioning only fixes the transition functions for the analysis; it supplies no additional stored information to the algorithm.
Set , , and let be the conditional power of the monotone test. Since and , . Also
Markov's inequality therefore gives a set B of magnitude vectors with mass at least c/8 on which
For a nonconstant conditional test on this set, apply (C.3) with . The definition of implies . A minimum one-certificate then has weight at most
Under hypothesis zero, this certificate occurs with probability . The test that always returns one satisfies the same lower bound, and a test that always returns zero cannot have the required conditional power. Integrate over using the common magnitude law, and then use the upper bound for the monotone test's false positive probability. This gives (C.4).
For nonidentically distributed observations, use their respective midpoints and differences . Monotone reduction still applies, the magnitude law is common under the hypotheses, and the same argument uses .
Lemma C.4 (Effective sample size). For every fixed there is such that, for and every , a K-state Gaussian test with power at least c satisfies
Proof. Partition the observations into nonempty blocks of size , and let . These are independent Gaussians with unit variance with mean differences . The original test can be simulated by a randomized K-state program reading the 's. On receiving , generate independent standard Gaussians and temporarily reconstruct
Under either hypothesis, this vector has the required mean and identity covariance; joint Gaussianity gives the original independent block distribution. Execute its original transitions in temporary computation and retain only the state at the end of the block. Thus the simulation preserves both testing errors without increasing persistent memory.
When , Lemma C.3, with , gives after adjusting the constant. When , binary data processing for relative entropy gives
Here binary data processing follows by applying Jensen’s inequality to the likelihood ratio separately on the acceptance event and its complement; the binary entropy is at most . Since and is bounded in this case, the same bound follows with a larger . Finally, and is increasing for , proving (C.5).
C.4 The joint risk lower bound and collapse
Theorem C.5 (A joint confidence lower bound). There is an absolute such that, for ,
The bound allows randomized procedures with transitions that vary over time and randomized final decoding.
Proof of Theorem C.5. Fix a uniformly safe program and write . The case is absorbed into the numerical constant. Otherwise take . The elementary statistical and quantization lower bounds give and . For completeness, the first follows by testing : their total variation is at most , and an incorrect sign incurs loss at least . For the second, replace each randomized terminal output by its conditional mean given its state, which can only reduce squared risk. The resulting codebook has at most points. Integrating squared error to the nearest codepoint over the uniform distribution on gives risk at least , and hence the stated weaker bound. This reduction is used only for the lower bound, so it need not preserve safety.
Let and . Safety at implies . At , a zero output incurs loss , so . Changing the terminal decoder to yields a test with the same state budget. For the full observations and all independent program randomization, the likelihood ratio of mean against mean zero is
Cauchy–Schwarz gives
Since , this implies and . Lemma C.4, with , now yields
The target term is at most . If , then . If , use . Combining this with the quantization and bounds proves
with a numerical . The argument is uniform in the program, so taking its infimum proves the theorem.
The following form makes the consequence of insufficient state growth explicit.
Proposition C.6 (Collapse to the baseline). If and satisfy
then, uniformly over all -state uniformly -safe programs, for every fixed . Consequently, .
Proof. For any fixed power threshold , apply Lemma C.3 to and the mean pair . Its constants are independent of the selected program and of . If its power were at least , safety would imply
contradicting (C.6) for sufficiently large . Since is arbitrary, the asserted uniform convergence follows. At , risk is at least , whereas the program that always returns zero has worst-case risk exactly .
C.5 A concrete validation construction at fixed target risk
At a fixed target risk, a pilot estimate of fixed resolution supplies a finite collection of candidates. The construction retains the pilot while reusing a workspace to validate its sign and magnitude.
Lemma C.7 (A local vote with adjustable accuracy). Fix , , , and . There is a deterministic vote using at most 131r/a states and observations such that
The parameters w, are fixed inputs to this subroutine; storing their labels will be charged separately.
Proof. Form increments , and run their random walk from zero with absorbing boundaries , where . After the fixed length , accept only if the positive boundary was reached. There are states.
Write . Under the two alternatives in the lemma, respectively, and , since . For , let . The process is a nonnegative martingale. Stopping at the first visit to or at time bounds the probability of reaching the wrong boundary by . Reflecting the walk proves the corresponding bound for . Under , outside the event of reaching the negative boundary, nonacceptance implies that the unabsorbed walk ends below . Nonacceptance is therefore contained in the union of these two events. As and , Hoeffding's inequality bounds this probability by
Thus the two errors are at most . Absorbed paths ignore the remaining observations until the prescribed block boundary; disjoint blocks consequently yield independent votes.
Lemma C.8 (Candidate validation at fixed resolution). Let and let be the numerical constant for mean squared error in Lemma A.1. Put . For every fixed power of two , every satisfying , and every , there is a uniformly -safe program with at most 2AMt states, at most observations, and worst-case risk at most . Here is numerical.
Proof. Use Lemma A.1 to produce the unshrunk pilot
It uses at most 2AM states and observations and satisfies . Candidates with are replaced by zero. For the others, preassign consecutive validation intervals to the amplitude buckets
including the endpoint 1 in the last bucket. A path operates only in its candidate's bucket and ignores the other validation intervals.
For a candidate in bucket , put , . Apply Lemma C.7 with accuracy parameter : each fresh vote has errors at most between and . Its state and sample costs are bounded by and . With , set
Take the OR of fresh votes, repeat this on R disjoint groups, and accept the candidate only if all R OR decisions are one. The candidate is otherwise replaced by zero.
Because , we have . The condition gives
where the final inequality follows from . Under , an inner OR fails with probability at most , so the outer AND fails with probability at most . Under , an inner OR succeeds with probability at most , and independence gives total acceptance probability at most .
These bounds imply safety after conditioning on the pilot: outputting is harmful precisely when , and its conditional acceptance probability is then at most . Each candidate is validated only once, so averaging over the pilot requires no union bound over buckets.
For risk, let . If , the squared error after rejection is at most . If , then and , so either accepting or rejecting has squared error at most . Otherwise rejection has probability at most , and the conditional squared error is at most
Averaging proves worst-case risk at most .
We now charge all persistent information. A bucket contains at most pilot labels. For , this follows because the two Gaussian probability intervals corresponding to the positive and negative buckets each have length at most , and each contains at most grid points. For the last bucket, the total number of labels is simply at most , including labels clipped to the endpoints. Each active label is paired with the walk state and two Boolean flags for the inner OR and outer AND. The total state count during validation is therefore at most
The added states cover inactive labels and zero. Block indices, bucket indices, and positions in the logical schedule are known from the public clock. At a boundary, the same transition releases the workspace and retains the candidate label. Thus pilot and validation stages reuse the same alphabet; their state counts are not added.
Finally, the number of observations for bucket j is at most
Summing the geometric series and adding pilot observations gives the claimed numerical . All block lengths and all boundaries in (C.7) are fixed before observing the data.
C.6 Matching tradeoffs at fixed risk
Proof of Theorem 6.1. For the lower bound, fix and put . Every uniformly safe program with worst-case risk at most gives the test satisfying and , where . Cauchy-Schwarz with the Gaussian likelihood ratio gives . For sufficiently large depending only on , this implies . Lemma C.3 then gives
Increasing the same lower threshold on ensures and . Hence
which proves the lower bound for every K.
For the upper bound, choose a power of two
Decrease if needed so that whenever . For , let
Lemma C.8 supplies a safe program with at most states, risk at most , and observation count at most
Absorb integer rounding into to obtain the upper bound.
Proof of Corollary 6.2. The preceding test reduction at means zero and one has fixed power . For , Lemma C.3 forces
Thus for all sufficiently large .
For sufficiency, apply Theorem 6.1 with and . Choose to be the smallest power of two at least . Then , and the theorem's construction uses at most observations. Choose . For every fixed and sufficiently large , its required sample count is at most . Ignore any remaining observations. Together with the lower bound, this gives and hence .
C.7 Confidence costs in fixed dimension
Proof of Corollary 6.3. Reduction for the lower bound. Restrict a -dimensional procedure to means , . Given a scalar observation , generate an independent using fresh randomness and feed to the procedure. For , this is the original scalar observation. The simulated procedure keeps the same persistent states. If its vector output is , return . Pointwise,
The scalar unsafe event is therefore contained in the vector unsafe event, and scalar risk is bounded by vector risk. Thus , and Theorem 6.1 supplies the lower bound for every .
Sequential validation and its state count. Let be the constants in Lemma C.8. Choose a fixed power of two
The construction in that lemma outputs either zero or one of the M pilot candidates
Hence at most q output labels suffice, independently of the confidence level. Put
For any with , run the lemma's construction at confidence on coordinate , using a predetermined block of
fresh vector observations. It reads coordinate j from each observation and ignores the others. Pad each coordinate's schedule to m observations by retaining its final label.
During block j, the completed coordinates occupy at most labels, and the active scalar procedure has at most 2AMt states. Their product is at most St. At the block boundary, the scalar output is encoded as its candidate label and the next scalar procedure is initialized in the released workspace. The final vector has at most labels, since and . The public clock identifies the coordinate block and the local schedule. Thus all stages can be embedded in one alphabet of at most St states; no block index or separate copy of the workspace is retained. The total sample count is
Here absorbs the rounding of .
Each scalar parameter lies in . The resulting vector therefore satisfies
If every coordinate's loss is at most its loss under the zero baseline, the sum has the same property. A union bound consequently gives
Matching the prescribed budget. Choose small enough that . Then , , , and . Set . Whenever , choose
The state count is at most , including the final output labels. Equation (C.8) gives
This proves the upper bound in (6.3) with constants depending only on . The actual integer states embed directly in the prescribed alphabet .
Exponential confidence. Write and choose . For fixed and , take and let be the smallest power of two at least . For all sufficiently large , the lemma's conditions hold and
After the N scheduled observations, keep the final label and ignore the remaining observations. Conversely, the lower bound already proved gives, for every admissible K and all sufficiently large n,
Together these inequalities yield the asserted state and bit asymptotics.
C.8 Terminal compression at high confidence
Proposition C.9 (Terminal compression at high confidence). For every , , and ,
Consequently, for each fixed , a fixed alphabet size suffices for terminal risk at most under , for all sufficiently large and every fixed .
Proof. Quantize the projection of onto to the nearest midpoint of equal intervals, obtaining with and . Decode its label by soft thresholding at . The Gaussian tail bound makes hold with probability at least , so Lemma B.1's deterministic safety argument applies. Its risk calculation gives
Choosing the zero action when its bound is smaller proves the minimum. Finally choose a power of two . For , the displayed bound is at most , which is at most for sufficiently large .