prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: What are the stability conditions for a solution of $-\Delta u = f(u)$?

Read the following text and answer briefly.

Context 1: \section{Introduction and main results}


In this note we are interested in the existence versus non-existence of stable sub- and super-solutions of equations of the form
\begin{equation} \label{eq1}
-div( \omega_1(x) \nabla u ) = \omega_2(x) f(u) \qquad \mbox{in $ {\mathbb{R}}^N$,}
\end{equation} where $f(u)$ is one of the following non-linearities: $e^u$,  $ u^p$ where $ p>1$ and $ -u^{-p}$ where $ p>0$   We assume that $ \omega_1(x)$ and $ \omega_2(x)$, which we call \emph{weights},  are smooth positive functions (we allow $ \omega_2$ to be zero at say a point) and which satisfy various growth conditions at $ \infty$     Recall that we say that a solution $ u $ of $ -\Delta u = f(u)$ in $ {\mathbb{R}}^N$ is stable provided
\[ \int f'(u) \psi^2 \le \int | \nabla \psi|^2, \qquad \forall \psi \in C_c^2,\] where $ C_c^2$ is the set of $ C^2$ functions defined on $ {\mathbb{R}}^N$ with compact support   Note that the stability of $u$ is just saying that the second variation at $u$ of the energy associated with the equation is non-negative      In our setting this becomes:  We say a $C^2$ sub/super-solution $u$ of (\ref{eq1}) is \emph{stable} provided
\begin{equation} \label{stable}
\int \omega_2 f'(u) \psi^2 \le \int \omega_1 | \nabla \psi|^2 \qquad \forall \psi \in C_c^2 
\end{equation}
One should note that (\ref{eq1}) can be re-written as
\begin{equation*}
- \Delta u  + \nabla \gamma(x) \cdot \nabla u ={ \omega_2}/{\omega_1}\ f(u) \qquad \text{ in $ \mathbb{R}^N$},
\end{equation*}
where
$\gamma = - \log( \omega_1)$ and on occasion we shall take this point of view 


\begin{remark} \label{triv} Note that  if $ \omega_1$ has enough integrability then it is immediate that if $u$ is a stable solution  of (\ref{eq1}) we have $ \int \omega_2 f'(u) =0 $  (provided $f$ is increasing)    To see this let $ 0 \le \psi \le 1$ be supported in a ball of radius $2R$ centered at the origin ($B_{2R}$) with $ \psi =1$ on $ B_R$ and such that $  | \nabla \psi | \le \frac{C}{R}$ where $ C>0$ is independent of $ R$    Putting this $ \psi$ into $ (\ref{stable})$ one obtains
\[ \int_{B_R} \omega_2 f'(u) \le \frac{C}{R^2} \int_{R < |x| <2R} \omega_1,\] and so if the right hand side goes to zero as $ R \rightarrow \infty$ we have the desired result 

\end{remark}





The existence versus non-existence of stable solutions of  $ -\Delta u =  f(u)$ in $ {\mathbb{R}}^N$ or $ -\Delta u = g(x) f(u)$ in $ {\mathbb{R}}^N$ is now quite well understood, see  \cite{dancer1, farina1, egg, zz, f2, f3, wei, ces, e1, e2}   We remark that some of these results are examining the case where $ \Delta $ is replaced with $ \Delta_p$ (the $p$-Laplacian) and also in many cases the authors are interested in finite Morse index solutions or solutions which are stable outside a compact set 
  Much of the interest in these Liouville type theorems  stems from the fact that the non-existence of a stable solution is related to the existence of a priori estimates for stable solutions of a related equation on a bounded domain 




       In \cite{Ni}  equations similar to  $ -\Delta u = |x|^\alpha u^p$  where examined on the unit ball in $ {\mathbb{R}}^N$ with zero Dirichlet boundary conditions   There it was shown that for $ \alpha >0$ that  one can obtain positive solutions for $ p $ supercritical with respect to Sobolev embedding and so one can view that the term $ |x|^\alpha$ is restoring some compactness       A similar feature happens for equations of the form
\[ -\Delta u = |x|^\alpha f(u) \qquad \mbox{in $ {\mathbb{R}}^N$};\]    the value of $ \alpha$ can vastly alter the existence versus non-existence of a stable solution,  see \cite{e1, ces, e2, zz, egg} 

We now come to our main results and for this we need to define a few quantities:

\begin{eqnarray*}
I_G&:=& R^{-4t-2} \int_{ R < |x|<2R} \frac{ \omega_1^{2t+1}}{\omega_2^{2t}}dx , \\
 J_G&:=& R^{-2t-1} \int_{R < |x| <2R} \frac{| \nabla \omega_1|^{2t+1} }{\omega_2^{2t}} dx  ,\\I_L&:=& R^\frac{-2(2t+p-1)}{p-1}  \int_{R<|x|<2R }{ \left(   \frac{w_1^{p+2t-1}}{w_2^{2t}}    \right)^{\frac{1}{p-1} }  }  dx,\\ J_L&:= &R^{-\frac{p+2t-1}{p-1} }  \int_{R<|x|<2R }{ \left(   \frac{|\nabla w_1|^{p+2t-1}}{w_2^{2t}}     \right)^{\frac{1}{p-1} }  }  dx,\\
I_M  &:=&   R^{-2\frac{p+2t+1}{p+1} }  \int_{R<|x|<2R }{ \left(   \frac{w_1^{p+2t+1}}{w_2^{2t}}    \right)^{\frac{1}{p+1} }  } \ dx, \\
J_M  &:= &  R^{-\frac{p+2t+1}{p+1} }  \int_{R<|x|<2R }{ \left(   \frac{|\nabla w_1|^{p+2t+1}}{w_2^{2t}}     \right)^{\frac{1}{p+1} }  }  dx 
\end{eqnarray*}


The three equations we examine are
\[ -div( \omega_1 \nabla u ) = \omega_2 e^u \qquad \mbox{ in $ {\mathbb{R}}^N$ } \quad  (G), \]
\[  -div( \omega_1 \nabla u ) = \omega_2 u^p \qquad \mbox{ in $ {\mathbb{R}}^N$ } \quad  (L), \]
\[ -div( \omega_1 \nabla u ) = - \omega_2 u^{-p} \qquad \mbox{ in $ {\mathbb{R}}^N$ } \quad  (M),\]  and where we restrict $(L)$ to the case $ p>1$ and $(M)$ to $ p>0$     By solution we always mean a $C^2$ solution    We now come to our main results in terms of abstract $ \omega_1 $ and $ \omega_2$     We remark that our approach to non-existence of stable solutions is the approach due to Farina, see \cite{f2,f3,farina1} 

\begin{thm} \label{main_non_exist} \begin{enumerate}


\item   There is no  stable sub-solution of $(G)$ if $ I_G, J_G \rightarrow 0$ as $ R \rightarrow \infty$   for some   $0<t<2$ 
 \item    There is no positive   stable sub-solution (super-solution) of $(L)$  if  $ I_L,J_L \rightarrow 0$ as $ R \rightarrow \infty$   for some   $p- \sqrt{p(p-1)}   < t<p+\sqrt{p(p-1)} $  ($0<t<\frac{1}{2}$) 
\item   There is no positive   stable super-solution of (M) if  $ I_M,J_M \rightarrow 0$ as $ R \rightarrow \infty$  for some $0<t<p+\sqrt{p(p+1)}$ 

\end{enumerate}

\end{thm}     If we assume that $ \omega_1$ has some monotonicity we can do  better    We will assume that the monotonicity conditions is satisfied for big $x$  but really all ones needs is for it to be satisfied on a suitable sequence of annuli 

\begin{thm} \label{mono}  \begin{enumerate} \item There is no  stable sub-solution of $(G)$ with $  \nabla \omega_1(x) \cdot  x \le 0$ for big $x$ if  $ I_G \rightarrow 0$ as $ R \rightarrow \infty$   for some   $0<t<2$ 

\item There is no positive  stable sub-solution of  $(L)$ provided  $  I_L \rightarrow 0$ as $ R \rightarrow \infty$ for either:
\begin{itemize}
\item  some $  1 \le t < p + \sqrt{p(p-1)}$ and $  \nabla \omega_1(x) \cdot x \le 0$ for big $x$,  or  \\

\item some $ p - \sqrt{p(p-1)} < t \le 1$ and $ \nabla \omega_1(x) \cdot x \ge 0$ for big $ x$ 
\end{itemize}
 There is no positive super-solution of $(L)$ provided $ I_L \rightarrow 0$ as $ R \rightarrow \infty$ for some $ 0 < t < \frac{1}{2}$ and $ \nabla \omega_1(x) \cdot x \le 0$ for big $x$ 



\item  There is no positive stable super-solution of $(M)$ provided  $ I_M \rightarrow 0$ as $ R \rightarrow \infty$  for some  $0<t<p+\sqrt{p(p+1)}$ 

\end{enumerate}

\end{thm}


\begin{cor}  \label{thing}  Suppose $ \omega_1 \le C  \omega_2$  for big $ x$, $ \omega_2 \in L^\infty$,  $ \nabla \omega_1(x) \cdot  x \le 0$ for big $ x$ 
\begin{enumerate} \item There is no stable sub-solution of $(G)$ if $ N \le 9$ 

\item  There is no positive stable sub-solution of $(L)$ if  $$N<2+\frac{4}{p-1} \left( p+\sqrt{p(p-1)}  \right) $$

\item  There is no positive stable super-solution of $(M)$ if $$N<2+\frac{4}{p+1} \left( p+\sqrt{p(p+1)}  \right) $$

\end{enumerate}

\end{cor}


If one takes $ \omega_1=\omega_2=1$ in the above corollary, the results obtained for $(G)$ and  $(L)$,  and for some values of $p$ in $(M)$, are optimal, see \cite{f2,f3,zz} 





We now drop all monotonicity conditions on $ \omega_1$ 

\begin{cor} \label{po} Suppose  $ \omega_1 \le C \omega_2$ for big $x$, $ \omega_2 \in L^\infty$, $ | \nabla \omega_1| \le C \omega_2$ for big $x$ 
\begin{enumerate} \item  There is no stable sub-solution of $(G)$ if $ N \le 4$ 

\item  There is no positive stable sub-solution of $(L)$ if $$N<1+\frac{2}{p-1} \left( p+\sqrt{p(p-1)}  \right) $$

\item There is no positive super-solution of $(M)$ if $$N<1+\frac{2}{p+1} \left( p+\sqrt{p(p+1)}  \right) $$

\end{enumerate}

\end{cor}

Some of the conditions on $ \omega_i$ in Corollary \ref{po} seem somewhat artificial   If we shift over to the advection equation (and we take $ \omega_1=\omega_2$  for simplicity)
\[ -\Delta u + \nabla \gamma \cdot \nabla u = f(u), \] the conditions on $ \gamma$ become: $ \gamma$ is bounded from below and has a bounded gradient 



In what follows we examine the case where $ \omega_1(x) = (|x|^2 +1)^\frac{\alpha}{2}$ and $ \omega_2(x)= g(x) (|x|^2 +1)^\frac{\beta}{2}$,  where $ g(x) $ is positive except at say a point, smooth and where $ \lim_{|x| \rightarrow \infty} g(x) = C \in (0,\infty)$      For this class of weights we can essentially obtain optimal results 


\begin{thm} \label{alpha_beta}   Take $ \omega_1 $ and $ \omega_2$ as above 
\begin{enumerate}

\item If $ N+ \alpha - 2 <0$ then there is no stable sub-solution for $(G)$, $(L)$ (here we require it to be positive) and in the case of $(M)$ there is no positive  stable  super-solution  This case is the trivial case, see Remark \ref{triv}   \\



\textbf{Assumption:} For the remaining cases we assume that $ N + \alpha -2 > 0$ 

  \item If  $N+\alpha-2<4(\beta-\alpha+2)$ then there is no  stable sub-solution for $ (G)$ 

\item If $N+\alpha-2<\frac{ 2(\beta-\alpha+2)   }{p-1} \left( p+\sqrt{p(p-1)}  \right)$ then there is  no positive stable sub-solution of $(L)$ 

\item If $N+\alpha-2<\frac{2(\beta-\alpha+2)   }{p+1} \left( p+\sqrt{p(p+1)}  \right)$ then there is no positive stable super-solution of $(M)$ 

\item Further more 2,3,4 are optimal in the sense if $ N + \alpha -2 > 0$ and the remaining inequality is not satisfied (and in addition we assume we don't have equality in the inequality) then we can find a suitable function $ g(x)$ which satisfies the above properties and a stable sub/super-solution $u$ for the appropriate equation 

\end{enumerate}

\end{thm}

\begin{remark}  Many of the above results can be extended to the case of equality in either the $ N + \alpha - 2 \ge 0$ and also the other inequality which depends on the equation we are  examining   We omit the details because one cannot prove the results in a unified way 

\end{remark}






















In showing that an explicit solution is stable we will need the   weighted Hardy inequality given in \cite{craig} 
\begin{lemma} \label{Har}
Suppose $ E>0$ is a smooth function   Then one has
\[ (\tau-\frac{1}{2})^2 \int E^{2\tau-2} | \nabla E|^2 \phi^2 + (\frac{1}{2}-\tau) \int (-\Delta E) E^{2\tau-1} \phi^2 \le \int E^{2\tau} | \nabla \phi|^2,\] for all $ \phi \in C_c^\infty({\mathbb{R}}^N)$ and $ \tau \in {\mathbb{R}}$ 
\end{lemma}  By picking an appropriate function $E$ this gives,

\begin{cor} \label{Hardy}
For all $ \phi \in C_c^\infty$ and $ t , \alpha \in {\mathbb{R}}$  We have
  \begin{eqnarray*}
\int (1+|x|^2)^\frac{\alpha}{2} |\nabla\phi|^2 &\ge& (t+\frac{\alpha}{2})^2 \int |x|^2 (1+|x|^2)^{-2+\frac{\alpha}{2}}\phi^2\\
&&+(t+\frac{\alpha}{2})\int  (N-2(t+1)   \frac{|x|^2}{1+|x|^2}) (1+|x|^2)^{-1+\frac{\alpha} {2}} \phi^2 
\end{eqnarray*}
 \end{cor}























\section{Proof of main results}

\textbf{ Proof of Theorem \ref{main_non_exist} }   (1)  Suppose $ u$ is a stable sub-solution of $(G)$ with $ I_G,J_G \rightarrow 0$ as $ R \rightarrow \infty$ and  let $ 0 \le \phi \le 1$ denote a smooth compactly supported function   Put $ \psi:= e^{tu} \phi$ into (\ref{stable}), where $ 0 <t<2$, to arrive at
\begin{eqnarray*}
\int \omega_2 e^{(2t+1)u} \phi^2 &\le & t^2 \int \omega_1 e^{2tu} | \nabla u|^2 \phi^2 \\
&& +\int \omega_1 e^{2tu}|\nabla \phi|^2 + 2 t \int \omega_1 e^{2tu} \phi \nabla u \cdot \nabla \phi 
\end{eqnarray*}  Now multiply $(G)$ by $ e^{2tu} \phi^2$ and integrate by parts to arrive at
\[ 2t \int \omega_1 e^{2tu} | \nabla u|^2 \phi^2 \le \int \omega_2 e^{(2t+1) u} \phi^2 - 2 \int \omega_1 e^{2tu} \phi \nabla u \cdot \nabla \phi,\]
and now if one equates like terms they arrive at
\begin{eqnarray} \label{start}
\frac{(2-t)}{2} \int \omega_2 e^{(2t+1) u} \phi^2  & \le & \int \omega_1 e^{2tu} \left( | \nabla \phi |^2 - \frac{ \Delta \phi}{2} \right) dx \nonumber \\
&& - \frac{1}{2} \int e^{2tu} \phi \nabla \omega_1 \cdot \nabla \phi 
\end{eqnarray}   Now substitute $ \phi^m$ into this inequality for $ \phi$ where $ m $ is a big integer to obtain
\begin{eqnarray} \label{start_1}
\frac{(2-t)}{2} \int \omega_2 e^{(2t+1) u} \phi^{2m}  & \le & C_m \int \omega_1 e^{2tu} \phi^{2m-2}  \left( | \nabla \phi |^2 + \phi |\Delta \phi|  \right) dx \nonumber \\
&& - D_m \int e^{2tu} \phi^{2m-1} \nabla \omega_1 \cdot \nabla \phi
\end{eqnarray} where $ C_m$ and $ D_m$ are positive constants just depending on $m$    We now estimate the  terms on the right but we mention that when ones assume the appropriate monotonicity on $ \omega_1$ it is the last integral on the right which one is able to drop 

\begin{eqnarray*}
\int \omega_1 e^{2tu} \phi^{2m-2} | \nabla \phi|^2 & = & \int \omega_2^\frac{2t}{2t+1} e^{2tu} \phi^{2m-2}  \frac{ \omega_1 }{\omega_2^\frac{2t}{2t+1}} | \nabla \phi|^2  \\
& \le &  \left( \int \omega_2 e^{(2t+1) u} \phi^{(2m-2) \frac{(2t+1)}{2t}} dx \right)^\frac{2t}{2t+1}\\ &&\left( \int \frac{ \omega_1 ^{2t+1}}{\omega_2^{2t}} | \nabla \phi |^{2(2t+1)} \right)^\frac{1}{2t+1} 
\end{eqnarray*}
Now, for fixed $ 0 <t<2$ we can take $ m $ big enough so $ (2m-2) \frac{(2t+1)}{2t} \ge 2m $ and since $ 0 \le \phi \le 1$ this allows us to replace the power on $ \phi$ in the first term on the right with $2m$   and hence we obtain
 \begin{equation} \label{three}
 \int \omega_1 e^{2tu} \phi^{2m-2} | \nabla \phi|^2  \le \left( \int \omega_2 e^{(2t+1) u} \phi^{2m} dx \right)^\frac{2t}{2t+1} \left( \int \frac{ \omega_1 ^{2t+1}}{\omega_2^{2t}} | \nabla \phi |^{2(2t+1)} \right)^\frac{1}{2t+1} 
 \end{equation}    We now take the test functions $ \phi$ to be such that $ 0 \le  \phi \le 1$ with $ \phi $ supported in the ball $ B_{2R}$ with $ \phi = 1 $ on $ B_R$ and $ | \nabla \phi | \le \frac{C}{R}$ where $ C>0$ is independent of $ R$    Putting this choice of $ \phi$ we obtain
 \begin{equation} \label{four}
 \int \omega_1 e^{2tu} \phi^{2m-2} | \nabla \phi |^2 \le \left( \int \omega_2 e^{(2t+1)u} \phi^{2m} \right)^\frac{2t}{2t+1} I_G^\frac{1}{2t+1} 
 \end{equation}  One similarly shows that
 \[ \int \omega_1 e^{2tu} \phi^{2m-1} | \Delta \phi| \le \left( \int \omega_2 e^{(2t+1)u} \phi^{2m} \right)^\frac{2t}{2t+1} I_G^\frac{1}{2t+1} \]
 So, combining the results we obtain

 \begin{eqnarray} \label{last} \nonumber \frac{(2-t)}{2} \int \omega_2 e^{(2t+1) u} \phi^{2m} &\le& C_m \left( \int \omega_2 e^{(2t+1) u} \phi^{2m} dx \right)^\frac{2t}{2t+1} I_G^\frac{1}{2t+1}\\
 &&- D_m \int e^{2tu} \phi^{2m-1}  \nabla \omega_1 \cdot \nabla \phi 
 \end{eqnarray}
 We now estimate this last term   A similar argument using H\"{o}lder's inequality shows that
 \[ \int e^{2tu} \phi^{2m-1} | \nabla \omega_1| | \nabla \phi| \le \left(  \int \omega_2 \phi^{2m} e^{(2t+1) u} dx \right)^\frac{2t}{2t+1} J_G^\frac{1}{2t+1}  \] Combining the results gives that
\begin{equation} \label{last}
(2-t) \left( \int \omega_2 e^{(2t+1) u} \phi^{2m} dx \right)^\frac{1}{2t+1} \le I_G^\frac{1}{2t+1} + J_G^\frac{1}{2t+1},
\end{equation} and now we send $ R \rightarrow \infty$ and use the fact that $ I_G, J_G \rightarrow 0$ as $ R \rightarrow \infty$ to see that
\[ \int \omega_2 e^{(2t+1) u} =0, \] which is clearly a contradiction    Hence there is no stable sub-solution of $(G)$ 

(2)    Suppose that $u >0$ is a stable sub-solution (super-solution) of $(L)$   Then a similar calculation as in (1) shows that for  $ p - \sqrt{p(p-1)} <t < p + \sqrt{p(p-1)}$,  $( 0 <t<\frac{1}{2})$ one has

\begin{eqnarray}   \label{shit}
(p  -\frac{t^2}{2t-1}   )\int \omega_2 u^{2t+p-1} \phi^{2m} & \le & D_m \int \omega_1 u^{2t} \phi^{2(m-1)} (|\nabla\phi|^2  +\phi |\Delta \phi |) \nonumber \\
&& +C_m \frac{(1-t)}{2(2t-1)} \int u^{2t} \phi^{2m-1}\nabla \omega_1 \cdot  \nabla \phi 
 \end{eqnarray}    One now applies H\"{o}lder's argument as in (1) but the terms $ I_L$ and $J_L$ will appear on the right hand side of the resulting
 equation       This shift from a sub-solution to a super-solution depending on whether $ t >\frac{1}{2}$ or $ t < \frac{1}{2}$ is a result from the sign change of $ 2t-1$ at $ t = \frac{1}{2}$    We leave the details for the reader 


(3)   This case is also similar to (1) and (2) 


\hfill $ \Box$

 \textbf{Proof of Theorem \ref{mono} }   (1)   Again we suppose there is a stable sub-solution $u$ of $(G)$   Our starting point  is (\ref{start_1}) and we wish to be able to drop the term
 \[ - D_m \int e^{2tu} \phi^{2m-1} \nabla \omega_1 \cdot \nabla \phi, \] from (\ref{start_1})     We can choose $ \phi$ as in the proof of Theorem \ref{main_non_exist} but also such that $ \nabla \phi(x) = - C(x) x$ where $ C(x) \ge 0$      So if we assume that $ \nabla \omega_1 \cdot x \le 0$ for big $x$ then we see that this last term is non-positive and hence we can drop the term   The the proof is as before but now we only require that $ \lim_{R \rightarrow \infty} I_G=0$ 

 (2)      Suppose that $ u >0$ is a stable sub-solution of $(L)$  and so (\ref{shit}) holds for all $  p - \sqrt{p(p-1)} <t< p + \sqrt{p(p-1)}$    Now we wish to use monotonicity to drop the term from (\ref{shit}) involving the term $ \nabla \omega_1 \cdot \nabla \phi$       $ \phi$ is chosen the same as in (1)  but here one notes that the co-efficient for this term changes sign at $ t=1$ and hence by restriction $t$ to the appropriate side of 1 (along with the above condition on $t$ and $\omega_1$) we can drop the last term depending on which monotonicity we have and hence to obtain a contraction we only require that $ \lim_{R \rightarrow \infty} I_L =0$    The result for the non-existence of a stable super-solution is similar be here one restricts $ 0 < t < \frac{1}{2}$ 


(3)   The proof here is similar to (1) and (2) and we omit the details 




 \hfill $\Box$













\textbf{Proof of Corollary \ref{thing} }   We suppose  that $ \omega_1 \le C  \omega_2$  for big $ x$, $ \omega_2 \in L^\infty$,  $ \nabla \omega_1(x) \cdot  x \le 0$ for big $ x$      \\
(1)     Since $ \nabla \omega_1 \cdot x \le 0$ for big $x$ we can apply Theorem \ref{mono} to show the non-existence of a stable solution to $(G)$    Note that  with the above assumptions on $ \omega_i$ we have that
\[ I_G \le \frac{C R^N}{R^{4t+2}} \]  For $ N \le 9$  we can take $ 0 <t<2$  but close enough to $2$ so the right hand side goes to zero as $ R \rightarrow \infty$ 

Both (2) and (3) also follow directly from applying Theorem \ref{mono}    Note that one can say more about (2) by taking the multiple cases as listed in Theorem \ref{mono} but we have choice to leave this to the reader 


\hfill $ \Box$


\textbf{Proof of Corollary \ref{po} }   Since we have no monotonicity conditions now we will need both $I$ and $J$ to go to zero to show the non-existence of a stable solution    Again the results are obtained immediately by applying Theorem \ref{main_non_exist}  and we prefer to omit the details 


\hfill $\Box$
















\textbf{Proof of Theorem \ref{alpha_beta} }  (1)   If $ N + \alpha -2 <0$ then using Remark \ref{triv}  one easily sees there is no stable sub-solution of $(G)$ and $(L)$ (positive for $(L)$) or a positive stable super-solution of $(M)$    So we now assume that $ N + \alpha -2 > 0$      Note that the monotonicity of $ \omega_1$ changes when $ \alpha $ changes sign and hence one would think that we need to consider separate cases if we hope to utilize the monotonicity results    But a computation shows that in fact $ I$ and $J$ are just multiples of each other in all three cases so it suffices to show, say, that $ \lim_{R \rightarrow \infty} I =0$  \\
(2)    Note that for $ R >1$ one has
\begin{eqnarray*}
I_G & \le  & \frac{C}{R^{4t+2}} \int_{R <|x| < 2R} |x|^{ \alpha (2t+1) - 2t \beta} \\
& \le  &  \frac{C}{R^{4t+2}}  R^{N + \alpha (2t+1) - 2t \beta},
\end{eqnarray*} and so to show the non-existence we want to find some $ 0 <t<2$ such that
$  4t+2 > N  + \alpha(2t+1) - 2 t \beta$,   which is equivalent to  $ 2t ( \beta - \alpha +2) > (N + \alpha -2)$     Now recall that we are assuming that $ 0 < N + \alpha -2 < 4 ( \beta - \alpha +2) $ and hence we have the desired result by taking $  t <2$ but sufficiently close 
The proof of the non-existence results for
(3) and (4) are similar and we omit the details    \\
(5)   We now assume that $N+\alpha-2>0$   In showing the existence of stable sub/super-solutions we need to consider  $ \beta - \alpha + 2 <0$ and $ \beta - \alpha +2 >0$ separately 

\begin{itemize} \item $(\beta - \alpha + 2 <0)$  Here we take $ u(x)=0$ in the case of $(G)$ and $ u=1$ in the case of $(L)$ and $(M)$  In addition we take $ g(x)=\E$   It is clear that in all cases $u$ is the appropriate sub or super-solution   The only thing one needs to check is the stability     In all cases this reduces to trying to show that we have
\[ \sigma \int       (1+|x|^2)^{\frac{\alpha}{2}  -1}    \phi^2 \le \int      (1+|x|^2)^{\frac{\alpha}{2}}   | \nabla\phi  |^2,\]  for all $ \phi \in C_c^\infty$ where  $ \sigma $ is some small positive constant; its either $ \E$ or $ p \E$ depending on which equation were are examining 
To show this we use the result from Corollary \ref{Hardy} and we drop a few positive terms to arrive at
\begin{equation*}
\int (1+|x|^2)^\frac{\alpha}{2} |\nabla\phi|^2\ge (t+\frac{\alpha}{2})\int \left (N-2(t+1)   \frac{|x|^2}{1+|x|^2}\right) (1+|x|^2)^{-1+\frac{\alpha} {2}}
\end{equation*} which holds for all $ \phi \in C_c^\infty$ and $ t,\alpha \in {\mathbb{R}}$ 
  Now, since $N+\alpha-2>0$, we can choose $t$ such that $-\frac{\alpha}{2}<t<\frac{n-2}{2}$   So, the integrand function in the right hand side is positive and since for small enough $\sigma$ we have
  \begin{equation*}
\sigma \le  (t+\frac{\alpha}{2})(N-2(t+1)   \frac{|x|^2}{1+|x|^2})  \ \ \ \text {for all} \ \ x\in \mathbb{R}^N
\end{equation*}
 we get stability 



\item ($\beta-\alpha+2>0$) In the case of $(G)$ we take   $u(x)=-\frac{\beta-\alpha+2}{2} \ln(1+|x|^2)$ and $g(x):= (\beta-\alpha+2)(N+(\alpha-2)\frac{|x|^2}{1+|x|^2})$  By a computation one sees that $u$ is a sub-solution of $(G)$ and hence we need now to only show the stability, which amounts to showing that
\begin{equation*}
\int \frac{g(x)\psi^2}{(1+|x|^{2   })^{-\frac{\alpha}{2}+1}}\le \int\frac{|\nabla\psi|^2}{    (1+|x|^2)^{-\frac{\alpha}{2}}     },
\end{equation*} for all $ \psi \in C_c^\infty$   To show this we use  Corollary \ref{Hardy}   So  we  need to choose an appropriate $t$ in   $-\frac{\alpha}{2}\le t\le\frac{N-2}{2}$  such that for all $x\in {\mathbb{R}}^N$ we have
 \begin{eqnarray*}
 (\beta-\alpha+2)\left(    N+  (\alpha-2)\frac{|x|^2}{1+|x|^2}\right)         &\le& (t+\frac{\alpha}{2})^2 \frac{ |x|^2 }{(1+|x|^2}\\
&&+(t+\frac{\alpha}{2}) \left(N-2(t+1)   \frac{|x|^2}{1+|x|^2}\right) 
\end{eqnarray*}
With a  simple calculation one sees we need just to have
   \begin{eqnarray*}
 (\beta-\alpha+2)&\le& (t+\frac{\alpha}{2}) \\
  (\beta-\alpha+2)     \left(    N+  \alpha-2\right)      &   \le&  (t+\frac{\alpha}{2}) \left(N-t-2+\frac{\alpha}{2}) \right) 
 \end{eqnarray*}     If one takes $ t= \frac{N-2}{2}$ in the case where $ N \neq 2$ and $ t $ close to zero in the case for $ N=2$ one easily sees the above inequalities both hold, after considering all the constraints on $ \alpha,\beta$ and $N$ 

 We now consider the case of $(L)$   Here one takes $g(x):=\frac {\beta-\alpha+2}{p-1}(    N+  (\alpha-2-\frac{\beta-\alpha+2}{p-1})
\frac{|x|^2}{1+|x|^2})$ and $ u(x)=(1+|x|^2)^{ -\frac  {\beta-\alpha+2}{2(p-1)} }$    Using essentially the same approach as in $(G)$ one shows that $u$ is a stable sub-solution of $(L)$ with this choice of $g$    \\
For the case of $(M)$ we take   $u(x)=(1+|x|^2)^{ \frac  {\beta-\alpha+2}{2(p+1)}   }$ and $g(x):=\frac {\beta-\alpha+2}{p+1}(    N+  (\alpha-2+\frac{\beta-\alpha+2}{p+1})
\frac{|x|^2}{1+|x|^2})$ 



\end{itemize}


\hfill  $  \Box$









Context 2: \section{Introduction}
Given a data set and a model with some unknown parameters, the inverse problem aims to find the values of the model parameters that best fit the data   
In this work, in which we focus on systems of interacting elements,
 the inverse problem concerns  the statistical inference
 of the underling interaction network and of its coupling coefficients from observed data on the dynamics  of the system  
 Versions of this problem are encountered in physics, biology (e g , \cite{Balakrishnan11,Ekeberg13,Christoph14}), social sciences and finance (e g ,\cite{Mastromatteo12,yamanaka_15}), neuroscience (e g , \cite{Schneidman06,Roudi09a,tyrcha_13}), just to cite a few, and are becoming more and more important due to the increase in the amount of data available from these fields \\
 \indent 
 A standard approach used in statistical inference is to predict the interaction couplings by maximizing the likelihood function 
 This technique, however, requires the evaluation of the  
 
   partition function that, in the most general case, concerns a number of computations scaling exponentially with the system size 
  
  
    Boltzmann machine learning uses Monte Carlo sampling to compute the gradients of the Log-likelihood looking for stationary points \cite{Murphy12} but this method is computationally manageable only for small systems  A series of faster approximations, such as naive mean-field, independent-pair approximation \cite{Roudi09a, Roudi09b}, inversion of TAP equations \cite{Kappen98,Tanaka98}, small correlations expansion \cite{Sessak09}, adaptive TAP \cite{Opper01}, adaptive  cluster expansion \cite{Cocco12} or Bethe approximations \cite{Ricci-Tersenghi12, Nguyen12}  have, then, been developed  These techniques take as input means and correlations of observed variables and most of them assume a fully connected graph as underlying connectivity network, or expand  around it by perturbative dilution   In most cases, network reconstruction turns out to  be not accurate for small data sizes and/or when couplings are  strong or, else, if the original interaction network is sparse \\
\indent
 A further method, substantially improving performances for small data, is the so-called Pseudo-Likelyhood Method (PLM) \cite{Ravikumar10}  In Ref  \cite{Aurell12} Aurell and Ekeberg performed a comparison between PLM and some of the just mentioned mean-field-based algorithms on the pairwise interacting Ising-spin  ($\sigma = \pm 1$) model, showing how PLM performs sensitively better, especially on sparse graphs and in the high-coupling limit, i e , for low temperature 
 
 In this work, we aim at performing statistical inference  on a model whose interacting variables are continuous $XY$ spins, i e , $\sigma \equiv \left(\cos \phi,\sin \phi\right)$ with $\phi \in [0, 2\pi )$  The developed tools can, actually, be also straightforward applied  to the $p$-clock model  \cite{Potts52} where the phase $\phi$ takes discretely equispaced $p$ values  in the $2 \pi$ interval, $\phi_a =  a 2 \pi/p$, with $a= 0,1,\dots,p-1$  The $p$-clock model, else called vector Potts model, gives a hierarchy of discretization of the $XY$ model as $p$ increases  For $p=2$, one recovers the Ising model, for $p=4$ the Ashkin-Teller model \cite{Ashkin43}, for $p=6$ the ice-type model \cite{Pauling35,Baxter82} and the eight-vertex model \cite{Sutherland70,Fan70,Baxter71} for $p=8$   
It turns out to be very useful also for numerical implementations of the continuous $XY$ model  
Recent analysis on the multi-body $XY$ model has shown that for a limited number of discrete phase values ($p\sim 16, 32$) the thermodynamic critical properties of the $p\to\infty$ $XY$ limit are promptly recovered \cite{Marruzzo15, Marruzzo16}   
Our main motivation to study statistical inference is that these kind of models have recently turned out to be rather useful in describing the behavior of optical systems, 
including standard mode-locking lasers \cite{Gordon02,Gat04,Angelani07,Marruzzo15} and random lasers \cite{Angelani06a,Leuzzi09a,Antenucci15a,Antenucci15b,Marruzzo16}  
In particular, the inverse problem on the pairwise XY model analyzed here might be of help in recovering images from light propagated through random media  


      This paper is organized as follows: in Sec  \ref{sec:model} we introduce the general model  and we discuss its  derivation also  as a model for light transmission through random scattering media  
    In Sec  \ref{sec:plm} we introduce the PLM with $l_2$ regularization  and with decimation, two variants of the PLM respectively introduced in Ref  \cite{Wainwright06} and \cite{Aurell12} for the inverse Ising problem  
    Here, we analyze these techniques for continuous $XY$ spins and we test them on thermalized data generated by Exchange Monte Carlo numerical simulations of the original model dynamics  In Sec  \ref{sec:res_reg} we  present the results related to the PLM-$l_2$  In Sec  \ref{sec:res_dec} the results related to the PLM with decimation are reported and its performances are compared to the PLM-$l_2$ and to a variational mean-field method analyzed in Ref  \cite{Tyagi15}  In Sec  \ref{sec:conc}, we outline conclusive remarks and perspectives 

        \section{The leading $XY$ model}
      \label{sec:model}
 The leading model we are considering is defined, for a system of $N$ angular $XY$ variables, by the Hamiltonian 
 \begin{equation}
  \mathcal{H} = - \sum_{ik}^{1,N} J_{ik} \cos{\left(\phi_i-\phi_k\right)} 
  \label{eq:HXY}
 
  \end{equation} 
  
  The $XY$ model is well known in statistical mechanics, displaying important physical
  insights, starting from the Berezinskii-Kosterlitz-Thouless
  transition in two dimensions\cite{Berezinskii70,Berezinskii71,Kosterlitz72} and moving to, e g , the
  transition of liquid helium to its superfluid state \cite{Brezin82}, the roughening transition of the interface of a crystal in equilibrium with its vapor \cite{Cardy96}  In presence of disorder and frustration \cite{Villain77,Fradkin78} the model has been adopted to describe synchronization problems as the Kuramoto model \cite{Kuramoto75} and in the theoretical modeling of Josephson junction arrays \cite{Teitel83a,Teitel83b} and arrays of coupled lasers \cite{Nixon13} 
  Besides several derivations and implementations of the model in quantum and classical physics, equilibrium or out of equilibrium, ordered or fully frustrated systems, Eq  (\ref{eq:HXY}), in its generic form,
  has found applications also in other fields  A rather fascinating example being the behavior of starlings flocks  \cite{Reynolds87,Deneubourg89,Huth90,Vicsek95, Cavagna13} 
  Our interest on the $XY$ model resides, though, in optics  Phasor and phase models with pairwise and  multi-body interaction terms can, indeed, describe the behavior of electromagnetic modes in both linear and nonlinear optical systems in the analysis of problems such as light propagation and lasing \cite{Gordon02, Antenucci15c, Antenucci15d}  As couplings are strongly frustrated, these models turn out to be especially useful to the study of optical properties in random media \cite{Antenucci15a,Antenucci15b}, as in the noticeable case of random lasers \cite{Wiersma08,Andreasen11,Antenucci15e}  and they might as well be applied to linear scattering problems, e g , propagation of waves in opaque systems or disordered fibers  
  
  
  \subsection{A propagating wave model}
  We briefly mention a derivation of the model as a proxy for the propagation of light through random linear media  
 Scattering of light is held responsible to obstruct our view and make objects opaque  Light rays, once that they enter the material, only exit  after getting scattered multiple times within the material  In such a disordered medium, both the direction and the phase of the propagating waves are random  Transmitted light 
 yields a disordered interference pattern typically  having low intensity, random phase and almost no resolution, called a speckle  Nevertheless, in recent years it has been realized that disorder is rather a blessing in disguise \cite{Vellekoop07,Vellekoop08a,Vellekoop08b}  Several experiments have made it possible to control the behavior of light and other optical processes in a given random disordered medium,  
 by exploiting, e g ,  the tools developed for wavefront shaping to control the propagation of light and to engineer the confinement of light \cite{Yilmaz13,Riboli14} 
 \\
 \indent
 In a linear dielectric medium, light propagation can be described through a part of the scattering matrix, the transmission matrix $\mathbb{T}$, linking the outgoing to the incoming fields  
 Consider the case in which there are $N_I$ incoming channels and $N_O$ outgoing ones; we can indicate with $E^{\rm in,out}_k$ the input/output electromagnetic field phasors of channel $k$  In the most general case, i e , without making any particular assumptions on the field polarizations, each light mode and its polarization polarization state can be represented by means of the $4$-dimensional Stokes vector  Each $ t_{ki}$ element of $\mathbb{T}$, thus, is a $4 \times 4$ M{\"u}ller matrix  If, on the other hand, we know that the source is polarized and the observation is made on the same polarization, one can use a scalar model and adopt Jones calculus \cite{Goodman85,Popoff10a,Akbulut11}:
   \begin{eqnarray}
 E^{\rm out}_k = \sum_{i=1}^{N_I}  t_{ki} E^{\rm in}_i \qquad \forall~ k=1,\ldots,N_O
 \label{eq:transm}
 \end{eqnarray}
  We recall that the elements of the transmission matrix are random complex coefficients\cite{Popoff10a}  For the case of completely unpolarized modes, we can also use a scalar model similar to Eq  \eqref{eq:transm}, but whose variables are  the intensities of the outgoing/incoming fields, rather than the fields themselves \\ 
In the following, for simplicity, we will consider Eq  (\ref{eq:transm}) as our starting point,
where $E^{\rm out}_k$, $E^{\rm in}_i$ and $t_{ki}$ are all complex scalars  
If Eq  \eqref{eq:transm} holds for any $k$, we can write:
  \begin{eqnarray}
  \int \prod_{k=1}^{N_O} dE^{\rm out}_k \prod_{k=1}^{N_O}\delta\left(E^{\rm out}_k - \sum_{j=1}^{N_I}  t_{kj} E^{\rm in}_j \right) = 1
  \nonumber
  \\
  \label{eq:deltas}
  \end{eqnarray}

 Observed data are a noisy representation of the true values of the fields  Therefore, in inference problems it is statistically more meaningful to take that noise into account in a probabilistic way, 
 rather than looking  at the precise solutions of the exact equations (whose parameters are unknown)  
 To this aim we can introduce Gaussian distributions whose limit for zero variance are the Dirac deltas in Eq  (\ref{eq:deltas}) 
 Moreover, we move to consider the ensemble of all possible solutions of Eq  (\ref{eq:transm}) at given $\mathbb{T}$, looking at  all configurations of input fields  We, thus, define the function:
 
   \begin{eqnarray}
  Z &\equiv &\int_{{\cal S}_{\rm in}} \prod_{j=1}^{N_I}  dE^{\rm in}_j \int_{{\cal S}_{\rm out}}\prod_{k=1}^{N_O} dE^{\rm out}_k 
  \label{def:Z}
\\
    \times
  &&\prod_{k=1}^{N_O}
   \frac{1}{\sqrt{2\pi \Delta^2}}  \exp\left\{-\frac{1}{2 \Delta^2}\left|
  E^{\rm out}_k -\sum_{j=1}^{N_I}  t_{kj} E^{\rm in}_j\right|^2
\right\} 
\nonumber
 \end{eqnarray}
   We stress that the integral of Eq  \eqref{def:Z} is not exactly a Gaussian integral  Indeed, starting from Eq  \eqref{eq:deltas}, two constraints on the electromagnetic field intensities must be taken into account  

  The space of solutions is  delimited by the total power ${\cal P}$ received by system, i e , 
  ${\cal S}_{\rm in}: \{E^{\rm in} |\sum_k I^{\rm in}_k = \mathcal{P}\}$, also implying  a constraint on the total amount of energy that is transmitted through the medium, i  e , 
  ${\cal S}_{\rm out}:\{E^{\rm out} |\sum_k I^{\rm out}_k=c\mathcal{P}\}$, where the attenuation factor  $c<1$ accounts for total losses 
  As we will see more in details in the following, being interested in inferring the transmission matrix through the PLM, we can omit to explicitly include these terms in Eq  \eqref{eq:H_J} since they do not depend on $\mathbb{T}$ not adding any information on the gradients with respect to the elements of $\mathbb{T}$ 
  
 Taking the same number of incoming and outcoming channels, $N_I=N_O=N/2$, and  ordering the input fields in the first $N/2$ mode indices and the output fields in the last $N/2$ indices, we can drop the ``in'' and ``out'' superscripts and formally write $Z$  as a partition function
    \begin{eqnarray}
        \label{eq:z}
 && Z =\int_{\mathcal S} \prod_{j=1}^{N} dE_j \left(   \frac{1}{\sqrt{2\pi \Delta^2}} \right)^{N/2} 
 \hspace*{- 4cm} \exp\left\{
  -\frac{ {\cal H} [\{E\};\mathbb{T}] }{2\Delta^2}
  \right\}
  \\
&&{\cal H} [\{E\};\mathbb{T}] =
-  \sum_{k=1}^{N/2}\sum_{j=N/2+1}^{N} \left[E^*_j t_{jk} E_k + E_j t^*_{kj} E_k^* 
\right]
 \nonumber
\\
&&\qquad\qquad \qquad + \sum_{j=N/2+1}^{N} |E_j|^2+ \sum_{k,l}^{1,N/2}E_k
U_{kl} E_l^*
 \nonumber
 \\
 \label{eq:H_J}
 &&\hspace*{1 88cm } = - \sum_{nm}^{1,N} E_n J_{nm} E_m^*
 \end{eqnarray}
 where ${\cal H}$ is a real-valued function by construction, we have introduced the effective input-input coupling matrix
\begin{equation}
U_{kl} \equiv \sum_{j=N/2+1}^{N}t^*_{lj} t_{jk} 
 \label{def:U}
 \end{equation}
 and the whole interaction matrix reads (here $\mathbb{T} \equiv \{ t_{jk} \}$)
 \begin{equation}
 \label{def:J}
 \mathbb J\equiv \left(\begin{array}{ccc|ccc}
 \phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}\\
 \phantom{()}&-\mathbb{U} \phantom{()}&\phantom{()}&\phantom{()}&{\mathbb{T}}&\phantom{()}\\
\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}\\
 \hline
\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}&\phantom{()}\\
 \phantom{()}& \mathbb   T^\dagger&\phantom{()}&\phantom{()}& - \mathbb{I} &\phantom{()}\\
\phantom{a}&\phantom{a}&\phantom{a}&\phantom{a}&\phantom{a}&\phantom{a}\\
 \end{array}\right)
 \end{equation}
 
 Determining the electromagnetic complex amplitude configurations that minimize the {\em cost function} ${\cal H}$, Eq   (\ref{eq:H_J}),  means to maximize the overall distribution peaked around the solutions of the transmission Eqs  (\ref{eq:transm})  As the variance $\Delta^2\to 0$, eventually, the initial set of Eqs  (\ref{eq:transm}) are recovered  The ${\cal H}$ function, thus, plays the role of an Hamiltonian and  $\Delta^2$ the role of a noise-inducing temperature  The exact numerical problem corresponds to the zero temperature limit of the statistical mechanical problem  Working with real data, though, which are noisy, a finite ``temperature''
  allows for a better representation of the ensemble of solutions to the sets of equations of continuous variables  
  

  
  
  Now, we can express every phasor in Eq  \eqref{eq:z}  as $E_k = A_k e^{\imath \phi_k}$  As a working hypothesis we will consider the intensities $A_k^2$ as either homogeneous or as \textit{quenched} with respect to phases 
The first condition occurs, for instance, to the input intensities $|E^{\rm in}_k|$ produced by a phase-only spatial light modulator (SLM) with homogeneous illumination \cite{Popoff11} 
With \textit{quenched} here we mean, instead, that the intensity of each mode is the same for every solution of Eq  \eqref{eq:transm} at fixed $\mathbb T$ 
We stress that, including intensities in the model does not preclude the inference analysis but it is out of the focus of the present work and will be considered elsewhere  

If all intensities are uniform in input and in output, this amount to a constant rescaling for each one of the four sectors of matrix $\mathbb J$ in Eq  (\ref{def:J}) that will not change the properties of the matrices 
For instance, if the original transmission matrix is unitary, so it will be the rescaled one and the matrix $\mathbb U$ will be  diagonal 
Otherwise, if intensities are \textit{quenched}, i e , they can be considered as constants in Eq  (\ref{eq:transm}),
they are inhomogeneous with respect to phases  The generic Hamiltonian element will, therefore, rescale as 
  \begin{eqnarray}
  E^*_n J_{nm} E_m = J_{nm} A_n A_m e^{\imath (\phi_n-\phi_m)} \to J_{nm} e^{\imath (\phi_n-\phi_m)}
  \nonumber
  \end{eqnarray}
  and the properties of the original  $J_{nm}$ components are not conserved  in the rescaled one  In particular, we have no argument, anymore, to possibly set the rescaled $U_{nm}\propto \delta_{nm}$ 
  Eventually, we end up with the complex couplings $XY$ model, whose real-valued Hamiltonian is written as
 \begin{eqnarray}
  \mathcal{H}& = &  - \frac{1}{2} \sum_{nm} J_{nm} e^{-\imath (\phi_n - \phi_m)}  + \mbox{c c } 
    \label{eq:h_im}
\\    &=&  - \frac{1}{2} \sum_{nm} \left[J^R_{nm} \cos(\phi_n - \phi_m)+
  J^I_{nm}\sin (\phi_n - \phi_m)\right] 
  \nonumber
 \end{eqnarray}
where $J_{nm}^R$ and $J_{nm}^I$ are the real and imaginary parts of $J_{nm}$  Being $\mathbb J$  Hermitian, $J^R_{nm}=J^R_{mn}$ is symmetric and $J_{nm}^I=-J_{mn}^I$ is skew-symmetric 

\begin{comment}
\textcolor{red}{
F: comment about quenched:
I think that to obtain the XY model, it is not necessary that the intensities are strictly quenched (that is also a quite unfeasible situation, I guess) 
Indeed eq (2) does not deal with the dynamics of the modes, but just connect the in and out ones 
For this, what it is necessary to have the XY model, it is that the intensities are always the same on the different samples
(so that the matrix $t_{ij}$ is the same for different phase data)  If the intensities are fixed, then they can be incorporated in $t_{ij}$ and eq (2) can be written just for phases as described  \\
}
\end{comment}


  \section{Pseudolikelihood Maximization}
  \label{sec:plm}
The inverse problem consists in the reconstruction of the parameters $J_{nm}$ of the Hamiltonian, Eq  (\ref{eq:h_im})   
Given a set of $M$ data configurations of $N$ spins
 $\bm\sigma = \{ \cos \phi_i^{(\mu)},\sin \phi_i^{(\mu)} \}$, $i = 1,\dots,N$ and $\mu=1,\dots,M$, we want to \emph{infer} the couplings:
 \begin{eqnarray}
\bm \sigma  \rightarrow  \mathbb{J} 
\nonumber
 \end{eqnarray}
 With this purpose in mind,
 in the rest of this section we implement the working equations for the techniques used  
 In order to test our methods, we generate the input data, i e , the configurations, by Monte-Carlo simulations of the model 
 The joint probability distribution of the $N$ variables $\bm{\phi}\equiv\{\phi_1,\dots,\phi_N\}$, follows the Gibbs-Boltzmann distribution:
 \begin{equation}\label{eq:p_xy}
 P(\bm{\phi}) = \frac{1}{Z} e^{-\beta \mathcal{H\left(\bm{\phi}\right)}} \quad \mbox{ where } \quad Z = \int \prod_{k=1}^N d\phi_k  e^{-\beta \mathcal{H\left(\bm{\phi}\right)}}  
 \end{equation}
 and where we denote $\beta=\left( 2\Delta^2 \right)^{-1}$ with respect to Eq  (\ref{def:Z}) formalism 
 In order to stick to usual statistical inference notation, in the following we will rescale the couplings by a factor $\beta / 2$: $\beta J_{ij}/2 \rightarrow J_{ij}$  
 The main idea of the PLM is to work with the conditional probability distribution of one variable $\phi_i$ given all other variables, 
 $\bm{\phi}_{\backslash i}$:
 
  \begin{eqnarray}
	\nonumber
   P(\phi_i | \bm{\phi}_{\backslash i}) &=& \frac{1}{Z_i} \exp \left \{ {H_i^x (\bm{\phi}_{\backslash i})
  	\cos \phi_i + H_i^y (\bm{\phi}_{\backslash i}) \sin \phi_i } \right \}
	\\
 \label{eq:marginal_xy}
	&=&\frac{e^{H_i(\bm{\phi}_{\backslash i}) \cos{\left(\phi_i-\alpha_i(\bm{\phi}_{\backslash i})\right)}}}{2 \pi I_0(H_i)}
  \end{eqnarray}
  where $H_i^x$ and $H_i^y$ are defined as
   \begin{eqnarray}
   H_i^x (\bm{\phi}_{\backslash i})  &=& \sum_{j (\neq i)} J^R_{ij} \cos \phi_j  - \sum_{j  (\neq i) } J_{ij}^{I} \sin \phi_j \phantom{+  h^R_i} \label{eq:26} \\
   H_i^y  (\bm{\phi}_{\backslash i})  &=&  \sum_{j  (\neq i)} J^R_{ij}  \sin \phi_j  + \sum_{j  (\neq i) } J_{ij}^{I}   \cos \phi_j \phantom{ + h_i^{I} }\label{eq:27}
   \end{eqnarray}
and $H_i= \sqrt{(H_i^x)^2 + (H_i^y)^2}$, $\alpha_i = \arctan H_i^y/H_i^x$   and we introduced the modified Bessel function of the first kind:
  \begin{equation}
  \nonumber
   I_k(x) = \frac{1}{2 \pi}\int_{0}^{2 \pi} d \phi e^{x \cos{ \phi}}\cos{k \phi}
  \end{equation}
  
   Given $M$ observation samples $\bm{\phi}^{(\mu)}=\{\phi^\mu_1,\ldots,\phi^\mu_N\}$, $\mu = 1,\dots, M$, the
   pseudo-loglikelihood for the variable $i$ is given by the logarithm of Eq  (\ref{eq:marginal_xy}),
   \begin{eqnarray}
   \label{eq:L_i}
   L_i &=& \frac{1}{M}  \sum_{\mu = 1}^M  \ln P(\phi_i^{(\mu)}|\bm{\phi}^{(\mu)}_{\backslash i})
   \\
   \nonumber
   & =&  \frac{1}{M}  \sum_{\mu = 1}^M  \left[ H_i^{(\mu)} \cos( \phi_i^{(\mu)} - \alpha_i^{(\mu)}) - \ln  2 \pi I_0\left(H_i^{(\mu)}\right)\right] \,  
    \end{eqnarray}
The underlying idea of PLM is that an approximation of the true parameters of the model is obtained for values that maximize the functions $L_i$ 
The specific maximization scheme differentiates the different techniques 


   
   
   \subsection{PLM with $l_2$ regularization}
   Especially for the case of sparse graphs, it is useful to add a regularizer, which prevents the maximization routine to move towards high values of 
   $J_{ij}$ and $h_i$ without converging  We will adopt an $l_2$ regularization so that the Pseudolikelihood function (PLF) at site $i$  reads:
   \begin{equation}\label{eq:plf_i}
  {\cal L}_i = L_i
  - \lambda \sum_{i \neq j} \left(J_{ij}^R\right)^2 - \lambda \sum_{i \neq j} \left(J_{ij}^I\right)^2  
   \end{equation}
   with $\lambda>0$ 
   Note that the values of $\lambda$ have to be chosen arbitrarily, but not too large, in order not to overcome $L_i$ 
   The standard implementation of the PLM consists in maximizing each ${\cal L}_i$, for $i=1\dots N$, separately  The expected values of the couplings are then:
   \begin{equation}
   \{ J_{i j}^*\}_{j\in \partial i} :=  \mbox{arg max}_{ \{ J_{ij} \}}
    \left[{\cal L}_i\right]
   \end{equation}
   In this way, we obtain two estimates for the coupling $J_{ij}$, one from maximization of ${\cal L}_i$, $J_{ij}^{(i)}$, and another one from ${\cal L}_j$, say $J_{ij}^{(j)}$ 
    Since the original Hamiltonian of the $XY$ model is Hermitian, we know that the real part of the couplings is symmetric while the imaginary part is skew-symmetric  
   
     The final estimate for $J_{ij}$ can then be obtained  averaging the two results:
  
  
  
   \begin{equation}\label{eq:symm}
   J_{ij}^{\rm inferred} = \frac{J_{ij}^{(i)} + \bar{J}_{ij}^{(j)}}{2} 
   \end{equation}
   where with $\bar{J}$ we indicate the complex conjugate 
   It is worth noting that the pseudolikelihood $L_i$, Eq  \eqref{eq:L_i}, is characterized by the
   following properties: (i) the normalization term of Eq \eqref{eq:marginal_xy} can be
   computed analytically at odd with the {\em full} likelihood case that
   in general require a computational time which scales exponentially
   with the size of the systems; (ii) the $\ell_2$-regularized pseudolikelihood
   defined in Eq \eqref{eq:plf_i} is strictly concave (i e  it has a single
   maximizer)\cite{Ravikumar10}; (iii) it is consistent, i e  if $M$ samples are
   generated by a model $P(\phi | J*)$ the maximizer tends to $J*$
   for $M\rightarrow\infty$\cite{besag1975}  Note also that (iii) guarantees that  
   $|J^{(i)}_{ij}-J^{(j)}_{ij}| \rightarrow 0$ for $M\rightarrow \infty$ 
   In Secs  \ref{sec:res_reg}, \ref{sec:res_dec} 
   we report the results obtained and we analyze the performances of the PLM having taken the configurations from Monte-Carlo simulations of models whose details are known 
   

   
   \subsection{PLM with decimation}
   Even though the PLM with $l_2$-regularization allows to dwell the inference towards the low temperature region and in the low sampling case with better performances that mean-field methods, in some situations some couplings are overestimated and not at all symmetric  Moreover, in the technique there is the bias of the $l_2$ regularizer 
   Trying to overcome these problems, Decelle and Ricci-Tersenghi introduced a new method \cite{Decelle14}, known as PLM + decimation: the algorithm maximizes the sum of the $L_i$,
   \begin{eqnarray}
    {\cal L}\equiv \frac{1}{N}\sum_{i=1}^N \mbox{L}_i
    \end{eqnarray}  
    and, then, it recursively set to zero couplings which are estimated very small  We expect that as long as we are setting to zero couplings that are unnecessary to fit the data, there should be not much changing on ${\cal L}$  Keeping on with decimation, a point is reached where ${\cal L}$ decreases abruptly indicating  that relevant couplings are being decimated and under-fitting is taking place 
   Let us define  by $x$  the fraction of non-decimated couplings  To have a quantitative measure for the halt criterion of the decimation process, a tilted ${\cal L}$ is defined as,
   \begin{eqnarray}
  \mathcal{L}_t &\equiv& \mathcal{L}  - x \mathcal{L}_{\textup{max}} - (1-x) \mathcal{L}_{\textup{min}} \label{$t$PLF} 
   \end{eqnarray}
   where 
   \begin{itemize}
   \item $\mathcal{L}_{\textup{min}}$ is the pseudolikelyhood of a model with independent variables  In the XY case: $\mathcal{L}_{\textup{min}}=-\ln{2 \pi}$ 
   \item
   $\mathcal{L}_{\textup{max}}$ is the pseudolikelyhood in the fully-connected model and it is maximized over all the $N(N-1)/2$ possible couplings  
   \end{itemize}
   At the first step, when $x=1$, $\mathcal{L}$ takes value $\mathcal{L}_{\rm max}$ and  $\mathcal{L}_t=0$  On the last step, for an empty graph, i e , $x=0$, $\mathcal{L}$ takes the value $\mathcal{L}_{\rm min}$ and, hence, again $\mathcal{L}_t =0$  
   In the intermediate steps, during the decimation procedure, as $x$ is decreasing from $1$ to $0$, one observes firstly that $\mathcal{L}_t$ increases linearly and, then, it displays an abrupt decrease indicating that from this point on relevant couplings are being decimated\cite{Decelle14}  In Fig  \ref{Jor1-$t$PLF} we give an instance of this behavior for the 2D short-range XY model with ordered couplings  We notice that the maximum point of $\mathcal{L}_t$ coincides with the minimum point of the reconstruction error, the latter defined as 
   \begin{eqnarray}\label{eq:errj}
   \mbox{err}_J \equiv \sqrt{\frac{\sum_{i<j} (J^{\rm inferred}_{ij} -J^{\rm true}_{ij})^2}{N(N-1)/2}} \label{err}
   \end{eqnarray}
  We stress that the ${\cal L}_t$ maximum is obtained ignoring the underlying graph, while the err$_J$ minimum can be evaluated once the true graph has been reconstructed  
   
     \begin{figure}[t!]
   	\centering
   	\includegraphics[width=1\linewidth]{Jor1_dec_tPLF_new eps}
   	\caption{The tilted likelyhood ${\cal L}_t$ curve and the reconstruction error vs the number of decimated couplings  for an ordered, real-valued J on 2D XY model with $N=64$ spins  The peak of ${\cal L}_t$ coincides with the dip of the error }  
   	\label{Jor1-$t$PLF}
   \end{figure} 
       
   
   In the next sections we will show the results obtained on the  $XY$ model analyzing the performances of the two methods and comparing them also with a mean-field method \cite{Tyagi15} 
   
  
    
   \section{Inferred couplings with PLM-$l_2$}
    \label{sec:res_reg}
    \subsection{$XY$ model with real-valued couplings}
    
    In order to obtain the vector of couplings, $J_{ij}^{\rm inferred}$ the function $-\mathcal{L}_i$ is minimized through the vector of derivatives ${\partial \mathcal{L}_i}/\partial J_{ij}$  The process is repeated for all the couplings obtaining then a fully connected adjacency matrix  The results here presented are obtained with $\lambda = 0 01$ 
   For the minimization we have used the MATLAB routine \emph{minFunc\_2012}\cite{min_func}  
      
      \begin{figure}[t!]
    	\centering
    	\includegraphics[width=1\linewidth]{Jor11_2D_l2_JR_soJR_TPJR}
    	\caption{Top panels: instances of single site coupling reconstruction for the case of $N=64$ XY spins on a 2D lattice with ordered $J$ (left column) and bimodal distributed $J$ (right column)  
    	
    	Bottom panels: sorted couplings }
    	\label{PL-Jor1}
    \end{figure}

   
To produce the data by means of numerical Monte Carlo simulations a system with $N=64$  spin variables  is considered on a deterministic 2D lattice with periodic boundary conditions  
Each spin has then connectivity $4$, i e , we expect to infer an adjacency matrix with $N c = 256$ couplings different from zero  
The dynamics of the simulated model is based on the Metropolis algorithm and parallel tempering\cite{earl05} is used to speed up the thermalization of the system 
The thermalization is tested looking at the average energy over logarithmic time windows and
the acquisition of independent configurations
starts only after the system is well thermalized 

   For the values of the couplings we considered two cases: an ordered case, indicated in the figure as  $J$ ordered (e g , left column of Fig  \ref{PL-Jor1}) where the couplings can take values $J_{ij}=0,J$, with $J=1$, 
   and a quenched disordered case, indicated in the figures as  $J$ disordered (e g , right column of Fig  \ref{PL-Jor1})
   where the couplings can take also  negative values, i e , 
    $J_{ij}=0,J,-J$, with a certain probability   The results here presented were obtained with bimodal distributed $J$s: 
   
    $P(J_{ij}=J)=P(J_{ij}=-J)=1/2$   The performances of the PLM have shown not to depend on $P(J)$  
   
    We recall that in Sec  \ref{sec:plm} we used the temperature-rescaled notation, i e , $J_{ij}$ stands for $J_{ij}/T$  
   
    To analyze the performances of the PLM, in Fig  \ref{PL-Jor1} the inferred couplings, $\mathbb{J}^R_{\rm inf}$, are shown on top of the original couplings,  $\mathbb{J}^R_{\rm true}$ 
     The first figure (from top) in the left column shows  the $\mathbb{J}^R_{\rm inf}$ (black) and the $\mathbb{J}^R_{\rm tru}$ (green) for a given spin
     at temperature $T/J=0 7$ and number of samples  $M=1024$  PLM appears to reconstruct the correct couplings, though zero couplings are always given a small inferred non-zero value  
     In the left column of Fig   \ref{PL-Jor1},  both the $\mathbb{J}^R_{\rm{inf}}$ and the $\mathbb{J}^R_{\rm{tru}}$ are sorted in decreasing order and plotted on top of each other  
     We can clearly see that $\mathbb{J}^R_{\rm inf}$ reproduces the expected step function  Even though the jump is smeared, the difference between inferred couplings corresponding to the set of non-zero couplings 
     and to the set of zero couplings can be clearly appreciated 
     Similarly, the plots in the right column of Fig  \ref{PL-Jor1} show the results obtained for the case with  bimodal disordered couplings, for the same working temperature and number of samples  
     In particular, note that the algorithm infers half positive and half negative couplings, as expected 
     
     
\begin{figure}
\centering
\includegraphics[width=1\linewidth]{Jor11_2D_l2_errJ_varT_varM}
\caption{Reconstruction error $\mbox{err}_J$, cf  Eq  (\ref{eq:errj}), plotted as a function of temperature (left) for three values of the number of samples $M$ and  as a function $M$ (right) for three values of temperature in the ordered system, i e , $J_{ij}=0,1$  
The system size is $N=64$ }
\label{PL-err-Jor1}
\end{figure}

In order to analyze the effects of the number of samples and of the temperature regimes, we plot in Fig  \ref{PL-err-Jor1} the reconstruction error, Eq  (\ref{err}), as a function of temperature for three different sample sizes $M=64,128$ and $512$  
The error is seen to sharply rise al low temperature, incidentally, in the ordered case, for  $T<T_c \sim 0 893$, which is the Kosterlitz-Thouless transition temperature of the 2XY model\cite{Olsson92}  
 However, we can see that if only $M=64$ samples are considered, $\mbox{err}_J$ remains high independently on the working temperature  
 In the right plot of Fig  \ref{PL-err-Jor1},  $\mbox{err}_J$ is plotted as a function of $M$ for three different working temperatures $T/J=0 4,0 7$ and $1 3$  As we expect, 
 $\mbox{err}_J$  decreases as $M$ increases  This effect was observed also with mean-field inference techniques on the same model\cite{Tyagi15} 

To better understand the performances of the algorithms, in Fig  \ref{PL-varTP-Jor1} we show several True Positive (TP) curves obtained for various values of $M$ at three different temperatures $T$  As $M$ is large and/or temperature is not too small,  we are able to reconstruct correctly all the couplings present in the system (see bottom plots) 
The True Positive curve displays how many times the inference method finds a true link of the original network  as a function of the index of the vector of sorted absolute value of reconstructed couplings $J_{ij}^{\rm inf}$  
The index $n_{(ij)}$ represents the related spin couples $(ij)$  The TP curve is obtained as follows: 
first  the values $|J^{\rm inf}_{ij}|$ are sorted in descending order and  the spin pairs $(ij)$ are ordered according to the sorting position of $|J^{\rm inf}_{ij}|$  Then,
     	a cycle over the ordered set of pairs $(ij)$, indexed by $n_{(ij)}$, is performed, comparing with the original network coupling $J^{\rm true}_{ij}$ and verifying whether it is zero or not  The true positive curve is computed as
\begin{equation}
\mbox{TP}[n_{(ij)}]= \frac{\mbox{TP}\left[n_{(ij)}-1\right] (n_{ij}-1)+ 1 -\delta_{J^{\rm true}_{ij},0}}{n_{(ij)}}
\end{equation}
As far as $J^{\rm true}_{ij} \neq 0$, TP$=1$  As soon as the true coupling of a given $(ij)$ couple in the sorted list is zero, the TP curve departs from one  
In our case, where the connectivity per spin of the original system is  $c=4$ and there are $N=64$ spins, we know that we will have  $256$ non-zero couplings   
     	If the inverse problem is successful, hence, we expect a steep decrease of the TP curve when  $n_{ij}=256$ is overcome 

In Fig  \ref{PL-varTP-Jor1}
it is  shown that,  almost independently of $T/J$, the TP score improves as $M$ increases  Results are plotted for three different temperatures, $T=0 4,1$ and $2 2$, with increasing number of samples $M = 64, 128,512$ and $1024$ (clockwise)  
We can clearly appreciate the improvement in temperature if the size of the data-set is not very large: for small $M$, $T=0 4$ performs better  
When $M$ is high enough (e g , $M=1024$), instead, the TP curves do not appear to be strongly influenced by the temperature 

\begin{figure}[t!]
	\centering
	\includegraphics[width=1\linewidth]{Jor11_2D_l2_TPJR_varT_varM}
	\caption{TP  curves  for 2D short-range ordered $XY$ model with $N=64$ spins at three different values of $T/J$ with increasing - clockwise from top - $M$ }
	\label{PL-varTP-Jor1} 
\end{figure} 

\subsection{$XY$ model with complex-valued couplings}
For the complex $XY$ we have to contemporary  infer $2$ apart coupling matrices,  $J^R_{i j}$ and $J^I_{i j}$   As before, a system of $N=64$ spins is considered on a 2D lattice 
For the couplings we have considered both ordered and bimodal disordered cases 
In Fig  \ref{PL-Jor3}, a single row of the matrix $J$ (top) and the whole sorted couplings (bottom) are displayed for the ordered model (same legend as in Fig  \ref{PL-Jor1}) for the real, $J^R$ (left column), and the imaginary part, $J^I$   

\begin{figure}[t!]
	\centering
\includegraphics[width=1\linewidth]{Jor3_l2_JRJI_soJRJI_TPJRJI}
	\caption{Results related to the ordered complex XY model with $N=64$ spins on a  2D lattice  Top: instances of  single site reconstruction for the real, JR (left column), and
		the imaginary, JI (right column), part of $J_{ij}$  Bottom: sorted values of JR (left) and JI (right) }
		
	\label{PL-Jor3}
\end{figure}
 
 
  \section{PLM with Decimation}
 \label{sec:res_dec}
 

\begin{figure}[t!]
   	\centering
   	\includegraphics[width=1\linewidth]{Jor1_dec_tPLF_varT_varM}
    	\caption{Tilted Pseudolikelyhood, ${\cal L}_t$, plotted as a function of decimated couplings  Top: Different ${\cal L}_t$ curves obtained for different values of $M$ plotted on top of each other  Here $T=1 3$  The black line indicates the expected number of decimated couplings, $x^*=(N (N-1) - N c)/2=1888$  As we can see, as $M$ increases, the maximum point of ${\cal L}_t$ approaches $x^*$  Bottom: Different ${\cal L}_t$ curves obtained for different values of T with $M=2048$  We can see that, with this value of $M$, no differences can be appreciated on the maximum points of the different  ${\cal L}_t$ curves }
   	\label{var-$t$PLF}
   \end{figure}

\begin{figure}[t!]
    \centering
    \includegraphics[width=1\linewidth]{Jor1_dec_tPLF_peak_statistics_varM_prob eps}
    	\caption{Number of most likely decimated couplings, estimated by the maximum point of $\mathcal{L}_t$, as a function of the number of samples $M$  We can clearly see that the maximum point of $\mathcal{L}_t$ tends toward $x^*$, which is the right expected number of zero couplings in the system }  
    	\label{PLF_peak_statistics}
    \end{figure}
      
      For the ordered real-valued XY model we show in Fig  \ref{var-$t$PLF}, top panel, the outcome on the tilted pseudolikelyhood, $\mathcal{L}_t$ Eq  \eqref{$t$PLF}, of the progressive decimation: from a fully connected lattice  down to an empty lattice  The figure shows the behaviour of $\mathcal{L}_t$ for three different data sizes $M$  A clear data size dependence of the maximum point of  $\mathcal{L}_t$, signalling the most likely value for decimation, is shown  For small $M$ the most likely number of  couplings is overestimated and for increasing $M$ it tends to the true value, as displayed in Fig  \ref{PLF_peak_statistics}   In the bottom panel of Fig  \ref{var-$t$PLF} we display instead different 
 $\mathcal{L}_t$ curves obtained for three different values of $T$ 
  Even though the values of $\mathcal{L}_t$ decrease with increasing temperature, the value of the most likely number of decimated couplings appears to be quite independent on $T$ with $M=2048$ number of samples 
In Fig  \ref{fig:Lt_complex} we eventually display the tilted pseudolikelyhood for a 2D network with complex valued ordered couplings, where the decimation of the real and imaginary coupling matrices proceeds in parallel, that is, 
when a real coupling is small enough to be decimated its imaginary part is also decimated, and vice versa 
One can see that though the apart errors for the real and imaginary parts are different in absolute values, they display the same dip, to be compared with the maximum point of $\mathcal{L}_t$ 
     
       \begin{figure}[t!]
    	\centering
      	\includegraphics[width=1\linewidth]{Jor3_dec_tPLF_new}
      	\caption{Tilted Pseudolikelyhood, ${\cal L}_t$, plotted with the reconstruction errors for the XY model with $N=64$ spins on a 2D lattice  These results refer to the case of  ordered and complex valued couplings  The full (red) line indicates ${\cal L}_t$  The dashed (green) 
      		and the dotted (blue) lines show the reconstruction errors (Eq  \eqref{eq:errj}) obtained for the real and the imaginary couplings respectively  We can see that both ${\rm err_{JR}}$ and ${\rm err_{JI}}$ have a minimum at $x^*$ }
          	\label{fig:Lt_complex}
    \end{figure}

\begin{figure}[t!]
   	\centering
   	\includegraphics[width=1\linewidth]{Jor1_dec_JR_soJR_TPJR}
   	\caption{XY model on a 2D lattice with $N=64$ sites and real valued couplings  The graphs show the inferred (dashed black lines) and true couplings (full green lines) plotted on top of each other  The left and right columns refer to the
   		 cases of ordered and bimodal disordered couplings, respectively  Top figures: single site reconstruction, i e , one row of the matrix $J$  Bottom figures: couplings are plotted sorted in descending order }  
   	\label{Jor1_dec}
   \end{figure}
   
\begin{figure}[t!]
    	\centering
    	\includegraphics[width=1\linewidth]{Jor3_dec_JRJI_soJRJI_TPJRJI}
    	\caption{XY model on a 2D lattice with $N=64$ sites and ordered complex-valued couplings 
    		The inferred and true couplings are plotted on top of each other  The left and right columns show the real and imaginary parts, respectively, of the couplings  Top figures refer to a single site reconstruction, i e , one row of the matrix $J$  Bottom figures report the couplings sorted in descending order }
    	\label{Jor3_dec}
    \end{figure}
    
       







       \begin{figure}[t!]
     	\centering
     	\includegraphics[width=1\linewidth]{MF_PL_Jor1_2D_TPJR_varT}
     	\caption{True Positive curves obtained with the three techniques: PLM with decimation, (blue) dotted line,  PLM with $l_2$ regularization, (greed) dashed line, and mean-field, (red) full line   These results refer to real valued ordered couplings with $N=64$ spins on a 2D lattice  The temperature is here $T=0 7$ while the four graphs refer to different sample sizes: $M$ increases clockwise }
     	\label{MF_PL_TP}
     \end{figure}
    
    \begin{figure}[t!]
    	\centering
    	\includegraphics[width=1\linewidth]{MF_PL_Jor1_2D_errJ_varT_varM}
    	\caption{Variation of reconstruction error, ${\rm err_J}$, with respect to temperature as obtained with the three different techniques, see Fig  \ref{MF_PL_TP}, for four different sample size:  clockwise from top   $M=512,1024, 2048$ and $4096$ } 
    	\label{MF_PL_err}
    \end{figure}
    
     Once the most likely network has been identified through the decimation procedure, we perform the same analysis displayed in Fig  \ref{Jor1_dec}  for ordered and then quenched disordered real-valued couplings
and in Fig  \ref{Jor3_dec} for  complex-valued ordered couplings   In comparison to the results shown in Sec  \ref{sec:res_reg},
  the PLM with decimation leads to rather cleaner results  In Figs  \ref{MF_PL_err} and \ref{MF_PL_TP} we compare the performances of the PLM with decimation in respect to ones of the PLM with $l_2$-regularization  These two techniques are also analysed in respect to a mean-field technique previously implemented on the same XY systems\cite{Tyagi15} 
  
    For what concerns the network of connecting links, in Fig  \ref{MF_PL_TP} we compare the TP curves obtained with the three techniques  The results refer to the case of ordered and real valued couplings, but similar behaviours were obtained for the other cases analysed  
  The four graphs are related to different sample sizes, with $M$ increasing clockwise  When $M$ is high enough, all techniques reproduce the true network  
  However, for lower values of $M$ the performances of the PLM with $l_2$ regularization and with decimation drastically overcome those ones of the previous mean field technique  
  In particular, for $M=256$ the PLM techniques still reproduce the original network while the mean-field method fails to find more than half of the couplings  
  When $M=128$, the network is clearly reconstructed only through the PLM with decimation while the PLM with $l_2$ regularization underestimates the couplings  
  Furthermore, we notice that the PLM method with decimation is able to clearly infer the network of interaction even when $M=N$ signalling that it could be considered also in the under-sampling regime $M<N$   
 
 
In Fig  \ref{MF_PL_err} we compare the temperature behaviour of the reconstruction error 
In can be observed that for all temperatures and for all sample sizes  the reconstruction error, ${\rm err_J}$, (plotted here in log-scale) obtained with the PLM+decimation is always smaller than 
that one obtained with the other techniques  The temperature behaviour of ${\rm err_J}$ agrees with the one already observed for Ising spins in \cite{Nguyen12b} and for XY spins  in \cite{Tyagi15} with a mean-field approach:  ${\rm err_J}$ displays a minimum around $T\simeq 1$ and then it increases for very lower $T$; however,
 the error obtained with the PLM with decimation is several times smaller  than the error estimated by the other methods 



 
 

     
     \section{Conclusions}
     \label{sec:conc}


Different statistical inference methods have been applied to the inverse problem of the XY model 
After a short review of techniques based on pseudo-likelihood and their formal generalization to the model we have tested their performances against data generated by means of Monte Carlo numerical simulations of known instances
with diluted, sparse, interactions 

The main outcome is that the best performances are obtained by means of the  pseudo-likelihood method combined with decimation  Putting to zero (i e , decimating) very weak bonds, this technique turns out to be very precise for  problems whose real underlying interaction network is sparse, i e , the number of couplings per variable does not scale with number of variables 
The PLM + decimation method is compared to the PLM + regularization method, with $\ell_2$ regularization and to a mean-field-based method  The behavior of the quality of the network reconstruction is analyzed by looking at the overall sorted couplings and at the single site couplings, comparing them with the real network, and at the true positive curves in all three approaches  In the PLM +decimation method, moreover, the identification of the number of decimated bonds at which the tilted pseudo-likelihood is maximum allows for a precise estimate of the total number of bonds  Concerning this technique, it is also shown that the network with the most likely number of bonds is also the one of least reconstruction error, where not only the prediction of the presence of a bond is estimated but also its value 

The behavior of the inference quality in temperature and in the size of data samples is also investigated, basically confirming the low $T$ behavior hinted by Nguyen and Berg \cite{Nguyen12b} for the Ising model  In temperature, in particular, the reconstruction error curve displays a minimum at a low temperature, close to the critical point in those cases in which a critical behavior occurs, and a sharp increase as temperature goes to zero  The decimation method, once again, appears to enhance this minimum of the reconstruction error of almost an order of magnitude with respect to other methods 
 
The techniques displayed and the results obtained in this work can be of use in any of the many systems whose theoretical representation is given by Eq  \eqref{eq:HXY} or Eq  \eqref{eq:h_im}, some of which are recalled in Sec  \ref{sec:model}  In particular, a possible application can be the field of light waves propagation through random media and the corresponding problem of the  reconstruction of an object seen through an opaque medium or a disordered optical fiber \cite{Vellekoop07,Vellekoop08a,Vellekoop08b, Popoff10a,Akbulut11,Popoff11,Yilmaz13,Riboli14} 

 	
Context 3: LOL Anonymous I'm here! & I did answer you back there 
kl el kotb el qadema (tawrat + enjel + 9o7f ibrahem) 7orfat w t'3ayarat   law ma 9ar hal shy chan ma 6ala3 ktab yded ye;3y elly gablah l7ad ma 6ala3 lna el quraan b norah elly allah 7f'6ah don ta7ref w tabdel ela yom el dein    shlon tyeeb Joan shy ma5ooth 5erah?!
1- Imagine you have two individuals  One truly believes in God but he is a bad husband and father who cheats on his wife and neglects his children  The other man is a nonbeliever; he accepts religion in theory and doctrine but simply does not have faith no matter how hard he tried  He is a good father and a good husband as well  When they stand before God at the Day of Judgment, would the nonbeliever be condemned to eternal hell only for that one flaw in him? Don't the other good traits in that person matter at all? Does being a nonbeliever equal being evil?
2-God knows everything  However, why would He have created when He knows exactly what each person is going to do and where they will end up? For example, let us suppose that tomorrow I will murder someone  God knows that I will do that  And He knows that I will suffer in hell when the time comes  So why does He purposely inflict that pain on me? To teach me a lesson? He knows the outcome of everything and everyone He has created 
3-Since you brought up science in the previous comments section, I am seriously curious (I am not trying to be glib) about dinosaurs and prehistoric humans  We have seen the evolution of humans and we have fossils and hard evidence of it  The science world has traced back "Eve" to Africa  The concept of Adam and Eve seems too mythological to be 100% factual  It has the same tone of Greek and Ancient Egyptian legends 
-Note: I am not trying to corner you here, I just want to know your response to my queries and thoughts  Thanks 
_ ولماذا نصلى ولمن نصلى    انى لا ارى لصلاتكم هذه اى حكمه ولماذا كل تلك الحركات اما كان يكفى الخشوع  
اعتقد ان المشكلة ليست كما ذكرت  فما ذكرته يعني ان هناك العديد من المسائل الفقهية المتصلة بالعصر الجديد دون حل  على العكس, فالحلال بين والحرام بين  اعتقد المشكلة تكمن بالمسلمين الذين اصابهم الوهن 
You'll be answerd personaly only if; you comment with your blogger's name/nick 
I answered you before & there was no response from your behalf  Why would you think you're worth an answer from me since you can seek answers from good books?
Your questions are very simple, with clean cut answers  Don't use the word corner; it indicates things you don't have the first alphabet for!
Religion was established to calm our fears from the unknown  Freud did write about it in the father figure argument  Try to read it 
I deleted my last comment because in the end of it I inserted some thing that may offend some people (if you read it, I gauss you know what I mean)  Abraham did not believe in God until he saw the birds come to life  So, all what I want is a single prove similar to Abraham 
I indeed busy doing my homework; I have to solve the energy equation and the continuity equation to come with another, hopefully, exact solution to the problem 
Do you work? I mean do you have a job, it seems that you are always on line!!!???? It is amazing how some one would stick to the internet  Try to go out more often, play sport or find any other hobby  If you could not disattach yourself from the internet try and seek a professional help… :-)  Honestly, I’m not making fun of you it is just an advice… sincere advice 
I measure prosperity of a nation by the degree of its civilization in comparison to others of its time  Islamic civilization was at the peak during the Umayyad and Abbasid reigns, at the time when Moslems conquered other nations and dying civilizations, and mixed with them, and the new comers in Islam started researching for the truth  In their quest they translated Greek philosophy books and dug into ancient ones  Their search for truth led them to the emergence of chemistry, Algebra and other sciences And their findings excelled them in innovative inventions  The maps and astrolabes that Columbus used to sail on his quest to discover the West years later were taken from the Arabs  And in contrary to the scribbles of their holy book, Arabic books were the first that brought the roundedness of earth to world attention  Arabic language romanticized the rigid Latin, poetry and verse advanced  At one time, civilization was dubbed as Arabization in Andalusia and that was evident in Andalusia’s Christian and Jewish ancient books



ground_truth: $\int f'(u) \psi^2 \le \int | \nabla \psi|^2, \forall \psi \in C_c^2$.

prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: What are some fields in which the inverse problem is encountered?

Read the following text and answer briefly.

Context 3:  Islamic Architecture and their aggregation systems portrayed marvels of their time  Islamic libraries were huge and rich for the European knowledge seekers 
And history tells us that those were the times when Moslems were the furthest from the dogma of their religion, there societies were open to controlled prostitution in the name of dancimng Jawari, and alcohol was openly consumed  We also notice in these periods that struggle for power among them mounted, yet they were the most tolerant to other nations and beliefs  There was nothing Islamic about them at that time, only a name  After that time, the Islamic civilization collapsed and kept deteriorating as people clung more to the their religious beliefs that were diverted through different interpretations 
And based on that; I believe that it’s not only Moslems who missread their religion, the problem stemmed from the core of the religion (Quran and tradition) for being vague and subject to different interpretations  If Quran was the true word of God, then it should have contained the miracle of not being subject to different interpretations, at least to keep Moslems united, and then, one would believe that Islam is suitable for every location and time 
Nothing can give a solid proof of the existence of heaven and hell, yet, nothing can disprove it either  Same goes to God  So the chance remain fifty-fifty  You either believe in it for the sake of taking a lesser risk if you don’t believe in blind faith, or discard it all together  Yet, the possibility is there until proved or disproved  As for now; these cases can only be understood through logic  So let’s reiterate your question and narrow it down to make it closer to something that can be measured 
Is there any mention of the stories of prophets outside the holy books? Are there any archeological evidences of each prophet’s reign (and I stress prophet’s)? Are there any mention of each prophet in history books outside its holy book, or the books that were based on it’s holy books? Ok, that was too general, let’s narrow it down a bit since your knowledge of your religion, mashallah, especially in reciting Quran is superb 
Is there any mention of the prophet Mohammad reign in non-Moslem history books other than those referenced to Moslem books? And if there were; did those stories mach? Did archeology of Mohammad’s time match those stories? Did ancient books of other nations confirm those stories? After all Mecca was an open, mid trade center for traders of the South and the North, and supposedly was exposed and open to other nations, and an emergence of a new religion would not have gone unnoticed in the ancient books of those nations 
That's why faith is called "FAITH" to believe in the unseen, you see 
keep in mind that every major religion has gone through various phases from emergence to growth to stagnation to depression and reformation  these are cycles that play out across centuries and i suspect islam is not immune to them 
islam is unique in that it is truly the last 'great' religion and it is here to stay  the future should be one of consilience and consolidation between religions and peoples 
at the end of the day - tolerance of thought will be the salvation of mankind 
I've been asking your first question for as long as I can remember and nobody has given me a convincing answer yet  I also asked the second question verbatim when I was in my high school's Tarbiya Islamiya class, and the teacher had no answer  I kept hounding him until the students yelled at me to shut up and then he kicked me out!
We're all adults here, so why can't you answer Anon's query? I still find it amazing that you named yourself after Saint Joan  A Christian (gasp!) who will burn in hell according to some of the comments here 
All men are my brothers  I would have liked to have said it then, and I would like to say it now: all men are my brothers  But all men are not my brothers  Why? Because all women are my sisters  And the brother who denies the rights of his sister: that brother is not my brother  At the very best, he is my half-brother - by definition  Osama is not my brother 
Religion is sensitive ground, as well it might be  Here we walk on eggshells  Because religion is itself an eggshell  Today, in the West, there are no good excuses for religious belief - unless we think that ignorance, reaction and sentimentality are good excuses  This is of course not so in the East, where, we acknowledge, almost every living citizen in many huge and populous countries is intimately defined by religious belief  The excuses, here, are very persuasive; and we duly accept that 'faith' - recently and almost endearingly defined as 'the desire for the approval of supernatural beings' - is a world-historical force and a world-historical actor  All religions, unsurprisingly, have their terrorists, Christian, Jewish, Hindu, even Buddhist  But we are not hearing from those religions  We are hearing from Islam 
Let us make the position clear  We can begin by saying, not only that we respect Muhammad, but that no serious person could fail to respect Muhammad - a unique and luminous historical being  Judged by the continuities he was able to set in motion, he remains a titanic figure, and, for Muslims, all-answering: a revolutionary, a warrior, and a sovereign, a Christ and a Caesar, 'with a Koran in one hand', as Bagehot imagined him, 'and a sword in the other'  Muhammad has strong claims to being the most extraordinary man who ever lived  And always a man, as he always maintained, and not a god  Naturally we respect Muhammad  But we do not respect Muhammad Atta 
Until recently it was being said that what we are confronted with, here, is 'a civil war' within Islam  That's what all this was supposed to be: not a clash of civilisations or anything like that, but a civil war within Islam



ground_truth: Physics, biology, social sciences, finance, and neuroscience are some fields in which the inverse problem is encountered.

prompt_front: Now, answer the following question based on the text below, only give me the answer and do not output any other words.

Question: Is there any evidence of heaven and hell?

Read the following text and answer briefly.

Context 3:  Well, the civil war appears to be over  And Islamism won it  The loser, moderate Islam, is always deceptively well-represented on the level of the op-ed page and the public debate; elsewhere, it is supine and inaudible  We are not hearing from moderate Islam  Whereas Islamism, as a mover and shaper of world events, is pretty well all there is 
So, to repeat, we respect Islam - the donor of countless benefits to mankind, and the possessor of a thrilling history  But Islamism? No, we can hardly be asked to respect a creedal wave that calls for our own elimination  More, we regard the Great Leap Backwards as a tragic development in Islam's story, and now in ours  Naturally we respect Islam  But we do not respect Islamism, just as we respect Muhammad and do not respect Muhammad Atta 
المؤامرات على الأديان وجميع الانقلابات المخربة والثورات على القيم والمبادئ خرجت من هذا التراث    وان كل معول هدم كان وراءه توجيه يهودي 
•تذكروا أن الشعب الذي لا يهلك غيره يهلك نفسه 
•يجب ان نخلق الجيل الذي لا يخجل من كشف عورته (ألا تفسر لنا هذه الجملة موجة العرى في الافلام والموضات التى تسود العالم الآن) 
 علينا ان نشعل حربا بين الشعوب ونضرب الدول بعضها ببعض فبهذا يصبح جميع المتحاربين في حاجة الى أموالنا فنفرض عليهم شروطنا 
•الجماهير عمياء فاشتروها بالمال وسوقوها كالبهائم الى أهدافكم 
•سيطروا على الانتخابات ووسائل الاعلام والصحافة (وهم قد سيطروا عليها بالمال والجنس والمرأة في الغرب الرأسمالي وبالحزب والسلطة في العالم الاشتراكي) 
•ادفعوا الجماهير العمياء الى الثورة وسلموهم مقاليد الحكم ليحكموا في غوغائية وغباء (وقد فعلوا هذه في الثورة الفرنسية) وحينئذ نأتي نحن ونعدمهم فنكون منقذين للعالم (وقد اعدموهم جميعاً من روبسبير الى ميرابوا) 
•ارفعوا شعار الحرية واهدموا بها الاخلاق والاسرة والقومية والوطنية 
 ارفعوا شعار العلم واهدموا به الدين    وهذا ما فعله كمال أتاتورك (حفيد مزاراحي) حينما اقام الدولة العلمانية في تركيا ووقف يخطب في البرلمان التركي عام 1923 ساخراً من القرآن 
نحن الآن في القرن العشرين لا نستطيع ان نسير وراء كتاب تشريع يبحث عن التين والزيتون 
•الذي يعرقل مؤامراتكم اوقعوه في فضائح ثم هددوه بكشفها (وقد فعلوها في ووترجيت) او في مآزق مالية ثم تقدموا لانقاذه (وقد فعلها دزرائيلي مع الخديو واستولى على القنال)   وإذ تعذر الامر سارعوا الى اغتياله (وقد فعلوها بكنيدي) ثم اقتلوا قاتله لتدفنوا اسرارنا معه الى الأبد (وقد فعلوها بقاتل كنيدي) 
•اقتلوا القوميات والوطنيات بالدعوة الى الاممية والمواطنة العالمية وقد فعلها ماركس في الشيوعية 
•كل ما عدا اليهود حيوانات ناطقة سخرها الله في خدمة اليهود 
واليهودية ترى ان الله واحد ولكنها تحتكره لنفسها فلا عمل لله الا الحفاظ على اسرائيل وتسخير جميع الشعوب لخدمتها 
واللاهوت اليهودي لا يؤمن بآخرة، وقد شطبوا كل ما جاء عن الآخرة في التوراة    والقيامة عندهم هي قيامة دولتهم في فلسطين والبعث بعثها والنشر نشرها    ويوم الحساب هو اليوم الذي يحاسبون فيه كل الأمم يوم يعود المسيح ويباركهم ويختارهم نواباً له في حكم العالم وإقامة ملكوت الله على الأرض    والعجيب انهم كفروا بالمسيح حينما جاء ثم أعلنوا إيمانهم بعودته وشرطوا هذه العودة بانها رجعة من المسيح ليختارهم رؤساء وحكاماً للعالم الى الأبد 
والفكر اليهودي يلقى غلالة من الأسرار والطلاسم والكتمان والغموض على كل شئ    والكبالا والسحر وعلم الأعداد والحروف وتسخير الشياطين من علومهم التى شغفوا بها وروجوها ونشروها 
وكانت وسيلتهم الى هدم الكتب السماوية هى تفسيرها بالتأويل وذلك برفض المعاني الظاهرة واختراع معان باطنة تهدم الغرض الديني وتفسد هدفه 
ونستطيع ان نرى اثر التوجيه الهودي في الفلسفات العبثية والدمية والمادية والفوضية والإباحية    واحيانا نلمح اسماء يهودية خلفها مثل : سارتر – فرويد – ماركس – ماركوز 
واذا فتحنا ملف الديانة البهائية فإننا نجد اثر التوجيه اليهودي واضحا في كتبها 
عبد الهاء تأليف سليم قبعين القاهرة مطبعة العمران 1922 
مفواضات عبد البهاء الطبعة الاولى 1928م  موعود كل الامم 
جورج تاوزنه مطبوع بإذن من المحفل الروحاني لمصر والسودان 
•اكثر فلاسفة اليونان تعلموا الحكمة من بنى اسرائيل 
•رسالة عبد البهاء هي توحيد المسلمين والنصارى واليهود وجمعهم على أصل نواميس موسى 
•عمل موسى لا يس



ground_truth: Unknown.