Title: SOFTMAX Q-DISTRIBUTION ESTIMATION FOR STRUC-TURED PREDICTION: A THEORETICAL INTERPRETA-TION FOR RAML

Abstract: Reward augmented maximum likelihood (RAML), a simple and effective learning framework to directly optimize towards the reward function in structured prediction tasks, has led to a number of impressive empirical successes. RAML incorporates task-specific reward by performing maximum-likelihood updates on candidate outputs sampled according to an exponentiated payoff distribution, which gives higher probabilities to candidates that are close to the reference output. While RAML is notable for its simplicity, efficiency, and its impressive empirical successes, the theoretical properties of RAML, especially the behavior of the exponentiated payoff distribution, has not been examined thoroughly. In this work, we introduce softmax Q-distribution estimation, a novel theoretical interpretation of RAML, which reveals the relation between RAML and Bayesian decision theory. The softmax Q-distribution can be regarded as a smooth approximation of the Bayes decision boundary, and the Bayes decision rule is achieved by decoding with this Qdistribution. We further show that RAML is equivalent to approximately estimating the softmax Q-distribution, with the temperature τ controlling approximation error. We perform two experiments, one on synthetic data of multi-class classification and one on real data of image captioning, to demonstrate the relationship between RAML and the proposed softmax Q-distribution estimation method, verifying our theoretical analysis. Additional experiments on three structured prediction tasks with rewards defined on sequential (named entity recognition), tree-based (dependency parsing) and irregular (machine translation) structures show notable improvements over maximum likelihood baselines.

1. INTRODUCTION:

Many problems in machine learning involve structured prediction, i.e., predicting a group of outputs that depend on each other. Recent advances in sequence labeling (Ma & Hovy, 2016) , syntactic parsing (McDonald et al., 2005) and machine translation (Bahdanau et al., 2015) benefit from the development of more sophisticated discriminative models for structured outputs, such as the seminal work on conditional random fields (CRFs) (Lafferty et al., 2001) and large margin methods (Taskar et al., 2004) , demonstrating the importance of the joint predictions across multiple output components.

A principal problem in structured prediction is direct optimization towards the task-specific metrics (i.e., rewards) used in evaluation, such as token-level accuracy for sequence labeling or BLEU score for machine translation. In contrast to maximum likelihood (ML) estimation which uses likelihood to serve as a reasonable surrogate for the task-specific metric, a number of techniques (Taskar et al., 2004; Gimpel & Smith, 2010; Volkovs et al., 2011; Shen et al., 2016) have emerged to incorporate task-specific rewards in optimization. Among these methods, reward augmented maximum likelihood (RAML) (Norouzi et al., 2016) has stood out for its simplicity and effectiveness, leading to state-ofthe-art performance on several structured prediction tasks, such as machine translation (Wu et al., 2016) and image captioning (Liu et al., 2016) . Instead of only maximizing the log-likelihood of the ground-truth output as in ML, RAML attempts to maximize the expected log-likelihood of all possible candidate outputs w.r.t. the exponentiated payoff distribution, which is defined as the normalized exponentiated reward. By incorporating task-specific reward into the payoff distribution, RAML combines the computational efficiency of ML with the conceptual advantages of reinforcement learning (RL) algorithms that optimize the expected reward (Ranzato et al., 2016; Bahdanau et al., 2017) . Simple as RAML appears to be, its empirical success has piqued interest in analyzing and justifying RAML from both theoretical and empirical perspectives. In their pioneering work, Norouzi et al. (2016) showed that both RAML and RL optimize the KL divergence between the exponentiated payoff distribution and model distribution, but in opposite directions. Moreover, when applied to log-linear model, RAML can also be shown to be equivalent to the softmax-margin training method (Gimpel & Smith, 2010; Gimpel, 2012) . Nachum et al. (2016) applied the payoff distribution to improve the exploration properties of policy gradient for model-free reinforcement learning. Despite these efforts, the theoretical properties of RAML, especially the interpretation and behavior of the exponentiated payoff distribution, have largely remained under-studied ( §2). First, RAML attempts to match the model distribution with the heuristically designed exponentiated payoff distribution whose behavior has largely remained under-appreciated, resulting in a non-intuitive asymptotic property. Second, there is no direct theoretical proof showing that RAML can deliver a prediction function better than ML. Third, no attempt (to our best knowledge) has been made to further improve RAML from the algorithmic and practical perspectives.

In this paper, we attempt to resolve the above-mentioned under-studied problems by providing an theoretical interpretation of RAML. Our contributions are three-fold: (1) Theoretically, we introduce the framework of softmax Q-distribution estimation, through which we are able to interpret the role the payoff distribution plays in RAML ( §3). Specifically, the softmax Q-distribution serves as a smooth approximation to the Bayes decision boundary. By comparing the payoff distribution with this softmax Q-distribution, we show that RAML approximately estimates the softmax Q-distribution, therefore approximating the Bayes decision rule. Hence, our theoretical results provide an explanation of what distribution RAML asymptotically models, and why the prediction function provided by RAML outperforms the one provided by ML. (2) Algorithmically, we further propose softmax Q-distribution maximum likelihood (SQDML) which improves RAML by achieving the exact Bayes decision boundary asymptotically. (3) Experimentally, through one experiment using synthetic data on multi-class classification and one using real data on image captioning, we verify our theoretical analysis, showing that SQDML is consistently as good or better than RAML on the task-specific metrics we desire to optimize. Additionally, through three structured prediction tasks in natural language processing (NLP) with rewards defined on sequential (named entity recognition), tree-based (dependency parsing) and complex irregular structures (machine translation), we deepen the empirical analysis of Norouzi et al. (2016) , showing that RAML consistently leads to improved performance over ML on task-specific metrics, while ML yields better exact match accuracy ( §4).

2. BACKGROUND:

2.1 NOTATIONS Throughout we use uppercase letters for random variables (and occasionally for matrices as well), and lowercase letters for realizations of the corresponding random variables. Let X ∈ X be the input, and Y ∈ Y be the desired structured output, e.g., in machine translation X and Y are French and English sentences, resp. We assume that the set of all possible outputs Y is finite. For instance, in machine translation all English sentences are up to a maximum length. r(y, y * ) denotes the task-specific reward function (e.g., BLEU score) which evaluates a predicted output y against the ground-truth y * .

Let P denote the true distribution of the data, i.e., (X, Y ) ∼ P , and D = {(x i , y i )} n i=1 be our training samples, where {x i , i = 1, . . . , n} (resp. y i ) are usually i.i.d. samples of X (resp. Y ). Let P = {P θ : θ ∈ Θ} denote a parametric statistical model indexed by parameter θ ∈ Θ, where Θ is the parameter space. Some widely used parametric models are conditional log-linear models (Lafferty et al., 2001) and deep neural networks (Sutskever et al., 2014) (details in Appendix D.2). Once the parametric statistical model is learned, given an input x, model inference (a.k.a. decoding) is performed by finding an output y * achieving the highest conditional probability:

y * = argmax y∈Y P θ (y|x) (1)

where θ is the set of parameters learned on training data D.

2.2. MAXIMUM LIKELIHOOD:

Maximum likelihood minimizes the negative log-likelihood of the parameters given training data:

EQUATION

where P (X) and P (•|X) is derived from the empirical distribution of training data D:

EQUATION

and I(•) is the indicator function. From (2), ML attempts to learn a conditional model distribution P θML (•|X = x) that is as close to the conditional empirical distribution P (•|X = x) as possible, for each x ∈ X . Theoretically, under certain regularity conditions (Wasserman, 2013) , asymptotically as n → ∞, P θML (•|X = x) converges to the true distribution

P (•|X = x), since P (•|X = x) converges to P (•|X = x) for each x ∈ X .

2.3. REWARD AUGMENTED MAXIMUM LIKELIHOOD:

As proposed in Norouzi et al. (2016) , RAML incorporates task-specific rewards by re-weighting the log-likelihood of each possible candidate output proportionally to its exponentiated scaled reward:

EQUATION

where the reward information is encoded by the exponentiated payoff distribution with the temperature τ controlling it smoothness q(y|y * ; τ ) = exp(r(y, y * )/τ ) Norouzi et al. (2016) showed that (4) can be re-expressed in terms of KL divergence as follows:

EQUATION

EQUATION

)

where P is the empirical distribution in (3).

Discussion:

As discussed in Norouzi et al. (2016) , the globally optimal solution of RAML is achieved when the learned model distribution matches the exponentiated payoff distribution, i.e., P θRAML (•|X = x) = q(•|Y = y; τ ) for each (x, y) ∈ D with some fixed value of τ . It makes the payoff distribution appear to be the "target" that the model is attempting to learn. Though both P θRAML (•|X = x) and q(•|Y = y; τ ) are distributions defined over the output space Y, the latter is conditioned on the output Y which appears to serve as ground-truth but is sampled from data distribution P . This makes the behavior of RAML attempting to match them unintuitive; Specifically, supposing that in the training data there exist two training instances with the same input but different outputs, i.e., (x, y), (x, y ) ∈ D. Then P θRAML (•|X = x) has two "targets" q(•|Y = y; τ ) and q(•|Y = y ; τ ), making it unclear what distribution P θRAML (•|X = x) asymptotically converges to.

Open Problems in RAML Based on the discussion above, we identify two open issues in the theoretical interpretation of RAML: i) What is the (asymptotically) globally optimal solution of RAML, i.e. what distribution P θRAML (•|X = x) (asymptotically) converges to; ii) There is no rigorous theoretical evidence showing that generating from P θRAML (y|x) yields a better prediction function than generating from P θML (y|x).

To our best knowledge, no attempt has been made to theoretically address these problems. The main goal of this work is to theoretically analyze the properties of RAML, in hope that we may eventually better understand it by answering these questions and further improve it by proposing new training framework. To this end, in the next section we introduce a softmax Q-distribution estimation framework, facilitating our later analysis.

3. SOFTMAX Q-DISTRIBUTION ESTIMATION:

With the end goal of theoretically interpreting RAML in mind, in this section we present the softmax Q-distribution estimation framework. We first provide background on Bayesian decision theory ( §3.1) and softmax approximation of deterministic distributions ( §3.2). Then, we propose the softmax Q-distribution ( §3.3), and establish the framework of estimating the softmax Q-distribution from training data, called softmax Q-distribution maximum likelihood (SQDML, §3.4). In §3.5, we analyze SQDML, which is central in linking RAML and softmax Q-distribution estimation.

3.1. BAYESIAN DECISION THEORY:

Bayesian decision theory is a fundamental statistical approach to the problem of pattern classification, which quantifies the trade-offs between various classification decisions using the probabilities and rewards (losses) that accompany such decisions.

Based on the notations setup in §2.1, let H denote all the possible prediction functions from input to output space, i.e., H = {h : X → Y}. Then, the expected reward of a prediction function h is:

EQUATION

where r(•, •) is the reward function accompanied with the structured prediction task.

Bayesian decision theory states that the global maximum of R(h), i.e., the optimal expected prediction reward is achieved when the prediction function is the so-called Bayes decision rule:

EQUATION

where

R(y|x) = E P (Y |X=x) [r(y, Y )

] is called the conditional reward. Thus, the Bayes decision rule states that to maximize the overall reward, compute the conditional reward for each output y ∈ Y and then select the output y for which R(y|x) is maximized.

Importantly, when the reward function is the indicator function, i.e., I(y = y ), the Bayes decision rule reduces to a specific instantiation called the Bayes classifier:

EQUATION

where P (Y |X = x) is the true conditional distribution of data defined in §2.1.

In §2.2, we see that ML attempts to learn the true distribution P . Thus, in the optimal case, decoding from the distribution learned with ML, i.e., P θML (Y |X = x), produces the Bayes classifier h c (x), but not the more general Bayes decision rule h * (x). In the rest of this section, we derive a theoretical proof showing that decoding from the distribution learned with RAML, i.e., P θRAML (Y |X = x) approximately achieves h * (x), illustrating why RAML yields a prediction function with improved performance towards the optimized reward function r(•, •) over ML.

3.2. SOFTMAX APPROXIMATION OF DETERMINISTIC DISTRIBUTIONS:

Aimed at providing a smooth approximation of the Bayes decision boundary determined by the Bayes decision rule in (8), we first describe a widely used approximation of deterministic distributions using the softmax function.

Let F = {f k : k ∈ K} denote a class of functions, where f k : X → R, ∀k ∈ K. We assume that K is finite. Then, we define the random variable Z = argmax k∈K f k (X) where X ∈ X is our input random variable. Obviously, Z is deterministic when X is given, i.e.,

EQUATION

)

for each z ∈ K and x ∈ X .

The softmax function provides a smooth approximation of the point distribution in (10), with a temperature parameter, τ > 0, serving as a hyper-parameter that controls the smoothness of the approximating distribution around the target one:

EQUATION

It should be noted that at τ → 0, the distribution Q reduces to the original deterministic distribution P in (10), and in the limit as τ → ∞, Q is equivalent to the uniform distribution Unif(K).

3.3. SOFTMAX Q-DISTRIBUTION:

We are now ready to propose the softmax Q-distribution, which is central in revealing the relationship between RAML and Bayes decision rule. We first define random variable

Z = h * (X) = argmax y∈Y E P (Y |X) [r(y, Y )].

Then, Z is deterministic given X, and according to (11), we define the softmax Q-distribution to approximate the conditional distribution of Z given X:

Q(Z = z|X = x; τ ) = exp E P (Y |X=x) [r(z, Y )]/τ y∈Y exp E P (Y |X=x) [r(y, Y )]/τ (12)

for each x ∈ X and z ∈ Y.1 Importantly, one can verify that decoding from the softmax Q-distribution provides us with the Bayes decision rule,

EQUATION

with any value of τ > 0.

3.4. SOFTMAX Q-DISTRIBUTION MAXIMUM LIKELIHOOD:

Because making predictions according to the softmax Q-distribution is equivalent to the Bayes decision rule, we would like to construct a (parametric) statistical model P to directly model the softmax Q-distribution in (12), similarly to how ML models the true data distribution P . We call this framework softmax Q-distribution maximum likelihood (SQDML). This framework is modelagnostic, so any probabilistic model used in ML such as conditional log-linear models and deep neural networks, can be directly applied to modeling the softmax Q-distribution.

Suppose that we use a parametric statistical model P = {P θ : θ ∈ Θ} to model the softmax Q-distribution. In order to learn "optimal" parameters θ from training data D = {(x i , y i )} n i=1 , an intuitive and well-motivated objective function is the KL-divergence between the empirical conditional distribution of Q(•|X), denoted as Q(•|X), and the model distribution

EQUATION

We can directly set Q(X) = P (X), which leaves the problem of defining the empirical conditional distribution Q(Z|X). Before defining Q(Z|X), we first note that if the defined empirical distribution Q(X, Z) asymptotically converges to the true Q-distribution Q(X, Z), the learned model distribution

P θSQDML (•|X = x) converges to Q(•|X = x).

Therefore, decoding from P θSQDML (•|X = x) ideally achieves the Bayes decision rule h * (x).

A straightforward way to define Q(Z|X = x) is to use the empirical distribution P (Y |X = x):

EQUATION

)

where P is the empirical distribution of P defined in (3). Asymptotically as n → ∞, P converges to P . Thus, Q asymptotically converges to Q.

Unfortunately, the empirical distribution Q (15) is not efficient to compute, since the expectation term is inside the exponential function (See appendix D.2 for approximately learning θSQDML in practice). This leads us to seek an approximation of the softmax Q-distribution and its corresponding empirical distribution. Here we propose the following Q distribution to approximate the softmax Q-distribution Q defined in (12):

EQUATION

where we move the expectation term outside the exponential function. Then, the corresponding empirical distribution of Q (X, Z) can be written in the following form:

Q (X = x, Z = z) = 1 n n i=1      y∈Y exp(r(z, y)/τ ) y ∈Y exp(r(y , y)/τ ) I(x i = x, y i = y)      (17)

Approximating Q(X, Z) with Q (X, Z), and plugging (17) into the RHS in ( 14), we have:

θSQDML ≈ argmin θ∈Θ E Q (X) [KL( Q (•|X)||P θ (•|X))] = argmin θ∈Θ n i=1 - y∈Y q(y|y i ; τ ) log P θ (y|x i ) = θRAML (18)

where q(y|y * ; τ ) is the exponentiated payoff distribution of RAML in (5).

Equation ( 18) states that RAML is an approximation of our proposed SQDML by approximating Q with Q . Interestingly and mostly in practice, when the input is unique in the training data, i.e.,

∃(x 1 , y 1 ), (x 2 , y 2 ) ∈ D, s.t. x 1 = x 2 ∧ y 1 = y 2 , we have Q = Q , resulting in θSQDML = θRAML .

It states that the estimated distribution P θSQDML and P θRAML are exactly the same when the input x is unique in the training data, since the empirical distributions Q and Q estimated from the training data are the same.

3.5. ANALYSIS AND DISCUSSION OF SQDML:

In §3.4, we provided a theoretical interpretation of RAML by establishing the relationship between RAML and SQDML. In this section, we try to answer the questions of RAML raised in §2.3 using this interpretation and further analyze the level of approximation from the softmax Q-distribution Q in (13) to Q in ( 16) by proving a upper bound of the approximation error.

Let's first use our interpretation to answer the open questions regarding RAML in §2.3. First, instead of optimizing the KL divergence between the artificially designed exponentiated payoff distribution and the model distribution, RAML in our formulation approximately matches model distribution

P θ (•|X = x) with the softmax Q-distribution Q(•|X = x; τ ).

Second, based on our interpretation, asymptotically as n → ∞, RAML learns a distribution that converges to Q (•) in ( 16), and therefore approximately converges to the softmax Q-distribution. Third, as mentioned in §3.3, generating from the softmax Q-distribution produces the Bayes decision rule, which theoretically outperforms the prediction function from ML, w.r.t. the expected reward.

It is necessary to mention that both RAML and SQDML are trying to learn distributions, decoding from which (approximately) delivers the Bayes decision rule. There are other directions that can also achieve the Bayes decision rule, such as minimum Bayes risk decoding (Kumar & Byrne, 2004) , which attempts to estimate the Bayes decision rule directly by computing expectation w.r.t the data distribution learned from training data. So far our discussion has concentrated on the theoretical interpretation and analysis of RAML, without any concerns for how well Q (X, Z) approximates Q(X, Z). Now, we characterize the approximating error by proving a upper bound of the KL divergence between them: Theorem 1. Given the input and output random variable X ∈ X and Y ∈ Y and the data distribution P (X, Y ). Suppose that the reward function is bounded 0 ≤ r(y, y * ) ≤ R. Let Q(Z|X; τ ) and Q (Z|X; τ ) be the softmax Q-distribution and its approximation defined in (12) and (16

). Assume that Q(X) = Q (X) = P (X). Then, KL(Q(•, •) Q (•, •)) ≤ 2R/τ (19)

From Theorem 1 (proof in Appendix A.1) we observe that the level of approximation mainly depends on two factors: the upper bound of the reward function (R) and the temperature parameter τ . In practice, R is often less than or equal to 1, when metrics like accuracy or BLEU are applied.

It should be noted that, at one extreme when τ becomes larger, the approximation error tends to be zero. At the same time, however, the softmax Q-distribution becomes closer to the uniform distribution Unif(Y), providing less information for prediction. Thus, in practice, it is necessary to consider the trade-off between approximation error and predictive power.

What about the other extreme -τ "as close to zero as possible"? With suitable assumptions about the data distribution P , we can characterize the approximating error by using the same KL divergence: Theorem 2. Suppose that the reward function is bounded 0 ≤ r(y, y * ) ≤ R, and ∀y = y, r(y, y) -r(y , y) ≥ γR where γ ∈ (0, 1) is a constant. Suppose additionally that, like a sub-Gaussian, for every x ∈ X , P (Y |X = x) satisfies the exponential tail bound w.r.t. r -that is, for each x ∈ X , there exists a unique y * ∈ Y such that for every t ∈ [0, 1)

EQUATION

)

where c is a distribution-dependent constant. Assume that

EQUATION

)

Theorem 2 (proof in Appendix A.2) indicates that RAML can also achieve little approximating error when τ is close to zero.

4. EXPERIMENTS:

In this section, we performed two sets of experiments to verity our theoretical analysis of the relation between SQDML and RAML. As discussed in §3.4, RAML and SQDML deliver the same predictions when the input x is unique in the data. Thus, in order to compare SQDML against RAML, the first set of experiments are designed on two data sets in which x is not unique -synthetic data for cost-sensitive multi-class classification, and the MSCOCO benchmark dataset (Chen et al., 2015) for image captioning. To further confirm the advantages of RAML (and SQDML) over ML, and thus the necessity for better theoretical understanding, we performed the second set of experiments on three structured prediction tasks in NLP. In these cases SQDML reduces to RAML, as the input is unique in these three data sets. The synthetic data set is for a 4-class classification task, where

x ∈ X = [-1, +1] × [-1, +1] ⊂ R 2 ,

and y ∈ Y = {0, 1, 2, 3}. We define four base points, one for each class:

   x 0 x 1 x 2 x 3    =    +1 +1 +1 -1 -1 -1 -1 +1   

For data generation, the distribution P (X) is the uniform distribution on X , and the log form of the conditional distribution P (Y |X = x) for each x ∈ X is proportional to the negative distance of each base point: each x to build a data set with multiple references. Thus, the total number of training instances is 10 million. For validation and test data, we independently generate 0.1 million pairs of (x, y) from P (X, Y ), respectively.

EQUATION

The model we used is a feed-forward (dense) neural networks with 2 hidden layers, each of which has 8 units. Optimization is performed with mini-batch stochastic gradient descent (SGD) with learning rate 0.1 and momentum 0.9. Each model is trained with 100 epochs and we apply early stopping (Caruana et al., 2001) based on performance on validation sets.

The reward function r(•, •) is designed to distinguish the four classes. For "correct" predictions, the specific reward values assigned for the four classes are:

   r(0, 0) r(1, 1) r(2, 2) r(3, 3)    =    e 2.0 e 1.6 e 1.2 e 1.1   

For "wrong" predictions, rewards are always zero, i.e. r(y, y * ) = 0 when y = y * .

Figure 1 depicts the effect of varying the temperature parameter τ on model performance, ranging from 0.1 to 3.0 with step 0.1. For each fixed τ , we report the mean performance over 5 repetitions.

Figure 1 shows the averaged rewards obtained as a function of τ on both validation and test datasets of ML, RAML and SQDML, respectively. From Figure 1 we can see that when τ increases, the performance gap between SQDML and RAML keeps decreasing, indicting that RAML achieves better approximation to SQDML. This evidence verities the statement in Theorem 1 that the approximating error between RAML and SQDML decreases when τ continues to grow.

The results in Figure 1 raise a question: does larger τ necessarily yield better performance for RAML? To further illustrate the effect of τ on model performance of RAML and SQDML, we perform experiments with a wide range of τ -from 1 to 10,000 with step 200. We also repeat each experiment 5 times. The results are shown in Figure 2 . We see that the model performance (average reward), however, has not kept growing with increasing τ . As discussed in §3.5, the softmax Q-distribution becomes closer to the uniform distribution when τ becomes larger, making it less expressive for prediction. Thus, when applying RAML in practice, considerations regarding the trade-off between approximating error and predictive power of model are needed. More details, results and analysis of the conducted experiments are provided in Appendix B.

4.1.2. IMAGE CAPTIONING WITH MULTIPLE REFERENCES:

Second, to show that optimizing toward our proposed SQDML objective yields better predictions than RAML on real-world structured prediction tasks, we evaluate on the MSCOCO image captioning dataset. This dataset contains 123,000 images, each of which is paired with as least five manually annotated captions. We follow the offline evaluation setting in (Karpathy & Li, 2015) , and reserve 5,000 images for validation and testing, respectively. We implemented a simple neural image captioning model using a pre-trained VGGNet as the encoder and a Long Short-Term Memory (LSTM) network as the decoder. Details of the experimental setup are in Appendix C.

As in §4.1.1, for the sake of comparing SQDML with RAML to verify our theoretical analysis, we use the average reward as the performance measure by simply defining the reward as pairwise sentence level BLEU score between model's prediction and each reference caption2 , though the standard benchmark metric commonly used in image captioning (e.g., corpus-level BLEU-4 score) is not simply defined as averaging over the pairwise rewards between prediction and reference captions.

We use stochastic gradient descent to optimize the objectives for SQDML (14) and RAML (4). However, the denominators of the softmax-Q distribution for SQDML Q(Z|X; τ ) (15) and the payoff distribution for RAML q(y|y * ; τ ) (5) contain summations over intractable exponential hypotheses space Y. We therefore propose a simple heuristic approach to approximate the denominator by restricting the exponential space Y using a fixed set S of sampled targets, i.e., Y ≈ S. Approximating the intractable hypotheses space using sampling is not new in structured prediction, and has been shown effective in optimizing neural structured prediction models (Shen et al., 2016) . Specifically, the sampled candidate set S is constructed by (i) including each ground-truth reference y * into S; and (ii) uniformly replacing an n-gram (n ∈ {1, 2, 3}) in one (randomly sampled) reference y * with a randomly sampled n-gram. We refer to this approach as n-gram replacement. We provide more details of the training procedure in Appendix C.

Table 1 lists the results. We evaluate on both the average reward and the benchmark metric (corpuslevel BLEU-4). We also tested on a vanilla ML baseline, which achieves 10.71 average reward and 26.91 corpus-level BLEU. Both SQDML and RAML outperform ML according to the two metrics. Interestingly, comparing SQDML with RAML we did not observe a significant improvement of We hypothesize that this is due to the fact that the reference captions for each image are largely different, making it highly non-trivial for the model to predict a "consensus" caption that agrees with multiple references. As an example, we randomly sampled 300 images from the validation set and compute the averaged sentence-level BLEU between two references, which is only 10.09. Nevertheless, through case studies we still found some interesting examples, which demonstrate that SQDML is capable of generating predictions that match with multiple candidates. Figure 3 gives two examples. In the two examples, SQDML's predictions match with multiple references, registering the highest average reward. On the other hand, RAML gives sub-optimal predictions in terms of average reward since it is an approximation of SQDML. And finally for ML, since its objective is solely maximizing the reward w.r.t a single reference, it gives the lowest average reward, while achieving higher maximum reward.

4.2. EXPERIMENTS ON STRUCTURED PREDICTION:

Norouzi et al. ( 2016) already evaluated the effectiveness of RAML on sequence prediction tasks of speech recognition and machine translation using neural sequence-to-sequence models. In this section, we further confirm the empirical success of RAML (and SQDML) over ML: (i) We apply RAML on three structured prediction tasks in NLP, including named entity recognition (NER), dependency parsing and machine translation (MT), using both classical feature-based log-linear models (NER and parsing) and state-of-the-art attentional recurrent neural networks (MT). (ii) Different from Norouzi et al. (2016) where edit distance is uniformly used as a surrogate training reward and the learning objective in ( 4) is approximated through sampling, we use task-specific rewards, defined on sequential (NER), tree-based (parsing) and complex irregular structures (MT). Specifically, instead of sampling, we apply efficient dynamic programming algorithms (NER and parsing) to directly compute the analytical solution of (4). (iii) We present further analysis comparing RAML with ML, showing that due to different learning objectives, RAML registers better results under task-specific metrics, while ML yields better exact-match accuracy.

4.2.1. SETUP:

In this section we describe experimental setups for three evaluation tasks. We refer readers to Appendix D for dataset statistics, modeling details and training procedure. We built a linear CRF model (Lafferty et al., 2001) with the same features used in Finkel et al. (2005) . Instead of using the official F1 score over complete span predictions, we use token-level accuracy as the training reward, as this metric can be factorized to each word, and hence there exists efficient dynamic programming algorithm to compute the expected log-likelihood objective in (4).

Dependency Parsing For dependency parsing, we evaluate on the English Penn Treebanks (PTB) (Marcus et al., 1993) . We follow the standard splits of PTB, using sections 2-21 for training, section 22 for validation and 23 for testing. We adopt the Stanford Basic Dependencies (De Marneffe et al., 2006) using the Stanford parser v3.3.03 . We applied the same data preprocessing procedure as in Dyer et al. (2015) .

We adopt an edge-factorized tree-structure log-linear model with the same features used in Ma & Zhao (2012) . We use the unlabeled attachment score (UAS) as the training reward, which is also the official evaluation metric of parsing performance. Similar as NER, the expectation in (4) can be computed deficiently using dynamic programming since UAS can be factorized to each edge.

Machine Translation (MT):

We tested on the German-English machine translation task in the IWSLT 2014 evaluation campaign (Cettolo et al., 2014) , a widely-used benchmark for evaluating optimization techniques for neural sequence-to-sequence models. The dataset contains 153K training sentence pairs. We follow previous works (Wiseman & Rush, 2016; Bahdanau et al., 2017; Li et al., 2017) and use an attentional neural encoder-decoder model with LSTM networks. The size of the LSTM hidden states is 256. Similar as in §4.1.2, we use the sentence level BLEU score as the training reward and approximate the learning objective using n-gram replacement (n ∈ {1, 2, 3, 4}). We evaluate using standard corpus-level BLEU.

4.2.2. MAIN RESULTS:

The results of NER and dependency parsing are shown in Table 2 and Table 3 , respectively. We observed that the RAML model obtained the best results at τ = 0.2 for NER, and τ = 0.3 for dependency parsing. Beyond τ = 0.4, RAML models get worse than the ML baseline for both the two tasks, showing that in practice selection of temperature τ is needed. In addition, the rewards we directly optimized in training (token-level accuracy for NER and UAS for dependency parsing) are more stable w.r.t. τ than the evaluation metrics (F1 in NER), illustrating that in practice, choosing a training reward that correlates well with the evaluation metric is important.

Table 4 summarizes the results for MT. We also compare our model with previous works on incorporating task-specific rewards (i.e., BLEU score) in optimizing neural sequence-to-sequence models (c.f. Table 5 ). Our approach, albeit simple, surprisingly outperforms previous works. Specifically, τ S-B C-B τ S-B C-B τ = 0.1 28.67 27.42 τ = 0.6 29.37 28.49 τ = 0.2 29.44 28.38 τ = 0.7 29.52 28.59 τ = 0.3 29.59 28.40 τ = 0.8 29.54 28.63 τ = 0.4 29.80 28.77 τ = 0.9 29.48 28.58 τ = 0.5 29.55 28.45 τ = 1.0 29.34 28.40 all previous methods require a pre-trained ML baseline to initialize the model, while RAML learns from scratch. This suggests that RAML is easier and more stable to optimize compared with existing approaches like RL (e.g., Ranzato et al. (2016) and Bahdanau et al. (2017) ), which requires sampling from the moving model distribution and suffers from high variance. Finally, we remark that RAML performs consistently better than the ML (27.66) across most temperature terms.

4.2.3. FURTHER COMPARISON WITH MAXIMUM LIKELIHOOD:

Table 6 illustrates the performance of ML and RAML under different metrics of the three tasks. We observe that RAML outperforms ML on both the directly optimized rewards (token-level accuracy for NER, UAS for dependency parsing and sentence-level BLEU for MT) and task-specific evaluation metrics (F1 for NER and corpus-level BLEU for MT). Interestingly, we find a trend that ML gets better results on two out of the three tasks under exact match accuracy, which is the reward that ML attempts to optimize (as discussed in ( 9)). This is in line with our theoretical analysis, in that RAML and ML achieve better prediction functions w.r.t. their corresponding rewards they try to optimize.

5. CONCLUSION:

In this work, we propose the framework of estimating the softmax Q-distribution from training data. Based on our theoretical analysis, asymptotically, the prediction function learned by RAML approximately achieves the Bayes decision rule. Experiments on three structured prediction tasks demonstrate that RAML consistently outperforms ML baselines. Proof. Since the reward function is bounded 0 ≤ r(y, y * ) ≤ R, ∀y, y * ∈ Y, we have:

1 ≤ exp(r(y, y * )/τ ) ≤ e R/τ

Then,

1 |Y|e R/τ < 1 1 + (|Y| -1)e R/τ ≤ exp(r(y, y * )/τ ) y ∈Y exp(r(y , y * )/τ ) ≤ e R/τ |Y| -1 + e R/τ < e R/τ |Y| (1)

Now we can bound the conditional distribution Q(z|x) and Q (z|x):

1 |Y|e R/τ < Q(Z = z|X = x; τ ) = exp (E P [r(z, Y )|X = x]/τ ) y∈Y exp (E P [r(y, Y )|X = x]/τ ) < e R/τ |Y| (2)

and,

1 |Y|e R/τ < Q (Z = z|X = x; τ ) = E P    exp (r(z, Y )/τ ) y∈Y exp (r(y, Y )/τ ) X = x    < e R/τ |Y| (3) Thus, ∀x ∈ X , z ∈ Y, log Q(z|x) Q (z|x) < 2R/τ

To sum up, we have:

KL(Q(•, •) Q (•, •)) = x∈X Q(x) z∈Y Q(z|x) log Q(z|x)Q(x) Q (z|x)Q (x) = x∈X Q(x) z∈Y Q(z|x) log Q(z|x) Q (z|x) < x∈X Q(x) z∈Y Q(z|x)2R/τ = 2R/τ A.2 PROOF OF THEOREM 2 Lemma 3. For every x ∈ X , P (Y = y * |X = x) ≤ e -cb

where b

∆ = γ 2 (1-γ) 2 .

Proof. From the assumption in Theorem 2 of Eq. (20) in §3.5, we have

P (Y = y * |X = x) = P (r(y * , y * ) -r(Y, y * ) ≥ γR) ≤ e -c γ 2 (1-γ) 2 = e -cb

Lemma 4. 

1+(|Y|-1)e R/τ ≤ Q(z|x) ≤ 1 e αR/τ +(|Y|-1)e -R/τ , if z = y * 1 1+(|Y|-1)e -αR/τ ≤ Q(z|x) ≤ 1 1+(|Y|-1)e -R/τ , if y = y * where α = γ -(1 + γ)e -cb < γ.

Proof.

Q(z|x) = e E[r(z,Y )/τ ] y ∈Y e E[r(y ,Y )/τ ]

From Lemma 6,

1 1 + (|Y| -1)e R/τ ≤ Q(z|x) ≤ 1 1 + (|Y| -1)e -R/τ If z = y * , Q(z|x) ≤ e E[r(z,Y )/τ ] e E[r(y * ,Y )/τ ] +|Y|-1 ≤ e E[r(y * ,Y )/τ ]-E[r(z,Y )/τ ] + (|Y| -1)e -R/τ -1 ≤ e P (y * |x)(r(y * ,y * )/τ -r(z,y * )/τ ) -e -cbR/τ + (|Y| -1)e -R/τ -1 ≤ e (1-e -cb )γR/τ -e -cb R/τ + (|Y| -1)e -R/τ -1 = 1 e αR/τ +(|Y|-1)e -R/τ If z = y * , Q(z|x) =   1 + y =y * e E[r(y,Y )/τ ]-E[r(y * ,Y )/τ ]   -1 ≤ 1 1 + (|Y| -1)e -αR/τ

Now, we can prove Theorem 2 with the above lemmas.

Proof of Theorem 2:

Proof. 

KL(Q(•|X = x) Q (•|X = x)) = y∈Y Q(y|x) log Q(y|x) Q (y|x) = Q(y * |x) log Q(y * |x) Q (y * |x) + y =y * Q(y|x) log Q(y|x) Q (y|x) ≤ 1 + (|Y| -1)e -R/τ -1 log 1 1-e -cb 1+(|Y|-1)e -γR/τ 1+(|Y|-1)e -R/τ + |Y|-1 e αR/τ +(|Y|-1)e -R/τ log 1+(|Y|-1)e R/τ e αR/τ +(|Y|-1)e -R/τ lim τ →0 KL(Q(•|X = x) Q (•|X = x)) ≤ log 1 1-e -cb + lim τ →0 |Y|-1 e αR/τ log(|Y| -1)e (1-α)R/τ = log 1 1-e -cb + lim τ →0 |Y|-1 e αR/τ (log(|Y| -1) + (1 -α)R/τ ) = log 1 1-e -cb = log 1 + e -cb 1-e -cb ≤ e -cb 1-e -cb = 1 1+e cb

B COST-SENSITIVE MULTI-CLASS CLASSIFICATION:

To better illustrate the properties of ML, RAML and SQDML, we display the decision boundary of the learned models in Figure 4 . Figure 4a gives the boundary of the Bayes decision rule, and Figure 4b is the boundary of ML. We can see that, as expected, ML gives "unbiased" boundary because it does not incorporating any information of the task-specific reward.

Figure 4c and 4f are the decision boundaries of RAML and SQDML with τ = 0.5. We can see that, even with small τ , SQDML is able to achieve good decision boundary similar to that of the Bayes decision rule, while the boundary of RAML is similar to that of ML. This might suggest that RAML, as an approximation of SQDML, might "degenerates" to ML due to approximation error.

Figure 4d and 4g provide the boundary of RAML and SQDML that achieve the best performance (τ = 2.4 for RAML and τ = 1.1 for SQDML). RAML is able to produce surprisingly good decisions with proper τ , which is comparable with SQDML.

Figure 4e and 4h are the decision boundaries of RAML and SQDML with large τ = 10000. We can see that, consistently matching our analysis, neither RAML or SQDML can learn reasonable prediction function. The reason is, as we discussed in §3.5, when τ becomes larger, the softmax Q-distribution becomes closer to the uniform distribution, providing less information of prediction, even though the approximation error tends to be zero.

C IMAGE CAPTIONING WITH MULTIPLE REFERENCES:

Encoder Following (Yang et al., 2016) , we adopt the widely-used CNN architecture VGGNet (Simonyan & Zisserman, 2015) as the image encoder. Specifically, we use the last fully connected layer fc7 as image representation (4096-dimensional), which is further fed into a decoder to generate captions. We use a pre-trained VGGNet model4 , and keep it fixed during the training of decoder.

Decoder We use an LSTM network as the decoder to predicate a sequence of target words: {y 1 , y 2 , . . . , y T }. Formally, the decoder uses its internal hidden state s t at each time step to track the generation process, defined as s t = f LSTM (y t-1 , s t-1 ), where y t-1 is the embedding of the previous word y t-1 . We initialize the memory cell of the decoder by passing the fixed-length image representation x through an affine transformation layer. The probability of the target word y t is then given by p(y t |y <t , x) = softmax(W s s t ).

Training by N -gram Replacement As discussed in §4.1.2, we approximate the exponentially large hypotheses space Y using a subset of sampled hypotheses S. In our experiments, the size of the sampled targets S is 500 for SQDML and 100 for RAML5 . For the sake of efficiency, at each iteration of stochastic gradient descent, we only use k randomly-selected hypotheses from S to perform gradient update. k is 50 for SQDML and 10 for RAML.

Configuration We use the sentence-level BLEU with NIST geometric smoothing as the reward. We replace word types whose frequency is less than five with a special <unk> token. The resulting vocabulary size is 10,102. The dimensionality of word embeddings and LSTM hidden sates is 256 and 512, respectively. For decoding, we use beam search with a beam size of 5. We use a batch size of 10 for the ML baseline and a larger size of 100 for SQDML and RAML for the sake of efficiency.

D EXPERIMENTS ON STRUCTURED PREDICTION D.1 DATASET STATISTICS:

We present statistics of the datasets we used in Table 7 .

D.2.3 EDGE-FACTORIZED TREE-STRUCTURE MODEL:

In dependency parsing, y represents a generic dependency tree which consists of directed edges between heads and their dependents (modifiers). 

Model Overview:

We apply a neural encoder-decoder model with attention and input feeding (Luong et al., 2015) . Given a source sentence x of N words {x i } N i=1 , the conditional probability of the target sentence y = {y i } T i=1 , p(y|x), is factorized as p(y|x) = T t=1 p(y t |y <t , x). The probability is computed using a bi-directional LSTM encoder and an LSTM decoder:

Encoder Let x i denote the embedding of the i-th source word x i . We use two unidirectional LSTMs to process x in forward and backward order, and get the sequence of hidden states { h i } N i=1 and { h i } N i=1 in the two directions:

h i = f → LSTM (x i , h i-1 ) h i = f ← LSTM (x i , h i+1 )

, where f → LSTM and f ← LSTM are standard LSTM update functions as in Hochreiter & Schmidhuber (1997) . The representation of the i-th word, h i , is then given by concatenating h i and h i .

Decoder An LSTM is used as the decoder to predict a target word y t at each time step t. Formally, the decoder maintains a hidden state s t to track the translation process, defined as s t = f LSTM ([y t-1 : st-1 ], s t-1 ), where [:] denotes vector concatenation, and y t-1 is the embedding of the previous target word. We initialize the first memory cell of the decoder using the last hidden states of the two encoding LSTMs: cell 0 = W[ h N : h N ] + b. And the first hidden state of the decoder is initialized as s 0 = tanh(cell 0 ). The attentional vector st is computed as st = tanh(W c [s t : c t ]),

:

In the following derivations we omit τ in Q(Z|X; τ ) for simplicity when there is no ambiguity.

Not that this is different from standard multi-reference sentence-level BLEU, which counts n-gram matches w.r.t. all sentences then uses these sufficient statistics to calculate a final score.

http://nlp.stanford.edu/software/lex-parser.shtml

Downloaded from https://github.com/kimiyoung/review_net

Since each image has around five reference captions, this ensures that the number of sampled candidate y's for each training example is roughly the same for SQDML and RAML.

We also tried larger sample size but did not observe significant gains.

Through correspondence with the authors, we scale τ by1 1+log(V -1)

Figures and Tables:

perform experiments on synthetic data for cost-sensitive multi-class classification designed to demonstrate that RAML learns a distribution approximately producing the Bayes decision rule, which is asymptotically the prediction function delivered by SQDML.

22)where d(•, •) is the Euclidean distance between two points. To generate training data, we first draw 1 million inputs x from P (X). Then, we independently generate 10 outputs y from P (Y |X = x) for

Figure 1: Average reward relative to the temperature parameter τ , ranging from 0.1 to 3.0, on validation and test sets, respectively.

Figure 2: Average reward relative to a wide range of τ (from 1.0 to 10,000) on validation and test sets, respectively.

Figure 3: Testing examples from MSCOCO image captioning task

APPENDIX: SOFTMAX Q-DISTRIBUTION ESTIMATION FOR STRUCTURED PREDICTION: A THEORETICAL INTERPRETATION FOR RAML A SOFTMAX Q-DISTRIBUTION MAXIMUM LIKELIHOODA.1 PROOF OF THEOREM 1

1 1+(|Y|-1)e R/τ ≤ q(y|y * ) ≤ 1 e γR/τ +(|Y|-1)e -R/τ , if y = y * 1 1+(|Y|-1)e -γR/τ ≤ q(y|y * ) ≤ 1 1+(|Y|-1)e -R/τ , if y = y * If z = y * , E[r(z, Y )/τ ] = P (y * |x)r(z, y * )/τ +y =y * P (y|x)r(z, y)/τ ≤ P (y * |x)r(z, y * )/τ + e -cb R/τ If z = y * , E[r(z, Y )/τ ] = P (y * |x)r(z, y * )/τ + y =y * P (y|x)r(z, y)/τ ≥ P (y * |x)r(y * , y * )/τ Lemma 7.

1

Figure 4: Decision boundaries of different models, together with the Bayes decision rule in (a). (b) display the decision boundary of ML. (c), (d), (e) are the decision boundaries of RAML with τ = 0.5, τ = 10000 and the one achieves the best performance τ = 2.4. (f), (g), (h) are the corresponding boundaries of SQDML. The best performance is achieved with τ = 1.1

Formally, the training set D consists of pairs of images x and multiple references {y * }, i.e., D = { x, {y * } }. For RAML, we split a single training instance x, {y * } into multiple ones by pairing x with each y * , i.e., { x, y * }. And for each instance x, y * we maximize y∈Y q(y|y * ; τ ) log P θ (y|x) = y∈Y exp r(y, y * )/τ y ∈Y exp r(y , y * )/τ log P θ (y|x) ≈ y∈S exp r(y, y * )/τ y ∈S exp r(y , y * )/τ log P θ (y|x). For SQDML, for each training example x, {y * } we directly maximize the weighted log-likelihood w.r.t. the softmax-Q distribution y∈Y Q(y|x; τ ) log P θ (y|x) = y∈Y exp y * 1 |{y * }| r(y, y * )/τ y ∈Y exp y * 1 |{y * }| r(y , y * )/τ log P θ (y|x) }| r(y, y * )/τ y ∈S exp y * 1 |{y * }| r(y , y * )/τ log P θ (y|x).

The edge-factorized model factorizes potential function Φ into the set of edges:Φ(y, x; θ) = e∈y ψ e (e, x; θ)where e is an edge belonging to the tree y. ψ e (e; θ) = exp(θ T φ e (e, x)). The reward of UAS can be factorized as:r(y, y * ) = L i=1 I(y i = y * i )where y i is the head of the ith word in the sentence x. Then, we have:y∈Y P θ (y|x)φ(y, x) =y∈Y e∈y P θ (y|x)φ e (e, x) = e∈E φ e (e, x) y∈Y(e) P θ (y|x) (7) where E is the set of all possible edges for sentence x and Y(e) = {y ∈ Y : e ∈ y}. With similar derivation, we have y ∈Y q(y |y; τ )φ(y , x) and (8) can be computed by using the inside-outside algorithm (Paskin, 2001; Ma & Zhao, 2012) D.2.4 ATTENTIONAL NEURAL MACHINE TRANSLATION MODEL

Average Reward (sentence-level BLEU) and corpus-level BLEU (standard evaluation metric) scores for image captioning task with different τ .

Table content: <table><tr><td/><td colspan="2">RAML</td><td colspan="2">SQDML</td><td/><td colspan="2">RAML</td><td colspan="2">SQDML</td></tr><tr><td>τ</td><td colspan="4">Reward BLEU Reward BLEU</td><td>τ</td><td colspan="4">Reward BLEU Reward BLEU</td></tr><tr><td>τ = 0.80</td><td>10.77</td><td>27.02</td><td>10.82</td><td>27.08</td><td>τ = 1.00</td><td>10.84</td><td>27.26</td><td>10.82</td><td>27.03</td></tr><tr><td>τ = 0.85</td><td>10.81</td><td>27.27</td><td>10.78</td><td>26.92</td><td>τ = 1.05</td><td>10.82</td><td>27.29</td><td>10.80</td><td>27.20</td></tr><tr><td>τ = 0.90</td><td>10.88</td><td>27.62</td><td>10.91</td><td>27.54</td><td>τ = 1.10</td><td>10.74</td><td>26.89</td><td>10.78</td><td>26.98</td></tr><tr><td>τ = 0.95</td><td>10.82</td><td>27.33</td><td>10.79</td><td>27.02</td><td>τ = 1.15</td><td>10.77</td><td>27.01</td><td>10.72</td><td>26.66</td></tr></table>

UAS scores for dependency parsing.Named Entity Recognition (NER) For NER, we experimented on the English data from CoNLL 2003 shared task (TjongKim et al., 2003). There are four predefined types of named entities: PERSON, LOCATION, ORGANIZATION, and MISC. The dataset includes 15K training sentences, 3.4K for validation, and 3.7K for testing.

Table content: <table><tr><td/><td colspan="4">DEV. Results TEST Results</td><td/><td colspan="2">DEV. Results TEST Results</td></tr><tr><td>Method</td><td>Acc</td><td>F1</td><td>Acc</td><td>F1</td><td>Method</td><td>UAS</td><td>UAS</td></tr><tr><td colspan="2">ML Baseline 98.2</td><td>90.4</td><td>97.0</td><td>84.9</td><td>ML Baseline</td><td>91.3</td><td>90.7</td></tr><tr><td>τ = 0.1</td><td>98.3</td><td>90.5</td><td>97.0</td><td>85.0</td><td>τ = 0.1</td><td>91.0</td><td>90.6</td></tr><tr><td>τ = 0.2</td><td>98.4</td><td>91.2</td><td>97.3</td><td>86.0</td><td>τ = 0.2</td><td>91.5</td><td>91.0</td></tr><tr><td>τ = 0.3</td><td>98.3</td><td>90.2</td><td>97.1</td><td>84.7</td><td>τ = 0.3</td><td>91.7</td><td>91.1</td></tr><tr><td>τ = 0.4</td><td>98.3</td><td>89.6</td><td>97.1</td><td>84.0</td><td>τ = 0.4</td><td>91.4</td><td>90.8</td></tr><tr><td>τ = 0.5</td><td>98.3</td><td>89.4</td><td>97.1</td><td>83.3</td><td>τ = 0.5</td><td>91.2</td><td>90.7</td></tr><tr><td>τ = 0.6</td><td>98.3</td><td>88.9</td><td>97.0</td><td>82.8</td><td>τ = 0.6</td><td>91.0</td><td>90.6</td></tr><tr><td>τ = 0.7</td><td>98.3</td><td>88.6</td><td>97.0</td><td>82.2</td><td>τ = 0.7</td><td>90.8</td><td>90.4</td></tr><tr><td>τ = 0.8</td><td>98.2</td><td>88.5</td><td>96.9</td><td>81.9</td><td>τ = 0.8</td><td>90.8</td><td>90.3</td></tr><tr><td>τ = 0.9</td><td>98.2</td><td>88.5</td><td>97.0</td><td>82.1</td><td>τ = 0.9</td><td>90.7</td><td>90.1</td></tr><tr><td colspan="5">Table 2: Token accuracy and official F1 for NER.</td><td/><td/><td/></tr></table>

Sentence-level BLEU (S-B, training reward) and corpus-level BLEU (C-B, standard evaluation metric) scores for RAML with different τ .

Table content: <table><tr><td>Methods</td><td colspan="2">ML Baseline Proposed Model</td></tr><tr><td>Ranzato et al. (2016)</td><td>20.10</td><td>21.81</td></tr><tr><td>Wiseman &amp; Rush (2016)</td><td>24.03</td><td>26.36</td></tr><tr><td>Li et al. (2017)</td><td>27.90</td><td>28.30</td></tr><tr><td>Bahdanau et al. (2017)</td><td>27.56</td><td>28.53</td></tr><tr><td>This Work</td><td>27.66</td><td>28.77</td></tr></table>

Comparison of our proposed approach with previous works. All previous methods require pre-training using an ML baseline, while RAML learns from scratch.

Table content: <table><tr><td/><td/><td>NER</td><td>Parsing</td><td/><td>MT</td></tr><tr><td colspan="2">Metric Acc.</td><td>F1</td><td>E.M. UAS E.M.</td><td>S-B</td><td>C-B E.M.</td></tr><tr><td>ML</td><td colspan="5">97.0 84.9 78.8 90.7 39.9 29.15 27.66 3.79</td></tr><tr><td colspan="6">RAML 97.3 86.0 80.1 91.1 39.4 29.80 28.77 3.35</td></tr></table>

Performance of ML and RAML under different metrics for the three tasks on test sets. E.M. refers to exact match accuracy.

Table content: <table/>

Peer review (iclr2018):
 The authors claim three contributions in this paper. (1) They introduce the framework of softmax Q-distribution estimation, through which they are able to interpret the role the payoff distribution plays in RAML. Specifically, the softmax Q-distribution serves as a smooth approximation to the Bayes decision boundary. The RAML approximately estimates the softmax Q-distribution, and thus approximates the Bayes decision rule. (2) Algorithmically, they further propose softmax Q-distribution maximum likelihood (SQDML) which improves RAML by achieving the exact Bayes decision boundary asymptotically. (3) Through one experiment using synthetic data on multi-class classiﬁcation and one using real data on image captioning, they show that SQDML is consistently as good or better than RAML on the task-speciﬁc metrics that is desired to optimize. I found the first contribution is sound, and it reasonably explains why RAML achieves better performance when measured by a specific metric. Given a reward function, one can define the Bayes decision rule. The softmax Q-distribution (Eqn. 12) is defined to be the softmax approximation of the deterministic Bayes rule. The authors show that the RAML can be explained by moving the expectation out of the nonlinear function and replacing it with empirical expectation (Eqn. 17). Of course, the moving-out is biased but the replacing is unbiased. The second contribution is partially valid, although I doubt how much improvement one can get from SQDML. The authors define the empirical Q-distribution by replacing the expectation in Eqn. 12 with empirical expectation (Eqn. 15). In fact, this step can result in biased estimation because the replacement is inside the nonlinear function. When x is repeated sufficiently in the data, this bias is small and improvement can be observed, like in the synthetic data example. However, when x is not repeated frequently, both RAML and SQDML are biased. Experiment in section 4.1.2 do not validate significant improvement, either. The numerical results are relatively weak. The synthetic experiment verifies the reward-maximizing property of RAML and SQDML. However, from Figure 2, we can see that the result is quite sensitive to the temperature .tau. Is there any guidelines to choose .tau? For experiments in Section 4.2, all of them are to show the effectiveness of RAML, which are not very relevant to this paper. These experiment results show very small improvement compared to the ML baselines (see Table 2,3 and 5). These results are also lower than the state of the art performance. A few questions: (1). The author may want to check whether (8) can be called a Bayes decision rule. This is a direct result from definition of conditional probability. No Bayesian elements, like prior or likelihood appears here. (2). In the implementation of SQDML, one can sample from (15) without exactly computing the summation in the denominator. Compared with the n-gram replacement used in the paper, which one is better? (3). The authors may want to write Eqn. 17 in the same conditional form of Eqn. 12 and Eqn. 14. This will make the comparison much more clear. (4). What is Theorem 2 trying to convey? Although .tau goes to 0, there is still a gap between Q and Q*. This seems to suggest that for small .tau, Q* is not a good approximation of Q. Are the assumptions in Theorem 2 reasonable? There are several typos in the proof of Theorem 2. (5). In section 4.2.2, the authors write "the rewards we directly optimized in training (token-level accuracy for NER and UAS for dependency parsing) are more stable w.r.t. τ than the evaluation metrics (F1 in NER), illustrating that in practice, choosing a training reward that correlates well with the evaluation metric is important". Could you explain it in more details?