Improving the Thresholds of Sparse Recovery: An Analysis of a Two-Step Reweighted Basis Pursuit Algorithm

Abstract: It is well known that $\ell_1$ minimization can be used to recover sufficiently sparse unknown signals from compressed linear measurements. In fact, exact thresholds on the sparsity, as a function of the ratio between the system dimensions, so that with high probability almost all sparse signals can be recovered from i.i.d. Gaussian measurements, have been computed and are referred to as "weak thresholds" \cite{D}. In this paper, we introduce a reweighted $\ell_1$ recovery algorithm composed of two steps: a standard $\ell_1$ minimization step to identify a set of entries where the signal is likely to reside, and a weighted $\ell_1$ minimization step where entries outside this set are penalized. For signals where the non-sparse component entries are independent and identically drawn from certain classes of distributions, (including most well known continuous distributions), we prove a \emph{strict} improvement in the weak recovery threshold. Our analysis suggests that the level of improvement in the weak threshold depends on the behavior of the distribution at the origin. Numerical simulations verify the distribution dependence of the threshold improvement very well, and suggest that in the case of i.i.d. Gaussian nonzero entries, the improvement can be quite impressive---over 20% in the example we consider.

\section{Introduction}
\label{sec:Intro}
Compressed sensing addresses the problem of recovering sparse signals
from under-determined systems of linear equations  \cite{Rice}. In
particular, if ${\bf x}$ is an $n\times1$ real vector which is known to have at
most $k$ nonzero elements where $k<n$, and ${\bf A}$ is an $m\times n $
measurement matrix with $k<m<n$, then for appropriate values of $k$,
$m$ and $n$, it is possible to efficiently recover ${\bf x}$ from the set of linear projections ${\bf y}={\bf A}{\bf x}$ \cite{D
  CS,DT,CT,Baraniuk Manifolds}. The most well recognized such
algorithm is $\ell_1$ minimization which can be formulated  as
follows:
\begin{equation}
\label{eq:l1 min}
\min_{{\bf A}{\bf z}={\bf A}{\bf x}}\|{\bf z}\|_1.
\end{equation}
The first result that established the fundamental thresholds of signal
recovery using $\ell_1$ minimization is due to Donoho and Tanner
\cite{D,DT}, where it is shown
that if the measurement matrix is i.i.d. Gaussian, for a given ratio
of $\delta = \frac{m}{n}$, $\ell_1$ minimization can successfully
recover {\em every} $k$-sparse signal, provided that $\mu = \frac{k}{n}$ is
smaller than a certain threshold. This statement is true
asymptotically as $n\rightarrow \infty$ and with high
probability. This threshold guarantees the recovery of {\em all}
sufficiently sparse signals and is therefore referred to as a \emph{strong}
threshold. It therefore does not depend on the actual distribution of
the nonzero entries of the sparse signal and as such is a universal
result. However, at this point, it is not known whether there exist other polynomial-time algorithms with strong thresholds superior to those of $\ell_1$ minimization.

Another notion introduced and computed in \cite{D,DT} is that of a
{\em weak} threshold where signal recovery is guaranteed for {\em
  almost all} support sets and {\em almost all} sign patterns of the
sparse signal, with high probability as $n\rightarrow\infty$. The weak
threshold is the one that can be observed in simulations of $\ell_1$
minimization and allows for signal recovery beyond the strong threshold. The weak threshold of $\ell_1$ minimization is also universal from the vantage point of signal distribution; The amplitudes of the nonzero entries of a sparse signal does not affect its recoverability by solving (\ref{eq:l1 min}). In other words, if a sparse signal with a support set $S$ and a particular sign pattern is recoverable using $\ell_1$ minimization, so is every other signal with the same support and sign pattern. It is worth noting that the weak thresholds of $\ell_1$ minimization can be generalized to a broader class of random measurement matrices, including those with null spaces that are random orthant symmetric and generic subspaces (e.g., matrices with i.i.d. Bernoulli or uniform (-1,1) entries, etc.)~\cite{Donoho_face_counting}. Finally, similar to the strong thresholds, it is not known whether there exist other polynomial-time algorithms with superior weak thresholds than $\ell_1$ minimization.

\noindent \textbf{Our Contributions.} In this paper we prove that a certain \emph{two-step
  reweighted $\ell_1$} algorithm indeed has higher weak recovery
guarantees than ordinary $\ell_1$ minimization for particular classes of sparse signals, including sparse
Gaussian signals.  We had previously introduced this algorithm in
\cite{Khajehnejad_Allerton}, and had proven that for a very
restricted class of \emph{polynomially decaying} sparse signals it
outperforms standard $\ell_1$ minimization. In this paper however, we
  extend this result to a much wider and more reasonable class of
sparse signals. The key to our result is the fact that for these
  classes of signals, $\ell_1$ minimization has an \emph{approximate support
  recovery} property which can be exploited in reweighted
  $\ell_1$ algorithm, to obtain a provably superior weak threshold.
In particular, we consider Gaussian sparse
signals, namely sparse signals in which the nonzero entries are i.i.d.
  Gaussian. Our analysis of Gaussian sparse signals relies on
  concentration bounds on the partial sum of their order
  statistics. Furthermore, we show that
for continuous distributions with sufficiently fast decaying tails and
nonzero value at the origin, similar improvements for the weak threshold can be postulated. More generally, we show that as long as the nonzero entries of the sparse signal are independently drawn from a continuous distribution $f(\cdot)$ that has a nonzero finite order derivative at the origin, the weak recovery threshold of our proposed two step reweighted $\ell_1$ algorithm is strictly larger than that of $\ell_1$ minimization. Although not specifically derived, our analysis suggests that the improvement rate is a function of the smallest integer $r$ for which  $f^{(r)}(0)\neq 0$; The smaller such $r$ is, the larger the improvement is. We perform numerical simulations using various distributions which authenticate this assertion.

It is worth noting that different variations of reweighted $\ell_1$
algorithms have been recently introduced in the literature and, have
shown experimental improvement over ordinary $\ell_1$ minimization
\cite{Needell,CWB07}.  In \cite{Needell} approximately sparse signals
have been considered, where perfect recovery is often not achieved. The question is therefore not that of an explicit recovery threshold extension. Instead, it has been shown that the reconstruction error can be reduced using an iterative scheme. In \cite{CWB07}, a similar algorithm is suggested and is empirically shown to outperform $\ell_1$
minimization for exactly sparse signals with certain continuous
distributions. In particular, it was empirically witnessed that the proposed algorithm does not improve the signal recovery for sparse vectors with constant amplitude nonzero entries (\emph{i.e.} a nonzero entry is either 1 or -1).  Unfortunately, \cite{CWB07} provides no theoretical analysis or performance guarantees for the success or failure of the method. The particular reweighted $\ell_1$ minimization algorithm that we propose and analyze is of significantly
less computational complexity than the earlier ones (it only solves
two linear programs). Furthermore, experimental results confirm that
it exhibits much better performance than previous reweighted methods.
Finally, while we do rigorously establish a strict
{\em improvement} in the weak threshold, we currently do not have
tight bounds on the new weak threshold and simulation results are far
better than the bounds we can provide at this time.

The organization of this paper is as follows. In Section \ref{sec:def}, we introduce the basic definitions used throughout the paper. In Section \ref{sec:model}, the signal model is described, the notions of strong and weak recovery thresholds are quantified and the main problem is stated, namely to find a polynomial time recovery algorithm with better thresholds than $\ell_1$ minimization for sparse signal recovery. In Section \ref{sec:Algorithm} a two step reweighted linear programming algorithm is described and is claimed to be superior in performance to the regular $\ell_1$ minimization algorithm for sparse vectors with Gaussian distributions (Theorem \ref{thm: final thm}). Sections \ref{sec:robustness} and \ref{sec:perfect recovery} are dedicated to the detailed proof of this claim, through  separate analysis of different stages of the algorithm. In Section \ref{sec:generalization}, these results are generalized to a much broader class of sparsity models beyond  Gaussians. The technical discussions of this paper predict that the performance of the proposed algorithm strongly depends on the distribution of the nonzero entries of the random sparse signal model. The paper ends in Section \ref{sec:simulation} with some numerical evaluations of the proposed algorithm and the verification of the distribution dependent behavior of the reweighted algorithm.
\hfill
\section{Basic Definitions}
\label{sec:def}
A sparse signal with exactly $k$ nonzero entries is called
$k$-sparse. For a vector ${\bf x}$, $\|{\bf x}\|_1$ denotes the $\ell_1$
norm. The support (set) of ${\bf x}$,  denoted by $supp({\bf x})$, is the index
set of its nonzero coordinates. For a vector ${\bf x}$ that is not exactly
$k$-sparse, we define the $k$-support of ${\bf x}$ to be the index set of
the largest $k$ entries of ${\bf x}$ in amplitude, and denote it by
$supp_k({\bf x})$. For a subset $K$ of the entries of ${\bf x}$, ${\bf x}_K$ means
the vector formed by those entries of ${\bf x}$ indexed in $K$. Finally,
$\max|{\bf x}|$ and $\min|{\bf x}|$ mean the absolute value of the maximum and
minimum entry of ${\bf x}$ in magnitude, respectively.

\section{Signal Model and Problem Description}
\label{sec:model}
We consider sparse random signals with i.i.d. nonzero
coefficients drawn from a given continuous distribution (in particular Gaussian). In other words we assume that the unknown sparse signal is an
$n\times 1$ vector ${\bf x}$ with exactly $k$ nonzero entries, where each
nonzero entry is independently derived from a distribution $f(\cdot)$ (\textit{e.g.},
standard normal distribution $\mathcal{N}(0,1)$). The measurement matrix ${\bf A}$ is an $m\times n$
matrix with i.i.d. Gaussian entries with an aspect ratio $\delta
= \frac{m}{n}$. The theory of compressed sensing guarantees that if
$\mu=\frac{k}{n}$ is smaller than a certain threshold, then for almost all measurement matrices ${\bf A}$ every
$k$-sparse signal can be recovered using $\ell_1$ minimization. The
relationship between $\delta$ and the maximum threshold of $\mu$ for
which such a guarantee exists is called the \emph{strong sparsity
threshold}, and is denoted by $\mu_{S}(\delta)$.  A more practical
performance guarantee is the so-called \emph{weak sparsity threshold},
denoted by $\mu_{W}(\delta)$, which has the following
interpretation: For a fixed value of $\delta = \frac{m}{n}$ and an
i.i.d. Gaussian matrix ${\bf A}$ of size $m\times n$,  a random $k$-sparse
vector ${\bf x}$ of size $n\times 1$ with a randomly chosen support set and
a random sign pattern can be recovered from ${\bf A}{\bf x}$ using $\ell_1$
minimization with high probability, if
$\frac{k}{n}<\mu_{W}(\delta)$. In addition, other forms of recovery thresholds can be defined using different constraints and requirements. For example, when the reconstruction of signals with all support sets and almost all sign patterns is considered, the resulting thresholds are called \emph{sectional}. These thresholds were discussed in \cite{DT} for i.i.d. Gaussian matrices. Furthermore, strong and weak thresholds can also be defined and evaluated for the reconstruction of nonnegative signals (see \emph{e.g.} \cite{Donoho positive}), or for alternative classes of matrix ensembles. For example, strong thresholds for $\ell_1$ minimization over expander-graph-based measurement matrices were derived in \cite{Indyk}, and in \cite{Khajehnejad_Expanders} for nonegative vectors in addition to weak threshold forms.

In this paper, we consider sparse signals that fall outside the recoverability regime of $\ell_1$ minimization. In other words, we assume that the support size of ${\bf x}$, namely $k$, is slightly
larger than the weak threshold of $\ell_1$ minimization. In other
words,  $k = (1+\epsilon_0)\mu_{W}(\delta)n$ for some
$\epsilon_0>0$. This means that if we use $\ell_1$ minimization, a
randomly chosen $\mu_{W}(\delta)n$-sparse signal will be recovered
perfectly with very high probability, whereas a randomly selected
$k$-sparse signal will not. We would like to show that for a strictly
positive $\epsilon_0$, the two-step reweighted $\ell_1$ algorithm of
Section \ref{sec:Algorithm} can indeed recover a randomly selected
$k$-sparse signal with high probability, implying that the proposed method has a
superior weak threshold.

\section{Two-Step Weighted $\ell_1$ Algorithm}
\label{sec:Algorithm}
We propose the following method outlined in Algorithm \ref{alg:modmain}, consisting of two linear programming steps: a standard $\ell_1$ minimization and a weighted one. The input to
the algorithm is the vector ${\bf y}={\bf A}{\bf x}$, where ${\bf x}$ is the unknown $k$-sparse
signal with $k=(1+\epsilon_0)\mu_W(\delta)n$, and the output is an
approximation ${\bf x}^*$ to the unknown vector ${\bf x}$. We assume that the sparsity $k$ (or an upper bound on it) is known. However, the algorithm assumes no knowledge of the distribution of the nonzero entries of the unknown signal. Also $\omega>1$ is a predetermined weight.

\begin{figure}[t]
\centering
  \includegraphics[width= 0.4\textwidth]{images1/signal1.pdf}
  \caption{ \scriptsize{A pictorial example of a sparse signal  and its $\ell_1$ minimization approximation.}}
  \label{fig:sigmal}
\end{figure}

\begin{algorithm}[t]\caption{\small{Two Step Reweighted $\ell_1$ minimization.}}
\begin{algorithmic}[1]
\STATE \textbf{Input: } Measurement matrix ${\bf A}^{m\times n}$, measurement vector ${\bf y}^{m\times 1}$, integer $k<n$, predetermined real valued weight $\omega >1$.\\
\STATE \textbf{Output: } Sparse vector ${\bf x}$ with ${\bf A}{\bf x} = {\bf y}$.
\STATE Solve the $\ell_1$ minimization problem:
\begin{equation}
\hat{{\bf x}} = \arg{ \min{ \|{\bf z}\|_1}}~~\text{subject to}~~ {\bf A}{\bf z}
= {\bf y}.
\end{equation}
\STATE Obtain an approximation for the support set of ${\bf x}$:
find the index set $L \subset \{1,2, ..., n\}$ which corresponds to
the largest $k$ elements of
$\hat{{\bf x}}$ in magnitude
\STATE Solve the following weighted $\ell_1$ minimization problem and declare the solution as output:
 \begin{equation}
{\bf x}^* = \arg{\min\|{\bf z}_L\|_1+\omega\|{\bf z}_{\overline{L}}\|_1}~~\text{subject to}~~ {\bf A}{\bf z}
= {\bf y}.
\label{eq:weighted l_1}
\end{equation}
\end{algorithmic}
\label{alg:modmain}
\end{algorithm}

The intuition behind the algorithm is as follows. In the first step, a standard $\ell_1$ minimization is performed. If the sparsity of the signal is beyond the weak threshold $\mu_W(\delta)n$, then $\ell_1$ minimization is most probably not capable of recovering the signal. However, we use
the output of the $\ell_1$ minimization to identify an index set, $L$,
which we ``hope'' contains most of the nonzero entries of ${\bf x}$ (see Figure \ref{fig:sigmal}). We
finally perform a weighted $\ell_1$ minimization by penalizing those
entries of ${\bf x}$ that are not in $L$ (ostensibly because they have a
lower chance of being nonzero). Consequently, Algorithm \ref{alg:modmain} is capable of recovering less sparse signals, or equivalently has a higher weak threshold than that of $\ell_1$ minimization. This intuition is formalized in the following theorem.

\begin{thm}[Weak threshold of Algorithm \ref{alg:modmain}]
Let ${\bf A}$ be an $m\times n$ i.i.d. Gaussian matrix with
$\frac{m}{n}=\delta$. There exist $\epsilon_0>0$ and $\omega>0$ so that Algorithm
\ref{alg:modmain} perfectly recovers a random
$(1+\epsilon_0)\mu_{W}(\delta)n$-sparse vector with i.i.d. Gaussian
entries with high probability as $n$ grows to infinity.
\label{thm: final thm}
\end{thm}

The interpretation of the above theorem is that for sparse signals whose nonzero entries follow a Gaussian distribution, Algorithm
\ref{alg:modmain} has a recovery threshold beyond that of standard
$\ell_1$ minimization. The proof is provided in the next sections as follows. In Section
\ref{sec:robustness}, we prove that there is a large overlap between
the index set $L$, found in step 2 of the algorithm, and the support set
of the unknown signal ${\bf x}$ (denoted by $K$)---see Theorem \ref{thm:l_1
  support recovery} and Figure \ref{fig:sigmal}. Then in Section
\ref{sec:perfect recovery}, we show that the large overlap between $K$
and $L$ can result in perfect recovery of ${\bf x}$, beyond the standard
weak threshold, when a weighted $\ell_1$ minimization is used in step
3. The formal proof of Theorem \ref{thm: final thm} appears in Section \ref{sec:perfect recovery}.

\section{Approximate Support Recovery, Steps 1 and 2 of the Algorithm}
\label{sec:robustness}

In this section, we carefully study the first two steps of Algorithm
\ref{alg:modmain}. The unknown signal ${\bf x}$ is assumed to be a Gaussian
$k$-sparse vector with support set $K$, where
$k=|K|=(1+\epsilon_0)\mu_{W}(\delta)n$, for some $\epsilon_0>0$. By a
Gaussian $k$-sparse vector, we mean one where the nonzero entries are
i.i.d. Gaussian (zero mean and unit variance, say). It should be noted that the Gaussian distribution is only considered as a standard choice. We later extend our analysis to other signal distributions. The
solution $\hat{{\bf x}}$ to the
$\ell_1$ minimization obtained in step 1 of Algorithm
\ref{alg:modmain} is in all likelihood a dense vector.  The set $L$, as
defined in the algorithm, is the
$k$-support set of $\hat{{\bf x}}$ (\emph{i.e.} $L=supp_k(\hat{{\bf x}})$). We show that for small enough
$\epsilon_0$, the intersection of  $L$ and $K$ is with high
probability very large, so that $L$ can be counted as a good
approximation to $K$ (Figure \ref{fig:sigmal}).

In order to find a decent lower bound on $|L\cap K|$, we point out three
separate facts and establish a connection between them. First, we
prove a general lemma that provides a lower bound on the quantity $|L\cap K|$ as a function of
$\|{\bf x}-\hat{{\bf x}}\|_1$. Then, we discuss a critical property of
$\ell_1$ minimization known as \emph{weak robustness} which helps provide an
upper bound on the quantity $\|{\bf x}-\hat{{\bf x}}\|_1$. The robustness result is due to Xu \emph{et al.} and was first proved in \cite{isitrobust}. However, we provide explicit scaling laws for the robustness of $\ell_1$ minimization beyond the implicit results of \cite{isitrobust}. Finally, we leverage some concentration results for order statistics to derive explicit formulae for the obtained bounds. These steps will be elaborated in the remainder of this section.

\begin{definition}
For a $k$-sparse signal ${\bf x}$, we define $W({\bf x},\lambda)$ to be the size of the largest subset of nonzero entries of ${\bf x}$ that has a $\ell_1$ norm less than or equal to $\lambda$, i.e.,
\begin{equation}
\nonumber W({\bf x},\lambda) \triangleq \max\{|S|~|~S\subseteq supp({\bf x}),~\|{\bf x}_S\|_1\leq \lambda\}.
\end{equation}
\end{definition}
\noindent Note that $W({\bf x},\lambda)$ is increasing in $\lambda$.
\begin{lem}
Let ${\bf x}$ be a $k$-sparse vector and $\hat{{\bf x}}$ be another vector. Also, let $K$ be the support set of ${\bf x}$ and $L$ be the $k$-support set of $\hat{{\bf x}}$. Then
\begin{equation}
|K\cap L|\geq k-W({\bf x},\|{\bf x}-\hat{{\bf x}}\|_1).
\end{equation}
\label{lem:deviation thm}
\end{lem}
\begin{proof}
Let $x_i$ be the $i$th entry of ${\bf x}$ and  ${\bf e}^* = (e_1,e_2,\dots,e_n)^T$ be the solution to the following minimization problem:
\begin{align}
&\text{minimize }\|{\bf e}\|_1\nonumber \\
\text{s.t}. &\max|({\bf x}+{\bf e})_{K\setminus L}| \leq \min|({\bf x}+{\bf e})_{L}|,
\label{eq:min aux}
\end{align}
\noindent where $K\setminus L$ denotes the subset of the entries of $K$ that are not in $L$.  Note that the vector $\hat{{\bf x}}-{\bf x}$ satisfies the constraint of the minimization problem (\ref{eq:min aux}). This is because ${\bf x}+(\hat{{\bf x}}-{\bf x}) = \hat{{\bf x}}$ and $L$ is the $k$-support of $\hat{{\bf x}}$. Therefore every entry of $\hat{{\bf x}}$ outside the set $L$ is smaller in amplitude than every entry inside $L$. Therefore since ${\bf e}^*$ is the optimal solution of (\ref{eq:min aux}) we must have:
\begin{equation}
\|{\bf e}^*\|_1 \leq \|\hat{{\bf x}}-{\bf x}\|_1.
\label{eq:aux1}
\end{equation}
\noindent Let $a = \max|({\bf x}+{\bf e}^*)_{K\setminus L}|$.  Then for each
$i\in K\setminus L$, using the triangular inequality we have
\begin{equation}
|x_i|-|e_i| \leq |x_i + e_i| \leq a,~\forall i\in K\setminus L,
\label{eq:aux-+}
\end{equation}
\noindent and so:
\begin{equation}
|e_i| \geq \max(|x_i|-a,0),~\forall i\in K\setminus L.
\label{eq:aux-+1}
\end{equation}
\noindent Therefore, by summing up the inequalities in (\ref{eq:aux-+1}) for $i\in K\setminus L$ we have
\begin{equation}
\|{\bf e}^*_{K\setminus L}\|_1 \geq \sum_{i\in K\setminus L, |x_i| >a}(|x_i|-a).
\end{equation}
On the other hand, for all $i\in L\setminus K$, we have $|e_i| > a$, and therefore:
\begin{equation}
\|{\bf e}^*_{L\setminus K}\|_1 \geq a|L\setminus K|.
\end{equation}
But $|L\setminus K|=|K\setminus L|$ and hence it follows that
\begin{eqnarray}
\|{\bf e}^*\|_1 &\geq& \|{\bf e}^*_{L\setminus K}\|_1 + \|{\bf e}^*_{K\setminus L}\|_1 \nonumber \\
&\geq& a|K\setminus L| + \sum_{i\in K\setminus L, |x_i| >a}(|x_i|-a)  \nonumber \\
&\geq& \sum_{i\in K\setminus L}|x_i| = \|{\bf x}_{K\setminus L}\|_1.
\label{eq:aux2}
\end{eqnarray}
\noindent (\ref{eq:aux1}) and (\ref{eq:aux2}) together imply that $\|{\bf x}-\hat{{\bf x}}\|_1\geq \|{\bf x}_{K\setminus L}\|_1$, which by definition means that $W({\bf x},\|{\bf x}-\hat{{\bf x}}\|_1)\geq |K\setminus L|$.
\end{proof}
We now introduce the notion of weak robustness, which
allows us to bound $\|{\bf x}-\hat{{\bf x}}\|_1$, and has the following formal
definition \cite{isitrobust}.
\begin{definition}
Let the set $S\subset\{1,2,\cdots,n\}$ and the subvector ${\bf x}_S$  be
fixed. An approximation $\hat{{\bf x}}$ to ${\bf x}$ is called weakly robust with respect to the set $S$ if, for some $C_S >
1$, it holds that
\begin{equation}
\|({\bf x}-\hat{{\bf x}})_S\|_1 \leq \frac{2C_S}{C_S-1}\|{\bf x}_{\overline{S}}\|_1,
\label{def1}
\end{equation}
\noindent and
\begin{equation}
\|{\bf x}_S\|-\|\hat{{\bf x}}_S\|\leq \frac{2}{C_S-1}\|{\bf x}_{\overline{S}}\|_1.
\label{def2}
\end{equation}
\noindent $C_S$ is called the robustness parameter of the considered approximation for the set $S$.
\end{definition}
\noindent The weak robustness notion allows us to bound the error
in $\|{\bf x} -\hat{{\bf x}}\|_1$ in the following way. If $\hat{{\bf x}}$ is a weakly robust approximation to ${\bf x}$ with respect to the set $S$ and parameter $C_S>1$, such that ${\bf A}{\bf x} = {\bf A}\hat{{\bf x}}$, and if the matrix ${\bf A}_S$
obtained by retaining only those columns of ${\bf A}$ that are
indexed by $S$ has full column rank, then the quantity
\begin{equation}
\nonumber
~\kappa = \max_{{\bf A}{\bf w} =0, {\bf w}\neq 0} \frac{\|{\bf w}_S\|_1}{\|{\bf w}_{\overline{S}}\|_1},
\end{equation}
must be finite, and one can conclude that
\begin{equation}
\|{\bf x}-\hat{{\bf x}}\|_1 \leq \frac{2C_S(1+\kappa)}{C_S-1}\|{\bf x}_{\overline{S}}\|_1.
\label{eq:robustness}
\end{equation}
\noindent This result is due to \cite{isitrobust}, where in addition it has been shown that for Gaussian
i.i.d. measurement matrices ${\bf A}$, the solution of $\ell_1$ minimization provides a weakly robust approximation with high probability. In other words, for a randomly chosen subset $S$ with $\frac{|S|}{n} < \mu_{W}(\delta)$, there exists a robustness factor $C>1$ as a function of $\frac{|S|}{n}$ for which
(\ref{def1}) and (\ref{def2}) hold with high probability for an arbitrary vector ${\bf x}$, where $\hat{{\bf x}}$ is the solution obtained by $\ell_1$ minimization. Now let $k_1 = (1-\epsilon_1)\mu_{W}(\delta)n$ for some small
$\epsilon_1>0$, and $K_1$ be the $k_1$-support set of ${\bf x}$, namely,
the set of the largest $k_1$ entries of ${\bf x}$ in magnitude. Based on
equation (\ref{eq:robustness}) we may write
\begin{equation}
\|{\bf x}-\hat{{\bf x}}\|_1 \leq \frac{2C(\epsilon_1)(1+\kappa)}{C(\epsilon_1)-1}\|{\bf x}_{\overline{K_1}}\|_1,
\label{eq:robustness1}
\end{equation}
\noindent where for a fixed value of $\delta$, we have emphasized that the constant $C$ for the set $K_1$ is a function of $\epsilon_1$. Furthermore, $C(\epsilon_1)$ becomes arbitrarily close to $1$ as
$\epsilon_1\rightarrow 0$. $\kappa$ is also a bounded function of
$\epsilon_1$ and therefore we may replace it with an upper bound
$\kappa^*$. This provides a bound on $\|{\bf x}-\hat{{\bf x}}\|_1$. To explore
this inequality and understand its asymptotic behavior, we
apply a third result, which is a certain concentration bound on
the order statistics of Gaussian random variables.
\begin{lem}
Suppose $X_1,X_2,\cdots,X_N$ are $N$ i.i.d. $\mathcal{N}(0,1)$ random
variables. Let $S_N = \sum_{i=1}^{N}|X_i|$ and let $S_M$ be the sum of
the largest $M$ numbers among the $|X_i|$'s, for each
$1\leq M < N$. Then for every $\epsilon>0$ sufficiently small, as $N\rightarrow\infty$, if the ratio $M/N$ is kept constant, we have
\begin{eqnarray}
\ensuremath{\mathbb{P}}\left(\left|\frac{S_N}{N} - \sqrt{\frac{2}{\pi}}\right| > \epsilon\right)\rightarrow 0, \label{eq:Order_stat1}\\
\ensuremath{\mathbb{P}}\left(\left|\frac{S_M}{S_N} -
\exp(-\frac{\Psi^2(\frac{M}{2N})}{2})\right|>\epsilon \right)\rightarrow 0, \label{eq:Order_stat2}
\end{eqnarray}
\noindent where $\Psi(x) = Q^{-1}(x)$ with $Q(x) = \frac{1}{\sqrt{2\pi}}\int_{x}^{\infty}e^{-\frac{y^2}{2}}dy$.
\label{lemma:Gaussian_Base}
\end{lem}
To make the proof more understandable and the paper more readable, we mention the general idea of the proof of the above lemma very coarsely here. The detailed proof is outlined in Appendix \ref{app:proof_of_order_stat}. For a particular instance of $X_1,\dots,X_N$, if $0<a<1$ is such that exactly a fraction $M/N$ of $|X_i|$'s are larger than $a$, then every $|X_i|$ which is larger than $a$ contributes to the sum $S_M$. Therefore $S_M$ can be thought of as those $|X_i|$'s that are larger than $a$. This can be expressed in another way. Let $\hat{X}_i$ be a random variable which is equal to $|X_i|$ if $|X_i|>a$ and is $0$ otherwise. We therefore conclude that $S_M$ is equal to the sum of $\sum_{i=1}^n{\hat{X_i}}$. Furthermore, when $N$ is large, it can be shown using concentration lemmas that $a$ will be arbitrarily close to the fixed number $\Psi(\frac{M}{2N})$, and thus the distributions of $\hat{X_i}$'s converge to the same distribution, namely the truncated absolute value of a normal distribution. Besides, when $a$ is constant $\hat{X_i}$'s are independent and therefore one can apply the law of large numbers to conclude that $S_M/S_N\approx \stexp \hat{X}_1/\stexp |X_1|$, which is the desired conclusion. These arguments are rigorously outlined in  Appendix \ref{app:proof_of_order_stat}.

Recall that we assumed that ${\bf x}$ is a $k$-sparse random Gaussian signal with $k=(1+\epsilon_0)\mu_W(\delta)n$, and we defined $K_1$ to be the $k_1$-support of ${\bf x}$, where $k_1 = (1-\epsilon_1)\mu_W(\delta)n$. We denoted by $K$ the support set of ${\bf x}$. Also, if $\hat{{\bf x}}$ is the approximation to ${\bf x}$ obtained by $\ell_1$ minimization, we denoted by $L$ the $k$-support set of $\hat{{\bf x}}$. As a direct consequence of Lemma \ref{lemma:Gaussian_Base} we can write:
\begin{equation}
\ensuremath{\mathbb{P}}\left(\left|\frac{\|{\bf x}_{\overline{K_1}}\|_1}{\|{\bf x}\|_1} - (1-e^{-0.5\Psi^2(0.5\frac{1-\epsilon_1}{1+\epsilon_0})})\right|>\epsilon\right)\rightarrow 0,
\label{eq:kbar bound}
\end{equation}
\noindent for $\epsilon>0$ sufficiently small as $n\rightarrow\infty$. Define
\begin{equation}
\zeta(\epsilon_0) \triangleq \inf_{\epsilon_1>0}\frac{2C(\epsilon_1)(1+\kappa^*)}{C(\epsilon_1)-1}(1-e^{-0.5\Psi^2(0.5\frac{1-\epsilon_1}{1+\epsilon_0})}).
\label{eq:zeta}
\end{equation}

\noindent Incorporating (\ref{eq:robustness1}) into (\ref{eq:kbar bound}) we may write
\begin{equation}
\ensuremath{\mathbb{P}}\left(\frac{\|{\bf x}-\hat{{\bf x}}\|_1}{\|{\bf x}\|_1} - \zeta(\epsilon_0) < \epsilon\right)\rightarrow 1,
\label{eq:robustness2}
\end{equation}
\noindent for $\epsilon>0$ sufficiently small as $n\rightarrow\infty$.

Let us summarize our conclusions so far. First, we were able to show that
$|K\cap L|\geq k-W({\bf x},\|{\bf x}-\hat{{\bf x}}\|_1)$. The weak
robustness of $\ell_1$ minimization and the Gaussianity of the signal then
led us to the fact that for large $n$ with high probability $\|{\bf x}-\hat{{\bf x}}\|_1
\leq \zeta(\epsilon_0)\|{\bf x}\|_1$. These results build up the next key
theorem, which is the conclusion of this section.
\begin{thm}[Approximate Support Recovery]
Let ${\bf A}$ be an i.i.d. Gaussian $m\times n$ measurement matrix with
$\frac{m}{n}=\delta$. Let $k=(1+\epsilon_0)\mu_{W}(\delta)$ and ${\bf x}$
be an $n\times1$ random Gaussian $k$-sparse  signal. Suppose that
$\hat{{\bf x}}$ is the approximation to ${\bf x}$ given by $\ell_1$ minimization, i.e. $\hat{{\bf x}}=argmin_{{\bf A}{\bf z}={\bf A}{\bf x}}\|{\bf z}\|_1$. Then, as
$n\rightarrow\infty$, for all $\epsilon>0$,
\begin{equation}
\small
\ensuremath{\mathbb{P}}\left(\frac{|supp({\bf x}) \cap supp_k(\hat{{\bf x}})|}{k} -
2Q(\sqrt{-2\log(1-\zeta(\epsilon_0))})>-\epsilon\right)\rightarrow 1,
\label{eq:support recovery}
\end{equation}
\noindent where $\zeta(\cdot)$ is defined in (\ref{eq:zeta}).
\label{thm:l_1 support recovery}
\end{thm}

Before proving the above theorem, we mention the following useful lemma, the proof of which will be given in Appendix \ref{app:proof_of_W(x,ax)}.
\begin{lem}
Let ${\bf x}$ be a random $k$-sparse Gaussian vector of size $n$, and $0<\alpha<1$. For any positive $\epsilon$, the following happens with high probability as $n,k\rightarrow \infty$:
\begin{equation}
\frac{W({\bf x},\alpha\|{\bf x}\|_1)}{k}<(1-2Q(\sqrt{-2\log(1-\alpha)}))+\epsilon.
\end{equation}
\label{lem:W(x,a)}
\end{lem}
\begin{proof}[Proof of Theorem \ref{thm:l_1 support recovery}]
From equation (\ref{eq:robustness2}), for every $\epsilon'>0$ and large enough $n$, with high probability we have
$\|{\bf x}-\hat{{\bf x}}\|_1<(\zeta(\epsilon_0)+\epsilon')\|{\bf x}\|_1$. Therefore,
from Lemma \ref{lem:deviation thm} and the fact that $W({\bf x},\lambda)$
is increasing in $\lambda$, $|K\cap L| \geq k -
W({\bf x},(\zeta(\epsilon_0)+\epsilon')\|{\bf x}\|_1)$ with high
probability. Replacing for $W({\bf x},(\zeta(\epsilon_0)+\epsilon'))$ with the upper bound given by  Lemma \ref{lem:W(x,a)}, it follows that with very high
probability $\frac{|K\cap L|}{k}\geq
2Q(\sqrt{-2\log(1-\zeta(\epsilon_0)-\epsilon')})-\epsilon''$. We can now let $\epsilon'$ go to zero and the proof is completed.
\end{proof}
\noindent Note that if $\lim_{\epsilon_0\rightarrow0}\zeta(\epsilon_0)=0$, then  Theorem \ref{thm:l_1 support recovery} implies that $\frac{|K\cap L|}{k}$ becomes arbitrarily close to 1, which means that using $\ell_1$ minimization it is possible to closely estimate the support set of ${\bf x}$. We show in the sequel that this is in fact the case.

\subsection{Scaling Law of $\ell_1$ Minimization}
In order to show that the robust approximation of the sparse signal at step 1 of Algorithm \ref{alg:modmain} leads to perfect recovery at step 3, we need to obtain an explicit bound for the term $\zeta(\epsilon_0)$. This in turn requires calculating a solid relationship between the robustness parameter $C(\epsilon_1)$, and the back-off fraction $\epsilon_1$. For i.i.d. Gaussian matrices, we derive an explicit lower bound on $C(\epsilon_1)$ as a function of $\epsilon_1$ through the following theorem, the proof of which appears in Appendix \ref{app:proof_of_scaling}.

\begin{thm}[Scaling law of $\ell_1$ minimization for Gaussians.]
Let ${\bf A}$ be an $m\times n$ i.i.d. Gaussian matrix with $m=\delta n$, and $\mu_{W}(\delta)$ be the weak recovery threshold of $\ell_1$ minimization for $A$. For sufficiently large $n$, the (weak) robustness parameter $C(\epsilon_1)$ for a randomly chosen $k_1$-support $K_1$ of size $k_1=(1-\epsilon_1)\mu_{W}(\delta)n$  (see equation \ref{eq:robustness1}) satisfies:
\begin{equation}
C(\epsilon_1) \geq \frac{1}{\sqrt{1-\epsilon_1}}.
\label{eq:C_vs_eps}
\end{equation}
\label{thm:scale}
\end{thm}

We now derive an asymptotic upper bound on the term $\zeta(\epsilon_0)$ using the above relationship. Replacing the bound of (\ref{eq:C_vs_eps}) in the definition of $\zeta(\epsilon_0)$, we obtain:
\begin{eqnarray}
\nonumber \zeta(\epsilon_0) &=& \inf_{\epsilon_1>0}\frac{2C(\epsilon_1)(1+\kappa^*)}{C(\epsilon_1)-1}\left(1-e^{-0.5\Psi^2(0.5\frac{1-\epsilon_1}{1+\epsilon_0})}\right) \\
&\leq& \inf_{\epsilon_1>0}\frac{2(1+\kappa^*)}{1-\sqrt{1-\epsilon_1}}\left(1-e^{-0.5\Psi^2(0.5\frac{1-\epsilon_1}{1+\epsilon_0})}\right)  \\
&\leq& \frac{4(1+\kappa^*)}{\epsilon_0}\left(1-e^{-0.5\Psi^2(0.5\frac{1-\epsilon_0}{1+\epsilon_0})}\right),
\label{eq:zbound2}
\end{eqnarray}
\noindent where (\ref{eq:zbound2}) is obtained by simply taking $\epsilon_1=\epsilon_0$, and using the fact that $\frac{1}{1-\sqrt{1-\epsilon_0}}\leq 2/\epsilon_0$. We use the Taylor approximation of the inverse error function to bound the right hand side of (\ref{eq:zbound2}). Note that:
\begin{eqnarray}
\Psi(0.5\frac{1-\epsilon_0}{1+\epsilon_0}) &=& \sqrt{2}\cdot\text{erf}^{-1}\left(\frac{2\epsilon_0}{1+\epsilon_0}\right)\\
&=&  \sqrt{2\pi}\cdot\epsilon_0 + \text{\textit{o}}(\epsilon_0^2).
\end{eqnarray}
\noindent It follows that:
\begin{equation}
\zeta(\epsilon_0) \leq 4\pi(1+\kappa^*)\epsilon_0 + \mathcal{O}(\epsilon_0^2),
\end{equation}
\noindent As $\epsilon_0\rightarrow 0$. Therefore, we can immediately see that $\lim_{\epsilon_0\rightarrow0}\zeta(\epsilon_0)=0$.

 \section{Perfect Recovery, Step 3 of the Algorithm}
\label{sec:perfect recovery}
In Section \ref{sec:robustness} we showed that if
$\epsilon_0$ is small, the $k$-support of $\hat{{\bf x}}$, namely
$L=supp_k(\hat{{\bf x}})$, has a significant overlap with the true support of
${\bf x}$. We even found a quantitative lower bound on the size of this overlap
in Theorem \ref{thm:l_1 support recovery}. In step 3 of
Algorithm \ref{alg:modmain}, weighted $\ell_1$ minimization is used,
where the entries in  $\overline{L}$ are assigned a higher weight
than those in $L$. In \cite{Khajehnejad_weighted}, we have been able to
analyze the performance of such weighted $\ell_1$ minimization
algorithms. The idea is that if a sparse vector ${\bf x}$ can
be partitioned into two sets $L$ and $\overline{L}$, where in one set
the fraction of non-zeros is much larger than in the other set, then
(\ref{eq:weighted l_1}) can potentially recover ${\bf x}$ with an
appropriate choice of the weight $\omega > 1$, even though
$\ell_1$ minimization cannot.  The following theorem can be deduced
from the computations of \cite{journalweighted}.
\begin{thm}
Let $L\subset \{1,2,\cdots,n\}$ , $\omega>1$ and the fractions
$f_1,f_2\in[0,1]$ be given. Let $\gamma_1 = \frac{|L|}{n}$ and
$\gamma_2=1-\gamma_1$. There exists a threshold
$\lambda_c(\gamma_1,\gamma_2,f_1,f_2,\omega)$ such that with high
probability, almost all random sparse vectors ${\bf x}$ with \emph{at least}
$f_1\gamma_1n$ nonzero entries over the set $L$, and \emph{at most}
$f_2\gamma_2n$ nonzero entries over the set $\overline{L}$ can be
perfectly recovered using
$\min_{{\bf A}{\bf z}={\bf A}{\bf x}}\|{\bf z}_L\|_1+\omega\|{\bf z}_{\overline{L}}\|_1$, where ${\bf A}$
is a $\lambda_c n\times n$ matrix with i.i.d. Gaussian entries.
\label{thm:delta}
\end{thm}
\noindent For completeness, in Appendix \ref{App:delta_c}, we provide
the calculation of $\lambda_c(\gamma_1,\gamma_2,f_1,f_2,\omega)$, based on the calculations of \cite{journalweighted}. A software package for computing such thresholds can also be found in
\cite{sotware link}.

\begin{proof}[Proof of Theorem \ref{thm: final thm}]
Recall that the solution of $\ell_1$ minimization in the first stage of Algorithm (\ref{alg:modmain}) is the vector $\hat{{\bf x}}$. We denoted by $L$ the $k$-support set of $\hat{{\bf x}}$, and by $L^c$ its complement set. The last stage of the algorithm is a weighted $\ell_1$ minimization that puts more weight on the entries of ${\bf x}$ outside the set $L$. The justification for this is the fact that the fraction of the nonzero entries of the target signal ${\bf x}$ over the set $L$ is supposedly larger than the fraction of the nonzero entries over $L^c$. Let us denote these fractions by $f_1$ and $f_2$ respectively, namely  $f_1=\frac{|L\cap K|}{|L|}$ and $f_2=\frac{|\overline{L}\cap
K|}{|\overline{L}|}$, where $K$ is the support of the target signal, unknown to the algorithm before running the weighted $\ell_1$ minimization of the last stage. Since we are using a weighted $\ell_1$ minimization, ${\bf x}$ will be recovered perfectly with high probability if the number of measurements is large than the threshold of weighted $\ell_1$ minimization for the nonuniform sparsity model of the target signal, namely if:
\begin{equation}
\lambda_c(\frac{k}{n},1-\frac{k}{n},f_1,f_2,\omega) \leq \delta,
\end{equation}
\noindent where $\lambda_c$ was defined in Theorem \ref{thm:delta} and was characterized in \cite{journalweighted}. On the other hand, through Theorem \ref{thm:l_1 support recovery}, we provided a lower bound on $f_1$ (and consequently an upper bound on $f_2$) and we showed that as $\epsilon_0\rightarrow 0$, $f_1$ converges to 1 (and consequently $f_2$ approaches zero). The asymptotic value of  $\lambda_c(\frac{k}{n},1-\frac{k}{n},f_1,f_2,\omega)$ will therefore be
equal to $\lambda_c(\mu_{W}(\delta),1-\mu_{W}(\delta),1,0,\omega)$, as $\epsilon\rightarrow 0$ (Recall that $k = (1+\epsilon_0)\mu_W(\delta)n$). Furthermore, from the computations of \cite{journalweighted}, it can be shown that $\lambda_c(\mu_{W}(\delta),1-\mu_{W}(\delta),1,0,\omega) < \delta$ for an appropriate choice of $\omega >1$, and that for a fixed $\omega$, the function $\lambda_c(\gamma_1,\gamma_2,f_1,f_2)$ is a continuous function of $\gamma_1$, $f_1$ and $f_2$. Furthermore, $k$, the lower bound on $f_1$ and the upper bound on $f_2$ obtained from Theorem \ref{thm:l_1 support recovery} are all continuous functions of $\epsilon_0$ in this case. Therefore, we can conclude that for a strictly positive $\epsilon_0$ and corresponding overlap fractions $f_1$ and
$f_2$, $\lambda_c((1+\epsilon_0)\mu_{W}(\delta),1-(1+\epsilon_0)\mu_{W}
(\delta),f_1,f_2,\omega)< \delta$. This means that for some strictly positive $\epsilon_0$ the number of measurements that is required to reconstruct the signal precisely in the last stage of the algorithm is less than the number of measurements in ${\bf A}$, i.e. ${\bf x}$ will be recovered with high probability, despite the fact that it has more nonzero entries that the weak threshold of $\ell_1$ minimization. This completes the proof.
\end{proof}
\section{Generalization to Beyond Gaussians}
\label{sec:generalization}
The theoretical threshold improvement of the proposed iterative $\ell_1$ minimization algorithm was demonstrated for the case of i.i.d. Gaussian matrices, and sparse vectors with independent Gaussian nonzero entries.  It is reasonable to ask if we can extend these results to sparse signals with other distributions. We address this problem in this section. In summary, we prove that the theoretical threshold improvement can be generalized to sparse signals whose nonzero entries obey a more general class of distributions, namely continuous symmetric distributions with a non-vanishing finite order derivative at the origin.  This is outlined in the following section.

\subsection{Arbitrary Distributions}
The attentive reader will note that the only step where we used the Gaussianity of
the signal in the proof of threshold improvement was in the the order statistics results of Lemma
\ref{lemma:Gaussian_Base}. This result has the following
interpretation. For $N$ i.i.d. random variables, the
ratio $\frac{S_M}{S_N}$ can be approximated by a known function of $\frac{M}{N}$. In the Gaussian
case, this function behaves as $1-(1-\frac{M}{N})^2$, as $M\rightarrow
N$. For constant magnitude signals (say BPSK), the function behaves as
$\frac{M}{N}$, for $M\rightarrow N$, which predicts that the
reweighted method yields no improvement. A more careful analysis reveals that the improvement
over $\ell_1$ minimization depends on the behavior of
$\frac{S_M}{S_N}$, as $M\rightarrow N$, which in term depends on the
smallest order $n$ for which $f^{(n)}(0)\neq 0$, i.e., the smallest
$n$ such that the $n$-th derivative of the distribution at the origin is nonzero. We formalize these results by generalizing the arguments of the previous section. First, we present a generalization of Lemma \ref{lemma:Gaussian_Base}  for arbitrary symmetric distributions.

\begin{lem}
Suppose $X,X_1,X_2,\cdots,X_n$ are $N$ i.i.d. random
variables, drawn from a symmetric distribution  $f(\cdot)$. Let $S_N = \sum_{i=1}^{N}|X_i|$ and let $S_M$ be the sum of the largest $M$ numbers among $|X_i|$'s, for each
$1\leq M < N$. If $f(\cdot)$ is integrable, and if for every finite $a>0$, the integral $\int_{a}^{\infty}x^2f(x)dx$ is finite, then for every $\epsilon>0$ sufficiently small, as $N\rightarrow\infty$ and the ratio $M/N$ is kept constant, the following holds
\begin{eqnarray}
\ensuremath{\mathbb{P}}\left(\left|\frac{S_M}{S_N} - (1-2\frac{\int_{0}^{\Psi_f(\frac{M}{2N})}x\cdot f(x) dx}{\stexp_{f(\cdot)}|X|})\right|>\epsilon \right)\rightarrow 0,
\end{eqnarray}
\noindent where $\Psi_f(x) = Q_f^{-1}(x)$ with $Q_f(x) =\int_{x}^{\infty}f(y)dy$.
\label{lemma:arbitrary_concentration}
\end{lem}
Using the above lemma, we can modify the concentration term of equation (\ref{eq:kbar bound}) for the term $\frac{\|{\bf x}_{\overline{K_1}}\|_1}{\|{\bf x}\|_1}$, where the distribution of the nonzero entries of ${\bf x}$ is $f(\cdot)$. The resulting concentration thus becomes:
\begin{equation}
\ensuremath{\mathbb{P}}\left(\left|\frac{\|{\bf x}_{\overline{K_1}}\|_1}{\|{\bf x}\|_1} - 2\frac{\int_{0}^{\Psi_f(\frac{(1-\epsilon_1)}{2(1+\epsilon_0)})}x\cdot f(x) dx}{\stexp_{f(\cdot)}|X|}\right|>\epsilon\right)\rightarrow0,
\label{eq:kbar bound_gen}
\end{equation}
\noindent which, when put together with the bound of (\ref{eq:robustness1}) results in (Note that the bound in (\ref{eq:robustness1}) is independent from the distribution of ${\bf x}$):
\begin{equation}
\ensuremath{\mathbb{P}}\left(\frac{\|{\bf x}-\hat{{\bf x}}\|_1}{\|{\bf x}\|_1} - \zeta_f(\epsilon_0) < \epsilon\right)\rightarrow 1,
\label{eq:robustness2}
\end{equation}
\noindent for every $\epsilon>0$. Here $\zeta_f(\epsilon_0)$ is defined by:

\begin{equation}
\zeta_f(\epsilon_0) \triangleq \inf_{\epsilon_1>0}\frac{2C(\epsilon_1)(1+\kappa^*)}{C(\epsilon_1)-1}\times  2\frac{\int_{0}^{\Psi_f(\frac{(1-\epsilon_1)}{2(1+\epsilon_0)})}x\cdot f(x) dx}{\stexp_{f(\cdot)}|X|}.
\label{eq:zeta_f}
\end{equation}

\noindent Consequently, following similar arguments as in the proofs of Theorem \ref{thm:l_1 support recovery}, we can state the following theorem as a generalization of the approximate support recovery of $\ell_1$ minimization for arbitrary distributions, the proof of which is immediate.

\begin{thm}[Approximate Support Recovery/Generalization]
Let ${\bf A}$ be an i.i.d. Gaussian $m\times n$ measurement matrix with
$\frac{m}{n}=\delta$. Let $k=(1+\epsilon_0)\mu_{W}(\delta)n$ and ${\bf x}$
be an $n\times1$ $k$-sparse  signal whose nonzero entries are independently drawn from a distribution $f(\cdot)$ which satisfies the conditions of Lemma \ref{lemma:arbitrary_concentration}. Suppose that
$\hat{{\bf x}}$ is the approximation to ${\bf x}$ given by the $\ell_1$ minimization, i.e. $\hat{{\bf x}}=argmin_{{\bf A}{\bf z}={\bf A}{\bf x}}\|{\bf z}\|_1$. Then, as
$n\rightarrow\infty$, for $\epsilon>0$ sufficiently small, we have
\begin{equation}
\small
\ensuremath{\mathbb{P}}\left(\frac{|supp({\bf x}) \cap supp_k(\hat{{\bf x}})|}{k} -
2Q_f(\sqrt{-2\log(1-\zeta_f(\epsilon_0))})>-\epsilon\right)\rightarrow 1,
\label{eq:support recovery}
\end{equation}
\noindent where $\zeta_f(\cdot)$ is defined in (\ref{eq:zeta_f}).
\label{thm:l_1 support recovery_generalize}
\end{thm}

Note that $Q_f(\cdot)$ is always a decreasing function which is equal to zero at the origin for symmetric distributions. Therefore, the overlap fraction given by Theorem \ref{thm:l_1 support recovery_generalize} can be arbitrarily close to 1, provided that $\zeta_f(\epsilon_0)$ is sufficiently small. Therefore, the key in further conclusions on the above bound is to derive a bound on the term $\zeta_f(\epsilon_0)$, and show that it becomes arbitrarily small. For BPSK signals for instance, the term $\frac{\|{\bf x}_{\overline{K_1}}\|_1}{\|{\bf x}\|_1}$ is always equal to $\epsilon_0$, and therefore we cannot guarantee that $\zeta(\epsilon_0)$ vanishes asymptotically as $\epsilon_0\rightarrow 0$ based on (\ref{eq:zeta_f}). In fact we prove that $\lim_{\epsilon_0\rightarrow 0}\zeta(\epsilon_0) = 0$,  for distributions $f(\cdot)$ for which one of the finite order derivatives at the origin is nonzero, stated formally in the following lemma:
\begin{lem}
Let $f(\cdot)$ be a symmetric distribution which satisfies the conditions of Lemma \ref{lemma:arbitrary_concentration}. If for some integer $r\geq 0$, the $r$'th order derivative of $f(\cdot)$ at origin exists and does not vanish, i.e., $f^{(r)}(0)\neq 0$, then $\zeta_f(\epsilon_0)=\mathcal{O}(\epsilon_0^{1/(r+1)})$, as $\epsilon_0 \rightarrow 0$. Consequently, the support set approximation of $\ell_1$ minimization is asymptotically perfect with high probability as $\epsilon_0\rightarrow 0$.
\end{lem}
\begin{proof}
For simplicity, we take $\epsilon_1$ in the definition of $\zeta_f(\epsilon_0)$ to be equal to $\epsilon_0$, which only provides an upper bound. Since $f^{(r)}(0) > 0$ and $f(\cdot)$ is continuous, we conclude that for some constant $c>0$, and sufficiently small $x$, $f(x)\geq c\times x^r$. Therefore,
\begin{equation}
1/2-Q_f(x) =\int_{0}^{x}f(t)dt \geq \frac{c}{r+1}x^{r+1},
\end{equation}
\noindent and thus,
\begin{equation}
x\geq \Psi_f(1/2-\frac{c}{r+1}x^{r+1}),
\label{eq:x<Psi()}
\end{equation}
\noindent for sufficiently small $x$. Note that we have used the fact that $\Psi_f(\cdot)$ is a decreasing function.    Equivalently, (\ref{eq:x<Psi()}) means that
\begin{equation}
\Psi_f(1/2-x) =  \mathcal{O}(x^{1/(r+1)})
\label{eq:Psi=O}
\end{equation}
\noindent as $x\rightarrow 0$. On the other hand, note that $\frac{1-\epsilon_0}{2(1+\epsilon_0)} \geq 1/2-\epsilon_0$, and thus:
\begin{equation}  \Psi_f(\frac{1-\epsilon_0}{2(1+\epsilon_0)}) \leq \Psi_f(1/2-\epsilon_0).
\label{Psi<Psi}
\end{equation}
\noindent It follows from the above, (\ref{eq:Psi=O}), and the fact that $f(x) = \mathcal{O}(x^r)$ as $x\rightarrow 0$ that

\begin{equation} \int_{0}^{\Psi_f(\frac{(1-\epsilon_0)}{2(1+\epsilon_0)})}x\cdot f(x) dx = \mathcal{O}(\epsilon_0^{1+1/(r+1)}),\end{equation}

\noindent as $\epsilon_0\rightarrow 0$. Furthermore, from Theorem \ref{thm:scale}, we know that $C(\epsilon_1)\geq 1/\sqrt{1-\epsilon_0}$ (note that $\epsilon_1 = \epsilon_0$), and therefore $\frac{2C(\epsilon_1)(1+\kappa^*)}{C(\epsilon_1)-1} = \mathcal{O}(1/\epsilon_0)$ as $\epsilon_0\rightarrow 0$. Also, $\stexp_{f(\cdot)}|X|>0$ is constant. Therefore, from these conclusions and the definition of $\zeta_f(\cdot)$,  it follows that $\zeta_f(\epsilon_0) = \mathcal{O}(\epsilon_0^{1/(r+1)})$, as $\epsilon_0\rightarrow 0$.

\end{proof}

As a numerical example, we compute a theoretical bound for the approximate support recovery of $\ell_1$ minimization and threshold improvement in the case of $\delta= 0.5555$.  It is  easy to verify numerically that the conditions of Theorem \ref{thm: final thm} hold. The value of $\kappa^*$ is no more than $\sqrt{3}$ in this case. A theoretical bound on the overlap fraction between the $k$-support set of $\hat{{\bf x}}$ and the support set of the $k$-sparse ${\bf x}$ for an arbitrary distribution is provided by Theorem \ref{thm:l_1 support recovery_generalize}, where $k=(1+\epsilon_0)\mu_W(\delta)n$. We have computed this bound for three different distributions: Gaussian, uniform (-1,1) and a two sided Rayleigh distribution. The value of $r$, namely the smallest nonzero derivative order is $0$ for Gaussian and uniform  distributions, and is $1$ for the Rayleigh distribution. The computed bounds are plotted in Figure \ref{fig:overlaps_upperbounds}.  Furthermore, using  a value of $\omega=10$, and based on the premise of Theorem \ref{thm: final thm} and the computed bounds, we can certify an improvement of $\epsilon_0=5\times10^{-4}$ in the weak recovery threshold in the case of Gaussian distribution. For the uniform and Rayleigh distributions, the theoretical predictions in the improvement of recovery thresholds are smaller than the case of Gaussian, but are still strictly positive.  These improvement guarantees are of course much smaller than the practical values we would observe in practice, as will be illustrated in the following section.

\begin{figure}[t]
\centering

\includegraphics[width= 0.5\textwidth]{images1/overlap_upperbounds.pdf}
  \caption{\scriptsize{Theoretical lower bound on the correct support estimation of $\ell_1$ minimization, as a function of the weak threshold exceeding fraction $\epsilon_0$. The plots are based on the theoretical results of Theorem \ref{thm:l_1 support recovery_generalize}, and are derived for Gaussian, uniform and two sided Rayleigh distributions.}}
  \label{fig:overlaps_upperbounds}
\end{figure}

\section{Simulations}
\label{sec:simulation}

We demonstrate the validity of the theoretical results of the previous sections, and the performance of Algorithm \ref{alg:modmain} by a few numerical simulations. The purpose of the simulations of this section is both to evaluate the performance of the proposed reweighted $\ell_1$ algorithm in practice, and to verify its distribution dependent behavior. Figure \ref{fig:simultions} shows the empirical performance of Algorithm \ref{alg:modmain} for sparse signals with various distributions. Here the signal
dimension is $n=200$, and the number of measurements is $m=112$, which
corresponds to a value of $\delta = 0.5555$. We generated random
sparse signals with i.i.d. entries coming from certain
distributions, namely Gaussian, uniform,  Rayleigh, square root of
$\chi$-square with 4 degrees of freedom and, square root of
$\chi$-square with 6 degrees of freedom. All of these distributions are continuous and have some finite-order non-vanishing derivative at the origin. In fact, in an increasing order of the mentioned distributions, the smallest order of nonzero derivative at the origin varies from 0 to 3. In other words, the pdf of a Gaussian and a uniform $(-1,1)$ distribution is nonzero at 0. The pdf of the Rayleigh distribution is zero at the origin, but has a nonzero derivative. Finally, the pdf's of square root of a $\chi$-square with 4 and 6 degrees of freedom have second and third nonzero derivatives at the origin, respectively. In Figure \ref{fig:simultions},  solid lines represent the simulation
results for ordinary $\ell_1$ minimization, and different colors
indicate different distributions. Dashed lines are used to show the
results for Algorithm \ref{alg:modmain}. Notice that the more derivatives that vanish at the
origin, the less significant improvement over $\ell_1$ minimization is observed, which is consistent with the analysis of Section \ref{sec:generalization}. The
Gaussian and uniform distributions are flat
and nonzero at the origin and show an impressive more than 20\%
improvement in the weak threshold (from 45 to 55 in this case).

\begin{figure}[t]
\centering
  \includegraphics[width= 0.5\textwidth]{images1/simulation-mtlb.pdf}
  \caption{\scriptsize{Empirical Recovery Percentage for $n=200$ and $\delta = 0.5555$.}}
  \label{fig:simultions}
\end{figure}

In Figure \ref{fig:overlaps}, the overlap between the support set of a $k$-sparse signal ${\bf x}$ and the $k$-support set of the approximation $\hat{{\bf x}}$ given by $\ell_1$ minimization averaged over 400 random samples is plotted. Again, five different distributions were considered. It is apparent that overlap fraction is a decreasing function of $k$, and depends on the smoothness of the probability distribution at origin.
\begin{figure}[t]
\centering

  \includegraphics[width= 0.5\textwidth]{images1/overlaps.pdf}
  \caption{\scriptsize{Empirical overlap between the support set of a $k$-sparse vector and the $k$-support set of the $\ell_1$ optimum, for $n=200$ and $\delta = 0.5555$. Nonzero coefficients of signal are drawn from five different distributions (displayed). The average is over 400 samples.}}
  \label{fig:overlaps}
\end{figure}

We also report experimental results using regular $\ell_1$ and reweighted $\ell_1$ minimization  recovery algorithms over real world data. We have chosen a pair of satellite images (Figure \ref{fig:sat image})  taken in two different years, 1989 (left) and 2000 (right), from the New Britain rainforest in Papua New Guinea. Images originally belongs to Royal Society for the Protection of Birds and was taken from the Guardian archive, an article on deforestation. These images are generally recorded to evaluate environmental effects such as \emph{deforestation}.  The difference of images taken at different times is generally not very significant, and thus can be thought of as compressible. We have applied $\ell_1$ minimization  to recover the difference image over the subframe (subset of the original images) identified by the red rectangles in Figure \ref{fig:sat image}. In addition, we also implemented the reweighted $\ell_1$ minimization of Algorithm \ref{alg:modmain}, with $k=0.1n$ ($n$ being the total number of frame pixels), which assumed no prior knowledge about the structural sparsity of the signal or the nonzero coefficients. This value of $k$ was chosen heuristically, and is close to the actual support size of the signal. The original size of the image is $275\times 227$. We reduced the resolution by roughly a factor of $0.05$ for more tractability of $\ell_1$ solver in MATLAB. In addition, only the gray scale version of the difference image was taken into account, and was normalized so that the maximum intensity is 1. Furthermore, prior to compression, the difference image was further sparsified by rounding the intensities less than 0.1 to zero.  We pick the weight value $\omega = 2$ for the weighting stage of the reweighted $\ell_1$ algorithms. The normalized recovery error is defined to be the sum square of the intensity differences in the recovered and the original image, divided by the sum square of the original image intensity, i.e. $\sum_{i\in\text{frame}}(I_i-\hat{I}_i)^2 / \sum_{i\in\text{frame}}I_i^2$.  The average normalized error for $\ell_1$ minimization and reweighted $\ell_1 $ minimization is displayed in Figure \ref{fig:sat} as a function of $\delta$. The average is taken over $50$ realizations of i.i.d. Gaussian measurement matrices for each $\delta$. As can be seen, the recovery improvement is significant in the reweighted $\ell_1$ minimization.

\begin{figure}[t]
\centering

  \includegraphics[width= 0.33\textwidth]{images1/satellite_frames_green.pdf}
  \caption{ \scriptsize{Satellite images taken from the New Britain rainforest in Papua Guina at 1989 (left) and 2000 (right). Red boxes identify the subframe used for the experiment, and green boxes identify the regions with higher associated weight in the weighted $\ell_1$ recovery. Image originally belongs to Royal Society for the Protection of Birds and was taken from the Guardian archive, an article on deforestation \url{http://www.guardian.co.uk/environment/2008/jan/09/endangeredspecies.endangeredhabitats}.}}
  \label{fig:sat image}
\end{figure}

\begin{figure}[t]
\centering

  \includegraphics[width= 0.33\textwidth]{images1/brain_frames_green.pdf}
  \caption{ \scriptsize{Functional MRI images of the brain at two different instances illustrating the brain activity. Green boxes identify the region with higher associated weight in the weighted $\ell_1$ recovery.
  Image is adopted from \url{https://sites.google.com/site/psychopharmacology2010/student-wiki-for-quiz-9}.}}
  \label{fig:brain image}
\end{figure}

\begin{figure}[t]
\centering
    \subfloat[]{\label{fig:sat}\includegraphics[width= 0.4\textwidth]{images1/Recovery_Satellite.pdf}}
  \subfloat[]{\label{fig:brain}\includegraphics[width= 0.4\textwidth]{images1/Recovery_Brain.pdf}}
  \caption{ \scriptsize{Average normalized recovery error for $\ell_1$, and reweighted $\ell_1$ minimization recovery of the difference between the subframes of (a) a pair of satellite images shown in Figure \ref{fig:sat image}, and (b) the pair of brain fMRI images shown in Figure \ref{fig:brain image}.  Data is averaged over different realizations of measurement matrices for each $\delta$. }}
  \label{fig:simultions satellite_brain}
\end{figure}

Another experiment was done on a pair of brain fMRI images taken at two different instances of time, shown in Figure \ref{fig:brain image}. Similar to the satellite images, the objective is to recover the difference image from a set of compressed measurements The original image size is $271\times 271$, and similar preprocessing steps as for the satellite images were done before compression.  We used $\ell_1$ minimization and Algorithm \ref{alg:modmain} with no presumed prior information, with  $k=0.1n$ and $\omega = 1.3$. The average normalized recovery errors are displayed in Figure \ref{fig:brain}, from which we can infer similar conclusions as in the case of satellite images.

\section{Conclusion}
We introduced a new two-step reweighted $\ell_1$ minimization for the recovery of linearly compressed sparse signals. We proved that for sparse signals the nonzero entries of which are drawn from a broad class of continuous distributions, the proposed algorithm achieves a recovery threshold strictly better than that of $\ell_1$ minimization. Our theoretical analysis predicts that the performance improvement strongly depends on the distribution of the nonzero entries, and should be better for distributions with a smaller non-vanishing order of derivative at the origin. This was very closely verified by our numerical simulations. For distributions with no finite order non-vanishing derivative at origin, our analysis does not predict any improvement in the performance. This is also the case in practice: For ternary signals with nonzero values equal to $\pm1$ no improvement is observed in the empirical recovery threshold over the regular $\ell_1$ minimization. Our analysis was based on random Gaussian measurement matrices, and the robustness results of $\ell_1$ minimization. Possible related future research could address other measurement matrix ensembles, and the development of reweighted algorithms that can universally improve the recovery performance of linear programming. On the other hand, the improvement predictions using our theoretical tools are not tight, due to upper bounding techniques and worst case considerations in various parts of our proofs, specially in predicting the approximate support recovery potential of $\ell_1$ minimization. Future work can concentrate on tightening these bounds through more clever techniques, and consequently achieving more promising performance guarantees for reweighted linear programming.


Nearly Frobenius dimension on Frobenius algebras

Abstract: This article is divided into two parts. In the first part we work over a field $\mathbb{k}$ and prove that the Frobenius space associated to a Frobenius algebra is generated as left A-module by the Frobenius coproduct. In particular, we prove that the Frobenius dimension coincides with the dimension of the algebra. In the second part we work with a commutative ring $k$. We introduce the concept of nearly Frobenius algebras in this context and construct solutions of the Yang-Baxter equation starting from elements in the Frobenius space. Also, we give a list of equivalent characterizations of nearly Frobenius algebras.

\section{Introduction}

\hspace{0.5cm}The concept of nearly Frobenius algebra is motivated by the result proved in \cite{CG}, which states that: the homology of the free loop space $H^{\ast}(LM)$ has the structure of a Frobenius algebra without counit. These objects were studied in \cite{GLSU} and their algebraic properties were developed in \cite{AGL15}, \cite{AGM1} and \cite{AGM2}.
In \cite{AGL15} the notion of Frobenius space associated to a $\k$-algebra $A$, $\mathcal{E}_A$,  was defined and it was proved that if $A$ has finite dimension then $\mathcal{E}_A$ is a finite dimensional $\k$-vectorial space. The $\k$-dimension of $\mathcal{E}_A$ is denoted by $\operatorname{Frobdim}A$ and it follows that $\operatorname{Frobdim}A \leq (\operatorname{dim} A)^2$.
In \cite{AGM1} several classes of algebras with non trivial nearly Frobenius structure were described. Finally in \cite{AGM2} the notion of normalized nearly Frobenius structure was introduced and it was proved that an algebra $A$ has a normalized nearly Frobenius structure if and only if $A$ is a separable algebra if and only if the category of bimodules $ _A\mathcal{M}_A$ is semisimple.    \\

In this work we continue to deepen in the study of nearly Frobenius algebras. In the first part of the article we concentrate on answering the following question: What additional properties has the Frobenius space if we work with a Frobenius algebra? In the second part we go one step further in the generalization of the concept by extending the notion to algebras on commutative rings. Some properties are preserved and they are described in this work. Other characterizations of the concept emerge. Also a relationship with solutions of the quantum Yang-Baxter equation arises.\\

The article is organized as follows. In section $2$ all the algebras involved are of finite dimension over a field $\k$. We define an $A$-module structures on the space $\mathcal{E}_A$ and we obtain the following result:\\

{\bf{Theorem A}}
If $A$ is a Frobenius $\k$-algebra, then the Frobenius space $\mathcal{E}_A$ is generated, as left $A$-module, by  the Frobenius coproduct of $A$, let us call it $\Delta_0$. In other words, there exist $a\in A$ such that $ \Delta=a\star\Delta_0$ for all $\Delta\in\mathcal{E}_A$.\\

As a straight consequence of the previous theorem we have the next result for Frobenius algebras.\\

{\bf{Corollary A}}
If $A$ is a Frobenius algebra, then $$\operatorname{dim}_\k A=\operatorname{Frobdim}A.$$

In section $3$ the notion of nearly Frobenius algebra over a commutative rings is introduced. We construct solutions of the Yang-Baxter equation starting from elements in the Frobenius space. As a consequence of the results developed in this section we obtain the following characterizations of nearly Frobenius algebras:\\

{\bf{Corollary B}}
	Let $A$ be an algebra over a commutative ring $k$. Then the following statements are equivalent:
	\begin{enumerate}
		\item $A$ is a nearly Frobenius algebra.
		\item There exist $Q\in A\otimes_k A$ central.
		\item There exist $\eta_A:\operatorname{End}_k(A)\rightarrow A\otimes_kA$ an $A$-bimodule homorphism.
		\item The map $i: A\rightarrow \mathcal{A}(R)$ given by $i(a)(b)=ab$ is a monomorphism of algebras, where $R\in\operatorname{End}_A(A\otimes A)$ is a homomorphism of right $A$-modules solution of the equation:
$$R^{13}\circ R^{12}=R^{23}\circ R^{13}=R^{12}\circ R^{23}.$$

		\end{enumerate}

\section{Frobenius algebras over fields}
\subsection{Abrams Theorem}
In \cite{A99} Abrams proves a theorem that gives a characterization of  Frobenius algebras in terms of the existence of a coassociative counital comultiplication $\Delta:A\rightarrow A\otimes A$ which is a map of $A$-bimodules. In his construction, $\Delta(1)$ can be expressed from a basis and the dual one related to the bilinear form of the Frobenius algebras.  This expression will be useful to prove some new  results. Let us recall Abrams Theorem and some of its implications.
\begin{thm}\label{TM Abrams}
	An algebra $A$ is a Frobenius algebra if and only if it has a coassociative counital comultiplication $\Delta:A\rightarrow A\otimes A$ which is a map of $A$-bimodules.
\end{thm}
In the proof Abrams constructs the coproduct using the isomorphism of right (or left) $A$-modules $\lambda_r:A\to A^*$ ($\lambda_l:A\to A^*$) as follows
\begin{equation}\label{eq1}
	\xymatrix{
A\ar[r]^(.4){\Delta}\ar[d]_{\lambda_r}& A\otimes A\\
A^*\ar[r]_(.4){\mu^*}&A^*\otimes A^*\ar[u]_{\lambda_r^{-1}\otimes\lambda_r^{-1}}
},
\end{equation}
 where $\mu$ is the composition of the transposition $\tau:A\otimes A\rightarrow A \otimes A$ with the product $m$ of $A$.

Given a basis $\{e_1,\dots,e_n\}$ of the Frobenius algebra $A$ with bilinear form $B:A\times A\rightarrow \k$, let $\Bigl\{e_1^\#,\dots, e_n^\#\Bigr\}$ be the \emph{dual basis} of $A$ relative to $B$, that means  the elements satisfy $B\Bigl(e_i^\#, e_j\Bigr)=\delta_{ij}$, for all $i,j=1,\dots,n$. On the other hand, $\{e_1^*,\dots, e_n^*\}$ denotes de basis of $A^*$ satisfying $e_i^*(e_j)=\delta_{ij}$. Then, using that $\lambda_r:A\rightarrow A^* $  is given by $\lambda_r(a)(b)=B(a,b)$ and the fact that
$$\lambda_r\Bigl(e_i^\#\Bigr)(e_j)=B\Bigl(e_i^\#,e_j\Bigr)=\delta_{ij},\quad\mbox{for all}\quad j=1,\dots,n,$$
we conclude that $e_i^\#=\lambda_r^{-1}(e_i^*)$ for all $i=1,\dots, n$.

\begin{prop}\label{prop2}
	The coproduct $\Delta:A\rightarrow A\otimes A$ of the Frobenius algebra $A$ given in equation (\ref{eq1})  satisfies
	\begin{enumerate}
		\item[(i)] $\displaystyle{\Delta(1_A)=\sum_{i=1}^ne_i\otimes e_i^\#}$.
		\item[(ii)] $\displaystyle{\Delta(x)=\sum_{i=1}^nxe_i\otimes e_i^\#=\sum_{i=1}^ne_i\otimes e_i^\#x}$, for all $x\in A$.
	\end{enumerate}
\end{prop}
\begin{proof}
	We write $\Delta(1)=\sum_ju_j\otimes e_j^\#$. Then, using that $\Delta$ is a map of right $A$-modules and that $\varepsilon$, defined as $\varepsilon(x)=B(1_A,x)$, is the counit we have that  $$\sum_{j=1}^n\varepsilon\Bigl(e_j^\#x\Bigr)u_j=x\quad\mbox{for all $x\in A$}.$$
	In particular, if we take $\displaystyle{x=e_i \Rightarrow e_i=\sum_{j=1}^n\varepsilon\Bigl(e_j^\#e_i\Bigr)u_j=\sum_{j=1}^n\delta_{ij}u_j=u_i}.$ Then
	 $$\Delta(1)=\sum_{j=1}^ne_j\otimes e_j^\#.$$
	 The second claim is an immediate consequence of the fact that $\Delta$ is a map of $A$-bimodules.
\end{proof}

\subsection{Dimension of the Frobenius space on Frobenius algebras}
In this section we recall the definition of a nearly Frobenius algebra and the associated Frobenius space. Frobenius algebras are also nearly Frobenius algebras so we can compute their Frobenius space. We will prove that the dimension of the Frobenius space of a Frobenius algebra  coincides with the dimension of the algebra. \begin{defn}
	An algebra $A$ is a \emph{nearly Frobenius algebra} if it admits a map $\Delta:A\rightarrow A\otimes A$ of $A$-bimodules, that means, the following diagrams commute:
	$$\xymatrix{A\otimes A\ar[r]^{m}\ar[d]_{\Delta\otimes 1}& A\ar[d]^{\Delta}\\
		A\otimes A\otimes A\ar[r]_{1\otimes m}&A\otimes A
	},\quad \xymatrix{A\otimes A\ar[r]^{m}\ar[d]_{1\otimes\Delta}& A\ar[d]^{\Delta}\\
		A\otimes A\otimes A\ar[r]_{m\otimes 1}&A\otimes A
	}$$
\end{defn}

\begin{defn}
	The \emph{Frobenius space} associated to an algebra $A$ is the vector space of all the possible coproducts $\Delta$ that make it into a nearly Frobenius algebra ($\mathcal{E}_A$), see \cite{AGL15}. Its dimension over $\k$ is called the \emph{Frobenius dimension} of $A$, that is,
	$$\operatorname{Frobdim}A = \operatorname{dim}_\k\mathcal{E}_A.$$
\end{defn}

\begin{rem}

	The Frobenius space $\mathcal{E}_A$ associated to the algebra $A$ admits a structure of left $A$-module as follows
	$$\begin{array}{rcl}
		A\times \mathcal{E}_A&\rightarrow& \mathcal{E}_A\\
		(a,\Delta)&\mapsto& a\ast\Delta
	\end{array}$$ $\bigl(a\ast\Delta\bigr)(1_A):=(1\otimes a)\Delta(1_A)=\sum x_i\otimes ay_i$, for all $a\in A$ where $\Delta(1_A)=\sum x_i\otimes y_i$.\\

Note that $a\ast\Delta\in\mathcal{E}_A$:
$$
\begin{array}{rcl}
(x\otimes 1)(a\ast\Delta)(1)&=&\displaystyle{(x\otimes 1)(1\otimes a)\Delta(1)=(1\otimes a)(x\otimes 1)\Delta(1)}\\
&=&(1\otimes a)\Delta(1)(1\otimes x)=(a\ast\Delta)(1)(1\otimes x).
\end{array}$$
It is clear that this operation defines a left action on $\mathcal{E}_A$.
\end{rem}
\begin{rem}
	If $A$ is a Frobenius algebra we can twist the previous action using the Nakayama automorphism associated to $A$ as follows: As $A$ is a Frobenius algebra there exists $\nu:A\rightarrow A$ an automorphism of algebras such that $B(x,y)=B(y,\nu(x))$ for all $x,y\in A$. Then, we define the left action of $A$ on $\mathcal{E}_A$ as:
	$$(a\star\Delta)(1):=\Bigl(1\otimes\nu^{-1}(a)\Bigr)\Delta(1)\quad\mbox{for all $a\in A$ and $\Delta\in\mathcal{E}_A$}.$$
	As $\nu$ is an algebra homomorphism so is $\nu^{-1}$. Then $\star$ is an action. \\

	Note that if $A$ is a symmetric algebra then the two actions previously defined coincide.
\end{rem}
\begin{prop}
	Let $A$ be a Frobenius algebra with Frobenius structure $(\Delta,\varepsilon)$ and $M=A\star\Delta\subset\mathcal{E}_A$ the left $A$-module generated by $\Delta$. Then, $$\operatorname{dim}_\k M=n.$$
\end{prop}
\begin{proof}
	We will prove that $\mathcal{D}=\bigl\{e_1\star\Delta,\dots,e_n\star\Delta\bigr\}$ is a basis of $M$ as vector space, where $\bigl\{e_1,\dots,e_n\bigr\}$ and $\Bigl\{e_1^\#,\dots, e_n^\#\Bigr\}$ are dual bases of $A$ related to the bilinear form $B$. \\
	First, note that $\mathcal{D}$ is a generator of $M$ by definition. Now, we will prove that $\mathcal{D}$ is LI: suppose that
	$$\sum_{j=1}^n\alpha_j\bigl(e_j\star\Delta\bigr)=0$$ then, $$\sum_{j=1}^n\alpha_j\bigl(e_j\star\Delta\bigr)(1)=0.$$
	Remember that the Frobenius coproduct satisfies, by the Proposition \ref{prop2}, that $\displaystyle{\Delta(1)=\sum_{i=1}^ne_i\otimes e_i^\#}$. Then
	$$\sum_{j=1}^n\alpha_j\sum_{i=1}^ne_i\otimes \nu^{-1}\bigl(e_j\bigr)e_i^\#=0\Rightarrow \sum_{i,j=1}^n\alpha_je_i\otimes \nu^{-1}\bigl(e_j\bigr)e_i^\#=0.$$
	Applying the map $(1\otimes\varepsilon)$ we conclude that
	$$0=\sum_{i,j=1}^n\alpha_je_i\varepsilon\Bigl(\nu^{-1}\bigl(e_j\Bigr)e_i^\#\bigr)=\sum_{i,j=1}^n\alpha_je_i\varepsilon\Bigl(e_i^\#e_j\Bigr)=\sum_{i=1}^n\alpha_ie_i\Rightarrow \alpha_i=0,\;\forall i=1,\dots,n.$$
	Therefore $\operatorname{dim}_\k M=n.$
\end{proof}

\begin{thm}\label{notsymmetric}
	If $A$ is a Frobenius $\k$-algebra, then the Frobenius space $\mathcal{E}_A$ is generated, as left $A$-module, by  the Frobenius coproduct of $A$, let us call it $\Delta_0$. In other words, there exist $a\in A$ such that $ \Delta=a\star\Delta_0$ for all $\Delta\in\mathcal{E}_A$.
\end{thm}
\begin{proof}
	We consider  $\bigl\{e_1,\dots,e_n\bigr\}$ and $\Bigl\{e_1^\#,\dots, e_n^\#\Bigr\}$ dual bases of $A$ related to the bilinear form $B$ and $\nu:A\rightarrow A$ the Nakayama automorphism associated to $B$. Then, by Proposition \ref{prop2},
	$$\Delta_0(x)=\sum_{i=1}^nxe_i\otimes e_i^\#$$
	is an $A$-bimodule homomorphism, and $\varepsilon(x)=B(1,x)=B(x,1)$ is the corresponding trace. \\
	Note that the dual bases satisfy that:
	$$x=\sum_{j=1}^n\varepsilon\Bigl(e_j^\#x\Bigr)e_j=\sum_{j=1}^n\varepsilon\bigl(xe_j\bigr)e_j^\#\quad\mbox{for all $x\in A$}.$$
	If we consider $\Delta\in\mathcal{E}_A$ we can write $\displaystyle{\Delta(1)=\sum_{i=1}^n e_i\otimes b_i,}$ where $b_i\in A$ for $i=1,\dots,n$.\\
	Using that $\Delta$ is an $A$-bimodule homorphism and the previous identifications of all $x\in A$, we have that
	$$\sum_{i=1}^nxe_i\otimes b_i=\sum_{i,j=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)e_j\otimes b_i=\sum_{j=1}^ne_j\otimes\left(\sum_{i=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)b_i\right)=\sum_{j=1}^ne_j\otimes b_jx.$$
	Then $\displaystyle{b_jx=\sum_{i=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)b_i}$ for all $j=1,\dots,n$, $x\in A$. Now, we define a homomorphism $\sigma:A\rightarrow A$ of $\k$-vector spaces by $\sigma\Bigl(e_j^\#\Bigr)=b_j$ for all $j=1,\dots, n$.\\
	Note that
	$$\sigma\Bigl(e_j^\#x\Bigr)=\sigma\left(\sum_{i=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)e_i^\#\right)=\sum_{i=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)\sigma\Bigl(e_i^\#\Bigr)=\sum_{i=1}^n\varepsilon\Bigl(e_j^\#xe_i\Bigr)b_i
	=b_jx.$$
	Then
	$$\sigma\Bigl(e_j^\#x\Bigr)=b_jx,\quad\mbox{for all}\; j=1,\dots, n.$$ This proves that $\sigma $ is a homomorphism of right $A$-modules and so there exists an element $b\in A$ such that $\sigma(y)=b\cdot y$ for all $y\in A$. Finally we define $a=\nu(b)\in A$, then  $b_j=\sigma\Bigl(e_j^\#\Bigr)=\nu^{-1}(a)\cdot e_j^\#$, and $\Delta=a\star\Delta_0$.

\end{proof}

\begin{cor}\label{symmetrc2}
	If $A$ is a Frobenius algebra, then $$\operatorname{dim}_\k A=\operatorname{Frobdim}A.$$
\end{cor}

\begin{rem}
	Note that the previous result in not true if the nearly Frobenius algebra is not Frobenius. An example of this remark is the path algebra $A=\k Q$, here
	$$Q=\xymatrix{
		\bullet_{1}\ar[r]^{\alpha}&\bullet_{2}}$$
	This algebra has, as a $\k$-vector space, dimension 3 and in \cite{AGL15} it is proven that $\operatorname{Frobdim}_\k A=1$. Then
	$$\operatorname{Frobdim}_\k A<\operatorname{dim}_\k A.$$
	There are many ways to guarantee that this algebra is not  Frobenius. We will verify this by showing that no nearly coproduct can be completed to a Frobenuis one.\\
	The nearly Frobenius space is generated by the coproduct $\Delta$ defined as:
	$$	\Delta(e_1)=\alpha\otimes e_1,\quad \Delta(e_2)=e_2\otimes\alpha,\quad \Delta(\alpha)=\alpha\otimes \alpha. $$
	Note that it is impossible to define a trace $\varepsilon:A\rightarrow\k$ such that $(\varepsilon\otimes 1)\Delta=\operatorname{Id}=(1\otimes\varepsilon)\Delta$.\\
	The next example shows that the Frobenius dimension can  also be greater than the dimension of the algebra.
	Let $A$ be the path algebra associated to the quiver
	$$Q=\xymatrix{
&\bullet_2\ar[rd]^\beta&\\
\bullet_{1}\ar[ur]^\alpha&&\bullet_3\ar[ll]^\gamma
}$$ with the relation $\gamma\alpha=0$. \\
It is clear that this algebra has dimension $9$ as a $\k$-vector space. The Frobenius space has dimension $10$, and a general nearly Frobenius coproduct is expressed as
$$\Delta(e_2)=a\beta\gamma\otimes\alpha,\quad \Delta(e_3)=a\gamma\otimes\alpha\beta$$
and
$$\begin{array}{rcl}
\Delta(e_1)&=&a\bigl(e_1\otimes\alpha\beta\gamma+\alpha\beta\gamma\bigr)+b_1\alpha\otimes\gamma+b_2\alpha\otimes\beta\gamma+b_3\alpha\otimes\alpha\beta\gamma+b_4\alpha\beta\otimes\gamma\\
&=&b_5\alpha\beta\otimes\beta\gamma+b_6\alpha\beta\otimes\alpha\beta\gamma+b_7\alpha\beta\gamma\otimes\gamma+b_8\alpha\beta\gamma\otimes\beta\gamma+b_9\alpha\beta\gamma\otimes\alpha\beta\gamma
\end{array}$$
As before it is impossible to define a trace for these coproducts, which means that $A$ is not a Frobenius algebra.
\end{rem}

\section{Frobenius structures over commutative rings}
In this section we will consider Frobenius and nearly Frobenius algebras over commutative rings instead of fields. In this context we will prove a version of Theorem \ref{notsymmetric}. In the last subsection we construct solutions of the Yang-Baxter equation starting from elements in the Frobenius space $\mathcal{E}_A$. Finally we give several characterizations to nearly Frobenius algebras over a commutative ring.

Throughout this section $k$ is a commutative ring.
\subsection{Frobenius algebras over commutative rings}

\begin{defn}
	A $k$-algebra $A$ is \emph{Frobenius} if $A$ is finitely generated and projective as a $k$-module, and there exists a left $A$-module isomorphism
	$$\lambda_l:A\rightarrow A^*.$$
\end{defn}

\begin{rem}\label{rem12}
	Take an arbitrary ring extension $B\subset A$ and let
	$$F: {}_A\mathcal{M}\rightarrow {}_B\mathcal{M}$$
	be the restriction of scalars functor. Then $F$ has a left adjoint, the induction functor
	$$G=A\otimes_B-: {}_B\mathcal{M}\rightarrow {}_A\mathcal{M}$$
	and a right adjoint, the coinduction functor
	$$T=Hom_B(A,-):  {}_B\mathcal{M}\rightarrow {}_A\mathcal{M}.$$
	The left $A$-module structure on $T(N)=Hom_B(A,N)$ is given by $(a\cdot\gamma)(b)=\gamma(ba)$, for all $a,b\in A$ and $\gamma\in Hom_B(A,N)$. For a left $B$-module map $f$, we put $T(f)=f\circ-$.
\end{rem}

\begin{defn}
	A covariant functor $F:\mathcal{C}\rightarrow\mathcal{D}$ is called a \emph{ Frobenius functor} if it has isomorphic left and right adjoints.
\end{defn}

\begin{thm}[Theorem 2.4 of \cite{CIM}]\label{t14}
	Let $B\subset A$ be an arbitrary ring extension. Then the following statements are equivalent:
	\begin{enumerate}
		\item The restriction of scalars functor $F: {}_A\mathcal{M}\rightarrow {}_B\mathcal{M}$ is Frobenius (or, equivalently, $B\subset A$ is a Frobenius extension).
		\item There exist a pair $(\Delta,\varepsilon)$ such that
		\begin{enumerate}
			\item[(a)] $\Delta:A\rightarrow A\otimes_BA$ is an $A$-bimodule map,
			\item[(b)] $\varepsilon:A\rightarrow B$ is a $B$-bimodule map, and a counit for $\Delta$, that is $$(1\otimes_B\varepsilon)\Delta=(\varepsilon\otimes_B1)\Delta=\operatorname{Id}_A.$$
		\end{enumerate}
	\end{enumerate}
	\end{thm}

\begin{cor}[Corollary 2.6 of \cite{CIM}]
	For an algebra $A$ over a commutative ring $k$, the following statements are equivalent:
\begin{enumerate}
	\item $A$ is a Frobenius algebra.
	\item There exist a coalgebra structure $\bigl(A,\Delta,\varepsilon\bigr)$ on $A$ such that the coproduct $\Delta:A\rightarrow A\otimes_kA$ is an $A$-bimodule map.
	\item  There exist $Q=\sum_{i=1}^n e_i\otimes e_i^\#\in A\otimes_kA $ and $\varepsilon\in A^*$ such that $Q$ is $A$-central and the normalizing Frobenius condition
	$$\sum_{i=1}^n\varepsilon\bigl(e_i\bigr)e_i^\#=\sum_{i=1}^n e_i\varepsilon\Bigl(e_i^\#\Bigr)=1_A$$
	is satisfied. $(Q,\varepsilon)$ is called a Frobenius pair.
\end{enumerate}
	\end{cor}

\begin{rem}
	As a consequence of the previous results we have the following properties:
	\begin{enumerate}
		\item[(1)] $Q$ is $A$-central then $\displaystyle{\sum_{i=1}^n xe_i\otimes e_i^\#=\sum_{i=1}^n e_i\otimes e_i^\#x\quad\mbox{for all $x\in A$}}$.
		\item[(2)] The normalizing condition implies that:
		$\displaystyle{x=\sum_{i=1}^n\varepsilon\bigl(xe_i\bigr)e_i^\#=\sum_{i=1}^n\varepsilon\Bigl(e_i^\#x\Bigr)e_i}$\; for all $x\in A.$
		\item[(3)] The sets $\bigl\{e_1,\dots, e_n\bigr\}$ and $\Bigl\{e_1^\#,\dots, e_n^\#\Bigr\}$ are generators of $A$ as $k$-module. We call them \emph{dual generators} of $A$.
		\item[(4)] The element $Q$ does not depend on the choice of dual generators $e_i$, $e_i^\#$, $i=1,\dots,n$ of $A$.
	\end{enumerate}

\end{rem}

\subsection{Nearly Frobenius algebras over commutative rings}
\begin{defn}
	An associative $k$-algebra $A$ is a \emph{nearly Frobenius algebra} if it admits an homomorphism $\Delta:A\rightarrow A\otimes_k A$ of $k$-modules such that $\Delta$ is an homomorphism of $A$-bimodules.

	Let $(A,\Delta_A)$ and $(B,\Delta_B)$ be two nearly Frobenius algebras. An homomorphism $f:A\rightarrow B$ is a \emph{nearly Frobenius homomorphism} if it is a morphism of $k$-algebras and the following diagram commutes.
	$$\xymatrix{A\ar[r]^{f}\ar[d]_{\Delta_A}& B\ar[d]^{\Delta_B}\\
		A\otimes_k A\ar[r]_{f\otimes f}&B\otimes_k B
	}.$$
\end{defn}

\begin{rem}
	If we have an associative $k$-algebra $A$ we can consider the set $\mathcal{E}_A$ of all coproducts $(\Delta:A\rightarrow A\otimes_k A)$ that make it into a nearly Frobenius algebra. The set $\mathcal{E}_A$ is a $k$-module. The proof that $(\mathcal{E}_A,+)$ is an abelian group is found in \cite{AGL15}. We define the operation $\cdot: k\times\mathcal{E}_A\rightarrow\mathcal{E}_A$ as follows: $$(r\cdot\Delta)(x)=(r\otimes_k 1)\Delta(x)=\sum r\cdot x_1\otimes x_2,\; \mbox{if}\; \Delta(x)=\sum \cdot x_1\otimes_k x_2,$$ for all $r\in k$ and $\Delta\in\mathcal{E}_A$. It is easy to see that this operation defines an action of $A$ on $\mathcal{E}_A$.

	Finally, we define the \emph{Frobenius space over $k$} associated to an algebra $A$ as the $k$-module $\mathcal{E}_A$. \\ Note that $\mathcal{E}_A=Hom_{A\mbox{-}A}(A,A\otimes_k A)$.
\end{rem}

\begin{defn} Let $A$ be an associative $k$-algebra.
	Denote by $C_{A\otimes_k A}(A)$ the set of $A$-centralising elements of $A\otimes_k A$, i.e
	$$C_{A\otimes_k A}(A)=\left\{\sum_ix_i\otimes_k y_i\in A\otimes_k A:\;\sum_iax_i\otimes_k y_i=\sum_ix_i\otimes_k y_ia,\;\mbox{for all $ a\in A$}\right\}.$$
\end{defn}

\begin{rem}
	The evaluation homomorphism
	$$\Psi:\mathcal{E}_A\rightarrow C_{A\otimes_k A}(A)\quad\mbox{with}\quad\Delta\mapsto\Delta(1_A)$$
	is an isomorphism of $k$-modules.\\
	In the previous remark we see that $\mathcal{E}_A$ is an $k$-module. The set $C_{A\otimes_kA}(A)$ is a natural $k$-submodule of $A\otimes_kA$ and it is clear that $\Psi$ is a morphism of $k$-modules. \\
	Note that if we know the value of $\Delta$ on $1_A$ then we can determine the value on all element of $A$ as: $\Delta(x)=x\cdot\Delta(1_A)$. Then $\Psi$ is surjective. In a similar way, if we have two coproducts $\Delta_1$ and $\Delta_2$ such that $\Delta_1(1_A)=\Delta_2(1_A)$, then $\Delta_1=\Delta_2$ because they are morphisms of $A$-bimodules. Then $\Psi$ is injective.
\end{rem}

\begin{rem}
	If $A$ is a Frobenius algebra the space $C_{A\otimes_k A}(A)$ has structure of left $A$-module as follows
	$$a\star \sum_ix_i\otimes_k y_i:=\sum_ix_i\otimes_k \nu^{-1}(a)y_i\quad \mbox{for all $a\in A$},$$
	where $\nu:A\rightarrow A$ is the Nakayama automorphism of $A$.
\end{rem}
\begin{thm}
	Let $A$ be a Frobenius algebra over a commutative ring $k$ with Nakayama automorphism $\nu:A\rightarrow A$ and let $\bigl\{e_1,\dots, e_n\bigr\}$, $\Bigl\{e_1^\#,\dots, e_n^\#\Bigr\}$ be dual generators of $A$ and 	$\displaystyle{Q=\sum_{i=1}^ne_i\otimes e_i^\#\in A\otimes_k A}$. Then
	$C_{A\otimes_kA}(A)$ is a free rank one left $A$-submodule of $A\otimes_kA$ with basis $\bigl\{Q\bigr\}$.
\end{thm}
\begin{proof}
	It is clear that $C_{A\otimes_kA}(A)$ is a left $A$-submodule of $A\otimes_kA$ with the action $\star.$\\
	Now consider the left $A$-module $A\star Q$ and note that $A\star Q\subset C_{A\otimes_kA}(A)$. First we prove that $A\star Q$ is free: suppose that $a\star Q=0$ then
	$$0=(1\otimes\varepsilon)(a\star Q)=(1\otimes\varepsilon)\left(\sum_ie_i\otimes \nu^{-1}(a)e_i^\#\right)=\sum_i\varepsilon\bigl(\nu^{-1}(a)e_i^\#\bigr)e_i=\sum_i\varepsilon\bigl(e_i^\#a\bigr)e_i=a,$$
	then $a=0$. To finish it is enough to prove that $A\star Q=C_{A\otimes_kA}(A)$.\\
	Using localization to maximal ideals of $k$ arguments we can suppose that $A$ is a free $k$-module and reproduce the prove of Theorem \ref{notsymmetric} to guarantee  that $A\star Q=C_{A\otimes_kA}(A)$.

\end{proof}

The next result is an adaptation of Theorem \ref{t14} to the case of nearly Frobenius algebras.
\begin{thm}\label{extension}
	Let $B\subset A$ be an arbitrary ring extension. Then the following statements are equivalent:
	\begin{enumerate}
		\item[(a)] There exists an $A$-bimodule map $\Delta:A\rightarrow A\otimes_BA$ .
		\item[(b)] There exists a natural transformation $\eta:T\rightarrow G$, with $G, T: {}_B\mathcal{M}\rightarrow {}_A\mathcal{M}$ defined in Remark \ref{rem12}.
	\end{enumerate}
\end{thm}
\begin{proof}
	(a)$\Rightarrow$(b) For $N\in {}_B\mathcal{M}$ we define $\eta_N:Hom_B(A,N)\rightarrow A\otimes_BN$ as\\ $\eta_N(f)=\sum e_1\otimes_B f(e_2)$, where $\Delta(1_A)=\sum e_1\otimes_B e_2$.\\
	Let us verify that $\eta_N$ is an $A$-module morphism: $$a\cdot\eta_N(f)=a\cdot\left(\sum e_1\otimes_B f\bigl(e_2\bigr)\right)=\sum ae_1\otimes_B f\bigl(e_2\bigr).$$
	On the other hand, $$\eta_N(a\cdot f)=\sum e_1\otimes_B(a\cdot f)\bigl(e_2\bigr)=\sum e_1\otimes_Bf\bigl(e_2a\bigr).$$
	Using that $\Delta\in\mathcal{E}_A$ we have that $$(1\otimes f)\left(\sum ae_1\otimes_B e_2\right)=(1\otimes f)\left(\sum e_1\otimes_B e_2a\right)$$
	Then, $\sum ae_1\otimes_B f\bigl(e_2\bigr)=\sum e_1\otimes_Bf\bigl(e_2a\bigr)$, therefore $a\cdot\eta_N(f)=\eta_N(a\cdot f)$.\\
	Let us prove that $\eta$ natural transformation: For $M, N\in{}_B\mathcal{M}$ and $f\in Hom_B(M,N)$
	the following diagram must commute
	$$\xymatrix{Hom_B(A,M)\ar[r]^{\eta_M}\ar[d]_{Hom_B(A,f)}&A\otimes_BM\ar[d]^{A\otimes_Bf}\\
		Hom_B(A,N)\ar[r]_{\eta_N}&A\otimes_BN}$$
	Let be $\varphi\in Hom_B(A,M)$, then $(A\otimes_Bf)\eta_M(\varphi)=\sum e_1\otimes_Bf\varphi(e_2)=\eta_N(f\circ\varphi)=\eta_N\circ Hom_B(A,f)(\varphi)$.\\
	(b)$\Rightarrow$(a) For $a\in A$, we define $\varphi_a: A\rightarrow A$ by $\varphi_a(b) = ba$. Then the map $\varphi: A\rightarrow Hom_B(A,A)$ mapping $a$ to $\varphi_a$ is a left $A$-module morphism. Now take $$\Delta=\eta_A(\varphi)\quad (i.e. \Delta(a)=\eta_A(\varphi_a)).$$
	The map $\Delta$ is left $A$-module morphism, because $\eta_A$ and $\varphi$ are left A-module morphisms.\\
	As $\eta$ is a natural transformation we have the following commutative diagram
	$$\xymatrix{
		Hom_B(A,A)\ar[r]^{\eta_A}\ar[d]_{Hom_B(A,\varphi_a)}&A\otimes_BA\ar[d]^{A\otimes_B\varphi_a}\\
		Hom_B(A,A)\ar[r]_{\eta_A}&A\otimes_BA
	}$$
	Applying the diagram to $I_A =\varphi_1$, we have that
	$$\sum e_1\otimes_B e_2a=\bigl(A\otimes_B\varphi_a\bigr)\Delta(1_A)=\bigl(A\otimes_B\varphi_a\bigr)\circ\eta_A\bigl(\varphi_1\bigr)=\eta_A\circ Hom_B(A,\varphi_a)(\varphi_1)$$$$=\eta_A\bigl(\varphi_a\circ\varphi_1\bigr)=\eta_A(\varphi_a)=\Delta(a).$$
	Then $\Delta$ is a right $A$-module morphism.
\end{proof}

\subsection{The quantum Yang-Baxter equation}
The quantum Yang-Baxter equation (QYBE) is one of the basic equations in mathematical physics that lies in the foundation of the theory of quantum groups. In the last years, many solutions of this equation were found, and the related algebraic structures (Hopf algebras) have been intensively studied.

In \cite{BFS} it is shown that every Frobenius algebra over a commutative ring determines a class of solutions of the quantum Yang-Baxter equation. In this article we adapt the previous result to nearly Frobenius algebras.

As before $k$ is an associative commutative ring with $1$ and $A$ an associative $k$-algebra. Let $\mathrm{R}\in\operatorname{End}(A\otimes_kA)$, $\mathrm{R}^{12}=\mathrm{R}\otimes\operatorname{Id}$, $\mathrm{R}^{23}=\operatorname{Id}\otimes \mathrm{R},$ and $\mathrm{R}^{13}=(\operatorname{Id}\otimes\tau)(\mathrm{R}\otimes\operatorname{Id})(\operatorname{Id}\otimes \tau)$ maps in $\operatorname{End}(A\otimes_kA\otimes_kA)$, where $\tau:A\otimes_kA\rightarrow A\otimes_kA$ is the twist mapping. We shall say that $\mathrm{R}$ is a \emph{solution of the quantum Yang-Baxter equation} (QYBE), if
$$\mathrm{R}^{12}\circ \mathrm{R}^{13}\circ \mathrm{R}^{23}= \mathrm{R}^{23}\circ\mathrm{R}^{13}\circ\mathrm{R}^{12}.$$

\begin{prop}
Let $A$ be a $k$-algebra and $Q\in C_{A\otimes_kA}(A)\simeq\mathcal{E}_A$ (the Frobenius space of $A$). Then
\begin{enumerate}
	\item $Q^{13}Q^{12}=Q^{23}Q^{13}=Q^{12}Q^{23}$,
	\item $Q^{12}Q^{23}Q^{12}=Q^{23}Q^{12}Q^{23}$,
\end{enumerate}
where $Q^{12}=\sum_ix_i\otimes y_i\otimes 1$, $Q^{13}=\sum_ix_i\otimes 1\otimes y_i$ and $Q^{23}=\sum_i1\otimes x_i\otimes y_i$ if $Q=\sum_ix_i\otimes y_i$.
\end{prop}
\begin{proof}
\begin{enumerate}
	\item $$Q^{13}Q^{12}=\left(\sum_ix_i\otimes 1\otimes y_i\right)\left(\sum_jx_j\otimes y_j\otimes 1\right)=\sum_i(x_i\otimes 1)\sum_{j}(x_j\otimes y_j)\otimes y_i$$
	$$=\sum_{i,j}x_j\otimes y_jx_i\otimes y_i=\sum_jx_j\otimes(y_j\otimes 1)\sum_ix_i\otimes y_i=\sum_{i,j}x_j\otimes x_i\otimes y_iy_j=Q^{23}Q^{13},$$
	$$Q^{12}Q^{23}=\left(\sum_ix_i\otimes y_i\otimes 1\right)\left(\sum_j1\otimes x_j\otimes y_j\right)=\sum_ix_i\otimes (y_i\otimes 1)\sum_jx_j\otimes y_j$$
	$$=\sum_ix_i\otimes\sum_jx_j\otimes y_jy_i=\left(\sum_j1\otimes x_j\otimes y_j\right)\left( \sum_ix_i\otimes 1\otimes y_i\right)=Q^{23}Q^{13}.$$
	\item $$\bigl(Q^{12}Q^{23}\bigr)Q^{12}=\bigl(Q^{23}Q^{13}\bigr)Q^{12}=Q^{23}\bigl(Q^{13}Q^{12}\bigr)=Q^{23}\bigl(Q^{12}Q^{23}\bigr).$$
\end{enumerate}
\end{proof}

Using the previous proposition and Lemma 2. of \cite{BFS} we have the following result.
\begin{cor}
	Let $\mathrm{R}=Q\tau$, where $\tau:A\otimes_kA\rightarrow A\otimes_kA$ is the twist map. Then $\mathrm{R}$ is a solution of the QYBE.
\end{cor}

The following results are based on the article \cite{CIM}.
\begin{defn}
	Let $A$ be an algebra over a commutative ring $k$ and $R\in\operatorname{End}_k(A\otimes_kA)$ a solution of the equation
	\begin{equation}\label{equation2}
		R^{13}\circ R^{12}=R^{23}\circ R^{13}=R^{12}\circ R^{23}.
	\end{equation}
We define the $k$-subalgebra $\mathcal{A}(R)$ of $\operatorname{End}_k(A)$ as
$$\mathcal{A}(R):=\bigl\{f\in \operatorname{End}_k(A): f\cdot R=R\cdot f\bigr\},$$
with unit $\operatorname{Id}_A$.
\end{defn}
\begin{rem}
	Note that $\mathcal{A}(R)=\bigl\{f\in \operatorname{End}_k(A): (f\otimes\operatorname{Id}_A)\circ R=R\circ \bigl(\operatorname{Id}_A\otimes f\bigr)\bigr\}$ and $R$ is $\mathcal{A}(R)$-central. Moreover, if $\operatorname{End}_k(A)$ is flat as a $k$-module
	$R\in\mathcal{A}(R)\otimes\mathcal{A}(R)$: \\
	$\mathcal{A}(R)$ can be seen as  $\operatorname{Ker}(\varphi)$, with $\varphi:\operatorname{End}_k(A)\rightarrow\operatorname{End}_k(A\otimes A) $ defined by
	$$\varphi(f)=(f\otimes\operatorname{Id}_A)\circ R-R\circ(\operatorname{Id}_A\otimes f).$$
	Assuming $\operatorname{End}_k(A)$ is flat as a $k$-module, $\mathcal{A}(R)\otimes \operatorname{End}_k(A)=\operatorname{Ker}(\varphi\otimes \operatorname{Id}_{\operatorname{End}_kA})$. In particular, if $R=\sum R^1\otimes R^2$
	$$\begin{array}{rcl}
	\bigl(\varphi\otimes \operatorname{Id}_{\operatorname{End}_kA}\bigr)(R)&=&\sum R^1\circ R^1\otimes R^2\otimes R^2 -\sum R^1\otimes R^2 \circ R^1\otimes R^2\\
	&=&R^{13}\circ R^{12}-R^{12}\circ R^{23}=0
	\end{array}$$
Then $R\in\mathcal{A}(R)\otimes \operatorname{End}_k(A)$. In similar way, using the other condition we can see that $R\in\operatorname{End}_k(A)\otimes\mathcal{A}(R).$ Then  $R\in\mathcal{A}(R)\otimes\mathcal{A}(R)$.
\end{rem}

\begin{thm}\label{monomorphism}
	For an algebra $A$ over a commutative ring $k$, the following statements are equivalent:\begin{enumerate}
		\item $A$ is a nearly Frobenius algebra.
		\item The map $i: A\rightarrow \mathcal{A}(R)$ given by $i(a)(b)=ab$ is a monomorphism of algebras, where $R\in\operatorname{End}_A(A\otimes A)$ is a homomorphism of right $A$-modules solution of (\ref{equation2}).
	\end{enumerate}
\end{thm}
\begin{proof}
	$(1)\Rightarrow (2)$ Let $\Delta$ be the nearly Frobenius coproduct and $Q=\Delta(1)=\sum_ie_i\otimes e^i$ the corresponding $A$-central element. Then, the map
	$$R:A\otimes A\rightarrow A\otimes A,\quad R(a\otimes b)=\sum_ie_ia\otimes e^ib$$
	is a solution of (\ref{equation2}). Consequently, we can construct the algebra $\mathcal{A}(R)=\bigl\{f\in\operatorname{End}_k(A):\bigl(f\otimes \operatorname{Id}_A\bigr)\circ R=R\circ\bigl(\operatorname{Id}_A\otimes f\bigr)\bigr\}\subseteq\operatorname{End}_k(A)$,  and define the injection map $i:A\rightarrow\operatorname{End}_k(A)$ as $i(a)(b)=ab$, for all $a,b\in A$. We will prove that $i(A)\subset\mathcal{A}(R)$.
	$$\begin{array}{rcl}
			\bigl(i(a)\otimes \operatorname{Id}_A\bigr)R(x\otimes y)&=&\displaystyle{\bigl(i(a)\otimes \operatorname{Id}_A\bigr)\bigl(\sum_ie_ix\otimes e^iy\bigr)=\sum_iae_ix\otimes e^iy}\\
			&=&\displaystyle{\bigl(\sum_iae_i\otimes e^i\bigr)(x\otimes y)=\bigl(\sum_ie_i\otimes e^ia\bigr)(x\otimes y)}\\
			&=&\displaystyle{\sum_ie_ix\otimes e^iay=\bigl(\sum_ie_i\otimes e^i\bigr)\bigl(x\otimes ay\bigr)}\\
			&=&\displaystyle{R(x\otimes ay)=R\bigl(\operatorname{Id}_A\otimes i(a)\bigr)(x\otimes y),\;\forall x,y\in A.}
	\end{array}
$$ Then $	\bigl(i(a)\otimes \operatorname{Id}_A\bigr)\circ R=R\circ\bigl(\operatorname{Id}_A\otimes i(a)\bigr)$, and $i(A)\subset\mathcal{A}(R)$.\\
Note that $R$ is homomorphism of right $A$-module by definition: $R\bigl((a\otimes b)\cdot x\bigr)=R(a\otimes bx)=Q(a\otimes bx)=Q(a\otimes b)(1\otimes x)=R(a\otimes b)(1\otimes x)=R(a\otimes b)\cdot x$, for all $a,b,x\in A$.

$(2)\Rightarrow (1)$ We define $Q:=R(1\otimes 1)=\sum_ie_i\otimes f_i$. By Corollary  24 it is enough to prove that $Q$ is $A$-central.\\
As $i(a)\in\mathcal{A}(R)$ we have that $i(a)\cdot R=R\cdot i(a)$. Then $$\bigl[(i(a)\otimes \operatorname{Id})\circ R\bigr](1\otimes 1)=\bigl[R\cdot (\operatorname{Id}\otimes i(a))\bigr](1\otimes 1)\Rightarrow$$
$$\sum_ii(a)(e_i)\otimes f_i=\sum_iae_i\otimes f_i=R(1\otimes a)=R\bigl((1\otimes 1)\cdot a)\bigr)=R(1\otimes 1)\cdot a=Q\cdot a.$$
Then $a\cdot Q=Q\cdot a,$ for all $a\in A$.
\end{proof}

Finally we summarize some equivalences to nearly Frobenius algebras over a commutative ring.

\begin{cor}
	Let $A$ be an algebra over a commutative ring $k$. Then the following statements are equivalent:
	\begin{enumerate}
		\item $A$ is a nearly Frobenius algebra.
		\item There exist $Q\in A\otimes_k A$ central.
		\item There exist $\eta_A:\operatorname{End}_k(A)\rightarrow A\otimes_kA$ an $A$-bimodule homorphism.
		\item The map $i: A\hookrightarrow \mathcal{A}(R)$ given by $i(a)(b)=ab$ is a monomorphism of algebras, where $R\in\operatorname{End}_A(A\otimes A)$ is a homomorphism of right $A$-modules solution of (\ref{equation2}).
		\end{enumerate}
\end{cor}
\begin{proof}
$(1)\Leftrightarrow (2) \Leftrightarrow (3)$ follows from Theorem \ref{extension} and $(1) \Leftrightarrow (4)$ follows from Theorem \ref{monomorphism}.\end{proof}

\bibliographystyle{elsarticle-harv}

Representation Theory (math.RT); Rings and Algebras (math.RA)