Tensor Low-Rank Approximation of Finite-Horizon Value Functions

Sergio Rozada, Antonio G. Marques

Abstract

The goal of reinforcement learning is estimating a policy that maps states to actions and maximizes the cumulative reward of a Markov Decision Process (MDP). This is oftentimes achieved by estimating first the optimal (reward) value function (VF) associated with each state-action pair. When the MDP has an infinite horizon, the optimal VFs and policies are stationary under mild conditions. However, in finite-horizon MDPs, the VFs (hence, the policies) vary with time. This poses a challenge since the number of VFs to estimate grows not only with the size of the state-action space but also with the time horizon. This paper proposes a non-parametric low-rank stochastic algorithm to approximate the VFs of finite-horizon MDPs. First, we represent the (unknown) VFs as a multi-dimensional array, or tensor, where time is one of the dimensions. Then, we use rewards sampled from the MDP to estimate the optimal VFs. More precisely, we use the (truncated) PARAFAC decomposition to design an online low-rank algorithm that recovers the entries of the tensor of VFs. The size of the low-rank PARAFAC model grows additively with respect to each of its dimensions, rendering our approach efficient, as demonstrated via numerical experiments.

Introduction

In standard Reinforcement Learning (RL), the "infinite horizon" assumption often simplifies the problem by allowing for stationary optimal policies. However, many practical applications—ranging from robotics to resource management—operate under a Finite-Horizon (FH) constraint, where a hard deadline or a fixed number of steps dictates the agent's behavior. In these scenarios, the optimal strategy is inherently time-dependent; an action that is optimal at the beginning of a task may be suboptimal as the deadline approaches.

This time-dependency introduces a significant scaling challenge. In a tabular setting, the number of value functions (VFs) to be estimated grows linearly with the time horizon $T$, exacerbating the "curse of dimensionality." While deep learning methods like Deep Q-Networks (DQN) can mitigate some of these issues, they often suffer from parameter bloat and sample inefficiency when tasked with learning time-varying policies.

Methodology: FHTLR-learning

To address these challenges, we introduce FHTLR-learning (Finite-Horizon Tensor Low-Rank learning), a non-parametric algorithm that leverages tensor decomposition to efficiently approximate time-varying value functions.

Tensor Representation and PARAFAC Decomposition

The core innovation lies in modeling the value functions as a single multi-dimensional array, or tensor, where time is treated as an explicit dimension alongside states and actions. Instead of storing every entry in this massive tensor—which would lead to multiplicative parameter growth—we assume the tensor possesses a low-rank structure.

We utilize the PARAFAC (Parallel Factors) decomposition, which represents the tensor as a sum of $K$ outer products of vectors. This transformation is crucial: it shifts the parameter complexity from multiplicative (the product of all dimension sizes) to additive (the sum of dimension sizes multiplied by the rank $K$).

Stochastic Online Updates

FHTLR-learning employs a stochastic gradient descent rule to update the PARAFAC factors in real-time. As the agent interacts with the environment, it learns the underlying structure of the rewards without needing to visit every possible state-action-time combination. This approach allows the model to exploit correlations across different time steps, capturing the temporal evolution of the value function naturally.

Value function heatmaps in the Gridworld environment illustrating time-varying policies.

Experimental Evaluation

We evaluated FHTLR-learning in two distinct environments:

  1. Gridworld: A $5 \times 5$ grid with a short time horizon ($T=5$) and rewards in opposite corners. This serves as a didactic example to visualize how finite-horizon policies differ from infinite-horizon ones.
  2. Wireless Communications: A high-dimensional scenario involving battery and packet queue management for data transmission over orthogonal channels. This environment tests the algorithm's performance against state-of-the-art deep RL methods.

Key Results

Our experiments demonstrate that FHTLR-learning achieves competitive performance with significantly higher parameter efficiency.

  • Gridworld Performance: FHTLR-learning achieved the optimal return of 89.10, matching the full Finite-Horizon Q-learning (FHQ) while using 70% fewer parameters (152 vs. 500). In contrast, standard Q-learning failed to solve the task as it could not account for the time-varying nature of the optimal policy.
  • Wireless Communications Performance: In the complex wireless scenario, FHTLR-learning achieved a return of 1.36, nearly matching the state-of-the-art DFHQN (1.38).
  • Efficiency Gains: The parameter reduction is most evident in the wireless scenario, where FHTLR used only 3,450 parameters—approximately 20% of the size of the DFHQN model (16,724 parameters) and orders of magnitude smaller than the 20 million parameters required for a tabular FHQ approach.
Learning curves comparing FHTLR-learning against DQN, DFHQN, and FHQ-learning in the wireless communications environment.

Conclusion and Future Work

FHTLR-learning offers a powerful framework for RL in finite-horizon settings by breaking the multiplicative parameter barrier. By treating time as a tensor dimension and applying low-rank decomposition, we achieve state-of-the-art performance with a fraction of the parameters required by traditional or deep RL methods.

Future work will focus on automated rank selection, as the rank $K$ is currently a hyperparameter. Additionally, we aim to extend this framework to continuous state and action spaces by integrating tensor methods with functional approximations or alternative decompositions like Tucker or Tensor Train.

Summary updated

BibTeX
@inproceedings{rozada2024tensor,
  author = {Sergio Rozada and Antonio G. Marques},
  title = {{Tensor Low-Rank Approximation of Finite-Horizon Value Functions}},
  booktitle = {IEEE International Conference on Acoustics, Speech and Signal Processing},
  year = {2024},
}
Figure