\section{Introduction}

One concept widely used to quantify rare behavior in computer simulations is importance sampling, in which the typical behavior of a reference system is used to infer the rare behavior of a model of interest\c{frenkel2001understanding}. Umbrella sampling\c{torrie1977nonphysical} is a method of importance sampling used in equilibrium. Here, a model is modified by a bias potential that constrains it to a region of interest, and knowledge of the Boltzmann weights of the modified and original models allows the user to calculate thermodynamic properties of the latter. Away from equilibrium there exist methods similar in spirit to umbrella sampling. These methods probe the statistical properties of dynamic trajectories, using a reference dynamics whose typical behavior is in some sense equivalent to the rare behavior of the model of interest\c{bucklew1990large,touchette2009large,garrahan2009first, giardina2006direct,maes2008canonical,giardina2011simulating,lecomte2007numerical,nemoto2014computation,rohwer2015convergence,nemoto2016population,ray2017importance,jpgdimer,ray2017exact}.
\begin{figure*}[t]
   \includegraphics[width=0.8\linewidth]{fig0}
   \caption{Nonequilibrium umbrella sampling. (a) Estimation of the rate function $I(a)$ of a model $s$ (green), a member of the family \eq{rm}, can be done using a set of reference models $s'$. Typical reference-model trajectories, i.e. trajectories whose values of $a$ concentrate near the minima $a_{s'}$ of the reference-model rate functions (blue dashed lines), each allow reconstruction of one point $I(a_{s'})$ on the green curve. Unlike conventional umbrella sampling, each piece of $I(a_{s'})$ is evaluated independently, and values of $s'$ can be as close or as far apart as desired. (b) Multi-point sampling. In this paper we show that each set of reference-model simulations can be used to recover one point (middle of the green interval) on the rate functions of any set $\{s\}$ of models of the family \eq{rm}. Thus a collection of reference-model simulations allows reconstruction of the rate functions of the entire family of models.}
   \label{fig0}
\end{figure*}

One such method, described in Refs.\c{klymko2017rare,lattice2}, applies to Markov chains of a fixed number of configuration changes. The method makes use of a set of reference models to reconstruct the large-deviation rate functions, for path-extensive dynamical observables, for an original model of interest. The rate functions of the reference models can be regarded as nonequilibrium umbrella potentials, concentrating sampling in particular regions of parameter space, an idea sketched in \f{fig0}(a). The concept of trajectory importance sampling is well known\c{bucklew1990large,touchette2009large,garrahan2009first, giardina2006direct,maes2008canonical,giardina2011simulating,lecomte2007numerical,nemoto2014computation,rohwer2015convergence,nemoto2016population,ray2017importance,jpgdimer,ray2017exact}; the approach of Refs.\c{klymko2017rare,lattice2}  is different to most approaches in that it uses as a reference dynamics a simple (rather than an optimal) modification of the original dynamics, and does not use population dynamics (a.k.a. cloning) methods\c{giardina2011simulating}.

In general, trajectory importance sampling of the probability distribution $\rho(a) \sim {\rm e}^{-K I(a)}$ of a path-extensive quantity $K a$ requires evaluation of relations of the type
\begin{equation}
\label{e_one}
{\rm e}^{-K I(a)} \sim {\rm e}^{s K a} \int {\rm d} q \, P_s(q) e^{K q}.
\end{equation}
Here $I(a)$, the large-deviation rate function for $a$ for the original model, is the quantity we want to calculate; $s$ is a parameter associated with the reference model; $q$ is a fluctuating quantity associated with trajectories of the reference model; and $K$, the trajectory length, is a large parameter. $P_s(q)$ is the distribution of $q$ associated with an ensemble of reference-model trajectories. The formally optimal approach to trajectory sampling determines (or approximates) the reference model for which $P_s(q) = \delta(q)$, so that reference-model trajectories of given $a$ are a constant factor less probable than those of the original model\c{chetrite2013nonequilibrium,jack2015effective,chetrite2015variational,garrahan2016classical,ferre2018adaptive}. In this case the effort of the method lies in the construction of a (potentially complex) reference model whose properties are ideal in the stated sense. The present method uses instead a reference-model set that is a simple modification of the existing model, and the effort of the method focuses on evaluation of $P_s(q)$ in order to recover $I(a)$.

Direct evaluation of \eq{e_one} is impractical when $K$ is large. If $P_s(q)$ is Gaussian (the best case scenario outside of $q$ being constant) with variance $\sigma^2$, then the error in the measurement of $e^{K q}$ over trajectories of the reference model is
\begin{equation}
\label{e_var}
\frac{\av{(e^{K q})^2}_s-\av{e^{K q}}_s^2}{\av{e^{K q}}_s^2} \sim {\rm e}^{K^2 \sigma^2},
\end{equation}
where $\av{\cdot}_s \equiv \int {\rm d} q\, (\cdot) P_s(q)$. The variance $\sigma^2$ is typically $\propto 1/K$, in which case \eq{e_var} diverges exponentially with $K$, and a number of trajectories exponentially large in $K$ is needed to evaluate \eq{e_one}. However, it is not necessary to evaluate \eq{e_one} or measure $e^{K q}$ directly (indeed, for $K$ of even modest size such exponentials cannot be evaluated on a computer). Taking logarithms of \eq{e_one} gives
\begin{equation}
\label{e_two}
I(a) = -s a - \bar{q} - K^{-1}\ln \int {\rm d} q \, P_s(q) {\rm e}^{K (q-\bar{q})},
\end{equation}
where $\bar{q}$ is the mean value of $q$ over the ensemble of reference-model trajectories. The first two terms of \eq{e_two} can calculated straightforwardly, using a number of trajectories that does not scale with $K$ (see Appendix C of\c{klymko2017rare}), and provide a upper bound on the rate function $I(a)$. Any choice of reference dynamics produces {\em some} upper bound on the rate function\c{varadhan2010large}; we show that certain simple and physically-motivated choices produce meaningful (i.e. tight) bounds. Moreover, with some additional numerical effort the third term in \eq{e_two} can be evaluated or closely approximated, yielding the rate function itself. For the case of Gaussian $P_s(q)$, the third term is equal to $K\sigma^2/2$, which can be evaluated by direct simulation using a number of trajectories that scales less quickly than linearly with $K$ (see Appendix C of\c{klymko2017rare}). Higher-order cumulants of the integral become progressively more expensive to evaluate -- and the method will fail if $P_s(q)$ has long tails that cannot be sampled efficiently by direct simulation -- but in what follows we show that a set of simple reference-model choices can yield short-tailed $P_s(q)$, in which case the rare behavior of the original model can be evaluated by direct simulation of a set of simple reference models.

Thus the method described in Refs.\c{klymko2017rare,lattice2} is a particular implementation of trajectory importance sampling, and is non-optimal in the formal sense. However, it is simple and it works: it requires no special techniques beyond direct simulation, and can be used to bound or closely approximate the rate function in a variety of settings. In addition, the method directly computes the logarithmic probability distribution for path-extensive observables, rather than computing the Legendre transform of the distribution. This feature is useful when the probability distribution has linear or non-convex portions, in which case its Legendre transform is singular\c{touchette2009large}.

In this paper we describe two extensions of this method. First, we point out that each set of reference dynamical trajectories can be used to generate pieces of the probability distribution of {\em any} stochastic model within a particular family. We refer to this procedure as {\em multi-point} sampling, an idea sketched in \f{fig0}(b). Second, we extend the method to Markov chains of fixed time.

The paper is organized as follows. In \s{sampling} we describe the multi-point sampling procedure. We show that the general relationship between probability distributions of dynamic observables of any two members of this family is an extended fluctuation relation. The sampling method proceeds by evaluating many distribution-pairs at the concentration point of one distribution, so allowing evaluation of the other distribution away from its concentration point. In \s{ent} we show that when the dynamical observable is entropy production, models in this family include forward and time-reversed trajectory ensembles, whose distributions satisfy the expected fluctuation relation\c{gallavotti1995dynamical,kurchan1998fluctuation,maes1999fluctuation,lebowitz1999gallavotti,crooks2000path,seifert2005entropy,speck2012large}. In \s{cts} we show how to carry out the sampling method for trajectories of fixed time. We conclude in \s{conc}.

\section{Importance sampling of dynamic trajectories}
\label{sampling}

The reference-model method of Refs.\c{klymko2017rare,lattice2} is designed to calculate probability distributions of dynamic observables for Markov chains of a fixed number of configuration changes. Consider a family of models, parameterized by a variable $s$, that move between microstates $C$ and $C'$ with probability
\begin{equation}
\label{pb}
p_s(C \to C') = \frac{W_s(C \to C')}{R_s(C)}.
\end{equation}
Here
\begin{equation}
\label{rm}
W_s(C \to C') = {\rm  e}^{-s \alpha(C \to C')} W_0(C \to C')
\end{equation}
is a rate, and $R_s(C) \equiv\sum_{C'} W_s (C \to C')$ is a normalization factor than ensures probability conservation, i.e. $\sum_{C'} p_s(C \to C')=1$. The quantity $\alpha(C \to C')$ is the change of an arbitrary dynamic observable $A$ upon moving from $C$ to $C'$. The form \eq{rm} is motivated by the exponential tilting of the probability distribution commonly done in the mathematical literature\c{dembo2010large,touchette2009large}, although this choice of rates does not in general produce the tilted distribution.

Our aim is to calculate the probability distribution
\begin{equation}
\label{pdf}
\rho_s(a,K) \equiv \sum_{\bm x}{P_s[{\bm x}] \delta{(A[{\bm x}]-K a)}}
\end{equation}
of the intensive variable $a=A/K$, for a particular model $s$, over trajectories ${\bm x} = \{C_0,C_1,\dots,C_K\}$ of $K$ steps of the dynamics. (Other approaches to trajectory sampling calculate the cumulant-generating functions of dynamic observables\c{lebowitz1999gallavotti,garrahan2009first,pietzonka2016universal}.) In \eq{pdf}, the quantity
\begin{equation}
P_s[{\bm x}] =\rho_s(C_0) \prod_{k=0}^{K-1} p_s(C_k \to C_{k+1})
\end{equation}
is the probability of generating a trajectory ${\bm x}$ within the model $s$, and
\begin{equation}
A[{\bm x}] = \sum_{k=0}^{K-1} \alpha(C_k \to C_{k+1})
\end{equation}
is the extensive dynamic observable for the trajectory ${\bm x}$. Direct simulation of the model leads to good sampling of $\rho_s(a,K)$ for $a \approx a_s$, the value of $a$ typical of the model. For models with a well-defined stationary measure
\begin{equation}
\label{stat}
\pi_s(C) = \sum_{C'} \pi_s(C') p_s(C' \to C),
\end{equation}
this value is given by
\begin{eqnarray}
a_s&=&\sum_C \pi_s(C) \sum_{C'} p_s(C \to C') \alpha(C \to C') \nonumber \\
&=&-\sum_C \pi_s(C)\partial_s \ln R_s(C).
\end{eqnarray}
\begin{figure*}[t]
   \includegraphics[width=\linewidth]{fig1_new}
   \caption{(a) Large-deviation rate functions for entropy production, $I(\sigma_0) = -K^{-1} \ln \rho(\sigma_0,K)$, for 15 models $s=\{-1.2,1.1,\dots,0.1,0.2\}$ (left to right) in the family \eq{rm}. The `original' model ($s=0$) is the the 4-state model of Ref.\c{gingrich2016dissipation}. Results were calculated using the multi-point nonequilibrium umbrella sampling scheme described in the text. The green and cyan curves denote the original ($s=0$) and reverse ($s=1$) models; the black dashed lines, which denote $I_0(\sigma_0)+\sigma_0$ on the left and $I_1(\sigma_0)-\sigma_0$ on the right, verify that these two models obey the fluctuation relation \eq{oneb}. Note that entropy production $\sigma_0$ is defined with respect to the model $s=0$. (b) Rate function for the model $s=0$ computed using the present method (green) and by diagonalization of the tilted transition matrix (black). (c) Comparison of the exact result (green) and the rate-function upper bound, \eqq{three} (black). Inset: zoom-in of the dotted area.}
   \label{fig1}
\end{figure*}
(The method also works for models that do not have a well-defined stationary measure\c{klymko2017rare}.)

Trajectories of the model will concentrate on $a_s$ in the large-$K$ limit, leading to good sampling there but poor sampling elsewhere. A standard way to overcome this problem is to use importance sampling\c{bucklew1990large,touchette2009large,garrahan2009first,maes2008canonical,giardina2011simulating}. Consider a second model $s'$, called the reference model, whose trajectories concentrate in the large-$K$ limit on $a_{s'}$. Direct simulation of the reference model will lead to good sampling in the vicinity of $a_{s'}$, and this statistics can be used to reproduce the piece $\rho_s(a_{s'},K)$ of the original model's distribution. To see how, note that the relative likelihood with which a trajectory ${\bm x}$ is generated by reference and original models, $w_{ss'}[{\bm x}]=P_s[{\bm x}]/P_{s'}[{\bm x}]$, is
\begin{equation}
w_{ss'}[{\bm x}] =e^{(s'-s) A[{\bm x}]+ K q_{ss'}[{\bm x}]},
\end{equation}
where
\begin{equation}
\label{kew}
q_{ss'}[{\bm x}] \equiv K^{-1} \sum_{k=0}^{K-1} \ln \frac{R_{s'}(C_k)}{R_s(C_k)}.
\end{equation}
The quantity we want, the probability distribution of $a=A/K$ for trajectories of length $K$ of the original model, is
\begin{eqnarray}
\label{com}
\rho_s(a,K)&\equiv& \sum_{\bm x}{P_{s'}[{\bm x}] w_{ss'}[{\bm x}] \delta{(A[{\bm x}]-K a)}} \nonumber\\
&=& {\rm e}^{(s'-s) a K} \sum_{\bm x}{P_{s'}[{\bm x}] {\rm e}^{K q_{ss'}[{\bm x}]} \delta{(A[{\bm x}]-K a)}} \nonumber\\
&\equiv& \rho_{s'}(a,K) {\rm e}^{(s'-s) a K} \av{{\rm e}^{K q_{ss'}[{\bm x}]}}_{s'}^{a K},
\end{eqnarray}
where
\begin{equation}
\av{\cdot }_{s'}^{a K} \equiv  \frac{\sum_{\bm x}{P_{s'}[{\bm x}] (\cdot) \delta{(A[{\bm x}]-K a)}}}{\sum_{\bm x}{P_{s'}[{\bm x}] \delta{(A[{\bm x}]-K a)}}}
\end{equation}
is an average over reference-model trajectories that possess $A[{\bm x}]= Ka$. \eqq{com} can be written
\begin{equation}
\label{fluc}
\frac{\rho_s(a ,K)}{\rho_{s'}(a ,K)} = {\rm e}^{(s'-s) a K} \int {\rm d} q_{ss'} \, {\rm e}^{K q_{ss'}} P_{s'}(q_{ss'}|a),
\end{equation}
where $P_{s'}(q_{ss'}|a)$ is the probability distribution of the fluctuating piece of the path weight, $q_{ss'}[{\bm x}]$, for trajectories of the reference model $s'$ that possess $A[{\bm x}]=K a$. Normalization is such that $\int {\rm d} q_{ss'}\, P_{s'}(q_{ss'}|a)=1$. For models for which the stationary measure $\pi_s(C)$ exists, values of $q_{ss'}[{\bm x}]$ fluctuate, from trajectory to trajectory, about the typical value
\begin{equation}
\label{pw}
q_{ss'} = \sum_C \pi_{s'}(C) \ln \frac{R_{s'}(C)}{R_s(C)}.
\end{equation}
\eqq{fluc} involves no approximations: it is a re-writing of \eq{pdf}, and is valid for arbitrary path length $K$. The expression makes clear that the trajectory-ensemble distributions of $a$ for two models, $s$ and $s'$, are related by an extended fluctuation relation\c{touchette2009large}.

This relation can be used as a tool for sampling the distribution of a model $s$ using a reference model $s'$. Consider the case of large $K$. For many models, for sufficiently large $K$, the distribution $\rho_s(a, K)$ adopts the large-deviation form $\rho_s(a, K)\sim {\rm e}^{-K I_s(a)}$, where $I_s(a)$ is the large-deviation rate function. To use \eq{fluc} as a method of reconstructing $I_s(a)$, note that the equation can be evaluated at the point $a=a_{s'}$ where trajectories of the reference model concentrate, i.e. where $I_{s'}(a_{s'})=0$. Then \eq{fluc} can be rewritten
\begin{eqnarray}
\label{one}
I_s(a_{s'}) &=& (s-s') a_{s'} -\bar{q}_{ss'}\nonumber \\
&-&K^{-1} \ln \int {\rm d} q_{ss'} \, {\rm e}^{K (q_{ss'}-\bar{q}_{ss'})} P_{s'}(q_{ss'}|a_{s'}), \hspace{0.4cm}
\end{eqnarray}
whose evaluation gives one point on the curve $I_s(a) = -K^{-1} \ln \rho(a,K)$. (We omit the limit $K \to \infty$ in the definition of the large-deviation rate function, in order to emphasize that we calculate quantities for large but finite values of path length. We have verified that the precise value of $K$ makes no difference to the plots in the paper, provided that it is large enough.) Here $\bar{q}_{ss'}$ is the mean of the quantity $q_{ss'}[{\bm x}]$, for trajectories of the reference model $s'$ that have $A[{\bm x}] = K a_{s'}$. The variance of the integral in \eq{one} diverges (in general) exponentially with $K$, but its logarithm can, in the cases we have encountered\c{klymko2017rare,lattice2}, be evaluated without excessive numerical effort. Upon simulating the reference model, we can measure $P_{s'}(q_{ss'}|a_{s'})$ (provided that this quantity does not have long tails that cannot be sampled efficiently by direct simulation). If this distribution happens to be Gaussian in $q_{ss'}$, then \eq{one} can be evaluated analytically to give
\begin{equation}
\label{two}
I^{(1)}_s(a_{s'}) = (s-s') a_{s'} -\bar{q}_{ss'}-K \sigma^2_{ss'}/2.
\end{equation}
For non-Gaussian weight fluctuations we can regard \eqq{two} as an approximation of the rate function. Here $\sigma^2_{ss'}$ is the variance of the quantity $q_{ss'}[{\bm x}]$, for trajectories of the reference model $s'$ that have $A[{\bm x}] = K a_{s'}$. In this case the numerical effort required to evaluate the point $I_s(a_{s'})$ is (only) the effort required to compute the variance (from trajectory to trajectory) $\sigma^2_{ss'} \propto 1/K$ of the intensive quantity $q_{ss'}[{\bm x}]$. If $P_{s'}$ is non-Gaussian in $q_{ss'}$ then the integral in \eq{one} can be evaluated via calculation of higher-order cumulants, with the associated additional computational cost\c{klymko2017rare}. The fact that the integral in \eq{one} is exponentially large in $K q[{\bm x}]$ does not automatically defeat the re-weighting procedure: if the distribution $P_{s'}(q_{ss'}|a_{s'})$ can be sampled efficiently by the reference model dynamics (e.g. if it is approximately Gaussian) then \eq{two} can be evaluated with reasonable accuracy.
~\\
\indent The first two terms on the right-hand side of \eqq{one} provide, by Jensen's inequality, an upper bound $I^{(0)}_s(a_{s'})$ on the rate function piece $I_s(a_{s'})$ (whether or not $P_{s'}$ is Gaussian),
~\\
\begin{equation}
\label{three}
I_s^{(0)}(a_{s'}) = (s-s') a_{s'} -\bar{q}_{ss'}.
\end{equation}
~\\
This bound, like the rate function itself, is not required to be quadratic about its minimum or even to be convex\c{klymko2017rare,lattice2}. It can be calculated using a single reference-model trajectory, or analytically if $\pi_s(C)$ can be calculated analytically\c{lattice2}.
~\\
\indent In Refs.\c{klymko2017rare,lattice1,lattice2} we used this method to calculate large-deviation rate functions for a single model $s=0$ using a set of reference models $s'$, a procedure illustrated in \f{fig0}(a). The rate functions of the reference models serve as nonequilibrium umbrella potentials, concentrating sampling at certain points in parameter space. In this paper we point out that Equations \eq{fluc} and \eq{one}, evaluated using a reference model $s'$, can be used to produce large-deviation rate functions for any number of `original' models $\{s\}$, without doing additional simulations. The quantity $q_{ss'}[{\bm x}]$, given by \eqq{kew}, depends on the identity of the original model only through the label $s$; the choice of microstates visited is determined solely by the reference model $s'$. Thus by keeping track, in a reference-model simulation, of the set of $N$ values $q_{\{s\} s'}[{\bm x}]$, where $\{s\} =\{s_1,\dots,s_N\}$, we can recover $N$ pieces $I_{\{s\}}(a_{s'})$ of $N$ distinct `original' models. This idea is illustrated in \f{fig0}(b). Then, by scanning $s'$, we can simultaneously reconstruct $N$ different rate functions $I_{\{s\}}(a)$.
~\\
\section{Sampling entropy production}
\label{ent}
To illustrate this procedure we choose to sample entropy production. Let the bias appearing in \eqq{rm} be
\begin{equation}
\label{alpha}
\alpha(C \to C') =\ln \frac{\pi_0(C) p_0(C \to C')}{\pi_0(C')p_0(C' \to C)},
\end{equation}
the entropy produced by the model $s=0$ upon moving from $C \to C'$; here $\pi_0(C)$ is the stationary measure of the model $s=0$ [see \eqq{stat}]. The extensive dynamical order parameter is then the total entropy produced by a trajectory ${\bm x}$ of $K$ steps, $A[{\bm x}] = \sum_k \alpha(C_k \to C_{k+1}) \equiv \Sigma_0[{\bm x}]$. The rate of entropy production is the intensive version of this parameter, $\sigma_0[{\bm x}] = \Sigma_0[{\bm x}]/K$. In this case the family of models \eq{rm} is
\begin{eqnarray}
\label{rmep}
W_s(C \to C') &=& \left( \frac{\pi_0(C')p_0(C' \to C)}{\pi_0(C)p_0(C \to C')} \right)^s W_0(C \to C'). \hspace{0.9cm}
\end{eqnarray}
The parameter $s$ influences the rate of entropy production (here defined with respect to the model $s=0$), distributions of which obey the expression \eq{fluc}.

The distributions of certain members of this family are related in a simple way. In particular, the model $s=1$ is the reverse of the model $s=0$. From \eq{rmep} we have
\begin{equation}
W_1(C \to C') = \frac{\pi_0(C')}{\pi_0(C)} R_0(C) p_0(C' \to C).
\end{equation}
Then
\begin{equation}
\label{r1}
R_1(C) \equiv \sum_{C'} W_1(C \to C') = R_0(C),
\end{equation}
using \eq{stat}, and so
\begin{equation}
p_1(C \to C') = \frac{\pi_0(C')}{\pi_0(C)} p_0(C' \to C),
\end{equation}
which is the time-reversed Markov chain\c{crooks2000path}. The probability distributions of entropy produced by the models $s=0$ and $s=1$ then obey the expected fluctuation relation. Setting $s=0$ and $s'=1$, the terms of the fluctuating piece $q_{ss'}[{\bm x}']$ of the path weight, \eqq{kew}, are
\begin{equation}
\ln \frac{R_1(C)}{R_0(C)} = 0,
\end{equation}
using \eq{r1}, giving $q_{01}[{\bm x}]=0$ and $P_1(q_{01}|a) = \delta(q_{01})$. Hence for $s=0$ and $s'=1$, \eqq{fluc} reduces to
\begin{equation}
\label{oneb}
\frac{\rho_0(\sigma_0,K)}{\rho_1(\sigma_0,K)} = {\rm e}^{\sigma_0 K}.
\end{equation}
Given that the entropy production $\sigma$ changes sign if we switch from the forward to the reverse model, i.e. $\sigma_0 = -\sigma_1$, we can write \eq{oneb} in the form
\begin{equation}
\label{fr}
\frac{\rho(\Sigma)}{\rho_{\rm rev}(-\Sigma)} = {\rm e}^{\Sigma},
\end{equation}
which is the fluctuation theorem for nonequilibrium steady states\c{gallavotti1995dynamical, kurchan1998fluctuation,maes1999fluctuation,lebowitz1999gallavotti,seifert2005entropy}. Here `rev' denotes the reverse model, and $\Sigma = \sigma K$. Thus, the general expression \eq{fluc} relates the distribution of an arbitrary dynamic observable $A$ for any two members of the the family of models $s$. If $A$ is chosen to be entropy production $\Sigma$, then, for $0 < s < 1$, these models interpolate between the forward and reverse versions of the model whose rates are $W_0(C \to C')$.

We can use these fluctuation relations, in the form \eq{one}, as a method for reconstructing the large-deviation rate functions for entropy production for all models $\{s\}$ in the family \eq{rm}. To illustrate this procedure we consider the 4-state model of Ref.\c{gingrich2016dissipation}. This is a fully connected model with states $C \in \{1,2,3,4\}$. We take the rates $W_0(C \to C')$ to be the quantities $r(C,C')$ in the caption of Fig. 2 of that paper:
\begin{eqnarray}
\begin{array}{lll}
    r(1, 2) = 3,& r(1, 3) = 10,& r(1, 4) = 9, \nonumber\\
    r(2, 1) =10,& r(2, 3) = 1,& r(2, 4) = 2,\nonumber\\
    r(3, 1) = 6,& r(3, 2) = 4,& r(3, 4) =1,\nonumber \\
r(4, 1) = 7,& r(4, 2) = 9,& r(4, 3) = 5,\\
   \end{array}
   \end{eqnarray}
with $r(C,C)=0$. We carried out a series of simulations of 100 different reference models, whose values of $s'$ run from $-2$ to $2.5$ in evenly-spaced intervals. For each reference model $s'$ we generated $8 \times 10^3$ independent trajectories of length $K=10^6$. From this ensemble we calculated the typical value $a_{s'}$ of the dynamical observable, and identified those trajectories whose values of $a$ were within an interval $\pm10^{-3}$ of $a_{s'}$. From this restricted ensemble we collected values of the fluctuating path weights $q_{\{s\},s'}[{\bm x}]$, for 15 different values $\{s\}$, evenly spaced between $-0.2$ and $1.2$.
 \begin{figure*}[]
    \centering
    \includegraphics[width=\linewidth]{fig2_new}
    \caption{As \f{fig1}, but for trajectories of constant time rather than constant event number; here $J(\sigma_0) = -T^{-1} \ln \rho(\sigma_0,T)$. (a) The black dashed lines, $J_0(\sigma_0)+\sigma_0$ on the left and $J_1(\sigma_0)-\sigma_0$ on the right, verify that the fluctuation relation \eq{fr} holds. (b) Numerically computed rate function for the model $s=0$ (green), versus the exact solution (black) calculated via matrix diagonalization. (c) Numerically computed rate-function upper bound, \eqq{three2} (black), versus the exact solution (green). Inset: bound from the present method (black), compared with the thermodynamic uncertainty relation from Ref.\c{gingrich2016dissipation} (cyan; this is the upper line from the main panel of Fig. 2 of that reference).}
    \label{fig_ct}
 \end{figure*}
 \\~
\indent These quantities allow the approximation, via \eqq{two}, of the large-deviation rate function $I_s(\sigma_0)=-K^{-1} \ln \rho_s(\sigma_0,K)$ for 15 members of the family \eq{rm}. Results are shown in \f{fig1}(a). Recall that the variable $\sigma_0$ is the entropy production rate defined with respect to the model $s=0$. The green and cyan curves correspond to the models $s=0$ and $s=1$ respectively, which are the forward and reverse versions of the model with rates $W_0(C \to C')$. The black dotted lines verify that these models obey the fluctuation relation \eq{oneb}. The left-hand black dotted line is $I_0(\sigma_0) +\sigma_0$, which is equal to $I_1(\sigma_0)$ (cyan line). The right-hand black dotted line is $I_1(\sigma_0) -\sigma_0$, which is equal to $I_0(\sigma_0)$ (green). This comparison provides a nontrivial check on the numerics, because it involves the superposition of the centers and tails of distinct distributions.  As a further check on our numerics we show in \f{fig1}(b) a comparison between the rate function calculated by the procedure described here, and that obtained by Legendre transform of the logarithm of the largest eigenvalue of the tilted transition-probability matrix\c{touchette2009large,chiuchiu2017mapping}. More generally, the distributions shown satisfy $I_s(\sigma_0)= I_{1-s}(-\sigma_0)$.
\\~
\indent Recent work has identified rate-function bounds for generalized currents for discrete-time and continuous-time Markov chains\c{proesmans2017discrete,pietzonka2017finite,gingrich2016dissipation,horowitz2017proof,chiuchiu2017mapping}. The rate-function upper bound obtained from the present method, \eqq{three}, can be evaluated analytically for simple models or, in general, using a single reference-model trajectory\c{lattice2}. The bound is not necessarily quadratic or convex. Combined with the multi-point sampling method, the bound provides a cheap way of estimating the large-deviation rate function for a range of models and conditions. For the present model and order parameter, the bound is relatively tight: see \f{fig1}(c).
\\~
\indent Here we have demonstrated that multiple rate functions for path-extensive observables of Markov chains of a fixed number of configuration changes can be calculated in a simple way using a set of stochastic simulations. The rate functions of more complex models, e.g. lattice models, can be obtained in a similar way\c{klymko2017rare,lattice1,lattice2}.
\\~
\section{Sampling trajectories of fixed time}
\label{cts}
\subsection{General considerations}
\label{cts_sub}
The procedure described thus far applies to Markov chains in which the total number of configuration changes $K$ is fixed. Here we present one way to adapt this method to trajectories of fixed time $T$. There are more sources of fluctuation in this ensemble, because upon making a move we select both a new microstate and a time increment, the latter being an exponentially-distributed random variable\c{gillespie2005general}. In general we must impose a bias on both choices in order to sample dynamic observables.

Consider a set of models with rates
\begin{equation}
\label{rm2}
\hat{W}_{s}^{\lambda}(C \to C') = \Gamma_s^\lambda(C) W_s(C \to C').
\end{equation}
Here $W_s(C \to C')$ is given by \eq{rm}, and biases the choice of microstate $C'$. The factor $\Gamma_\lambda(C)$ is chosen to bias the jump time from microstate $C$. A convenient choice is to take
\begin{equation}
\Gamma_s^{\lambda}(C) = \frac{R_0(C)+\lambda}{R_s(C)},
\end{equation}
which makes the escape rate of the new model to be a constant shift different to that of the original model, i.e. $\hat{R}_s^\lambda(C) \equiv \sum_{C'} \hat{W}_s^{\lambda}(C \to C') = \Gamma_s^\lambda(C) R_s(C) = R_0(C) + \lambda$. Here $\lambda >- \min_C R_0(C)$ is a constant that serves to make the escape times from microstate $C$ unusually large or small (by the reckoning of the original model). It has no effect upon the choice of microstate, i.e.
\begin{equation}
\label{move}
\hat{p}_s(C \to C') = \frac{\hat{W}_s^{\lambda}(C \to C')}{\hat{R}_s^\lambda(C)} = p_s(C \to C'),
\end{equation}
as \eqq{pb}.

We wish to calculate~\footnote{For simplicity we omit the hat on $\rho_s^{\lambda}(a,T)$.}
\begin{equation}
\label{pdf2}
\rho_s^\lambda(a,T) \equiv \sum_{\bm x}{\hat{P}_s^{\lambda}[{\bm x}] \delta{(A[{\bm x}]-T a)} \delta{(T[{\bm x}]-T)}},
\end{equation}
where now
\begin{equation}
\sum_{{\bm x}}=\sum_{K>0}\sum_{C_0\cdots C_K} \prod_{k=0}^{K-1} \int_0^\infty {\rm d} t_k
\end{equation}
denotes a sum over trajectories ${\bm x}$ that can have variable numbers of configuration changes and jump times\c{budini2014fluctuating,giardina2011simulating}. [Using this notation, \eqq{pdf} would be written
\begin{equation}
\rho_s(a,K) \equiv \sum_{\bm x}{P_s[{\bm x}] \delta{(A[{\bm x}]-K a)}\delta{(K[{\bm x}]-K)}}.]\end{equation}
The quantity $T[{\bm x}]=\sum_{k=0}^{K[{\bm x}]-1} t_k$ is the total time of trajectory ${\bm x}$; $t_k$ is the time increment of configuration change $k+1$, and is $-\ln \eta/(R_0(C_k)+\lambda)$, where $\eta$ is a random number uniformly drawn from the interval $(0,1]$\c{gillespie2005general}.

The (bulk) path weight $\hat{P}_s^\lambda[{\bm x}]$ for the models $\hat{W}_s^\lambda$ is
\begin{eqnarray}
\hat{P}_s^\lambda[{\bm x}] &=& \prod_{k=0}^{K[{\bm x}]-1} \hat{W}_s^{\lambda}(C_k \to C_{k+1}) {\rm e}^{-[R_0(C_k)+\lambda] t_k}.
\end{eqnarray}
The relative weight $\hat{w}_{ss'}^{\lambda \lambda'}[{\bm x}]=\hat{P}_s^\lambda[{\bm x}]/\hat{P}_{s'}^{\lambda'}[{\bm x}]$ is
\begin{equation}
\label{weight}
\hat{w}_{ss'}^{\lambda \lambda'} [{\bm x}] =e^{(s'-s) A[{\bm x}]+ (\lambda'-\lambda) T[{\bm x}]+ T \phi_{ss'}^{\lambda \lambda'}[{\bm x}]},
\end{equation}
where $A[{\bm x}] = \sum_{k=0}^{K[{\bm x}]-1} \alpha(C_k \to C_{k+1})$ is the extensive dynamic order parameter of trajectory ${\bm x}$, and
\begin{equation}
\label{kew2}
\phi_{ss'}^{\lambda \lambda'}[{\bm x}] \equiv T^{-1} \sum_{k=0}^{K[{\bm x}]-1} \ln \left(\frac{R_{s'}(C_k)}{R_s(C_k)} \frac{R_0(C)+\lambda}{R_0(C)+\lambda'}\right)
\end{equation}
is the analog of \eq{kew}, with $T$ replacing $K$ as the measure of path length. Note that for fixed $A[{\bm x}]=A$ and $T[{\bm x}]=T$ the path weight \eq{weight} depends, as before, only on configurations visited. It does not depend upon the time of jumps, on account of all models $\hat{W}_s^\lambda$ possessing identically shifted escape rates from a given configuration. Biasing jump times allows us to overcome the problem of sampling exponential tails of jump-time distributions using direct simulation (see Appendix B of Ref.\c{klymko2017rare}).

The quantity we want, the probability distribution of $a=A/K$ for trajectories of the original model of length $T$, is
\begin{eqnarray}
\label{com2}
\rho_s^\lambda(a,T)&\equiv& \sum_{\bm x}{\hat{P}_{s'}^{\lambda'}[{\bm x}] \hat{w}_{ss'}^{\lambda \lambda'}[{\bm x}] \delta{(A[{\bm x}]-T a)} \delta{(T[{\bm x}]-T)}} \nonumber\\
&=& \rho_{s'}^{\lambda'}(a,T) {\rm e}^{\left[(s'-s) a+(\lambda'-\lambda)\right]T} \av{{\rm e}^{T \phi_{ss'}^{\lambda \lambda'}[{\bm x}]}}_{s'\lambda'}^{a T}, \hspace{0.5cm}
\end{eqnarray}
where
\begin{equation}
\av{\cdot }_{s'\lambda'}^{a T} \equiv  \frac{\sum_{\bm x}{\hat{P}_{s'}^{\lambda'}[{\bm x}] (\cdot) \delta{(A[{\bm x}]-T a)} \delta{(T[{\bm x}]-T)}}}{\sum_{\bm x}{\hat{P}_{s'}^{\lambda'}[{\bm x}] \delta{(A[{\bm x}]-T a)} \delta{(T[{\bm x}]-T)}}}
\end{equation}
is an average over reference-model trajectories of total time $T$ that possess $A[{\bm x}]= Ta$. \eqq{com2} can be written
\begin{eqnarray}
\label{fluc2}
\frac{\rho_s^{\lambda}(a ,T)}{\rho_{s'}^{\lambda'}(a ,T)} &=& {\rm e}^{\left[(s'-s) a+ (\lambda'-\lambda) \right]T} \nonumber \\
&\times& \int {\rm d} \phi_{ss'}^{\lambda \lambda'} \, {\rm e}^{T \phi_{ss'}^{\lambda \lambda'}} P_{s'}(\phi_{ss'}^{\lambda \lambda'}|a),
\end{eqnarray}
where $P_{s'}^{\lambda'}(\phi_{ss'}^{\lambda \lambda'}|a)$ is the probability distribution of the fluctuating piece of the path weight, $\phi_{ss'}^{\lambda \lambda'}[{\bm x}]$, for trajectories of the reference model $(s',\lambda')$ that possess $A[{\bm x}]=T a$. Normalization is such that $\int {\rm d} \phi_{ss'}^{\lambda \lambda'}\, P_{s'}(\phi_{ss'}^{\lambda \lambda'}|a)=1$.

For models and observables for which, for long times, the large-deviation rate function $J_{s \lambda}(a) = -T^{-1} \ln \rho_s^\lambda(a ,T)$ exists, we can evaluate \eq{fluc2} at the concentration point $a=a_{s'\lambda'}$ of the reference model, where $J_{s'}^{\lambda'}(a_{s'\lambda'})=0$, to give
\begin{eqnarray}
\label{one2}
J_{s \lambda}(a_{s'\lambda'}) &=& (s-s') a_{s'\lambda'} +(\lambda-\lambda') -\bar{\phi}_{ss'}^{\lambda \lambda'} \\
&-&T^{-1} \ln \int {\rm d} \phi_{ss'}^{\lambda \lambda'} \, {\rm e}^{T (\phi_{ss'}^{\lambda \lambda'}-\bar{\phi}_{ss'}^{\lambda \lambda'})} P_{s'}^{\lambda'}(\phi_{ss'}^{\lambda \lambda'}|a_{s'\lambda'}). \nonumber
\end{eqnarray}
Here $\bar{\phi}_{ss'}^{\lambda \lambda'}$ is the mean of the quantity $\phi_{ss'}^{\lambda \lambda'}[{\bm x}]$, for trajectories of the reference model $(s',\lambda')$ of length $T$ that have $A[{\bm x}] = T a_{s'\lambda'}$. By Jensen's inequality, the first line on the right-hand side of \eq{one2} provides an upper bound
\begin{equation}
\label{three2}
J_{s\lambda}^{(0)}(a_{s'\lambda'}) = (s-s') a_{s'\lambda'}+ (\lambda-\lambda')-\bar{\phi}_{ss'}^{\lambda \lambda'}
\end{equation}
on the rate function. A refinement to this estimate can be computed by assuming $P_{s'}^{\lambda'}(\phi_{ss'}^{\lambda \lambda'}|a_{s'})$ to be Gaussian, in which case we get
\begin{equation}
\label{two2}
J^{(1)}_{s\lambda}(a_{s'\lambda'}) = J_{s\lambda}^{(0)}(a_{s'\lambda'})-T {\sigma^2}_{ss'}^{\lambda \lambda'}/2.
\end{equation}
Here ${\sigma^2}_{ss'}^{\lambda \lambda'}$ is the variance of the quantity $\phi_{ss'}^{\lambda \lambda'}[{\bm x}]$, for trajectories of the reference model $(s', \lambda')$ of length $T$ that have $A[{\bm x}] = T a_{s' \lambda'}$. Simulations of the reference model $(s',\lambda')$ for fixed time $T$ therefore provide an estimate of one point $a=a_{s'\lambda'}$ on the rate function $J_{s \lambda}(a)$.

 The procedure described in this section is similar to that described in \s{sampling}, but with path length set by time $T$ rather than number of configuration changes $K$. In both versions of the method the set of reference models is guided toward unlikely states of the original model with biased probabilities $p_s(C \to C)$. The additional consideration required for constant time is to draw random numbers $\eta$ in order to compute jump times $-\ln \eta/(R_0(C_k)+\lambda)$, using $\lambda$ as a way of sampling unlikely time changes. The choice of a constant shift $\lambda$ removes the need to account for fluctuating jump times in the re-weighting factor. The fluctuations of the remaining piece, $\phi_{ss'}^{\lambda \lambda'}[{\bm x}]$, \eqq{kew2}, derive from fluctuations of the empirical measure of the reference model and from the fact that the number of terms in the sum, $K[{\bm x}]$, varies from trajectory to trajectory. What is required is to measure the statistics of this quantity for trajectories of fixed length $T$ and fixed $A[{\bm x}] = T a$ (rather than for trajectories of fixed $K$ and fixed $A[{\bm x}] = K a$).

 \subsection{Entropy production}
To test this method we calculated the large-deviation rate function for entropy production for the 4-state model of Ref.\c{gingrich2016dissipation}, for trajectories of constant time. In principle we should sample both rare states and rare jump times, but we found that the rate function for entropy production can be well approximated, over a large interval, by sampling only states. In this case we set $\lambda' =0$ and suppress $\lambda$-labels on quantities (the original model has $s=\lambda=0$). With the bias in \eq{rm2} given by \eq{alpha}, the intensive dynamical order parameter $a$ for a trajectory ${\bm x}$ is $\sigma_0[{\bm x}] = T^{-1} \sum_{k=0}^{K[{\bm x}]-1} \alpha(C_k \to C_{k+1})$, the rate of entropy production. As described by the equations above, the procedure used to sample fluctuations of this variable for paths of fixed $T$ is essentially identical to that used in \s{ent}, except that now we run reference-model trajectories for a fixed time $T=10^6$ rather than for a fixed number of events. We generated $5 \times 10^3$ reference-model trajectories for each value of $s'$ (100 different values between $-2$ and $2.5$). The values of $a$ of these trajectories fluctuate around a typical value $a_{s'}$. We calculated the mean $\bar{\phi}_{ss'}$ and variance ${\sigma}_{ss'}$ using a series of narrow windows at and either side of the typical value $a_{s'}$, and constructed a weighted average of the values of $\sigma^2_{ss'}$ calculated in these windows. This weighted average was used to compute the approximation \eq{two2}. In this way we use most of the reference-model trajectories generated.

We show the results of this procedure in \f{fig_ct}. Panel (a) shows that trajectories of constant time of the forward ($s=0$) and time-reversed ($s=1$) models obey the fluctuation relation \eq{fr}, as expected [the passage from \eq{fluc2} to \eq{fr}, for $\lambda = \lambda'=0$, is the same as that from \eq{fluc} to \eq{fr}], where now $\Sigma = \sigma_0 T$. Noise is visible in the tails of the numerical results -- for constant $T$ there are more sources of fluctuation than for constant $K$ -- but the rate functions can be reconstructed with reasonable accuracy within the interval shown. In panel (b) we compare the numerically computed approximation of the rate function, \eqq{two2} (green), with the exact solution (black). The latter was calculated by Legendre transform of the largest eigenvalue of the tilted rate matrix\c{lebowitz1999gallavotti,garrahan2009first,chiuchiu2017mapping}. In panel (c) we compare the exact solution (green) with the rate-function upper bound, \eqq{three2} (black), which is less tight in general than its constant-$K$ analog [see \f{fig1}(c)] but still close to the exact answer over a considerable interval. In the inset of the figure we compare the bound to the thermodynamic uncertainty relation\c{gingrich2016dissipation}; the two bounds are not exactly the same, but are similar over a large interval. The thermodynamic uncertainty relation provides a `master' upper bound for all currents. By contrast, the present approach provides a bound specific to the chosen observable, including observables that are not currents (see e.g. \f{fig_events}), as well as a scheme for improving upon the bound.

In the far wings of the rate functions (not shown) we found that calculation of the variance $\sigma^2_{ss'}$ was unreliable; there, more trajectories are needed. In addition, we would expect, for extremely rare values of entropy production, that trajectories resulting from unusual jump times must be sampled (using the $\lambda$-bias) in order to accurately compute the rate function. One simple approach that could be used here is to carry out two-dimensional sampling in $s'$ (biasing states) and $\lambda$ (biasing jump times), similar to that done in Sec. V of\c{klymko2017rare}. Such sampling would produce a set of rate-function bounds at least as tight as the one shown in \f{fig_ct}(c), and those bounds could be improved by evaluation of the fluctuation terms. However, given the close correspondence between numerics and the exact answer, such sampling does not appear to be necessary for the range of values of $\sigma_0$ shown in the figure.

\subsection{Events}
 \begin{figure}[b]
    \centering
    \includegraphics[width=0.9\linewidth]{new_events}
    \caption{Large-deviation rate function $J(k) =- T^{-1} \ln \rho(k,T)$  for the number of configuration changes $k=K/T$ per unit time in the 4-state model of Ref.\c{gingrich2016dissipation}. The black line is the exact result, from matrix diagonalization. The green line results from numerical evaluation of \eqq{two2}, using the sampling procedure described in this paper. Inset: the cyan line is the upper bound \eq{three2}, estimated using a single reference-model trajectory. This bound is close to the exact answer (black).}
    \label{fig_events}
 \end{figure}

In studies of glass-like models, an important observable is the number of configuration changes (events) $K$ occurring in time $T$\c{garrahan2009first}. In order to sample
\begin{equation}
\label{pdf3}
\rho_0^0(K,T) \equiv \sum_{\bm x}{\hat{P}_0^0[{\bm x}] \delta{(K[{\bm x}]-K)} \delta{(T[{\bm x}]-T)}},
\end{equation}
we used the umbrella procedure of \s{cts_sub}, choosing only to bias jump times (using $\lambda$) and not the choice of state. In this case the reference model $\hat{W}_{0}^\lambda(C \to C')$ selects states in the same way as the original model, with probabilities $p_0(C \to C')$, and selects jump times from exponential distributions with mean $R_0(C) + \lambda$.
The path weight \eq{kew2} simplifies to
\begin{equation}
\label{kew3}
\phi_{00}^{0 \lambda'}[{\bm x}] \equiv T^{-1} \sum_{k=0}^{K[{\bm x}]-1} \ln \frac{R_0(C)}{R_0(C)+\lambda'}.
\end{equation}
We carried out the usual procedure in order to estimate the large-deviation rate function for events $k=K/T$ in a fixed time for the 4-state model of Ref.\c{gingrich2016dissipation}. We used 70 reference models whose values of $\lambda'$ were evenly spaced between $\pm 10$. For each value of $\lambda'$ we generated $2 \times 10^4$ trajectories of length $T=10^5$, and calculated for each set the typical value $a_{0\lambda'} = k_{0\lambda'}$, and the values of $\bar{\phi}_{00}^{0\lambda'}$ and $\sigma_{00}^{0\lambda'}$ (as in the previous subsection we used a series of windows around the typical value $a_{0\lambda'}$). We used these quantities to calculate the Gaussian weight-fluctuation approximation \eq{two2} to $J(k) = -T^{-1} \ln \rho(K,T)$ [a single trajectory suffices to calculate the bound \eq{three2}]. Note that in those equations we have $s=s'=0$.

Numerical results are shown in \f{fig_events}, compared with the exact result. The latter was obtained by Legendre transform of the largest eigenvalue of the tilted rate matrix\c{lebowitz1999gallavotti,garrahan2009first,chiuchiu2017mapping}. Both the bound and its refinement are close to the exact answer.

\section{Conclusions}
\label{conc}

We have described a simple method of umbrella sampling for Markov chains. The method uses a simple modification of a model $W_0(C \to C')$, namely \eq{rm} or \eq{rm2}, to estimate the large-deviation rate functions of a path-extensive observable for that model. In addition, with the same set of simulations one can reconstruct the large-deviation rate functions for any member of the family \eq{rm} or \eq{rm2}. The general relationship between probability distributions of members of this family is an extended fluctuation relation [Eqs. \eq{fluc} or \eq{fluc2}]. When the observable is chosen to be the rate of entropy production, members of this family include the forward and reverse version of a certain model, whose probability distributions are related by a simple fluctuation relation, \eqq{oneb}.  The extension to multiple dynamic observables is possible, following Section V of\c{klymko2017rare} (see also section 2.3 of\c{lebowitz1999gallavotti}).
~\\
\indent The method described here applies to Markov chains of a fixed number of configuration changes or fixed time, with computation of the rate function in the latter case being (in general) numerically more demanding. However, in both cases it is straightforward to compute a process-specific upper bound on the rate function, \eq{three} or \eq{three2}. The bound derives from the typical weight of a simply-modified version of the original process, and can be computed (for a particular value of the order parameter) using a single dynamic trajectory. The bound is not necessarily quadratic about its origin or convex. Combined with the multi-point sampling procedure, computation of the bound provides a simple and numerically cheap way to identify special points, such as dynamic phase transitions\c{klymko2017rare,lattice2}, in a model's parameter space. The method also allows one to improve upon the bound. In the cases studied here this can be done with reasonable numerical effort, and results in estimates for large-deviation rate functions for path-extensive observables that agree with the answers obtained by matrix diagonalization.

\begin{acknowledgements}
I thank John Edison, Katherine Klymko, and Zden\v ek Preisler for discussions, and thank Todd Gingrich for discussions and for sharing data from Ref.\c{gingrich2016dissipation}. This work was performed at the Molecular Foundry, Lawrence Berkeley National Laboratory, supported by the Office of Science, Office of Basic Energy Sciences, of the U.S. Department of Energy under Contract No. DE-AC02--05CH11231.
\end{acknowledgements}


\section{Introduction}

Consider the wave equation on a Riemannian manifold $X:$
$$
\Box u=0\text{ on } \RR\times X
$$
where $\Box=D_t^2-\Lap_g,$
$$
\Lap_g=\sum \frac{1}{\sqrt{g}} D_j g^{jk} \sqrt{g} D_k
$$
and $D_j\equiv i^{-1} \pa_{x_j}$.

If $X$ happens to be an odd dimensional Euclidean space, then \emph{Huygens' Principle} applies, i.e.,
the solution
$$
\cos t\sqrt{\Lap} \delta_q
$$
which has initial data a delta-function (and initial derivative zero)
is supported exactly on sphere of radius $\abs{t}.$ In even space
dimensions, or on a general odd dimensional manifold, this principle
is well known to fail, but quite a nice proxy for it persists: we in
general have
$$
\singsupp u(t) \subset \big\{p:\ \text{there exists a geodesic of length } \abs{t} \text{ with endpoints }p,q\big\}.
$$
(Recall that the singular support of a distribution is the set of points near which is it not locally a smooth function.)
A more precise result yet is the refinement of this statement to deal
with the \emph{wavefront set} of the distribution $u;$ $\WF u$ is a
conic closed subset of $T^*X$ such that $\pi \WF u=\singsupp u.$   H\"ormander's
rather general theorem \cite{Hormander9} on propagation of
singularities tells us in this special case that for a solution $u$ of
the wave equation, $\WF u$ is invariant
under the (forward and backward) geodesic flow on $T^*X.$  Thus the
initial wavefront given by (the lift to the light cone of)
$N^* \{q\}$ then spreads into the conormal bundle of expanding
distance spheres.

Generalizing this result to manifolds with boundary (with Dirichlet or
Neumann boundary conditions) turns out be a rather complicated story.
Chazarain \cite{Ch:73} showed that singularities striking the boundary
transversely simply reflect according to the usual law of geometric
optics (conservation of energy and tangential momentum, hence ``angle
of incidence equals angle of reflection'') for the reflection of
bicharacteristics.  The difficulties arise, however, in the treatment
of geodesics tangent to the boundary: in \cite{Melrose-Sjostrand1} and
\cite{Melrose-Sjostrand2} Melrose--Sj\"ostrand showed that, at
these ``glancing points,'' singularities may only propagate along certain
generalized bicharacteristics.  By parametrix constructions of Melrose
\cite{Melrose14} and Taylor \cite{Taylor1}, these $\CI$ singularities
do \emph{not} propagate along concave boundaries (e.g.\ they do not
``stick'' to the exterior of a convex obstacle).  Note that this last
result ceases to be true in the analytic, rather than smooth,
category.

A simple summary of some of the fundamental results in the subject is provided by Figure~\ref{figure:fundamental}.
\begin{figure}[bth]\label{figure:fundamental}
\includegraphics[scale=1.3,angle=-90]{obstacle3.pdf}\caption{Singularities
  of the fundamental solution of the wave equation exterior to a convex obstacle.}\end{figure}
This figure shows the singularities of the fundamental solution the
wave equation in the exterior of a convex obstacle in the plane.
There is (part of) a circular front of directly propagated
singularities as well as a curved front of singularities reflected off
the obstacle in accordance with Snell's law.  Most crucially,
\emph{there are no singularities behind the obstacle} in the ``shadow
region,'' as a consequence of the parametrix construction of Melrose and Taylor.

By contrast, it has been known since the late 19th century (starting
with work of Sommerfeld \cite{Sommerfeld1}) that if the obstacle has a
sharp corner, singularities \emph{do} propagate, i.e., \emph{diffract,}
into the shadow region behind the obstacle.  Figure~\ref{figure:wedge}
shows the fundemental solution of the wave equation in the exterior of
a wedge; we can easily see a circular wave of singularities emanating
from the tip of the wedge and giving rise to singularities in the
shadow region.
\begin{figure}
\includegraphics[scale=0.7]{wedge-edited.pdf}\caption{Singularities
  of the fundamental solution of the wave equation exterior to a
  wedge. \label{figure:wedge}}\end{figure}

As alluded to above, general boundaries present special difficulties
of their own, so in order to study the diffraction phenomenon in a
simple setting, we now mostly set aside this class of manifolds, and focus on
\emph{manifolds with conic singularities} where wave equation
solutions will exhibit diffraction, but the geometry of geodesics is
relatively manageable.

\section{Conic geometry}

We define a \emph{conic manifold}
to be a manifold $X$ (of dimension $n$) with boundary $Y=\pa X,$ and a Riemannian metric
on $X^\circ$ such that in terms of some boundary defining function $x$
we have in a collar neighborhood of $Y,$
$$
g=dx^2 +x^2 h
$$
where $h$ is a smooth symmetric 2-cotensor such that $h|_{Y}$ is a
metric on $Y.$ Note in particular that $g$ degenerates at $\pa X$ so
as not to be a metric uniformly up to the boundary.

The upshot is that while $X$ looks like a manifold with boundary from
the point of view of $\CI$ structure, it is metrically a manifold with
conic singularities: from the point of view of metric geometry, if we
write the connected components of the boundary as
$$
Y=\bigsqcup Y_i
$$
then each boundary component $Y_i$ should be viewed as a \emph{cone
  point}.  (See Figure~\ref{figure:conicgeometry}.)

\begin{figure}[bth]
\includegraphics[scale=.2,angle=-90]{conicmfld.pdf}
\includegraphics[scale=.2,angle=-90]{conicmfld2.pdf}
\caption{Smooth structure, and Riemannian picture of $X$ \label{figure:conicgeometry}}
\end{figure}

The conic manifold as defined here should thus be viewed as a manifold
with conic singularities \emph{already equipped} with the blow-up that
has desingularized it to a smooth manifold with boundary.  Here the
cost of having a smooth manifold is of course having a degenerate metric.

A very special case of a conic manifold is that of a surface
obtained by gluing together two copies of the interior (or exterior)
of a polygonal planar domain along their common edges.  This gives a
flat surface with cone points where the polygon had vertices.  The
study of the wave equation on the original domains with Dirichlet/Neumann
conditions is equivalent to the study of odd/even solutions of the wave equation on the
doubled manifold---see Hillairet \cite{Hillairet:2005}.

The behavior of geodesics on conic manifolds is of considerable
interest near the cone point.  The crucial observation is that it is
in fact quite hard to aim a geodesic so as to hit the cone point: most
will pass nearby and miss.  Indeed, starting out near the cone point,
there is a unique direction to aim in, in order to reach a nearby cone point.
\begin{proposition}[Melrose--Wunsch \cite{Melrose-Wunsch1}]
Every $y \in Y=\pa X$ is the endpoint of a unique geodesic; these
geodesics foliate a collar neighborhood of $Y$:
\end{proposition}
This is equivalent to a normal-form statement for the metric: we can
find coordinates so that $h=h(x,y,dy)$ has no $dx$ components, and
thus the curves $x=x_0 \pm t, y=y_0$ are unit-speed geodesics.

A crucial point in trying to make sense of propagation of singularites
is to make a reasonable definition of the continuation of a geodesic
that reaches a cone point.  There are two reasonable candidates for
this definition, one more restrictive than the other, and both play a
role here:

\begin{definition} We define geodesics passing through $\bigsqcup Y_j \equiv \pa X$ as follows:
\begin{itemize}
\item A \emph{diffractive geodesic} is a geodesic which, upon reaching
  the boundary component $Y_i$ along a geodesic ending at a point
  $y\in Y_i,$ immediately then leaves the boundary from some point $y'
  \in Y_i.$
\item A \emph{geometric geodesic} is a geodesic which, upon reaching
  the boundary component $Y_i$ along a geodesic ending at a point
  $y\in Y_i,$ immediately then leaves the boundary from some point $y'
  \in Y_i$ such that $y,y'$ are endpoints of a geodesic \emph{in $Y_i$}
  (w.r.t.\ the metric $h|_{Y_i})$ of length $\pi.$
\item A \emph{strictly diffractive} geodesic is one which is
  diffractive but not geometric.
\end{itemize}
\end{definition}

A more intuitive definition of geometric geodesics is as follows: they
are the geodesics that are \emph{locally approximable} by families of geodesics in
$X^\circ$.  We refer the reader to \cite{Melrose-Wunsch1} for more
detail on these definitions.

\section{Propagation of singularities on conic manifolds}

Consider now solutions to the wave equation on a manifold with conic
singularities.  We always employ the \emph{Friedrichs extension} of
the Laplacian acting on $\mathcal{C}_c^\infty(X^\circ).$
(This stipulation is important only in dimension two, where $\Lap$ is not
essentially self-adjoint.)

We now can (roughly) state the following:
\begin{theorem}[Melrose--Wunsch \cite{Melrose-Wunsch1}]
Singularities for solutions to the wave equation propagate along diffractive geodesics; strictly
diffractive geodesics generically propagate \emph{weaker}
singularities than geometric geodesics.
\end{theorem}
The genericity condition is that the incident singularities not be
precisely \emph{focused} on the cone tip and applies, e.g., to Cauchy data
that are conormal with respect to a manifold that is at most simply
tangent to the hypersurfaces at constant distance from a cone tip.  In
this case---and in particular for the fundamental solution---we
find that \emph{the diffracted wave for the fundamental solution is
  $(n-1)/2-\epsilon$ derivatives smoother than the main wavefront,}
where $n$ is the dimension of $X.$

We remark that this result has been subsequently generalized to cover
the cases of manifolds with incomplete edge singularities \cite{MVW1},
as well as manifolds with corners \cite{Va:04}, \cite{MeVaWu:13}.

The rest of this paper is essentially applications and extensions of this result in various contexts.

\section{Local energy decay on conic manifolds with Euclidean ends}\label{section:BW}

Consider now a noncompact $n$-manifold $X$ with ends that are
Euclidean.  We will consider solutions to the wave equation
$$
\Box u=0
$$
on $X$ with compactly supported Cauchy data in the energy space.

If $X$ is a smooth manifold, it has long been known that the decay of
local energy can be obstructed by the trapping of geodesics; recall
that a geodesic is said to be forward- or backward-\emph{trapped} if
it remains in a compact set as $t \to \pm \infty.$ Classic work of
Lax--Philips \cite{Lax-Phillips1} and Morawetz \cite{Morawetz:Decay}
shows that, for odd $n,$ absence of trapping implies exponential local
energy decay; on the other hand, results starting with Ralston
\cite{Ralston:Localized} show that trapping of rays implies that
exponential local energy decay cannot hold.  The usual line of
reasoning in obtaining such estimates involves obtained bounds on the
\emph{cutoff resolvent}
$$
\chi (\Lap-\lambda^2)^{-1} \chi,\quad \chi \in \mathcal{C}_c^\infty.
$$
It is well known that in odd dimensions this operator can be
meromorphically continued from $\Im \lambda>0$ to $\CC,$ and its poles
are known as \emph{resonances}.  Exponential local energy decay is
then obtained by showing that no resonances lie in some \emph{strip}
$\Im \lambda>-\nu,$ $\nu>0$ (and that the resolvent has an upper bound
with polynomial growth in this strip).

The situation with conic manifolds is thus interesting for the
following reason: as soon as we have more than one cone point (or,
indeed,\footnote{The author is grateful to Yves Colin de Verdi\`ere
  for pointing out this possibility. In practice, it seems hard to create an
  interesting example of a non-simply connected manifold where the
  \emph{only} trapping is a strictly diffractive geodesic of this form.  On the other hand one may probably add a complex absorbing
  potential to the problem to destroy other trapping and create
  non-simply connected examples.} at least one
cone point if the manifold is non-simply connected) there must be trapped
diffractive geodesics: we can simply continue traversing geodesics
connecting the various cone points.  An example of particular interest
is (the double of) a domain exterior to one or more polygons in $\RR^2$: diffractive
geodesics can move along edges of one polygon and also along lines
connecting vertices of two different polygons.

To what degree, one wonders, does this obstruct energy decay?  The
following theorem (which answers affirmatively a conjecture of
Chandler-Wilde--Graham--Langdon--Spence~\cite{CWGLS:2012} for
polygonal exterior domains) shows that the obstruction is very minor:
\begin{theorem}[Baskin--Wunsch \cite{BaWu:13}]\label{theorem:BaWu}
Assume that no three cone points in $X$ are collinear and no two are
conjugate.  Assume that geodesics missing the cone points escape to
infinity at a uniform rate.

For $\chi \in \CcI(X),$ there exists $\delta>0$ such that the cut-off resolvent
$$
\chi (\Lap-\lambda^2)^{-1}\chi
$$
can be analytically continued from $\Im \lambda >0$ to the region
$$
\Im \lambda >-\rho \log \smallabs{\Re \lambda},\ \smallabs{Re \lambda} >\rho^{-1}
$$
and for some $C,T>0$ enjoys the estimate
$$
\norm{\chi (\Lap-\lambda^2)^{-1}\chi}_{L^{2}\to L^{2}} \leq C
\smallabs{\lambda}^{-1} e^{T\smallabs{\Im \lambda}}
$$
in this region.
\end{theorem}
We contrast this with the the standard result for smooth non-trapping
perturbations of Euclidean space.  In that case the methods of Vainberg
\cite{Vainberg:Asymptotic} and Lax--Phillips \cite{Lax-Phillips1} yield precisely the \emph{same}
resolvent estimate on $\RR$ and a slightly stronger result on
resonance-free regions: \emph{any} region of the form $\Im \lambda>-\rho \smallabs{\log \Re
\lambda}$ is free of resonances outside a large disc.  Thus
the effect of diffractive trapping by cone points is extremely
weak.  Previous results in this direction include energy decay results of \cite{Cheeger-Taylor2}, Section
6, in certain special cases of conic singularities; analogous results
for multiple inverse square potentials were previously proved by
Duyckaerts \cite{Duyckaerts1}.  Burq \cite{Burq:Coin} gave a
precise description of the resonances in the closely related case of
two convex analytic domains in the plane, one of which has a corner
facing the other.  The
diffractive trajectory here bounces back and forth between the corner
and the other obstacle, and Burq showed the associated resonances lie
along a family of logarithmic curves.

We now briefly describe some results on evolution equations that follow from Theorem~\ref{theorem:BaWu}.
We let $\mathcal{D}_s$ denote the
domain of $\Lap^{s/2}$ (hence locally just $H^s$ away from cone points) and let
$\sin t\sqrt\Lap/\sqrt\Lap$ be the wave propagator.  Let $\chi$ equal $1$
on the set where $X$ is not isometric to $\RR^n.$  In odd dimensions,
the resolvent is a meromorphic function of $\lambda\in \CC$ (with no
difficulties at $\lambda=0$) so in this case
Theorem~\ref{theorem:BaWu} shows that there are only finitely many
resonances in any horizontal strip in $\CC.$  This enables us to show
the following by a contour deformation argument:
\begin{corollary}\label{corollary:resexp}
Let $n$ be odd. Under the assumptions of Theorem~\ref{theorem:BaWu}, for all $A>0,$
small $\ep>0,$ $t>0$ sufficiently large,  and $f \in
\mathcal{D}_1,$
$$
\chi \frac{\sin t\sqrt{\Lap}}{\sqrt{\Lap}} \chi f=  \sum_{\substack{\lambda_j \in \Res(\Lap) \\ \Im \lambda
  >-A}}\sum_{m=0}^{M_j} e^{-it \lambda_j} t^m w_{j,m} + E_A(t) f
$$
where the sum is of resonances of $\Lap,$ i.e.\ over the poles of the
meromorphic continuation of the resolvent, and the $w_{j,m}$ are the
associated resonant states corresponding to $\lambda_j.$
The error satisfies
$$
\norm{E_A(t)}_{\mathcal{D}_{1}\to L^{2}} \leq C_\ep e^{-(A-\ep)t}.
$$

In particular, since the resonances have imaginary part bounded above by a
negative constant, $\chi \frac{\sin t\sqrt{\Lap}}{\sqrt{\Lap}} \chi f$ is
exponentially decaying in this case.
\end{corollary}

Another corollary is a local smoothing estimate for the Schr\"odinger
equation.  As it comes from the resolvent estimate on $\RR,$ this is
again lossless as compared to the situation on free $\RR^n$:
\begin{corollary}
  \label{corollary:local-smoothing}
  Suppose $u$ satisfies the Schr{\"o}dinger equation on $X$:
  \begin{align*}
    i^{-1}\pa_t u(t,z) + \Lap  u(t,z) &= 0 \\
    u(0,z) &= u_{0}(z)\in L^{2}(X)
  \end{align*}
Under the assumptions of Theorem~\ref{theorem:BaWu}, for all $\chi \in C^{\infty}_{c}(X)$, $u$ satisfies the local smoothing estimate without loss:
  \begin{equation*}
    \int_{0}^{T}\norm{\chi u(t) }_{\mathcal{D}_{1/2}}^{2}\, dt \leq
    C_{T} \norm{u_{0}}_{L^2}^{2}.
  \end{equation*}
\end{corollary}

The elements of the proof of Theorem~\ref{theorem:BaWu} are twofold.
The first step is to show that a \emph{very weak Huygens principle}
holds.  We recall that in nontrapping manifolds, a solution to the
wave equation with compactly supported initial data is eventually
\emph{smooth}---this is the usual ``weak Huygens principle.''  Here we show instead that the solution eventually gets
\emph{as smooth as we like}:
\begin{proposition}\label{proposition:Huygens}
Let $\chi \in \CcI(X).$   For any $s \in \RR,$ there exists $T_s\gg 0$
such that whenever $t>T_s,$
$$
\chi U(t) \chi: H^r \to H^{r+s}
$$
for all $r.$
\end{proposition}

The second part of the theorem is a modification of the celebrated
pa\-ra\-met\-rix construction of Vainberg \cite{Vainberg:Asymptotic} (see
also \cite{Tang-Zworski1}).  This argument in its original form builds
a parametrix for the resolvent out of the fundamental solution to the
wave equation, assuming that the latter satisfies the weak Huygens
principle; the new variant, by contrast, makes the weaker assumption
of the output of Proposition~\ref{proposition:Huygens} and produces a very
slightly weaker result (smaller resonance-free region).

Among the further applications of this line of reasoning is the following
theorem on Strichartz estimates for exterior polygonal domains (joint
work with Baskin and Marzuola) \cite{BaskinMarzuolaWunsch:2014}):
for an exterior polygonal domain where the only trapped geodesics are
strictly diffractive (and where no three vertices are collinear) we
find that the same Strichartz estimates for the Schr\"odinger equation
hold as on Euclidean space (locally in time for Neumann conditions,
and globally for Dirichlet).

\section{The wave trace}

If $X$ is a compact Riemannian manifold without boundary let
$$
(\phi_j, \lambda_j^2)
$$
denote the eigenfunctions and eigenvalues of $\Lap.$
One might like to study
the ``inverse spectral problem'' of using the $\lambda_j$ to
characterize $X$ by forming a useful generating function out of the
$\lambda_j.$ An obvious but not directly useful one might be
$$
\sum_j \delta(\lambda-\lambda_j),
$$
but a much more tractable one is the Fourier transform of this
quantity,
$$
\sum_j e^{-it\lambda_j}.
$$
The utility of this generating function stems from its identification
as
$$
\Tr U(t),
$$
where $$U(t)\equiv e^{-it\sqrt{\Lap}}$$ is the ``half-wave'' evolution
operator, mapping functions on $X$ to (certain) solutions to the wave
equation.  If we can say something about the trace of $U(t)$ in terms
of the geometry of $X,$ we can thus hope to learn something about
spectral geometry.

In the setting of smooth
boundaryless manifolds, we have the following classical results on the
wave trace.  Let
$$
\LSpec (X) =\{0\} \bigcup \big\{\pm \text{lengths of periodic
  geodesics on }X\big\}.
$$
\begin{theorem}[Chazarain \cite{Chazarain1}, Duistermaat--Guillemin
  \cite{Duistermaat-Guillemin1}; cf.\ also Colin de Verdi\`ere \cite{Co:73a}, \cite{Co:73b}]\label{theorem:smoothpoisson}
$$\singsupp \Tr U(t) \subset \LSpec (X).$$
\end{theorem}
This allows one to dream of ``hearing'' lengths of closed geodesics,
but does not rule out the possibility that the allowable singularities
do not, in fact, arise.  The presence of honest singularities is,
however, guaranteed by:
\begin{theorem}[Duistermaat--Guillemin \cite{Duistermaat-Guillemin1}]
Let $L$ be the length of an nondegenerate periodic closed geodesic
$\gamma$ on
$L$ that is isolated in the length spectrum.  Then near $t=L$ we have
$$
\Tr U(t) \sim \frac{L_0}{2\pi} i^{\sigma} \abs{I-P}^{-1/2}(t-L)^{-1},
$$
where
\begin{itemize}
\item $L_0$ is the length of the primitive closed geodesic if
 $\gamma$ is an iterate of a shorter one.
\item $\sigma$ is the Morse index of the variational problem for a
  periodic geodesic, evaluated at $\gamma.$
\item $P$ is the linearized Poincar\'e map, obtained as the
  linearization at $\gamma$ of the first return map to a hypersurface
  of the phase space, transverse to $\gamma.$
\end{itemize}
\end{theorem}
Note that the nondegeneracy condition in the hypotheses is simply the condition that $I-P$ be nonsingular.

The generalization of Theorem~\ref{theorem:smoothpoisson} to compact
conic manifolds is straightforward: let $$\DLSpec(X)=
\{0\} \bigcup \big\{\pm \text{lengths of periodic
 diffractive geodesics on }X\big\}.$$
\begin{theorem}[Wunsch \cite{Wunsch2}]
On a conic manifold $X,$
$$
\singsupp \Tr U(t) \subset \DLSpec{X}.
$$
\end{theorem}
The singularities at lengths of geodesics in $X^\circ$ are easily seen
to be described by the same formula given by Duistermaat--Guillemin,
but the geodesics interacting through conic points are not so simple.
We consider $\gamma$ a closed, \emph{strictly diffractive} geodesic
undergoing $k$ diffractions and traversing geodesic segments
$\gamma_1,\dots, \gamma_k$ connecting cone points $Y_{i_1}, \dots
Y_{i_k}.$ Recall that the hypothesis that the geodesic be strictly
diffractive means that it interacts with each cone point by entering
and leaving on a pair of geodesics that cannot be uniformly locally
approximated by geodesics in $X^\circ.$ This is generically the case
for all closed geodesics.  Assume further that the length $L$ of
$\gamma$ is isolated in the length spectrum, and make the additional
nondegeneracy hypothesis that no two cone points along the geodesic
are conjugate to one another.
Note that the following was previously known by work of Hillairet
\cite{Hillairet:2005} in the important special case of flat surfaces
with conic singularities (hence in particular for doubles of
polygons).
\begin{theorem}[Ford--Wunsch \cite{1411.6913}]\label{theorem:FoWu}
Near $t=L,$
$$
\Tr U(t) \sim \int e^{i(t-L)\xi} a(\xi) \, d\xi
$$
where
\begin{equation}\label{symbol}
  a(\xi) \sim L_0 \cdot (2\pi)^{\frac{kn}{2}} \,  e^{\frac{ik(n-3)\pi}{4}} \,
  \chi(\xi) \, \xi^{-\frac{k(n-1)}{2}} \prod_{j=1}^k i^{-m_{\gamma_j}} \, \mathcal{D}_j
  \, \mathcal{W}_j \ \text{as $|\xi| \to \infty$}.
\end{equation}
\end{theorem}
Here,
$\chi\in \CI(\RR)$ is $1$ for $\xi>1$ and $0$ for
  $\xi<0.$
Note that the power of $\xi$ is such that we obtain greater smoothness
as the number of diffractions increases.  The leading order
singularity as a function of $t$ is proportional to $(t-L+i0)^{-1+k(n-1)/2}$
  (but is multiplied by $\log(t-L+i0)$ if the power is an integer).

As before $L_0$ denotes the length of the
``primitive'' geodesic if $\gamma$ is an iterate of a shorter one.
The integers $m_{\gamma_j}$ are simply the Morse indices of the
variational problems associated to traveling from one cone point to
the next, evaluated at $\gamma_j.$

We will now explain the factors $\mathcal{D}_j$ and $\mathcal{W}_j.$

The terms $\mathcal{D}_j$ are associated to the diffractions through each
successive cone point $Y_{i_j}.$  They are constructed as follows.
Each cone point $Y_{i_j}$ is equipped with a metric $h_{i_j}\equiv
h\rvert_{Y_{i_j}}.$  It thus has a Laplace-Beltrami operator
$\Lap_{i_j}$ and we may use the functional calculus to take functions
of this operator.  In particular, let $$\nu_{i_j} \equiv \sqrt{
  \Delta_{Y_{i_j}} + \left( \frac{2-n}{2} \right)^2 }.$$
We then form the operator family
$$
e^{-it\nu_{i_j}}: L^2(Y_{i_j})\to L^2(Y_{i_j}).
$$
This is essentially a ``half Klein Gordon propagator'' on the link of
the cone point (i.e., a boundary component).  Now let $\kappa(\bullet)$ denote the Schwartz
kernel of an operator.  Supposing that the diffractive geodesic
$\gamma$ enters $Y_{i_j}$ at the point $y$ and leaves from point $y',$
we set
$$
\mathcal{D}_j \equiv \kappa(e^{-i\pi \nu_{i_j}})[y,y'].
$$
The propagator kernel is of course not continuous in general, however note
that the strictly diffractive nature of the geodesic ensures that $y$
and $y'$ are not connected by a geodesic of length $\pi$ in the link,
which in turn precisely ensures, by propagation of singularities, that
the Schwartz kernel of the time-$\pi$ Klein Gordon propagator is
smooth near $(y,y'),$ hence the evaluation of this distribution makes
sense.

Now we turn to $\mathcal{W}_j$.  These quantities are associated to the
geodesic segments $\gamma_j$ connecting successive cone points.  They
are best described in terms of Jacobi fields, but can also be
viewed as a proxy for a quantity involving the derivative of the
expenential map, hence a substitute for the term involving the
Poincar\'e map in the Duistermaat--Guillemin formula.   Note that the
exponential map from one cone point to the next does not make sense,
since any small perturbation of the geodesic $\gamma_j$ will miss the
next cone point entirely rather than simply hitting it at a different point.
Correspondingly, if we let $\mathbf{J}$ be a set of Jacobi fields that are
orthonormal to $\gamma_j$ and at $\gamma_j(0)$ give an orthonormal
basis of $TY_{i_j}$ then $\mathbf{J}$ becomes \emph{singular} as we approach
the end of $\gamma_j$ at $Y_{i_{j+1}}.$  On the other hand, the metric
is also singular at cone points, in the sense that it vanishes on
$TY,$ so we can nonetheless make sense of the determinant
$$
\det_g \mathbf{J}\rvert_{Y_{i_{j+1}}}.
$$
Then we have
$$
\mathcal{W}_j \equiv\big\lvert\det_g \mathbf{J}\rvert_{Y_{i_{j+1}}}\big\rvert^{-1/2}.
$$
This quantity can be made to look more like the derivative of an
exponential map as follows: we set
\begin{equation}\label{thetaj}
\Theta_j=(\length(\gamma_j)^{-(n-1)})\big\lvert\det_g \mathbf{J}\rvert_{Y_{i_{j+1}}}\big\rvert.
\end{equation}
Consider the case in which $Y_j$ is a ``fictitious'' cone point
obtained by blowing up a smooth point $p_0$ on a manifold.  Then Jacobi vector
fields tangent to $Y_j$ are obtained as lifts under the blow-down map
of Jacobi fields vanishing at $p_0,$ and
$\Theta_j$ becomes
a standard expression
for $\det D\exp_{Y_j} (\bullet)$ in terms of Jacobi fields, at least
when evaluated in $X^\circ$ (cf.\
\cite{Be:77}): in that case we simply have
$$
\Theta_j=\det_g \big\lvert D \exp_{Y_j}(\bullet)\big\rvert.
$$
Since $\mathcal{W}_j=\length(\gamma_j)^{-(n-1)/2} \Theta_j^{-1/2}$ we
recover the relationship with the exponential map in the case of a
trivial cone point.

In rough outline, the proof of Theorem~\ref{theorem:FoWu} goes as
follows.  We know explicitly what the wave propagator look like on a
model \emph{product cone} $\RR_+\times Y_j$ endowed with the scale
invariant metric $dx^2 +x^2 h_0(y,dy)$---this is a computation of
Cheeger--Taylor \cite{Cheeger-Taylor1}, \cite{Cheeger-Taylor2}
involving bravura use of the Hankel transform.  In particular, we
can evaluate the symbol of the diffracted wavefront explicitly in that
case.  More generally, in \cite{Melrose-Wunsch1} the author and
Melrose prove that near a cone point, the diffracted front of the wave
propagator is guaranteed to be a conormal distribution.  The first new
step is therefore to show that in the non-product case, the principal
symbol of the diffracted front is still, modulo adjustments involving
comparing half-densities on the two spaces, given by the same
expression as in the product case where we use the model metric
$dx^2+x^2 h\rvert_{x=0} (y,dy).$ This involves comparing the two
propagators and showing that the difference
between model and exact propagators can be estimated by a
\emph{Morawetz inequality} near the cone tip.

Having understood the effect of a single diffraction, we then proceed
as follows.  We take a microlocal partition of unity $A_j$ on $X,$
where for technical reasons the $A_j$ are restricted to be simply
cutoff functions near each boundary component $Y_i$ but are otherwise
fully localized in phase space.
We then decompose the wave trace as follows: fix
small times $t_j$ with $\sum t_j=T.$  Then by cyclicity of the trace
$$
\Tr U(t) = \sum_{i_0,\dots, i_{N}}\Tr \sqrt{A_{i_0}} U(t-T)A_{i_1} U(t_1) A_{i_2}\dots
A_{t_{N}} U(t_N) \sqrt{A_{i_0}}.
$$
By propagation of singularities, this term is guaranteed to be trivial
unless there is a diffractive geodesic successively passing through
the microsupports of the $A_{i_j}$'s, hence we may throw away most of
this sum.  The remaining terms are then computed by a stationary
phase computation, gluing together the propagators for ``free''
propagation through $X^\circ$ with those for the diffractive
interaction with cone points (this was the same strategy previously
used by Hillairet in \cite{Hillairet:2005} as well as by the author in
\cite{Wunsch2}).

\section{Lower bounds for resonances}

While $\Tr U(t)$ only makes sense (even distributionally) on a \emph{compact}
manifold, if we return to the setting of Section~\ref{section:BW}
where we have a \emph{noncompact} manifold with Euclidean ends, we may still
make sense of an appropriately \emph{renormalized} wave trace, and use
the diffractive trace formula (Theorem~\ref{theorem:FoWu}) to obtain
lower bounds on resonances.

In odd dimensions, we let $\mathcal{A}$ denote the generator of
the wave group, and hence $e^{t \mathcal{A}}$ the wave group itself;
likewise we let $\mathcal{A}_0$ be the generator of the wave group on Euclidean space.
 We
then have the trace formula
\begin{equation}\label{traceres}
\Tr (e^{t \mathcal{A}} -e^{t \mathcal{A}_0}) = \sum_{\lambda_j \in \Res} e^{-i \lambda_j t},\ t
> 0
\end{equation}
where the sum is over the resonances, counted with multiplicity (see
e.g. \cite{Sjostrand-Zworski5} for the details of how to makes sense of
this difference of operators in a wide variety of contexts).
This result in various settings was first proved by Bardos-Guillot-Ralston \cite{Bardos-Guillot-Ralston1}, Melrose
\cite{MR83j:35128}, and Sj\"ostrand-Zworski \cite{Sjostrand-Zworski5};
an analogous result in even dimensions can be found in \cite{Zw:99}.

Now if we can actually guarantee the existence of singularities in the (renormalized) wave
trace, a Tauberian theorem of Sj\"ostrand-Zworski
\cite{Sjostrand-Zworski3} allows us to deduce from \eqref{traceres} in
a lower bound on the number of resonances in logarithmic
regions in $\CC.$  Fortunately, Theorem~\ref{theorem:FoWu} applies
equally well in this context, and we obtain a lower bound on the
number of resonances as follows.
Let
$$
N_\rho(r) =\# \{\text{Resonances in } \smallabs{\lambda}<r,\
\Im \lambda \geq -\rho \log \smallabs{\Re{\lambda}}\}.
$$
Then we have:
\begin{theorem}[Hillairet--Wunsch]\label{theorem:HiWu}
Under the geometric assumptions of Theorem~\ref{theorem:BaWu}, let $L$
be the length of a closed, strictly diffractive geodesic $\gamma$
undergoing $k$ diffractions.  Assume, in
the notation of Theorem~\ref{theorem:FoWu}, that all the diffraction
coefficients $\mathcal{D}_j$ are nonzero along $\gamma;$ assume also that there are no closed diffractive geodesics
beside iterates of this one having length in $L\NN.$ Then for all $\ep>0,$
$$
N_\rho(\rho)\geq C_{\rho,\epsilon} r^{1-\epsilon}
$$
provided
$$
\rho > \frac{(n-1)k}{2L}
$$
\end{theorem}
A detailed proof, which simply consists of using the trace formula
(Theorem~\ref{theorem:FoWu}) in \eqref{traceres} together with the
Tauberian theorem of \cite{Sjostrand-Zworski3}, can be found in
\cite{Ga:15}.  Note that the bound on $\rho$ written here is that
which we obtain by considering the whole sequence of singularities of
the wave trace obtained by considering arbitrary \emph{iterates} of
the geodesic $\gamma.$ We remark that the distinction between the
trace of the full wave group and $\Tr U(t)$ is immaterial for this
purpose since the former is twice the real part of the latter, and it
is not difficult to verify from examination of \eqref{symbol} that the
singularities arising from iterates of a given geodesic cannot all be
purely imaginary.

The optimal $\rho$ here is generally obtained by choosing $\gamma$
to be the geodesic that
traverses the longest geodesic segment connecting a pair of distinct cone
points, back and forth (assuming the diffraction coefficients are
nonvanishing).  If
$D_{\text{max}}$ denotes the greatest distance between a pair of cone points, then we
have a closed geodesic of length $2 D_{\text{max}}$ with $k=2,$ and we
obtain the bound
$$
\rho > \frac{(n-1)}{2D_{\text{max}}}.
$$

Remarkably, this theorem is essentially sharp, as was shown by
Galkowski, who has produced an effective version of the Vainberg
argument previously employed in \cite{BaWu:13}:
\begin{theorem}[Galkowski \cite{Ga:15}]
Let $D_{\text{max}}$ be the greatest distance between two cone points.  For any
$\epsilon>0$ the
constant $\rho$ in Theorem~\ref{theorem:BaWu} can be taken to be
$(n-1)/(2D_{\text{max}})-\epsilon,$ i.e.\ $N_\rho(r)$ is \emph{bounded} for all $\rho<(n-1)/2D_{\text{max}}.$
\end{theorem}
Since $N_\rho$ is bounded for $\rho<(n-1)/2D_{\text{max}}$ and (subject to the
nondegeneracy hypotheses of Theorem~\ref{theorem:HiWu}) almost linearly
growing for $\rho>(n-1)/2D_{\text{max}},$ we find that in any set near the
critical curve $\Im\lambda=-((n-1)/2D_{\text{max}}) \log \smallabs{\Re
  \lambda}$ of the form
$$
\big(-\frac{n-1}{2D_{\text{max}}}-\ep\big) \log \smallabs{\Re
  \lambda}<\Im \lambda<\big(-\frac{n-1}{2D_{\text{max}}}+\ep\big)
\log \smallabs{\Re \lambda},\quad \abs{\lambda}>\ep^{-1}
$$
there are infinitely many resonances.  The intuition behind the
importance of the longest geodesic connecting two cone points is that
repeatedly traversing this segment back and forth is the way in which
a trapped singularity can diffract \emph{least frequently}.  Since each
diffraction loses considerable energy owing to the smoothing effect of
diffraction, a resonant state propagating back and forth along this
geodesic is the one that loses energy to infinity at the
slowest rate.

\bibliographystyle{plain}