\documentclass[11pt]{amsart} \pdfoutput=1 %\usepackage[text={420pt,660pt},centering]{geometry} \usepackage{amsmath} % I added this package to use \tag{}. \allowdisplaybreaks % allow a single display equation to naturally break across two pages \usepackage[foot]{amsaddr} %\usepackage{color} \usepackage{appendix} \usepackage{cancel} \usepackage{esint,amssymb} \usepackage{graphicx} \usepackage{MnSymbol} \usepackage{mathtools} %\usepackage{stmaryrd} % for the integer intervals \usepackage{xcolor} \usepackage[colorlinks=true, pdfstartview=FitV, linkcolor=blue, citecolor=blue, urlcolor=blue,pagebackref=false]{hyperref} \usepackage{orcidlink} \usepackage{microtype} \newcommand\hmmax{0} \newcommand\bmmax{0} \usepackage{bm} \usepackage{dsfont} \usepackage{mathrsfs} \usepackage{enumitem} %\usepackage[notcite,notref,color]{showkeys} %comment this to remove the lablels next to each \label{...} on the pdf; need to place this after xcolor/color %\usepackage{refcheck} %for finding unused ref. When enabling this, better to disable the package {showkeys} \parskip= 2pt %\usepackage[normalem]{ulem} %\usepackage{booktabs} % nice tables %\setcounter{tocdepth}{2} \definecolor{darkgreen}{rgb}{0,0.5,0} \definecolor{darkblue}{rgb}{0,0,0.7} \definecolor{darkred}{rgb}{0.9,0.1,0.1} \newcommand{\hbccomment}[1]{\marginpar{\raggedright\scriptsize{\textcolor{darkred}{#1}}}} \newcommand{\hbc}[1]{{\color{darkred}{#1}}} \newcommand{\viccomment}[1]{\marginpar{\raggedright\scriptsize{\textcolor{darkblue}{#1}}}} \newcommand{\vic}[1]{{\color{darkblue}{#1}}} \newcommand{\rmk}[1]{{\color{cyan}{#1}}} \newtheorem{proposition}{Proposition} \newtheorem{theorem}[proposition]{Theorem} \newtheorem{lemma}[proposition]{Lemma} \newtheorem{corollary}[proposition]{Corollary} \newtheorem{claim}[proposition]{Claim} \newtheorem{conjecture}[proposition]{Conjecture} \theoremstyle{remark} \newtheorem{remark}[proposition]{Remark} \newtheorem{example}[proposition]{Example} \theoremstyle{definition} \newtheorem{definition}[proposition]{Definition} \newtheorem{question}{Question} \newtheorem{hypothesis}[proposition]{Hypothesis} \numberwithin{equation}{section} \numberwithin{proposition}{section} \numberwithin{figure}{section} \numberwithin{table}{section} %\numberwithin{theorem}{document} \let\oldH=\H \newcommand{\Z}{\mathbb{Z}} \newcommand{\N}{\mathbb{N}} \newcommand{\Q}{\mathbb{Q}} \newcommand{\R}{\mathbb{R}} \newcommand{\Zd}{{\mathbb{Z}^d}} \newcommand{\Rd}{{\mathbb{R}^d}} \newcommand{\E}{\mathbb{E}} \renewcommand{\P}{\mathbb{P}} \newcommand{\EE}{\mathbf{E}} \newcommand{\PP}{\mathbf{P}} \newcommand{\F}{\mathcal{F}} \renewcommand{\le}{\leqslant} \renewcommand{\ge}{\geqslant} \renewcommand{\leq}{\leqslant} \renewcommand{\geq}{\geqslant} \newcommand{\ls}{\lesssim} \renewcommand{\subset}{\subseteq} \renewcommand{\bar}{\overline} \renewcommand{\tilde}{\widetilde} \newcommand{\td}{\widetilde} %\renewcommand{\hat}{\widehat} \newcommand{\un}{\underline} \newcommand{\Ll}{\left} \newcommand{\Rr}{\right} \renewcommand{\d}{\mathrm{d}} \newcommand{\dr}{\partial} \renewcommand{\fint}{\strokedint} \newcommand{\1}{\mathbf{1}} \newcommand{\tsp}{\intercal} \newcommand{\mcl}{\mathcal} \newcommand{\msf}{\mathsf} \newcommand{\mfk}{\mathfrak} \newcommand{\msc}{\mathscr} \newcommand{\mbf}{\mathbf} \newcommand{\al}{\alpha} \newcommand{\be}{\beta} \newcommand{\ga}{\gamma} \newcommand{\de}{\delta} \newcommand{\ep}{\varepsilon} \newcommand{\eps}{\varepsilon} \newcommand{\si}{\sigma} %%%%%%%% [Begin] customized symbols %%%%%%%% \newcommand{\la}{\left\langle} \newcommand{\ra}{\right\rangle} \renewcommand{\ae}{{a.e.\ }} \newcommand{\Id}{\mathsf{Id}} \newcommand{\id}{\mathsf{id}} \newcommand{\D}{{\mathrm{D}}} \renewcommand{\S}{\mathrm{S}} \newcommand{\ellipt}{\mathsf{Ellipt}} %%%%%%%% [End] customized symbols %%%%%%%% \DeclareMathOperator{\dist}{dist} \DeclareMathOperator{\diam}{diam} \DeclareMathOperator{\tr}{tr} \DeclareMathOperator{\supp}{supp} \DeclareMathOperator{\sign}{sign} %\newcommand{\var}{\mathbb{V}\mathrm{ar}} \newcommand{\upa}{\uparrow} \newcommand{\cF}{F} \newcommand{\bx}{{\mathbf{x}}} \newcommand{\bff}{{\mathbf{f}}} \newcommand{\cav}{\circ} \newcommand{\fR}{\mathfrak{R}} \newcommand{\scdot}{\,\cdot\,} % \cdot with space as placeholder for arguments in functions or measures. \newcommand{\sfr}{{\mathsf{r}}} \newcommand{\sfp}{{\mathsf{p}}} \newcommand{\sfq}{{\mathsf{q}}} \newcommand{\sfs}{{\mathsf{s}}} \newcommand{\sS}{\mathscr{S}} \newcommand{\s}{{\mathsf{s}}} \newenvironment{e}{\begin{equation}}{\end{equation}\ignorespacesafterend} \newenvironment{e*}{\begin{equation*}}{\end{equation*}\ignorespacesafterend} %\newcommand{\la}{\left\langle} %\newcommand{\ra}{\right\rangle} %\newcommand{\prog}{\mathsf{Prog}} %\newcommand{\mart}{\mathsf{Mart}} %\newcommand{\bprog}{\mathbf{Prog}} %\newcommand{\bmart}{\mathbf{Mart}} %% The averaged sum notation %\newcommand{\avsum}{\mathop{\mathpalette\avsuminner\relax}\displaylimits} %\makeatletter %\newcommand\avsuminner[2]{% % {\sbox0{$\m@th#1\sum$}% % \vphantom{\usebox0}% % \ooalign{% % \hidewidth % \smash{\rule[.5ex]{1.5ex}{.8pt} \relax}% % \hidewidth\cr % $\m@th#1\sum$\cr % }% % }% %} %\makeatother % % % % % \begin{document} \author{Hong-Bin Chen\,\orcidlink{0000-0001-6412-0800}} \address[Hong-Bin Chen]{NYU-ECNU Institute of Mathematical Sciences, NYU Shanghai, China} \email{\href{mailto:hongbin.chen@nyu.edu}{hongbin.chen@nyu.edu}} \author{Victor Issa\,\orcidlink{0009-0009-1304-046X}} \address[Victor Issa]{Department of Mathematics, ENS Lyon, France} \email{\href{mailto:victor.issa@ens-lyon.fr}{victor.issa@ens-lyon.fr}} %\keywords{Disordered systems, Large deviation principles, Spin glasses, Hamilton--Jacobi equations} %\subjclass[2020]{82B44, % Disordered systems % 60F10, % Large deviations, % 35F21% HJ % } %\title[Convex vector spin glasses with Mattis-type interaction]{Free energy of convex vector spin glasses with Mattis-type interaction} \title[Convex vector spin glasses with Mattis interaction]{Vector spin glasses with Mattis interaction I: the convex case} \begin{abstract} This paper constitutes the first part of a two-paper series devoted to the systematic study of vector spin glass models whose energy function involves a spin glass part and a general Mattis interaction part. In this paper, we focus on models whose spin glass part satisfies the usual convexity assumption. %Our approach relies on Hamilton--Jacobi equations and allows for model-independent proofs. We identify the limit free energy via a Parisi-type formula and prove a large deviation principle for the mean magnetization. The proof is remarkably simple and short compared to previous approaches; it relies on treating the Mattis interaction as a parameter of the model. % Thanks to the generality of our approach, once the free energy of a large class of models with general Mattis interaction has been identified, the proof of the large deviation principle is especially simple and follows from the duality between the free energy and large deviation principles. In the companion paper \cite{MattisII}, we establish similar results in the high-temperature regime for models whose spin glass part is not assumed to satisfy the usual convexity assumption. \bigskip \noindent \textsc{Keywords and phrases: Disordered systems, Large deviation principles, Spin glasses.} \medskip \noindent \textsc{MSC 2020: 82B44, % Disordered systems 60F10, % Large deviations, 35F21.% HJ } \end{abstract} \maketitle %\newpage \setcounter{tocdepth}{1} \thispagestyle{empty} { \hypersetup{linkcolor=black} \setcounter{tocdepth}{1} \tableofcontents } %\newpage %\pagenumbering{arabic} \section{Introduction} \subsection{Preamble} This paper is the first of a two-part series in which we investigate general mean-field spin glass models with Mattis interaction. In this paper, we focus on models whose spin glass part satisfies the usual convexity assumption \eqref{e.convexity}. %\footnote{By the usual convexity assumption, we mean the assumption that the function $\xi: \R^{D \times D} \to \R$ defined below in \eqref{e.cov}, is convex on the set of symmetric positive semi-definite matrices.} A simple instance of those models is given by a system of $\pm 1$ spins interacting through the energy function % \begin{equation} \label{e.simple} E_N(\sigma) = \frac{\beta}{\sqrt{N}} \sum_{i,j = 1}^N W_{ij} \sigma_i \sigma_j + \left( \frac{1}{\sqrt{N}}\sum_{i = 1}^N \chi_i \sigma_i \right)^2, \qquad \forall \sigma \in \{-1,1\}^N, \end{equation} % where $(W_{i,j})_{1 \leq i,j \leq N}$ are independent centered gaussian random variables with variance $1$ and $(\chi_i)_{1 \leq i \leq N}$ are centered $\pm 1$ random variables. Our investigation is motivated in part by the study of statistical inference problems with mismatched prior and noise. In modern statistical inference, many high-dimensional estimation problems, such as recovering a low-rank signal from noisy observations, can be formulated in terms of energy-based models. In particular, when the assumed prior on the signal or the noise distribution used by the estimator does not match the true generative model, the resulting posterior landscape behaves like a generalized Sherrington--Kirkpatrick spin glass with additional Mattis interaction \cite{barbier2025mismatchlinear,barbier2022priceofignorance,krzakala2016thresholds,macris2022mismatched,chen2014mixedSK,camilli2022mismatch}. Roughly speaking, the idea is that %The work shows that for rank-one matrix estimation with a mismatched prior and noise, for inference problems with mismatched prior and noise, one can reduce the computation of the mutual information in the statistical problem to the computation of the free energy of a modified spin glass model similar to \eqref{e.simple} and derive asymptotic formulas for the mutual information and overlaps (order parameters) that characterize estimator performance. This connection provides rigorous large deviation principles for key quantities, such as overlaps between the estimate and the true signal. %a quantity also known as the Franz-Parisi potential in the literature \cite{bandeira2022franzparisi,franz2020largedeviations}. In this series of papers~\cite{MattisI,MattisII}, our interest is twofold. First, we prove variational formulas for the large $N$ limit of the free energy defined by % \begin{equation*} % \label{e.F_Nbasic} f_N = -\frac{1}{N} \log \left( \frac{1}{2^N} \sum_{\sigma \in \{-1,1\}^N} e^{E_N(\sigma)} \right). \end{equation*} % Second, we establish large deviation principles for the mean magnetization % \begin{e*} m_N = \frac{1}{N} \sum_{i = 1}^N \chi_i \sigma_i \end{e*} % under the Gibbs measure $\langle \cdot \rangle_N$ defined by % \begin{equation*} \langle g(\sigma) \rangle_N \propto \frac{1}{2^N} \sum_{\sigma \in \{-1,1\}^N} g(\sigma) e^{E_N(\sigma)}. \end{equation*} % % In this paper, we focus on models whose spin glass part satisfies a certain classical convexity assumption (see \eqref{e.convexity} below) while in the companion paper~\cite{MattisII}, we do not rely on this convexity assumption and establish similar results in the high temperature regime ($\beta$ smaller than some constant). Our main results are stated for very general models in Theorem~\ref{t.F_N(...)} and Theorem~\ref{t.LDP_gen}. Here we state a specialized version of those results for the model defined by \eqref{e.simple}, which is an instance of a model satisfying the convexity assumption \eqref{e.convexity} defined below. The definition of the function $\psi = \psi(q;x)$ appearing in this statement is given below in \eqref{e.psi(q;x)=}. \begin{theorem}\label{t.parisi+ldp.basic} Almost surely over the randomness of $(W_{i,j})_{i,j}$ and $(\chi_i)_i$, we have % \begin{e*} \lim_{N \to +\infty} f_N = \inf_{m} \sup_{x,p} \left\{ \psi(\beta^2 p;x) - \frac{\beta^2}{2} \int_0^1 p(s)^2 \d s + m x - m^2 - \frac{\beta^2}{2}\right\}, \end{e*} % where the infimum is taken over $m \in \R$ and the supremum over $x \in \R$ and $p : [0,1) \to \R_+$ bounded increasing càdlàg paths. Furthermore, still almost surely over the randomness of $(W_{i,j})_{i,j}$ and $(\chi_i)_i$, the random variable $m_N$ satisfies a large deviation principle under $\langle \cdot \rangle_N$ with rate function % \begin{e*} J(m) = -m^2 + \phi^*(m) + \sup_{m' \in \R} \left\{(m')^2 - \phi^*(m') \right\}. \end{e*} % Here $\phi^*(m) = \sup_{x \in \R} \left\{xm + \phi(x)\right\}$ and $\phi(x)$ is the almost sure limit as $N \to +\infty$ of the free energy $f_N$ where the term $\left( \frac{1}{\sqrt{N}}\sum_{i = 1}^N \chi_i \sigma_i \right)^2$ in $E_N$ is replaced by $ x \sum_{i = 1}^N \chi_i \sigma_i$. \end{theorem} Note that as a consequence of Theorem~\ref{t.F_N(...)} below, the quantity $\phi(x)$ used to define the rate function $J$ can be expressed as a variational formula. For models satisfying the aforementioned convexity assumption \eqref{e.convexity}, computing the free energy in the absence of Mattis interaction is a classical problem, and it is now well known that the limit of the free energy can be understood as the supremum of an explicit functional, this is the celebrated Parisi formula \cite{parisi1979infinite,gue03,Tpaper}. The free energy can also be studied from the perspective of Hamilton--Jacobi equations, which was initiated in~\cite{guerra2001sum} and followed by~\cite{barra2,abarra,barramulti,barra2014quantum,barra2008mean,genovese2009mechanical}. Recently, a more systematic and general treatment through the prism of Hamilton--Jacobi equations was proposed in \cite{mourrat2019parisi,mourrat2020free,HJbook}, the progress of which is summarized in~\cite{mourrat2025spin}. On the other hand, models with Mattis interaction have not yet received a similar systematic treatment. The identification of their free energy relies on model-dependent proofs. Furthermore, especially in cases where authors are interested in large deviation principles for the mean magnetization, the proofs involve computing a constrained version of the free energy defined by % \begin{equation*} f_N(A) = -\frac{1}{N} \log \left( \frac{1}{2^N} \sum_{\sigma \in A} e^{E_N(\sigma)} \right). \end{equation*} % The proofs can sometimes be long and technical \cite{guionnet2025estimating,franz2020largedeviations,camilli2022mismatch,pan.vec,chen2014mixedSK}. % \cite{guionnet2025estimating,franz2020largedeviations,camilli2022mismatch,lelarge2017lowrank,erba2024maxavgsubmatrix} Similar techniques have also been employed to prove large deviation principles for the overlap parameter in the context of classical spin glass models \cite{jagannath2018spectralgap,jagannath2020tensorpca}, also see \cite{ko2020multiplespherical} %jagannath2016dynamic for related content. For spin glass models with additional Mattis interaction, there are no known general results that allow for a systematic identification of the free energy, nor the verification of large deviation principles for the mean magnetization. In this series of papers, we resolve this problem and establish systematic results using a new approach that relies on the computation of the following object % \begin{equation*} f_N^G = -\frac{1}{N} \log \left( \frac{1}{2^N} \sum_{\sigma \in \{-1,1\}^N} \exp\left(\frac{\beta}{\sqrt{N}} \sum_{i,j = 1}^N W_{ij} \sigma_i \sigma_j + NG(m_N) \right) \right). \end{equation*} % The main difference in our approach is that the continuous function $G$ encoding the Mattis interaction is now treated as a \emph{parameter of the model} instead of being fixed. Furthermore, as opposed to the traditional approach, we do not impose constraints on the spin configuration $\sigma$. This allows for smoother, shorter, and less technical computations that one can carry out in a model-independent way. Our main theorems cover many previous model-specific results. For example, this includes \cite[Theorems 2.6 \& 2.7]{guionnet2025estimating}, \cite[Theorem~1]{camilli2022mismatch}, and \cite[Theorem~1]{chen2014mixedSK}. We start with the case $G(m) = xm$, where the sum structure of $N G(m_N) = x \sum_{i = 1}^N \chi_i \sigma_i$ allows for the computation of $\phi(x) = \lim_{N \to +\infty} f_N^{m \mapsto xm}$ using very classical arguments similar to those needed to establish the Parisi formula with essentially no modification. Then, we verify that $\phi$ is a continuously differentiable function of $x$. This ensures, through the Gärtner--Ellis theorem, that $m_N$ satisfies a large deviation principle under $\langle \cdot \rangle^0_N$. Varadhan's lemma then allows us to compute the large $N$ limit of $\frac{1}{N} \log \langle e^{NG(m_N)}\rangle^0_N$ for all continuous functions $G$. From this, we deduce a large deviation principle for $m_N$ under $\langle \cdot \rangle^G_N$ and an expression for $\lim_{N \to +\infty} f_N^G$. For the first part, this is a direct consequence of Bryc's inverse Varadhan lemma, and the second part follows by observing that % \begin{e*} \frac{1}{N} \log \langle e^{NG(m_N)}\rangle^0_N = -f_N^G + f_N^0. \end{e*} % Once this is done, one can recover Theorem~\ref{t.parisi+ldp.basic} by setting $G(m) = m^2$. % We will see in detail below that the computation of $\lim_{N \to +\infty} f_N^G$ can be done systematically for a very large class of spin glass models. This, in turn, leads to the identification of the free energy as defined in \eqref{e.F_Nbasic} and suffices for the verification of a large deviation principle for the mean magnetization. % To compute $\lim_{N \to +\infty} f_N^G$, we can proceed as follows. We start with the case $G(m) = xm$, where the sum structure of $N G(m_N) = x \sum_{i = 1}^N \chi_i \sigma_i$ allows for the computation of $\phi(x) = \lim_{N \to +\infty} f_N^{m \mapsto xm}$ using very classical arguments similar to those needed to establish the Parisi formula with essentially no modification. To compute the free energy for general $G$, we will then observe that $(s,x) \mapsto f_N^{m \mapsto sG(m) + xm}$ converges as $N \to +\infty$ to the solution of a partial differential equation of Hamilton--Jacobi type. Thanks to this, $\lim_{N \to +\infty} f_N^G$ can be understood as the value at $(s,x) = (1,0)$ of the solution of a partial differential equation with initial condition $x \mapsto \lim_{N \to +\infty} f_N^{m \mapsto x \cdot m}$ and from this we obtain the desired variational formula. % Once the limit $\lim_{N \to +\infty} f_N^G$ has been identified, we can recover the free energy \eqref{e.F_Nbasic} by setting $G(m) = m^2$. To establish the large deviation principle for $m_N$ under the Gibbs measure, we observe that the computation of $\lim_{N \to +\infty} f_N^G$ in particular yields a computation of the limit as $N \to +\infty$ of % % % \begin{e*} % \frac{1}{N} \log \langle e^{N G(m_N)} \rangle_N = f_N^{G} - f_N^{0}, % \end{e*} % % % for every continuous function $G$. The large deviation principle then directly follows from an application of Bryc's inverse Varadhan lemma. \subsection{Setting} \label{ss.setting} In this section, we give a definition of the class of models that we treat. For $m,n\in\N$, we denote by $\R^{m\times n}$ the space of all $m\times n$ real matrices. For any $a=(a_{ij})_{1\leq i\leq m,\, 1\leq j\leq n}\in \R^{m\times n}$, we denote its $j$-th column vector as $a_{\bullet j}=(a_{ij})_{1\leq i\leq m}$ and its $i$-th row vector as $a_{i\bullet}=(a_{ij})_{1\leq j\leq n}$. If not specified, a vector is understood to be a column vector. For a matrix or vector $a$, we denote by $a^\intercal$ its transpose. For $a,b\in \R^{m\times n}$, we write $a\cdot b= \sum_{ij}a_{ij}b_{ij}$, $|a|=\sqrt{a\cdot a}$, and similarly for vectors. %More generally, for any $k \in \N$ and $a,b\in \R^k$, we write %\begin{align}\label{e.dot_product} % a\cdot b=\sum_{i= 1}^k a_ib_i \qquad\text{and}\qquad |a|=\sqrt{a\cdot a}. %\end{align} For $n\in \N$, let $\S^n$ be the linear space of $n\times n$ real symmetric matrices %For $a,b\in\S^n$, viewing them as elements in $\R^{n\times n}$, we write $a\cdot b= \sum_{ij}a_{ij}b_{ij}$ and $|a|=\sqrt{a\cdot a}$. and also let $\S^n_+$ (resp.\ $\S^n_{++}$) be the subset consisting of positive semi-definite (resp.\ definite) matrices. For $a,b \in \S^n$, we write $a\geq b$ provided $a-b\in\S^n_+$, which gives a natural partial order on $\S^n$. We start by defining the spin glass part of the model. Let $D\in\N$ be the dimension of a single spin. Let $P_1$ be a finite positive measure supported on the unit ball $\Ll\{\tau\in\R^D:\:|\tau|\leq1\Rr\}$ of $\R^D$ and we assume that the linear span of vectors in $\supp P_1$ is $\R^D$. For each $N\in\N$, we denote by $\sigma =(\sigma_{\bullet i})_{i=1}^N =(\sigma_{di})_{1\leq d\leq D, \, 1\leq i\leq N}\in\R^{D\times N}$ the spin configuration consisting of $N$ $\R^D$-valued spins $\sigma_{\bullet i}$ as column vectors. We view $\sigma$ as a $D\times N$ matrix. We sample each spin independently from $P_1$, and thus the distribution of $\sigma$ is given by % \begin{e*} \d P_1^{\otimes N}(\sigma)= \otimes_{i=1}^N \d P_1( \sigma_{\bullet i}). \end{e*} % We let $\xi:\R^{D\times D}\to \R$ be a smooth function that can be expressed as a power series, %with non-negative coefficients, and we assume that % \begin{equation}\label{e.convexity} %\tag{H1} \text{the function $\xi$ is convex on $S^D_+$.} \end{equation} % For each $N$, we consider a centered Gaussian field $(H_N(\sigma))_{\sigma\in\R^{D\times N}}$ with covariance structure given by \begin{e}\label{e.cov} \E \Ll[H_N(\sigma)H_N(\sigma')\Rr] = N \xi \Ll( \tfrac{\sigma\sigma'^\intercal}{N}\Rr),\qquad\forall \sigma,\sigma'\in \R^{D\times N}. \end{e} % We also define $\theta:\R^{D\times D}\to\R$ by \begin{align}\label{e.theta=} \theta (a) = a\cdot\nabla\xi(a)-\xi(a),\quad\forall a\in\R^{D\times D}. \end{align} We now describe the Mattis interaction part of the model. Let $L\in\N$ and let $(\chi_i)_{i\in\N}$ be i.i.d.\ $\R^L$-valued random vectors, which are, in particular, independent from $H_N(\sigma)$. Let $d\in\N$ and $h:\R^D\times \R^L \to \R^d$ be a bounded\footnote{Throughout it will be enough to assume that $h$ is bounded on the support of the positive measure $P_1 \otimes \text{Law}(\chi_1)$. } measurable function. For each $i\in\N$, we view $h(\sigma_{\bullet i},\chi_i)$ as a generalized spin and define the mean magnetization \begin{align}\label{e.m_N=} m_N = \frac{1}{N}\sum_{i=1}^N h(\sigma_{\bullet i},\chi_i). \end{align} Let $G:\R^d\to\R$ be a continuous function, and we add to the system the Curie--Weiss-type interaction $NG\Ll(m_N\Rr)$. At this point, we have described the spin glass part and the Mattis interaction part of our energy function. As explained in the introduction, recently a new approach has been put forward to describe the free energy of spin glass models (without Mattis interaction). In this approach, one needs to enrich the model by adding several new parameters. This more sophisticated object plays a key role in our companion paper~\cite{MattisII}, so we will work with this one in the present paper as well. In order to stick to the classical setting, the reader not interested in this enriched version of the model can throughout the paper choose the parameter $q$ to be the constant path taking the value $0$ and set $t = \beta^2/2$. To define the enriched version of the model, we need to add external fields parameterized by increasing paths and driven by Poisson--Dirichlet cascades. Let $\mcl Q_\infty$ be the collection of bounded increasing càdlàg paths $q:[0,1) \to \S^D_+$, where the monotonicity is understood as $q(s)-q(s')\in\S^D_+$ for $s>s'$. Throughout, given $q \in \mcl Q_\infty$, we will define % \begin{e*} q(1) = \lim_{s \to 1^-} q(s), \end{e*} which is well-defined by monotonicity of $q$. %For $\sfp\in[0,\infty]$, we write $\mcl Q_\sfp = \mcl Q\cap L^\sfp([0,1);\S^D)$. The monotonicity also allows us to define $q(1)=\lim_{s\uparrow1}q(s)$ for every $q\in\mcl Q_\infty$. Throughout, let $\fR$ be the Ruelle probability cascade (RPC) with overlap uniformly distributed over $[0,1]$ (see \cite[Theorem~2.17]{pan}). Precisely, $\fR$ is a random probability measure on the unit sphere of a fixed separable Hilbert space (the exact form of the space is not important), with the inner product denoted by $\alpha\wedge\alpha'$. Let $\alpha$ and $\alpha'$ be independent samples from $\fR$. Then, the law of $\alpha\wedge\alpha'$ under $\E \fR^{\otimes 2}$ is the uniform distribution over $[0,1]$, where $\E$ integrates the randomness of $\fR$. This overlap distribution uniquely determines $\fR$ (see~\cite[Theorem~2.13]{pan}). Almost surely, the support of $\fR$ is ultrametric in the induced topology. For rigorous definitions and basic properties, we refer to \cite[Chapter 2]{pan} (also see \cite[Chapter 5]{HJbook}). We also refer to~\cite[Section~4]{chenmourrat2023cavity} for the construction and properties of $\fR$ useful in this work. For $q\in\mcl Q_\infty$ and almost every realization of $\fR$, let $(w^q(\alpha))_{\alpha\in\supp\fR}$ be the $\R^D$-valued centered Gaussian process with covariance \begin{align}\label{e.Ew^qw^q=} \E\Ll[ w^q (\alpha)w^q(\alpha')^\intercal\Rr] = q(\alpha\wedge\alpha'). \end{align} Its existence and properties are given in~\cite[Section~4]{chenmourrat2023cavity}. Conditioned on $\fR$, let $(w^q_i)_{i\in\N}$ be i.i.d.\ copies of $w^q$ and also independent of other randomness. For $N\in \N$, $q\in \mcl Q_\infty$, $t \geq 0$, the full energy function of the system will be chosen to be \begin{align} \label{e.H^q,x_N(sigma,alpha,chi)=} \begin{split} H^{G}_N(\sigma,\alpha) &= N G(m_N) + \sqrt{2t} H_N(\sigma) - Nt \xi\Ll(\tfrac{\sigma\sigma^\intercal}{N}\Rr) \\ &+ \sum_{i=1}^N w^q_i(\alpha)\cdot \sigma_{\bullet i} -\tfrac{1}{2} q(1)\cdot\sigma\sigma^\intercal. \end{split} \end{align} % We are interested in the infinite-volume limit of the associated free energy defined as % \begin{align}\label{e.F_N(beta)} F_N^G = -\frac{1}{N} \log \iint \exp\Ll(H_N^{G}(\sigma,\alpha) \Rr) \d P_1^{\otimes N}(\sigma) \d \mfk R(\alpha). \end{align} % In principle, $H_N^G$ and $F_N^G$ depend on the choice of $t$ and $q$. Throughout this paper, we will keep those parameters fixed so we do not make this dependence explicitly appear in our notations for $H_N^G$ and $F_N^G$. % In this paper we choose to define the free energy as $\msc F_N = + \frac{1}{N} \log(\dots)$ while in the companion paper~\cite{MattisII} we will use the other sign convention and define $F_N = - \frac{1}{N} \log(\dots)$. In an attempt to minimize confusion we use calligraphic letters to denote the former and plain capital letters to denote the latter. The reason for this discrepancy is that two different types of Hamilton--Jacobi equations appear in this series. First there is the equation used to deal with the Mattis interaction $G(m_N)$ (see \eqref{e.hj_cF}) and then there is the equation used to deal with the spin glass part (see \te) in the companion paper~\cite{MattisII}. Unfortunately, in order to have nice expressions, those equations each require a different sign convention for the free energy. As is explained in full detail in Section~\ref{ss.usual}, usual models such as \eqref{e.simple} can be obtained as special cases of the Hamiltonian $H_N^G$. Briefly, to do so one can set $t = \beta^2/2$ and $q = 0$ and make a wise choice for $G$ in order to absorb $- \tfrac{N\beta^2}{2}\xi\Ll(\tfrac{\sigma\sigma^\intercal}{N}\Rr)$ in the Mattis interaction. Here, we have chosen to introduce the correction terms $Nt \xi\Ll(\sigma\sigma^\intercal/N\Rr)$ and $\frac{1}{2}q(1)\cdot\sigma\sigma^\intercal$ as a convenience to simplify the forthcoming variational formulas. As explained in Section~\ref{ss.usual}, they are easily removed. Also, notice that those terms are one-half of the variance of $ \sqrt{2t}H_N(\sigma)$ and $\sum_{i=1}^Nw^q_i(\alpha)\cdot \sigma_{\bullet i}$, respectively. So they correspond to drifts in exponential martingales. The large deviation principle we prove holds almost surely with respect to the randomness of $(H_N)_{N \geq 1}$, $(\chi_i)_{i \in \N}$, and $\mfk R$. Therefore, throughout we will assume that those random variables are defined on a common probability space $\Omega$ in order to have a convenient way of stating those results. \subsection{Main results} We let $\bar{F}_N^G = \E F_N^G$, where $\E$ averages over the randomness of $H_N$, $(\chi_i)_i$, and $\mfk R$. The random variable $F_N^G$ concentrates strongly around its expectation $\bar{F}_N^G$ in the large $N$ limit \cite[Theorem~1.2]{pan}. Hence, to describe the limit as $N \to +\infty$ of $F_N^G$, it suffices to describe the limit of $\bar{F}_N^G$. To describe this limit, we need to define, for $q\in\mcl Q_\infty$ and $x\in \R^d$, \begin{align} &\psi(q;x) \notag \\ &= -\E\log\iint\exp\Ll(w^q(\alpha)\cdot \tau-\tfrac{1}{2}q(1)\cdot\tau\tau^\intercal+x\cdot h(\tau,\chi_1)\Rr) \d P_1(\tau)\d\mathfrak{R}(\alpha), \label{e.psi(q;x)=} \end{align} % where $\E$ integrates the randomness of $\mfk R, (\chi_i)_i$ and $H_N^G$ so that $\psi$ is a deterministic function. % for every $p\in\mcl Q_\infty$ and $x=(x_1,x_2)\in\R^d\times \S^D$, % \begin{align}\label{e.phi=} % \begin{split} % \phi(p,x) % =\E_{\chi_1,\fR}\log\iint\exp\Big( &w^{\nabla\xi(p)}(\alpha)\cdot \tau -\tfrac{1}{2}\nabla\xi(p(1))\cdot\tau\tau^\intercal % \\ % &+x_1\cdot h(\tau,\chi_1)+x_2\cdot \tau\tau^\intercal\Big) \d\mu(\tau)\d\mathfrak{R}(\alpha). % \end{split} % \end{align} % Here, $\mathfrak{R}$ is the random measure of the Ruelle probability cascade with overlap distributed uniformly over $[0,1]$; and $w^{\nabla\xi(p)}(\alpha)$ is the Gaussian field with covariance specified by the monotone path $\nabla\xi(p)$ defined by $s\mapsto \nabla\xi(p(s))$. These objects are introduced more properly in the next section. \begin{theorem}\label{t.F_N(...)} Recall that we assume \eqref{e.convexity}. For every continuous function $G : \R^d \to \R$, we have \begin{align}\label{e.t.gen} \begin{split} &\lim_{N\to\infty} \bar{ F}_N^G =\inf_{m}\sup_{x,\, p}\Ll\{\psi\Ll(q+t\nabla \xi(p);x\Rr)-\int_0^1\theta(p(s))\d s + m \cdot x - G(m)\Rr\}, \end{split} \end{align} where $\inf$ is taken over $m \in\R^d$ and $\sup$ over $x\in\R^d$ and $p\in\mcl Q_\infty$. \end{theorem} % \begin{theorem}[Parisi-type formula]\label{t.F_N} % If $\xi$ is convex on $\R^{D\times D}$, then we have for every continuous function $G : \R^d \to \R$, % \begin{align}\label{e.t.F_N} % \lim_{N\to\infty} \bar F_N^G = \sup_{y}\inf_{x,\, p}\Ll\{\phi(p,x)+\tfrac{1}{2}\int_0^1\theta(p(s))\d s-y\cdot x+G(y_1)+\tfrac{1}{2}\xi(y_2)\Rr\} % \end{align} % where $\sup$ is taken over $y=(y_1,y_2)\in \R^d\times \S^D$ and $\inf$ is over $x\in \R^d\times \S^D$ and $p\in\mcl Q_\infty$. % \end{theorem} When $G = 0$, \eqref{e.t.gen} boils down to the classical Parisi formula as written in~\cite[Proposition~8.4]{chenmourrat2023cavity}. Note that here and in~\cite[Proposition~8.4]{chenmourrat2023cavity} the convexity of $\xi$ is assumed on $S^D_+$ and not on the whole space $\R^{D \times D}$. This weaker convexity assumption should not be a surprise. Indeed, in the $D = 1$ case, it can be seen that the Parisi formula still holds assuming only that $\xi$ is convex on $\R_+$ as a consequence of Talagrand's positivity principle, and this weaker convexity assumption is simply a consequence of a generalization of this observation (but with a different proof). %When $G$ is present, in Remark~\ref{r.convexity}, we explain in more detail how to relax the convexity condition when $G$ is present. In short, currently, one has to take a detour through obtaining results in~\cite{mourrat2020free} and~\cite{chen2022hamilton} and redoing cavity computations in~\cite{chenmourrat2023cavity}. Throughout the paper, the free energy of models with linear Mattis interaction will play a special role. So for every $x \in \R^d$, we let % \begin{e} \label{e.def.phi} \varphi(x) = \lim_{N \to +\infty} \bar{ F}_N^{m \mapsto x \cdot m}, \end{e} % and we let $\varphi^*(m) = \sup_{x} \left\{ x \cdot m + \varphi(x) \right\}$ denote the convex dual of $-\varphi$. % \begin{definition}[Large deviation principle] Let $(X_N)_{N \geq 1}$ be a sequence of random variables in $\R^d$ with associated probability measures $(\P_N)_{N \geq 1}$ and let $I:\R^d\to [0,\infty]$. We say that the random variables $X_N$ satisfy a large deviation principle under $\P_N$ with rate function $I$ when for every Borel measurable set $A \subset \R^d$, we have \begin{align*} -\inf_{ A^\circ} I\leq \liminf_{N\to\infty}\frac{1}{N}\log \P_N\{X_N\in A\} \leq \limsup_{N\to\infty}\frac{1}{N}\log \P_N\{X_N\in A\} \leq -\inf_{\bar A} I, \end{align*} where $A^\circ$ and $\bar A$ are the interior and the closure of $A$, respectively. \end{definition} In the following, we refer to the large deviation principle as LDP. Let $\la\cdot\ra^{G}_{N}$ be the probability measure defined by % \begin{equation*} %\label{e.gibbs} \la f(\sigma) \ra^{G}_{N} \propto \int f(\sigma) e^{H^G_N(\sigma)} \d P_1^{\otimes N}(\sigma). \end{equation*} % Observe that $\la\cdot\ra^{G}_{N}$ is a \emph{random} probability measure. Recall that the random variables $(H_N)_{N \geq 1}$ and $(\chi_i)_{i \in \N}$ are defined on a common probability space $\Omega$. For a random variable $X : \Omega \to \mfk X$, we let $X^\omega \in \mfk X$ denote the realization of the random variable $X$ on the event $\omega \in \Omega$. Recall the mean magnetization $m_N$ defined in \eqref{e.m_N=} and $\varphi$ defined in \eqref{e.def.phi}. Our next main result is a (quenched) large deviation principle for the random variables $m_N$ under $\la\cdot\ra^{G}_{N}$. % We can find a common probability space on which lives $F^G_N(q,x)$ for any continuous $G$, $t\in\R_+$, $q\in\mcl Q_\infty$, and $x\in\R^d$. Henceforth, we fix $t=1$ and any $q$ and display $\omega\in\Omega$ by writing $F^{G,\omega}_N(x) = F^{G,\omega}_N(q,x)$. In particular, we write $F^\omega_N(t) = F^{0,\omega}_N(t)$ with $G$ set to be constantly zero. % We also write $\la\cdot\ra^{G,\omega}_{N,x}$ and $\la\cdot\ra^\omega_{N,x}=\la\cdot\ra^{0,\omega}_{N,x}$. % Then, we define $f(x)$ by \begin{theorem}[LDP for the magnetization]\label{t.LDP_gen} Recall that we assume \eqref{e.convexity}. There exists a full-measure subset $\Omega' \subset \Omega$ such that, for every continuous function $G : \R^d \to \R$ and every $\omega \in \Omega'$, the random variables $m_N$ satisfy a large deviation principle under $\la\cdot\ra^{G,\omega}_{N}$ with rate function $I^G$ defined by % \begin{equation*} %\label{e.def.I^G} I^G(m) = -G(m) + \varphi^*(m) +\sup_{m'\in\R^d}\Ll\{G(m') - \varphi^*(m')\Rr\},\quad\forall m \in\R^d. \end{equation*} % \end{theorem} % \begin{remark}\label{r.Omega'} % In fact, the full-measure subset $\Omega'$ appearing in Theorem~\ref{t.LDP_gen} can be chosen uniformly with respect to $G$. In other words, $\omega$-almost surely, the large deviation principle holds for every continuous function $G$. This slightly stronger version of the theorem is justified in Section~\ref{s.LDP2}. % % In fact, one can choose a single full-measure subset $\Omega'$ such that for every continuous function $G$, we have the large deviation deviation principle in Theorem~\ref{t.LDP_gen} under $\la\cdot\ra^{G,\omega}_N$ for every $\omega\in\Omega'$. This is done in Section~\ref{s.LDP2} using classical large deviation results and $\Omega'$ is chosen in Lemma~\ref{l.LDP_<>}. % \end{remark} \subsection{Recovering concrete models from the general setting} \label{ss.usual} The main results of this paper are stated for very general models as introduced in Section~\ref{ss.setting}. Let us explain how to recover results about more usual models from those. Given $h:\R^D\times \R^L\to\R^d$ in~\eqref{e.F_N(beta)}, we define $\tilde h:\R^D\times \R^L\to \R^d\times \S^D$ through \begin{e*} \tilde h(\tau,\chi) = \Ll(h(\tau,\chi),\ \tau\tau^\intercal\Rr). \end{e*} Henceforth, we isometrically identify $\R^d\times \S^D$ with $\R^{\tilde d}$ for some $\tilde d \in\N$. Given $G:\R^d\to\R$ in~\eqref{e.F_N(beta)}, we introduce $\tilde G:\R^d\times \S^D\to\R$ given by % \begin{e*} \tilde G(m,r) =G(m) + \frac{\beta^2}{2}\xi(r). \end{e*} % Then, we consider $H_N^G$ in~\eqref{e.H^q,x_N(sigma,alpha,chi)=} with $G,h,d$, therein substituted with $\tilde G,\tilde h,\tilde d$ introduced above. Observe that setting $t = \beta^2/2$ and $q = 0$, we have % \begin{align*} H_N^{\tilde G}(\sigma) &= \beta H_N(\sigma) + N \tilde G \left( \frac{1}{N} \sum_{i = 1}^N \tilde h(\sigma_i, \chi_i) \right) - \frac{N \beta^2}{2} \xi \left( \frac{\sigma \sigma^\intercal}{N}\right) \\ &= \beta H_N(\sigma) + N G \left( \frac{1}{N} \sum_{i = 1}^N h(\sigma_{\bullet i}, \chi_i) \right). \end{align*} % In particular, observe that the model described in \eqref{e.simple} is recovered by choosing $D=1$, $d=1$, $L =1$, $h(\sigma,\chi) = \text{sgn}(\sigma \chi)$, $G(m) = m^2$, $\xi(x) = x^2$, and $P_1$ is the uniform measure on $\{-1,1\}$. In particular observe that thanks to this, Theorem~\ref{t.parisi+ldp.basic} can be recovered from Theorem~\ref{t.F_N(...)} and Theorem~\ref{t.LDP_gen}. \subsection{Organization of the paper} In Section~\ref{s.free energy with linear mattis}, we compute the limit free energy $\lim_{N \to +\infty} \bar{F}_N^G$ in the special case where $G$ is of the form $G(m) = x \cdot m$ for some $x \in \R^d$ and prove that this quantity is a continuously differentiable function of $x$. % In Section~\ref{s.addingcw}, we compute $\lim_{N \to +\infty} \bar{ \msc F}_N^G$ using the result of this previous section by observing that as $N \to +\infty$, $(s,x) \mapsto \bar{ \msc F}_N^{m \mapsto sG(m) + x\cdot m}$ converges to the solution of a Hamilton--Jacobi partial differential equation, this proves Theorem~\ref{t.F_N(...)}. In Section~\ref{s.LDP1}, we use the formula proven for $\lim_{N \to +\infty} \bar{ \msc F}_N^G$ in the previous section to deduce the large deviation principle of Theorem~\ref{t.LDP_gen} by using Bryc's inverse Varadhan lemma. In Section~\ref{s.LDP2}, we use the results of the previous section to give a proof of Theorem~\ref{t.F_N(...)} and Theorem~\ref{t.LDP_gen} by relying only on classical large deviation tools. \subsection{Acknowledgements} We would like to warmly thank Jean-Christophe Mourrat for many useful inputs and interesting discussions during the conception and writing of this paper. HBC acknowledges funding from the NYU Shanghai Start-Up Fund and support from the NYU–ECNU Institute of Mathematical Sciences at NYU Shanghai. % In Section~\ref{s.enriched}, we introduce $F_N^G(q,x)$ an enriched version of the free energy $F_N^G$ which depends on an increasing path $q \in \mcl Q$ and $x \in \R^d$ and such that $F_N^{\tilde G}(0,0) = F_N^G$ for an appropriate choice of $\tilde G$. In Section~\ref{s.free energy} we compute $\lim_{N \to +\infty} F_N^G(q,x)$ using techniques involving Hamilton--Jacobi equations, we deduce Theorem~\ref{t.F_N} by setting $q = 0$ and $x = 0$. In Section~\ref{s.free energy} from the computation of $\lim_{N \to +\infty} F_N^G(q,x)$, we deduce a large deviation principle for $m_N$ using results from the theory of large deviations. Again, we deduce Theorem~\ref{t.LDP_gen} by setting $q = 0$ and $x = 0$. Finally, in Section~\ref{s.addingcw} we give an alternative proof of Theorem~\ref{t.LDP_gen} this time relying on Hamilton--Jacobi equations. %Part~1. We show that the limit of energy $\bar F_N(q,x)$ exists (see main file (2.3)). If $\xi$ is assumed to be convex on $\S^D$, we say that arguments in~\cite{chen2023self} can be modified straightforwardly with the presence of the additional field $Nx\cdot m_N$ (see main file (1.3)). %If we want to only assume convexity on $\S^D_+$, we need to explain more. First, the one-sided bound in~\cite{mourrat2020free} still holds. Second, this bound can still be cast as the viscosity solution in~\cite{chen2022hamilton} which has a Hopf--Lax representation. Thirdly, we need to say that we can redo the cavity computation in~\cite{chenmourrat2023cavity} to get the corresponding Proposition~8.1 therein, which is the result we want. %One way to do this is that we explain the first approach a bit more carefully so that spin glass people will be happy (cite something similar in~\cite{guionnet2025estimating}). Maybe just assume the convexity on $\S^D$ in the main theorem. Then, in a remark afterwards, we mention that this condition can be weakened to $\S^D_+$ by following the much longer second approach. %Part~2. Run the finite-dimensional HJ to get $\bar F_N(q,x)$. %This part is basically the same as~\cite[Section~2]{chen2024conventional}. %Part~3. Say something about the LDP. Using the duality between LDP and the free energy (G\"artner-Ellis theorem \cite[Theorem 2.3.6]{dembo2009large} and Varadhan's integral lemma~\cite[Theorem 4.3.1]{dembo2009large}), we should be able to go from the results in Part~2 to something like in~\cite[Theorem~2.7]{guionnet2025estimating}. This is the result of the LDP for the self-overlap and the Mattis magnetization.} % \section{The enriched free energy} \label{s.enriched} % We need to add external fields parameterized by increasing paths and driven by Poisson--Dirichlet cascades. % Let $\mcl Q$ be the collection of increasing càdlàg paths $p:[0,1) \to \S^D_+$, where the monotonicity is understood as $p(s)-p(s')\in\S^D_+$ for $s>s'$. % For $\sfp\in[0,\infty]$, we write $\mcl Q_\sfp = \mcl Q\cap L^\sfp([0,1);\S^D)$. % The monotonicity also allows us to define $q(1)=\lim_{s\uparrow1}q(s)$ for every $q\in\mcl Q_\infty$. % Throughout, let $\fR$ be the Ruelle probability cascade (RPC) with overlap uniformly distributed over $[0,1]$ (see \cite[Theorem~2.17]{pan}). Precisely, $\fR$ is a random probability measure on the unit sphere of a fixed separable Hilbert space (the exact form of the space is not important), with the inner product denoted by $\alpha\wedge\alpha'$. Let $\alpha$ and $\alpha'$ be independent samples from $\fR$. Then, the law of $\alpha\wedge\alpha'$ under $\E \fR^{\otimes 2}$ is the uniform distribution over $[0,1]$, where $\E$ integrates the randomness of $\fR$. % This overlap distribution uniquely determines $\fR$ (see~\cite[Theorem~2.13]{pan}). % Almost surely, the support of $\fR$ is ultrametric in the induced topology. For rigorous definitions and basic properties, we refer to \cite[Chapter 2]{pan} (also see \cite[Chapter 5]{HJbook}). % We also refer to~\cite[Section~4]{chenmourrat2023cavity} for the construction and properties of $\fR$ useful in this work. % For $q\in\mcl Q_\infty$ and almost every realization of $\fR$, let $(w^q(\alpha))_{\alpha\in\supp\fR}$ be the $\R^D$-valued centered Gaussian process with covariance % \begin{align}\label{e.Ew^qw^q=} % \E\Ll[ w^q (\alpha)w^q(\alpha')^\intercal\Rr] = q(\alpha\wedge\alpha'). % \end{align} % Its existence and properties are given in~\cite[Section~4]{chenmourrat2023cavity}. % Conditioned on $\fR$, let $(w^q_i)_{i\in\N}$ be i.i.d.\ copies of $w^q$ and also independent of other randomness. % For $N\in \N$, $q\in \mcl Q_\infty$, $x\in\R^d$, we consider the Hamiltonian % \begin{align} % H^{G,q,x}_N(\sigma,\alpha) = H_N(\sigma) - \tfrac{1}{2}N\xi\Ll(\tfrac{\sigma\sigma^\intercal}{N}\Rr) + \sum_{i=1}^N w^q_i(\alpha)\cdot \sigma_{\bullet i} -\tfrac{1}{2} q(1)\cdot\sigma\sigma^\intercal \notag % \\ % + NG\Ll(m_N\Rr) + N x\cdot m_N .\label{e.H^q,x_N(sigma,alpha,chi)=} % \end{align} % Here, notice that $\frac{1}{2}N\xi\Ll(\sigma\sigma^\intercal/N\Rr)$ and $\frac{1}{2}q(1)\cdot\sigma\sigma^\intercal$ are one half of the variance of $H_N(\sigma)$ and $\sum_{i=1}^Nw^q_i(\alpha)\cdot \sigma_{\bullet i}$, respectively. They resemble the drift terms in exponential martingales and make our analysis easier. We will remove them afterwards. The enriched free energy is defined as % \begin{align}\label{e.F_N(q,x)=} % \begin{split} % F^G_N(q,x)&=\frac{1}{N}\log \iint \exp\Ll(H^{G,q,x}_N(\sigma,\alpha)\Rr) \d \mu^{\otimes N}(\sigma)\d\mathfrak{R}(\alpha), % \\ % \bar F^G_N(q,x) &= \E F^G_N(q,x) = \E_{H_N,\,(w^q_i)_i,\,(\chi_i)_i,\,\fR} F^G_N(q,x). % \end{split} % \end{align} % In the following, if not specified, $\E$ always averages over the displayed randomness. The associated random Gibbs measure is as follows % \begin{align}\label{e.<>_Ntqsx=} % \la\cdot\ra^{G}_{N,q,x} \quad\propto\quad \exp\Ll(H^{G,q,x}_N(\sigma,\alpha)\Rr)\d \mu^{\otimes N}(\sigma)\mathfrak{R}(\alpha). % \end{align} % For brevity, we also denote by $\la\cdot\ra^G_{N,q,x}$ its tensorization. % For $q\in\mcl Q_\infty$ and $x\in \R^d$, we set % \begin{align} % &\psi(q;x) \notag % \\ % &= \E_{\chi_1,\fR}\log\iint\exp\Ll(w^q(\alpha)\cdot \tau-\tfrac{1}{2}q(1)\cdot\tau\tau^\intercal+x\cdot h(\tau,\chi_1)\Rr) \d\mu(\tau)\d\mathfrak{R}(\alpha). \label{e.psi(q;x)=} % \end{align} %The Gibbs measure associated with $\psi$ in~\eqref{e.psi(q;x)=} is given by %\begin{align}\label{e.<>_R,q,x} % \la \cdot\ra_{\fR,q,x} \propto \exp\Ll(\sqrt{2}w^q(\alpha)\cdot\tau -q(1)\cdot \tau\tau^\intercal + x\cdot h(\tau,\chi_1)\Rr) \d \mu(\tau) \d \fR(\alpha). %\end{align} % We prove the following more general versions of Theorem~\ref{t.F_N} and Theorem~\ref{t.LDP_gen} % \begin{theorem}\label{t.F_N(...)} % If $\xi$ is convex on $\R^{D\times D}$, then we have that, for every $q\in\mcl Q_\infty$, $x\in\R^d$, and $G \in \mcl C^0(\R^d,\R)$, % \begin{align}\label{e.t.gen} % \begin{split} % &\lim_{N\to\infty} \bar F^G_N(q,x) % \\ % &=\sup_{m}\inf_{x',\, p}\Ll\{\psi\Ll(q+t\nabla \xi(p);x'\Rr)+t\int_0^1\theta(p(s))\d s - m \cdot(x'-x) + G(m)\Rr\} % \end{split} % \end{align} % where $\sup$ is taken over $m \in\R^d$ and $\inf$ over $x'\in\R^d$ and $p\in\mcl Q_\infty$. % \end{theorem} % We let % % % \begin{e} \label{e.def.phi_q} % \varphi_q(x)= \lim_{N \to +\infty} \bar F^0_N(q,x), % \end{e} % % % and we also define $\varphi_q^*(m)= \sup_{x} \{ x \cdot m - \varphi_q(x) \}$ % \begin{theorem}\label{t.LDP_gen(...)} % For every continuous function $G : \R^d \to \R$, $x \in \R^d$ and $q \in \mcl Q_\infty$, there exists a full-measure subset $\Omega' \subset \Omega$ such that for every $\omega \in \Omega'$, the random variables $m_N$ satisfy a large deviation principle under $\la\cdot\ra^{G,\omega}_{N,q,x}$ with rate function $I^G_{q,x}$ defined for all $m \in \R^d$ by % % % \begin{equation} % I^G_{q,x}(m) = -G(m) + \varphi_q^*(m) - x \cdot m +\sup_{m'\in\R^d}\Ll\{G(m') - \varphi_q^*(m') + x \cdot m'\Rr\}. % \end{equation} % % % \end{theorem} % We also wanted to mention that to prove Theorem~\ref{t.F_N}, in fact, we do not need to consider nonzero $q$ at all. We are considering a nonzero $q$ here for the following two reasons. First, it is not hard to extend to this more general setting. Second, with a nonzero $q$, the free energy is relevant in the Hamilton--Jacobi equation perspective of spin glass. %We also mention that the presence of $q$, especially those $q$ that are strictly increasing, makes the free energy behave nicer in the sense that it is closer to the \section{Identification of the limit free energy with linear Mattis interaction} \label{s.free energy with linear mattis} The plan to prove Theorem~\ref{t.F_N(...)} is divided into two steps. First, we consider the free energy with $G(m) = x \cdot m$, namely, $ F_N^{m \mapsto x \cdot m}$. In this case, we can think of $ F_N^{m \mapsto x \cdot m}$ as adding some linear random external field to $F_N^0$. For $F_N^{m \mapsto x \cdot m}$, since the linear field decouples easily in the cavity computation, the standard set of tools is effective with minimal modifications. Thus, the following result holds. \begin{proposition}\label{p.F_N(q,x)} Recall that we assume \eqref{e.convexity}, for every $x\in\R^d$ we have \begin{align}\label{e.p.F_N(q,x)} \lim_{N\to\infty} \bar{ F}_N^{m \mapsto x \cdot m} = \sup_{p\in\mcl Q_\infty}\Ll\{\psi(q+t\nabla \xi(p);x)-t\int_0^1\theta(p(s))\d s\Rr\}. \end{align} \end{proposition} %From the Hamilton--Jacobi equation perspective, this proposition can be interpreted as that the limit of $\bar F_N(q,x)$ is the solution of an infinite-dimensional Hamilton--Jacobi equation of the form $\partial_t f - \int \xi(\partial_q f)=0$ with initial condition $f(0,\cdot) = \psi(\cdot;x)=\bar F_N(0,\cdot;0,x)$. The above variational formula is exactly the associated Hopf--Lax representation. Then, to get find the limit of $\bar F_N(q,x)$ for $s>0$, we need to solve another, yet simpler, finite-dimensional Hamilton--Jacobi equation of the form $\partial_t f - G(\nabla_x f)=0$ with initial condition $f(0,\cdot) = \bar F_N(t,q;0,\cdot)$. Then, Theorem~\ref{t.F_N(...)} follows from Proposition~\ref{p.F_N(q,x)} and the Hopf--Lax representation of the solution of this simpler equation. Observe that at $x = 0$, \eqref{e.p.F_N(q,x)} reduces to the classical Parisi formula as stated in \cite{chenmourrat2023cavity}. At $x \neq 0$ the proof \eqref{e.p.F_N(q,x)} follows the same arguments than for the classical Parisi formula. The proof is done in two separate steps, first to prove that the limit free energy is lower-bounded by the right-hand side in \eqref{e.p.F_N(q,x)}, one can write a variant of the so-called of the Aizenman–Sims–Starr scheme. Roughly speaking, the principle of the computation is comparing $\bar{ F}_{N+1}^{m \mapsto x \cdot m}$ with $\bar{ F}_N^{m \mapsto x \cdot m}$ by ``integrating out'' one of the spin variables. This leads to expressions of the form % \begin{e*} (N+1)\bar{ F}^{m \mapsto x \cdot m}_{N+1} - N\bar{ F}^{m \mapsto x \cdot m}_{N} \simeq \psi(q+t\nabla \xi(p);x)-t\int_0^1\theta(p(s))\d s, \end{e*} % with some $p \in \mcl Q_\infty$ possibly depending on $N$, which yields the desired bound. The second step of the proof consists in verifying that the limit free energy is upper-bounded by the right-hand side in \eqref{e.p.F_N(q,x)}. To proceed, it is possible to use Gaussian interpolation as in Guerra's original proof of this bound for the classical Parisi formula \cite{gue03}. Alternatively, one can also use the more modern point of view in~\cite{mourrat2020nonconvex,mourrat2020free} which consists in verifying that the free energy at finite $N$ is, as a function of $(t,q)$, a supersolution of a partial differential equation of Hamilton--Jacobi type with time parameter $t$ and initial condition $q \mapsto \psi(q;x)$. The comparison principle then yields the desired bound. \begin{proof}[Sketch of proof] Since the external field $Nx\cdot m_N$ is linear, the usual strategy --- Guerra's interpolation for the upper bound and the Aizenman--Sims--Starr scheme together with Panchenko's ultrametricity for the lower bound --- works without any significant modification. For completeness, we still sketch the key steps in the said strategy to highlight where the convexity is needed and where the linearity of the external field is used. After these are clarified, we refer to~\cite{chen2023self} for the detail for the lower and upper bounds below (but in the setting of vector spin glasses without random external field). For brevity, let us write $\bar{ F}_N=\bar{ F}_N^{m\mapsto x\cdot m}$. \smallskip \textit{Lower bound via Guerra's interpolation~\cite{gue03}.} Let us display the dependence on $t$ in the Hamiltonian in~\eqref{e.H^q,x_N(sigma,alpha,chi)=} by writing $H^G_N(\sigma,\alpha;t)$. Fix any $p\in\mcl Q_\infty$ and recall $\theta$ from~\eqref{e.theta=}. We consider an independent Gaussian field $(V(\alpha))_{\alpha\in\supp\fR}$ with covariance \begin{align*} \E \Ll[V(\alpha)V(\alpha')\Rr] = \theta\Ll(p(\alpha\wedge\alpha')\Rr). \end{align*} We also take an i.i.d.\ sequence of Gaussian field $(w^{t\nabla\xi(p)}_i(\alpha))_{\alpha\in \supp\fR}$ indexed by $i\in\N$ with covariance given as in~\eqref{e.Ew^qw^q=} with $q$ therein replaced by $t\nabla\xi(p)$. For $r\in[0,1]$, we consider the interpolating Hamiltonian \begin{align*} H_N(\sigma,\alpha;r) = H^G_N(\sigma,\alpha;rt)+\sqrt{1-r}\sum_{i=1}^Nw^{t\nabla\xi(p)}_i(\alpha)\cdot \sigma_{\bullet i} - \tfrac{1-r}{2}t\nabla\xi(p(1))\cdot\sigma\sigma^\intercal \\ +\sqrt{rNt}V(\alpha) - \tfrac{rNt}{2}\theta(p(1)). \end{align*} With this Hamiltonian, we define the interpolating free energy \begin{align*} \phi(r) = -\frac{1}{N}\E\log\iint\exp\Ll(H_N(\sigma,\alpha;r)\Rr)\d P_1^{\otimes N}(\sigma)\d \fR(\alpha). \end{align*} Then, we have \begin{align*} \phi(1)= \bar{ F}_N - \frac{1}{N}\E\log\int\exp\Ll(\sqrt{Nt}V(\alpha)-\tfrac{Nt}{2}\theta(p(1))\Rr)\d\fR(\alpha), \end{align*} where the term $\frac{1}{N}\E\log \int \cdots\, \d \fR(\alpha)$ can be computed to be $-t\int_0^1\theta(p(s))\d s$ appearing in~\eqref{e.p.F_N(q,x)}. Here, we used the independence between the Gaussian randomness of $V(\alpha)$ and that of $\sum_{i=1}^N w_i^q(\alpha)\cdot\sigma_{\bullet i}$ in $H^G_N(\sigma,\alpha;rt)$ together with some property of the cascade to decompose $\phi(1)$ into the two terms as in the above display. On the other hand, using $w_i^q(\alpha) + w_i^{t\nabla\xi(p)}(\alpha)\stackrel{\d}{=}w_i^{q+t\nabla\xi(p)}(\alpha)$, we have \begin{align*} \phi(0)=-\frac{1}{N}\E \log\iint\exp\Big(\sum_{i=1}^Nx\cdot h(\sigma_{\bullet i},\chi_i) + \sum_{i=1}^N w^{q+t\nabla\xi(p)}_i(\alpha)\cdot \sigma_{\bullet i} \\ -\tfrac{1}{2} \big(q+t\nabla\xi(p)\big)(1)\cdot\sigma\sigma^\intercal\Big)\d P_1^{\otimes N}(\sigma)\d\fR(\alpha), \end{align*} which is equal to $\psi(q;x)$ in~\eqref{e.psi(q;x)=} using the independence of random variables indexed by $i$. Notice that the linearity of the external field was used here. Then, the upper bound in~\eqref{e.p.F_N(q,x)} follows once $\phi(1)\geq \phi(0)$. To show this, we compute the derivative \begin{align}\label{e.d/drphi=} \frac{\d}{\d r}\phi(r)=\frac{1}{2}\E\la\xi(\sigma\sigma'^\intercal)-\nabla\xi(p(\alpha\wedge\alpha'))\cdot \sigma\sigma'^\intercal+\theta(p(\alpha\wedge\alpha'))\ra_r, \end{align} where we used the standard tool of Gaussian integration by parts and $\la\cdot\ra_r$ is the Gibbs measure associated with $H_N(\sigma,\alpha;r)$. Notice that in the above display there are no terms involving self-overlaps $\sigma \sigma^{\intercal}$ or $\alpha \wedge \alpha = 1$, which might otherwise arise from Gaussian integration by parts. This is because such terms are exactly canceled by the derivatives of $-\frac{rNt}{2}\xi(\frac{\sigma\sigma^\intercal}{N})$, $- \tfrac{1-r}{2}t\nabla\xi(p(1))\cdot\sigma\sigma^\intercal$, and $- \tfrac{rNt}{2}\theta(p(1))$ appearing in the Hamiltonian. The definition of $\theta$ in~\eqref{e.theta=} and the convexity of $\xi$ on $\R^{D\times D}$ ensures that $\xi(a)- \nabla\xi(b)\cdot a -\theta(b)\geq 0$ for every $a,b\in\R^{D\times D}$. Therefore, we get $\frac{\d}{\d r}\phi(r)\geq 0$ and completes the proof of the lower bound. \smallskip \textit{Upper bound via Aizenman--Sims--Starr scheme~\cite{aizenman2003extended} and Panchenko's ultrametricity~\cite{pan.aom}.} Let $(Z(\sigma))_{\sigma\in \R^{D\times N}}$ and $(Y(\sigma))_{\sigma \in \R^{D\times N}}$ be independent centered $\R^{D}$-valued and real-valued Gaussian processes with covariances \begin{align*} \E \Ll[Z(\sigma)Z(\sigma')^\intercal\Rr] = \nabla\xi\Ll(\tfrac{\sigma\sigma'^\intercal}{N}\Rr)\quad\text{and}\quad \E \Ll[Y(\sigma)Y(\sigma')\Rr] =\theta\Ll(\tfrac{\sigma\sigma'^\intercal}{N}\Rr). \end{align*} We can compute that \begin{align*} (N+1)\bar F_{N+1}- N\bar F_{N} = A_N^{(1)} - A_N^{(2)} + o(1), \end{align*} with an error term $o(1)$ that vanishes as $N\to\infty$. Here, \begin{align*} A_N^{(1)} = -\E \log\bigg\langle \int \exp\Big(\Ll(\sqrt{2t}Z(\sigma)+w^q_{N+1}(\alpha)\Rr)\cdot \tau - \tfrac{1}{2}\Ll(2t\nabla\xi\Ll(\tfrac{\sigma\sigma^\intercal}{N}\Rr)+q(1)\Rr)\cdot \tau\tau^\intercal \\ +h(\tau,\chi_{N+1})\Big) \d P_1(\tau)\bigg\rangle_N \quad \text{and}\quad A_N^{(2)}=-\E \log \la \exp\Ll(\sqrt{2t}Y(\sigma) - t\theta\Ll(\tfrac{\sigma\sigma^\intercal}{N}\Rr)\Rr) \ra_N, \end{align*} where $\tau=\sigma_{\bullet N+1}$ is called the cavity spin and $\la\cdot\ra_N$ is the Gibbs measure associated with $\bar F_N$. Notice that $w^q_{N+1}(\alpha)$ and $h(\tau,\chi_{N+1})$ have randomness independent from that of $\la\cdot\ra_N$. It is important to note that we used the linearity $(N+1)x\cdot m_{N+1} = Nx\cdot m_N + h(\tau,\chi_{N+1})$ in this computation, where $Nx\cdot m_N$ is hidden in $\la\cdot\ra_N$ and $h(\tau,\chi_{N+1})$ is displayed in the above. We can see $\limsup_{N\to\infty} \bar F_N\leq \limsup_{N\to\infty}A^{(1)}_N - A^{(2)}_N$. Heuristically, by passing to a subsequence, we may assume that the distribution of the spin overlap $\frac{\sigma\sigma'^\intercal}{N}$ under $\E\la\cdot\ra_N$ converges to that of $p(U)$ for some $p\in\mcl Q_\infty$ where $U$ is a uniform random variable over $[0,1]$. Also, we can \textit{synchronize} the spin overlap with the cascade overlap of $\alpha$ as spelled out in~\cite[Theorem~4]{pan.vec}. Panchenko's ultrametricity result along with Ghirlanda--Guerra's identities tells us that this is enough to identify the limit of $A^{(1)}_N$ and $A^{(2)}_N$, which are $\psi(q+t\nabla \xi(p);x)$ and $t\int_0^1\theta(p(s))\d s$, respectively. This completes the lower bound modulo many technical results. For instance, we need to add some perturbation to $\la\cdot\ra_N$ to ensure that the above sketch works. \textit{Relaxation of convexity of $\xi$.} In view of the above proof, the convexity of $\xi$ on $\mathbb{R}^{D \times D}$ is only used to ensure that the right-hand side of~\eqref{e.d/drphi=} is non-positive. When $D=1$, Talagrand's positivity principle allows one to relax this assumption and require $\xi$ to be convex only on $\mathbb{R}_{+}$. When $D>1$, one can verify that~\cite[Proposition~8.1]{chenmourrat2023cavity} remains valid in the presence of the random external field $N x \cdot m_N$, which yields Proposition~\ref{p.F_N(q,x)} with $\xi$ assumed to be convex only on $S^{D}_{+}$. Indeed, the proof of~\cite[Proposition~8.1]{chenmourrat2023cavity} is based on cavity computations (similar to those used in the above proof of the upper bound) developed in~\cite{chenmourrat2023cavity}, together with an input from~\cite{mourrat2020free} that provides an lower bound (in place of Guerra's bound) via the solution of a relevant Hamilton--Jacobi equation. The variational representation of this solution is precisely the right-hand side of~\eqref{e.p.F_N(q,x)}. In both~\cite{chenmourrat2023cavity} and~\cite{mourrat2020free}, the analysis is carried out for vector spin glass models without a random external field. However, as illustrated in the sketch above, the inclusion of such a field does not require any substantial modification of the arguments. \end{proof} Recall that in \eqref{e.def.phi} we have defined $\varphi(x) = \lim_{N\to\infty} \bar{ F}^{m \mapsto x \cdot m}_N$. It follows from Proposition~\ref{p.F_N(q,x)} that % \begin{equation} \label{e.varphi=sup} \varphi(x) = \sup_{p\in\mcl Q_\infty}\Ll\{\psi(q+t\nabla \xi(p);x)-t\int_0^1\theta(p(s))\d s\Rr\}. \end{equation} % As explained in the following lemma, $\varphi$ is a well-behaved function of $x$. This follows from similar arguments as the ones for~\cite[Lemma~2.2]{chen2024conventional}. %which we presented below for completeness. % \begin{lemma}\label{l.varphi} The function $\varphi$ is Lipschitz, concave, and continuously differentiable. %Assume that either~\eqref{e.condition_convex} or~\eqref{e.condition_non-convex} holds. \end{lemma} \begin{proof} We denote by by $\msc P(p,x)$ the expression inside $\sup_{p\in\mcl Q_\infty}\{\cdots\}$ in~\eqref{e.varphi=sup}, so that % \begin{e*} \varphi(x)=\sup_{p\in\mcl Q_\infty}\msc P(p,x). \end{e*} % Furthermore, we have $\nabla_x \bar F^{m \mapsto x \cdot m}_N = -\E \la m_N\ra_{N}^{m \mapsto x \cdot m}$, which is bounded uniformly in $N$. For any $v\in\R^d$, we can compute % \begin{e*} (v\cdot\nabla_x)^2\bar F^{m \mapsto x \cdot m}_N = -\E \la (v\cdot m_N)^2\ra_{N}^{m \mapsto x \cdot m}+ \left( \E \la v\cdot m_N\ra_{N}^{m \mapsto x \cdot m}\right)^2\leq 0. \end{e*} % Therefore, $\varphi$ is Lipschitz and concave. It is classical that the combination of convexity and differentiability implies continuous differentiability (e.g.\ \cite[Theorem~25.5]{rockafellar1970convex}). Hence, it only remains to show that $\varphi$ is differentiable everywhere. Fix any $x \in \R^d$. A vector $a\in \R^d$ is said to be a superdifferential of $\varphi$ at $x$ when for every $y\in\R^d$, % \begin{e*} \varphi(y)-\varphi(x)\leq a\cdot(y-x). \end{e*} % Since $\varphi$ is concave, it suffices to show that any superdifferential $a$ of $\varphi$ at $x$ is unique. For each $\eps>0$, we choose $p_\eps$ to satisfy \begin{align}\label{e.P(pi_eps,x)
L$ where $L$ is a Lipschitz constant of $\varphi$.
\end{remark}
% \section{Identification of the free energy with general Mattis interaction via the Hamilton--Jacobi approach} \label{s.addingcw}
% In this section, for $N\in\N$ and $(s,x)\in\R_+\times\R^d$, we define
% %
% \begin{e} \label{e.F_N^G(s,x)}
% \msc F_N^G(s,x)= \msc F_N^{m \mapsto sG(m) + x\cdot m},
% \end{e}
% %
% and $\bar{\msc F}_N^G(s,x)= \E \msc F_N^G(s,x)$. When $G$ is clear from context, we will simply write $\msc F_N(s,x)$ in place of $\msc F_N^G(s,x)$.
% % and the associated free energy
% % \begin{align}\label{e.F_N(s,x)=}
% % \begin{split}
% % F_N(s,x) &= \frac{1}{N}\log \iint \exp\Ll(H^{s,x}_N(\sigma,\alpha)\Rr) \d \mu^{\otimes N}(\sigma)\d\mathfrak{R}(\alpha),
% % \\
% % \bar F_N(s,x) &= \E F_N(s,x) = \E_{H_N,\,(w^q_i)_i,\,(\chi_i)_i,\,\fR} F_N(s,x).
% % \end{split}
% % \end{align}
% % Comparing this with~\eqref{e.H^q,x_N(sigma,alpha,chi)=} and~\eqref{e.F_N(q,x)=}, we have
% % \begin{align}\label{e.F_N(s,x)=F_N^sG(q,x)}
% % F_N(s,x) = F_N^{sG}(q,x).
% % \end{align}
% We are going to verify that $(s,x) \mapsto \bar{ \msc F}_N(s,x)$ converges as $N \to +\infty$ to the solution of a partial differential eqution with time parameter $s$. Since $\lim_{N \to +\infty} \msc F_N(0,x) = \varphi(x)$ can be computed thanks to Proposition~\ref{p.F_N(q,x)} this partial differential equation formulation allows us to compute to compute $\lim_{N \to +\infty} \msc F_N(s,x)$ for every $s > 0$.
% For technical reasons, namely so that it is possible to verify that the partial differential equation in question has a unique solution, we will assume throughout this section that $G$ is locally Lipschitz. This condition can be easily removed once Theorem~\ref{t.F_N(...)} is proven, as the variational formula we obtain for the free energy depends continuously on $G$ (for the topology of local uniform convergence).
% %In some places, we will assume either one of the following conditions:
% %\begin{align}
% % &\text{$\xi$ is convex on $\S^D_+$, \quad $t\in\R_+$, \quad and $q\in\mcl Q_\infty$;} \label{e.condition_convex}
% % \\
% % &\text{$\xi$ is not convex on $\S^D_+$, \quad $t