WorksMathematics
Bayesian Neural Networks via Dirichlet Process Priors on the Data-Generating Distribution for Randomized Value Functions in Deep Reinforcement Learning
Abstract
Bayesian neural networks (BNNs) offer a principled framework for quantifying epistemic uncertainty. However, standard weight-space priors yield complex, high-dimensional neural network posteriors that are computationally prohibitive to sample from, and popular approximate inference schemes often fail to capture epistemic uncertainty effectively—a failure mode particularly acute in reinforcement learning (RL) \citep{osband2018randomized}. To resolve this challenge, we introduce a new class of BNNs that quantify uncertainty by placing Bayesian nonparametric Dirichlet Process (DP) priors directly on the underlying data-generating distribution rather than on network parameters. Building on this foundation, we develop DP-DQN, a reinforcement learning algorithm that leverages DP-BNNs to maintain posterior distributions over value functions and perform efficient Thompson sampling. By grounding randomized value functions in Bayesian nonparametrics, DP-DQN unifies data-driven posterior reweighting (via the Bayesian Bootstrap) with generative prior hypotheses injected directly through the DP base measure, enabling decisive ``deep exploration'' with a single neural network without the overhead of multi-network ensembles.
Introduction
In reinforcement learning (RL), maximizing cumulative return requires navigating the fundamental exploration-exploitation dilemma: balancing current best estimates (exploitation) with exploratory actions that resolve epistemic uncertainty. Solving this trade-off efficiently is challenging because delayed rewards require actions to be coordinated across extended multi-step decision sequences—a property known as deep exploration ([41, 43, 38])—rather than perturbed independently at each individual state.
Thompson Sampling ([55, 27, 50, 12, 47, 35]) provides an elegant approach that tackles the exploration-exploitation dilemma by maintaining a posterior distribution over models and selecting actions in proportion to the probability that they are optimal. While these models are conventionally drawn from parametric distribution families (e.g., exponential families), Thompson sampling can in principle be applied to any statistical model admitting tractable posterior sampling ([47]). A natural choice for such statistical models is Bayesian Neural Networks (BNNs), owing to their universal function approximation and rich representation learning capabilities. In contrast to standard neural networks that provide only point estimates, conventional BNNs specify a prior distribution over parameters . Given training observations , one infers a posterior distribution over , which in turn captures epistemic uncertainty in function predictions.
In deep RL, one can represent value functions via BNNs and drive exploration via Thompson sampling over value-function predictions. However, exact posterior inference over neural network weights is notoriously intractable, prompting extensive research into approximate Bayesian methods. These range from Monte-Carlo (MC) dropout ([20]) and variational inference ([8]) to stochastic mini-batch Markov Chain Monte Carlo ([59]). Unfortunately, deep RL algorithms built on these weight-space approximate Bayesian methods struggle on hard-exploration tasks because they fail to capture function-space epistemic uncertainty faithfully [42]. This deficiency stems largely from the difficulty of designing meaningful priors directly in parameter space [3]: while practitioners frequently possess domain knowledge regarding the data-generating process (e.g., transition dynamics and reward scales), mapping such insight into high-dimensional, isotropic parameter priors on over-parameterized neural weight vectors () is rarely straightforward and often causes posterior uncertainty collapse.
To resolve these limitations, we introduce Bayesian Neural Networks via Dirichlet Process priors (DP-BNNs), a paradigm that quantifies epistemic uncertainty by placing a nonparametric DP prior directly on the underlying data-generating distribution rather than on network parameters. Under this formulation, posterior inference over the data distribution decomposes into two complementary components [16, 58, 57]: an empirical reweighting of observed data (the Bayesian Bootstrap) and an explicit prior base measure. In reinforcement learning, optimizing an action-value network on random measures sampled from this DP posterior induces a principled functional posterior distribution over value functions. Crucially, whereas existing randomized value function approaches require training an ensemble of multiple neural networks to represent functional uncertainty [41, 42], our approach achieves temporally coordinated deep exploration with a single neural network by freezing the value function sampled for each episode across the entire rollout.
We summarize our primary contributions as follows:
DP-BNN Formulation and Sampling: We introduce Bayesian Neural Networks via Dirichlet Process priors (DP-BNNs), a framework that quantifies epistemic uncertainty by placing a nonparametric DP prior on the data-generating distribution rather than on network weights. Using the Sethuraman stick-breaking construction, we develop a tractable posterior sampling algorithm for deep architectures and validate its epistemic uncertainty quantification on spatial 2D regression.
Deep Reinforcement Learning via DP-BNNs (DP-DQN): We instantiate DP-BNNs for randomized value functions in deep Q-learning, establishing the DP-DQN algorithm. By optimizing an action-value DP-BNN on random measures sampled from the DP posterior via episodic boundary warmstarts, DP-DQN realizes principled Thompson sampling with exact multi-step temporal consistency using a single neural network.
Comprehensive Empirical Benchmarking: We evaluate DP-BNNs across diverse decision-making benchmarks, demonstrating that they resolve hard exploration in DeepSea across extensive horizons evaluated up to ( trajectory search space with empirical sample complexity), RiverSwim-6, deceptive N-Chain, continuous MountainCar-v0, and contextual Wheel Bandit, matching or outperforming multi-network ensembles while strictly maintaining a single-network footprint.
The remainder of this paper is organized as follows. § 2 surveys related work. § 3 reviews Dirichlet Processes and their stick-breaking construction. § 4 introduces Bayesian Neural Networks via Dirichlet Processes priors (DP-BNNs) and details their posterior sampling algorithm. § 5 presents DP-DQN, applying DP-BNNs to randomized value functions in deep reinforcement learning, and evaluates its performance on challenging exploration benchmarks. Finally, § 6 concludes the paper.
Related Works
Randomized Value Functions and Exploration in Deep RL. Our work connects directly to deep reinforcement learning algorithms that explore via randomized value functions, replacing heuristic -greedy exploration with principled posterior sampling (Thompson Sampling) [55, 27, 21, 41, 50]. In deep RL, the most direct approach to Thompson sampling is to maintain a Bayesian neural network over action-values. However, exact posterior inference over network weights is intractable [34], and mini-batch MCMC schemes scale poorly to online RL training regimes [59]. Consequently, practitioners have relied on approximate inference methods such as Monte-Carlo dropout [20] and mean-field variational inference [8]. Unfortunately, these weight-space approximations struggle to maintain functional uncertainty in unvisited regions, leading to exploration failure in challenging environments [42].
Bootstrap Ensembles and Prior Mechanisms. To approximate posterior sampling over function space without exact weight posteriors, Lakshminarayanan et al. [30] proposed Deep Ensembles, relying on random parameter initializations across independently trained networks. In sequential decision-making, Osband et al. [41] introduced Bootstrapped DQN, which approximates posterior sampling using an ensemble of neural networks trained on nonparametrically resampled data (see also Kveton et al. [29] for bootstrapping exploration in bandits). In sparse-reward environments, however, empirical bootstrapping alone provides limited guidance in regions devoid of data: because all ensemble heads are trained on unrewarded transitions, their value estimates tend to align across unvisited states. To address this and sustain directed exploration, Osband et al. [42] introduced Bootstrapped DQN with Randomized Prior Functions (BootDQN-RP), which augments each trainable head with a fixed, randomly initialized prior network . While highly effective in practice, this formulation substantially increases computational and memory demands, as it requires training and maintaining an ensemble of distinct neural networks alongside their corresponding prior networks. In another approach, Bayesian Deep Q-Networks (BDQN) (Azizzadenesheli et al., [5]) applies Bayesian linear regression to the final layer representations; however, its capability on deep-exploration benchmarks has remained largely unexplored in the literature, and our empirical evaluations on DeepSea show that BDQN does not resolve the task. Theoretically, restricting Bayesian inference strictly to the final linear readout cannot account for epistemic uncertainty in the underlying feature representations on unvisited states (see Appendix § 12.§ 3 for a detailed theoretical analysis).
Our Approach: Dirichlet Process Priors on Data Distributions. Rather than placing priors on network parameters [8] or relying on multi-network ensembles with additive priors [42], our approach formulates epistemic uncertainty nonparametrically on the data-generating distribution. Building upon DP posterior sampling techniques developed in Vashishtha & Maillard [58] and Vashishtha [57], DP-BNNs connect Rubin’s classical Bayesian Bootstrap [49]—recovered in the non-informative limit —with an informative prior base measure . Crucially, whereas empirical bootstrapping can only resample observed data, the base measure populates unvisited regions of the domain, sustaining non-vanishing epistemic uncertainty where experience is absent. This enables directed exploration with a single neural network while avoiding the parameter and memory footprint of multi-network ensembles.
Background on Dirichlet Processes
This section reviews essential foundational concepts regarding Dirichlet Processes, conjugate posteriors, the Bayesian Bootstrap, and stick-breaking representations that underpin our DP-BNN framework; for comprehensive treatises on Bayesian nonparametric statistics, see Ghosal & van der Vaart [23] and Castillo [10].
Dirichlet distribution. The Dirichlet distribution is a multivariate generalization of the Beta distribution. We denote the Dirichlet distribution parameterized by on the probability simplex as , with density .
Dirichlet Processes. In the Bayesian formalism, an unknown object of interest is treated as a random variable endowed with a prior distribution. When the unknown object is itself a probability measure on a measurable space (e.g., a Polish space endowed with its Borel -algebra), defining a prior over infinite-dimensional distributions while satisfying unit-measure normalization is challenging. Ferguson [16] introduced the Dirichlet Process (DP)—a distribution over probability measures that induces finite-dimensional Dirichlet distributions on partitions. Concretely, a random probability measure is Dirichlet Process distributed with base probability measure and concentration parameter , denoted , if for every finite measurable partition of :
Conjugacy and Posteriors. A particularly useful property of the DP is its conjugacy: if observations are drawn from an unknown distribution with prior , the posterior distribution given is itself a DP (Ferguson, [16]):
where denotes the empirical measure of the observations (Ghosal, [22]).
Notice how the posterior base measure in Equation (2) naturally balances empirical evidence with prior structure . As sample size , the empirical data dominates; conversely, when data is scarce (), the prior governs. In our setting, serves as the foundational mechanism through which prior inductive biases enter the posterior; more broadly, recent advances in Bayesian nonparametrics demonstrate that random probability measures can also be elicited directly from prior information on meaningful functionals (Gaffi et al., [19]).
Bayesian Bootstrap. The Bayesian Bootstrap (Rubin, [49]) provides a Bayesian analogue to Efron’s classical bootstrap (Efron & Tibshirani, [14]), and has been leveraged for randomized exploration in multi-armed bandits (Kveton et al., [29]). Crucially, the Bayesian Bootstrap arises as the non-informative limiting case of a DP posterior as the prior concentration vanishes, (Ghosal & van der Vaart, [23]):
where and denotes a Dirac measure at observation . The posterior mean of any linear functional under the Bayesian Bootstrap evaluates simply as ; for a comprehensive survey on the distributional properties of means and linear functionals of random probability measures, see Lijoi & Prünster [31].
Stick-Breaking Construction. While Equation (2) specifies the posterior distribution of , practical computation requires a constructive method to draw sample measures from a DP. Sethuraman [51] established that almost surely discrete random probability measures from admit an explicit stick-breaking representation:
where weights are generated by successively breaking pieces from a unit stick:
In practice, the infinite series is truncated at a finite level by setting , which ensures the remaining stick length is fully assigned to , guaranteeing (Ishwaran & James, [26]; Muliere & Tardella [37]). Truncation bounds and approximation guarantees are detailed in Appendix § 9.
Iterative Sampling from the DP Posterior. To sample an explicit realization from the posterior , we leverage the sequential stick-breaking recursion of Dirichlet Processes. Conditioning a DP on a single observation satisfies the recursive distributional relation [16, 23]:
where denotes equality in distribution. Building upon this relation, Vashishtha & Maillard [58] derived an explicit multi-step stick-breaking representation for sampling realized probability measures directly from the DP posterior: initializing with a prior draw via stick-breaking and unrolling recursion (7) across all observations yields
The scalar coefficient represents the total posterior probability mass retained by the prior measure . Under the sequential Beta stick-breaking construction where , this remaining prior weight follows the exact closed-form distribution:
with expected prior mass . This term cleanly governs the balance between empirical evidence and prior belief: when data is absent (), and the posterior recovers the prior ; as observations accumulate (), and empirical data dominates.
Bayesian Neural Networks via DP Priors
In this section, we present a nonparametric methodology for sampling neural-network models from their posteriors to capture epistemic uncertainty in function predictions. The core idea is that predictive uncertainty originates from incomplete knowledge of the true data-generating distribution. Consider a neural network parameterized by trained under loss . If the true data-generating distribution were known (generating observations , with inputs and targets ), optimal parameters would be obtained by minimizing the expected risk:
In practice, however, the learner only observes a finite training set, leaving unknown. Epistemic uncertainty over , and consequently over network predictions, is therefore a direct consequence of uncertainty over .
To quantify this uncertainty, we place a Dirichlet Process prior directly on the unknown data distribution: , where the base measure encapsulates prior domain structure and support (Lemma 1). As training observations accumulate (), posterior consistency ensures that the posterior over concentrates weakly around the true distribution [16, 22, 10]. In finite-sample regimes, however—and particularly in regions where data is sparse or absent—the posterior does not collapse to an overconfident point estimate; instead, it retains non-vanishing epistemic variance governed by . Whereas weight-space variational BNNs frequently underestimate uncertainty in voids or between separated data clusters [17], placing the nonparametric prior directly in data space preserves functional uncertainty wherever data has not yet been observed.
Given a finite training dataset , the posterior over the data-generating distribution is with posterior indices defined in Equation (2). Applying the stick-breaking construction (Equations (5)–(6)) and the iterative posterior recursion (Equation (8)) ([58]), any random posterior measure truncated at prior atoms takes the explicit finite discrete form:
Algorithm 1 Posterior Sampling of Bayesian Neural Networks via Dirichlet Process Priors (DP-BNN)
Input: Training observations , DP prior parameters , truncation level , sample count , loss function
Output: Posterior model samples
for do
Sample synthetic prior pseudo-observations:
Form random discrete posterior measure:
Initialize network parameters
Optimize parameters to convergence: via Eq. (12)
end for
return
where are the observed training points and are prior pseudo-observations sampled from the base measure. The weights satisfy , where the empirical weights are obtained from Equation (8) and the prior weights are generated by scaling stick-breaking weights from Equation (5) by the remaining prior factor (Eq. (9)).
Substituting this discrete measure into the risk functional in Equation (10), sampling a neural-network model from the posterior reduces directly to a weighted empirical loss:
The complete procedure is summarized in Algorithm 1. In order to compute variations in predictions and confidence intervals, one computes predictions across the sampled models . Notice that as , recovers the Bayesian Bootstrap (Equation (3)), placing probability mass solely on observed data points . When , the DP base measure incorporates prior domain structure and ensures non-vanishing epistemic uncertainty in unexplored regions of the input space.
We evaluate the epistemic uncertainty of DP-BNNs on a 2D regression benchmark over an annular manifold where 2D spatial inputs have radial distance with noisy scalar target observations with (aleatoric ), leaving an unobserved central cavity void for (Figure 1A). Because there are no training observations within the interior cavity, a reliable Bayesian model is fundamentally expected to exhibit high epistemic uncertainty (low predictive confidence) throughout this unobserved void, while contracting with high confidence on the data-rich annular ring. We quantify epistemic uncertainty via Bayesian Active Learning by Disagreement (BALD) ([25]) across sampled models (Appendix § 10.§ 2). Crucially, unlike deep ensembles (Lakshminarayanan et al., 2017) that rely on disparate parameter initializations to generate variance. DP-BNN induces epistemic diversity non-parametrically in function space via synthetic pseudo-observations from a product base measure . Following Lemma 1, we choose the support of as the uniform distribution over the domain to ensure non-empty coverage of unobserved voids, paired with dispersed prior targets ( atoms, concentration parameter ). As shown in Figure 1B–E, DP-BNN reflects this expected epistemic behavior, forming an isotropic uncertainty region in the void (1.41 nats vs. 0.18 nats on data support; 8.0× contrast ratio). In comparison, standard baselines exhibit lower contrast between the void and data support: BootDQN with randomized priors (Osband et al., [42]) yields 0.54 vs. 0.14 nats (3.8×), MC Dropout (Gal & Ghahramani, [20]) yields 0.36 vs. 0.16 nats (2.2×), Deep Ensembles (Lakshminarayanan et al., [30]) yields 0.29 vs. 0.06 nats (4.8×), and variational inference (Bayes By Backprop, BBB) (Blundell et al., [8]) produces near-uniform uncertainty across the domain (0.07 vs. 0.09 nats). Because each model minimizes the loss under an independently drawn measure , the training cost of DP-BNN is on par with standard ensemble baselines (wall-clock training times for models: DP-BNN [5.9 s], BootDQN+priors [5.4 s], Deep Ensembles [6.9 s], BBB [2.1 s], MC Dropout [0.7 s]).

Figure 1. Epistemic uncertainty on 2D annular regression. (A) Annular training data () with unobserved central cavity (). (B–D) BALD epistemic uncertainty heatmaps (nats) [25] on a shared scale for Deep Ensembles (B), BootDQN with randomized priors (C), and DP-BNN (D). (E) Void vs. data support BALD contrast across evaluated methods.
While quantifying predictive variance in this benchmark required training multiple models (), Thompson sampling in sequential decision-making requires only a single sampled model per episode (Thompson, [55]; Russo et al., [50]). Because DP-BNNs represent uncertainty via the DP posterior over data distributions, training a single neural network on a draw from this posterior directly provides the required sample. Consequently, an agent can perform Thompson sampling with a single neural network, eliminating the heuristic multi-network ensembles required by previous methods. In the next section, we apply this framework to deep reinforcement learning.
Reinforcement Learning with DP-BNNs
We now extend the DP-BNN framework to reinforcement learning, developing DP-DQN: a deep Q-learning algorithm that achieves directed, temporally consistent exploration via posterior sampling over action-value functions.
Problem Formulation and Exploration Bottlenecks
Markov Decision Processes. A Markov Decision Process (MDP) (Puterman, [45]) is formalized by the tuple , where is the state space, is the discrete action space, is the reward function, is the transition probability distribution, and is the discount factor. An agent aims to identify an optimal policy maximizing expected cumulative discounted return, characterized by the unique optimal action-value function satisfying the Bellman optimality equation:
Deep Q-Learning and Exploration Bottlenecks. In complex or continuous state spaces, tabular representation is infeasible. Value-based deep reinforcement learning methods such as Deep Q-Networks (DQN) and Double DQN (Mnih et al., [36]; van Hasselt et al., [56]; Bellemare et al., [7]) approximate with a deep neural network parameterized by . Parameters are optimized by minimizing the mean-squared Temporal Difference (TD) regression loss over transition tuples sampled from an experience replay buffer :
where denotes the parameters of a tracking target network. In the framework of statistical learning theory, Eq. (14) is the empirical risk minimizer of the expected TD loss under the empirical measure of the replay buffer, corresponding to neural Fitted Q-Iteration (Ernst et al., [15]; Riedmiller, [46]; Mnih et al., [36]).
Standard DQN relies on heuristic -greedy dithering for exploration. However, independent action perturbations at each step lack temporal consistency, requiring an exponential sample complexity to discover delayed rewards over horizon [42, 43]. Principled deep exploration instead requires Posterior Sampling for Reinforcement Learning (PSRL) [11, 53, 40, 21], where an agent samples an action-value hypothesis from an epistemic posterior and acts greedily with respect to it for the entire episode rollout. However, existing deep exploration approaches either maintain an ensemble of separate neural networks (e.g., Bootstrapped DQN; Osband et al. [41]), which incurs a prohibitive -fold memory and computational footprint, train parameterized epistemic hypermodels [13], inject heuristic parameter noise (NoisyNet; Fortunato et al. [18]), or rely on parametric weight-space Bayesian approximations (e.g., Bayes By Backprop, MC Dropout) that suffer from prior generalization collapse and fail to sustain epistemic uncertainty across deep horizons [17, 42]. DP-BNNs resolve these dual bottlenecks—computational scaling overhead and epistemic uncertainty collapse—by placing a DP prior directly on the data-generating distribution of transition experience , inducing rich function-space epistemic diversity nonparametrically with a single neural network (instantiated here as DP-DQN).
DP-DQN: Posterior Sampling for Randomized Value Functions
While standard DQN minimizes empirical TD loss over observed transitions in the replay buffer (Eq. (14)), the DP-BNN framework quantifies epistemic uncertainty by placing a DP prior directly on the underlying transition-experience distribution:
where the base measure generates synthetic transition tuples via factorized marginals , with continuing transitions (). Following Lemma 1, the base measure maintains full topological support over state-action spaces (, ). Because data collection in reinforcement learning is policy-dependent, the reward prior is specified to sustain exploratory variance in unvisited regions (Appendix § 10).
Given observed transitions in the replay buffer , Ferguson’s conjugacy [16] yields the posterior distribution over the data-generating distribution:
Under this formulation, posterior sampling over value functions corresponds to drawing a discrete random measure for each episode and optimizing the action-value network under : .
Full-Buffer Conditioning and Prior Swamping. However, directly realizing this posterior draw over the full replay buffer introduces two practical challenges:
Computational overhead: Evaluating stick-breaking representations and backpropagating across stored transitions at every episode boundary is computationally prohibitive.
Prior swamping: In sparse-reward exploration, unguided initial rollouts inevitably accumulate thousands of unrewarded transitions. If the sample size in Eq. (16) scales with the raw buffer size (), the relative weight of the prior base measure rapidly diminishes. The posterior contracts toward empirical resampling over observed transitions—recovering the Bayesian Bootstrap limit () [49]—which diminishes exploratory drive early in training (Figure 2a; Appendix § 11).

Figure 2. Empirical exploration and scaling on DeepSea (Osband et al., [43]). (a) Cumulative regret on DeepSea-20 (10 random seeds, shaded bands denote standard deviation) comparing DP-DQN against BootDQN-RP, BDQN, and DP-DQN in the Bayesian bootstrap limit (; § 3). (b) Empirical sample complexity across 30 grid sizes up to (6 random seeds per size, error bars denote standard deviation), showing empirical scaling for DP-DQN compared to for BootDQN-RP.
Composite DP-Bellman Loss. To approximate this posterior without full-buffer computation, DP-DQN evaluates an empirical mini-batch alongside synthetic prior atoms , forming the discrete composite measure . Minimizing the expected temporal-difference error yields the composite DP-Bellman loss:
where and denote empirical and prior Bellman targets, and tracks target network parameters via Polyak averaging (Lillicrap et al., [32]). Layer Normalization (Ba et al., [6]) is applied across hidden layers to ensure numerical stability across heterogeneous stick-breaking weights.
Information Calibration via Bellman Surprise. Scaling the prior weight by the raw buffer size would cause the prior mass to vanish in early unrewarded rollouts (prior swamping). To prevent this, we modulate the prior mass by the cumulative information content of observed transitions rather than raw sample count. Setting , the effective sample counter accumulates sample weight proportional to normalized Bellman surprise:
where denotes the running standard deviation of Bellman errors. Transitions with near-zero Bellman error represent well-modeled dynamics that contribute negligible information, maintaining non-vanishing prior weight until novel reward signals are uncovered (Appendix § 11).
Episodic Boundary Warmstart and Rollout Freezing. To preserve multi-step temporal consistency, DP-DQN eliminates intra-episode parameter updates, amortizing optimization into stochastic warmstart gradient steps at episode boundaries. At the start of episode , prior atoms are drawn once to fix the episodic exploration hypothesis. Across steps , fresh empirical mini-batches are sampled to optimize on , which approximately draws a value function from the functional posterior. In accordance with PSRL (Strens, [53]; Osband et al., [40]), the updated parameters are frozen throughout the episode rollout, executing greedy actions to guarantee temporally coordinated exploration with a single neural network (Algorithm 2).
Algorithm 2 DQN with Thompson Sampling-Based Exploration via DP-BNNs
Input: Action-value network , target network parameters , DP prior parameters , truncation level , replay buffer , mini-batch size , warmstart steps , learning rate , discount factor , episode horizon , Polyak rate
Initialize effective information counter
for episode do
Stage 1: Value Function Posterior Sampling via DP-BNNs (Warmstart)
Sample synthetic prior transitions: for
Compute prior stick weights via Eq. (5) for
for step do
Sample empirical mini-batch
Sample prior factor and empirical weights via Eq. (8)
Compute Bellman targets: and
Update online network: (via Eq. (17))
Calibrate information counter via TD surprise (Eq. (18))
end for
Freeze episode policy network:
Stage 2: Temporally Coordinated Rollout under Sampled Hypothesis
Observe initial state from environment
for do
Select action greedily under sampled model:
Execute , observe reward , next state , and terminal flag
Store transition into replay buffer
if is true then break
end if
end for
Synchronize target network via Polyak tracking:
end for
Empirical Evaluation on Hard-Exploration Benchmarks
To evaluate whether DP-BNN posteriors provide effective randomized value functions with a single neural network, we examine DP-DQN across the scalable DeepSea benchmark (Osband et al., [43]), the canonical diagnostic domain for deep exploration. Specifically, we evaluate: (i) whether a single neural network equipped with a DP posterior matches the sample efficiency of multi-network ensembles on canonical DeepSea-20; (ii) how empirical sample complexity scales as grid size expands up to ; and (iii) how the computational and memory footprint of DP-DQN compares with multi-network ensemble baselines.
The DeepSea Exploration Benchmark. DeepSea requires an agent to execute consecutive coordinated actions across an episode of length to collect a solitary terminal reward () at . It challenges exploration through three distinct mechanisms: (i) an unknown action-dependent per-row mask the optimal direction; (ii) a continuous step cost of penalizes exploration along the optimal path and biases myopic policies toward the unrewarded boundary; and (iii) any suboptimal step irreversibly routes the agent into zero-reward absorbing states. Consequently, dithering exploration strategies (such as -greedy) require an expected episodes to discover the goal (Osband et al., [41]; Osband et al., [43])—scaling from episodes at to episodes at . We benchmark on canonical DeepSea-20 (Figure 2a) and evaluate scaling behavior across 30 grid sizes up to (Figure 2b).
Base Measure for DP-DQN. To ensure exploration is driven without privileged environment knowledge, DP-DQN specifies an uninformative product base measure over transitions, . State and next-state components are sampled uniformly over the canonical one-hot vectors , actions uniformly , and continuing flags , encoding zero information about transition graph topology or goal coordinates. For rewards, setting with naturally induces stochastic optimism (Osband & Van Roy, [39]; Agrawal & Jia, [2]), sustaining positive expected value on unexplored states or overcome continuous step costs without artificial reward shaping. We set concentration parameter and truncation level ; complete hyperparameter specifications, support conditions, and base measure ablations are detailed in Table 2 and Appendices § 10 and § 12.
| Hyperparameter | 2D Annular Cavity | DeepSea-20 | DeepSea-50 | RiverSwim-6 | Deceptive N-Chain | MountainCar-v0 | Wheel Bandit |
| State Space | One-Hot | One-Hot | One-Hot | One-Hot | Continuous | Unit Disk | |
| Action Space | — (Regression) | Discrete (2) | Discrete (2) | Discrete (2) | Discrete (2) | Discrete (3) | Discrete (5) |
| Horizon | — | 20 | 50 | 50 | 10 | 200 | 1 |
| Network Architecture | 3-layer MLP-64 | Single MLP-20 | 2-layer MLP-64 | Single MLP-20 | Single MLP-20 | 2-layer MLP-64 | 3-layer MLP-64 |
| Layer Normalization | No | Yes | Yes | Yes | Yes | Yes | No |
| Optimizer | Adam | Adam | Adam | Adam | Adam | Adam | Adam |
| Learning Rate | |||||||
| Mini-Batch Size | 64 | 64 | 64 | 32 | 32 | 32 | 64 |
| Replay Buffer Size | — | 100,000 | 100,000 | 10,000 | 10,000 | 50,000 | 10,000 |
| DP Concentration | 10.0 | 3.0 | 3.0 | 3.0 | 3.0 | 3.0 | 1.0 |
| Prior Truncation Level | 50 | 50 | 50 | 50 | 50 | 50 | 20 |
| Warmstart Steps | — | 10 | 25 | 25 | 5 | 100 | — |
| Polyak Target Rate | — | 0.05 | 0.05 | 0.05 | 0.05 | 0.01 | — |
| Prior Base Reward |
Table 2. Consolidated experimental specifications and hyperparameters for DP-BNN and DP-DQN across all empirical benchmarks ( — for static regression and contextual bandits because with no sequential Bellman propagation).
DeepSea-20 Exploration Performance. Figure 2a presents comparative results on DeepSea-20 across 10 independent random seeds per algorithm over 10,000 episodes (mean cumulative regret with shaded standard deviation). All agents employ an action-value architecture with a single hidden layer of 20 units (MLP-20), matching the network capacity in Osband et al. [42]. For DP-DQN, Layer Normalization (Ba et al. [6]) is included to stabilize gradient variance across heterogeneous stick-breaking weights, with concentration parameter and truncation level (Table 2). Equipped with the uninformative uniform base measure, DP-DQN achieves a 100% solve rate (10/10 seeds), discovering the terminal goal at episode and reaching policy convergence in episodes, with cumulative regret plateauing at . In comparison, Bootstrapped DQN with randomized priors (BootDQN-RP, 20 ensemble heads + 20 prior networks) (Osband et al. [42]) requires episodes with regret. Notably, DP-DQN consolidates into the optimal policy within episodes after initial discovery (). Because the high Bellman surprise of the newly discovered goal sharply increments the information counter , the prior factor is rapidly attenuated in favor of empirical Bellman targets (Eq. (17)), stabilizing greedy execution without the inter-head variance or conflicting prior biases that can impede policy consolidation in heuristic ensembles. Conversely, standard DQN, BDQN (Azizzadenesheli et al. [5]), and DP-DQN in the Bayesian bootstrap limit (; § 3, Eq. (3)) fail to discover the goal across all seeds (0/10 seeds solved), incurring linear regret (). In this Bayesian bootstrap limit where the prior concentration parameter vanishes (), the agent samples purely from empirical replay transitions without synthetic prior augmentation (). Because early trajectories observe only zero-reward transitions, pure empirical resampling provides no exploratory optimism toward unvisited states, confirming that the prior base measure is essential for driving deep exploration (Appendices § 11 and § 12.§ 3).
Scalability Across DeepSea Grid Size . To evaluate scalability as the exploration horizon expands, we benchmarked DP-DQN across 30 grid sizes up to (6 independent random seeds per size, error bars denote standard deviation; Figure 2b and Table 1). To accommodate the expanding state space () and trajectory space ( paths), the action-value network uses two hidden layers of 64 units each (64 64 MLP with Layer Normalization). Following standard benchmark convention (Osband et al. [43]), an environment run is deemed solved when the agent achieves consistent policy convergence, operationalized as maintaining a rolling mean episode return over 20 consecutive episodes (relative to the optimal return ), corresponding to the point where cumulative regret permanently flatlines. DP-DQN consistently solves DeepSea-50 in episodes (Table 1). Across grid sizes from to , empirical sample complexity scales as , outperforming the empirical scaling of BootDQN-RP (Osband et al. [42]) and remaining well below the lower bound of dithering heuristics.
Computational and Memory Efficiency. A foundational advantage of DP-DQN is that it eliminates the severe computational overhead of multi-network ensembles. While BootDQN-RP () must instantiate, store, and train separate action-value networks alongside prior networks and target networks ( parameters and optimizer buffers), DP-DQN operates on a single active neural network ( parameters), matching the parameter footprint of standard DQN. The non-parametric mechanism introduces two computational overheads relative to standard DQN: (i) sampling Dirichlet process stick-breaking weights requires scalar operations once per episode for prior atoms and per warmstart step for empirical mini-batches, totaling an asymptotic stick-breaking complexity of only scalar operations per episode (, negligible compared to network tensor arithmetic); and (ii) evaluating the composite loss (Eq. (17)) across the prior transitions in addition to the empirical mini-batch of size scales gradient backpropagation by a factor of . Profiling on canonical DeepSea-20 on a standardized CPU core confirms this efficiency: DP-DQN incurs an amortized execution latency of 0.43 ms/step (comparable to standard DQN’s 0.38 ms/step, and 2.4 faster than BootDQN-RP’s 1.05 ms/step). Combined with superior sample efficiency ( vs. episodes), DP-DQN converges in only 5.16s of total CPU time compared to 103.26 s for BootDQN-RP—achieving a 20.0× wall-clock speedup while using 20× less memory (Table 4, Appendix § 16).
| Metric | Vanilla DQN | BDQN | BootDQN-RP | DP-DQN () | DP-DQN () |
| Active Networks | 1 | 1 | 20 | 1 | 1 |
| Total Networks (incl. Prior/Target) | 2 | 2 | 60 | 2 | 2 |
| Trainable Parameters () | 8,102 | 8,142 | 162,040 | 8,102 | 8,102 |
| Total Stored Parameters | 16,204 | 16,284 | 486,120 | 16,204 | 16,204 |
| Optimizer Instances (sets of ) | 1 | 1 | 20 | 1 | 1 |
| Intra-Episode Backprop Steps | 10 | 10 | 200 | 0 | 0 |
| Training FLOPs / Episode | 1,280 · | 1,300 · | 25,600 · | 2,880 · | 1,152 · |
| Pure Action Inference Latency | 25.8 s | 69.7 s | 107.0 s | 28.8 s | 28.6 s |
| End-to-End Latency (ms/step) | 0.381 | 0.651 | 1.049 | 0.429 | 0.204 |
| Throughput (steps / second) | 2,625 | 1,536 | 953 | 2,331 | 4,902 |
| Episodes to 100% Convergence | Never | Never | 5,210 604 | 602 104 | 645 112 |
| Total Compute to Solve (Wallclock) | 103.26 s | 5.16 s | 2.63 s |
Table 4. Empirical computational complexity, parameter volume, and runtime profiling on DeepSea-20 across algorithms on a standardized single CPU core.
Generality Across Diverse Decision Tasks. To evaluate whether the exploratory advantages of DP-BNNs generalize beyond DeepSea, we benchmarked the framework across diverse decision-making tasks (Table 1 and Appendix § 13). Across deceptive sequential corridors (N-Chain; [53]), environmental stochasticity and reward traps (RiverSwim-6; [52]), continuous control under gravity constraints (MountainCar-v0; [54]), and deep contextual bandits (Wheel Bandit; [47]; Figure 6), DP-BNN posteriors consistently sustain directed exploration, matching or exceeding competitive multi-network baselines while operating with a single network. Complete experimental protocols and tabular comparisons are detailed in Appendix § 13.

Figure 6. Deep Bayesian Bandit Showdown on the Wheel Bandit (, arms) across 1,500 environment steps (evaluated over 5 independent random seeds). (a) Wheel Bandit Geometry and Exploration Trap: Contexts are sampled uniformly from the unit disk. The safe interior (, grey) accounts for 81% of all contexts, where base arm 0 yields while arms 1..4 yield . The high-payoff optimal arms () reside exclusively on the rare outer rim (, 19% total probability, per quadrant). (b) Mean Cumulative Regret with Standard Error Bands: DP-BNN rapidly discovers the outer quadrants and sustains high optimal action selection, achieving the lowest cumulative regret (2,803.3 189.6) and outperforming Bootstrapped NN + Priors (4,309.4 829.2) and -greedy (6,894.6 1,514.6). (c) Final Regret and Network Footprint: DP-BNN operates with a single neural network (1 memory footprint), whereas Bootstrapped NN + Priors requires 20 total networks (20 memory) and Deep Ensembles requires 5 networks (5 memory).
Conclusions and Future Work
We introduced Dirichlet Process Bayesian Neural Networks (DP-BNNs), which quantify epistemic uncertainty by placing a nonparametric prior on the data-generating distribution rather than on network weights. We illustrated the application of DP-BNNs to deep reinforcement learning by developing DP-DQN for randomized value functions. By drawing an action-value hypothesis for each episode rollout, DP-DQN realizes temporally consistent Thompson sampling with a single neural network, resolving hard exploration challenges while avoiding the memory and computational overhead of multi-network ensembles.
Several promising research directions emerge from this paradigm. On the theoretical side, establishing formal finite-sample regret bounds for DP-DQN that explicitly capture the dependence on the DP prior hyperparameters—namely the concentration parameter , the base measure , and the truncation level —presents a vital avenue of inquiry to rigorously characterize how prior mass and truncation accuracy govern exploration efficiency and asymptotic convergence ([39]). More broadly, designing structured base measures to incorporate domain-specific inductive biases presents an exciting future direction ([28, 33]), which is notoriously difficult to achieve in weight-space Bayesian neural networks ([60]). Finally, extending DP-BNN posteriors to continuous actor-critic architectures holds strong practical promise to eliminate the multi-critic ensembles commonly required to mitigate value overestimation or estimate uncertainty ([24]), enabling principled, sample-efficient continuous control with a single neural network.
Acknowledgments
The author is grateful to the Action Editor and the anonymous reviewers for their insightful and constructive reviews, which significantly improved the paper. The author warmly thanks Dr. Igor Prünster, Dr. Pierre Alquier, and Dr. Odalric-Ambrym Maillard for encouraging comments.
Reproducibility Statement
The source code, environment wrappers, configuration files, reproduction scripts, and pedagogical Python notebooks are available at https://github.com/sumilations/Dirichlet-Process-Bayesian-Neural-networks. Experimental hyperparameters, architectures, and evaluation protocols are detailed in Appendix § 13 (Table 2), while mathematical derivations and algorithmic analyses are provided in Appendices § 9–§ 12.
Supplementary Material: Technical Appendix
Bayesian Neural Networks via Dirichlet Process Priors on the Data-Generating Distribution for Randomized Value Functions in Deep Reinforcement Learning
Organization of the Appendix. The supplementary appendix is organized as follows:
Appendix A: Truncated stick-breaking representation, truncation bounds, the 99.9% residual mass rule, and galaxy velocity density estimation.
Appendix B: Base measure topological support conditions, 2D annular manifold benchmark formulation, and closed-form BALD derivations.
Appendix C: Dynamic stochastic mini-batch warmstart mechanics, prevention of prior attenuation, and Bellman credit propagation depth.
Appendix D: Stochastic optimism and deep exploration analysis, contrasting DP-BNNs against randomized prior ensembles (BootDQN-RP) and neural-linear approximations (BDQN), with empirical base measure ablations.
Appendix E: Consolidated empirical benchmark suite (Table 1) and hyperparameter protocols (Table 2) covering DeepSea, RiverSwim-6, -Chain, and Wheel Bandit.
Appendix F: Continuous state-space RL exploration on MountainCar-v0 with a model-free Brownian diffusive base measure.
Appendix G: Computational and memory complexity comparison across value-based deep RL paradigms (Table 3).
| Complexity Dimension | Vanilla DQN | Parametric BDQN | BootDQN-RP ( networks) | DP-DQN (Ours) |
| Active Neural Networks | 1 | 1 | 1 | |
| Total Stored Parameters | ||||
| Parameter Memory Asymptotics | ||||
| Optimizer State Buffers (Adam) | ||||
| Action Selection Latency / Step | ||||
| Training FLOPs / Episode | ||||
| Posterior Sampling Overhead / Episode | None | None | scalars | |
| Temporal Consistency Mechanism | None (dithering) | Final-layer sampling | Episode head freezing | Episode network freezing |
| Sample Complexity in Horizon |
Table 3. Computational and memory complexity comparison across value-based deep RL paradigms for an action-value network with parameters, episode horizon , replay batch size , ensemble size , and prior truncation level .
Truncated Stick-Breaking Representation and Hyperparameter Selection
The finite stick-breaking representation of DP priors (Equations (5)–(6)) and the posterior random measure construction (Vashishtha & Maillard, [58]) provide an exact, constructive generative mechanism for sampling random probability measures (Sethuraman, [51]; Ishwaran & James, [26]). Rather than relying on heuristic or arbitrary cutoff levels, we determine the stick-breaking truncation level (the number of prior pseudo-observations) for the prior measure using a principled 99.9% expected residual probability mass rule.
Under Sethuraman’s stick-breaking construction, prior probability weights are generated via with . When the series is truncated at atoms, the residual probability mass unallocated to the truncated support is . Since , mutual independence of yields the exact closed-form expected residual mass:
To ensure that the finite truncation captures at least 99.9% of the total prior probability mass (), we require:
Equation (20) provides an explicit, quantitative guideline for configuring across our benchmark suite:
Reinforcement Learning Tasks (). In DeepSea and -Chain, evaluating Equation (20) gives . Hence, any truncation level guarantees prior mass retention. In our standard implementation, setting captures over 99.9999% of the prior mass (), completely eliminating truncation distortion while incurring negligible computational overhead.
Unit Concentration Baseline (). Under standard uninformative Dirichlet priors (), Equation (20) yields , showing that just 10 atoms suffice to capture 99.9% of the prior mass.
Dispersed Regression Benchmark (). In the 2D annular manifold benchmark (Appendix § 10.§ 2), where high concentration is deliberately selected to produce dispersed functional hypotheses in the cavity void, Equation (20) yields . Setting captures over 99.1% of the total prior mass ().
Empirical Density Estimation on the Galaxy Velocity Dataset. To validate our stick-breaking posterior sampler empirically, we evaluate density estimation on the canonical galaxy velocity benchmark ([48]). The measurements are velocities at which galaxies in the Corona-Borealis region move away from our galaxy. When galaxies are clustered, the velocity density is multimodal, as evidenced in the empirical CDF in Figure 3 where mass concentrates in distinct interior modes. Starting with a prior, the spread of distributions sampled from the DP posterior provides a well-calibrated confidence band of the density estimated through the DP.

Figure 3. DP prior and posterior density estimates on the galaxy velocity dataset.
Prior Base Measure Design and Epistemic Uncertainty Formulation
In this section, we formalize the topological support conditions required for the DP prior base measure and detail its concrete realization for epistemic uncertainty quantification in spatial regression.
Base Measure Support Condition
In the initial exploration phase of learning, whether in supervised regression or reinforcement learning, observations are sparse or absent across entire regions of the input space. Value predictions and exploratory hypotheses are therefore driven almost entirely by the synthetic pseudo-observations generated through the DP prior base measure . Because early exploratory actions have delayed, irreversible consequences in deep MDPs, the structure and domain support of are critical.
A natural and general formulation is to specify a factorized product base measure over transition tuples :
The specification of state, action, and terminal components , , and must strictly respect the physical domain and support of the underlying Markov Decision Process (with for non-terminal continuing transitions). This requirement is mathematically dictated by the topological support properties of DPs:
Lemma 1 (Support of Dirichlet Processes ([22]). In the weak topology, the topological support of the DP is the set of all probability measures whose supports are contained within the support of the base measure:
Lemma 1 establishes that the DP posterior can place non-zero probability mass in an exploratory region if and only if that region is contained within the support of the base measure . In practice, the factorized components are configured as follows:
Action Space Prior (). For discrete action spaces with actions, is chosen as a uniform categorical distribution over . For continuous action spaces, is selected to span the admissible action bounds (e.g., ).
State Space and Transition Priors (). Chosen to encapsulate the admissible state space (e.g., uniform over coordinate bounds or standardized feature bounding boxes).
Reward Prior (). Crucially, unlike supervised regression where observations are static, in reinforcement learning data collection is actively dictated by the agent’s policy: a pessimistic reward prior discourages exploration, preventing the agent from ever gathering experience in unvisited states. Therefore, is designed not to replicate environment step penalties (which are learned exclusively through the empirical replay stream ), but to induce stochastic optimism ([39]): either via the uniform prior on non-negative returns, or via zero-mean Gaussians where extreme-value order statistics across prior atoms () naturally stimulate directed exploration without requiring knowledge of or goal locations (Appendix § 12).
We now demonstrate how these foundational principles—the 99.9% mass truncation rule and the topological support condition—are concretely instantiated in static spatial regression. Appendix § 10.§ 2 details the geometry, factorized base measure design, and information-theoretic BALD epistemic uncertainty derivations for the 2D annular benchmark introduced in § 4.
Prior Base Measure and BALD Metric for the 2D Regression Benchmark
In this section, we provide the full mathematical formulation, prior base measure design, and hyperparameter specifications for the 2D epistemic uncertainty benchmark presented in § 4 and Figure 1.
Annular Manifold Geometry. Training data points () are sampled uniformly on an annulus with 2D spatial coordinates and radial distance . The scalar targets are generated via with additive Gaussian observation noise where . The central circular region is completely void of training data (Figure 1A). A well-calibrated epistemic uncertainty estimator must detect this out-of-distribution cavity by predicting high uncertainty in the void and low uncertainty on the data support .
Bayesian Active Learning by Disagreement (BALD). Epistemic uncertainty is quantified information-theoretically using BALD ([25]), which measures the mutual information between the model output and the model parameters conditioned on the dataset :
Intuitively, BALD isolates the information that learning the true model parameters would provide about the prediction at test input , cleanly separating epistemic uncertainty from inherent aleatoric observation noise . Under a Gaussian predictive distribution , the total predictive entropy across an ensemble of posterior models is given by:
where is the ensemble variance, with mean prediction . The expected observation noise entropy is:
Subtracting the two terms yields the closed-form expression for BALD in nats:
This metric evaluates strictly to zero when all posterior models agree (), and scales logarithmically as posterior disagreement increases.
Architecture and Training Hyperparameters. All evaluated neural network models share an identical multi-layer perceptron architecture comprising 3 hidden layers with 64 units per layer and ReLU activations, without Layer Normalization, mapping . Training is conducted using the Adam optimizer with a learning rate of and batch size of 64 for 200 epochs across all models. For DP-BNN, posterior measure draws are drawn with independent posterior samples.
Base Measure Construction and Prior Rationale. In accordance with Lemma 1, the support of the DP prior must encapsulate the entire domain of interest to allow posterior mass in regions lacking empirical data. We specify a factorized product base measure consisting of: (i) a continuous spatial input prior , ensuring uniform prior coverage across both the observed annulus and the unobserved cavity void, and (ii) a zero-mean Gaussian target prior with dispersed target variance (). We truncate the prior component at synthetic pseudo-observations with concentration parameter . Because the prior atoms sample diverse target values in the void with non-trivial Dirichlet weights, each posterior measure draw pulls the network towards a distinct hypothesis in the void, naturally producing the sharp epistemic bubble observed in Figure 1.
Dynamic Stochastic Mini-Batch Warmstart and Algorithmic Dynamics
In this section, we provide a comprehensive analysis of the stochastic mini-batch warmstart mechanism introduced in § 5 and Algorithm 2, detailing why conditioning directly on the full replay buffer fails in reinforcement learning and how dynamic stick-breaking updates resolve this fundamental challenge.
Pathologies of Full-Buffer Conditioning and Static Freezing
In classical Bayesian nonparametric regression, one is given a static dataset and conditions the DP prior directly on all observations, yielding the posterior:
where is the empirical distribution of observations. In reinforcement learning, however, the replay buffer fundamentally violates the statistical assumptions of supervised learning:
Data Redundancy and Non-Uniformity. Early RL rollouts are overwhelmingly dominated by repetitive transitions in absorbing, suboptimal regions of the state space (e.g., falling into bottom-left corners in DeepSea or cycling through uninformative states). The replay buffer rapidly accumulates tens of thousands of near-identical transitions ().
Prior Swamping and Epistemic Starvation. In standard full-buffer DP conditioning, the relative weight assigned to the prior base measure scales as:
While asymptotic concentration () is desirable in stationary supervised learning, in exploration-sensitive RL it causes epistemic starvation: the prior base measure , which is specifically designed to inject optimism into unexplored states, is overwhelmed by the sheer volume of redundant failure data. As a consequence, the agent ceases to explore and prematurely collapses into pessimistic, greedy exploitation of suboptimal trajectories.
Computational and Memory Bottlenecks. Constructing truncated stick-breaking weights and performing backpropagation through a deep neural network over samples at every single episode imposes an intolerable computational and memory burden.
Conversely, sampling a single mini-batch of size and freezing it across all gradient steps creates severe empirical overfitting: the value function optimizes exclusively against an isolated empirical slice, ignoring the rest of the buffer and failing to propagate Bellman credit across multi-step trajectory chains.
Resolution via Dynamic Stochastic Mini-Batch Warmstart
Algorithm 2 overcomes the twin pathologies of computational overhead and prior swamping by performing stochastic optimization over dynamic, freshly sampled stick-breaking measures at episode boundaries.
Under the DP posterior, each sampled random measure decomposes into an empirical component over observed replay transitions and a prior component drawn from . Rather than performing computationally prohibitive full-buffer optimization (), the warmstart steps use mini-batch stochastic gradient descent to approximate the empirical component, while modulating prior salience online via Bellman temporal-difference surprise:
Episodic Prior Generation. At the beginning of episode , the agent samples synthetic prior transitions and computes prior stick weights with for . Because the warmstart phase is an iterative procedure approximating a single posterior draw, sampling the prior pseudo-atoms and stick weights once per episode instantiates a coherent, frozen Thompson sampling value hypothesis for the upcoming rollout.
Information Calibration via Bellman TD Surprise. In sparse-reward exploration, unguided initial rollouts inevitably accumulate thousands of redundant, unrewarded transitions. Standard Bayesian updating scaling with the raw buffer size () would cause the prior weight to collapse prematurely (). From an information-theoretic standpoint, however, repeating predictable failure trajectories yields zero novel information about the environment. To prevent prior swamping, DP-DQN tracks an effective statistical sample count calibrated online by the Bellman TD surprise:
and denotes the running standard deviation of Bellman errors. Transitions with near-zero Bellman error () represent well-modeled dynamics that contribute negligible information, incrementing by . Only when the agent encounters statistically novel transitions () does increment toward 1.0.
Composite Stochastic Warmstart Updates. Across warmstart steps, the online network is optimized against the episodic hypothesis using dynamic empirical mini-batches. At each step , a fresh empirical mini-batch is sampled uniformly at random from the replay buffer. The total prior probability mass assigned to the synthetic base transitions is sampled as:
yielding expected prior weight . The remaining empirical probability mass is partitioned across the mini-batch transitions via the multi-step stick-breaking recursion (Eq. (8)):
with , forming the discrete composite stick-breaking measure:
Minimizing the composite DP-Bellman loss (Eq. (17)) via stochastic gradient descent updates online parameters , while is calibrated online via Eq. (29).
Rollout with Frozen Policy. Upon completing the warmstart phase, the policy parameters are frozen for the rollout (), and the agent acts greedily across the entire rollout . Freezing the parameters enforces multi-step temporal consistency across the trajectory.
Theoretical Guarantees of the Warmstart Scheme. This dynamic procedure provides four critical theoretical properties:
Preservation of Coherent Episodic Hypotheses: Generating prior pseudo-atoms and prior stick weights once before the warmstart ensures the network fits a single, coherent value hypothesis throughout all optimization steps, preventing intra-episode prior drift.
Anti-Swamping and Persistent Stochastic Optimism: Because , during unrewarded exploration rollouts where remains small, the expected prior salience remains permanently non-vanishing. The agent sustains consistent epistemic exploration drive regardless of the total replay buffer capacity .
Unbiased Full-Buffer Integration via Monte Carlo SGD: Because mini-batches are sampled uniformly from , the expected empirical gradient is an unbiased Monte Carlo estimate over the full replay history . The sequence of gradient updates propagates Bellman credit backward across the entire trajectory length without overfitting to any single static slice.
Direct Closed-Form Stick-Breaking vs. MCMC: Unlike Markov Chain Monte Carlo (MCMC) methods that require iterative Markov chain transitions, burn-in periods, and acceptance-rejection evaluations, stick-breaking generates exact, independent random measures in closed form with negligible scalar computation .
Bellman Error Propagation Depth and Choice of Warmstart Budget
In episodic reinforcement learning over horizon , temporal difference methods update value estimates via Bellman targets . Consequently, a single gradient step on a mini-batch propagates reward credit backward along an empirical trajectory chain by at most one temporal transition. In standard online Q-learning (such as Bootstrapped DQN, Osband et al. [42]), updates are executed every two environment steps, performing backpropagation updates distributed throughout the rollout. To ensure strict algorithmic fairness and computational parity, DP-DQN amortizes these updates into warmstart gradient steps at the episode boundary. Crucially, choosing provides the exact gradient depth necessary for Bellman error signals to propagate backward across the full trajectory length , while freezing during the subsequent rollout guarantees complete multi-step temporal consistency—the foundational requirement of pure Thompson sampling.
Stochastic Optimism and Deep Exploration: DP-BNN vs. Ensembles vs. BDQN
A foundational question in Bayesian reinforcement learning is whether exploration requires explicit, deterministic optimism (such as heuristic upper confidence bounds or engineered reward bonuses) or whether it arises naturally from posterior sampling ([40, 39]). In this section, we formalize the theory of stochastic optimism, contrast the exploratory mechanisms of randomized prior ensembles (BootDQN-RP) and neural-linear Bayesian Deep Q-Networks (BDQN) against DP-BNNs, and provide empirical ablations across prior base measure geometries.
The Principle of Stochastic Optimism in Deep Exploration
To make the distinction between exploration paradigms mathematically precise, we define both deterministic and stochastic optimism:
Definition 1 (Deterministic Optimism ([9, 4]). A value-function estimator satisfies deterministic optimism if, for every state-action pair , the estimate dominates the optimal action-value function:
Deterministic optimism is commonly realized by adding an explicit upper-confidence bound (e.g., UCRL2) or initializing unvisited values to the theoretical maximum (e.g., R-MAX).
While deterministic optimism guarantees polynomial regret in small, tabular MDPs, it enforces an exhaustive exploration pattern: the agent is required to visit every suboptimal branch until its upper confidence bound drops below the true value of optimal trajectories, leading to severe sample inefficiencies in deep horizons ([39]). Randomized posterior sampling resolves this bottleneck via stochastic optimism:
Definition 2 (Stochastic Optimism in Posterior Sampling ([40, 39, 44]). Let denote the posterior distribution over action-value functions conditioned on the empirical replay history . The posterior distribution satisfies stochastic optimism with parameter if, for any unvisited state , a sampled value function dominates the optimal value function with strictly positive probability:
Unlike local dithering (-greedy), an action-value function sampled from a functional posterior is temporally consistent across the entire episode horizon . When a sample satisfies along an unexplored path, the agent commits to following that path for the full duration of the rollout. Furthermore, under the DP posterior mixture, the weight allocated to the prior base measure contracts as . Consequently, unexplored transitions maintain high prior variance (sustaining stochastic optimism), while frequently visited transitions collapse to their true empirical targets.
Practical Construction: Knowledge of Suffices for Stochastic Optimism. In standard reinforcement learning theory ([9, 52, 40]), the maximum achievable reward (or the reward support ) is universally assumed to be known or normalized. Crucially, to construct a stochastically optimistic base measure that solves deep exploration across horizons evaluated up to , the practitioner requires no knowledge of transition graphs, optimal trajectories, scrambled action mappings, or goal locations: knowledge of the scalar bound alone is completely sufficient. The standard uninformative prior over bounded rewards in is simply the uniform distribution . This guarantees that unexplored state-action pairs maintain prior variance with positive expectation , naturally satisfying stochastic optimism () ([1, 2]) without requiring hand-engineered intrinsic bonuses, count-based density estimators, or environment-specific heuristics.
Attaining Stochastic Optimism with Zero-Mean Normal Priors via Order Statistics
Remarkably, even when the base measure possesses an entirely zero-mean symmetric distribution like the Standard Normal (), stochastic optimism can be naturally realized through extreme value order statistics in multi-sample posterior evaluation. If an agent evaluates candidate functional samples , the expected maximum among these samples—the top order statistic —is strictly positive and scales as . Through Monte Carlo simulation ( trials), we observe the exact upward shift in effective prior optimism:
As shown in the table, drawing candidate functional evaluations in Multi-Sample DP-DQN automatically shifts the effective exploration frontier upward by . Consequently, multi-sample posterior sampling inherently converts symmetric, zero-mean functional variance into effective stochastic optimism without requiring manual reward inflation or multiple physical ensemble networks.
To empirically validate this principle on a deep exploration task, we benchmarked this order-statistic base measure directly on DeepSea-20 across random seeds using a standardized single MLP-20. Under a plain zero-mean Standard Normal prior (, ), the agent collapses into boundary failure, achieving a 0% solve rate (never discovering the terminal goal). In sharp contrast, simply setting (evaluating the top order statistic from ) achieves a 100% solve rate across all seeds (612.0153.2 episodes, first discovered at Episode 552.0154.5). This demonstrates that even when individual prior draws are strictly zero-mean Gaussians, order-statistic multi-sampling naturally generates the requisite stochastic optimism to overcome continuous step costs and solve DeepSea-20 without modifying the single-network architecture.
Comparative Exploration Mechanisms: Ensembles vs. BDQN vs. DP-BNN
How Bootstrapped DQN with Randomized Priors Accomplishes Stochastic Optimism. Bootstrapped DQN with Randomized Prior Functions (BootDQN-RP) (Osband et al., [42]) achieves stochastic optimism by decomposing each ensemble head additively:
where is a trainable neural network, is a fixed, non-trainable randomized prior network with parameters , and scales prior influence. On unvisited states where , predictions are dominated by . Across heads, extreme value properties of independent Gaussians guarantee , ensuring at least one head is optimistic. On visited states, empirical loss drives , canceling the prior on data support. However, BootDQN-RP requires maintaining physical neural networks and target networks ( compute and memory), and small discrete ensembles can suffer from bootstrap head collapse on deceptive tasks if all heads prematurely sample suboptimal paths.
Why Neural-Linear Bayesian Deep Q-Networks (BDQN) Fail. While parameter-space Bayesian neural networks—such as Mean-Field Variational Inference (Blundell et al., [8]), Laplace approximations (MacKay, [34]), and MC-Dropout (Gal & Ghahramani, [20]; Riquelme et al., [47])—broadly struggle in deep Q-learning due to well-documented variance collapse in unobserved regions (Foong et al., [17]) and non-stationary Bellman targets, the canonical single-network architecture for Thompson sampling is the neural-linear Bayesian Deep Q-Network (BDQN) (Azizzadenesheli et al., [5]). BDQN splits the action-value function into a deterministic feature extractor followed by Bayesian linear regression over final-layer weights with precision . Action values are sampled via .
Despite its lightweight design, BDQN suffers from linear regret on deep exploration tasks (incurring 9,959 5 regret on DeepSea-20, identical to vanilla DQN; Figure 2a). This limitation stems from three structural factors:
1. Deep Feature Collapse on Unvisited States. Because Bayesian uncertainty is confined strictly to the linear readout layer, the feature backbone is trained deterministically on sparse, unrewarded failure data. It maps unexplored states to degenerate representations , causing predictive variance to extinguish across the unvisited frontier regardless of the final-layer prior.
2. Non-Stationary Covariates Corrupt Posterior Updates. Exact Bayesian regression requires stationary inputs. In BDQN, changes with every gradient step, meaning the precision matrix accumulates stale outer products evaluated under obsolete parameter snapshots , invalidating posterior calibration.
3. Subspace Projection and Epistemic Shrinkage. Redundant rollouts in absorbing early states inflate eigenvalue mass along dominant feature directions. Because deep layers share weights, unexplored states project onto these empirical directions, causing to aggressively shrink predictive variance and pulling sampled values toward pessimistic empirical means . This violates stochastic optimism and halts exploration.
How DP-BNNs Overcome BDQN and Ensemble Methods. DP-BNNs overcome the structural limitations of neural-linear BDQN by placing the DP prior directly on the data-generating distribution in experience space , rather than on a linear final layer or parametric weights. The entire deep neural network is optimized end-to-end against the nonparametrically sampled measure . Prior pseudo-transitions provide global, non-linear function-space exploration across the full depth of the network, preventing feature collapse. By freezing the sampled value hypothesis for each rollout, DP-DQN guarantees multi-step temporal consistency across the entire trajectory with a single unified neural network, achieving the deep exploration of an ensemble at the lightweight computational cost of standard DQN.
Empirical Investigation Across Prior Base Measures
To empirically verify this principle and confirm that DP-DQN does not rely on hand-engineered optimistic goal priors, we conducted a systematic ablation across three distinct reward base measure distributions on both canonical RiverSwim-6 () and DeepSea-10 () using identical single MLP-20 architectures:
Uniform Prior (). Draws reward atoms uniformly across the support for all state-action pairs without encoding any target location coordinates (prior mean ).
Zero-Mean Standard Normal Prior (). Uninformative prior with zero expected return everywhere (), providing zero target bias or privileged goal information.
Pessimistic Prior (). Assumes all unexplored transitions yield negative reward on average (), testing the behavior under severe risk aversion.
As illustrated in Figure 4(a), on canonical RiverSwim-6, both the zero-mean standard normal prior () and the uniform prior () achieve a 100% solve rate, reaching the upstream jackpot in and episodes respectively, and accumulating over 450 cumulative return. Crucially, neither prior contains any inductive bias favoring the rightward jackpot. Exploration succeeds because prior variance () generates stochastically optimistic value samples that propagate backward along the chain via Bellman updates. Conversely, under an explicitly pessimistic prior (), the agent believes unexplored upstream transitions yield negative rewards (). Because the local downstream trap yields , the agent evaluates the known downstream trap as strictly superior to the unexplored river, becoming permanently trapped in 80% of seeds.

Figure 4. Stochastic optimism across base measures (MLP-20 with LayerNorm). (a) Cumulative return on RiverSwim-6: uniform and standard normal solve the task across 100% of seeds, while a pessimistic prior traps 80% of runs. (b) Cumulative regret on DeepSea-10: optimistic and zero-mean priors discover the goal without privileged target coordinates, whereas a pessimistic prior causes boundary collapse and linear regret.
Figure 4(b) illustrates the critical distinction between zero-mean perturbations and principled stochastic optimism on DeepSea. In DeepSea, traversing the optimal diagonal incurs an immediate per-step penalty of at every step. On small horizons (), zero-mean standard normal priors can occasionally discover the terminal goal (Episode 276). However, as the horizon scales to , zero-mean random fluctuations cannot sustain 20 to 50 consecutive coordinated steps against the continuous step drag, collapsing into boundary failure.
In sharp contrast, the uniform prior provides the strictly necessary stochastic optimism: because its expected reward is , unexplored transitions maintain sufficient positive value to decisively overcome the local step penalty, enabling DP-DQN to scale seamlessly from all the way to . Conversely, under an explicitly pessimistic prior (), the agent fears the step penalty, immediately cascades to the left boundary, and suffers linear regret across all episodes.
Comprehensive Empirical Benchmark Suite and Implementation Details
To evaluate the generality, scalability, and robustness of DP-BNNs across diverse decision-making tasks, we benchmark DP-DQN against competitive baselines across diverse testbeds: deceptive exploration in -Chain, deep exploration in canonical RiverSwim-6, and contextual bandit exploration on the Wheel Bandit benchmark [47] (with the large-scale DeepSea scaling suite presented in the main text, § 5 and Figure 2). A consolidated summary is presented in Table 1.
Table 1: Consolidated empirical evaluation across diverse decision-making and exploration benchmarks (mean standard error across seeds). All DP-BNN results are obtained using a single neural network (single MLP-20 with LayerNorm for DeepSea-20, RiverSwim-6, and Deceptive -Chain; 2-layer MLP with LayerNorm for DeepSea-50 and MountainCar-v0; 3-layer MLP-64 for contextual bandits).
| Candidate Samples () | |||||||
| Simulated | |||||||
| Empirical Std. Dev. | |||||||
| Theoretical |
Table 1.
| Benchmark | Metric | Vanilla / Baseline | BootDQN-RP / PSRL | DP-BNN (Ours) |
| DeepSea | Episodes to Solve | (DQN) | 5,210 604 | 602 104 |
| DeepSea ( MLP) | Episodes to Solve | (DQN) | 1,925 184 | |
| RiverSwim-6 ( Prior) | Episodes to Solve | 44.0 15.2 (DQN) | 7.0 1.4 (PSRL) | 27.4 8.1 |
| Deceptive -Chain () | Cum. Regret | 1,420.5 112.0 (DQN) | 681.4 92.6 | 153.2 18.4 |
| Wheel Bandit () | 1.5k-Step Regret | 6,894.6 1,514.6 (-Gr.) | 4,309.4 829.2 | 2,803.3 189.6 |
| MountainCar-v0 (Continuous) | Episodes to Solve | 85 12 (DQN) | 15 3 (BootDQN) | 16.8 7.4 |
Table 1 (PDF p. 25).
DeepSea Scaling Protocol ( Exploration DAG). The empirical scaling and sample complexity results for DeepSea ( to ) are presented in the main text (§ 5, Figure 2) and illustrated in Figure 5a. Formally, DeepSea is defined as a directed acyclic graph (DAG) MDP with state space representing vertical depth and horizontal position , with initial state and episode length . At each time step , the agent chooses between two discrete actions . Under the standard bsuite protocol (Osband et al., [43]), an unknown row-specific action mapping hides the true rightward direction behind an independent random permutation per row, preventing heuristic action bias. Stepping rightward advances the agent to and incurs a minor deterministic step penalty of ; stepping leftward transitions to with zero penalty. The environment provides a single positive terminal reward located exclusively at the bottom-right corner , which can only be reached if the agent takes the designated rightward action at every single step along the trajectory. Any single leftward deviation irreversibly commits the agent to zero-reward terminal leaves. Consequently, a uniform random policy discovers the goal with probability exactly ( for , and for ), rendering myopic dithering methods (such as -greedy and standard DQN) asymptotically incapable of exploration ( sample complexity). A run is recorded as solved at the earliest episode where the rolling average return over 20 consecutive episodes exceeds 0.9 (matching optimal return ), after which cumulative regret flatlines. In contrast, DP-DQN’s non-parametric DP prior generates temporally correlated, optimistic value functions that drive directed exploration straight to the optimal terminal goal, solving DeepSea-20 in episodes and DeepSea-50 in episodes (Table 1).

Figure 5. Architectural schematics and Markov Decision Process (MDP) graphs for the canonical deep exploration benchmarks evaluated in Appendix § 13. (a) DeepSea ( DAG): An agent traverses from across stages. Taking the designated rightward action at every row reaches the jackpot goal at with reward (paying a step penalty ), whereas any leftward step permanently traps the agent in zero-reward branches. An unguided random policy discovers the goal with probability ( for ; for ), requiring temporally consistent value function posterior samples. (b) RiverSwim-6: A 6-state chain where swimming downstream () is deterministic and trapped by an immediate sub-optimal reward at , while swimming upstream () fights against a strong current (, , ) to reach the distal goal at (). (c) Deceptive -Chain: A sequential corridor where choosing at yields an immediate lure reward () that prematurely terminates the rollout. Only persistent, multi-step posterior exploration traverses the silent zero-reward corridor () to unlock the terminal jackpot ().
Deep Exploration on Canonical RiverSwim-6 (Uninformative Prior)
The RiverSwim environment (Strehl & Littman, [52]; Osband et al., [40]) tests an agent’s ability to overcome an immediate sub-optimal reward trap in the presence of strong environmental stochasticity (Figure 5b). The MDP consists of linearly arranged states , starting at the downstream state with horizon . The agent has two actions , where corresponds to swimming downstream (with @references♀♀♀♀ сияс the current) and corresponds to swimming upstream (against the current). Downstream swimming is deterministic: taking at state transitions to with probability 1.0, while taking at stays at and yields an immediate deterministic reward . In contrast, swimming upstream against the current is highly stochastic: from any intermediate state , taking successfully advances to with probability 0.6, remains at with probability 0.3, and slips downstream to with probability 0.1. At , transitions to with probability 0.6 and remains at with probability 0.4. At the upstream terminal state , swimming right succeeds with probability 0.6 and yields the maximal terminal reward (falling back to with probability 0.4). The minor reward at acts as an exploration trap: because is immediately accessible, standard -greedy exploration quickly reinforces the myopic policy of idling at and fails to reach . For DP-DQN, the factorized base measure samples discrete states uniformly over the chain , actions , prior rewards from an uninformative standard normal distribution everywhere (providing zero target bias or privileged goal information), and continuing terminal flag . Driven purely by functional posterior variance via stick-breaking draws, single-network DP-DQN (single MLP-20 with LayerNorm) solves RiverSwim-6 across 100% of random seeds in only episodes, achieving a cumulative return of (Table 1).
Deceptive Exploration on -Chain. In the deceptive -Chain benchmark (, episode length ; Figure 5c), an agent must traverse a sequential corridor from start state . At state , choosing action yields an immediate minor lure reward () but prematurely terminates the episode (or resets to ). Choosing action advances to state with zero intermediate reward (). At intermediate states , choosing advances to (), while choosing slips backward to (). Only upon successfully traversing all intermediate states to reach does choosing yield the maximal terminal reward (). Standard exploration algorithms suffer severe deception because the immediate reward at reinforces the greedy policy of exiting immediately. Furthermore, ensemble methods such as Bootstrapped DQN with randomized priors (Osband et al., [42]) can suffer from bootstrap head collapse when all ensemble heads prematurely fixate on the sub-optimal left branch. In contrast, DP-DQN equips the single network with an exploratory DP base measure on transitions: states are sampled uniformly , actions , and next states for (and for ), with prior rewards for and for . This maintains global functional support across value functions and discovers the optimal rightward policy on Episode 1 across all seeds (100% discovery rate), reducing cumulative regret by 77.5% relative to BootDQN-RP (153.2 ± 18.4 vs. 681.4 ± 92.6; Table 1).
Deep Contextual Bandits on Wheel Bandit (): Geometry and Exploration Trap. We benchmarked DP-BNN on the canonical exploration challenge of the Deep Bayesian Bandit suite (Riquelme et al., [47]): the Wheel Bandit (, , exploration parameter ; Figure 6a). In this benchmark, context vectors are sampled uniformly from the 2D unit disk . The environment provides a safe base arm () that yields a deterministic reward of across the entire domain. The remaining four arms correspond to the four geometric quadrants of the plane ( to ). If a context falls in the interior disk , arms 1..4 yield zero reward (). However, if the context falls in the outer rim and lies in quadrant , pulling arm yields a high-payoff reward of (while the other three arms yield 0.0).
The Wheel Bandit represents an extreme exploration bottleneck because the safe interior disk occupies of the total context probability measure, whereas the high-reward outer rim appears only of the time ( probability mass per optimal quadrant). Because 81% of early interactions occur in the interior where arms 1..4 yield zero return, standard exploration schemes (such as -greedy, Deep Ensembles, and Neural-Linear) quickly observe that arm 0 is superior to arms 1..4 in the bulk of the domain. Lacking principled functional uncertainty in rare regions, their predictive variance over arms 1..4 collapses; consequently, when a rare context on the boundary finally arrives, the agent fails to explore and greedily pulls arm 0 (), incurring catastrophic linear regret (Figure 6b).
To solve this task, DP-BNN specifies a factorized DP base measure where context vectors are sampled uniformly from the unit disk (, ), arm choices are uniform , and prior rewards follow an optimistic Gaussian distribution (Table 2). By pairing empirical replay reweighting with synthetic prior pseudo-observations across the full unit disk, DP-BNN sustains functional epistemic variance on the rare outer boundary without collapsing into the interior trap. As shown in Figure 6b, single-network DP-BNN achieves the lowest cumulative regret across all evaluated methods (2,803.3 189.6 over 1,500 steps across 5 seeds), substantially outperforming Bootstrapped NN with randomized priors (4,309.4 829.2), -greedy (6,894.6 1,514.6), Deep Ensembles (7,990.0 1,689.7), and Neural-Linear (9,592.3 866.2). Crucially, as shown in Figure 6c, DP-BNN achieves this performance using a single neural network (1 parameter memory), whereas Bootstrapped NN with randomized priors requires 20 total networks (10 active + 10 prior networks, 20 memory) and Deep Ensembles requires 5 networks (5 memory).
Absence of Warmstart Steps in Contextual Bandits (). Unlike sequential reinforcement learning where the warmstart budget is required to propagate delayed temporal-difference credit across multi-step trajectory chains and freeze policies for rollout consistency (Appendix § 11), contextual bandits possess horizon and discount factor . Because each interaction is an instantaneous single-step decision without state transitions ( does not exist), there are no recursive Bellman error chains to propagate. Following standard contextual bandit benchmarks ([47]), learning operates as supervised regression from context-action pairs to reward : the network updates periodically on the buffer plus prior atoms from , and Thompson sampling is performed per context , obviating episodic warmstart steps ( in Table 2).
Unified Hyperparameter Protocols Across All Benchmarks. Table 2 consolidates the complete structural and optimization hyperparameters across all empirical evaluations in this work, ensuring full algorithmic transparency and reproducibility.
Continuous State-Space RL Exploration on MountainCar-v0
While the benchmarks in Appendix § 13 evaluate tabular representations, discrete grids, and continuous contextual bandits, many physical control problems operate in continuous state spaces with non-linear dynamical constraints. To evaluate DP-DQN in continuous state-space exploration, we benchmark on the canonical MountainCar-v0 task [54].
Task Formulation and Exploration Challenge. MountainCar-v0 features a two-dimensional continuous state space representing horizontal car position and velocity , and a three-action discrete space corresponding to pushing left (), coasting (), and pushing right (). The agent is initialized at the bottom of a sinusoidal valley (, ) and must reach the hilltop goal flag () within horizon . The engine is underpowered: accelerating directly forward cannot overcome the gravitational force of the slope, requiring the agent to discover a coordinated swinging strategy that builds momentum by moving left before driving up the right hill. The reward is strictly negative at every step () with termination upon reaching the flag (). Under local dithering (-greedy), exploration is exceedingly slow because random actions cancel out momentum, trapping the car in the bottom of the valley.
Model-Free Brownian Diffusive Base Measure (Zero Dynamics Knowledge). To establish that DP-DQN does not rely on domain-specific differential equations or privileged physics knowledge, we specify a model-free diffusive base measure . States are sampled uniformly over domain support , actions , and prior rewards follow a uniform distribution with continuing flag . Next-state transitions are generated via continuous Brownian diffusion without physical equations of motion: , where with diffusion scales and , chosen according to the canonical bounding-box heuristic as – of each state coordinate’s domain span (2.2% of position span 1.80 and 5.0% of velocity span 0.14, matching the characteristic 1-step displacement scale). Driven purely by functional posterior variance via stick-breaking draws, single-network DP-DQN (2-layer MLP with LayerNorm) solves MountainCar-v0 across all random seeds in episodes (reaching the goal as early as Episode 4), outperforming vanilla DQN ( episodes) and matching 20-head Bootstrapped DQN ( episodes) while delivering a wall-clock training speedup ( s vs. s for 100 episodes) due to single-network parameter efficiency.
Computational and Memory Complexity Analysis
In this section, we analyze the asymptotic computational, memory, and scaling complexity of DP-DQN in comparison with multi-network ensemble architectures (Bootstrapped DQN with randomized priors; Osband et al. [42]), parametric Bayesian value-function methods (BDQN; Azizzadenesheli et al. [5]), and standard deep Q-learning (Mnih et al. [36]). A comparative summary of complexity orders is presented in Table 3.
Parameter Footprint and Memory Scaling. Let denote the parameter count of a single action-value neural network. Multi-network ensemble methods such as BootDQn-RP maintain an ensemble of distinct neural networks ( in standard DeepSea benchmarks). For each ensemble member
, the algorithm instantiates an active trainable network , a non-trainable randomized prior network , and a tracking target network , yielding stored parameters ( asymptotic scaling). In stark contrast, DP-DQN represents Bayesian epistemic uncertainty nonparametrically directly in experience space via the DP base measure . Consequently, DP-DQN operates on a single active neural network and a single target network , requiring only stored weights ( asymptotic scaling), achieving a strict -fold reduction in active trainable parameters and a -fold ( for ) reduction in total stored model footprint. Furthermore, first-order adaptive optimizers (e.g., Adam) maintain running first- and second-moment momentum accumulators for every trainable parameter, requiring auxiliary state buffers for DP-DQN versus buffers for BootDQN-RP, eliminating memory thrashing and cache overhead during training updates.
Training FLOPs Scaling and Sampling Overhead per Episode. Consider an episodic MDP with horizon . In standard online deep Q-learning and BootDQN-RP, stochastic gradient updates are executed every environment steps (typically ). For an ensemble of networks evaluated over empirical mini-batches of size , each network executes a backpropagation pass requiring floating-point operations (where for standard feedforward architectures). Over the entire episode of steps, the cumulative training compute scales as:
In contrast, DP-DQN freezes the active policy network during the rollout to maintain complete multi-step temporal consistency, completely bypassing intra-episode backpropagation. All network optimization is amortized into warmstart gradient updates at episode boundaries evaluated over composite mini-batches of size (empirical transitions plus synthetic prior atoms). In addition to network backpropagation, DP-DQN executes scalar operations to sample prior stick weights once per episode, and scalar operations to sample empirical weights at each warmstart step, totaling scalar operations per episode. Because (e.g., scalar stick-breaking operations versus cumulative training backpropagation FLOPs per episode on DeepSea-20), this stick-breaking sampling overhead is negligible relative to tensor arithmetic. The per-episode training FLOPs evaluate to:
Recalling that , the computational ratio of DP-DQN relative to standard vanilla DQN evaluates to:
Because the prior truncation level is moderate ( via the 99.9% mass rule) relative to typical batch sizes , this ratio represents only a modest 1.2× to 1.8× factor in per-episode backpropagation compute over standard DQN, in exchange for upgrading sample complexity from exponential to polynomial . The per-step execution latencies reported in Table 4 are measured by amortizing total episode wall-clock time over horizon .
Simultaneously, the computational ratio of DP-DQN relative to BootDQN-RP evaluates to:
In our canonical configurations (, , ), this ratio evaluates to , yielding an asymptotic reduction in per-episode backpropagation operations.
Action Inference Complexity per Step. At each environment step , the agent selects an exploratory action. For BootDQN-RP, evaluating the value function requires either querying all heads to compute posterior voting statistics or indexing the active head and adding the forward evaluation of its randomized prior network, requiring operations. In contrast, DP-DQN requires only a single forward pass through the frozen network : , scaling strictly as ( network latency).
Exploration Complexity: Posterior Sampling vs. Local Dithering. In MDPs requiring deep multi-step exploration over horizon , exploration efficiency is fundamentally governed by the temporal consistency of the agent’s policy. Local dithering schemes (such as -greedy in DQN or Gaussian action noise in continuous control) make independent exploratory perturbations at each step. In environments where optimal credit requires an extended sequence of coordinated actions (such as traversing steps along the diagonal in DeepSea), the probability that independent dithering selects the optimal path by chance decays exponentially as . Consequently, any local dithering heuristic incurs an exponential sample complexity lower bound:
In stark contrast, by freezing an action-value function sampled from a functional posterior satisfying stochastic optimism () ([1, 2, 40]), posterior sampling achieves provably polynomial sample complexity in tabular MDPs. DP-DQN preserves this polynomial deep-exploration capability nonparametrically with a single neural network, bypassing both the exponential sample wall of dithering heuristics and the -fold compute penalty of physical network ensembles.
References
- [1]Shipra Agrawal and Navin Goyal. Analysis of Thompson sampling for the multi-armed bandit problem. In Conference on Learning Theory (COLT), pp. 39–1. JMLR Workshop and Conference Proceedings, 2012.arxiv.org/abs/1111.1797
- [2]Shipra Agrawal and Randy Jia. Optimistic posterior sampling for reinforcement learning: worst-case regret bounds. In Advances in Neural Information Processing Systems (NeurIPS), volume 30, 2017.
- [3]Julyan Arbel, Konstantinos Pitas, Mariia Vladimirova, and Vincent Fortuin. A primer on Bayesian neural networks: Review and debates. arXiv preprint arXiv:2309.16314, 2023.arxiv.org/abs/2309.16314
- [4]Peter Auer, Thomas Jaksch, and Ronald Ortner. Near-optimal regret bounds for reinforcement learning. Advances in neural information processing systems, 21, 2008.
- [5]Kamyar Azizzadenesheli, Emma Brunskill, and Animashree Anandkumar. Efficient exploration through Bayesian deep Q-networks. In 2018 Information Theory and Applications Workshop (ITA), pp. 1–9. IEEE, 2018.arxiv.org/abs/1802.04412
- [6]Jimmy Lei Ba, Jamie Ryan Kiros, and Geoffrey E Hinton. Layer normalization. arXiv preprint arXiv:1607.06450, 2016.arxiv.org/abs/1607.06450
- [7]Marc G Bellemare, Will Dabney, and Rémi Munos. A distributional perspective on reinforcement learning. In International conference on machine learning, pp. 449–458. PMLR, 2017.arxiv.org/abs/1707.06887
- [8]Charles Blundell, Julien Cornebise, Koray Kavukcuoglu, and Daan Wierstra. Weight uncertainty in neural network. In International conference on machine learning, pp. 1613–1622. PMLR, 2015.
- [9]Ronen I Brafman and Moshe Tennenholtz. R-max-a general polynomial time algorithm for near-optimal reinforcement learning. Journal of Machine Learning Research, 3(Oct):213–231, 2002.
- [10]Ismaël Castillo. Bayesian Nonparametric Statistics: École d’Été de Probabilités de Saint-Flour LI–2023, volume 2358 of Lecture Notes in Mathematics. Springer, 2024.
- [11]Richard Dearden, Nir Friedman, and David Andre. Bayesian Q-learning. In AAAI/IAAI, pp. 761–768, 1998.
- [12]Audrey Durand, Odalric-Ambrym Maillard, and Joelle Pineau. Streaming kernel regression with provably adaptive mean, variance, and regularization. In International Conference on Artificial Intelligence and Statistics (AISTATS), pp. 1849–1857, 2018.arxiv.org/abs/1708.00768
- [13]Vikranth Dwaracherla, Kavosh Asadi, and Ian Osband. Hypermodels for exploration. In International Conference on Learning Representations, 2020.arxiv.org/abs/2006.07464
- [14]Bradley Efron and Robert J Tibshirani. An introduction to the bootstrap. Chapman and Hall/CRC, 1994.
- [15]Damien Ernst, Pierre Geurts, and Louis Wehenkel. Tree-based batch mode reinforcement learning. Journal of Machine Learning Research, 6(Apr):503–556, 2005.
- [16]Thomas S. Ferguson. A Bayesian analysis of some nonparametric problems. The Annals of Statistics, 1(2):209–230, 1973.DOI
- [17]Andrew YK Foong, Yingzhen Li, José Miguel Hernández-Lobato, and Richard E Turner. “In-between” uncertainty in Bayesian neural networks. In ICML Workshop on Uncertainty and Robustness in Deep Learning, 2019.arxiv.org/abs/1906.11537
- [18]Meire Fortunato, Mohammad Gheshlaghi Azar, Bilal Piot, Jacob Menick, Ian Osband, Alex Graves, Vlad Mnih, Alistair Muldal, Thomas Degris, Shane Legg, Charles Blundell, and Jan Leike. Noisy networks for exploration. In International Conference on Learning Representations, 2018.arxiv.org/abs/1706.10295
- [19]Francesco Gaffi, Antonio Lijoi, and Igor Prünster. Random probability measures with fixed mean distributions. The Annals of Applied Probability, 35(4):2239–2261, 2025.DOI
- [20]Yarin Gal and Zoubin Ghahramani. Dropout as a Bayesian approximation: Representing model uncertainty in deep learning. In international conference on machine learning, pp. 1050–1059. PMLR, 2016.arxiv.org/abs/1506.02142
- [21]Mohammad Ghavamzadeh, Shie Mannor, Joelle Pineau, and Aviv Tamar. Bayesian reinforcement learning: A survey. Foundations and Trends® in Machine Learning, 8(5-6):359–483, 2015.
- [22]Subhashis Ghosal. The Dirichlet process, related priors and posterior asymptotics. In Nils Lid Hjort, Chris Holmes, Peter Müller, and Stephen G. Walker (eds.), Bayesian Nonparametrics, pp. 35–79. Cambridge University Press, 2010.
- [23]Subhashis Ghosal and Aad W van der Vaart. Fundamentals of Nonparametric Bayesian Inference, volume 44. Cambridge University Press, 2017.
- [24]Tuomas Haarnoja, Aurick Zhou, Pieter Abbeel, and Sergey Levine. Soft actor-critic: Off-policy maximum entropy deep reinforcement learning with a stochastic actor. In International Conference on Machine Learning (ICML), pp. 1861–1870, 2018.arxiv.org/abs/1801.01290
- [25]Neil Houlsby, Ferenc Huszár, Zoubin Ghahramani, and Máté Lengyel. Bayesian active learning for classification and preference learning. arXiv preprint arXiv:1112.5745, 2011.arxiv.org/abs/1112.5745
- [26]Hemant Ishwaran and Lancelot F James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453):161–173, 2001.DOI
- [27]Emilie Kaufmann, Nathaniel Korda, and Rémi Munos. Thompson sampling: An asymptotically optimal finite-time analysis. In International Conference on Algorithmic Learning Theory (ALT), pp. 199–213. Springer, 2012.arxiv.org/abs/1205.4217
- [28]Martin Klissarov and Marlos C. Machado. Deep laplacian-based options for temporally-extended exploration. In International Conference on Machine Learning (ICML), pp. 17067–17088. PMLR, 2023.arxiv.org/abs/2301.11181
- [29]Branislav Kveton, Csaba Szepesvari, Sharan Vaswani, Zheng Wen, Tor Lattimore, and Mohammad Ghavamzadeh. Garbage in, reward out: Bootstrapping exploration in multi-armed bandits. In International Conference on Machine Learning, pp. 3601–3610. PMLR, 2019.arxiv.org/abs/1811.05154
- [30]Balaji Lakshminarayanan, Alexander Pritzel, and Charles Blundell. Simple and scalable predictive uncertainty estimation using deep ensembles. Advances in neural information processing systems, 30, 2017.arxiv.org/abs/1612.01474
- [31]Antonio Lijoi and Igor Prünster. Distributional properties of means of random probability measures. Statistics Surveys, 3:47–95, 2009.
- [32]Timothy P Lillicrap, Jonathan J Hunt, Alexander Pritzel, Nicolas Heess, Tom Erez, Yuval Tassa, David Silver, and Daan Wierstra. Continuous control with deep reinforcement learning. arXiv preprint arXiv:1509.02971, 2015.arxiv.org/abs/1509.02971
- [33]Marlos C. Machado, André Barreto, Doina Precup, and Michael Bowling. Temporal abstraction in reinforcement learning with the successor representation. Journal of Machine Learning Research, 24(80):1–69, 2023.
- [34]David JC MacKay. Information theory, inference and learning algorithms. Cambridge university press, 2003.
- [35]Od alric-Am brym Maillard. Mathematics of statistical sequential decision making. HDR dissertation, Université de Lille, 2019.
- [36]Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A Rus u, Joel Veness, Marc G Bellemare, Alex Graves, Martin Riedmiller, Andreas K Fidjeland, Georg Ostrovski, et al. Human-level control through deep reinforcement learning. nature, 518(7540):529–533, 2015.DOI
- [37]Pietro Muliere and Luca Tardella. Approximating distributions of random functionals of Ferguson–Dirichlet priors. Canadian Journal of Statistics, 26(2):283–297, 1998.DOI
- [38]Yaniv Oren, Viliam Vadocz, Matthijs T. J. Spaan, and Wendelin Boehmer. Epistemic Monte Carlo tree search. In International Conference on Learning Representations (ICLR), 2025.
- [39]Ian Osband and Benjamin Van Roy. Why is posterior sampling better than optimism for reinforcement learning? In International conference on machine learning, pp. 2701–2710. PMLR, 2017.arxiv.org/abs/1607.00215
- [40]Ian Osband, Daniel Russo, and Benjamin Van Roy. (more) efficient reinforcement learning via posterior sampling. Advances in Neural Information Processing Systems, 26, 2013.arxiv.org/abs/1306.0940
- [41]Ian Osband, Charles Blundell, Alexander Pritzel, and Benjamin Van Roy. Deep exploration via bootstrapped DQN. Advances in neural information processing systems, 29, 2016.arxiv.org/abs/1602.04621
- [42]Ian Osband, John Aslanides, and Albin Cassirer. Randomized prior functions for deep reinforcement learning. Advances in neural information processing systems, 31, 2018.
- [43]Ian Osband, Yotam Doron, Matteo Hessel, John Aslanides, Eren Sezener, Andre Saraiva, Katrina McKinney, Tor Lattimore, Csaba Szepesvari, Satinder Singh, et al. Behaviour suite for reinforcement learning. arXiv preprint arXiv:1908.03568, 2019a.arxiv.org/abs/1908.03568
- [44]Ian Osband, Benjamin Van Roy, Daniel J Russo, and Zheng Wen. Deep exploration via randomized value functions. Journal of Machine Learning Research, 20(124):1–62, 2019b.
- [45]Martin L Puterman. Markov decision processes. Handbooks in operations research and management science, 2:331–434, 1990.
- [46]Martin Riedmiller. Neural fitted Q iteration–first experiences with a data efficient neural reinforcement learning method. In European Conference on Machine Learning, pp. 317–328. Springer, 2005.
- [47]Carlos Riquelme, George Tucker, and Jasper Snoek. Deep Bayesian bandits showdown: An empirical comparison of Bayesian deep networks for Thompson sampling. arXiv preprint arXiv:1802.09127, 2018.
- [48]Kathryn Roeder. Density estimation with confidence sets exemplified by superclusters and voids in the galaxies. Journal of the American Statistical Association, 85(411):617–624, 1990.
- [49]Donald B. Rubin. The Bayesian Bootstrap. The Annals of Statistics, 9(1):130–134, 1981.DOI
- [50]Daniel J Russo, Benjamin Van Roy, Abbas Kazerouni, Ian Osband, Zheng Wen, et al. A tutorial on Thompson sampling. Foundations and Trends® in Machine Learning, 11(1):1–96, 2018.
- [51]Jayaram Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4(2):639–650, 1994.
- [52]Alexander L. Strehl and Michael L. Littman. An analysis of model-based interval estimation for Markov decision processes. Journal of Computer and System Sciences, 74(8):1309–1331, 2008.
- [53]Malcolm Strens. A Bayesian approach to reinforcement learning. In Proceedings of the Seventeenth International Conference on Machine Learning (ICML), pp. 943–950, 2000.
- [54]Richard S Sutton and Andrew G Barto. Reinforcement learning: An introduction, volume 1. MIT press Cambridge, 1998.DOI
- [55]William R Thompson. On the likelihood that one unknown probability exceeds another in view of the evidence of two samples. Biometrika, 25(3-4):285–294, 1933.
- [56]Hado van Hasselt, Arthur Guez, and David Silver. Deep reinforcement learning with double Q-learning. In AAAI Conference on Artificial Intelligence, volume 30, pp. 2094–2100, 2016.arxiv.org/abs/1509.06461
- [57]Sumit Vashishtha. Bayesian Reinforcement Learning with Dirichlet Processes. PhD thesis, Inria & Université de Lille, 2026.DOI
- [58]Sumit Vashishtha and Odalric-Ambrym Maillard. Leveraging priors on distribution functions for multi-arm bandits. Reinforcement Learning Journal, 6:1600–1623, 2025.
- [59]Max Welling and Yee W Teh. Bayesian learning via stochastic gradient Langevin dynamics. In Proceedings of the 28th international conference on machine learning (ICML-11), pp. 681–688, 2011.
- [60]Andrew Gordon Wilson and Pavel Izmailov. Bayesian deep learning and a probabilistic perspective of generalization. In Advances in Neural Information Processing Systems (NeurIPS), volume 33, pp. 4697–4708, 2020.arxiv.org/abs/2002.08791