Temporal-difference learning · Experience replay · Markov chains · Finite-time analysis

Finite-Time Analysis of Temporal Difference Learning with Experience Replay

arXiv:2306.09746 · 2023

Han-Dong Lim, Donghwan Lee

Department of Electrical Engineering, KAIST, Daejeon, South Korea

The central ideaFrom the research question to the result
Problem

Collect

A Markov trajectory supplies transitions to a FIFO buffer.

Approach

Resample

A uniform mini-batch supplies the averaged TD update.

Insight

Bound

Separate batch noise and buffer mismatch to quantify error.

Explanatory diagram created for this page from the paper; not an experimental result. See the methods and source references below.

Finite-time bounds explain how replay-buffer capacity and mini-batch size control error in tabular TD learning.

Key Contributions

Analyze the standard replay mechanism

The model retains a moving FIFO buffer and uniform mini-batch updates from a single Markov trajectory, rather than assuming that the stored observations are independent.

Separate two sources of error

The noise decomposition distinguishes random mini-batch sampling from the buffer's mismatch with the stationary distribution, making the roles of batch size and memory capacity explicit.

Connect replay to finite-time accuracy

Expected-error guarantees cover both averaged and final value estimates. They quantify how larger batches and buffers can shrink residual terms without requiring the constant step size to approach zero.

Abstract

A summary of the paper, written for this page.

Experience replay reuses recent observations, but its samples still inherit dependence from the trajectory that produced them. This paper analyzes on-policy tabular temporal-difference learning with a FIFO replay buffer and uniformly sampled mini-batches. It decomposes the update noise into mini-batch sampling error and the discrepancy between the buffer distribution and the stationary distribution. A linear-system representation then gives finite-time bounds for averaged and final iterates. The results show how buffer and batch sizes can reduce the residual error associated with constant-step learning, with different initialization assumptions for the two guarantees.

The problem

Why replay can change the error floor

A constant learning rate allows continuing updates but typically leaves a nonzero error neighborhood. Replay is used to improve learning, yet uniform sampling from a finite buffer does not erase temporal dependence. The problem is to explain which error terms depend on the batch, which depend on memory capacity, and how both affect finite-time policy evaluation from a single trajectory.

From problem to solution

How the method works

Use a moving buffer

After an initial collection phase, replace the oldest transition with each new observation. Uniformly sample a mini-batch and update the tabular value vector with its averaged TD error, using a constant step size between zero and one.

Section 3.1, Algorithm 1, pp. 5–6

Control sampling and trajectory noise

Write the estimation error as a stable linear recursion plus noise. Concentration bounds control sampling from the buffer, while Markov-chain arguments control its distributional mismatch. Lyapunov analysis handles averages; recursive contraction estimates handle final iterates.

Sections 3.2–3.3 and 3.6, pp. 6–11

Equation (7), pp. 6–7, with w_k abbreviating the paper's replay-dependent noise w(M_k^π,V_k); A = I − αD^π + αγD^πP^π.

Main results

What the analysis establishes

Averaged-iterate guarantee

Theorem 3.5 bounds average squared error and expected error of the averaged estimate for arbitrary initial distributions, with buffer size exceeding the stated mixing threshold. Its residual terms expose separate batch and buffer dependencies.

Theorem 3.5, p. 9

Final-iterate guarantee

Theorem 3.6 gives geometric decay of an initial-error term plus replay-dependent residuals. Unlike the averaged result, this theorem assumes that the trajectory starts from the stationary distribution before buffer collection.

Theorem 3.6, pp. 10–11

Accuracy has a data cost

Increasing mini-batch and buffer sizes reduces the stated residual bounds, but collecting a large initial buffer also costs samples. Including that collection cost can yield suboptimal overall sample complexity relative to other analyses.

Section 3.7, pp. 11–12

Reading the guarantees

Assumptions and scope

The analysis is for discounted, on-policy tabular policy evaluation with bounded rewards and an irreducible, aperiodic Markov chain. It does not prove a replay benefit for neural networks, off-policy TD, prioritized sampling, or changing policies. The final-iterate theorem's stationary-start assumption is stronger than the averaged theorem's assumption. Fixed finite buffers and batches leave residual terms in these upper bounds. Larger memory can improve the bound while increasing storage and initial data-collection costs; the paper does not claim uniformly optimal sample complexity.

See the reviewed paper version for complete hypotheses, constants, and proofs.

Paper presentation

Watch the explanation

A presentation of this paper on Next State AI.

Watch on YouTube

BibTeX

Citation for the arXiv version.

@misc{lim2023_230609746,
  title={Finite-Time Analysis of Temporal Difference Learning with Experience Replay},
  author={Han-Dong Lim and Donghwan Lee},
  year={2023},
  eprint={2306.09746},
  archivePrefix={arXiv},
  primaryClass={cs.LG},
  url={https://arxiv.org/abs/2306.09746}
}