Reinforcement Learning with General Value Function Approximation: Provably Efficient Approach via Bounded Eluder Dimension
Ruosong Wang, Ruslan Salakhutdinov, Lin F. Yang
Introduction
In reinforcement learning (RL), we study how an agent maximizes the cumulative reward by interacting with an unknown environment. RL finds enormous applications in a wide variety of domains, e.g., robotics (Kober et al., 2013), education (Koedinger et al., 2013), gaming-AI (Shalev-Shwartz et al., 2016), etc. The unknown environment in RL is often modeled as a Markov decision process (MDP), in which there is a set of states that describes all possible status of the environment. At a state , an agent interacts with the environment by taking an action from an action space . The environment then transits to another state which is drawn from some unknown transition distribution, and the agent also receives an immediate reward. The agent interacts with the environment episodically, where each episode consists of steps. The goal of the agent is to interact with the environment strategically such that after a certain number of interactions, sufficient information is collected so that the agent can act nearly optimally afterward. The performance of an agent is measured by the regret, which is defined as the difference between the total rewards collected by the agent and those a best possible agent would collect.
Without additional assumptions on the structure of the MDP, the best possible algorithm achieves a regret bound of Throughout the paper, we use to suppress logarithmic factors. (Azar et al., 2017), where is the total number of steps the agent interacts with the environment. In other words, the algorithm learns to interact with the environment nearly as well as an optimal agent after roughly steps. This regret bound, however, can be unacceptably large in practice. E.g., the game of Go has a state space with size , and the state space of certain robotics applications can even be continuous. Practitioners apply function approximation schemes to tackle this issue, i.e., the value of a state-action pair is approximated by a function which is able to predict the value of unseen state-action pairs given a few training samples. The most commonly used function approximators are deep neural networks (DNN) which have achieved remarkable success in playing video games (Mnih et al., 2015), the game of Go (Silver et al., 2017), and controlling robots (Akkaya et al., 2019). Nevertheless, despite the outstanding achievements in solving real-world problems, no convincing theoretical guarantees were known about RL with general value function approximators like DNNs.
Does RL with general function approximation learn to interact with an unknown environment provably efficiently?
There is a long line of research on the sample complexity and regret bound for RL in the tabular setting. See, e.g., (Kearns and Singh, 2002; Kakade, 2003; Strehl et al., 2006, 2009; Jaksch et al., 2010; Szita and Szepesvári, 2010; Azar et al., 2013; Lattimore and Hutter, 2014; Dann and Brunskill, 2015; Osband and Van Roy, 2016; Osband et al., 2019; Agrawal and Jia, 2017; Azar et al., 2017; Sidford et al., 2018; Dann et al., 2019; Jin et al., 2018; Zanette and Brunskill, 2019; Zhang et al., 2020; Wang et al., 2020) and references therein. In particular, Jaksch et al. (2010) proved a tight regret lower bound and Azar et al. (2017) showed the first asymptotically tight regret upper bound . Although these algorithms achieve asymptotically tight regret bounds, they can not be applied in problems with huge state space due to the linear dependency on in the regret bound. Moreover, the regret lower bound demonstrates that without further assumptions, RL with huge state space is information-theoretically hard to solve. In this paper, we exploit the structure that the value functions lie in a function class with bounded complexity and devise an algorithm whose regret bound scales polynomially in the complexity of the function class instead of the number of states.
Bandits.
Another line of research studies bandits problems with linear function approximation (Dani et al., 2008; Abbasi-Yadkori et al., 2011; Li et al., 2019). These algorithms are later generalized to the generalized linear model (Filippi et al., 2010; Li et al., 2017). A novel work of Russo and Van Roy (2013) studies bandits problems with general function approximation and proves that UCB-type algorithms and Thompson sampling achieve a regret bound of where is the eluder dimension of the function class and is the covering number of the function class. In this paper we study the RL setting with general value function approximation, and the regret bound of our algorithm also depends on the eluder dimension and the log-covering number of the function class. However, we would like to stress that the RL setting is much more complicated than the bandits setting, since the bandits setting is a special case of the RL setting with planning horizon and thus there is no state transition in the bandits setting.
RL with Linear Function Approximation.
Recently there has been great interest in designing and analyzing algorithms for RL with linear function approximation. See, e.g., (Yang and Wang, 2019, 2020; Jin et al., 2019; Cai et al., 2020; Modi et al., 2019; Jia et al., 2019; Zanette et al., 2019; Du et al., 2019; Wang et al., 2019; Du et al., 2020a; Zanette et al., 2020; Du et al., 2020b). These papers design provably efficient algorithms under the assumption that there is a well-designed feature extractor available to the agent and the value function or the model can be approximated by a linear function or a generalized linear function of the feature vectors. Moreover, the algorithm in (Zanette et al., 2020) requires solving the Planning Optimization Program which could be computationally intractable. In this paper, we study RL with general function approximation in which case a feature extractor may not even be available, and our goal is to develop an efficient (both computationally and statistically) algorithm with provable regret bounds without making explicit assumptions on the model.
RL with General Function Approximation.
It has been shown empirically that combining RL algorithms with neural network function approximators could lead to superior performance on various tasks (Mnih et al., 2013; Schaul et al., 2016; Wang et al., 2016; Van Hasselt et al., 2016; Silver et al., 2017; Akkaya et al., 2019). Theoretically, Osband and Van Roy (2014) analyzed the regret bound of Thompson sampling when applied to RL with general function approximation. Compared to our result, Osband and Van Roy (2014) makes explicit model-based assumptions (the transition operator and the reward function lie in a function class) and their regret bound depends on the global Lipschitz constant. In contrast, in this paper we focus on UCB-type algorithms with value-based assumptions, and our regret bound does not depend on the global Lipschitz constant. Recently, Ayoub et al. (2020) proposed an algorithm for model-based RL with general function approximation based on value-targeted regression, and the regret bound of their algorithm also depends on the eluder dimension. On the contrary, in this paper we focus on value-based RL algorithms.
Recent theoretical progress has produced provably sample efficient algorithms for RL with general value function approximation, but many of these algorithms are relatively impractical. In particular, (Jiang et al., 2017; Sun et al., 2019; Dong et al., 2020) devised algorithms whose sample complexity or regret bound can be upper bounded in terms of the Bellman rank or the witness rank. However, these algorithms are not computationally efficient. The algorithm in (Du et al., 2020b) can also be applied in RL with general function approximation. However, their algorithms require the transition of the MDP to be deterministic. There is also a line of research analyzing Approximate Dynamic Programming (ADP) in RL with general function approximation (Bertsekas and Tsitsiklis, 1996; Munos, 2003; Szepesvári and Munos, 2005; Antos et al., 2008; Munos and Szepesvári, 2008; Chen and Jiang, 2019). These papers focus on the batch RL setting, and there is no exploration components in the algorithms. The sample complexity of these algorithms usually depends on the concentrability coefficient and is thus incomparable to our results.
Preliminaries
Throughout the paper, for a positive integer , we use to denote the set .
A policy chooses an action based on the current state and the time step . Formally, where for each , maps a given state to an action. The policy induces a trajectory
where , , , , , etc.
An important concept in RL is the -function. Given a policy , a level and a state-action pair , the -function is defined as
Similarly, the value function of a given state is defined as
We use to denote an optimal policy, i.e., is a policy that maximizes
We also denote and .
In the episodic MDP setting, the agent aims to learn the optimal policy by interacting with the environment during a number of episodes. For each , at the beginning of the -th episode, the agent chooses a policy which induces a trajectory, based on which the agent chooses policies for later episodes. We assume is fixed and known to the agent, though our algorithm and analysis can be readily generalized to the case that is unknown in advance. Throughout the paper, we define to be the total number of steps that the agent interacts with the environment.
We adopt the following regret definition in this paper.
The regret of an algorithm after episodes is defined as
where is the policy played by algorithm at the -th episode.
Additional Notations.
Our Assumptions.
Our algorithm (Algorithm 1) receives a function class as input. We make the following assumption on the -functions throughout the paper.
For any , there exists which satisfies
The complexity of determines the learning complexity of the RL problem under consideration. To characterize the complexity of , we use the following definition of eluder dimension which was first introduced in (Russo and Van Roy, 2013) to characterize the complexity of different function classes in bandits problems.
Let and be a sequence of state-action pairs.
A state-action pair is -dependent on with respect to if any satisfying also satisfies .
An is -independent of with respect to if is not -dependent on .
We further assume the function class and the state-action pairs have bounded complexity in the following sense.
For any , the following holds:
there exists an -cover with size , such that for any , there exists with ;
there exists an -cover with size , such that for any , there exists with .
Assumption 2 requires both the function class and the state-action pairs have bounded covering numbers. Since our regret bound depends logarithmically on and , it is acceptable for the covers to have exponential size. In particular, when and are finite, it is clear that and . For the case of -dimensional linear functions and generalized linear functions, and . For quadratic functions, and .
Algorithm
The full algorithm is formally presented in Algorithm 1. From a high-level point of view, our algorithm resembles least-square value iteration (LSVI) and falls in a similar framework as the algorithm in (Jin et al., 2019; Wang et al., 2019). At the beginning of each episode , we maintain a replay buffer which contains all existing samples. We set , and calculate iteratively as follows. For each ,
Here, is a bonus function to be defined shortly. The above equation optimizes a least squares objective to estimate the next step value. We then play the greedy policy with respect to to collect data for the -th episode. The above procedure is repeated until all the episodes are completed.
Stable Upper-Confidence Bonus Function.
With more collected data, the least squares predictor is expected to return a better approximate the true -function. To encourage exploration, we carefully design a bonus function which guarantees that, with high probability, is an overestimate of the one-step backup. The bonus function is guaranteed to tightly characterize the estimation error of the one-step backup
is the value function of the next step. The bonus function is designed by carefully prioritizing important data and hence is stable even when the replay buffer has large cardinality. A detailed explanation and implementation of is provided in Section 3.1.
1 Stable UCB via Importance Sampling
In this section, we formally define the bonus function used in Algorithm 1. The bonus function is designed to estimate the confidence interval of our estimate of the -function. In our algorithm, we define the bonus function to be the width function where the confidence region is defined so that
with high probability. By definition of the width function, gives an upper bound on the confidence interval of the estimate of the -function, since the width function maximizes the difference between all pairs of -functions that lie in the confidence region. We note that similar ideas have been applied in the bandit literature (Russo and Van Roy, 2013), in reinforcement learning with linear function approximation (Du et al., 2019) and in reinforcement learning with general function apprximation in deterministic systems (Du et al., 2020b).
To define the confidence region , a natural definition would be
with high probability, and recall that is the set of state-action pairs defined in Line 5. However, as one can observe, the complexity of such a bonus function could be extremely high as it is defined by a dataset whose size can be as large as . A high-complexity bonus function could potentially introduce instability issues in the algorithm. Technically, we require a stable bonus function to allow for highly concentrated estimate of the one-step backup so that the confidence region is accurate even for bounded . Our strategy to “stabilize” the bonus function is to reduce the size of the dataset by importance sampling, so that only important state-action pairs are kept and those unimportant ones (which potentially induce instability) are ignored. Another benefit of reducing the size of the dataset is that it leads to superior computational complexity when evaluating the bonus function in practice. In later part of this section, we introduce an approach to estimate the importance of each state-action pair and a corresponding sampling method based on that. Finally, we note that importance sampling has also been applied in practical RL systems. For instance, in prioritized experience replay (Schaul et al., 2016), the importance is measured by the TD error.
Here we present a framework to subsample a given dataset, so that the confidence region is approximately preserved while the size of the dataset is greatly reduced. Our framework is built upon the sensitivity sampling technique introduced in (Langberg and Schulman, 2010; Feldman and Langberg, 2011; Feldman et al., 2013).
For a given set of state-action pairs and a function class , for each , define the -sensitivity of with respect to and to be
Sensitivity measures the importance of each data point in by considering the pair of functions such that contributes the most to . In Algorithm 2, we define a procedure to sample each state-action pair with sampling probability proportional to the sensitivity. In this analysis, we show that after applying Algorithm 2 on the input dataset , with high probability, the confidence region is approximately preserved, while the size of the subsampled dataset is upper bounded by the eluder dimension of times the log-covering number of .
The Stable Bonus Function.
With the above sampling procedure, we are now ready to obtain a stable bonus function which is formally defined in Algorithm 3. In Algorithm 3, we first subsample the given dataset and then round the reference function and all data points in the subsampled dataset to their nearest neighbors in a -cover. We discard the subsampled dataset if its size is too large (which happens with low probability as guaranteed by our analysis), and then define the confidence region using the new dataset and the rounded reference function.
We remark that in Algorithm 3, we round the reference function and the state-action pairs in mainly for the purpose of theoretical analysis. In practice, the reference function and the state-action pairs are always stored with bounded precision, in which case explicit rounding is unnecessary. Moreover, when applying Algorithm 3 in practice, if the eluder dimension of the function class is unknown in advance, one may treat in (4) as a tunable parameter.
2 Computational Efficiency
Finally, we discuss how to implement our algorithm computationally efficiently. To implement Algorithm 1, in Line 8, one needs to solve an empirical risk minimization (ERM) problem which can often be efficiently solved using appropriate optimization methods. To implement Algorithm 3, one needs to evaluate the width function for a confidence region of the form
which is a constrained optimization problem. When is the class of linear functions, there is a closed-form formula for the width function and thus the width function can be efficiently evaluated in this case. To implement Algorithm 2, one needs to efficiently estimate -sensitivity of all state-action pairs in a given set . When is the class of linear functions, sensitivity is equivalent to leverage score (Drineas et al., 2006) which can be efficiently estimated (Cohen et al., 2015; Clarkson and Woodruff, 2017). For a general function class , we give an algorithm to estimate the -sensitivity in Appendix A which is computationally efficient if one can efficiently judge whether a given state-action pair is -independent of a set of state-actions pairs with respect to for a given .
Theoretical Guarantee
In this section we provide the theoretical guarantee of Algorithm 1, which is stated in Theorem 1.
Under Assumption 1, after interacting with the environment for steps, with probability , Algorithm 1 achieves a a regret bound of
Here we provide an overview of the proof to highlight the technical novelties in the analysis.
In order to show that the confidence region is approximately preserved when using the subsampled dataset , we show that for any , is a good approximation to . To show this, we apply a union bound over all pairs of functions on the cover of which allows us to consider fixed . For fixed , note that is an unbiased estimate of , and importance sampling proportinal to the sensitivity implies an upper bound on the variance of the estimator which allows us to apply concentration bounds to prove the desired result. We note that the sensitivity sampling framework used here is very crucial to the theoreical guarantee of the algorithm. If one replaces sensitivity sampling with more naïve sampling approaches (e.g. uniform sampling), then the required sampling size would be much larger, which does not give any meaningful reduction on the size of the dataset and also leads to a high complexity bonus function.
When is the class of -dimensional linear functions, our upper bound on the size of the subsampled dataset is . However, in this case, our sampling algorithm (Algorithm 2) is equivalent to the leverage score sampling (Drineas et al., 2006) and therefore the sample complexity can be further improved to using a more refined analysis (Spielman and Srivastava, 2011). Therefore, our regret bound can be improved to , which matches the bounds in (Jin et al., 2019; Wang et al., 2019). However, the sample bound is specialized to the linear case and heavily relies on the matrix Chernoff bound which is unavailable for the class of general functions considered in this paper. This also explains why our regret bound in Theorem 1, when applied to the linear case, is larger by a factor when compared to those in (Jin et al., 2019; Wang et al., 2019). We leave it as an open question to obtain more refined bound on the size of the subsampled dataset and improve the overall regret bound of our algorithm.
The Confidence Region.
Our algorithm applies the principle of optimism in the face of uncertainty (OFU) to balance exploration and exploitation. Note that is the value function estimated at step . In our analysis, we require the -function estimated at level to satisfy
with high probability. To achieve this, we optimize the least squares objective to find a solution using collected data. We then show that is close to . This would follow from standard analysis if the collected samples were independent of . However, is calculated using the collected samples and thus they are subtly dependent on each other. To tackle this issue, we notice that is computed by using and the bonus function , and both and the bonus function have bounded complexity, thanks to the design of bonus function. Hence, we can construct a -cover to approximate . By doing so, we can now bound the fitting error of by replacing with its closest neighbor in the -cover which is independent of the dataset. By a union bound over all functions in the -cover, it follows that with high probability,
for some that depends only on the complexity of the bonus function and the function class .
Regret Decomposition and the Eluder Dimension.
By standard regret decomposition for optimistic algorithms, the total regret is upper bounded by the summation of the bonus function . To bound the summation of the bonus function, we use an argument similar to that in (Russo and Van Roy, 2013), which shows that the summation of the bonus function can be upper bounded in terms of the eluder dimension of the function class , if the confidence region is defined using the original dataset. In the formal analysis, we adapt the argument in (Russo and Van Roy, 2013) to show that even if the confidence region is defined using the subsampled dataset, the summation of the bonus function can be bounded in a similar manner.
1 Analysis of the Stable Bonus Function
Our first lemma gives an upper bound on the sum of the sensitivity in terms of the eluder dimension of the function class .
For a given set of state-action pairs ,
For each , let be an arbitrary pair of functions such that and
is maximized, and we define for such and . Note that . Let be a dyadic decomposition with respect to , where for each , define
Clearly, for any , and thus
Now we bound for each separately. For each , let
and we decompose into disjoint subsets, i.e., , by using the following procedure. Let and we consider each sequentially. Initially for all . Then, for each , we find the largest such that is -independent of with respect to . We set if such does not exist, and use to denote the choice of for . By the design of the algorithm, for each , it is clear that is dependent on each of .
Now we show that for each ,
For any , we use to denote the pair of functions in such that and
is maximized. Since , we must have . Since is dependent on each of , for each , we have
By the monotonicity of eluder dimension, it follows that
Using Lemma 1, we can prove an upper bound on the number of distinct elements in returned by the sampling algorithm (Algorithm 2).
With probability at least , the number of distinct elements in returned by Algorithm 2 is at most
since for any real number , there always exists such that is an integer. Let be a random variable defined as
By Chernoff bound, with probability at least , we have
Our second lemma upper bounds the number of elements in returned by Algorithm 2.
With probability at least , .
Let be the random variable which is defined as
Our third lemma shows that for the given set of state-action pairs and function class , Algorithm 2 returns a set of state-action pairs so that is approximately preserved for all .
With probability at least , for any ,
In our proof, we separately consider two cases: and .
Consider with . Conditioned on the event defined in Lemma 3 which holds with probability at least , we have . Moreover, we always have . In summary, we have
We first show that for any fixed with , with probability at least , we have
To prove this, for each , define
By union bound, the above inequality implies that with probability at least , for any with ,
Now we condition on the event defined above and the event defined in Lemma 3. Consider with . Recall that there exists
such that and . Therefore,
Therefore, conditioned on the event defined above, we have
Conditioned on the event defined in Lemma 3 which holds with probability at least , we have
where the last inequality holds since .
Combining Lemma 2, Lemma 3 and Lemma 4 with a union bound, we have the following proposition.
With probability at least , the size of returned by Algorithm 2 satisfies , the number of distinct elements in is at most
and for any ,
For Algorithm 3, suppose , the following holds.
With probability at least ,
where , and .
for a function set with
for some absolute constant if is sufficiently large.
For the first part, conditioned on the event defined in Proposition 1, for any , we have
Therefore, for any , we have , which implies and thus . Moreover, for any , we have , which implies .
For the second part, note that is uniquely defined by . When or the number of distinct elements in exceeds
we have and thus . Otherwise, is defined by and . Since , the total number of distinct is upper bounded by . Since there are at most
distinct elements in , while each of them belongs to and , the total number of distinct is upper bounded by
2 Analysis of the Algorithm
We are now ready to prove the regret bound of Algorithm 1. The next lemma establishes a bound on the estimate of a single backup.
as defined in Line 5 in Algorithm 1. For any , define
For any and , there is an event which holds with probability at least , such that conditioned on , for any with , we have
for some absolute constant .
In our proof, we consider a fixed , and define
For any , we consider where
We have, with probability at least , for all ,
We define the above event to be , and we condition on this event for the rest of the proof.
For all , there exists , such that , and we have
Consider with . We have
Recall that . We have , which implies,
for an absolute constant . ∎
In Algorithm 1, let be a confidence region defined as
Then with probability at least , for all ,
for some absolute constant . Here is given as in Propostion 2.
For all , the bonus function . Note that
I.e., there exists such that . This implies
is a -cover of with . For each , let be the event defined in Lemma 5. By Lemma 5, we have . We condition on in the rest part of the proof.
Recall that is the solution of the optimization problem in Line 8 of Algorithm 1, i.e., . Let such that . Thus, by Lemma 5, we have
for some absolute constant . Therefore, by a union bound, for all , we have with probability at least . ∎
The above lemma guarantees that, with high probability, lies in the confidence region. With this, it is guaranteed that are all optimistic, with high probability. This is formally presented in the next lemma.
With probability at least , for all , for all ,
Let be the event that for all , . By Lemma 6, . Let be the event that for all and , . By Proposition 2 and union bound, holds failure probability at most . In the rest part of the proof we condition on and .
for any we have
Now we prove by induction on . When , the desired inequality clearly holds. Now we assume for some . Clearly we have . Therefore, for all ,
The next lemma upper bounds the regret of the algorithm by the sum of .
In our proof, for any define
By Azuma-Hoeffding inequality, with probability at least ,
We condition on the above event in the rest of the proof. We also condition on the event defined in Lemma 7 which holds with probability .
It remains to bound , for which we will exploit fact that has bounded eluder dimension.
With probability at least , for any ,
for some absolute constant . Here is as defined in (4).
Let be the event that or all ,
By Proposition 2, holds with probability at least . In the rest of the proof, we condition on .
Let with . We show that there exists such that is -dependent on at least disjoint subsequences in . We demonstrate this by using the following procedure. Let be disjoint subsequences of which are initially empty. We consider
for each sequentially. For each , for each , we find such that is -independent of and then add into . By the definition of -independence, for all and thus we will eventually find some such that is -dependent on each of . Among , there are at most of them that contain an element in
and all other subsequences only contain elements in . Therefore, is -dependent on at least disjoint subsequences in .
On the other hand, since , we have , which implies there exists with and such that . By triangle inequality, we have . On the other hand, since is -dependent on at least disjoint subsequences in , we have
Lastly, we apply the above lemma to bound the overall regret.
for some absolute constant . Here is as defined in (4).
In the proof we condition on the event defined in Lemma 9. We define . Let be a permutation of . By the event defined in Lemma 9, for any , we have
Moreover, we have . Therefore,
We are now ready to prove our main theorem.
By Lemma 8 and Lemma 10, with probability at least ,
for some absolute constants . Substituting the value of completes the proof. ∎
Model Misspecification
In this section, we study the case when there is a misspecification error. Formally, we consider the following assumption.
There exists a set of functions and a real number , such that for any , there exists which satisfies
We call the misspecification error.
Our algorithm for the misspecification case is identical the original algorithm except for the change of . In particular, we change the definition of (defined in (4)) as follows.
for some absolute constant . With this, we can now reprove Lemma 5 in the misspecified case.
Suppose satisfies Assumption 3. Consider a fixed . Let
as defined in Line 5 in Algorithm 1. For any , define
For any and , there is an event which holds with probability at least , such that conditioned on , for any with , we have
for some absolute constant .
In our proof, we consider a fixed , and define
Note that unlike Lemma 5, we may have . By Assumption 3, we immediately have
For any , we consider where
Similar to Lemma 5, we still have, with probability at least , for all ,
We define the above event to be , and we condition on this event for the rest of the proof. Similarly, we have, for all ,
Consider with . We still have
Again by the same argument as in the proof of Lemma 5, we have for any ,
Let . Recall that . We have
Since , solving the above inequality, we have,
for an absolute constant . ∎
Similar to Lemma 6, we have the following lemma.
Suppose satisfies Assumption 3. In Algorithm 1, let be a confidence region defined as
Then with probability at least , for all ,
for some absolute constant . Here is given as in Propostion 2.
The proof is nearly identical to that of Lemma 6. ∎
Combining Lemma 12 with Lemma 7–10, we obtain the following theorem.
Under Assumption 3, after interacting with the environment for steps, with probability at least , Algorithm 1 achieves a regret bound of
Conclusion
Acknowledgments
The authors would like to thank Jiantao Jiao, Sham M. Kakade and Csaba Szepesvári for insightful comments on an earlier version of this paper. RW and RS were supported in part by NSF IIS1763562, AFRL CogDeCON FA875018C0014, and DARPA SAGAMORE HR00111990016.
References
Appendix A Estimating the Sensitivity
In this section, we present a computationally efficient algorithm to estimate the -sensitivity of all state-action pairs in a give set with respect to a given function class . The algorithm is formally described in Algorithm 4.
Given a function class , a set of state-action pairs and an accuracy parameter , Algorithm 4 returns an estimate of the -sensitivity for each . With Algorithm 4, we can now implement Algorithm 2 computationally efficiently by replacing (3) in Algorithm 2 with
which we prove in the remaining part of this section.
In our proof we consider a fixed . Let be an arbitrary pair of functions such that and
For each , by the definition of -independence, we have