<?xml-model href='http://www.tei-c.org/release/xml/tei/custom/schema/relaxng/tei_all.rng' schematypens='http://relaxng.org/ns/structure/1.0'?><TEI xmlns="http://www.tei-c.org/ns/1.0">
	<teiHeader>
		<fileDesc>
			<titleStmt><title level='a'>Simulation-Based Inference with Approximately Correct Parameters via Maximum Entropy</title></titleStmt>
			<publicationStmt>
				<publisher></publisher>
				<date>04/19/2021</date>
			</publicationStmt>
			<sourceDesc>
				<bibl> 
					<idno type="par_id">10289805</idno>
					<idno type="doi"></idno>
					<title level='j'>ArXivorg</title>
<idno>2331-8422</idno>
<biblScope unit="volume"></biblScope>
<biblScope unit="issue"></biblScope>					

					<author>Rainier Barrett</author><author>Mehrad Ansari</author><author>Gourab Ghosal</author><author>Andrew D White</author>
				</bibl>
			</sourceDesc>
		</fileDesc>
		<profileDesc>
			<abstract><ab><![CDATA[Inferring the input parameters of simulators from observations is a crucial challenge with applications from epidemiology to molecular dynamics. Here we show a simple approach in the regime of sparse data and approximately correct models, which is common when trying to use an existing model to infer latent variables with observed data. This approach is based on the principle of maximum entropy (MaxEnt) and provably makes the smallest change in the latent joint distribution to fit new data. This method requires no likelihood or model derivatives and its fit is insensitive to prior strength, removing the need to balance observed data fit with prior belief. The method requires the ansatz that data is fit in expectation, which is true in some settings and may be reasonable in all with few data points. The method is based on sample reweighting, so its asymptotic run time is independent of prior distribution dimension. We demonstrate this MaxEnt approach and compare with other likelihood-free inference methods across three systems: a point particle moving in a gravitational field, a compartmental model of epidemic spread and finally molecular dynamics simulation of a protein.]]></ab></abstract>
		</profileDesc>
	</teiHeader>
	<text><body xmlns="http://www.tei-c.org/ns/1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink">
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Introduction</head><p>Simulation-based inference (SBI) is a class of methods that infer the input parameters and unobservable latent variables in a simulator from observational data. SBI is different than traditional statistical inference or machine learning because simulators are typically not differentiable and their likelihoods are intractable. There have been great strides in methods for SBI and a recent review may be found in <ref type="bibr">[1]</ref>. Most SBI methods are concerned with finding a few simulator parameters from a rich set of observations <ref type="bibr">[2]</ref><ref type="bibr">[3]</ref><ref type="bibr">[4]</ref>. Here, we consider updating a simulator with many trusted parameters to match a sparse set of observations. The ancestor for this line of research is in molecular dynamics simulations of proteins. These simulations require thousands of parameters and the observed data (macroscopic experimental values) is often on the order of 10 to 100 data points (e.g. Rei&#223;er et al. <ref type="bibr">[5]</ref>). An approach that has emerged in molecular dynamics simulations is maximum entropy (MaxEnt) biasing <ref type="bibr">[6]</ref><ref type="bibr">[7]</ref><ref type="bibr">[8]</ref><ref type="bibr">[9]</ref>. MaxEnt biasing minimially modifies the simulator to match observations. The premise of MaxEnt is that the original model is approximately correct and observations should be matched in expectation, which is not the usual approach in SBI. These two assumptions lead to a unique bias <ref type="bibr">[10]</ref> to the simulator that is independent of the parameters and can be implemented as a simple reweighting procedure. The MaxEnt method's run-time scales only with sample number, rather than the number of model parameters which is atypical of most SBI methods because they require joint sampling.</p><p>The second setting of MaxEnt is to make an ansatz that an observation can be substituted as a distribution moment. For example, consider observing a particle trajectory and we would like to make inferences about where the particle will go next. Our observations are specific pairs of time and position that describe the trajectory. If we have a good model for how the particle behaves, MaxEnt will minimally change the model to agree with the particle trajectory on average. The MaxEnt posterior will agree in expectation exactly with the observed trajectory. Thus, from a practical point of view MaxEnt provides an accurate description of the data and a probability distribution for the posterior. The inferred continuation of the trajectory will come from the expectation of that posterior. An alternative would be treating the observation as exact and regressing the prior model, which would not give a posterior but instead a mode (most likely trajectory). Yet this gives no uncertainties with the predictions and can lead far away from the prior model, leading to issues like overfitting and covariate shift. Bayesian inference could be used to fit the particle trajectory by supposing a measurement error distribution. Yet this creates an over-constrained problem where a weak error distribution reduces the agreement with the observed trajectory and a strong error distribution reduces the agreement of the prior model. In essence, by "relaxing" the observation to be an average we enable agreement with the observation exactly, maximize the agreement with the prior, and do not require potentially ad-hoc construction of error distributions <ref type="foot">3</ref> . This can be justified through the principle of maximum parsimony: the MaxEnt formulation requires the fewest input parameters. If multiple observations are gathered, then the Bayesian inference setting is more appropriate because the distribution moment ansatz would exclude information about variance in multiple observations. Another potential application area could be in few-shot regression with Bayesian network models <ref type="bibr">[15]</ref>, where only a few examples are available in a new task. MaxEnt provides a way to fit a previously trained Bayesian network to those few examples balancing agreement with them exactly and while minimizing the effect on the trained model.</p><p>The MaxEnt method presented here has a run time scaling that is independent of the number of model/prior parameters; it acts entirely on samples. This also means that intractable or infinite dimensional priors (such as sampling both models/priors) can be treated with MaxEnt. This can be a large advantage over other approximate inference methods like approximate Bayesian computing and likelihood free inference.</p><p>The MaxEnt approach in simulation can be traced to Jayne's early work on deriving statistical physics from MaxEnt <ref type="bibr">[16]</ref>. It was shown, for example, that the Boltzmann distribution could be derived by simply adding a restraint on average energy that must be satisfied in expectation, analogous to matching an observation. A similar method of incorporating observations in expectation returned 50 years later in determining how to match protein molecular dynamics simulations to observations <ref type="bibr">[17]</ref>. This method was then recast as an approximation to MaxEnt <ref type="bibr">[12]</ref>. Matching observations in molecular dynamics with MaxEnt was also shown in Pitera and Chodera <ref type="bibr">[10]</ref>. This was followed by rapid progress to create practical methods for use in simulations <ref type="bibr">[9,</ref><ref type="bibr">[18]</ref><ref type="bibr">[19]</ref><ref type="bibr">[20]</ref>. The MaxEnt method based on reweighting has been presented in the context of molecular dynamics simulations in many forms over the years <ref type="bibr">[5,</ref><ref type="bibr">[21]</ref><ref type="bibr">[22]</ref><ref type="bibr">[23]</ref><ref type="bibr">[24]</ref><ref type="bibr">[25]</ref><ref type="bibr">[26]</ref><ref type="bibr">[27]</ref><ref type="bibr">[28]</ref><ref type="bibr">[29]</ref>. MaxEnt-based methods have a long history of use in the molecular dynamics community across various types of systems, and this approach is still widely used for biasing applications in modern molecular simulations, demonstrating ongoing interest and engagement in the community <ref type="bibr">[30]</ref><ref type="bibr">[31]</ref><ref type="bibr">[32]</ref>. A review by Bonomi et al. provides broader context for the use of maximum entropy and other similar methods in the molecular simulation community <ref type="bibr">[7]</ref>. The review by Cesari, Rei&#223;er, and Bussi <ref type="bibr">[33]</ref> provides an overview of the mathematics of MaxEnt, its connections to Bayesian inference and maximum likelihood, and some discussion of the potential hurdles involved. Also, for a comparative study weighing the benefits of MaxEnt and restraint-based methods, see <ref type="bibr">Rangan et al. 2018[34]</ref>.</p><p>Our contribution here is deriving a general MaxEnt framework that is applicable to arbitrary simulators, demonstrating its application to areas outside of molecular dynamics, and showing one method of improving the support (sampling) of the posterior, which is important when the simulator is far from the observations. In the remainder of this work, we develop the theory, discuss sampling issues, and compare the MaxEnt method to approximate Bayesian computing (ABC) <ref type="bibr">[3,</ref><ref type="bibr">[35]</ref><ref type="bibr">[36]</ref><ref type="bibr">[37]</ref>, sequential neural likelihood (SNL) <ref type="bibr">[38]</ref>, and direct Bayesian inference when the likelihood is tractable. Additional background on these methods used for comparison can be found in the supporting information.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Results</head></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Theory</head><p>Given a simulator f ( &#952;) with a set of parameters &#952;, we have a prior distribution of parameters P ( &#952;). For example, the function f ( &#952;) could be propagating a system of ODEs for some set number of timesteps or a molecular dynamics simulation with intrinsic noise. Suppose we have some set of N observations, {&#7713;} k , k &#8712; [1, . . . , N ], which we would like to match with our model. Assume the measurement of each &#7713;k has some uncertainty k , where k is a random variable distributed according to some prior distribution about uncertainty, P 0 ( k ). We would like to constrain our model such that</p><p>This means that we want the average over the distribution of our updated models (P ( &#952;)) to match the observations data, with an allowable average disagreement based on { k }. This is an unusual constraint and is weaker than most simulation inference methods. It reflects the strong belief in our prior model in this setting. Note that inclusion of the P 0 ( k ) and k terms is optional: it is not necessary to allow disagreement on average with data, unlike in a Bayesian framework. This would be equivalent to setting the error distribution to a Dirac delta about 0:</p><p>Another difference is that this distribution of uncertainty is about bias. It accounts for systemic deviation in average agreement and does not describe the underlying variance of the observational data. This approach is analogous to Bayesian model averaging <ref type="bibr">[39]</ref>, in that it is an average over many model parameter settings, reweighted by the posterior likelihood.</p><p>The maximum entropy modification to the prior distribution P ( &#952;) to satisfy the N constraints is given by <ref type="bibr">[9,</ref><ref type="bibr">10,</ref><ref type="bibr">12,</ref><ref type="bibr">40]</ref>:</p><p>where Z is a normalization constant and &#955; k are chosen such that E[g k + k ] = &#7713;k . The dependence on k can be removed by computing the marginal,</p><p>The problem is reduced to finding &#955; k such that the constraint is satisfied. Again, we must remove</p><p>and is understood to still be a function of</p><p>If the prior is an exponential family, the &#955; k s will exist and be unique under some mild assumptions about support of the prior and covariance of observables (i.e., cannot have perfectly correlated observables with incompatible observations) <ref type="bibr">[10,</ref><ref type="bibr">12]</ref>.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Computing weighted properties and sampling efficiency</head><p>In Algorithm 1, we show the procedure for sampling from the MaxEnt distribution defined in Equation 4 via importance sampling <ref type="bibr">[41]</ref>. Here, P ( &#952;) is the prior distribution over simulation parameters &#952;, f is the simulator, M is the number of Algorithm 1: MaxEnt Weights with Uncertain Observations</p><p>2 end end end return w samples from the prior to take, N is the number of constraints, P 0 ( k ) is the error distribution, g k is the kth observation, and &#7713;k is the target observable value to which we would like to constrain our simulator. &#951; is the learning rate. The output of this algorithm, {w i }, are the weights of trajectories {f (&#952; i )}, and any desired property g can be computed as</p><p>The challenge of using MaxEnt is sampling from P ( &#952;). Our assumption thus far is that our prior P ( &#952;) is approximately correct, so that samples from P ( &#952;) should be similar to P ( &#952;). In this ideal case, the algorithm is simply a matter of reweighting. One samples &#952; i , computes f ( &#952; i ), compute weights proportional to w i )] consistent with the experimental data (Algorithm 1), and then any other property is reweighted with the same weights. In the non-ideal case (if for instance sampling is expensive, the space is high-dimensional, or the model is far from correct), there can be insufficient support to agree with the constraints. To treat insufficient support, we take a simple approach and use gradient descent to modify the sampling distribution parameters &#952; j to minimize the cross-entropy with P ( &#952;):</p><p>where w i [P ] depends on &#952; j via the expectation function. We remove the effect of the sampling distribution from the posterior via reweighting by P ( &#952;)/P ( &#952; j ) We refer to this approach as variational.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Trivial Simulation with Gaussian Noise</head><p>We first consider a toy simulator f that outputs a scalar r. We have a prior belief about the value of the constant as a normal distribution N (r, &#952;). This example serves to compare the MaxEnt approach with Bayesian inference. The observed data is a single point (r) and we treat it as an average constraint in the MaxEnt. That is, we have a single observation and we constrain our simulator to on average match this observation. Figure <ref type="figure">1</ref> panel a) shows how the MaxEnt posterior changes with different observations (r = 5 or r = 10). The r = 10 observation requires the variational sampling (Equation <ref type="formula">6</ref>) because the observed value is outside the sampled support of the prior. The expected value of E[r] of the posterior always matches the observation and the moments of the posterior are identical to the prior, except the 1 st moment (the mean). Although Figure <ref type="figure">1a</ref> is calculated with Algorithm 1, the analytic equation for the posterior is simply N (r, &#952;) <ref type="bibr">[10]</ref>.</p><p>With Bayesian inference, we must assume some noise model of our simulator so that we can compute the probability of the single observation arising from the simulator, namely P (data|model) <ref type="bibr">[42]</ref>. We take this to be N (r, &#963;). The Bayesian posterior balances this evidence with the prior distribution:</p><p>The expected value of r will not match the observed value except in the limit of &#963;/&#952; reaching 0. E[r] will be between the observed value and the prior belief expectation. Figure <ref type="figure">1b</ref> compares the Bayesian inference and MaxEnt posteriors. Panel a) shows how the MaxEnt method leaves the variance of r unchanged as we consider different observed values. Panel b) shows the use of Bayesian inference to match the observation at r = 10. It requires extreme ratios between prior belief and experimental uncertainty to match the observation at 10. This is not necessarily a disadvantage, we simply are showing that observations are matched in expectation with MaxEnt and not with Bayesian inference. Panel c) shows how the MaxEnt method keeps the posterior entropy maximized regardless of the observation value (x-axis), as expected for a maximum entropy method. Bayesian inference shows a more peaked distribution when the observed value is far away from the prior, giving less entropy. That is, to agree with the observation we must necessarily increase the strength of evidence, which peaks the posterior.</p><p>Example System 1: Point Particle Gravitation Simulation For a our first example system, Figure <ref type="figure">2</ref> shows a comparison of SNL and MaxEnt reweighting on a unit mass particle in a gravitational field of three attractors. The simulator here is a point particle following Newtonian gravitational mechanics. The goal here is to modify the simulation trajectories to align with a small set of observations. An example task might be fitting the trajectory of a comet to a small number of observations separated by years.</p><p>The parameters for this simulation were m 1 , m 2 , m 3 , v 0x and v 0y , the masses of the three attractors, and the initial velocity of the particle, respectively. The positions of the attractors and the initial position of the particle were all fixed. We treat these parameters as unknown, and the prior belief for them follows a normal distribution, shown in Figure <ref type="figure">2</ref>.</p><p>Repeatedly sampling from this prior and running the simulator results in a distribution of trajectories, whose means are shown in Figure <ref type="figure">2a</ref>). MaxEnt reweights this ensemble of trajectories to agree with five observed positions along the trajectory. (The mean path does not exactly pass through the observations because some zero-mean normally-distributed noise with standard deviation of 3 was added to each observation.) The average posterior trajectory indeed agrees with all observations. The prior and posterior for the parameters are shown in Figure <ref type="figure">2b</ref>.</p><p>The observed points were synthesized by choosing a set of true parameter values and imposing zero-mean normallydistributed noise with standard deviation 3 on every 20th timestep on the 100-step simulation. Thus, one way to evaluate the MaxEnt performance is to see if the posterior means are close to these true values. We can see that the MaxEnt posteriors are closer to these values than the prior, but still largely in agreement with the prior. It fits the observations while staying as close to the prior as possible, because that maximizes entropy. In contrast, SNL results in a much narrower posterior around the true values, while diverging from the prior, because that maximizes likelihood.</p><p>We computed the cross-entropy of the prior and posterior produced by MaxEnt and SNL. These values were 5.09 for SBI with SNL, and 3.43 for MaxEnt reweighting. This demonstrates how MaxEnt minimally alters the prior distribution while still matching observations in expectation -the average path followed by the MaxEnt particle matches all target points, while matching the posterior to the prior's shape more closely than SNL. This example illustrates two key points. Firstly, it shows that MaxEnt is robust to chaotic systems, as it is still able to match observations on average, with minimal change to the prior. However, it is also an example of when another SBI method may be preferable, depending on the goal. The goal of MaxEnt is, by construction, to alter the prior as little as possible while agreeing with observations on average. In cases where the true underlying parameters governing a model are in a low-density region of the prior, the posterior resultant from MaxEnt will therefore assign relatively low probability to these parameter values as well. Thus, in the sense of estimating likelihood when the prior is not close to the true values, other methods like SNL can be preferable to MaxEnt. We can see that while SNL makes a better estimate of the true parameters used to generate those observations, it does not reproduce a path that aligns with the observations. This presents a choice to the simulator. If the goal is to alter a model to agree with observations, MaxEnt is preferred, especially if the prior is strongly trusted. If the goal is accurate likelihood estimation, methods like SNL are preferred, especially if the prior is not strongly trusted.</p><p>Example System 2: Epidemiological modeling</p><p>In our third example, we apply our framework to modeling the spread of a pathogen in vulnerable populations. We consider an SEAIR compartmental model of epidemic spread (Figure <ref type="figure">3</ref>) on metapopulations connected via a spatial network of patches. Each patch corresponds to a location such as a zipcode in a city, or a county, and connections between patches correspond to mobility flows of residents encoded in a M &#215; M mobility matrix for M patches, where M ij is the number of people moving from patch i to patch j in one time increment. Contacts within patches occur in a fully-mixed mean field manner where individuals can be in any one of five states of infection: Susceptible (S), Exposed (E), Asymptomatic (A), Infected (I), and Resolved (R). The choice for this particular combination of compartments was inspired by its relevance in modeling the evolution of the current SARS-CoV-2 pandemic <ref type="bibr">[43,</ref><ref type="bibr">44]</ref>. Each individual patch is represented with fractions of S, E, A, I, R, rather than the count of individuals within each compartment. We first create a "reference" trajectory that represents the true disease model. From this reference trajectory, we extract observations which are used as the input to the MaxEnt methods, by extracting values at specific timepoints in the reference trajectory. A challenge in modeling the spread of epidemics is associated with reporting of the empirical number of confirmed cases (compartment I), which is typically very noisy <ref type="bibr">[45]</ref>. To simulate this uncertainty, we add random additive noise to the observations from the reference trajectory (see Methods for details). This reference trajectory is represented as dashed lines in Figure <ref type="figure">4a</ref>). We choose 5 uniformly random data points within the first half of the trajectory of the compartment I in patch 1 as observations (represented as black dots). The performance of the model is evaluated by comparing the predicted trajectory and the reference in a different patch <ref type="bibr">(3)</ref>. In Figure <ref type="figure">4b</ref>) we compare the performance of MaxEnt, a least-squares fit, and ABC in fitting the prior to the observations. Compared to MaxEnt, the result from the least squares method was a poor fit with high variance, as it over-fits to observation noise. This was shown by doing a 5-fold leave-one-out cross-validation of the observations and evaluating the standard deviation at times t = 0, 125 and 250 for each method (inset in Figure <ref type="figure">4</ref>.b). Out of all methods evaluated, ABC had the least variance, but was computationally more expensive to run, whereas MaxEnt can include more model parameters without additional computational cost. Variational MaxEnt was also implemented to reweight the disease trajectory (See details in supporting information FIG. <ref type="figure">S2</ref>).</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Example System 3: MBP Fragment Molecular Dynamics</head><p>Finally, we consider an application from biophysical modeling of the myelin basic protein (MBP) epitope fragment. MBP is a common autoimmune target for the disease multiple scelrosis (MS) <ref type="bibr">[46]</ref>. Spyranti et al. <ref type="bibr">[47]</ref> characterized the specific region of MBP (83-99) that is the binding epitope for T-cell receptor recognition with solution Nuclear Magnetic Resonance (NMR). NMR provides per-atom chemical shifts, which are population averages of a measurement of an atoms' local environment <ref type="bibr">[48]</ref>. However, we must infer a specific structure to understand the molecular biology of MBP. In this example we use molecular dynamics as a prior model, the chemical shifts as maximum entropy restraints, and compute a posterior of protein configurations. MaxEnt analysis has been applied frequently already in molecular dynamics, although not this exact approach with uncertainty <ref type="bibr">[34]</ref>.</p><p>Our prior model is an empirical distribution consisting of MBP fragment atomic positions as sampled from molecular dynamics. The specific fragment sequence was ENPVVHFFKNIVTPRTP and the molecular dynamics was initialized from an extended conformation. Simulations was performed in NVT ensemble in Gromacs 2020 <ref type="bibr">[49]</ref><ref type="bibr">[50]</ref><ref type="bibr">[51]</ref><ref type="bibr">[52]</ref><ref type="bibr">[53]</ref><ref type="bibr">[54]</ref><ref type="bibr">[55]</ref> with CHARMM27 force field at a density of 25 mg/ml <ref type="bibr">[56,</ref><ref type="bibr">57]</ref>. The simulation duration was 1.3&#181;s with frames saved for this analysis every 500ps. To compute the chemical shift, g k , we use a graph neural network that can compute chemical shift from atomic positions <ref type="bibr">[58]</ref>. We only biased backbone HN atoms, due to their higher accuracy <ref type="bibr">[58]</ref>. The first 6 HN atoms were biased (NPVVHF), excluding the N-terminus. The remaining HN atom chemical shifts were unbiased (KNIVTRT). P 0 ( ) was chosen to be a Laplace distribution with scale parameter 0.05 -allowing a small amount of systematic disagreement.</p><p>Figure <ref type="figure">5</ref> shows the maximum entropy posterior average chemical shifts. As expected, exact agreement is found for the chemical shifts for which observations are provided. The posterior for which there are no observations follow the the prior closely (as expected in MaxEnt), although they move in the wrong direction at some positions. The protein structures are shown to the right of the plot. "Spyranti" is a representative structure from the deposited structure constructed by Spyranti et al. <ref type="bibr">[47]</ref> The posterior mode from MaxEnt is shown to the right. It has a helix, though not the &#945;-helix as shown in Spyranti. An advantage of this MaxEnt approach to analyzing NMR data is that there are 6500 structures in the posterior, whereas the traditional approach of NMR structure refinement results in 5-20 structures. This large distribution can then be used for other tasks with better calibration, such as finding drugs to target the protein structure, predicting protein-protein interfaces, and assessing structural properties.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Discussion</head><p>We have presented MaxEnt reweighting as an inference method for altering an approximately-correct simulator to agree with observations. This method can be used on arbitrary simulators with arbitrary numbers of parameters, requiring only sufficient sampling of the prior distribution. The simulator need not have derivatives or tractable likelihoods. We demonstrated this by comparing with other SBI methods using three different simulators in different example contexts. The framework is particularly effective and robust when data is scarce or expensive (epidemic spreading being an archetypal example). MaxEnt provably changes the prior minimally to fit observations. While the method was initially developed for and particularly well-suited for molecular dynamics simulations-where experimental observations are much more costly and few in number compared to simulation-as demonstrated here, its applicability has potential for use in any setting of stochastic modeling where the derivative of the simulator's output with respect to latent variables is unavailable or intractable.</p><p>The approach to sampling described here is an implementation of variational inference to sample from the posterior. One could instead use Monte Carlo sampling. This would have the advantage of not requiring prior distribution derivatives, but since the derivatives here are closed-form it is computationally convenient to use importance sampling. MaxEnt's advantages over other widely used SBI methods, such as SNL, are that it is simple to implement, requires no hyperparameter choices like a neural network design, and can fit observations in expectation.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Methods Point Particle Gravitation Simulation</head><p>For this simulation, the prior parameter distribution was taken as a multivariate normal distribution centered at {m 1 = 85, m 2 = 40, m 3 = 70, v 0x = 12, v 0y = -30}, with covariance matrix I &#215; 50. This wide prior was chosen because MaxEnt needs parameter support that overlaps with the observations we would like to fit. Fitting was done using the SBI package for Python <ref type="bibr">[59]</ref> with the SNL method, <ref type="bibr">[38]</ref> and a custom implementation of MaxEnt reweighting using Keras <ref type="bibr">[60,</ref><ref type="bibr">61]</ref>. Both methods used 2048 prior samples for fitting. SNL used default parameters from the SBI package <ref type="bibr">[59]</ref> and MaxEnt used the Adam optimizer <ref type="bibr">[62]</ref> with a learning rate of 0.0001 with mean error for 30000 epochs and batch size 2048.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Epidemiology Modeling</head><p>Epidemic spreading in networks can be modeled as a reaction-diffusion process. The reaction corresponds to an infection caused by interactions of subjects within a fully-mixed region or patch of varying granularities (a meta-population), while diffusion corresponds to movement of people (of various infection states) between patches <ref type="bibr">[63]</ref>. In this example, the meta-population system is comprised of three isolated local populations (patches) connected via flows corresponding to migrating individuals. The spreading process is represented through a temporally discretized ODE that includes the spatial distribution of the population as well as their mobility patterns <ref type="bibr">[64]</ref>.</p><p>In our simulation, the infection begins in patch 1, propagating to the other two patches according to a synthetic mobility matrix. This mobility matrix was randomly generated with dominating diagonal elements to satisfy the fully-mixed region assumption. Five uniformly random data points within the first half of the trajectory of the compartment I in patch 1 were considered as observations with a 5 percent random additive noise and Laplace prior of 0.01 (shown as restraints in Figure <ref type="figure">4a</ref>). The true parameters for the reference epidemic trajectory are: {start I = 0.02, start A = 0.05, E period = 7, A period = 5, I period = 14}. Parameters for this simulation were asymptomatic, infectious and exposed periods along with the fractional starting values for I and A compartments. The prior parameter distribution were taken as a truncated-normal distribution centered at {start I = 0.001, start A = 0.001, E period = 2, A period = 2, I period = 10}, with variances of {0.8, 0.8, 1, 4, 5}, respectively. For the simulation, the pyABC <ref type="bibr">[65]</ref> package was used with default parameters, and the same MaxEnt implementation was used with the Adam optimizer, a learning rate of 0.1, and loss of mean squared error for 1000 epochs with a batch size of 8192.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>MBP Fragment Molecular Dynamics</head><p>Molecular dynamics was done with Gromacs 2020.03 <ref type="bibr">[49]</ref><ref type="bibr">[50]</ref><ref type="bibr">[51]</ref><ref type="bibr">[52]</ref><ref type="bibr">[53]</ref><ref type="bibr">[54]</ref><ref type="bibr">[55]</ref> as driven by GromacsWrapper <ref type="bibr">[66]</ref> with a timestep of 2 fs. MBP initial structure were generated with PeptideBuilder <ref type="bibr">[67]</ref> and Packmol <ref type="bibr">[68]</ref>. The CHARMM27 forcefield was used for <ref type="bibr">[56,</ref><ref type="bibr">57]</ref>. Canonical Sampling through Velocity Rescaling (CSVR) thermostat was used <ref type="bibr">[69]</ref>. Long-range electrostatic forces were calculated with the particle mesh Ewald method <ref type="bibr">[70]</ref>. Shifted Van der Waals and short-range electrostatics were used with a cutoff distance of 1 nm. Hydrogen containing covalent bonds were constrained using the LINear Constraint Solver (LINCS) algorithm <ref type="bibr">[71]</ref>. MaxEnt implementation as described above was used with 500 epochs in Adam optimizer with learning rate of 0.1.</p></div><note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="2" xml:id="foot_0"><p>Bayesian inference for fitting distribution moments requires specifying an error distribution that requires additional system insight and its strength relative to the prior belief affects the agreement with the distribution moment data. See system 1.</p></note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" n="3" xml:id="foot_1"><p>Our maximum entropy formulation does allow uncertainty on distribution moments if desired.</p></note>
		</body>
		</text>
</TEI>
