\documentclass[fleqn,a4paper]{article}

\usepackage[utf8]{inputenc} % why not type "Bézout" with unicode?
\usepackage[T1]{fontenc} % vector fonts plz
\usepackage{fullpage,amsmath,amssymb,latexsym,graphicx}
\usepackage{newtxtext,newtxmath} % Times for PR
\usepackage{appendix}
\usepackage[dvipsnames]{xcolor}
\usepackage[
  colorlinks=true,
  urlcolor=MidnightBlue,
  citecolor=MidnightBlue,
  filecolor=MidnightBlue,
  linkcolor=MidnightBlue
]{hyperref} % ref and cite links with pretty colors
\usepackage[
  style=phys,
  eprint=true,
  maxnames = 100
]{biblatex}
\usepackage{anyfontsize,authblk}

\addbibresource{2-point.bib}

\begin{document}

\title{
  Arrangement of nearby minima and saddles in the mixed $p$-spin energy landscape
}

\author{Jaron Kent-Dobias}
\affil{\textsc{DynSysMath}, Istituto Nazionale di Fisica Nucleare, Sezione di Roma}

\maketitle
\begin{abstract}
\end{abstract}

\cite{Ros_2020_Distribution, Ros_2019_Complex, Ros_2019_Complexity}

\section{Model}

The mixed $p$-spin models are defined by the Hamiltonian
\begin{equation} \label{eq:hamiltonian}
  H(\mathbf s)=-\sum_p\frac1{p!}\sum_{i_1\cdots i_p}^NJ^{(p)}_{i_1\cdots i_p}s_{i_1}\cdots s_{i_p}
\end{equation}
where the vectors $\mathbf s\in\mathbb R^N$ are confined to the sphere
$\|\mathbf s\|^2=N$.  The coupling coefficients $J$ are fully-connected and random, with
zero mean and variance $\overline{(J^{(p)})^2}=a_pp!/2N^{p-1}$ scaled so that
the energy is typically extensive. The overbar denotes an average
over the coefficients $J$. The factors $a_p$ in the variances are freely chosen
constants that define the particular model. For instance, the `pure'
$p$-spin model has $a_{p'}=\delta_{p'p}$. This class of models encompasses all
statistically isotropic Gaussian random Hamiltonians defined on the
hypersphere.

The covariance between the energy at two different points is a function of the overlap, or dot product, between those points, or
\begin{equation} \label{eq:covariance}
  \overline{H(\mathbf s_1)H(\mathbf s_2)}=Nf\left(\frac{\mathbf s_1\cdot\mathbf s_2}N\right)
\end{equation}
where the function $f$ is defined from the coefficients $a_p$ by
\begin{equation}
  f(q)=\frac12\sum_pa_pq^p
\end{equation}
In this paper, we will focus on models with a replica symmetric complexity, but
many of the intermediate formulae are valid for arbitrary replica symmetry
breakings.

To enforce the spherical constraint at stationary points, we make use of a Lagrange multiplier $\omega$. This results in the extremal problem
\begin{equation}
  H(\mathbf s)+\frac\omega2(\|\mathbf s\|^2-N)
\end{equation}
The gradient and Hessian at a stationary point are then
\begin{align}
  \nabla H(\mathbf s,\omega)=\partial H(\mathbf s)+\omega\mathbf s
  &&
  \operatorname{Hess}H(\mathbf s,\omega)=\partial\partial H(\mathbf s)+\omega I
\end{align}
where $\partial=\frac\partial{\partial\mathbf s}$ will always denote the derivative with respect to $\mathbf s$.


\section{Complexity}

We introduce the Kac--Rice \cite{Kac_1943_On, Rice_1944_Mathematical} measure
\begin{equation}
  d\nu_H(\mathbf s,\omega)
  =2\,d\mathbf s\,d\omega\,\delta(\|\mathbf s\|^2-N)\,
  \delta\big(\nabla H(\mathbf s,\omega)\big)\,
  \big|\det\operatorname{Hess}H(\mathbf s,\omega)\big|
\end{equation}
which counts stationary points of the function $H$. More interesting is the
measure conditioned on the energy density $E$ and stability $\mu$,
\begin{equation}
  d\nu_H(\mathbf s,\omega\mid E,\mu)
  =d\nu_H(\mathbf s,\omega)\,
  \delta\big(NE-H(\mathbf s)\big)\,
  \delta\big(N\mu-\operatorname{Tr}\operatorname{Hess}H(\mathbf s,\omega)\big)
\end{equation}
We want the typical number of stationary points with energy density
$E_1$ and stability $\mu_1$ that lie a fixed overlap $q$ from a reference
stationary point of energy density $E_0$ and stability $\mu_0$.
\begin{equation} \label{eq:complexity.definition}
  \Sigma_{12}
  =\frac1N\overline{\int\frac{d\nu_H(\pmb\sigma,\varsigma\mid E_0,\mu_0)}{\int d\nu_H(\pmb\sigma',\varsigma'\mid E_0,\mu_0)}\,
  \log\bigg(\int d\nu_H(\mathbf s,\omega\mid E_1,\mu_1)\,\delta(Nq-\pmb\sigma\cdot\mathbf s)\bigg)}
\end{equation}
Both the denominator and the logarithm are treated using the replica trick, which yields
\begin{equation}
  \Sigma_{12}
  =\frac1N\lim_{n\to0}\lim_{m\to0}\frac\partial{\partial n}\overline{\int\left(\prod_{b=1}^md\nu_H(\pmb\sigma_b,\varsigma_b\mid E_0,\mu_0)\right)\left(\prod_{a=1}^nd\nu_H(\mathbf s_a,\omega_a\mid E_1,\mu_1)\,\delta(Nq-\pmb \sigma_1\cdot \mathbf s_a)\right)}
\end{equation}
Note that because of the structure of \eqref{eq:complexity.definition},
$\pmb\sigma_1$ is special among the set of $\pmb\sigma$ replicas, since only it
is constrained to lie a given overlap from the $\mathbf s$ replicas. This
replica asymmetry will be important later.

\subsection{The Hessian factors}

The double partial derivatives of the energy are Gaussian with the variance
\begin{equation}
  \overline{(\partial_i\partial_jH(\mathbf s))^2}=\frac1Nf''(1)
\end{equation}
which means that the matrix of partial derivatives belongs to the GOE class. Its spectrum is given by the Wigner semicircle
\begin{equation}
  \rho(\lambda)=\begin{cases}
    \frac2{\pi}\sqrt{1-\big(\frac{\lambda}{\mu_\text m}\big)^2} & \lambda^2\leq\mu_\text m^2 \\
    0 & \text{otherwise}
  \end{cases}
\end{equation}
with radius $\mu_\text m=\sqrt{4f''(1)}$. Since the Hessian differs from the
matrix of partial derivatives by adding the constant diagonal matrix $\omega
I$, it follows that the spectrum of the Hessian is a Winger semicircle shifted
by $\omega$, or $\rho(\lambda+\omega)$.

The average over factors depending on the Hessian alone can be made separately
from those depending on the gradient or energy, since for random Gaussian
fields the Hessian is independent of these \cite{Bray_2007_Statistics}. In
principle the fact that we have conditioned the Hessian to belong to stationary
points of certain energy, stability, and proximity to another stationary point
will modify its statistics, but these changes will only appear at subleading
order in $N$ \cite{Ros_2019_Complexity}. At leading order, the various expectations factorize, each yielding
\begin{equation}
  \overline{\big|\det\operatorname{Hess}H(\mathbf s,\omega)\big|\,\delta\big(N\mu-\operatorname{Tr}\operatorname{Hess}H(\mathbf s,\omega)\big)}
  =e^{N\int d\lambda\,\rho(\lambda+\mu)\log|\lambda|}\delta(N\mu-N\omega)
\end{equation}
Therefore, all of the Lagrange multipliers are fixed identically to the stabilities $\mu$. We define the function
\begin{equation}
  \begin{aligned}
    \mathcal D(\mu)
    &=\int d\lambda\,\rho(\lambda+\mu)\log|\lambda| \\
    &=\begin{cases}
      \frac12+\log\left(\frac12\mu_\text m\right)+\frac\mu{\mu_\text m}\left(\frac\mu{\mu_\text m}-\sqrt{\big(\frac\mu{\mu_\text m}\big)^2-1}\right)
      -\log\left(\frac{\mu}{\mu_\text m}-\sqrt{\big(\frac\mu{\mu_\text m}\big)^2-1}\right) & \mu>\mu_\text m \\
      \frac12+\log\left(\frac12\mu_\text m\right)+\frac{\mu^2}{\mu_\text m^2}
       & -\mu_\text m\leq\mu\leq\mu_\text m \\
       \frac12+\log\left(\frac12\mu_\text m\right)+\frac\mu{\mu_\text m}\left(\frac\mu{\mu_\text m}+\sqrt{\big(\frac\mu{\mu_\text m}\big)^2-1}\right)
      -\log\left(\frac{\mu}{\mu_\text m}+\sqrt{\big(\frac\mu{\mu_\text m}\big)^2-1}\right) & \mu<-\mu_\text m
    \end{cases}
  \end{aligned}
\end{equation}
and the full factor due to the Hessians is
\begin{equation}
  e^{Nm\mathcal D(\mu_0)+Nn\mathcal D(\mu_1)}\left[\prod_a^m\delta(N\mu_0-N\varsigma_a)\right]\left[\prod_a^n\delta(N\mu_1-N\omega_a)\right]
\end{equation}

\subsection{The other factors}

Having integrated over the Lagrange multipliers using the $\delta$ functions
resulting from the average of the Hessians, the remaining part of the integrand
has the form
\begin{equation}
  e^{
    Nm\hat\beta_0E_0+Nn\hat\beta_1E_1
    -\sum_a^m\left[(\pmb\sigma_a\cdot\hat{\pmb\sigma}_a)\mu_0
      -\frac12\hat\mu_0(N-\pmb\sigma_a\cdot\pmb\sigma_a)
    \right]
      -\sum_a^n\left[(\mathbf s_a\cdot\hat{\mathbf s}_a)\mu_1
      -\frac12\hat\mu_1(N-\mathbf s_a\cdot\mathbf s_a)
      -\frac12\hat\mu_{12}(Nq-\pmb\sigma_1\cdot\mathbf s_a)
    \right]
    +\int d\mathbf t\,\mathcal O(\mathbf t)H(\mathbf t)
  }
\end{equation}
where we have introduced the linear operator
\begin{equation}
  \mathcal O(\mathbf t)
  =\sum_a^m\delta(\mathbf t-\pmb\sigma_a)\left(
    i\hat{\pmb\sigma}_a\cdot\partial_{\mathbf t}-\hat\beta_0
    \right)
    +
    \sum_a^n\delta(\mathbf t-\mathbf s_a)\left(
    i\hat{\mathbf s}_a\cdot\partial_{\mathbf t}-\hat\beta_1
    \right)
\end{equation}
We have written the $H$-dependant terms in this strange form for the ease of taking the average over $H$: since it is Gaussian-correlated, it follows that
\begin{equation}
  \overline{e^{\int d\mathbf t\,\mathcal O(\mathbf t)H(\mathbf t)}}
  =e^{\frac12\int d\mathbf t\,d\mathbf t'\,\mathcal O(\mathbf t)\mathcal O(\mathbf t')\overline{H(\mathbf t)H(\mathbf t')}}
  =e^{N\frac12\int d\mathbf t\,d\mathbf t'\,\mathcal O(\mathbf t)\mathcal O(\mathbf t')f\big(\frac{\mathbf t\cdot\mathbf t'}N\big)}
\end{equation}
It remains only to apply the doubled operators to $f$ and then evaluate the simple integrals over the $\delta$ measures. We do not include these details, which are standard.

\subsection{Hubbard--Stratonovich}

Having expanded this expression, we are left with an argument in the exponential which is a function of scalar products between the fields $\mathbf s$, $\hat{\mathbf s}$, $\pmb\sigma$, and $\hat{\pmb\sigma}$. We will change integration coordinates from these fields to matrix fields given by the scalar products, defined as
\begin{align} \label{eq:fields}
  C^{00}_{ab}=\frac1N\pmb\sigma_a\cdot\pmb\sigma_b &&
  R^{00}_{ab}=-i\frac1N{\pmb\sigma}_a\cdot\hat{\pmb\sigma}_b &&
  D^{00}_{ab}=\frac1N\hat{\pmb\sigma}_a\cdot\hat{\pmb\sigma}_b \\
  C^{01}_{ab}=\frac1N\pmb\sigma_a\cdot\mathbf s_b &&
  R^{01}_{ab}=-i\frac1N{\pmb\sigma}_a\cdot\hat{\mathbf s}_b &&
  R^{10}_{ab}=-i\frac1N\hat{\pmb\sigma}_a\cdot{\mathbf s}_b &&
  D^{01}_{ab}=\frac1N\hat{\pmb\sigma}_a\cdot\hat{\mathbf s}_b \\
  C^{11}_{ab}=\frac1N\mathbf s_a\cdot\mathbf s_b &&
  R^{11}_{ab}=-i\frac1N{\mathbf s}_a\cdot\hat{\mathbf s}_b &&
  D^{11}_{ab}=\frac1N\hat{\mathbf s}_a\cdot\hat{\mathbf s}_b
\end{align}
We insert into the integral the product of $\delta$ functions enforcing these
definitions, integrated over the new matrix fields, which is equivalent to
multiplying by one. Once this is done, the many scalar products appearing
throughout can be replaced by the matrix fields, and the original vector fields
can be integrated over. Conjugate matrix field integrals created when the
$\delta$ functions are promoted to exponentials can be evaluated by saddle
point in the standard way, yielding an effective action depending on the above
matrix fields alone.

We will always assume that the square matrices $C^{00}$, $R^{00}$, $D^{00}$,
$C^{11}$, $R^{11}$, and $D^{11}$ are hierarchical matrices, with each set of
three sharing the same hierarchical structure. In particular, we immediately
define $c_\mathrm d^{00}$, $r_\mathrm d^{00}$, $d_\mathrm d^{00}$, $c_\mathrm d^{11}$, $r_\mathrm d^{11}$, and
$d_\mathrm d^{11}$ as the value of the diagonal elements of these matrices,
respectively. Note that $c_\mathrm d^{00}=c_\mathrm d^{11}=1$ due to the spherical constraint.

Defining the `block' fields $\mathcal Q_{00}=(\hat\beta_0, \hat\mu_0, C^{00},
R^{00}, D^{00})$, $\mathcal Q_{11}=(\hat\beta_1, \hat\mu_1, C^{11}, R^{11},
D^{11})$, and $\mathcal Q_{01}=(\hat\mu_{01},C^{01},R^{01},R^{10},D^{01})$
the resulting complexity is
\begin{equation}
  \Sigma_{01}
  =\frac1N\lim_{n\to0}\lim_{m\to0}\frac\partial{\partial n}\int d\mathcal Q_{00}\,d\mathcal Q_{11}\,d\mathcal Q_{01}\,e^{Nm\mathcal S_0(\mathcal Q_{00})+Nn\mathcal S_1(\mathcal Q_{00},\mathcal Q_{11},\mathcal Q_{01})}
\end{equation}
where
\begin{equation}
  \begin{aligned}
    &\mathcal S_0(\mathcal Q_{00})
    =\hat\beta_0E_0-r^{00}_\mathrm d\mu_0-\frac12\hat\mu_0(1-c^{00}_\mathrm d)+\mathcal D(\mu_0)\\
    &\quad+\frac1m\bigg\{
      \frac12\sum_{ab}^m\left[
        \hat\beta_1^2f(C^{00}_{ab})+(2\hat\beta_1R^{00}_{ab}-D^{00}_{ab})f'(C^{00}_{ab})+(R_{ab}^{00})^2f''(C_{ab}^{00})
        \right]+\frac12\log\det\begin{bmatrix}C^{00}&R^{00}\\R^{00}&D^{00}\end{bmatrix}
    \bigg\}
  \end{aligned}
\end{equation}
is the action for the ordinary, one-point complexity, and remainder is given by
\begin{equation}
  \begin{aligned}
    &\mathcal S(\mathcal Q_{00},\mathcal Q_{11},\mathcal Q_{01})
    =\hat\beta_1E_1-r^{11}_\mathrm d\mu_1-\frac12\hat\mu_1(1-c^{11}_\mathrm d)+\mathcal D(\mu_1) \\
    &\quad+\frac1n\sum_b^n\left\{-\frac12\hat\mu_{12}(q-C^{01}_{1b})+\sum_a^m\left[
      \hat\beta_0\hat\beta_1f(C^{01}_{ab})+(\hat\beta_0R^{01}_{ab}+\hat\beta_1R^{10}_{ab}-D^{01}_{ab})f'(C^{01}_{ab})+R^{01}_{ab}R^{10}_{ab}f''(C^{01}_{ab})
  \right]\right\}
    \\
    &\quad+\frac1n\bigg\{
      \frac12\sum_{ab}^n\left[
        \hat\beta_1^2f(C^{11}_{ab})+(2\hat\beta_1R^{11}_{ab}-D^{11}_{ab})f'(C^{11}_{ab})+(R^{11}_{ab})^2f''(C^{11}_{ab})
      \right]\\
    &\quad+\frac12\log\det\left(
        \begin{bmatrix}
          C^{11}&iR^{11}\\iR^{11}&D^{11}
        \end{bmatrix}-
        \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix}^T
        \begin{bmatrix}
          C^{00}&iR^{00}\\iR^{00}&D^{00}
        \end{bmatrix}^{-1}
        \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix}
        \right)
    \bigg\}
  \end{aligned}
\end{equation}
Because of the structure of this problem in the twin limits of $m$ and $n$ to
zero, the parameters $\mathcal Q_{00}$ can be evaluated at a saddle point of
$\mathcal S_0$ alone. This means that these parameters will take the same value
they take when the ordinary, 1-point complexity is calculated.

The $m\times n$ matrices $C^{01}$, $R^{01}$, $R^{10}$, and $D^{01}$ are
expected to have the following form at the saddle point:
\begin{align}
  C^{01}=
  \begin{subarray}{l}
    \hphantom{[}\begin{array}{ccc}\leftarrow&n&\rightarrow\end{array}\hphantom{\Bigg]}\\
  \left[
    \begin{array}{ccc}
      q&\cdots&q\\
      0&\cdots&0\\
      \vdots&\ddots&\vdots\\
      0&\cdots&0
    \end{array}
  \right]\begin{array}{c}
    \\\uparrow\\m-1\\\downarrow
  \end{array}
  \end{subarray}
  &&
  R^{01}
  =\begin{bmatrix}
    r_{01}&\cdots&r_{01}\\
    0&\cdots&0\\
    \vdots&\ddots&\vdots\\
    0&\cdots&0
  \end{bmatrix}
  &&
  R^{10}
  =\begin{bmatrix}
    r_{10}&\cdots&r_{10}\\
    0&\cdots&0\\
    \vdots&\ddots&\vdots\\
    0&\cdots&0
  \end{bmatrix}
  &&
  D^{01}
  =\begin{bmatrix}
    d_{01}&\cdots&d_{01}\\
    0&\cdots&0\\
    \vdots&\ddots&\vdots\\
    0&\cdots&0
  \end{bmatrix}
\end{align}
where only the first row is nonzero as a result of the sole linear term
proportional to $C_{1b}^{01}$ in the action.

The inverse of block hierarchical matrix is still a block hierarchical matrix, since
\begin{equation}
  \begin{bmatrix}
    C^{00}&iR^{00}\\iR^{00}&D^{00}
  \end{bmatrix}^{-1}
  =
  \begin{bmatrix}
    (C^{00}D^{00}+R^{00}R^{00})^{-1}D^{00} & -i(C^{00}D^{00}+R^{00}R^{00})^{-1}R^{00} \\
    -i(C^{00}D^{00}+R^{00}R^{00})^{-1}R^{00} & (C^{00}D^{00}+R^{00}R^{00})^{-1}C^{00}
  \end{bmatrix}
\end{equation}
Because of the structure of the 01 matrices, the volume element will depend only on the diagonal if this matrix. If we write
\begin{align}
  \tilde c_\mathrm d^{00}&=[(C^{00}D^{00}+R^{00}R^{00})^{-1}C^{00}]_{\text d} \\
  \tilde r_\mathrm d^{00}&=[(C^{00}D^{00}+R^{00}R^{00})^{-1}R^{00}]_{\text d} \\
  \tilde d_\mathrm d^{00}&=[(C^{00}D^{00}+R^{00}R^{00})^{-1}D^{00}]_{\text d}
\end{align}
then the result is
\begin{equation}
  \begin{aligned}
     &   \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix}^T
        \begin{bmatrix}
          C^{00}&iR^{00}\\iR^{00}&D^{00}
        \end{bmatrix}^{-1}
        \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix} \\
    &\qquad=\begin{bmatrix}
      q^2\tilde d_\mathrm d^{00}+2qr_{10}\tilde r^{00}_\mathrm d-r_{10}^2\tilde d^{00}_\mathrm d
      &
      i\left[d_{01}(r_{10}\tilde c^{00}_\mathrm d-q\tilde r^{00}_\mathrm d)+r_{01}(r_{10}\tilde r^{00}_\mathrm d+q\tilde d^{00}_\mathrm d)\right]
      \\
      i\left[d_{01}(r_{10}\tilde c^{00}_\mathrm d-q\tilde r^{00}_\mathrm d)+r_{01}(r_{10}\tilde r^{00}_\mathrm d+q\tilde d^{00}_\mathrm d)\right]
      &
      d_{01}^2\tilde c^{00}_\mathrm d+2r_{01}d_{01}\tilde r^{00}_\mathrm d-r_{01}^2\tilde d^{00}_\mathrm d
    \end{bmatrix}
  \end{aligned}
\end{equation}
where each block is a constant $n\times n$ matrix.

\section{Replica symmetric case}

We focus now on models whose equilibrium has at most one level of replica
symmetry breaking, which corresponds to a replica symmetric complexity.
For these models, the saddle point parameters for the reference stationary
point are well known, and take the values.
\begin{align}
  \hat\beta_0
  &=-\frac{(\epsilon_0+\mu_0)f'(1)+\epsilon_0f''(1)}{f(1)\big(f'(1)+f''(1)\big)-f'(1)^2}\\
  r_\mathrm d^{00}
  &=\frac{\mu_0f(1)+\epsilon_0f'(1)}{f(1)\big(f'(1)+f''(1)\big)-f'(1)^2} \\
  d_\mathrm d^{00}
  &=\frac1{f'(1)}
  -\left(
    \frac{\mu_0f(1)+\epsilon_0f'(1)}{f(1)\big(f'(1)+f''(1)\big)-f'(1)^2}
    \right)^2
\end{align}

$(r^{00}_\mathrm d)^2+d^{00}_\mathrm d=1/f'(1)$

Because the matrices $C^{00}$, $R^{00}$, and $D^{00}$ are diagonal in this case, the diagonals of the inverse block matrix from above are simple expressions:
\begin{align}
  \tilde c_\mathrm d^{00}=f'(1) &&
  \tilde r_\mathrm d^{00}=r^{00}_\mathrm df'(1) &&
  \tilde d_\mathrm d^{00}=d^{00}_\mathrm df'(1)
\end{align}


\begin{equation}
  \begin{aligned}
    &\Sigma_{12}=\mathcal D(\mu_1)-\frac12+\hat\beta_1E_1-r^{11}_\mathrm d\mu_1
    +\hat\beta_1\big(r^{11}_\mathrm df'(1)-r^{11}_0f'(q^{11}_0)\big)
    +\hat\beta_0\hat\beta_1f(q)+(\hat\beta_0r^{01}+\hat\beta_1r^{10}+r^{00}_\mathrm d r^{01})f'(q)
    \\
    &+\frac{r^{11}_\mathrm d-r^{11}_0}{1-q^{11}_0}(r^{10}-qr^{00}_\mathrm d)f'(q)+
    \frac12\Bigg\{
      \hat\beta_1^2\big(f(1)-f(q^{11}_{0})\big)
      +(r^{11}_\mathrm d)^2f''(1)+2r^{01}r^{10}f''(q)-(r^{11}_0)^2f''(q^{11}_0)
      \\
    &+\left(
      (r^{01})^2-\frac{r^{11}_\mathrm d-r^{11}_0}{1-q^{11}_0}\left(2qr^{01}-\frac{(1-q^2)r^{11}_0-(q^{11}_0-q^2)r^{11}_\mathrm d}{1-q^{11}_0}\right)
      \right)\big(f'(1)-f'(q_{22}^{(0)})\big) \\
    &+\frac{1-q^2}{1-q^{11}_0}+\frac{(r^{10}-qr^{00}_\mathrm d)^2}{1-q^{11}_0}f'(1)
    -\frac1{f'(1)}\frac{f'(1)^2-f'(q)^2}{f'(1)-f'(q^{11}_0)}
    +\frac{r^{11}_\mathrm d-r^{11}_0}{1-q^{11}_0}\big(r^{11}_\mathrm df'(1)-r^{11}_0f'(q^{11}_0)\big)
    \\
    &+\log\left(\frac{1-q_{11}^0}{f'(1)-f'(q_{11}^0)}\right)
    \Bigg\}
  \end{aligned}
\end{equation}

\subsection{Most common neighbors with given overlap}

\begin{align}
  \hat\beta_1=0 &&
  \mu_1=2r^{11}_\mathrm df''(1)
\end{align}

\begin{equation}
  \Sigma_{12}=\frac{f'''(1)}{8f''(1)^2}(4f''(1)-\mu_0^2)\left(\sqrt{2+\frac{2f''(1)(f''(1)-f'(1))}{f'''(1)f'(1)}}-1\right)(1-q)
  +O\big((1-q)^2\big)
\end{equation}
\begin{equation}
  E_0^*=-\frac{f'(1)^2+f(1)\big(f''(1)-f'(1)\big)}{2f''(1)f'(1)}\mu_0
\end{equation}
\begin{equation}
  \mu_1=\mu_0-\frac{f'(1)(f'''(1)+f''(1))-f''(1)^2}{f(1)(f'(1)+f''(1))-f'(1)^2}(E_0-E_0^*)(1-q)+O\big((1-q)^2\big)
\end{equation}
\begin{equation}
  E_1=E_0+\frac12\frac{f'(1)(f'''(1)+f''(1))-f''(1)^2}{f(1)(f'(1)+f''(1))-f'(1)^2}(E_0-E_0^*)(1-q)^2+O\big((1-q)^3\big)
\end{equation}

\section{Isolated eigenvalue}


\begin{align*}
  \beta F(\beta\mid\mathbf s)
  &=-\frac1N\log\left(\int d\mathbf x\,\delta(\mathbf x\cdot\mathbf s)\delta(N-\mathbf x\cdot\mathbf x)\exp\left\{
    -\beta\frac12\mathbf x^T\partial\partial H(\mathbf s)\mathbf x
  \right\}\right) \\
  &=-\lim_{\ell\to0}\frac1N\frac\partial{\partial\ell}\int\left[\prod_{\alpha=1}^\ell d\mathbf x_\alpha\,\delta(\mathbf x_\alpha^T\mathbf s)\delta(N-\mathbf x_\alpha^T\mathbf x_\alpha)\exp\left\{
    -\beta\frac12\mathbf x^T_\alpha\partial\partial H(\mathbf s)\mathbf x_\alpha
  \right\}\right]
\end{align*}
\begin{align*}
  F(\beta\mid E_1,\mu_1,q,\pmb\sigma)
  &=\int\frac{d\nu(\mathbf s\mid E_1,\mu_1)\delta(Nq-\pmb\sigma\cdot\mathbf s)}{\int d\nu(\mathbf s'\mid E_1,\mu_1)\delta(Nq-\pmb\sigma\cdot\mathbf s')}F(\beta\mid\mathbf s) \\
  &=\lim_{n\to0}\int\left[\prod_{a=1}^nd\nu(\mathbf s_a\mid E_1,\mu_1)\,\delta(Nq-\pmb\sigma\cdot\mathbf s_a)\right]F(\beta\mid\mathbf s_1)
\end{align*}
\[
  \begin{aligned}
    F(\beta\mid\epsilon_1,\mu_1,\epsilon_2,\mu_2,q)
    &=\int\frac{d\nu(\pmb\sigma\mid E_0,\mu_0)}{\int d\nu(\pmb\sigma'\mid E_0,\mu_0)}\,F(\beta\mid E_1,\mu_1,q,\pmb\sigma) \\
    &=\lim_{m\to0}\int\left[\prod_{a=1}^m d\nu(\pmb\sigma_a\mid E_0,\mu_0)\right]\,F(\beta\mid E_1,\mu_1,q,\pmb\sigma_1)
  \end{aligned}
\]
\begin{equation}
  \mathcal O(\mathbf t)=
  \sum_a^m\delta(\mathbf t-\pmb\sigma_a)(i\hat{\pmb\sigma}_a\cdot\partial_\mathbf t-\hat\beta_0)
  +
  \sum_b^n\delta(\mathbf t-\mathbf s_b)(i\hat{\mathbf s}_b\cdot\partial_\mathbf t-\hat\beta_1)
  -\frac12
  \delta(\mathbf t-\mathbf s_1)\beta\sum_c^\ell(\mathbf x_c\cdot\partial_{\mathbf t})^2
\end{equation}
\begin{align*}
  &\sum_{ab}^\ell(\mathbf x_a\cdot\partial_{\mathbf s_1})^2(\mathbf x_b\cdot\partial_{\mathbf s_1'})^2\overline{H(\mathbf s_1)H(\mathbf s_1')}\\
  &=(\mathbf x_a\cdot\mathbf s_1)^2(\mathbf x_b\cdot\mathbf s_1)^2f''''(1)
  +2(\mathbf x_a\cdot\mathbf s_1)(\mathbf x_b\cdot\mathbf s_1)(\mathbf x_a\cdot\mathbf x_b)f'''(1)
  +(\mathbf x_a\cdot\mathbf x_b)^2f''(1) \\
  &=\frac14\beta^2f''(1)\sum_{ab}^\ell A_{ab}^2
  =\frac14\beta^2f''(1)(1-a_0^2)
\end{align*}
\begin{align*}
  &\sum_{a}^\ell\sum_b^n(i\hat{\mathbf s}_{\mathbf s_b}\cdot\partial_b-\hat\beta_1)(\mathbf x_a\cdot\partial_{\mathbf s_1})^2\overline{H(\mathbf s_1)H(\mathbf s_b)}\\
  &=-\hat\beta_1(\mathbf x_a\cdot\mathbf s_b)^2f''(C^{11}_{1b})
  +i(\hat{\mathbf s}_b\cdot\mathbf s_1)(\mathbf x_a\cdot\mathbf s_b)^2f'''(C^{11}_{1b})
  +2i(\hat{\mathbf s}_b\cdot\mathbf x_a)(\mathbf x_a\cdot\mathbf s_b)f''(C^{11}_{1b}) \\
  &=
  \frac12\beta\sum_{a=1}^\ell\sum_{b=2}^n\left[
    \hat\beta_1(X^1_{ab})^2f''(C^{11}_{1b})+(X^1_{ab})^2R^{11}_{1b}f'''(C^{11}_{1b})
    +2X^1_{ab}\hat X_{ab}f''(C^{11}_{1b})
  \right] \\
  &=\frac12\beta\ell\left[\hat\beta_1x_1^2\sum_{b=2}^nf''(C^{11}_{1b})
    +x_1^2\sum_{b=2}^nR^{11}_{1b}f'''(C^{11}_{1b})
    +2x_1\hat x_1\sum_{b=2}^nf''(C^{11}_{1b})
  \right] \\
  &=-\frac12\beta\left[
    (\hat\beta_1f''(q^{11}_0)+r^{11}_0f'''(q^{11}_0))x_1^2+2f''(q^{11}_0)x_1\hat x_1
  \right]
\end{align*}
\begin{align*}
  &\sum_{a}^\ell\sum_b^m(i\hat{\pmb\sigma}_b\cdot\partial_b-\hat\beta_0)(\mathbf x_a\cdot\partial_{\mathbf s_1})^2\overline{H(\mathbf s_1)H(\pmb\sigma_b)}\\
  &=-\hat\beta_0(\mathbf x_a\cdot\pmb \sigma_b)^2f''(C^{01}_{1b})
  +i(\hat{\pmb \sigma}_b\cdot\pmb \sigma_1)(\mathbf x_a\cdot\pmb \sigma_b)^2f'''(C^{01}_{1b})
  +2i(\hat{\pmb \sigma}_b\cdot\mathbf x_a)(\mathbf x_a\cdot\pmb \sigma_b)f''(C^{01}_{1b}) \\
  &=
  \frac12\beta\sum_{a=1}^\ell\sum_{b=1}^m\left[
    \hat\beta_0(X^0_{ab})^2f''(C^{01}_{b1})
    +(X^0_{ab})^2R^{10}_{b1}f'''(C^{01}_{b1})
    +2X^0_{ab}\hat X^0_{ab}f''(C^{01}_{b1})
  \right] \\
  &=\frac12\beta\left[\big(\hat\beta_0f''(q)
    +r_{10}f'''(q)\big)x_0^2
    +2f''(q)x_0\hat x_0
  \right]
\end{align*}

\begin{align}
  &\log\det
    \begin{bmatrix}
      C^{00}&iR^{00}&C^{01}&iR^{01}&X_1\\
      iR^{00}&D^{00}&iR^{10}&D^{01}&\hat X_1\\
      C^{01})^T&iR^{10})^T&C^{11}&iR^{11}&X_2\\
      iR^{01})^T&D^{10})^T&iR^{11}&D^{11}&\hat X_2\\
      X_1)^T&\hat X_1)^T&X_2)^T&\hat X_2)^T&A
    \end{bmatrix}\\
  &=\log\det\left(
    A-
    \begin{bmatrix}
      X_1\\\hat X_1\\X_2\\\hat X_2
    \end{bmatrix})^T
    \begin{bmatrix}
      C^{00}&iR^{00}&C^{01}&iR^{01}\\
      iR^{00}&D^{00}&iR^{10}&D^{01}\\
      (C^{01})^T&(iR^{10})^T&C^{11}&iR^{11}\\
      (iR^{01})^T&(D^{10})^T&iR^{11}&D^{11}\\
    \end{bmatrix}^{-1}
    \begin{bmatrix}
      X_1\\\hat X_1\\X_2\\\hat X_2
    \end{bmatrix}
  \right)
\end{align}
\begin{equation}
  \begin{bmatrix}
    A & B \\
    C & D
  \end{bmatrix}
\end{equation}
\begin{equation}
    A=
    \left(
      \begin{bmatrix}
        C^{00}&iR^{00}\\iR^{00}&D^{00}
      \end{bmatrix}
      -
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}
      \begin{bmatrix}
        C^{11}&iR^{11}\\iR^{11}&D^{11}
      \end{bmatrix}^{-1}
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}^T
    \right)^{-1}
\end{equation}
\begin{align}
  \hat c^{11}=\sum_{ij}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}D^{11}]_{ij}\\
  \hat r^{11}=\sum_{ij}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}R^{11}]_{ij}\\
  \hat d^{11}=\sum_{ij}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}D^{11}]_{ij}
\end{align}
Based on the structure of the 01 matrices established above, the second term inside the inverse is
\begin{equation}
  \begin{aligned}
     &   \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix}
        \begin{bmatrix}
          C^{11}&iR^{11}\\iR^{11}&D^{11}
        \end{bmatrix}^{-1}
        \begin{bmatrix}
          C^{01}&iR^{01}\\iR^{10}&D^{01}
        \end{bmatrix}^T \\
    &\qquad=\begin{bmatrix}
      q^2\hat d^{11}+2qr_{10}\hat r^{11}-r_{10}^2\hat d^{11}
      &
      i\left[d_{01}(r_{10}\hat c^{11}-q\hat r^{11})+r_{01}(r_{10}\hat r^{11}+q\hat d^{11})\right]
      \\
      i\left[d_{01}(r_{10}\hat c^{11}-q\hat r^{11})+r_{01}(r_{10}\hat r^{11}+q\hat d^{11})\right]
      &
      d_{01}^2\hat c^{11}+2r_{01}d_{01}\hat r^{11}-r_{01}^2\hat d^{11}
    \end{bmatrix}
  \end{aligned}
\end{equation}
where each block is proportional to the $m\times m$ matrix
\begin{equation}
  \begin{bmatrix}
    1&0&\cdots&0\\
    0&0&\cdots&0\\
    \vdots&\vdots&\ddots&\vdots\\
    0&0&\cdots&0
  \end{bmatrix}
\end{equation}
which is \emph{not} a hierarchical matrix! But, all these new hat variables are proportional to $n$, and will vanish when the eventual limit is taken. So, the whole contribution is zero, and
\begin{equation}
    A=
      \begin{bmatrix}
        C^{00}&iR^{00}\\iR^{00}&D^{00}
      \end{bmatrix}^{-1}
\end{equation}
\begin{equation}
  B=-
      \begin{bmatrix}
        C^{00}&iR^{00}\\iR^{00}&D^{00}
      \end{bmatrix}^{-1}
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}
      \begin{bmatrix}
        C^{11}&iR^{11}\\iR^{11}&D^{11}
      \end{bmatrix}^{-1}
\end{equation}
\begin{equation}
    C=-
      \begin{bmatrix}
        C^{11}&iR^{11}\\iR^{11}&D^{11}
      \end{bmatrix}^{-1}
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}^T
      \begin{bmatrix}
        C^{00}&iR^{00}\\iR^{00}&D^{00}
      \end{bmatrix}^{-1}=B^T
\end{equation}
\begin{equation}
    D=
    \left(
      \begin{bmatrix}
        C^{11}&iR^{11}\\iR^{11}&D^{11}
      \end{bmatrix}
      -
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}^T
      \begin{bmatrix}
        C^{00}&iR^{00}\\iR^{00}&D^{00}
      \end{bmatrix}^{-1}
      \begin{bmatrix}
        C^{01}&iR^{01}\\
        iR^{10}&D^{01}
      \end{bmatrix}
    \right)^{-1}
\end{equation}

\begin{equation}
    \begin{bmatrix}
      X_0\\i\hat X_0
    \end{bmatrix}^TA
    \begin{bmatrix}
      X_0\\i\hat X_0
    \end{bmatrix}
    +
    2\begin{bmatrix}
      X_0\\i\hat X_0
    \end{bmatrix}^TB
    \begin{bmatrix}
      X_1\\i\hat X_1
    \end{bmatrix}
    +
    \begin{bmatrix}
      X_1\\i\hat X_1
    \end{bmatrix}^TD
    \begin{bmatrix}
      X_1\\i\hat X_1
    \end{bmatrix}
\end{equation}

\begin{align}
  X_0
  =
  \begin{subarray}{l}
    \hphantom{[}\begin{array}{ccc}\leftarrow&\ell&\rightarrow\end{array}\hphantom{\Bigg]}\\
  \left[
    \begin{array}{ccc}
      x_0&\cdots&x_0\\
      0&\cdots&0\\
      \vdots&\ddots&\vdots\\
      0&\cdots&0
    \end{array}
  \right]\begin{array}{c}
    \\\uparrow\\m-1\\\downarrow
  \end{array}\\
  \vphantom{\begin{array}{c}n\end{array}}
  \end{subarray}
  &&
  \hat X_0
  =
  \begin{subarray}{l}
    \hphantom{[}\begin{array}{ccc}\leftarrow&\ell&\rightarrow\end{array}\hphantom{\Bigg]}\\
  \left[
    \begin{array}{ccc}
      \hat x_0&\cdots&\hat x_0\\
      0&\cdots&0\\
      \vdots&\ddots&\vdots\\
      0&\cdots&0
    \end{array}
  \right]\begin{array}{c}
    \\\uparrow\\m-1\\\downarrow
  \end{array}\\
  \vphantom{\begin{array}{c}n\end{array}}
  \end{subarray}
  &&
  X_1
  =
  \begin{subarray}{l}
    \hphantom{[}\begin{array}{ccc}\leftarrow&\ell&\rightarrow\end{array}\hphantom{\Bigg]}\\
  \left[
    \begin{array}{ccc}
      0&\cdots&0\\
      x_1&\cdots&x_1\\
      \vdots&\ddots&\vdots\\
      x_1&\cdots&x_1
    \end{array}
  \right]\begin{array}{c}
    \\\uparrow\\n-1\\\downarrow
  \end{array}\\
  \vphantom{\begin{array}{c}n\end{array}}
  \end{subarray}
  &&
  \hat X_1
  =\begin{bmatrix}
    0&\cdots&0\\
    \hat x_1^1&\cdots&\hat x_1^1\\
    \vdots&\ddots&\vdots\\
    \hat x_1^1&\cdots&\hat x_1^1
  \end{bmatrix}
\end{align}

\[
  x_0^2\tilde d^{00}_\mathrm d-\hat x_0^2\tilde c^{00}_\mathrm d+2x\hat x\tilde r^{00}_\mathrm d
  -2
      \begin{bmatrix}
        x_0q\tilde d^{00}_\mathrm d+\hat x_0q\tilde r^{00}_\mathrm d+x_0r_{10}\tilde r^{00}_\mathrm d-\hat x_0r_{10}\tilde c^{00}_\mathrm d
        \\
        i(x_0(r_{01}\tilde d^{00}_\mathrm d-d_{01}\tilde d^{00}_\mathrm d)
        +\hat x_0(d_{01}\tilde c^{00}_\mathrm d+r_{01}\tilde r^{00}_\mathrm d))
      \end{bmatrix}^T
      \begin{bmatrix}
        C^{11}&iR^{11}\\iR^{11}&D^{11}
      \end{bmatrix}^{-1}
    \begin{bmatrix}
      X_1\\i\hat X_1
    \end{bmatrix}
\]
\begin{align}
  \hat c^{11}=\sum_{i}^n\sum_{j=2}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}D^{11}]_{ij}\\
  \hat r^{11}=\sum_{i}^n\sum_{j=2}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}R^{11}]_{ij}\\
  \hat d^{11}=\sum_{i}^n\sum_{j=2}^n[(C^{11}D^{11}+R^{11}R^{11})^{-1}D^{11}]_{ij}
\end{align}
\[
  \begin{aligned}
    &(\tilde d^{00}_\mathrm d\hat d^{11}q+\tilde r^{00}_\mathrm d\hat d^{11}r_{10}-\tilde r^{00}_\mathrm d\hat r^{11}d_{01}+\tilde d^{00}_\mathrm d\hat r^{11}r_{01})x_0x_1
    +(\tilde r^{00}_\mathrm d\hat d^{11}q-\tilde c^{00}_\mathrm d\hat d^{11}r_{10}+\tilde c^{00}_\mathrm d\hat r^{11}d_{01}+\tilde r^{00}_\mathrm d\hat r^{11}r_{01})\hat x_0x_1 \\
    &+(\tilde r^{00}_\mathrm d\hat c^{11}d_{01}-\tilde d^{00}_\mathrm d\hat c^{11}r_{01}+\tilde d^{00}_\mathrm d\hat r^{11}q+\tilde r^{00}_\mathrm d\hat r^{11}r_{10})x_0\hat x_1
    -(\tilde c^{00}_\mathrm d\hat c^{11}d_{01}+\tilde r^{00}_\mathrm d\hat c^{11}r_{01}-\tilde r^{00}_\mathrm d\hat c^{11}q+\tilde c^{00}_\mathrm d\hat r^{11}r_{10})\hat x_0\hat x_1
  \end{aligned}
\]
all a constant $\ell\times\ell$ matrix.

\[
  \log\det(A-c)=\log\det A-\frac{c}{\sum_{i=0}^k(a_{i+1}-a_i)x_{i+1}}
\]
where $a_{k+1}=1$ and $x_{k+1}=1$.
So the basic form of the action is (for replica symmetric $A$)
\[
  \frac14\beta^2f''(1)(1-a_0^2)+\frac12\log(1-a_0)+\frac12\frac{a_0}{1-a_0}+\frac12\beta\begin{bmatrix}x_0\\\hat x_0\\x_1\\\hat x_1\end{bmatrix}^TB\begin{bmatrix}x_0\\\hat x_0\\x_1\\\hat x_1\end{bmatrix}-\frac1{1-a_0}\frac12\begin{bmatrix}x_0\\\hat x_0\\x_1\\\hat x_1\end{bmatrix}^TC\begin{bmatrix}x_0\\\hat x_0\\x_1\\\hat x_1\end{bmatrix}
\]
for
\[
  B=\begin{bmatrix}
    \hat\beta_0f''(q)+r_{10}f'''(q)&f''(q)&0&0\\
    f''(q)&0&0&0\\
    0&0&-\hat\beta_1f''(q^{11}_0)-r^{11}_0f'''(q^{11}_0)&-f''(q_0^{11})\\
    0&0&-f''(q_0^{11})&0
  \end{bmatrix}
\]
Use $X$ for the big vector. Then
\[
  0=-\beta^2f''(1)a_0+\frac{a_0-X^TCX}{(1-a_0)^2}
\]
\[
  0=\bigg(\beta B-\frac1{1-a_0}C\bigg)X
\]
For a non-trivial solution, we require the following: change of basis in $X$ to diagonalize the matrix $\beta B-C/(1-a_0)$. Then, all of the new basis vectors of $X$ are zero except one, and the second equation is satisfied by tuning $a_0$ to make the coefficient zero. Finally, the first equation is satisfied by choice of the magnitude of this basis vector.
Suppose $a_0=1-1/(y\beta)$, $X\sim X+O(1/\beta)$. Then
\[
  0=-f''(1)(1-(y\beta)^{-1})+y^2\left(1-(y\beta)^{-1}-X^TCX\right)
\]
For large $\beta$
\[
  0=-f''(1)+y^2(1-X^TCX)
\]
\[
  0=(B-yC)X
\]
which gives
\[
  \mathcal S=\frac14\beta^2f''(1)\big(2(y\beta)^{-1}-(y\beta)^{-2}\big)-\frac12\log(y\beta)+\frac12y\beta(1-(y\beta)^{-1})+\frac12\beta X^TBX-\frac12y\beta X^TCX
\]
so
\[
  E_{gs}=\lim_{\beta\to\infty}(\mathcal S/\beta)=\frac12\left(y+\frac1yf''(1)\right)+\frac12X^T(B-yC)X
  =\frac12\left(y+\frac1yf''(1)\right)
\]
assuming the last equation is satisfied. The trivial solution, which gives the bottom of the semicircle, is for $X=0$, so the first equation is $y^2=f''(1)$, and
\[
  E_{gs}=-\sqrt{f''(1)}
\]
as expected. We need to first the nontrivial solutions with nonzero $X$, but because the coefficients are so nasty this will be a numeric problem... Specifically, we are good for $y$ where one of the eigenvalues of $B-yC$ is zero.

\paragraph{Acknowledgements}

\paragraph{Funding information}

\printbibliography

\end{document}
