arXiv is now an independent nonprofit! Learn more
License: arXiv.org perpetual non-exclusive license
arXiv:1810.00093v2 [eess.SY] 02 Aug 2019

Barrier Certificates for Assured Machine Teaching

Mohamadreza Ahmadi Affiliation:  California Institute of Technology 1200 E. California Blvd., MC 104-44, Pasadena, CA 91125, USA. {mrahmadi,chenyux,yyue}@caltech.edu    Bo Wu Affiliation: Institute for Computational Engineering and Sciences (ICES), University of Texas at Austin, Peter O’Donnel Jr. Building, 201 E 24th St. Austin, TX 78712, USA. {bwu3,utopcu}@utexas.edu    Yuxin Chen Affiliation:  California Institute of Technology 1200 E. California Blvd., MC 104-44, Pasadena, CA 91125, USA. {mrahmadi,chenyux,yyue}@caltech.edu    Yisong Yue Affiliation:  California Institute of Technology 1200 E. California Blvd., MC 104-44, Pasadena, CA 91125, USA. {mrahmadi,chenyux,yyue}@caltech.edu       Ufuk Topcu Thanks: This work was supported by AFOSR FA9550-19-1-0005, DARPA D19AP00004, NSF 1646522 and NSF 1652113. Affiliation: Institute for Computational Engineering and Sciences (ICES), University of Texas at Austin, Peter O’Donnel Jr. Building, 201 E 24th St. Austin, TX 78712, USA. {bwu3,utopcu}@utexas.edu
Abstract

Machine teaching can be viewed as optimal control for learning. Given a learner’s model, machine teaching aims to determine the optimal training data to steer the learner towards a target hypothesis. In this paper, we are interested in providing assurances for machine teaching algorithms using control theory. In particular, we study a well-established learner’s model in the machine teaching literature that is captured by the local preference over a version space. We interpret the problem of teaching a preference-based learner as solving a partially observable Markov decision process (POMDP). We then show that the POMDP formulation can be cast as a special hybrid system, i.e., a discrete-time switched system. Subsequently, we use barrier certificates to verify set-theoric properties of this special hybrid system. We show how the computation of the barrier certificate can be decomposed and numerically implemented as the solution to a sum-of-squares (SOS) program. For illustration, we show how the proposed framework based on control theory can be used to verify the teaching performance of two well-known machine teaching methods.

I Introduction

From an optimal control perspective, a learning system (e.g., a machine learning algorithm, or a human learner) defines a dynamical system where the state (i.e., learner’s hypothesis) is driven by training data [1]. In this respect, machine teaching, i.e., the algorithmic framework of designing an optimal training set for learning a target hypothesis, can be viewed as optimal control for learning [2]. In a typical setting of machine teaching, the target hypothesis is given to the algorithm, and the goal of the teacher (machine) is to generate a minimal sequence of training examples such that the target hypothesis can be learned by a learner (human or another machine) from a finite set of hypotheses.

One popular learner’s model studied in the machine teaching literature is the version space learner. In such settings, the learner maintains a subset of hypotheses that are consistent with the examples received from a teacher, and outputs a hypothesis from this subset. Based on different assumptions on the learner’s behavior, multiple variants of the version space learner model has been studied in algorithmic machine teaching, leading to different notions of teaching complexity: For instance, (i) the “worst-case” model [3] assumes that the learner’s behavior is completely unpredictable, and (ii) the “preference-based” model [4] assumes that she has a global preference over the hypotheses. These models are typically studied under the batch setting, where the teacher constructs a set of examples and provides them to the learner at once. Recently, [5] considered the state-dependent preference-based model, which generalizes the preference-based model of [4] to the adaptive setting. The state-dependent preference-based model assumes that the learner’s choice of next hypothesis depends on some local preferences defined by the learner’s state (i.e., the current hypothesis). In the sequential machine teaching setting, the teacher, after showing each example, obtains feedback about the hypothesis that the learner is currently entertaining; such feedback is further utilized to guide the selection of future teaching examples.

In this paper, we use notions from hybrid systems analysis framework to study the state-dependent preference-based machine teaching model with the aim of verifying whether a given machine teaching method has assured teaching performance. We first show that state-dependent preference-based machine teaching model can be represented by a POMDP. Once this POMDP is formulated, we show that the evolution of the beliefs over the states of this POMDP can be described by a discrete-time switched system (also see [6, 7]). We use barrier certificates to verify whether the beliefs of this POMDP belong to some subset of the reachable belief space, which, in turn, corresponds to the probability of teaching of a hypothesis. From a computational standpoint, we show that these barrier certificates can be decomposed and constructed using SOS programming. We demonstrate the efficacy of our proposed methodology by comparing and analyzing two machine teaching methods.

The rest of this paper is organized as follows. We describe the state-dependent teaching model in the next section. In Section III, we propose a POMDP representation for machine teaching. In Section IV, we briefly discuss a hybrid system that describe the evolution of this POMDP. In Section V, we formulate a set of conditions based on barrier certificates for verifying the teaching performance and show how the calculations can be decomposed. In Section VI, we propose a computational approach using SOS programming to find the barrier certificates. We elucidate the proposed method with an example in Section VII and conclude the paper in Section VIII.

Notation: \mathds{R} and \mathds{N} denote the sets of real numbers and non-negative integers {0,1,2,}\{0,1,2,\ldots\}, respectively. l\mathds{N}_{\geq l}, with ll\in\mathds{N}, denotes {l,l+1,l+2,}\{l,l+1,l+2,\ldots\}. [x]\mathcal{R}[x] accounts for the set of polynomial functions with real coefficients in znz\in\mathds{R}^{n}, p:np:\mathds{R}^{n}\to\mathds{R} and Σ\Sigma\subset\mathcal{R} is the subset of polynomials with an SOS decomposition; i.e., pΣ[x]p\in\Sigma[x] if and only if there are pi[x],i{1,,k}p_{i}\in\mathcal{R}[x],~i\in\{1,\ldots,k\} such that p=pi2++pk2p=p_{i}^{2}+\cdots+p_{k}^{2}.

II The State-Dependent Teaching Model

We now state the adaptive machine teaching protocol, and describe the state-dependent learner’s model of [5].

II-1 The Teaching Domain

Let 𝒳\mathcal{X} denote a ground set of unlabeled examples, and the set 𝒴\mathcal{Y} denotes the possible labels that could be assigned to elements of 𝒳\mathcal{X}. We denote by \mathcal{H} a finite class of hypotheses, each element hh\in\mathcal{H} is a function h:𝒳𝒴h:\mathcal{X}\rightarrow\mathcal{Y}. In our model, 𝒳\mathcal{X}, \mathcal{H}, and 𝒴\mathcal{Y} are known to both the teacher and the learner. There is a target hypothesis hh^{*}\in\mathcal{H} that is known to the teacher, but not the learner. Let 𝒵𝒳×𝒴\mathcal{Z}\subseteq\mathcal{X}\times\mathcal{Y} be the ground set of labeled examples. Each element z=(xz,yz)𝒵{z}=({x}_{z},{y}^{*}_{z})\in\mathcal{Z} represents a labeled example, where the label is given by the target hypothesis hh^{*}, i.e., yz=h(xz){y}^{*}_{z}=h^{*}({x}_{z}). Here, we define the notion of version space needed to formalize our model of the learner. Given a set of labeled examples Z𝒵Z\subseteq\mathcal{Z}, the version space induced by ZZ is the subset of hypotheses (Z)\mathcal{H}(Z)\in\mathcal{H} that are consistent with labels of all the examples, i.e., (Z):={h:h and (x,y)Z,h(x)=y}\mathcal{H}(Z):=\{h:h\in\mathcal{H}\texttt{\ and\ }\forall({x},{y})\in Z,h({x})={y}\}.

II-2 State-dependent Preference-based Model

The preference function encodes the learner’s preferences of transitioning to a hypothesis. Consider that the learner’s current hypothesis is hh, and there are two hypotheses hh^{\prime}, h′′h^{\prime\prime} that they could possibly pick as the next hypothesis. We define the preference function as σ:×+\sigma:\mathcal{H}\times\mathcal{H}\rightarrow\mathbb{R}_{+}. Given current hypothesis hh and any two hypothesis h,h′′h^{\prime},h^{\prime\prime}, we say that hh^{\prime} is preferred to h′′h^{\prime\prime} from hh, iff σ(h,h)<σ(h′′,h)\sigma(h^{\prime};h)<\sigma(h^{\prime\prime};h). If σ(h,h)=σ(h′′,h)\sigma(h^{\prime};h)=\sigma(h^{\prime\prime};h), then the learner could pick either one of these two.

The learner starts with an initial hypothesis h0{h^{0}}\in\mathcal{H} before receiving any labeled examples from the teacher. Then, the interaction between the teacher and the learner proceeds in discrete time steps (trials). At any trial tt, let us denote the labeled examples received by the learner up to (but not including) time step tt via a set ZtZ^{t}, the learner’s version space as t=(Zt)\mathcal{H}^{t}=\mathcal{H}(Z^{t}), and the current hypothesis as hth^{t}. At trial tt, we model the learning dynamics as follows:

  1. 1.

    the learner receives a new labeled example, and

  2. 2.

    the learner updates the version space t+1\mathcal{H}^{t+1}, and picks the next hypothesis based on the current hypothesis hth^{t}, version space t+1\mathcal{H}^{t+1}, and the preference function σ\sigma:

ht+1{ht+1:σ(h,ht)=minht+1σ(h,ht)}.\displaystyle h^{t+1}\in\{h\in\mathcal{H}^{t+1}:\sigma({h};{h^{t}})=\min_{h^{\prime}\in\mathcal{H}^{t+1}}\sigma({h^{\prime}};{h^{t}})\}. (1)

II-3 The Teaching Protocol and Objective

The teacher’s goal is to steer the learner towards the target hypothesis hh^{*} by providing a sequence of labeled examples. At trial tt, we consider the following teaching protocol:

  1. 1.

    the teacher selects an unlabeled example xt𝒳{x}^{t}\in\mathcal{X} and presents it to the learner;

  2. 2.

    the learner makes a guess of the label, i.e. yt:=ht(xt){y}^{t}:=h^{t}({x}^{t}).

  3. 3.

    the teacher receives feedback from the learner11 1 We consider two variants of the learner feedback: (a) the teacher indirectly observes the learner’s hypothesis hth^{t} via label yt{y}^{t}; (b) the teacher directly observes the learner’s current hypothesis hth^{t}. Our analysis in the subsequent sections applies to both scenarios. For discussion simplicity we focus on the more general setting (a) in Section III-VI. and provides the true label h(xt)h^{*}({x}^{t});

  4. 4.

    the learner transitions from the current hth^{t} to the next hypothesis ht+1h^{t+1} as per the model described in the previous subsection.

  5. 5.

    Teaching finishes if the learner’s updated hypothesis ht+1=hh^{t+1}=h^{*}.

The goal of teaching algorithms is to achieve this goal in the minimal number of time steps.

The state-dependent teaching model is also found to be consistent with simple human learning models in cognitive science, including the “win-stay lose-shift” model [8, 9] (e.g., when σ(h,h)=0\sigma(h^{\prime};h)=0 if h=hh=h^{\prime} and 11 otherwise, the learner prefers to stay at the same hypothesis if it is consistent with the observed data).

III POMDP Model for Machine Teaching

Given the state-dependent teaching model as described in Section II, we can represent machine teaching as a sequential decision making under uncertainty scenario. To this end, we propose a POMDP representation for the learner based on the state-dependent teaching model. The POMDP model can be described as follows.

Definition 1 (Learning POMDP)

The learning POMDP 𝒫L\mathcal{P}_{L} is a tuple (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O)

  • the hypotheses set \mathcal{H} is a finite set of hidden states;

  • p0p_{0} is the probability of having an initial hypothesis h0h_{0}\in\mathcal{H};

  • the set of labelled examples 𝒵\mathcal{Z} constitute the finite set of actions;

  • TT describes the transitions from one hypothesis (state) to another characterized by the preference functions as given by (1);

  • 𝒴\mathcal{Y} denotes the set of observations made by the teacher.

  • O(ytht,zt)O(y_{t}\mid h_{t},z_{t}) is determined by the current hypothesis function.

Here, the observation model O(ytht,zt)O(y_{t}\mid h_{t},z_{t}) defines how the version space gets updated. When referring to the “version space” learners, we are implicitly considering the “noise-free” setting, i.e., all consistent hypotheses are uniformly distributed, or equivalently, O(ytht,zt)O(y_{t}\mid h_{t},z_{t}) is binary. Moreover, according to (1), the transition function T(h,zt1,h)T(h,z_{t-1},h^{\prime}) defines a uniform distribution: the learner only goes to the hypotheses hh^{\prime} that are the most preferred; hence, TT induces a uniform distribution over the most preferred hypothesis according to the preference function σ\sigma.

The learner starts with an initial hypothesis h0h_{0} and over a sequence of trials, in which an example zt𝒵z_{t}\in\mathcal{Z} is shown and the learner receives a corresponding observation yt𝒴y_{t}\in\mathcal{Y}, develops a belief in the new hypothesis hh. Then, the hypothesis belief evolves according to

bt(h)=O(yth,zt1)hT(h,zt1,h)bt1(h)hO(yth,zt1)hT(h,zt1,h)bt1(h),b_{t}(h^{\prime})=\\ \frac{O(y_{t}\mid h^{\prime},z_{t-1})\sum_{h\in\mathcal{H}}T(h,z_{t-1},h^{\prime})b_{t-1}(h)}{\sum_{h^{\prime}\in\mathcal{H}}O(y_{t}\mid h^{\prime},z_{t-1})\sum_{h\in\mathcal{H}}T(h,z_{t-1},h^{\prime})b_{t-1}(h)}, (2)

The objective of a teaching policy is then to assure that the learner learns the target hypothesis hh^{*}\in\mathcal{H} in tt^{*} number of trials. That is,

bt(h)λ,b_{t^{*}}(h^{*})\geq\lambda, (3)

where we refer to 0<λ10<\lambda\leq 1 as the teaching performance. In addition, given a teaching policy, we are often interested in finding the minimum number of trials such that the learner learns a target hypothesis, i.e.,

mintsubject tobt(h)λ.\displaystyle\min~t^{*}~\text{subject to}~b_{t^{*}}(h^{*})\geq\lambda. (4)

Ideally, given a pre-specified number of trials t{t^{*}}, a teaching algorithm is perfect, if λ=1\lambda=1, i.e., the probability of learning the target hypothesis after t{t^{*}} number of examples is one. However, achieving a perfect teaching algorithm in tt^{*} number of trials may not be realistic. In practice, it is desirable that we teach the target hypothesis with teaching performance λ0.75\lambda\geq 0.75.

IV Belief Evolution as a Hybrid System

Checking whether (3) holds by solving the learning POMDP directly is a PSPACE-hard problem [10]. In this section, we show that the learning POMDP can be represented as a special hybrid system [11], specifically, a discrete-time switched system [12, 13, 14].

The belief update equation (2) can be characterized as a discrete-time switched system, where the actions aAa\in A define the switching modes. Formally, the hypothesis belief dynamics (2) can be described as

bt=fz(bt1,yt),b_{t}=f_{z}\left(b_{t-1},y_{t}\right), (5)

where bb denote the belief vector belonging to the belief unit simplex \mathcal{B} and b0=p0b_{0}=p_{0}. In (5), z𝒵z\in\mathcal{Z} denote the examples that can be interpreted as the indices for the switching modes, y𝒴y\in\mathcal{Y} are the observations representing inputs, and t1t\in\mathds{N}_{\geq 1} denote the discrete time instances. The (rational) vector fields {fz}z𝒵\{f_{z}\}_{z\in\mathcal{Z}} with fz:[0,1]|𝒵|×𝒴[0,1]|𝒵|f_{z}:[0,1]^{|\mathcal{Z}|}\times\mathcal{Y}\to[0,1]^{|\mathcal{Z}|} are described as the vectors with rows

fzh(b,y)=O(yh,z)hT(h,z,h)bt1(h)hO(yh,z)hT(h,z,h)bt1(h),f_{z}^{h^{\prime}}(b,y)=\frac{O(y\mid h^{\prime},z)\sum_{h\in\mathcal{H}}T(h,z,h^{\prime})b_{t-1}(h)}{\sum_{h^{\prime}\in\mathcal{H}}O(y\mid h^{\prime},z)\sum_{h\in\mathcal{H}}T(h,z,h^{\prime})b_{t-1}(h)},

where fzhf_{z}^{h^{\prime}} denotes the hh^{\prime}th row of fzf_{z}.

We consider two classes of problems in learning POMDP verification:

  • 1.

    Arbitrary-Policy Verification: This case corresponds to analyzing (5) under arbitrary switching with switching modes determined by the examples z𝒵z\in\mathcal{Z}.

  • 2.

    Fixed-Policy Verification: This corresponds to analyzing (5) under state-dependent switching. In fact, a teaching policy π:𝒵\pi:\mathcal{B}\to\mathcal{Z} (a mapping from the hypothesis beliefs into examples) determines regions in the belief space where each mode (example) is active.

Both cases of switched systems with arbitrary switching and state-dependent switching are well-known in the systems and controls literature (see [15, 16] and references therein).

V Verifying Teaching Performance Using Barrier Certificates

In the following, we describe a method based on barrier certificates to verify the teaching performance as given by (3). We then focus on the two cases of arbitrary policy verification and fixed-policy verification. We further show that in both cases, the calculation of the barrier certificates can be decomposed.

In order to check the teaching performance, we consider following teaching-failure set

f={bbt(h)<λ},\mathcal{B}_{f}=\{b\in\mathcal{B}\mid b_{t^{*}}(h^{*})<\lambda\}, (6)

which is the complement of (3).

We have the following result.

Theorem 1

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, and a teaching performance λ\lambda, and a pre-set number of trials tt^{*}, if there exists a function B:×B:\mathds{N}\times\mathcal{B}\to\mathds{R} called the barrier certificate such that

B(t,bt)>0,btf,B(t^{*},b_{t^{*}})>0,\quad\forall b_{t^{*}}\in\mathcal{B}_{f}, (7)

with f\mathcal{B}_{f} as described in (6),

B(0,b0)<0,forb0=p0,B(0,b_{0})<0,\quad\text{for}\quad b_{0}=p_{0}, (8)

and

B(t,fz(bt1,y))B(t1,bt1)0,t{1,2,,t},z𝒵,y𝒴,b,B\left(t,f_{z}(b_{t-1},y)\right)-B(t-1,b_{t-1})\leq 0,\\ \forall t\in\{1,2,\ldots,t^{*}\},~\forall z\in\mathcal{Z},~\forall y\in\mathcal{Y},~\forall b\in\mathcal{B}, (9)

then there the teaching performance λ\lambda is satisfied, i.e., inequality (3) holds.

Proof:

The proof is carried out by contradiction. Assume at trial t{t^{*}}, the teaching performance is not satisfied. Thus, there is a solution to the hypothesis belief update equation (5) with b0=p0b_{0}=p_{0} such that bt(h)<λb_{t^{*}}(h^{*})<\lambda. From inequality (9), we have B(t,b_t) ≤B(t-1,b_t-1) for all t{1,2,,t}t\in\{1,2,\ldots,{t^{*}}\} and all examples z𝒵z\in\mathcal{Z}. Hence, B(t,bt)B(0,b0)B(t,b_{t})\leq B(0,b_{0}) for all t{1,2,,t}t\in\{1,2,\ldots,{t^{*}}\}. Furthermore, inequality (8) implies that B(0,b_0) < 0 for b0=p0b_{0}=p_{0}. Since the choice of t{t^{*}} can be arbitrary, this is a contradiction because it implies that B(t,bt)B(0,b0)<0B({t^{*}},b_{t^{*}})\leq B(0,b_{0})<0. Therefore, there exist no solution of (5) such that b0=p0b_{0}=p_{0} and btfb_{t^{*}}\in\mathcal{B}_{f} for any sequence of examples z𝒵z\in\mathcal{Z}. Hence, the teaching performance is satisfied. ∎

In practice, we may have a large number of examples. Then, finding a barrier certificate that satisfies the conditions of Theorem 1 becomes prohibitive to compute. In the next result, we show how the calculation of the barrier certificate can be decomposed into finding a set of barrier certificates for each example and then taking the convex hull of them.

Theorem 2

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, a teaching performance λ\lambda, and a pre-set number of trials tt^{*}, if there exists a set of function Bz:×B_{z}:\mathds{N}\times\mathcal{B}\to\mathds{R}, z𝒵z\in\mathcal{Z}, such that

Bz(t,bt)>0,btf,z𝒵,B_{z}(t^{*},b_{t^{*}})>0,\quad\forall b_{t^{*}}\in\mathcal{B}_{f},~~\forall z\in\mathcal{Z}, (10)

with f\mathcal{B}_{f} as described in (6),

Bz(0,b0)<0,forb0=p0,z𝒵,B_{z}(0,b_{0})<0,\quad\text{for}\quad b_{0}=p_{0},~~\forall z\in\mathcal{Z}, (11)

and

Bz(t,fz(bt1,y))Bz(t1,bt1)0,t{1,2,,t},z𝒵,y𝒴,b,B_{z}\left(t,f_{z}(b_{t-1},y)\right)-B_{z}(t-1,b_{t-1})\leq 0,\\ \forall t\in\{1,2,\ldots,t^{*}\},~\forall z\in\mathcal{Z},~\forall y\in\mathcal{Y},~\forall b\in\mathcal{B}, (12)

then there the teaching performance λ\lambda is satisfied, i.e., inequality (3) holds. Furthermore, the overall barrier certificate is given by B=co{Bz}x𝒵B=\text{co}\{B_{z}\}_{x\in\mathcal{Z}}.

Proof:

The proof was omitted due to lack of space here. Please refer to the extended version [17]. ∎

The efficacy of the above result is that we can search for each example-based barrier certificate BzB_{z}, z𝒵z\in\mathcal{Z}, independently or in parallel and then verify whether the overall teaching algorithm (described by the learning POMDP) satisfies a pre-specified teaching performance (see Fig. 1 for an illustration).

Next, we demonstrate that, if a teaching policy is given, the search for the barrier certificate can be decomposed into the search for a set of local barrier certificates. As discussed earlier, a teaching policy π:𝒵\pi:\mathcal{B}\to\mathcal{Z} assigns an example to different regions of the belief space (refer to Section IV). Without loss of generality, we consider policies of the form

π(b)={z1,b1,z|𝒵|,bN,\pi(b)=\begin{cases}z_{1},&b\in\mathcal{B}_{1},\\ \vdots&\vdots\\ z_{|\mathcal{Z}|},&b\in\mathcal{B}_{N},\end{cases} (13)

where NN denotes the number of partitions of \mathcal{B} and i=1Ni=\cup_{i=1}^{N}\mathcal{B}_{i}=\mathcal{B}. Note that the number of partitions and the number of examples are not necessarily equal. We denote by ziz_{i} the example active in the partition i\mathcal{B}_{i}.

Theorem 3

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, a teaching performance λ\lambda, a teaching policy π:𝒵\pi:\mathcal{B}\to\mathcal{Z} as described in (13), and a pre-set number of trials tt^{*}, if there exists a set of function Bi:×iB_{i}:\mathds{N}\times\mathcal{B}_{i}\to\mathds{R}, i{1,2,,N}i\in\{1,2,\ldots,N\}, such that

Bi(t,bt)>0,btfi,i{1,2,,N},B_{i}(t^{*},b_{t^{*}})>0,\quad\forall b_{t^{*}}\in\mathcal{B}_{f}\cap\mathcal{B}_{i},~~i\in\{1,2,\ldots,N\}, (14)

with f\mathcal{B}_{f} as described in (6),

Bi(0,b0)<0,forb0=p0,i{1,2,,N},B_{i}(0,b_{0})<0,\quad\text{for}\quad b_{0}=p_{0},~~i\in\{1,2,\ldots,N\}, (15)

and

Bi(t,fzi(bt1,y))Bi(t1,bt1)0,t{1,2,,t},y𝒴,bi,i{1,2,,N},B_{i}\left(t,f_{z_{i}}(b_{t-1},y)\right)-B_{i}(t-1,b_{t-1})\leq 0,\\ \forall t\in\{1,2,\ldots,t^{*}\},~\forall y\in\mathcal{Y},~\forall b\in\mathcal{B}_{i},\\ ~i\in\{1,2,\ldots,N\}, (16)

then there the teaching performance λ\lambda is satisfied, i.e., inequality (3) holds. Furthermore, the overall barrier certificate is given by B=co{Bi}i=1NB=\text{co}\{B_{i}\}_{i=1}^{N}.

Proof:

The proof was omitted due to lack of space here. Please refer to the extended version [17]. ∎

Refer to caption
Fig. 1: Decomposing the barrier certificate computation for a learning POMDP with two examples z1z_{1} and z2z_{2}: the zero-level sets of Bz1B_{z_{1}} and Bz2B_{z_{2}} at trial tt^{*} separate the evolutions of the hypothesis beliefs starting at b0b_{0} from f\mathcal{B}_{f}. The green line illustrate the zero-level set of the barrier certificate formed by taking the convex hull of Bz1B_{z_{1}} and Bz2B_{z_{2}}.

We proposed two techniques for decomposing the construction of the barrier certificates and checking a pre-set teaching performance. Our method relied on barrier certificates that take the form of the convex hull of a set of local barrier certificates (see similar results in [18, 19]). Though the convex hull barrier certificate may introduce a level of conservatism, it is computationally easier to find (as will be discussed in more detail in the next section). We remark that another technique that can be used for decomposition may use non-smooth barrier certificates [20], i.e., max or min of a set of local barrier certificates.

VI Computational Method via SOS Programming

In this section, we propose techniques for finding the barrier certificates and checking whether a teaching performance is satisfied using SOS programming [21, 22].

In order to cast the conditions of Theorem 1-3 into SOS programs, we need polynomial/rational variables and require the associated sets to be semi-algebraic. Fortunately, these requirements naturally fit our problem. The hypothesis belief space is a semi-algebraic set. Moreover, the right-hand side of the belief update equation (5) is composed of rational functions in the belief states bt(h)b_{t}(h)hh\in\mathcal{H}. That is,

bt(h)=Sz(bt1(h),yt1)Rz(bt1(h),yt1)=O(h,zt1,yt)hT(h,zt1,h)bt1(h)hO(h,zt1,yt)hT(h,zt1,h)bt1(h).b_{t}(h^{\prime})=\frac{S_{z}\left(b_{t-1}(h^{\prime}),y_{t-1}\right)}{R_{z}\left(b_{t-1}(h^{\prime}),y_{t-1}\right)}\\ =\frac{O(h^{\prime},z_{t-1},y_{t})\sum_{h\in\mathcal{H}}T(h,z_{t-1},h^{\prime})b_{t-1}(h)}{\sum_{h^{\prime}\in\mathcal{H}}O(h^{\prime},z_{t-1},y_{t})\sum_{h\in\mathcal{H}}T(h,z_{t-1},h^{\prime})b_{t-1}(h)}. (17)

Furthermore, the teaching-failure set (6) is a semi-algebraic set.

At this point, we present conditions based on SOS programs to verify a given teaching performance of a teaching algorithm.

Corollary 1

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, a teaching performance λ\lambda, and a pre-set number of trials tt^{*}, if there exist polynomial functions B[t,b]B\in\mathcal{R}[t,b] of degree dd and pfΣ[b]p^{f}\in{\Sigma}[b], and constants s1,s2>0s_{1},s_{2}>0 such that

B(t,bt)+pf(bt)(bt(h)λ)s1Σ[bt],B\left({t^{*}},b_{t^{*}}\right)+p^{f}(b_{t^{*}})\left(b_{t^{*}}(h^{*})-\lambda\right)-s_{1}\in\Sigma\left[b_{t^{*}}\right], (18)
B(0,p0)s2>0,-B\left(0,p_{0}\right)-s_{2}>0, (19)

and

Rz(bt1)d(B(t,Sz(bt1,y)Rz(bt1,y))B(t1,bt1)CLOSEΣ[t,bt1],t{1,2,,t},y𝒴,z𝒵,-{R_{z}\left(b_{t-1}\right)}^{d}\bigg(B\left(t,\frac{S_{z}\left(b_{t-1},y\right)}{R_{z}\left(b_{t-1},y\right)}\right)-B(t-1,b_{t-1})\\ \in\Sigma[t,b_{t-1}],\forall t\in\{1,2,\ldots,{t^{*}}\},~y\in\mathcal{Y},~z\in\mathcal{Z}, (20)

then there exists no solution of (5) such that b0=p0b_{0}=p_{0} and btfb_{t^{*}}\in\mathcal{B}_{f} and, hence, the teaching performance is satisfied.

Proof:

The proof was omitted due to lack of space here. Please refer to the extended version [17]. ∎

Similarly, we can formulate SOS feasibility conditions for checking the inequalities in Theorem 2.

Corollary 2

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, a teaching performance λ\lambda, and a pre-set number of trials tt^{*}, if there exist polynomial functions Bz[t,b]B_{z}\in\mathcal{R}[t,b], z𝒵z\in\mathcal{Z}, of degree dd and pzfΣ[b]p^{f}_{z}\in{\Sigma}[b], z𝒵z\in\mathcal{Z}, and constants sz1,sz2>0s^{1}_{z},s^{2}_{z}>0, z𝒵z\in\mathcal{Z}, such that

Bz(t,bt)+pzf(bt)(bt(h)λ)s1zΣ[bt],z𝒵,B_{z}\left({t^{*}},b_{t^{*}}\right)+p^{f}_{z}(b_{t^{*}})\left(b_{t^{*}}(h^{*})-\lambda\right)\\ -s^{1}_{z}\in\Sigma\left[b_{t^{*}}\right],~~z\in\mathcal{Z}, (21)
Bz(0,p0)sz2>0,z𝒵,-B_{z}\left(0,p_{0}\right)-s_{z}^{2}>0,~~z\in\mathcal{Z}, (22)

and

Rz(bt1)d(Bx(t,Sz(bt1,y)Rz(bt1,y))Bx(t1,bt1))Σ[t,bt1],t{1,2,,t},y𝒴,z𝒵,-{R_{z}\left(b_{t-1}\right)}^{d}\bigg(B_{x}\left(t,\frac{S_{z}\left(b_{t-1},y\right)}{R_{z}\left(b_{t-1},y\right)}\right)-B_{x}(t-1,b_{t-1})\bigg)\\ \in\Sigma[t,b_{t-1}],\forall t\in\{1,2,\ldots,{t^{*}}\},\\ ~y\in\mathcal{Y},~z\in\mathcal{Z}, (23)

then there exists no solution of (5) such that b0=p0b_{0}=p_{0} and btfb_{t^{*}}\in\mathcal{B}_{f} and, hence, the teaching performance is satisfied.

We assume that a teaching policy in the form of (13) assigns examples to semi-algebraic partitions of the hypothesis belief space \mathcal{B} described as

i={bgi(b)0},i{1,2,,N}.\mathcal{B}_{i}=\left\{b\in\mathcal{B}\mid g_{i}(b)\leq 0\right\},~~i\in\{1,2,\ldots,N\}. (24)

We then have the following SOS formulation for Theorem 3 using Positivstellensatz.

Corollary 3

Given the learning POMDP  (,p0,𝒵,T,𝒴,O)(\mathcal{H},p_{0},\mathcal{Z},T,\mathcal{Y},O), a target hypothesis hh^{*}\in\mathcal{H}, a teaching performance λ\lambda, a teaching policy π:𝒵\pi:\mathcal{B}\to\mathcal{Z} as described in (13), a teaching performance λ\lambda, and a pre-set number of trials tt^{*}, if there exist polynomial functions Bi[t,b]B_{i}\in\mathcal{R}[t,b], i{1,2,,N}i\in\{1,2,\ldots,N\}, of degree dd, pil1Σ[b]p^{l_{1}}_{i}\in{\Sigma}[b], i{1,2,,N}i\in\{1,2,\ldots,N\}, pil2Σ[b]p^{l_{2}}_{i}\in{\Sigma}[b], i{1,2,,N}i\in\{1,2,\ldots,N\}, pil3Σ[b]p^{l_{3}}_{i}\in{\Sigma}[b], i{1,2,,N}i\in\{1,2,\ldots,N\}, and pifΣ[b]p^{f}_{i}\in{\Sigma}[b], i{1,2,,N}i\in\{1,2,\ldots,N\}, and constants si1,si2>0s^{1}_{i},s^{2}_{i}>0, i{1,2,,N}i\in\{1,2,\ldots,N\}, such that

Bi(t,bt)+pif(bt)(bt(h)λ)+pil1(bt)gi(bt)s1iΣ[bt],i{1,2,,N},B_{i}\left({t^{*}},b_{t^{*}}\right)+p^{f}_{i}(b_{t^{*}})\left(b_{t^{*}}(h^{*})-\lambda\right)+p^{l_{1}}_{i}(b_{t^{*}})g_{i}(b_{t^{*}})\\ -s^{1}_{i}\in\Sigma\left[b_{t^{*}}\right],~~i\in\{1,2,\ldots,N\}, (25)
Bi(0,p0)+pil2(p0)gi(p0)si2>0,i{1,2,,N},-B_{i}\left(0,p_{0}\right)+p^{l_{2}}_{i}(p_{0})g_{i}(p_{0})-s_{i}^{2}>0,~~i\in\{1,2,\ldots,N\}, (26)

and

Rz(bt1)d(Bi(t,Sz(bt1,y)Rz(bt1,y))Bi(t1,bt1))+pl3i(bt1)gi(bt1)Σ[t,bt1],t{1,2,,t},y𝒴,z𝒵,i{1,2,,N},-{R_{z}\left(b_{t-1}\right)}^{d}\bigg(B_{i}\left(t,\frac{S_{z}\left(b_{t-1},y\right)}{R_{z}\left(b_{t-1},y\right)}\right)-B_{i}(t-1,b_{t-1})\bigg)\\ +p^{l_{3}}_{i}(b_{t-1})g_{i}(b_{t-1})\in\Sigma[t,b_{t-1}],\forall t\in\{1,2,\ldots,{t^{*}}\},\\ ~y\in\mathcal{Y},~z\in\mathcal{Z},~~i\in\{1,2,\ldots,N\}, (27)

then there exists no solution of (5) such that b0=p0b_{0}=p_{0} and btfb_{t^{*}}\in\mathcal{B}_{f} and, hence, the teaching performance is satisfied.

Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
(a) Myopic
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
Refer to caption
(b) Ada-L
Fig. 2: Teaching sequences generated by Myopic and Ada-L algorithms on a 4×44\times 4 lattice, with h0=(1,1),h=(3,4)h_{0}=(1,1),h^{*}=(3,4). The learner’s initial hypothesis is marked by orange, and the target is marked by green. The dark gray square represents the teaching example at the current time step, while light gray squares represent the previous teaching examples.

VII Example

In order to illustrate the proposed framework, we consider a toy scenario, where the teacher aims to teach/steer a human learner to reach a goal state in a physical environment. Each hypothesis/node corresponds to some unexplored territory, and there exists an example which flags the territory as explored. The learner prefers local moves, and if all neighboring territories are explored, the learner jumps to the next closest one.

The physical environment is characterized by a 4×44\times 4 lattice corresponding to 1616 hypotheses. The target hypothesis is located at h=(4,4)h^{*}=(4,4). The teacher has 1616 choices of locations on the lattice to show to the student as examples. The student then receives two labels based on its answer y{1,1}y\in\{-1,1\}. The preference function σ(h,h)\sigma(h^{\prime};h) is given by the minimum distance between hypotheses described by 1(h,h)\ell_{1}(h^{\prime};h).

In this example, we compare two teaching algorithms in the adaptive setting, where the teacher observes the learner’s hypothesis at each iteration. The Myopic algorithm is a greedy approach which, at each iteration, picks the teaching example such that after observing the label, the worst-case rank of the target hypothesis in the learner’s resulting version space is the smallest. The Ada-L algorithm aims to teach the learner some intermediate hypothesis at each iteration, i.e., it aims to direct the learner to transit to a hypothesis that is “closer” to the target hypothesis. For more details of the algorithms please refer to [5].

Each algorithm provides a set of policies for which we seek to find the minimum number of trials such that the following teaching performance is assured

bt(h)λ.b_{t^{*}}(h^{*})\geq\lambda.

To this end, we minimize the number of trials tt^{*} such that (27)-(29) are satisfied. We start by a large number of trials (1616 in this case) and decrease it until no barrier certificate can be found to verify the teaching performance. We fix the degree of variables BiB_{i}, pil1p^{l_{1}}_{i}, pil2p^{l_{2}}_{i}, pil3p^{l_{3}}_{i}, and pifΣ[b]p^{f}_{i}\in{\Sigma}[b], i{1,2,,N}i\in\{1,2,\ldots,N\} in Corollary 3 to 22 and search for the certificates. In order to check the SOS conditions formulated in Section VI, we use diagonally-dominant-SOS (DSOS) relaxations of the SOS programs implemented through the SPOTless tool [23] (for more details see [24, 25]).

The results on finding the minimum number of trials tt^{*} for which the teaching performance is satisfied were as follows.

VII-1 h0=(1,1)h_{0}=(1,1) and h=(3,4)h^{*}=(3,4)

For the Myopic algorithm, we could not find any certificate for λ=0.8\lambda=0.8. Changing the the teaching performance to λ=0.55\lambda=0.55 yielded certificates for only t=15t^{*}=15. On the other hand, for the Ada-L algorithm, we obtained t=9t^{*}=9 assuring teaching performance λ=0.8\lambda=0.8 and t=10t^{*}=10 assuring teaching performance λ=0.9\lambda=0.9.

The results can also be corroborated from simulations. As can be see in Figure 2, the Myopic algorithm perform poorly on simple teaching tasks as compared to the Ada-L algorithm.

VIII CONCLUSIONS

We presented a method based on barrier certificates to assure the performance of machine teaching algorithms. Our computational method was in terms of SOS programs, where we used DSOS relaxations. It was shown in [26] that using sparse SOS (SSOS) programs leads to more efficient and less conservative results. Future work can explore the use of more scalable SOS relaxations such as SSOS.

References

  • [1] L. Lessard, X. Zhang, and X. Zhu, “An optimal control approach to sequential machine teaching,” arXiv preprint arXiv:1810.06175, 2018.
  • [2] X. Zhu, “Machine teaching: An inverse problem to machine learning and an approach toward optimal education.” in AAAI, 2015, pp. 4083–4087.
  • [3] S. A. Goldman and M. J. Kearns, “On the complexity of teaching,” Journal of Computer and System Sciences, vol. 50, no. 1, pp. 20–31, 1995.
  • [4] Z. Gao, C. Ries, H. U. Simon, and S. Zilles, “Preference-based teaching,” JMLR, vol. 18, no. 31, pp. 1–32, 2017.
  • [5] Y. Chen, A. Singla, O. M. Aodha, P. Perona, and Y. Yue, “Understanding the role of adaptivity in machine teaching: The case of version space learners,” in Proc. Conference on Neural Information Processing Systems (NeurIPS), December 2018.
  • [6] M. Ahmadi, B. Wu, H. Lin, and U. Topcu, “Privacy verification in POMDPs via barrier certificates,” in Decision and Control (CDC), 2018 IEEE 57th Annual Conference on,, 2018.
  • [7] M. Ahmadi, M. Cubuktepe, N. Jansen, and U. Topcu, “Verification of uncertain POMDPs using barrier certificates,” in 56th Annual Allerton Conference on Communication, Control, and Computing,, 2018.
  • [8] E. Bonawitz, S. Denison, A. Gopnik, and T. L. Griffiths, “Win-stay, lose-sample: A simple sequential algorithm for approximating bayesian inference,” Cognitive psychology, vol. 74, pp. 35–65, 2014.
  • [9] A. N. Rafferty, E. Brunskill, T. L. Griffiths, and P. Shafto, “Faster teaching via pomdp planning,” Cognitive science, vol. 40, no. 6, pp. 1290–1332, 2016.
  • [10] K. Chatterjee, M. Chmelík, and M. Tracol, “What is decidable about partially observable Markov decision processes with ω\omega-regular objectives,” Journal of Computer and System Sciences, vol. 82, no. 5, pp. 878–911, 2016.
  • [11] R. Goebel, R. G. Sanfelice, and A. R. Teel, “Hybrid dynamical systems,” IEEE Control Systems, vol. 29, no. 2, pp. 28–93, 2009.
  • [12] A. A. Ahmadi and P. A. Parrilo, “Non-monotonic Lyapunov functions for stability of discrete time nonlinear and switched systems,” in Decision and Control, 2008. CDC 2008. 47th IEEE Conference on. IEEE, 2008, pp. 614–621.
  • [13] A. Kundu and D. Chatterjee, “On stability of discrete-time switched systems,” Nonlinear Analysis: Hybrid Systems, vol. 23, pp. 191 – 210, 2017.
  • [14] W. Zhang, A. Abate, J. Hu, and M. P. Vitus, “Exponential stabilization of discrete-time switched linear systems,” Automatica, vol. 45, no. 11, pp. 2526–2536, 2009.
  • [15] D. Liberzon, Switching in Systems and Control, ser. Systems & Control: Foundations & Applications. Birkhäuser Boston, 2003.
  • [16] J. P. Hespanha, “Uniform stability of switched linear systems: Extensions of LaSalle’s invariance principle,” IEEE Transactions on Automatic Control, vol. 49, no. 4, pp. 470–482, 2004.
  • [17] M. Ahmadi, B. Wu, Y. Chen, Y. Yue, and U. Topcu, “Barrier certificates for assured machine teaching,” arXiv preprint arXiv:1810.00093, 2018.
  • [18] M. Ahmadi, A. Israel, and U. Topcu, “Safety assessment based on physically-viable data-driven models,” in 2017 IEEE 56th Annual Conference on Decision and Control (CDC), Dec 2017, pp. 6409–6414.
  • [19] M. Ahmadi, A. Israel, and U. Topcu, “Controller Synthesis for Safety of Physically-Viable Data-Driven Models,” ArXiv e-prints, Jan. 2018.
  • [20] P. Glotfelter, J. Cortés, and M. Egerstedt, “Nonsmooth barrier functions with applications to multi-robot systems,” IEEE Control Systems Letters, vol. 1, no. 2, pp. 310–315, Oct 2017.
  • [21] P. Parrilo, “Structured semidefinite programs and semialgebraic geometry methods in robustness and optimization,” Ph.D. dissertation, California Institute of Technology, 2000.
  • [22] S. Prajna, A. Papachristodoulou, P. Seiler, and P. Parrilo, “SOSTOOLS: Sum of squares optimization toolbox for MATLAB V3.00,” 2013.
  • [23] A. Megretski, “Systems polynomial optimization tools (SPOT),” 2010. [Online]. Available: https://github.com/anirudhamajumdar/spotless/tree/spotless_isos
  • [24] A. A. Ahmadi and A. Majumdar, “DSOS and SDSOS optimization: more tractable alternatives to sum of squares and semidefinite optimization,” arXiv preprint arXiv:1706.02586, 2017.
  • [25] A. A. Ahmadi, G. Hall, A. Papachristodoulou, J. Saunderson, and Y. Zheng, “Improving efficiency and scalability of sum of squares optimization: Recent advances and limitations,” in 2017 IEEE 56th Annual Conference on Decision and Control (CDC), Dec 2017, pp. 453–462.
  • [26] Y. Zheng, G. Fantuzzi, and A. Papachristodoulou, “Sparse sum-of-squares (SOS) optimization: A bridge between DSOS/SDSOS and SOS optimization for sparse polynomials,” arXiv preprint arXiv:1807.05463, 2018.