Knowledge Infused Policy Gradients with Upper Confidence Bound for Relational Bandits

Kaushik Roy, Qi Zhang, Manas Gaur, Amit Sheth

Introduction

Contextual Bandits (CB) are an extension of the classical Multi-Armed-Bandits (MAB) setting where the arm choice depends also on a specific context . As an example, in a music recommendation system, the choice of song recommendation (the arm choice) depends on the user context (user preferences concerning genre, artists, etc). In the real world, the context is often multi-relational but most CB algorithms do not model multi-relational context and instead use flat feature vectors that contain attribute-value pairs . While relational modeling allows us to enrich user context, it further complicates the exploration-exploitation problem due to the introduction of a much larger context space. Initially, when much of the space of context-arm configurations are unexplored, aggressive exploitation may yield sub-optimal total regret. Hence, a principled exploration-exploitation strategy that encodes high uncertainty initially that tapers off with more information is required to effectively achieve near-optimal total regret. The Upper-Confidence-Bound (UCB) algorithm uses an additional term to model initial uncertainty that tapers off during each arm pull . However, though the UCB provides a reasonable generalized heuristic, the exploration strategy can further be improved with more information about the reward distribution, for example, if it is known that the expected reward follows a Gaussian distribution. This is what Thompson Sampling does - incorporates a prior distribution over the expected rewards for each arm and updates a Bayesian posterior . If external knowledge is available the posterior can be reshaped with knowledge infusion . An example of this knowledge for the IMDB dataset described in Section 7 can be seen in Figure 1 and the detailed formulation for the knowledge used is described in Section 4. A couple of issues arise with posterior reshaping: a) The choice of reshaping function is difficult to determine in a principled manner, and b) The form of the prior and posterior is usually chosen to exploit a likelihood-conjugate before analytically compute posterior estimates as sampling is typically inefficient. Similarly, the choice of reshaping function needs to either be amenable to efficient sampling for exploration or analytically computed. Thus, we observe that we can instead directly optimize for the optimal arm choice through policy gradient methods . Using a Bayesian formulation for optimization of policy in functional space, we can see that the knowledge infused reshape function can be automatically learned by an adaption of the Knowledge Infused Policy Gradients (KIPG) algorithm for the Reinforcement Learning (RL) setting to the CB setting , which takes as input a state and knowledge, and outputs an action.

The CB setting presents a unique challenge for knowledge infusion. Since arm pulling happens in an online fashion, the human knowledge about the user is uncertain until the human observes some arm choices. First, we adapt the KIPG algorithm from the RL to the CB setting and then we improve upon it to make it less aggressive in its knowledge infusion strategy when the human is still uncertain about the user’s preferences. For this reason, we develop a UCB style uncertainty measure that considers the initial uncertainty as the human gathers more information about the user context, before providing knowledge. Thus, we develop a Knowledge Infused Policy Gradient Upper Confidence Bound (KIPGUCB) algorithm to incorporate human uncertainty in providing knowledge in the knowledge infusion strategy. Our methodological contributions are as follows:

We adapt KIPG for the RL setting to the CB setting to reduce the total regret with high-quality knowledge.

We develop a novel relational CB algorithm KIPGUCB that reduces regret through knowledge infusion with both high-quality and noisy knowledge using exploration.

Theoretically, we observe that KIPG is fundamentally a gradient ascent method and derive a regret bound that depends on the knowledge. We also derive a confidence bound for when the knowledge is noisy.

Empirically, through experiments on various real-life datasets, we perform analysis of settings where KIPGUCB achieves a drastic reduction in total regret. We compare KIPGUCB to KIPG without a confidence bound and compare against the Relational Boosted Bandits algorithm (RB2) , a state-of-the-art contextual bandit algorithm for relational domains.

Problem Setting

We consider the problem setting of Bernoulli Contextual Bandits with relational features. Formally, at each step kk, when an arm i∈[N]:={1,2,...,N}i\in[N]:=\{1,2,...,N\} is pulled from among NN arms, the reward rk(i)∈{0,1}r_{k}(i)\in\{0,1\} is Bernoulli. Also, pulling an arm ii depends on a relational context ck(i)c_{k}(i). Since πk(i)\pi_{k}(i), which represents the probability of choosing arm ii given context ck(i)c_{k}(i), is expected to be high if P(rk(i)=1∣c(i))P(r_{k}(i)=1|c(i)) is high, we directly maximize the total reward over KK arm choices, ∑k=1Kπk(i)rk(i)\sum_{k=1}^{K}\pi_{k}(i)r_{k}(i). Here πk(i)=σ(Ψk(i))\pi_{k}(i)=\sigma(\Psi_{k}(i)), and σ\sigma is the sigmoid function. Ψk(i)\Psi_{k}(i) is a relational function that includes the relational context ck(i)c_{k}(i).

Knowledge Infused Policy Gradients

In this section, we develop the formulation for the KIPG adaptation to the CB setting. We first describe policy gradients for CB, extend it to functional spaces and then use Bayes rule to derive the KIPG formulation. In next section, we show the connection of KIPG to Thompson Sampling with posterior reshaping and the Exponential Weight for Exploration and Exploitation (Exp3) algorithm , which is also derived from a gradient ascent procedure (mirror ascent) that can be seen as an instance of KIPG.

In policy gradient methods the probability of picking an arm ii given context c(i)c(i), is parameterized as π(i)=σ(θ(i)Tc(i))\pi(i)=\sigma(\theta(i)^{T}c(i)). We want to maximize the expected reward over KK arm pulls ∑k=1Kπk(i)rk(i)\sum_{k=1}^{K}\pi_{k}(i)r_{k}(i). We update the parameters for arm ii, at each k+1k+1, using gradient ascent as θk+1(i)=θk(i)+η∇θk(i)(∑kπk(i)rk(i))\theta_{k+1}(i)=\theta_{k}(i)+\eta\nabla_{\theta_{k}(i)}(\sum_{k}\pi_{k}(i)r_{k}(i)). Here we note that the gradient ∇θk(i)πk(i)=πk(i)∇θk(i)log⁡(πk(i))\nabla_{\theta_{k}(i)}\pi_{k}(i)=\pi_{k}(i)\nabla_{\theta_{k}(i)}\log(\pi_{k}(i)) and thus we optimize:

0.2 Policy Gradients for Contextual Bandits in Functional Space

In functional space the θ(i)Tc(i)\theta(i)^{T}c(i) is replaced by a function Ψ(i)\Psi(i) i.e. π(i)=σ(Ψ(i))\pi(i)=\sigma(\Psi(i)), where Ψ(i)\Psi(i) is a relational function that includes context c(i)c(i). Thus, the policy gradient update becomes

Here, Ψk(i)\Psi_{k}(i) at each iteration of policy gradients is grown stage wise. We start with a Ψ0(i)\Psi_{0}(i) and update ΨK(i)=Ψ0(i)+∑k=1Kηδk(i)\Psi_{K}(i)=\Psi_{0}(i)+\sum_{k=1}^{K}\eta\delta_{k}(i), where each δk(i)\delta_{k}(i) fits a function to πk(i)∇Ψk(i)log⁡(πk(i))rk(i)\pi_{k}(i)\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i))r_{k}(i) . In our experiments this function is a TILDE regression tree . However, we derive a Bayesian formulation for πk(i)\pi_{k}(i) for knowledge infusion. Thus, After pulling an arm ii at step kk, and observing rewards rk(i)r_{k}(i), and context ck(i)c_{k}(i), using Bayes rule we can write

Using the sigmoid function we can set P(rk(i)∣Ψk(i))=σ(Ψk(i))=eΨk(i)(1+eΨk(i))P(r_{k}(i)|\Psi_{k}(i))=\sigma(\Psi_{k}(i))=\frac{e^{\Psi_{k}(i)}}{(1+e^{\Psi_{k}(i)})} and use the Bayesian posterior to obtain a prior informed policy as

To optimize using policy gradients, again we note that ∇Ψk(i)(πk(i))=πk(i)∇Ψk(i)log⁡(πk(i))\nabla_{\Psi_{k}(i)}(\pi_{k}(i))=\pi_{k}(i)\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i)) If we use a form for P(Ψk(i))P(\Psi_{k}(i)), for which the normalization doesn’t depend on Ψk(i)\Psi_{k}(i) such as a Laplace or a Gaussian distribution, we can take the log on both sides without loss of generality to derive the gradient ∇Ψk(i)log⁡(πk(i))\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i)):

where Ik(i)I_{k}(i) is the indicator function representing if arm ii was chosen at step kk. Now we can employ functional gradient ascent by fitting a weak learner (such as a TILDE tree for relational context, or linear function for propositional context) to the gradient πk(i)∇Ψk(i)log⁡(πk(i))\pi_{k}(i)\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i)). Note here that log⁡(P(Ψk(i)))\log(P(\Psi_{k}(i))) will determine the nature of knowledge infused into the policy gradient learning setup at each kk. We call this approach Knowledge Infused Policy Gradients (KIPG).

Formulation of Knowledge Infusion

At each kk, the prior over functions Ψk(i)\Psi_{k}(i) for each arm P(Ψk(i))P(\Psi_{k}(i)) determines the knowledge infusion process. We now show the formulation for infusing arm preferences as knowledge as we use this in our experiments. Depending on the problem needs, the user may pick their choice of P(Ψk(i))P(\Psi_{k}(i)) to be any distribution. Since our knowledge is given as weighted preferences over arm choices, we will cover two intuitive ways to formulate the knowledge and derive the formulation we use in our experiments.

Given a context included in Ψk(i)\Psi_{k}(i), if we want to prefer the arm choice ii, we can specify this knowledge using a two step procedure. First we set Ψk(i)knowledge=α\Psi_{k}(i)_{knowledge}=\alpha, where α≥1\alpha\geq 1. Then we set P(Ψk(i))=Normal(μ=Ψk(i)knowledge−σ(Ψk(i)),Σ=I)P(\Psi_{k}(i))=Normal(\mu=\Psi_{k}(i)_{knowledge}-\sigma(\Psi_{k}(i)),\Sigma=I). Similarly if the arm choice ii is not preferred, Ψk(i)knowledge=−α\Psi_{k}(i)_{knowledge}=-\alpha. Here α\alpha controls how quickly knowledge infusion takes place.

Specifying α\alpha is a tricky thing to do for a human and we would like them to able to just simply specify preference over arm choice given a context instead, if they are an expert. To model an expert

First we set Ψk(i)knowledge=LUB{α}\Psi_{k}(i)_{knowledge}={\rm LUB}\{\alpha\}, where LUB{α}{\rm LUB}\{\alpha\} stands for the least upper bound from among a set of α∈{α}\alpha\in\mathbf{\{\alpha\}}. The interpretation is that α\alpha has to be at least that high to qualify as expert knowledge. We set LUB{α}=K⋅max⁡πk(i)∇Ψk(i)log⁡(πk(i))rk(i)=K⋅1⋅K=K2{\rm LUB}\{\alpha\}=K\cdot\max{\pi_{k}(i)\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i))r_{k}(i)}=K\cdot 1\cdot K=K^{2} as the maximum value of πk(i)=1\pi_{k}(i)=1 and the maximum value of ∇Ψk(i)log⁡(πk(i))⋅rk(i)\nabla_{\Psi_{k}(i)}\log(\pi_{k}(i))\cdot r_{k}(i) is 1⋅K1\cdot K as the maximum value of ∑k=1Krk(i)=K\sum_{k=1}^{K}r_{k}(i)=K. Thus we set Ψk(i)knowledge=LUB{α}=K2\Psi_{k}(i)_{knowledge}={\rm LUB}\{\alpha\}=K^{2}. The interpretation is the human has to be at least as sure as the correction required to the error in arm choice i.e. the max gradient to qualify as an expert. Therefore to prefer arm ii, α=K2\alpha=K^{2} and if arm ii is not preferred, α=−K2\alpha=-K^{2}.

Next, we replace the Normal(μ,Σ)Normal(\mu,\Sigma) distribution with the Laplace(x=∣Ψk(i)knowledge−Ψk∣,b=1)Laplace(x=|\Psi_{k}(i)_{knowledge}-\Psi_{k}|,b=1) distribution. Thus, we obtain that ∇Ψk(i)log⁡(P(Ψk(i))=sign(Ψk(i)knowledge−σ(Ψk(i)))=±1\nabla_{\Psi_{k}(i)}\log(P(\Psi_{k}(i))={\rm sign}(\Psi_{k}(i)_{knowledge}-\sigma(\Psi_{k}(i)))=\pm 1. If the expert prefers the arm ii, δk(i)=δk(i)+1\delta_{k}(i)=\delta_{k}(i)+1 and if the expert does not prefer the arm ii, δk(i)=δk(i)−1\delta_{k}(i)=\delta_{k}(i)-1. This is very intuitive as it means that the Ψk(i)\Psi_{k}(i), representing chance of arm ii being pulled is simply increased or decreased by an additive factor depending on expert’s preference, thus preventing the need to carefully specify α\alpha.

With this insight, it suffices for the human expert to specify knowledge as a tuple

which simply means that at step kk, given the context ck(i)c_{k}(i), arm ii is either preferred (prefer(i)=1)prefer(i)=1)) or not preferred (prefer(i)=0prefer(i)=0). This is much more natural and easy for the expert human to specify. Note that if the human had a reason to specify α\alpha quantifying how quickly they want the knowledge infusion to take place depending on how sure they are (expert level), we can use the NormalNormal or LaplaceLaplace distribution form to specify without the use of LUB{α}{\rm LUB}\{\alpha\}. Algorithm 1 shows the pseudocode for KIPG with expert knowledge infusion. Also, we add 11 to rk(i)r_{k}(i) so that the gradient doesn’t vanish when r(i)=0r(i)=0.

0.1 Example of knowledge in the IMDB dataset using the Laplacian Formulation

At a step kk, we can define knowledge over the actors set A=x{actor1,actor2,actor3,..}\mathbf{A}=x\{actor1,actor2,actor3,..\} with respect to a directors set D={director1,director2,..}\mathbf{D}=\{director1,director2,..\} and a movies set M={movie1,movie2,..}\mathbf{M}=\{movie1,movie2,..\} as,

This means that The set of actors A\mathbf{A}, worked under the set of directors D\mathbf{D}, in the movies in the set M\mathbf{M}. In this example, (directed(D,M)∧actedIn(A,M)(directed(\mathbf{D},\mathbf{M})\land actedIn(\mathbf{A},\mathbf{M}) is the context c(i)c(i), ii is the arm label workedUnder.

0.2 Connection with Previous Work on Relational Preferences

Odom et al. have previously specified relational preference knowledge in supervised learning and imitation learning settings. Using their approach, at step kk, the knowledge would be incorporated by an additive term to the gradient term (Ik(i)−σ(Ψk(i)))(I_{k}(i)-\sigma(\Psi_{k}(i))). This term is nk(i)t−nk(i)fn_{k}(i)_{t}-n_{k}(i)_{f}, where nk(i)tn_{k}(i)_{t} is the number of knowledge sources that prefer arm ii and nk(i)fn_{k}(i)_{f} is the number of knowledge sources that do not prefer arm ii, at step kk. We prove in Theorem 4.1 that the approach of Odom et al. is a specific instance of KIPG with multiple knowledge sources. For our experiments, we specify only a single source of knowledge at all steps kk.

At step kk, For SS multiple knowledge sources, that either prefer or don’t prefer arm ii, k1,k2,..kSk1,k2,..kS, assuming independence, let P(Ψk(i))=∏s=1SLaplace(∣Ψk(i)−Ψk(i)ks∣,b=1)P(\Psi_{k}(i))=\prod_{s=1}^{S}Laplace(|\Psi_{k}(i)-\Psi_{k}(i)_{ks}|,b=1). Here Ψk(i)ks=Ψk(i)knowledge ∀s∈S\Psi_{k}(i)_{ks}=\Psi_{k}(i)_{knowledge}~{}\forall s\in S. Then we have ∇Ψklog⁡(πk(i))=nk(i)t−nk(i)f\nabla_{\mathbf{\Psi_{k}}}\log(\pi_{k}(i))=n_{k}(i)_{t}-n_{k}(i)_{f}.

We know that with assuming a Laplace(x,b)Laplace(x,b) distribution and setting Ψk(i)ks=Ψk(i)knowledge=LUB{α} ∀s∈S\Psi_{k}(i)_{ks}=\Psi_{k}(i)_{knowledge}={\rm LUB}\{\alpha\}~{}\forall s\in S, we get ∇Ψk(i)log⁡(P(Ψk(i)))=∑s=1Ssign(LUB{α}−σ(Ψk(i)))\nabla_{\Psi_{k}(i)}\log(P(\Psi_{k}(i)))=\sum_{s=1}^{S}{\rm sign}({\rm LUB}\{\alpha\}-\sigma(\Psi_{k}(i))). We know also that sign(LUB{α}−σ(Ψk(i)))=±1{\rm sign}({\rm LUB}\{\alpha\}-\sigma(\Psi_{k}(i)))=\pm 1 depending on if the expert prefers the arm ii or not. Thus we get,∑s=1Ssign(LUB{α}−σ(Ψk(i)))=nk(i)t−nk(i)f\sum_{s=1}^{S}{\rm sign}({\rm LUB}\{\alpha\}-\sigma(\Psi_{k}(i)))=n_{k}(i)_{t}-n_{k}(i)_{f}.

0.3 Connection with Thompson Sampling

We now formalize the connection between Thompson Sampling with posterior reshaping and KIPG. For arm i∈[N]i\in[N], at every step of arm pulling k∈[K]k\in[K], a reward rk(i)r_{k}(i) and a context ck(i)c_{k}(i) is emitted. In Thompson Sampling, the posterior P(Θk(i)∣rk(i),ck(i))P(\Theta_{k}(i)|r_{k}(i),c_{k}(i)) for parameter Θk(i)\Theta_{k}(i) representing P(rk(i)∣ck(i))P(r_{k}(i)|c_{k}(i)) is updated at each step kk as

Finally, the optimal arm choice corresponds to the arm that has the max among the sampled Θk(i)∼P(Θk(i)∣rk(i),ck(i))\Theta_{k}(i)\sim P(\Theta_{k}(i)|r_{k}(i),c_{k}(i)) for each arm ii. The posterior P(Θk(i)∣rk(i),ck(i))P(\Theta_{k}(i)|r_{k}(i),c_{k}(i)), can be reshaped for example by using P(Θk(i)=F(Θk(i)∣rk(i),ck(i))P(\Theta_{k}(i)=\mathbf{F}(\Theta_{k}(i)|r_{k}(i),c_{k}(i)). The reshaping changes the sufficient statistics such as mean, variance, etc. This F\mathbf{F} can be informed by some knowledge of the domain. We encounter a couple of issues with Posterior Reshaping for knowledge infusion. First, that the choice of F\mathbf{F} is difficult to determine in a principled manner. Second, the choice of F\mathbf{F} must be determined such that it is amenable to sampling for exploration. Sampling itself is very inefficient for problems of appreciable size. Thus, we observe that we can instead directly optimize for the optimal arm choice through policy gradient methods. Using a Bayesian formulation for optimization of policy in functional space, we can see that the reshaped posterior after KK iterations of arm pulling (where KK is sufficiently high), corresponds to learning an optimal function Ψ(i)\Psi(i) since Ψ(i)\Psi(i) is high if F(Θk(i)∣rk(i),ck(i))\mathbf{F}(\Theta_{k}(i)|r_{k}(i),c_{k}(i)), representing P(r(i)=1∣c(i))P(r(i)=1|c(i)), is high.

0.4 Connection with Exp3

Exp3 maximizes the total expected reward over KK arm pulls f=∑k=1Kπk(i)rk(i)f=\sum_{k=1}^{K}\pi_{k}(i)r_{k}(i). Using the proximal definition of gradient descent and deriving the mirror descent objective after each arm pull, we have

, where γ\gamma is the learning rate. Choosing D(π(i),πk−1(i))=Φ(πk−1(i))−(Φ(π(i))+∇Φ(πk−1(i))(πk−1(i)−π(i)))\mathcal{D}(\pi(i),\pi_{k-1}(i))=\Phi(\pi_{k-1}(i))-(\Phi(\pi(i))+\nabla\Phi(\pi_{k-1}(i))(\pi_{k-1}(i)-\pi(i))), where Φ\Phi is a convex function, we get

Since π\pi is a probability we need to choose a convex Φ\Phi such that it works with probability measures. So we will choose Φ(π)=∑iπ(i)log⁡π(i)\Phi(\pi)=\sum_{i}\pi(i)\log\pi(i) to be negative entropy and we have

Setting πk−1(i)=σ(Ψk(i))\pi_{k-1}(i)=\sigma(\Psi_{k}(i)), we get,

where log⁡P(Ψk(i))=log⁡(eγ⋅∇πk−1(i)(f))\log P(\Psi_{k}(i))=\log(e^{\gamma\cdot\nabla_{\pi_{k-1}(i)}(f)}). Thus we see that Exp3 can be seen as a case of applying a specific prior probability in KIPG.

Regret Bound for KIPG

We now derive a bound for the total regret after KK steps of KIPG to understand the convergence of KIPG towards the optimal arm choice. Since KIPG is fundamentally a gradient ascent approach, we can use analysis similar to the regret analysis for online gradient ascent to derive the regret bound . Using a2−(a−b)2=2ab−b2a^{2}-(a-b)^{2}=2ab-b^{2} and letting a=(Ψk(i)−Ψ∗(i))a=(\Psi_{k}(i)-\Psi^{*}(i)) and b=∇Ψ(i)k∑k=1Kπk(i)rk(i)b=\nabla_{\Psi(i)_{k}}\sum_{k=1}^{K}\pi_{k}(i)r_{k}(i), We know that for a sequence over KK gradient ascent iterations, {Ψk(i)∣k∈[K]}\{\Psi_{k}(i)|k\in[K]\}, we have

where L≥∇Ψk(i)∑k=1Kπk(i)rk(i)\mathcal{L}\geq\nabla_{\Psi_{k}(i)}\sum_{k=1}^{K}\pi_{k}(i)r_{k}(i) is an upper bound on the gradient (Lipschitz constant) and γ\gamma is the learning rate. Using a telescoping sum over KK iterations we have

Solving for γ\gamma by setting ∇γ(R.H.S)=0\nabla_{\gamma}(R.H.S)=0, we finally have our total regret bound over KK steps as:

This regret bound has a very intuitive form. It shows that the regret is bounded by how far off the learned Ψ(i)\Psi(i) from the true Ψ∗(i)\Psi^{*}(i) for each arm ii. Thus we expect that in the experiments, with quality knowledge infusion this gap is drastically reduced over KK steps to result in a low total regret.

KIPG-Upper Confidence Bound

where ekZe^{kZ} is the moment-generating-function for ZZ. We know that ekZe^{kZ} is convex and thus ekZ≤γ(ekb)+(1−γ)ekae^{kZ}\leq\gamma(e^{kb})+(1-\gamma)e^{ka} for Z∈[a,b]Z\in[a,b] and γ∈\gamma\in. Thus we obtain Z≤γb+(1−γ)aZ\leq\gamma b+(1-\gamma)a, which gives us γ≥Z−ab−a\gamma\geq\frac{Z-a}{b-a}, therefore we know

We note that aet(b−a)≥a  ⟹  aet(b−a)−b≥a−b  ⟹  (aet(b−a)−b)−2≤(b−a)−2ae^{t(b-a)}\geq a\implies ae^{t(b-a)}-b\geq a-b\implies(ae^{t(b-a)}-b)^{-2}\leq(b-a)^{-2}. We know −ek(b−a)≤−1-e^{k(b-a)}\leq-1, therefore we obtain

Using k=4ϵ(b−a)2k=\frac{4\epsilon}{(b-a)^{2}}, by solving for the minimum of e−kϵ+k2(b−a)28e^{-k\epsilon+\frac{k^{2}(b-a)^{2}}{8}} we get P(∣πk(i∗)−π∗(i∗)∣>ϵ)≤e−2ϵ2(b−a)2P(|\pi_{k}(i^{*})-\pi^{*}(i^{*})|>\epsilon)\leq e^{\frac{-2\epsilon^{2}}{(b-a)^{2}}}. As 0≤(b−a)≤10\leq(b-a)\leq 1, we have P(∣πk(i∗)−π∗(i∗)∣>ϵ)≤e−2ϵ2P(|\pi_{k}(i^{*})-\pi^{*}(i^{*})|>\epsilon)\leq e^{-2\epsilon^{2}} and, after KK time steps,

Solving for ϵ\epsilon we get, ϵ≤−log⁡(P(∣πK(i∗)−π∗(i∗)∣>ϵ))2K\epsilon\leq\frac{-\log(P(|\pi_{K}(i^{*})-\pi^{*}(i^{*})|>\epsilon))}{2K}. Thus, we draw the next optimal arm choice ii at k+1k+1 as follows:

Experiments

The knowledge used in our experiments comes from domain experts, an example of which is seen in Section 4. We aim to answer the following questions:

How effective is the knowledge for bandit arm selection?

How effective is the UCB exploration strategy for bandit arm selection?

We perform experiments on a simulated music recommendation dataset. The dataset simulates songs, artists, users, and albums where there are the following user behaviors:

Behavior A: The users are fans of one of the artists in the dataset.

Behavior B: The users follow the most popular song.

Behavior C: They follow the most popular artist.

We will denote the set of behaviors by Behaviors\mathbf{Behaviors}. Figure 2(b) shows an illustration for the Schema for the simulation model depicting that MM users can listen to NN songs and NN songs can be sung by NN artists, etc. Artists and Songs have attributes “Popular” denoting if a particular artist or a song is popular among users.

Once the simulation model is used to generate different users based on a predefined behavior ∈Behaviors\in\mathbf{Behaviors}. We need now to generate different possible user contexts from this dataset. Since the whole dataset is not available to us offline, we construct a dataset by 5050 random arm choices to induce contexts. The contexts will be represented using predicate logic clauses: antecedent (∧\land preconditions representing possible user context)   ⟹  \implies consequent (user song choice). For this, an inductive bias needs to be provided to induce sensible clauses. Such an inductive bias is included as background knowledge to the induction program. We use the method in Hayes et al. to automatically construct the inductive bias from the schema in Figure 2(b). The clauses induced are kept if they satisfy minimum information criteria i.e. if they discriminate at least one user from another in their song choice, in the dataset. The clauses induced using the provided inductive bias and are as follows:

sungBy(B,C) ∧\land ¬\lnot popular(C)  ⟹  \implieslistens(A,B). This context says User A listens to song B if song B is sungBy artist C. Also, C is not a popular artist, which describes behavior A.

sungBy(B,C) ∧\land popular(C)  ⟹  \implieslistens(A,B). This context says User A listens to song B if song B is sungBy a popular artist C, which describes behavior C.

listened(C,B)  ⟹  \implieslistens(A,B). This context says user A listens to song B if user C listened to B, which describes behavior B.

We use satisfiability of these clause antecedents as features for TILDE regression tree stumps. Figure 3 shows an example, where sigmoid of the regression values represents arm choice probability π(i)\pi(i).

1.1 Results

We compare the RB2 algorithm with KIPG and KIPGUCB. For each type of user, at time step kk, a recommendation is provided depending on the algorithm used. The regret drawn from comparison to the ground truth (GT) recommendation is recorded. The regret equation for an algorithm A\mathcal{A} is:

where i∗i^{*} is the optimal arm drawn from arg max⁡\operatorname*{arg\,max} over π(i)\pi(i) samples at step kk (See Algorithm 1,2 - line 4). rGTr^{GT} is the reward if the ground truth optimal arm is drawn at kk.

The human providing knowledge may have some previous knowledge about a user in the system. In this case, it is expected that the knowledge is pretty good from the start. In this setting, we expect the regret is ordered as RKIPG<RKIPGUCB<RRB2R_{KIPG}<R_{KIPGUCB}<R_{RB2} for most k=1k=1 to KK.We expected this trend since RB2 uses no knowledge and KIPGUCB moves slower towards knowledge initially. Given that the knowledge is perfect, we expect KIPG to perform the best. We set K=500K=500. Figure 4 shows that the experiments corroborate this.

In this setting the human again observes some user arm interactions to improve the knowledge that they provide. In this case however, the humans observation skills are less sharp. We simulate this scenario by using noisy knowledge for k=1 to 50k=1~{}to~{}50, where perfect knowledge is provided 60%60\% of the time instead of 80%80\%. Here, we expect that for most k=1toKk=1toK, where K=500K=500, RKIPGUCB<RKIPG<RRB2R_{KIPGUCB}<R_{KIPG}<R_{RB2}. We expect this as a perfection rate of 60%60\% means that the tempering of Knowledge Infusion by KIPGUCB initially leads to better total regret for KIPGUCB. Figure 6 shows this result.

2 Real-World Datasets

We also evaluate the algorithms in the following real-world datasets:

The Movie Lens dataset with relations such as user age, movietype, movie rating, etc, where the arm label is the genre of a movie. The dataset has 166486166486 relational instances .

The Drug-Drug Interaction (DDI) dataset with relations such as Enzyme, Transporter, EnzymeInducer, etc, where the arm label is the interaction between two drugs. The dataset has 17741774 relational instances .

The ICML Co-author dataset with relations such as affiliation, research interests, location, etc, where the arm label represents whether two persons worked together on a paper. The dataset has 13951395 relational instances .

The IMDB dataset with relations such as Gender, Genre, Movie, Director, etc, where the arm label is WorkUnder, i.e., if an actor works under a director. The dataset has 938938 relational instances .

The Never Ending Language Learner (NELL) data set with relations such as players, sports, league information, etc, where the arm label represents which specific sport does a particular team plays. The dataset has 78247824 relational instances .

We used 1010 boosted trees for all the experiments and results are averaged over 55 runs. It is seen that while the total regret remains high for all the datasets over several steps of learning, both the expert knowledge and the exploration strategy using the UCB method are effective in increasing performance. The performance increase is more pronounced in the Movie Lens and IMDB datasets as the expert knowledge are relatively easier to provide for human experts. For the DDI dataset and the ICML Co-authors dataset, it is not straightforward to specify which drugs might interact or which authors may work together in a diverse academic setting. Since the knowledge comes from an expert and systematically targets faster convergence to the optimal distribution, knowledge infusion is expected to perform better. If the knowledge were noisy, the error accumulation over time may have lead to sub-optimal results. In the NELL-sports dataset, it can be seen that RB2 initially outperforms both KIPG and KIPGUCB.

Conclusion and Future Work

In this study, we develop a novel algorithm KIPGUCB to perform knowledge infusion in CB settings. We show that the regret bound depends on the knowledge and hence the total regret can be reduced if the right knowledge is available. Furthermore, we develop a confidence bound to account for initial uncertainty in provided knowledge in online settings. Though we have developed a general framework for knowledge infusion, we have yet to explore knowledge forms beyond preference knowledge. Furthermore, the knowledge may depend on latent behaviors that cannot be modeled such as a bias by an actor towards a particular director. Also, the actor’s bias towards directors may keep changing as more data is seen. This type of non-stationarity and partial observability in context will be interesting to model. Also, if knowledge is noisy and fails to lower total regret, identifying the right descriptive question to ask the human to elicit new knowledge is an interesting future direction. Relational descriptions make tackling this issue plausible. Finally, it will be interesting to mathematically evaluate when the knowledge should be incorporated at all. We aim to tackle these issues in future work.

References