Abel Rassat, Alpay Ozkan, Jose Lavariega, June 2024.
Abstract: We extend the biologically inspired Laplace Code, a distributional reinforcement learning algorithm that models the temporal evolution of rewards, from tabular settings to deep reinforcement learning using DQNs. It benchmarks the approach against C51 and QR-DQN and demonstrate how its learned reward distributions can be transformed through an approximate inverse Laplace transform to adapt policies to shorter time horizons. We also identify and address artifacts introduced by this transformation, bringing the method closer to practical applications in temporally dynamic environments.
Traditional reinforcement learning typically optimizes the expected cumulative reward of a state-action pair. However, this scalar representation hides the distribution of possible outcomes and provides limited information about when rewards will occur.
Distributional Reinforcement Learning addresses this limitation by learning the full distribution of returns rather than only their expectation.
The Laplace Code takes this idea further by representing the temporal evolution of immediate rewards. Instead of learning only how much reward an agent can expect, it captures how that reward is distributed across future time steps.
This temporal representation creates an opportunity to adapt decision-making when the available planning horizon changes.
From Gamma Space to Tau Space
Learning How Rewards Evolve Over Time
The Laplace Code learns value functions across multiple discount factors, γ. Each discount factor represents a different temporal weighting of future rewards. By learning these value functions together, the agent acquires a representation of the temporal structure of immediate rewards.
Applying an approximate inverse Laplace transform maps this representation from γ-space into τ-space, where the expected reward at different future time steps can be recovered. This enables the agent to recompute its action values for a shorter time horizon and adjust its policy accordingly.
Architecture: Laplace DQN
Scaling the Laplace Code with Deep Q-Networks
We extend the original Laplace Code beyond tabular Markov processes by implementing it with Deep Q-Networks.
The architecture takes the environment state and a discount factor as inputs and predicts action values across multiple reward sensitivities. These sensitivities represent different reward thresholds, allowing the network to approximate the distribution of immediate rewards.
During development, we encountered instability when training a single network across the entire range of discount factors. Low and high discount factors produced substantially different value functions, creating conflicting learning signals.
To address this, we introduced a multiplexer architecture that distributes discount factors across three specialized networks.
Experimental Evaluation
Benchmarking Against Distributional RL
We evaluated Laplace DQN against two established distributional reinforcement learning algorithms:
Categorical DQN (C51)
Quantile Regression DQN (QR-DQN)
Experiments were conducted across three Gymnasium environments: CartPole, LunarLander, and Acrobot.
Using the policy associated with the highest discount factor (γ = 0.99), Laplace DQN achieved performance comparable to the benchmark algorithms across the evaluated environments.
These experiments demonstrate that the Laplace representation can be integrated into deep reinforcement learning architectures while maintaining competitive learning performance.
A key motivation behind Laplace DQN is the ability to adapt an agent's behavior when its available planning horizon changes.
Consider a robot operating under a new time constraint. A policy optimized for a long horizon might prioritize conservative actions, while a shorter horizon could require more direct or aggressive decisions. Conventional reinforcement learning typically requires additional optimization to learn a policy for the new temporal constraints.
The Laplace representation offers an alternative: reconstructing the temporal reward distribution allows the agent to recompute its action values for a different time horizon.
We investigated this capability in LunarLander, where the optimal behavior changes depending on the available episode duration.
Conclusions
This work demonstrates that the Laplace Code can be extended to deep reinforcement learning through a DQN-based architecture.
By learning value functions across multiple discount factors, Laplace DQN captures information about the temporal evolution of immediate rewards. This representation offers a promising foundation for agents that must adapt their behavior to changing temporal constraints.
Our experiments also reveal that recovering this information through an inverse Laplace approximation introduces numerical artifacts that can affect decision-making.
Several directions remain open for further investigation:
1. More robust inverse Laplace approximations
Developing neural network-based approximations to map γ-space into τ-space could improve robustness against noise.
2. Temporal adaptation during training
Leveraging τ-space directly for action selection could allow agents to adapt their behavior as time horizons change during training.
3. Memory-augmented temporal representations
Exploring memory extensions that allow the agent to recover value distributions after manipulating its temporal reward representation.
4. Applications to robotics
Investigating how temporal reward representations could support adaptive decision-making in dynamic environments, particularly when planning horizons or task constraints change.
Poster presentation and associated paper write-up at an internal research showcase, hosted by the Optimization and Decision Intelligence group at ETH's Department of Informatics. For the course Foundations of Reinforcement Learning taught by Prof. Niao He.