Linear Tile-Coding for Value Function
- Linear tile-coding is a method that transforms continuous states into sparse, high-dimensional binary vectors for efficient value function approximation.
- Left-sided sketching applies dimensionality reduction only to the constraint side, ensuring unbiased estimation while preserving key curvature information.
- The approach significantly reduces computational costs and improves sample efficiency, underpinning robust RL algorithms like LSTD and ATD-L.
Linear tile-coding for value function approximation is a methodology within reinforcement learning (RL) for representing and estimating the value function of a policy, especially in high-dimensional continuous state spaces. This approach leverages tile coding to create sparse binary feature encodings suitable for linear approximators, and, when combined with left-sided random sketching techniques, yields powerful and computationally efficient solutions for policy evaluation with least-squares temporal difference learning (LSTD) and quasi-Newton accelerated TD methods. Recent theoretical and empirical findings have clarified the bias–variance trade-offs intrinsic to sketching, provided robust approaches for matrix-based learning, and led to practical guidelines for scaling RL with tile coding to thousands of features (Pan et al., 2017).
1. Standard Linear Value-Function Approximation with Tile Coding
Tile coding transforms each continuous state into a high-dimensional binary feature vector , with potentially in the thousands, where each feature represents the activation of a tile over the state space. The value function under policy is linearly approximated as , with weight vector to be learned.
The LSTD() algorithm collects samples and eligibility traces , then forms the normal equations , with
0
Batch solution 1 has 2 cost and maintaining 3 incrementally by Sherman–Morrison costs 4 per step. Stochastic TD(5) is 6 but less sample-efficient and sensitive to stepsize choices.
2. Limitations of Two-Sided (Feature) Sketching
A common sketching approach forms a random projection 7 (8) and generates low-dimensional features 9. The reduced system 0 is solved for 1. However, for tile-coded features, this introduces substantial bias:
- The projection 2 unpredictably folds coordinates, mixing tile activations.
- Though 3, the projected normal equations minimize the TD error in the sketched space, not the original, so the fixed point shifts.
Empirically, this yields high asymptotic error unless 4 approaches 5. The bias 6 only decays when 7 is nearly as large as 8, especially for sparse, discontinuous tile-coded features.
3. Left-Sided Sketching: Unbiased System Reduction
Left-side sketching applies the sketch 9 only to the constraint side, yielding the system 0. The true solution 1 to 2 also satisfies 3, so no bias is introduced; all solutions of 4 remain valid. In expectation, 5 preserves curvature information with cost for operations on 6 reduced from 7 to 8.
The system 9 is under-determined (many solutions), so the minimum-norm solution is preferred: 0 where 1 and 2.
4. Incremental Sketched-LSTD and Algorithmic Efficiency
The incremental update process maintains 3 and 4. Each sample induces a rank-one update: 5 yielding the recursive averages: 6 The minimum-norm solution employs the SVD 7 and is computed as 8, with incremental maintenance of 9 at 0 per sample and inversion at 1 when needed.
Each sample update costs 2, making left-sided sketched-LSTD feasible for 3 (e.g., 4, 5) and representing a substantial efficiency improvement over unsketched methods.
5. Variance Reduction via Quasi-Newton ATD-L Methods
Directly solving 6 is unbiased but susceptible to numerical instability and infrequent inversion of 7 matrices. The accelerated gradient TD update (ATD-L) leverages the sketched matrix as a preconditioner: 8 where 9 is the TD error and 0 is a small regularizer. Under mild conditions (on 1 and 2), this iteration retains convergence to the unique LSTD solution 3 without requiring full 4 inversion.
ATD-L inherits the robustness of LSTD with respect to the trace parameter 5 and regularization 6, further lowering per-step computational overhead.
6. Bias–Variance Trade-Offs and Theoretical Guarantees
Two-sided sketching creates nonzero bias—7—decaying slowly unless 8. Left-side sketching is unbiased in expectation, but variance is increased depending on 9. The Johnson–Lindenstrauss lemma gives the bound: 0 if 1. Practically, increasing 2 reduces variance and RMS error but increases computational time, with 3 serving as an effective range for tile-coding 4.
7. Empirical Results and Practical Recommendations
Experiments in Mountain Car, Puddle World, Acrobot, and Energy Allocation domains, with tile coding (5) and RBF features, demonstrate:
| Method | Sample Efficiency | Bias (Tile Coding) | Typical Per-Step Runtime |
|---|---|---|---|
| Full LSTD (d×d) | Best, unaffected by λ | None | 6 (7150 ms) |
| Two-sided sketch LSTD | Poor, high error | High (unless 8) | 9 |
| Left-side sketched LSTD | Excellent | Unbiased | 0 (11 ms) |
| ATD-L (Quasi-Newton) | Excellent, robust to λ | Unbiased | 2 (30.5 ms) |
In Mountain Car with 4:
- Full LSTD yields RMS error 50.05 in 2,000 steps at 6150 ms/step.
- Two-sided sketching gives high bias, RMS error 70.15.
- Left-sided LSTD attains RMS error 80.05 at 91 ms/step—a 01501 speedup.
- ATD-L achieves similar error and 20.5 ms/step without matrix inversion.
Guidelines for practical implementation include:
- Choice of 3: 4 or 5 for desired JL distortion; for 6, 7 is typical.
- Sketch type: Gaussian, CountSketch, Subsampled Hadamard behave similarly; Gaussian is simplest.
- Initialization: Set 8 with small 9 (00 to 01), ensuring regularization and invertibility.
- Sensitivity: Left-sided LSTD and ATD-L are robust to 02 and 03, unlike TD(04) which requires careful stepsize tuning.
- Sparse tile coding: Increase tilings or mix tiles to expand the effective visit subspace for 05.
Employing only left-sided sketching within LSTD preserves unbiased estimation of 06, lowers per-step cost from 07 to 08, and, with quasi-Newton ATD updates, provides a sample-efficient and robust policy evaluation framework for large-scale tile-coded representations (Pan et al., 2017).