CausalSmith · seminar slides
Long-Run Policy Evaluation with Binary Hidden States
Seven short weighted reward histories let us recover a policy’s long-run reward from one logged trajectory with inverse-length mean-squared error.
slides for Parametric Rates for Stationary Policy Evaluation with Binary Hidden States
Motivation
We observe one trajectory of length T: recorded states Xt, actions At, and rewards Yt.
- A hidden state affects rewards and transitions.
- The behavior policy b generated the actions.
- The target policy e specifies the action probabilities we want to evaluate.
- Both policies are known and depend only on the recorded state.
Our target is the stationary mean reward: expected reward per period after the target policy’s state distribution has settled.
Changing the policy changes both actions and long-run state frequencies. How can we account for state frequencies we never observe?
Standard Approach
Partial-history importance weighting multiplies a reward by target-to-behavior action probabilities over a preceding window.
- Longer windows move the state distribution closer to target stationarity.
- Longer products of action ratios increase sampling variability.
- Window choice balances initialization bias against weighting variance.
Hu and Wager (2023) obtain the matched mean-squared-error rate T−2/(2+t0ζ), where t0>0 measures mixing and ζ≥0 bounds logarithmic action ratios. Their minimax class permits hidden-state cardinality to grow with T.
Can fixed binary recorded states, hidden states, and actions support faster estimation?
Key Idea
Binary recorded and hidden states give only four joint states.
Their expected reward sequence obeys a fixed linear recurrence: later rewards are constrained by finitely many earlier rewards.
Seven short weighted moments determine the stationary reward stably, even when they do not determine the hidden dynamics uniquely.
With known observed-state randomization, stationary behavior sampling, bounded rewards and action ratios, and fixed strict contraction under both policies, we obtain minimax mean-squared error of order T−1.
The method fits a contracting four-state model to those seven moments and reports its stationary reward.
Example
Consider equal fair policies:
b(a∣x)=e(a∣x)=21,x,a∈{0,1}.
Each action has probability one half at either recorded state. Every target-to-behavior action ratio is one.
m0=Eb[Yt]=θ,t=1,…,T,
Here m0 is the reward moment using only the current action weight, Eb is expectation under behavior sampling, and θ is the stationary target reward.
The behavior stationary distribution is already the target distribution. Under stationary sampling and contracting dynamics, ordinary reward averaging is unbiased and has inverse-length mean-squared error.
When policies differ, the short moments instead start from the wrong state distribution. That is the discrepancy the moment fit must remove.
Model
The joint state is St=(Xt,Ht), where the recorded state Xt and hidden state Ht are binary. The joint-state space S has four points; actions are binary and rewards lie in [0,1].
L(Yt,St+1∣Ft−,At)=K(⋅∣St,At),t=1,…,T,
The full pre-action history is Ft−. The law K makes the current joint state and action sufficient for the reward and successor state; reward and successor state may be dependent.
Averaging successor probabilities under the two policies gives transition matrices Pb,Pe, with stationary distributions db,de. The vector re contains each joint state’s target-policy mean reward.
θ(K,e):=dere=s=(x,h)∈S∑de(s)a∈A∑e(a∣x)s′∈S∑∫YyK(dy,s′∣s,a),
This averages target conditional rewards under target stationary frequencies. Here A is the binary action space, Y=[0,1] is the reward space, and s′ is the successor joint state.
Sampling and Overlap
- Observed-state randomization: Pr(At=a∣Ft−)=b(a∣Xt). Even conditional on hidden history, assignment uses only the recorded state.
- Stationary start: S1∼db. Every sampled joint state has the behavior stationary distribution.
- Action overlap: e(a∣x)≤Lb(a∣x). Every target action is supported by behavior sampling, with target-to-behavior ratio at most L.
Randomization makes action weighting valid. Stationarity gives a common starting distribution for every weighted window. Overlap controls the size of the weights.
In the equal-policy example, all weights are one and the starting distribution is already the desired one.
Contraction
Both behavior and target transitions shrink differences between state distributions by at most α<1 per step.
For the target transition:
∥μPe−μ′Pe∥TV≤α∥μ−μ′∥TV,μ,μ′∈Δ(S),
Here μ,μ′ are probability distributions, Δ(S) is their simplex, and total variation is half the sum of absolute probability differences. The same condition holds for Pb.
- Behavior contraction controls dependence in the observed trajectory.
- Target contraction controls convergence to the reward we want and the stability of extrapolating to it.
Keep α=exp(−1/t0) and L=exp(ζ) fixed, with t0>0,ζ≥0.
Write MT(2)(t0,ζ) for the binary experiments satisfying the model, randomization, stationary-start, overlap, and two contraction conditions.
Main Result
The minimax risk RT(2)(t0,ζ) is the smallest worst-case mean-squared error among estimators using the recorded trajectory and supplied policies and bounds.
informal · Theorem T-2 For the binary class MT(2)(t0,ζ), fixed t0>0,ζ≥0 and T≥12 give minimax mean-squared error of order T−1, attained by a finite contracting moment fit.
1024T1≤RT(2)(t0,ζ)≤TBα2(112Vα,L+2).
Every estimator faces the lower bound; our moment fit attains the upper bound. The constants are
Bα=(1−α1+α)6,Vα,L=13L7+1−α2.
Bα controls amplification of moment errors; Vα,L controls their sampling error.
The order matches ordinary reward averaging in the equal-policy example. With different policies, fitting replaces the growing weighting window. Slow contraction or large action ratios can still make the constants large.
Observable Moments
For each recorded action, compute the likelihood ratio ρj=e(Aj∣Xj)/b(Aj∣Xj).
For depths k=0,…,6:
Zt(k):=Ytj=t−k∏tρj,mk:=Eb[Zt(k)],mk:=T−61t=7∑TZt(k).
The score Zt(k) weights a reward using the current action and k preceding actions. Its population mean is mk; its observed average is mk.
All seven averages use the same terminal observations. The longest window contains seven action weights, regardless of trajectory length.
What policy intervention does each weighted moment represent?
Intervention Identity
Observed-state randomization lets each action ratio replace a behavior action probability with its target counterpart.
mk=dbPekre,k=0,…,6,
This computes the expected target reward after k target transitions, starting from behavior stationary frequencies db.
- The current action weight supplies the target reward vector re.
- The preceding k weights supply k target transitions Pe.
- The starting distribution remains db, rather than de.
Thus m0=dbre corrects the reward rule but generally retains a state-distribution mismatch.
Longer windows reduce that mismatch through contraction. Our method instead uses the structure shared by seven short moments to extract their stationary limit.
Finite Dimension
A contracting four-state transition matrix has one stationary eigenvalue, equal to one, and three remaining eigenvalues, counted with multiplicity.
The remaining eigenvalues describe transient behavior: dependence on the starting distribution that disappears over time. Their absolute values are at most α.
Comparing two four-state reward sequences requires cancelling the transient behavior of both matrices. A polynomial of degree six does this, using moments at depths zero through six.
This is why seven moments suffice for stationary-value comparison.
Nair and Jiang (2021) use observable matrices with rank equal to hidden-state cardinality for finite-horizon evaluation. Here the stationary-value comparison remains stable even when fewer transient components are present.
Stationary Extraction
Compare two four-state models with initial distributions ν,ν′, contracting transitions P,P′, and reward vectors r,r′ in [0,1]. Their stationary distributions are π,π′.
Their moments are νPkr and ν′P′kr′; their stationary rewards are πr and π′r′.
Let QP,P′ be the degree-six polynomial containing both matrices’ transient eigenvalues as roots, with multiplicities. Its coefficients are Qk.
QP,P′(1)(πr−π′r′)=k=0∑6Qk(νPkr−ν′P′kr′)
The right-hand combination cancels the dependence on both starting distributions. Only the stationary reward difference remains, multiplied by QP,P′(1).
For policy evaluation, one model is (db,Pe,re); the other is our fitted model. This cancellation removes the behavior-start discrepancy even when db=de.
In the equal-policy example, that discrepancy is absent from the outset.
Stable Extrapolation
Cancellation must also resist sampling error. For any two four-state models with probability initial distributions, rewards in [0,1], and contraction at most α:
∣πr−π′r′∣≤Bα0≤k≤6maxνPkr−ν′P′kr′.
The largest discrepancy among the seven moments bounds the stationary reward discrepancy, multiplied by the previously defined Bα.
Contraction keeps every transient root away from one. The stationary component can therefore be separated without arbitrarily amplifying moment errors.
- Exact moment agreement gives exact stationary-value agreement.
- Approximate agreement gives a proportional value bound.
- Repeated eigenvalues and disappearing transient components are covered by the same bound.
We can estimate the stationary reward accurately even when the fitted hidden dynamics are ambiguous.
Stable Candidates
Search a finite grid of initial distributions ν, transition matrices R, and reward vectors r∈[0,1]4. The grid becomes finer as T increases.
Rounding a contracting transition matrix can slightly weaken its contraction. Repair each retained candidate by mixing it with a common uniform transition:
P(R):=λR+(1−λ)U.
Here U sends every state to the uniform four-state distribution. The weight λ is chosen close to one to restore contraction at most α.
Because all rows of U agree, mixing with U shrinks differences between the rows of R. The finer grid requires a smaller correction.
The candidate moments approximate the target moments while every candidate remains eligible for the stable-extrapolation bound.
Estimator
Let CM be the finite candidate set at grid resolution M. Choose the candidate minimizing its largest discrepancy from the seven empirical moments:
(ν∗,R∗,r∗)∈(ν,R,r)∈CMargmin0≤k≤6maxmk−νP(R)kr.
The candidate prediction νP(R)kr is its reward after k transitions. Stars denote the selected candidate; a fixed ordering resolves ties.
P∗:=P(R∗),θT:=π(P∗)r∗,
The estimate θT is the fitted stationary reward; π(P∗) is the selected transition matrix’s stationary distribution.
A close grid approximation ensures that a good fit exists. Minimization finds a fit at least as good. Stable extrapolation then transfers moment accuracy to stationary-value accuracy.
Risk Guarantee
Action overlap gives Eb[Zt(k)2]≤Lk+1. Since k≤6, the weighting cost stays fixed as T grows.
Windows overlap locally. Once they separate, behavior contraction makes their covariance decay geometrically.
Consequently, empirical moment mean-squared errors have inverse-length order. Grid approximation contributes a smaller error; stable extrapolation converts the combined moment error into value error.
informal · Theorem T-1 For every experiment in MT(2)(t0,ζ), fixed t0>0,ζ≥0 and T≥12 give the stable-grid estimator mean-squared error at most Bα2(112Vα,L+2)/T.
EM[(θT−θ)2]≤TBα2(112Vα,L+2),
Here EM is expectation under any experiment M in the binary class.
The fixed windows estimate biased intervention moments accurately; the moment fit removes their initialization discrepancy.
Lower Bound
Return to equal fair policies. Two experiments share transitions and noisy observations but perturb hidden-state reward probabilities.
Their Bernoulli reward probabilities are qv(h)=21+82h−1+v, where h is the hidden state and v=±vT, with vT=16T1.
The stationary rewards are 1/2+v. Writing Kv(T) for the corresponding joint reward and transition law:
θ(K+vT(T),e)−θ(K−vT(T),e)=8T1.
The values differ at the ordinary sampling scale, while the recorded-trajectory laws remain close:
KL(P+OT∥P−OT)≤121.
Here OT is the recorded trajectory, P±OT are its two laws, and relative entropy KL measures statistical distinguishability.
Both experiments satisfy all class conditions. Two-point testing forces every estimator to incur mean-squared error at least 1/(1024T) in one of them.
Further Results
- Stationary occupancy restriction: for any fixed C>1, adding de(s)≤Cdb(s) preserves the matched T−1 order; the lower-bound pair has identical stationary laws.
- Candidate count: at fixed t0>0, the finite fitting list has size O(T19), quantifying the search space.
The occupancy restriction bounds target-to-behavior long-run state frequencies. It is distinct from the action-ratio bound used to weight rewards.
Open Questions
- Can fitting certify a global objective gap within T−1 with explicit runtime and precision guarantees, including when transient components disappear?
- What is the minimal sufficient observable window, and how can we obtain limit distributions and confidence intervals?
- How should mixing and overlap bounds be calibrated in applications, and how do the required moments and risk change with larger hidden-state alphabets?
Takeaways
- Under known observed-state randomization, stationary behavior sampling, bounded rewards and action ratios, and fixed contraction under both policies, the binary experiment has minimax mean-squared error of order T−1.
- Seven short weighted moments describe target transitions from the behavior stationary distribution. Four-state structure cancels the starting-distribution discrepancy; contraction makes that cancellation stable.
- Fitting contracting candidates attains the upper bound. Ordinary reward uncertainty under equal policies supplies the matching lower bound.
Appendix: Uniform Stable-grid Risk Bound
The stable-grid estimator has a uniform inverse-length mean-squared-error bound over the specified binary experiment.
Let the mixing-scale parameter t0, logarithmic action likelihood-ratio bound ζ, and trajectory length T satisfy:
- (Mixing scale.) t0∈R and t0>0.
- (Overlap bound.) ζ∈R and ζ≥0.
- (Horizon.) T∈N and T≥12.
Define the contraction bound α, action likelihood-ratio bound L, stationary-value modulus constant Bα, and moment variance constant Vα,L by α=exp(−1/t0),L=exp(ζ),Bα=(1−α1+α)6,Vα,L=13L7+1−α2. For every binary-state, binary-action experiment M∈MT(2)(t0,ζ), the stable-grid estimator θT of Definition P-4, using that experiment's behavior and target policies, and the stationary target value θ of Definition P-2 satisfy EM[(θT−θ)2]≤TBα2(112Vα,L+2), where EM denotes expectation under the experiment's observed trajectory law.
Appendix: Fixed Binary Minimax Rate
The fixed-binary bounds match; the growing-cardinality comparison uses CausalSmith (2026), a nonarchival public manuscript, as an external premise.
Let t0 be the mixing-scale parameter, ζ the logarithmic action likelihood-ratio bound, and T the observed trajectory length, with
- (Positive mixing scale.) t0>0.
- (Nonnegative overlap exponent.) ζ≥0.
- (Horizon range.) T∈N and T≥12.
Define the contraction and action-overlap bounds, and the associated modulus and variance constants, by α=exp(−1/t0),L=exp(ζ),Bα=(1−α1+α)6,Vα,L=13L7+1−α2. The observable-data minimax mean-squared risk in Definition P-5 satisfies 1024T1≤RT(2)(t0,ζ)≤TBα2(112Vα,L+2). Define the testing perturbation amplitude by vT=16T1. Both experiments in Definition P-6 with perturbations v=+vT and v=−vT belong to the binary class MT(2)(t0,ζ) of Definition P-1. In each experiment the behavior and target policies are equal fair policies, and their stationary joint-state laws coincide: e(a∣x)=b(a∣x)=21,de=db. For every stationary occupancy-ratio bound C>1, both experiments satisfy de(s)≤Cdb(s)for every joint state s. For every observable-data estimator θ taking values in [0,1], the maximum of its mean-squared risks over these two experiments is at least 1/(1024T). If additionally ζ>0, then for every C>1, define the cardinality-uniform rate exponent and stationary-overlap radius by β=2+t0ζ2,qC=CC−1. Then 0<β<1,n→∞n∈Nlimn−βqC2(1−β)n−1=0. There exist a positive reset lower-bound constant cReset>0 and a depth schedule Q:N→N, together with constants a1,a2>0, such that, for every sufficiently large n, a1logn≤Q(n)≤a2logn. For every sufficiently large n, one has n≥1 and Q(n)≥1, and the two signed depth-Q(n) reset experiments of CausalSmithLatentOverlap2026 each have exactly 2(Q(n)+1) hidden states. For every observable-data estimator taking values in [−1,1] in that cardinality-uniform decision problem, the maximum of its mean-squared risks over these two reset experiments is at least cResetn−β. For every sufficiently large n, the negative-sign reset experiment has hidden-state cardinality 2(Q(n)+1)>2.
Appendix: Stable-grid Estimator
This procedure specifies the numerical grid, rounding allowance, uniform-mixture weight, fitting criterion, and stationary-reward output.
The inputs are the empirical moments m0,…,m6, the trajectory length T, and the contraction bound α.
- Set the grid resolution, probability grid, uniform transition matrix, and stabilization weight to M:=⌈(22+36/α)T⌉,GM:={u∈[0,1]4:i=1∑4ui=1, ui∈M−1Z for all i}, U:=411T,λ:=α+6/Mα, where 1 is the four-dimensional vector of ones.
- Enumerate the candidate triples in CM:={(ν,R,r):ν∈GM,Ri,⋅∈GM for i=1,…,4,δ(R)≤α+6/M,r∈{0,1/M,…,1}4}, where δ(R) is the Dobrushin contraction coefficient. For each candidate, form P(R):=λR+(1−λ)U.
- Select the lexicographically first triple (ν∗,R∗,r∗) among the minimizers (ν∗,R∗,r∗)∈(ν,R,r)∈CMargmin0≤k≤6maxmk−νP(R)kr.
- Form the selected transition matrix and output its stationary reward: P∗:=P(R∗),θT:=π(P∗)r∗, where π(P∗) is the stationary probability vector satisfying π(P∗)P∗=π(P∗).