Title: MAXIMUM ENTROPY FLOW NETWORKS

Abstract: Maximum entropy modeling is a flexible and popular framework for formulating statistical models given partial knowledge. In this paper, rather than the traditional method of optimizing over the continuous density directly, we learn a smooth and invertible transformation that maps a simple distribution to the desired maximum entropy distribution. Doing so is nontrivial in that the objective being maximized (entropy) is a function of the density itself. By exploiting recent developments in normalizing flow networks, we cast the maximum entropy problem into a finite-dimensional constrained optimization, and solve the problem by combining stochastic optimization with the augmented Lagrangian method. Simulation results demonstrate the effectiveness of our method, and applications to finance and computer vision show the flexibility and accuracy of using maximum entropy flow networks.

1. INTRODUCTION:

The maximum entropy (ME) principle (Jaynes, 1957) states that subject to some given prior knowledge, typically some given list of moment constraints, the distribution that makes minimal additional assumptions -and is therefore appropriate for a range of applications from hypothesis testing to price forecasting to texture synthesis -is that which has the largest entropy of any distribution obeying those constraints. First introduced in statistical mechanics by Jaynes (1957) , and considered both celebrated and controversial, ME has been extensively applied in areas including natural language processing (Berger et al., 1996) , ecology (Phillips et al., 2006) , finance (Buchen & Kelly, 1996 ), computer vision (Zhu et al., 1998) , and many more.

Continuous ME modeling problems typically include certain expectation constraints, and are usually solved by introducing Lagrange multipliers, which under typical assumptions yields an exponential family distribution (also called Gibbs distribution) with natural parameters such that the expectation constraints are obeyed. Unfortunately, fitting ME distributions in even modest dimensions poses significant challenges. First, optimizing the Lagrangian for a Gibbs distribution requires evaluating the normalizing constant, which is in general computationally very costly and error prone. Secondly, in all but the rarest cases, there is no way to draw samples independently and identically from this Gibbs distribution, even if one could derive it. Third, unlike in the discrete case where a number of recent and exciting works have addressed the problem of estimating entropy from discrete-valued data (Jiao et al., 2015; Valiant & Valiant, 2013) , estimating differential entropy from data samples remains inefficient and typically biased. These shortcomings are critical and costly, given the common use of ME distributions for generating reference data samples for a null distribution of a test statistic. There is thus ample need for a method that can both solve the ME problem and produce a solution that is easy and fast to sample.

In this paper we develop maximum entropy flow networks (MEFN), a stochastic-optimization-based framework and algorithm for fitting continuous maximum entropy models. Two key steps are required. First, conceptually, we replace the idea of maximizing entropy over a density directly with maximizing, over the parameter space of an indexed function family, the entropy of the density induced by mapping a simple distribution (a Gaussian) through that optimized function. Modern neural networks, particularly in variational inference (Kingma & Welling, 2013; Rezende & Mohamed, 2015) , have successfully employed this same idea to generate complex distributions, and we look to similar technologies. Secondly, unlike most other objectives in this network literature, the entropy objective itself requires evaluation of the target density directly, which is unavailable in most traditional architectures. We overcome this potential issue by learning a smooth, invertible transformation that maps a simple distribution to an (approximate) ME distribution. Recent developments in normalizing flows (Rezende & Mohamed, 2015; Dinh et al., 2016) allow us to avoid biased and computationally inefficient estimators of differential entropy (such as the nearest-neighbor class of estimators like that of Kozachenko-Leonenko; see Berrett et al. (2016) ). Our approach avoids calculation of normalizing constants by learning a map with an easy-to-compute Jacobian, yielding tractable probability density computation. The resulting transformation also allows us to reliably generate iid samples from the learned ME distribution. We demonstrate MEFN in detail in examples where we can access ground truth, and then we demonstrate further the ability of MEFN networks in equity option prices fitting and texture synthesis.

Primary contributions of this work include: (i) addressing the substantial need for methods to sample ME distributions; (ii) introducing ME problems, and the value of including entropy in a range of generative modeling problems, to the deep learning community; (iii) the novel use of constrained optimization for a deep learning application; and (iv) the application of MEFN to option pricing and texture synthesis, where in the latter we show significant increase in the diversity of synthesized textures (over current state of the art) by using MEFN.

2. BACKGROUND:



2.1. MAXIMUM ENTROPY MODELING AND GIBBS DISTRIBUTION:

We consider a continuous random variable Z ∈ Z ⊆ R d with density p, where p has differential entropy H(p) = -p(z) log p(z)dz and support supp(p). The goal of ME modeling is to find, and then be able to easily sample from, the maximum entropy distribution given a set of moment and support constraints, namely the solution to:

p * = maximize H(p) (1) subject to E Z∼p [T (Z)] = 0 supp(p) = Z,

where T (z) = (T 1 (z), ..., T m (z)) : Z → R m is the vector of known (assumed sufficient) statistics, and Z is the given support of the distribution. Under standard regularity conditions, the optimization problem can be solved by Lagrange multipliers, yielding an exponential family p * of the form:

EQUATION

where η ∈ R m is the choice of natural parameters of p * such that E p * [T (Z)] = 0. Despite this simple form, these distributions are only in rare cases tractable from the standpoint of calculating η, calculating the normalizing constant of p * , and sampling from the resulting distribution. There is extensive literature on finding η numerically (Darroch & Ratcliff, 1972; Salakhutdinov et al., 2002; Della Pietra et al., 1997; Dudik et al., 2004; Malouf, 2002; Collins et al., 2002) , but doing so requires computing normalizing constants, which poses a challenge even for problems with modest dimensions. Also, even if η is correctly found, it is still not trivial to sample from p * . Problemspecific sampling methods (such as importance sampling, MCMC, etc.) have to be designed and used, which is in general challenging (burn-in, mixing time, etc.) and computationally burdensome.

2.2. NORMALIZING FLOWS:

Following Rezende & Mohamed (2015) , we define a normalizing flow as the transformation of a probability density through a sequence of invertible mappings. Normalizing flows provide an elegant way of generating a complicated distribution while maintaining tractable density evaluation.

Starting with a simple distribution Z 0 ∈ R d ∼ p 0 (usually taken to be a standard multivariate Gaussian), and by applying k invertible and smooth functions

EQUATION

where J i is the Jacobian of f i . If the determinant of J i can be easily computed, p k can be computed efficiently.

Rezende & Mohamed (2015) proposed two specific families of transformations for variational inference, namely planar flows and radial flows, respectively:

EQUATION

where b i ∈ R, u i , w i ∈ R d and h is an activation function in the planar case, and where 

β i ∈ R, α i > 0, z i ∈ R d , h(α, r) = 1/(α +

F = {f φ , φ ∈ R q }, we denote p φ (z) = p 0 (f -1 φ (z))| det(J φ (z))| -1

as the distribution of the variable f φ (Z 0 ), where J φ is the Jacobian of f φ . We then rewrite the ME problem as:

φ * = maximize H(p φ ) (5) subject to E Z0∼p0 [T (f φ (Z 0 ))] = 0 supp(p φ ) = Z.

When p 0 is continuous and F is suitably general, the program in Equation 5 recovers the ME distribution p φ exactly. With a flexible transformation family, the ME distribution can be well approximated. In experiments we found that taking p 0 to be a standard multivariate normal distribution achieves good empirical performance. Taking p 0 to be a bounded distribution (e.g. uniform distribution) is problematic for learning transformations near the boundary, and heavy tailed distributions (e.g. Cauchy distribution) caused similar trouble due to large numbers of outliers.

3.2. ALGORITHM:

We solved Equation 5 using the augmented Lagrangian method. Denote R(φ) = E(T (f φ (Z 0 ))), the augmented Lagrangian method uses the following objective:

L(φ; λ, c) = -H(p φ ) + λ R(φ) + c 2 ||R(φ)|| 2 (6)

where λ ∈ R m is the Lagrange multiplier and c > 0 is the penalty coefficient. We minimize Equation 6 for a non-decreasing sequence of c and well-chosen λ. As a technical note, the augmented Lagrangian method is guaranteed to converge under some regularity conditions (Bertsekas, 2014) .

As is usual in neural networks, a proof of these conditions is challenging and not yet available, though intuitive arguments (see Appendix §A) suggest that most of them should hold. Due to the non rigorous nature of these arguments, we rely on the empirical results of the algorithm to claim that it is indeed solving the optimization problem.

For a fixed (λ, c) pair, we optimize L with stochastic gradient descent. Owing to our choice of network and the resulting ability to efficiently calculate the density p φ (z (i) ) for any sample point for SGD iteration i = 1, ..., i max do 4:

Sample z (1) , ..., z (n) ∼ p 0 , get transformed variables z

(i) φ = f φ (z (i) ), i = 1, ..., n 5:

Update φ by descending its stochastic gradient (using e.g. ADADELTA (Zeiler, 2012)):

∇ φ L(φ; λ k , c k ) ≈ 1 n n i=1 ∇ φ log p φ (z (i) φ ) + 1 n n i=1 ∇ φ T (z (i) φ )λ k + c k 2 n n 2 i=1 ∇ φ T (z (i) φ ) • 2 n n i= n 2 +1

T (z

(i) φ )

6:

end for 7:

Sample z (1) , ..., z (ñ) ∼ p 0 , get transformed variables z

(i) φ = f φ (z (i) ), i = 1, ..., ñ 8: Update λ k+1 = λ k + c k 1 ñ ñ i=1 T (z (i) φ ) 9:

Update c k+1 ≥ c k (see text for detail) 10: end for z (i) (which are easy-to-sample iid draws from the multivariate normal p 0 ), we compute the unbiased estimator of H(p φ ) with:

EQUATION

R(φ) can also be estimated without bias by taking a sample average of z (i) draws. The resulting optimization procedure is detailed in Algorithm 1, of which step 9 requires some detail: denoting φ k as the resulting φ after i max SGD iterations at the augmented Lagrangian iteration k, the usual update rule for c (Bertsekas, 2014) is:

EQUATION

where γ ∈ (0, 1) and β > 1. Monte Carlo estimation of R(φ) sometimes caused c to be updated too fast, causing numerical issues. Accordingly, we changed the hard update rule for c to a probabilistic update rule: a hypothesis test is carried out with null hypothesis

H 0 : E[||R(φ k+1 )||] = E[γ||R(φ k )||] and alternative hypothesis H 1 : E[||R(φ k+1 )||] > E[γ||R(φ k )||].

The p-value p is computed, and c k+1 is updated to βc k with probability 1 -p. We used a two-sample t-test to calculate the p-value. What results is a robust and novel algorithm for estimating maximum entropy distributions, while preserving the critical properties of being both easy to calculate densities of particular points, and being trivially able to produce truly iid samples.

4. EXPERIMENTS:

We first construct an ME problem with a known solution ( §4.1), and we analyze the MEFN algorithm with respect to the ground truth and to an approximate Gibbs solution. These examples test the validity of our algorithm and illustrate its performance. §B and §4.3 then applies the MEFN to a financial data application (predicting equity option values) and texture synthesis, respectively, to illustrate the flexibility and practicality of our algorithm.

For §4.1 and §B, We use 10 layers of planar flow with a final transformation g (specified below) that transforms samples to the specified support, and use with ADADELTA (Zeiler, 2012). For §4.3 we use real NVP structure and use ADAM (Kingma & Ba, 2014) with learning rate = 0.001. For all our experiments, we use i max = 3000, β = 4, γ = 0.25. For §4.1 and §B we use n = 300, ñ = 1000, k max = 10; For §4.3 we use n = ñ = 2, k max = 8.

4.1. A MAXIMUM ENTROPY PROBLEM WITH KNOWN SOLUTION:

Following the setup of the typical ME problem, suppose we are given a specified support S = {z = (z 1 , . . . , z d-1 ) :

z i ≥ 0 and d-1 k=1 z k ≤ 1} and a set of constraints E[log Z k ] = κ k (k = 1, ..., d),

where

Z d = 1 - d-1 k=1 Z k .

We then write the maximum entropy program:

p * = maximize H(p) (9) subject to E Z∼p [log Z k -κ k ] = 0 ∀k = 1, ..., d supp(p) = S.

This is a general ME problem that can be solved via the MEFN. Of course, we have particularly chosen this example because, though it may not obviously appear so, the solution has a standard and tractable form, namely the Dirichlet. This choice allows us to consider a complicated optimization program that happens to have known global optimum, providing a solid test bed for the MEFN (and for the Gibbs approach against which we will compare). Specifically, given a parameter α ∈ R d , the Dirichlet has density:

p(z 1 , . . . , z d-1 ) = 1 B(α) d k=1 z α k -1 k 1 ((z 1 , . . . , z d-1 ) ∈ S) (10)

where B(α) is the multivariate Beta function, and

z d = 1 - d-1 k=1 z k . Note that this Dirichlet is a distribution on S and not on the (d -1)-dimensional simplex S d-1 = {(z 1 , . . . , z d ) : z k ≥ 0 and d k=1 z k = 1}

(an often ignored and seemingly unimportant technicality that needs to be correct here to ensure the proper transformation of measure). Connecting this familiar distribution to the ME problem above, we simply have to choose α such that κ k = ψ(α k ) -ψ(α 0 ) for k = 1, ..., d, where α 0 = d k=1 α k and ψ is the digamma function. We then can pose the above ME problem to the MEFN and compare performance against ground truth. Before doing so, we must stipulate the transformation g that maps the Euclidean space of the multivariate normal p 0 to the desired support S. Any sensible choice will work well (another point of flexibility for the MEFN); we use the standard transformation:

g(z 1 , ..., z d-1 ) = e z1 d-1 k=1 e z k + 1 , ..., e z d-1 d-1 k=1 e z k + 1 (11)

Note that the MEFN outputs vectors in R d-1 , and not R d , because the Dirichlet is specified as a distribution on S (and not on the simplex S d-1 ). Accordingly, the Jacobian is a square matrix and its determinant can be computed efficiently using the matrix determinant lemma. Here, p 0 is set to the (d -1)-dimensional standard normal.

We proceed as follows: We choose α and compute the constraints κ 1 , ..., κ d . We run MEFN pretending we do not know α or the Dirichlet form. We then take a random sample from the fitted distribution and a random sample from the Dirichlet with parameter α, and compare the two samples using the maximum mean discrepancy (MMD) kernel two sample test (Gretton et al., 2012) , which assesses the fit quality. We take the sample size to be 300 for the two sample kernel test. Figure 1 shows an example of the transformation from normal (left panel) to MEFN (middle panel), and comparing that to the ground truth Dirichlet (right panel). The MEFN and ground truth Dirichlet densities shown in purple match closely, and the samples drawn (red) indeed appear to be iid draws from the same (maximum entropy) distribution in both cases.

Additionally, the middle panel of Figure 1 shows an important cautionary tale that foreshadows our texture synthesis results ( §4.3). One might suppose that satisfying the moment matching constraints is adequate to produce a distribution which, if not technically the ME distribution, is still interestingly variable. The middle panel shows the failure of this intuition: in dark green, we show a network trained to simply match the moments specified above, and the resulting distribution quite poorly expresses the variability available to a distribution with these constraints, leading to samples that are needlessly similar. Given the substantial interest in using networks to learn implicit generative models (e.g., Mohamed & Lakshminarayanan (2016) ), this concern is particularly relevant and highlights the importance of considering entropy. that the MEFN stabilizes at the correct value (as a stochastic estimator, variance around that value is expected). In the middle panel, we show the distribution of MMD values for the kernel two sample test, as well as the observed statistic for the MEFN (red) and for a randomly chosen Dirichlet distribution (gray; chosen to be close to the true optimum, making a conservative comparison). The MMD test does not reject MEFN as being different from the true ME distribution p * , but it does reject a Dirichlet whose KL to the true p * is small (see legend). In the right panel, for many different Dirichlets in a small grid around a single true p * , the kernel two sample test statistic is computed, the MMD p-value is calculated, as is the KL to the true distribution. We plot a scatter of these points in grey, and we plot the particular MEFN solution as a red star. We see that for other Dirichlets with similar KL to the true distribution as the MEFN distribution, the p-values seem uniform, meaning that the KL to the true is indeed very small. Again this is conservative, as the grey points have access to the known Dirichlet form, whereas the MEFN considered the entire space (within its network capacity) of S supported distributions. Given this fact, the performance of MEFN is impressive.

4.2. RISK-NEUTRAL ASSET PRICING:

We illustrate the flexibility and practicality of our algorithm extracting the risk-neutral asset price probability based on option prices, an active and interesting area for ME models. We find that MEFN and the classic Gibbs approach yield comparable performances. Owing to space limitations we have placed these results in Appendix §B.

4.3. MODELING IMAGES OF TEXTURES:

Constructing generative models to generate random images with certain texture structure is an important task in computer vision. A line of texture synthesis research proceeds by first extracting a set of features that characterizes the target texture and then generate images that match the features. The seminal work of Zhu et al. (1998) proposes constructing texture models under the ME framework, where features (or filters) of the given texture image are adaptively added in the model and a Gibbs distribution whose expected feature matches the target texture is learnt. One major difficulty with the method is that both model learning and image generation involve sampling from a complicated Gibbs distribution. More recent works exploit more complicated features (Portilla & Simoncelli, 2000; Gatys et al., 2015; Ulyanov et al., 2016) . Ulyanov et al. (2016) propose the texture net, which uses a texture loss function by using the Gram matrices of the outputs of some convolutional layers of a pre-trained deep neural network for object recognition.

While the use of these complicated features does provide high-quality synthetic texture images, that work focuses exclusively on generating images that match these feature (moments). Importantly, this network focuses only on generating feature-matching images without using the ME framework to promote the diversity of the samples. Doing so can be deeply problematic: in Figure 1 2016) (we adapted https://github.com/taesung89/real-nvp). We use 3 residual blocks with 32 feature maps for each coupling layer and downscale 3 times. For fair comparison, we use the same real NVP structure for both1 , implemented in TensorFlow (Abadi et al., 2016) .

As is shown in top row of figure 3 , both methods generate visually pleasing images capturing the texture structure well. The bottom row of Figure 3 shows that texture cost (left panel) is similar for both methods, while MEFN generates figures with much larger entropy than the texture network formulation (middle panel), which is desirable (as previously discussed). The bottom right panel of figure 3 We compute in Table 1 the average pairwise Euclidean distance between randomly sampled images (d

EQUATION

2 ), and MEFN gives higher d L 2 , quantifying diversity across images. We also consider an ANOVA-style analysis to measure the diversity of the images, where we think of the RGB values for the same pixel across multiple images as a group, and compute the within and between group variance. Specifically, denoting z k i as the pixel value for a specific pixel k = 1, ..., d for an image i = 1, ...., n. We partition the total sum of square SST = i,k (z k i -z) 2 as the within group error SSW = i,k (z k i -zk ) 2 and between group error SSB = i,k n(z k -z) 2 , where z and zk are the mean pixel values across all data and for a specific pixel k. Ideally we want the samples to exhibit large variability across images (large SSW, within a group/pixel) and no structure in the mean image (small SSB, across groups/pixels). Indeed, the MEFN has a larger SSW, implying higher variability around the mean image, a smaller SSB, implying the stationarity of the generated samples, and a larger SST, implying larger total variability also. The MEFN produces images that are conclusively more variable without sacrificing the quality of the texture, implicating the broad utility of ME. 

5. CONCLUSION:

In this paper we propose a general framework for fitting ME models. This approach is novel and has three key features. First, by learning a transformation of a simple distribution rather than the distribution itself, we are able to avoid explicitly computing an intractable normalizing constant for the ME distribution. Second, by combining stochastic optimization with the augmented Lagrangian method, we can fit the model efficiently, allowing us to evaluate the ME density of any point simply and accurately. Third, critically, this construction allows us to trivially sample iid from a ME distribution, extending the utility and efficiency of the ME framework more generally. Also, accuracy equivalent to the classic Gibbs approach is in itself a contribution (owing to these other features).

We illustrate the MEFN in both a simulated case with known ground truth and real data examples.

There are a few recent works encouraging sample diversity in the setting of texture modeling. Ulyanov et al. (2017) extended Ulyanov et al. (2016) by adding a penalty term using the Kozachenko-Leonenko estimator Kozachenko & Leonenko (1987) of entropy. Their generative network is an arbitrary deep neural network rather than a normalizing flow, which is more flexible but cannot give the probability density of each sample easily so as to compute an unbiased estimator of the entropy. Kozachenko-Leonenko is a biased estimator for entropy and requires a fairly large number of samples to get good performance in high-dimensional settings, hindering the scalability and accuracy of the method; indeed, our choice of normalizing flow networks was driven by these practical issues with Kozachenko-Leonenko. Lu et al. (2016) extended Zhu et al. ( 1998) by using a more flexible set of filters derived from a pre-trained deep neural networks, and using parallel MCMC chains to learn and sample from the Gibbs distribution. Running parallel MCMC chains results in diverse samples but can be computationally intensive for generating each new sample image.

Our MEFN framework enables truly iid sampling with the ease of a feed forward network.

A AUGMENTED LAGRANGIAN CONDITIONS:

We give a more thorough discussion of the regularity conditions which ensure that the Augmented Lagrangian method will work. The goal of this section is simply to state these conditions and give intuitive arguments about why some should hold in our case, not to attempt to prove that they indeed hold. The conditions (Bertsekas, 2014) are:

• There exists a strict local minimum φ * of the optimization problem of Equation 5: If the function class F is rich enough that it contains a true solver of the maximum entropy problem, then a global optimum exists. Although not rigorous, we would expect that even in the finite expressivity case that a global optimum remains, and indeed, recent theoretical work (Raghu et al., 2016; Poole et al., 2016) has gotten close to proving this. • φ * is a regular point of the optimization problem, that is, the rows of ∇ φ R(φ * ) are linearly independent: Again, this is not formal, but we should not expect this to cause any issues. This clearly depends on the specific form of T , but the condition basically says that there should not be redundant constraints at the optimum, so if T is reasonable this shouldn't happen. • H(p φ ) and R(φ) are twice continuously differentiable on a neighborhood around φ * :

This holds by the smoothness of the normalizing flows. • y ∇ 2 φ L(φ * ; λ * , 0)y > 0 for every y = 0 such that ∇ φ R(φ * )y = 0, where λ * is the true Lagrange multiplier: This condition is harder to justify. It would appear it is just asking that the Lagrangian (not the augmented Lagrangian) be strictly convex in feasible directions, but it is actually stronger than this and some simple functions might not satisfy the property. For example, if the function we are optimizing was x 4 and we had no constraints, the Lagrangian's Hessian would be 12x 2 , which is 0 at x * = 0 thus not satisfying the condition. Importantly, these conditions are sufficient but not necessary, so even if this doesn't hold the augmented Lagrangian method might work (it certainly would for x 4 ). Because of this and the nonrigorous justifications of the first two conditions, we left these conditions for the appendix and relied instead on the empirical performance to justify that we are indeed recovering the maximum entropy distribution. If all of these conditions hold, the augmented Lagrangian (for large enough c and λ close enough to λ * ) has a unique optimum in a neighborhood around φ * that is close to φ * (as λ → λ * it converges to φ * ) and its hessian at this optimum is positive-definite. Furthermore, λ k → λ. This implies that gradient descent (with the usual caveats of being started close enough to the solution and with the right steps) will correctly recover φ * using the augmented Lagrangian method. This of course just guarantees convergence to a local optimum, but if there are no additional assumptions such as convexity, it can be very hard to ensure that it is indeed a global optimum. Some recent research has attempted to explain why optimization algorithms perform so well for neural networks (Choromanska et al., 2015; Kawaguchi, 2016) , but we leave such attempts for our case for future research.

B RISK-NEUTRAL ASSET PRICE:

We extract the risk-neutral asset price probability distribution based on option prices, an active and interesting area for ME models. We give a brief introduction of the problem and refer interested readers to see Buchen & Kelly (1996) for a more detailed explanation. Denoting S t as the price of an asset at time t, the buyer of a European call option for the stock that expires at time t e with strike price K will receive a payoff of c K = (S te -K) + = max(S te -K, 0) at time t e . Under the efficient market assumption, the risk-neutral probability distribution for the stock price at time t e satisfies:

EQUATION

where D(t e ) is the risk-free discount factor and q is the risk-neutral measure. We also have that, under the risk-neutral measure, the current stock price S 0 is the discounted expected value of S te :

EQUATION

When given m options that expire at time t e with strikes K 1 , ..., K m and prices c K1 , ..., c Km , we get m expectation constraints on q(S te ) from Equation 12, together with Equation 13, we have m + 1 expectation constraints in total. With that partial knowledge we can approximate q(S te ), which is helpful for understanding the market expected volatility and identify mispricing in option markets, etc.

Inferring the risk-neutral density of asset price from a finite number of option prices is an important question in finance and has been studied extensively (Buchen & Kelly, 1996; Borwein et al., 2003; Bondarenko, 2003; Figlewski, 2008) . One popular method proposed by Buchen & Kelly (1996) estimates the probability density as the maximum entropy distribution satisfying the expectation constraints and a positivity support constraint by fitting a Gibbs distribution, which results in a piece-wise linear log density:

EQUATION

and optimize the distribution with numerical methods. Here we compare the performance of the MEFN algorithm with the method proposed in Buchen & Kelly (1996) . To enforce the positivity constraint we choose g(z) = e az+b , where a and b are additional parameters.

We collect the closing price of European call options on Nov. 1 2016 for the stock AAPL (Apple inc.) that expires on t e = Jun. 16 2017. We use m = 4 of the options with highest trading volume as training data and the rest as testing data. On the left panel of figure 4 , we show the fitted risk-neutral density of S te by MEFN (red line) with that of the fitted Gibbs distribution result (blue line). We find that while the distributions share similar location and variability, the distribution inferred by MEFN is smoother and arguably more plausible. In the middle panel we show a Q-Q plot of the quantiles of the MEFN and Gibbs distributions. We can see that the quantile pairs match the identity closely, which should happen if both methods recovered the exact same distribution. This highlights the effectiveness of MEFN. There does exist a small mismatch in the tails: the distribution inferred by MEFN has slightly heavier tails. This mismatch is difficult to interpret: given that both the Gibbs and MEFN distributions are fit with option price data (and given that one can observe at most one value from the distribution, namely the stock price at expiration), it is fundamentally unclear which distribution is superior, in the sense of better capturing the true ME distribution's tails. On the right panel we show the fitted option price for the two fitted distributions (for each strike price, we can recover the fitted option price by Equation 12). We noted that the fitted option price and strike price lines for both methods are very similar (they are mostly indiscernible on the right panel of figure 4 ). We also compare the fitted performance on the test data by computing the root mean square error for the fitted and test data. We observe that the predictive performances for both methods are comparable. We note that for this specific application, there are practical concerns such as the microstructure noise in the data and inefficiency in the market, etc. Applying a pre-processing procedure and incorporating prior assumptions can be helpful for getting a more full-fledged method (see e.g. Figlewski (2008) ). Here we mainly focus on illustrating the ability of the MEFN method to approximate the ME distribution for non-typical distributions. Future work for this application includes fitting a riskneutral distribution for multi-dimensional assets by incorporating dependence structure on assets.

C MODELING IMAGES OF TEXTURES:

We tried our texture modeling approach with many different textures, and although MEFN samples don't always exhibit more visual diversity than samples obtained from the texture network, they always have more entropy as in figure 3 . Figure 5 shows two positive examples, i.e. textures in which samples from MEFN do exhibit higher visual diversity than those from the texture network, as well as a negative example, in which MEFN achieves less visual diversity than the texture network, regardless of the fact that MEFN samples do have larger entropy. We hypothesize that this curious behavior is due to the optimization achieving a local optimum in which the brick boundaries and dark brick locations are not diverse but the entropy within each brick is large. It should also be noted that among the experiments that we ran, this was the only negative example that we got, and that slightly modifying the hyperparameters caused the issue to disappear. 

:

Ulyanov et al. (2016) use a quite different generative network structure, which is not invertible and is therefore infeasible for entropy evaluation, so we replace their generative network by the real NVP structure.

Figures and Tables:

Training the MEFN 1: initialize φ = φ 0 , set c 0 > 0 and λ 0 . 2: for Augmented Lagrangian iteration k = 1, ..., k max do 3:

Figure2quantitatively analyzes these results. In the left panel, for a specific choice of α = (1, 2, 3), we show our unbiased entropy estimate of the MEFN distribution p φ as a function of the number of SGD iterations (red), along with the ground truth maximum entropy H(p * ) (green line). Note

Figure 3: Analysis of texture synthesis experiment. See text for description.

Figure 4: Constructing risk-neutral measure from observed option price. Left panel: fitted riskneutral measure by Gibbs and MEFN method. Middle panel: Q-Q plot for the quantiles from the distributions on the left panel. Right panel: observed and fitted option price for different strikes.

Figure 5: MEFN and texture network samples.

r) and r i = ||z -z i || in the radial.

Table content: <table><tr><td>Recently Dinh</td></tr><tr><td>et al. (2016) proposed a normalizing flow with convolutional, multiscale structure that is suitable for</td></tr><tr><td>image modeling and has shown promise in density estimation for natural images.</td></tr><tr><td>3 MAXIMUM ENTROPY FLOW NETWORK (MEFN) ALGORITHM</td></tr><tr><td>3.1 FORMULATION</td></tr><tr><td>Instead of solving Equation 2, we propose solving Equation 1 directly by optimizing a trans-</td></tr><tr><td>formation that maps a random variable Z 0 , with simple distribution p 0 , to the ME distribution.</td></tr><tr><td>Given a parametric family of normalizing flows</td></tr></table>

(middle panel), we showed the lack of diversity resulting from only moment matching in that Dirichlet setting, and further we note that the extreme pathology would result in a point mass on the training image -a global optimum for this objective, but obviously a terrible generative model for synthesizing textures. Ideally, the MEFN will match the moments and promote sample diversity.

Table content: <table/>

Quantitative measure of image diversity using 20 randomly sampled images

Table content: <table><tr><td>Method</td><td>d L 2</td><td>SST</td><td>SSW</td><td>SSB</td></tr><tr><td colspan="5">Texture net 11534 128680 109577 19103</td></tr><tr><td>MEFN</td><td colspan="4">17014 175604 161639 13964</td></tr></table>

Peer review (iclr2017):
The authors propose a new approach for estimating maximum entropy distributions subject to expectation constraints. Their approach is based on using normalizing flow networks to non-linearly transform samples from a tractable density function using invertible transformations. This allows access to the density of the resulting distribution. The parameters of the normalizing flow network are learned by maximizing a stochastic estimate of the entropy obtained by sampling and evaluating the log-density on the obtained samples. This stochastic optimization problem includes constraints on expectations with respect to samples from the normalizing flow network. These constraints are approximated in practice by sampling and are therefore stochastic. The optimization problem is solved by using the augmented Lagrangian method. The proposed method is validated on a toy problem with a Dirichlet distribution and on a financial problem involving the estimation of price changes from option price data. Quality: The paper seems to be technically sound. My only concern would the the approach followed to apply the augmented Lagrangian method when the objective and the constraints are stochastic. The authors propose their own solution to this problem, based on a hypothesis test, but I think it is likely that this has already been addressed before in the literature. It would be good if the authors could comment on this. The experiments performed show that the proposed approach can outperform Gibbs sampling from the exact optimal distribution or at least be equivalent, with the advantage of having a closed form solution for the density. I am concern about the difficulty of he problems considered. The Dirichlet distributions are relatively smooth and the distribution in the financial problem is one-dimensional (in this case you can use numerical methods to compute the normalization constant and plot the exact density). They seem to be very easy and do not show how the method would perform in more challenging settings: high-dimensions, more complicated non-linear constraints, etc... Clarity: The paper is clearly written and easy to follow. Originality: The proposed method is not very original since it is based on applying an existing technique (normalizing flow networks) to a specific problem: that of finding a maximum entropy distribution. The methodological contributions are almost non-existing. One could only mention the combination of the normalizing flow networks with the augmented Lagrangian method. Significance: The results seem to be significant in the sense that the authors are able to find densities of maximum entropy distributions, something which did not seem to be possible before. However, it is not clearly how useful this can be in practice. The problem that they address with real-world data (financial data) could have been solved as well by using 1-dimensional quadrature. The authors should consider more challenging problems which have a clear practical interest. Minor comments: More details should be given about how the plot in the bottom right of Figure 2 has been obtained. *a Dirichlet whose KL to the true p? is small*: what do you mean by this? Can you give more details on how you choose that Dirichlet? I changed updated my review score after having a look at the last version of the paper submitted by the authors, which includes new experiments.