diff --git "a/data_all_eng_slimpj/shuffled/split2/finalzzgmlv" "b/data_all_eng_slimpj/shuffled/split2/finalzzgmlv" new file mode 100644--- /dev/null +++ "b/data_all_eng_slimpj/shuffled/split2/finalzzgmlv" @@ -0,0 +1,5 @@ +{"text":"\\section{Introduction}\n\nMuch of the recent progress in understanding the connection between the strong and weak coupling regimes\nin the ${\\cal N}=4$ SYM was achieved using the Bethe ansatz technique within the AdS\/CFT correspondence \\cite{malda}.\nNot only is this useful in the gauge theory, but it should also give the spectrum\nof the free strings in the $AdS_5 \\times S^5$ background.\n\nWhile at weak coupling the Bethe ansatz description appeared as appropriate for the associated spin chain \\cite{MZ}, at strong coupling, namely in the dual string theory picture, it was first proposed at the classical level\nin \\cite{afs}. An important ingredient in the all loop Bethe ansatz equations is the coupling dependent\ndressing phase. Using $1$-loop string results near particular states \\cite{ptt}, a few leading terms\n in the 1-loop dressing phase were found in \\cite{bt}. In \\cite{hl, FK} the full 1-loop strong coupling expansion of the coupling dependent coefficient $c_{r,s}(g)$ entering the dressing phase was found and tested. Further progress in understanding the next orders in strong coupling expansion of $c_{r,s}(g)$ was made in \\cite{j} which lead to the finding of all strong coupling expansion coefficients of $c_{r,s}(g)$ \\cite{bhl}.\n\n For the particular $SL(2)$ sector, the all loop Bethe ansatz (BES)\nequations were proposed in \\cite{bes}. This ansatz is only asymptotic as it is only supposed to work for large values of the length of the spin chain $J$.\nThe all loop Bethe ansatz was tested by computing the one-cut large $S$ anomalous dimensions for the operators of the type ${\\rm tr}(\\Phi D_{+}^S \\Phi)$. More specifically, the all loop anomalous dimension was shown to be \\cite{K, km, es,bes}\n\\begin{equation}\nE- S= f(\\lambda) \\ln S + \\mathcal{O}(S^{0}) \\label{yat}\n\\end{equation}\nThe all loop Bethe ansatz equations for this solution lead to an integral equation for the universal function $f(\\lambda)$. The weak coupling expansion of $f(\\lambda)$ was checked at weak coupling to four loops against a direct gauge theory computation \\cite{bcdks}. The function $f(\\lambda)$ is related to the cusp anomaly of light-like Wilson loops \\cite{K, km} which can also be computed at strong coupling using AdS\/CFT \\cite{kru, m}. The logarithmic scaling was studied at weak\nand strong coupling \\cite{BGK, FTT, CK}.\nThe complicated integral equation for $f(\\lambda)$ obtained in \\cite{bes} was solved at strong coupling in \\cite{bkk}. Remarkably, it matches the expansion obtained directly on the string side to two loops in strong coupling expansion \\cite{ft1,rtt}. The validity of the asymptotic all loop Bethe ansatz was checked to next order in large $S$ expansion \\cite{fz, fgr} for the folded string solution corresponding to twist two operators, and also for a class of more complex solutions, namely the spiky string solutions \\cite{fkt}.\n\nAlthough the asymptotic Bethe ansatz was tested for certain states in the $SL(2)$ sector, a direct rigorous proof of the conjectured relationship between the strong and weak coupling expansions of $c_{r,s}(g)$ for all $r,s$ was not obtained. For $r=2,s=3$ a proof was obtained in \\cite{bes}. A further attempt to prove the relationship was made in \\cite{gh} only for certain coefficients of the expansion of $c_{2,s}$. In \\cite{kl, fr} a relationship between the weak and strong coupling expansions of $c_{r,s}(g)$ was found but the strong coupling expansion was treated in a non rigorous way. It is the goal of this paper to study in detail the properties of $c_{r,s}(g)$, and to give a proof of the conjectured expansions for all $r,s$.\n\nStarting with the weak coupling expansion of $c_{r,s}(g)$ we sum the series, and then we obtain a single integral representation formula in the complex plane for $c_{r,s}(g)$. This allows us to systematically analyze weak and strong coupling expansions by simply deforming the contour as appropriate for the expansion we want. As was pointed out already in \\cite{bes}, we show that at strong coupling the expansion of $c_{r,s}(g)$ is an asymptotic series. We obtain a well defined integral for the remainder, which can be evaluated in principle as precise as desired. We estimate the remainder integral to behave exponentially as $g^{-3\/2} e^{-8 \\pi g}$. Exponential behavior was obtained for the cusp anomaly $f(\\lambda)$ at strong coupling in \\cite{bk}. The non-perturbative scale obtained in \\cite{bk} is consistent with the mass gap of the two-dimensional bosonic O(6) sigma model embedded into the $AdS_5 \\times S^5$ string theory \\cite{am1}.\n\nAs a byproduct of the integral representations that we find, we are able to sum the dressing phase and therefore obtain all weak and strong coupling expansions of the dressing phase in terms of finite sums, which can be readily be performed at any order as needed. In addition, we found explicitly the exponentially suppressed part of the dressing phase. It would be interesting to use these results in the computation of the function $f(\\lambda)$, especially to recover the non-perturbative scale obtained in \\cite{bk}.\n\nThe paper is organized as follows. In section 2 we review the all loop dressing phase in the $SL(2)$ Bethe ansatz, as well as the expansions of $c_{r,s}(g)$ proposed in \\cite{bes}. In section 3 we find a double integral representation of $c_{r,s}$ by summing the weak coupling expansion. The main result of this paper, i.e. a single integral representation of $c_{r,s}$ suitable for any expansion is obtained in section 4. In section 5 we study the properties of $c_{r,s}$, perform weak\/strong coupling expansions, and thus prove the relationship between them. The summing of the dressing phase and its $g$ expansions are done in section 6. Finally, in section 7 we present a summary of the results while in Appendix A we check by a different method the expansions of a simple illustrative example that we use.\n\n\n\n\n\n\n\\section{Dressing phase}\n\n\nAs mentioned, the phase $\\theta(x^\\pm_1,x^\\pm_2)$ defined as\n\\begin{equation}\n\\theta(x^\\pm_1,x^\\pm_2)=\\sum_{r=2}^{\\infty}\\sum_{s=r+1}^{\\infty} c_{r,s}(g) [q_r (x_1^{\\pm}) q_s (x_2^{\\pm})-q_s (x_1^{\\pm}) q_r (x_2^{\\pm})]\n\\end{equation}\nplays an important role in the all-loop Bethe-ansatz. Here\n\\begin{equation}\nq_r = \\frac{i}{r-1}\\bigg(\\frac{1}{(x^{+})^{r-1}}-\\frac{1}{(x^{-})^{r-1}}\\bigg)\n\\end{equation}\nand the coefficients $c_{r,s}(g)$ are given below. $x^\\pm(u)$ are $g$-dependent and defined through $u\\pm\\tfrac{i}{2}=x^\\pm(u)+\\tfrac{g^2}{x^\\pm(u)}$.\n\nIt is convenient to write the dressing phase in the following way \\cite{bhl}\n\\begin{eqnarray}\n\\theta(x^\\pm_1,x^\\pm_2,g) &=& \\chi(x_1^{+},x_2^{+},g)-\\chi(x_1^{+},x_2^{-},g)-\\chi(x_1^{-},x_2^{+},g)+\\chi(x_1^{-},x_2^{-},g)\\nonumber\\\\\n&-&\\chi(x_2^{+},x_1^{+},g)+\\chi(x_2^{-},x_1^{+},g)+\\chi(x_2^{+},x_1^{-},g)-\\chi(x_2^{-},x_1^{-},g)\n\\end{eqnarray}\nwhere\n\\begin{equation}\n\\chi(x_1,x_2,g)=-2 \\sum_{r=2}^{\\infty}\\sum_{s=r+1}^{\\infty} \\frac{\\tilde{c}_{r,s}(g)}{x_1^{r-1} x_2^{s-1}}\n\\end{equation}\nand, for convenience, we defined\n\\begin{equation}\n\\tilde{c}_{r,s}(g) = \\frac{1}{2} \\frac{1}{(r-1)(s-1)} c_{r,s}(g),\n\\end{equation}\n It turns out that the coefficients $c_{r,s}$ vanish unless $r+s$ is odd. Therefore we can define two integers\n\\begin{equation}\n m = \\frac{1}{2}(r+s-3), \\ \\ \\ \\bar{m} = \\frac{1}{2}(s-r-1), \\ \\ \\ \\ s=m+\\bar{m}+2, \\ \\ \\ \\ r=m-\\bar{m}+1, \\quad m \\geq \\bar{m}+1\n\\label{mmbar}\n\\end{equation}\nand express $\\chi(x_1,x_2,g)$ as\n\\begin{equation}\n\\chi(x_1,x_2,g) =-2 \\sum_{\\bar{m}=0}^{\\infty}\\sum_{m=\\bar{m}+1}^{\\infty} \\frac{\\tilde{c}_{m,\\bar{m}}(g) }{x_1^{m-\\bar{m}} x_2^{m+\\bar{m}+1}}\n\\end{equation}\nwhere\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}}(g) = \\tilde{c}_{r,s}(g), \\ \\ \\ \\ r=m-\\bar{m}+1, \\quad m \\geq \\bar{m}+1\n\\end{equation}\nBy a slight abuse of notation we still call the coefficients as $\\tilde{c}$. To avoid confusion, from now on we are going to use always the notation\n$\\tilde{c}_{m,\\bar{m}}$, or equivalently\n\\begin{equation}\nc_{m,\\bar{m}} = 2(m-\\bar{m})(m+\\bar{m}+1) \\tilde{c}_{m,\\bar{m}}\n\\label{cct}\n\\end{equation}\nFor small coupling $g<\\frac{1}{4}$ the coefficients $\\tilde{c}_{m,\\bar{m}}(g)$ can be expanded\\footnote{We define the coefficients as the straight-forward expansion of $\\chi(x_1,x_2,g)$. As a result there is an overall minus sign with respect to \\cite{bes}} in powers\nof $g$:\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}}(g) = \\sum_{k=1}^\\infty \\tilde{c}^{(2k)}_{m,\\bar{m}}\\, g^{2k+1}\n\\end{equation}\n From \\cite{bes}, we find that the coefficients $\\tilde{c}^{(n)}_{m,\\bar{m}}$, have a nice symmetric form:\n\\begin{equation}\n \\tilde{c}^{(2k)}_{m,\\bar{m}} = \\frac{(-)^{k+m+\\bar{m}} \\zeta(1+2k)}{(2+2k)^2(1+2k)B(1-m+k,2+m+k)B(1-\\bar{m}+k,2+\\bar{m}+k)}\n\\label{CS}\n\\end{equation}\nwhere $B(x,y)=\\frac{\\Gamma(x)\\Gamma(y)}{\\Gamma(x+y)}$ is Euler's beta function.\n These coefficients also have an asymptotic expansion for large $g$ as\n\\begin{equation}\n \\tilde{c}_{m,\\bar{m}}(g) = \\sum_{n=0}^N \\tilde{c}^{(-n)}_{m,\\bar{m}}\\, g^{1-n} +R_N\n\\label{lec}\n\\end{equation}\n where, for $n>1$\n\\begin{equation}\n \\tilde{c}^{(-n)}_{m,\\bar{m}} = \\frac{\\zeta(n)}{2(-2\\pi)^n \\Gamma(n-1)} \\\n \\frac{\\Gamma\\left(m+\\frac{1}{2} n\\right)\\Gamma\\left(\\bar{m}+\\frac{1}{2} n\\right)}{\\Gamma\\left(m+2-\\frac{1}{2} n\\right)\\Gamma\\left(\\bar{m}+2-\\frac{1}{2} n\\right)}\n\\label{CL}\n\\end{equation}\nand\n\\begin{equation}\n\\tilde{c}^{(0)}_{m,\\bar{m}} = \\frac{1}{2m(m+1)} \\delta_{\\bar{m},0}, \\ \\ \\ \\tilde{c}^{(-1)}_{m,\\bar{m}} =-\\frac{1}{\\pi}\\frac{1}{(2m+1)(2\\bar{m}+1)}\n\\label{CL01}\n\\end{equation}\nSince the expansion is only asymptotic we should sum a finite number of terms and include a residue $R_N$ to have an equality between both sides of eq. (\\ref{lec}).\n Obviously it is quite important that both, small and large coupling expansions correspond to the same function. However, up to know, this was only a conjecture except for\n$\\bar{m}=0$, $m=1$ (or $r=2$, $s=3$) where it was proved in \\cite{bes}. Moreover, since the strong coupling expansion is only asymptotic, it\nis important to give an expression for the residue $R_N$ so that we can estimate the error. In the following we give a proof of the equivalence of\nboth expansions by considering an expression valid for all values of the coupling and such that it can be easily expanded at large and small $g$ with the expected results.\nIt also provides an exact expression for the residue $R_N$.\n\nMoreover, we extend these results to the function $\\chi(x_1,x_2,g)$. Such function can also be expanded in powers of $g$ as\n\\begin{eqnarray}\n\\chi(x_1,x_2,g) &=& \\sum_{k=1}^\\infty \\chi^{(2k)}(x_1,x_2) g^{2k+1}, \\ \\ \\ \\ g<\\frac{1}{4} ,\\\\\n\\chi(x_1,x_2,g) &=& \\sum_{n=0}^N \\chi^{(-n)}(x_1,x_2) g^{1-n} + R_N, \\ \\ \\ \\ g\\rightarrow\\infty .\n\\end{eqnarray}\nAgain, the second expansion is only asymptotic. For given $g$ there is an optimal value of $N$ such that the residue $R_N$ is smallest. In this paper we find explicit expressions for\nall the coefficients of such expansion as well as for the residue $R_N$. The coefficients are in terms of finite sums or alternatively in terms of the residue of given functions at certain poles.\n\n\n\\section{A double integral representation for $c_{m,\\bar{m}}(g)$}\n\n As a first step we are going to construct a generating function for the coefficients $\\tilde{c}^{(2k)}_{m,\\bar{m}}$ of the small coupling expansion.\nWhen computing $\\chi(x_1,x_2,g)$ we only need to consider $m>\\bar{m}\\ge0$ but there is nothing wrong with extending the formulas to all values of $m,\\bar{m}$.\nIn fact, for fixed $n=2k$, if we vary $m$ (or $\\bar{m}$) most coefficients vanish, the only ones that survive are such that\n\\begin{equation}\n -k-1 \\leq m \\leq k, \\ \\ \\ \\ -k-1 \\leq \\bar{m} \\leq k .\n\\end{equation}\n We can therefore define a double periodic generating function\n\\begin{equation}\n\\tilde{C}^{(n)}(\\mu,\\nu) = \\sum_{m,\\bar{m}=-\\infty}^{\\infty} \\tilde{c}^{(n)}_{m,\\bar{m}} e^{2im\\mu+2i\\bar{m}\\nu} .\n\\end{equation}\nNotice that the series trivially converges since it actually has a finite number of terms.\nGiven $\\tilde{C}^{(n)}(\\mu,\\nu)$ we can recover the coefficients by Fourier analysis. Now we need to compute\n\\begin{equation}\n\\sum_{m=-k-1}^{k} (-)^m \\frac{e^{2im\\mu}}{B(1-m+k,2+m+k)} = 2^{2k+1}(2k+2) i e^{-i\\mu} (\\sin\\mu)^{1+2k}\n\\end{equation}\nWe then get\n\\begin{equation}\n\\tilde{C}^{(n)}(\\mu,\\nu) = (-)^{k+1} \\frac{\\zeta(1+2k)}{1+2k} 4^{2k+1} e^{-i\\mu-i\\nu} (\\sin\\mu\\sin\\nu)^{2k+1}\n\\end{equation}\n Now we can sum over $k$ and define\n\\begin{equation}\n \\tilde{C}(\\mu,\\nu;g) = \\sum_{k=1}^{\\infty} \\tilde{C}^{(2k)}(\\mu,\\nu) g^{2k+1}\n = - e^{-i\\mu-i\\nu} \\sum_{k=1}^{\\infty} (-)^k \\frac{\\zeta(1+2k)}{1+2k} (4g\\sin\\mu\\sin\\nu)^{2k+1}\n\\end{equation}\n This sum can be done explicitly and we get\n\\begin{eqnarray}\n \\tilde{C}(\\mu,\\nu;g) &=& -e^{-i\\mu-i\\nu} \\left[ -\\gamma \\bar{g} + \\frac{i}{2} \\ln\\left(\\frac{\\Gamma(1+i\\bar{g})}{\\Gamma(1-i\\bar{g})}\\right)\\right] \\\\\n &=& e^{-i\\mu-i\\nu} \\left[ \\gamma \\bar{g} + \\arg(\\Gamma(1+i\\bar{g})) \\right]\n\\end{eqnarray}\nwhere we defined\n\\begin{equation}\n\\bar{g} = 4 g \\sin\\mu\\sin\\nu\n\\end{equation}\nThe statement is that if one expands this last function in powers of $\\bar{g}$ and then Fourier analyze it in $\\mu,\\nu$, the coefficients, by construction,\nare precisely the $c^{(n)}_{m,\\bar{m}}$ at small coupling. The function $\\tilde{c}_{m,\\bar{m}}(g)$ can be obtained as\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}}(g)=\\int_{0}^{\\pi}\\frac{d \\mu}{\\pi} \\int_{0}^{\\pi}\\frac{d \\nu}{\\pi}e^{-2 i \\mu m - 2 i \\nu \\bar{m}} \\tilde{C}(\\mu,\\nu; g)\n\\label{cmmbar}\n\\end{equation}\nIf we wish, from eq.(\\ref{cct}), we can also find the coefficients $c_{m,\\bar{m}}$ as\n\\begin{equation}\nC(\\mu,\\nu;g) =\n 2 \\left(-\\frac{1}{4}\\partial_\\mu^2 -\\frac{i}{2}\\partial_\\mu + \\frac{1}{4}\\partial_\\nu^2 +\\frac{i}{2}\\partial_\\nu \\right) \\tilde{C}(\\mu,\\nu,g)\n\\end{equation}\nSome algebra gives\n\\begin{equation}\n C(\\mu,\\nu;g) = -8 g^2 (\\sin^2\\nu-\\sin^2\\mu)\\ \\partial_{\\bar{g}}^2 \\tilde{C}(\\mu,\\nu,g)\n\\end{equation}\nWe finally get\n\\begin{equation}\n C(\\mu,\\nu;g) = 8 g^2 e^{-i\\mu-i\\nu} (\\sin^2\\nu-\\sin^2\\mu)\\ \\mbox{Im} \\psi'(1+i\\bar{g})\n\\label{genfun}\n\\end{equation}\nwhere $\\psi'$ denotes the derivative of the $\\psi$ function, $\\psi(x)=\\Gamma'(x)\/\\Gamma(x)$.\nTherefore\n\\begin{equation}\nc_{m,\\bar{m}}(g)=\\int_{0}^{\\pi}\\frac{d \\mu}{\\pi} \\int_{0}^{\\pi}\\frac{d \\nu}{\\pi}e^{-2 i \\mu m - 2 i \\nu \\bar{m}} C(\\mu,\\nu; g)\n\\label{gen2}\n\\end{equation}\nOf course given $\\tilde{c}_{m,\\bar{m}}$ we can get $\\tilde{c}_{m,\\bar{m}}$ multiplying by the corresponding factor (\\ref{cct}) and vice-versa,\nthe purpose of deriving the last equation is that it is somewhat easier to work with the generating function $C(\\mu,\\nu;g)$.\nWe are interested now in finding the strong coupling expansion. If we naively try to expand $\\psi'(1+i\\bar{g})$ in eq.(\\ref{genfun})\nfor large $\\bar{g}$ we find that the resulting integrals over $\\mu$ and $\\nu$ diverge. The reason being that we need $\\bar{g}=4g\\sin\\mu\\sin\\nu$\nto be large but, even if $g$ is large, close to $\\mu=0$ or $\\nu=0$ we can have $\\bar{g}$ as small as we want. Notice that in \\cite{bes}, the\nalternative expression in term of Bessel functions (here we use our sign convention and redefine the indices according to eq.(\\ref{mmbar}))\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}} = \\cos(\\pi \\bar{m}) \\int_0^\\infty dt \\frac{J_{m-\\bar{m}}(2gt)J_{m+\\bar{m}+1}(2gt)}{t(e^t-1)} \\label{bessel}\n\\end{equation}\nwas given. However such expression does not give an obvious large $g$ expansion either since we cannot assume that $2gt$ is large around $t=0$.\n\nIn the next section we derive an alternative expression for the coefficients valid for all $g$ and which allows for a simple expansion,\nboth at large and small $g$.\n\n\\section{A single integral representation formula for $c_{m, \\bar{m}}(g)$}\n\nConsider an integral of the type\n\\begin{equation}\nf(g)= \\int_0^{\\pi} d\\mu \\int_0^{\\pi} d\\nu\\ \\sin\\mu\\sin\\nu F(\\mu,\\nu)\\, \\mbox{Im}\\psi'(1+4ig\\sin\\mu\\sin\\nu)\n\\label{fdef}\n\\end{equation}\nas we had in the previous section. Using the following integral representation\n\\begin{equation}\n\\psi'(x)=\\int_0^{\\infty}dt \\frac{t e^{-x t}}{1-e^{-t}}\n\\end{equation}\nwe can rewrite $f(g)$ as:\n\\begin{equation}\nf(g) = \\int_0^\\infty d\\zeta \\sin(4g\\zeta) H(\\zeta)\n\\end{equation}\nwith\n\\begin{equation}\nH(\\zeta) = -\\zeta \\int_0^{\\pi} \\int_0^{\\pi} \\frac{d\\mu d\\nu}{\\sin\\mu\\sin\\nu} \\frac{F(\\mu,\\nu)}{e^{\\frac{\\zeta}{\\sin\\mu\\sin\\nu}}-1}\n\\end{equation}\nNotice the integral converges because near $\\mu=0,\\pi$ or $\\nu=0,\\pi$ there is an exponential suppression ($\\zeta>0$).\nNow let us manipulate this integral\n\\begin{equation}\nH(\\zeta) = - \\zeta \\int_0^\\infty du \\int_0^{\\pi} \\int_0^{\\pi} \\frac{d\\mu d\\nu}{\\sin\\mu\\sin\\nu}\n \\delta(u-\\sin\\mu\\sin\\nu) \\frac{F(\\mu,\\nu)}{e^{\\frac{\\zeta}{\\sin\\mu\\sin\\nu}}-1}\n\\end{equation}\nWhich is the same since the integral over $u$ is 1. Since $u>0$ we can use\n\\begin{equation}\n\\delta(u-u_0)=\\frac{1}{u}\\delta(\\ln u-\\ln u_0) = \\frac{1}{u} \\int_{-\\infty}^{+\\infty} \\frac{d\\eta}{2 \\pi}\\, e^{-i\\eta(\\ln u -\\ln u_0)}\n = \\frac{1}{u} \\int_{-\\infty}^{+\\infty} \\frac{d\\eta}{2 \\pi} \\, \\left(\\frac{u_0}{u}\\right)^{i\\eta+c}\n\\end{equation}\nwhere $c$ is an arbitrary real number $0< c <1$ that we introduce to ensure the convergence of the integral below. It is arbitrary since the\ndelta function assures $u=u_0$ and therefore $(u\/u_0)^c=1$.\nWe get\n\\begin{equation}\nH(\\zeta) = -\\zeta \\int_{-\\infty}^{+\\infty} \\frac{d\\eta}{2 \\pi} \\int_0^\\infty du \\int_0^{\\pi} d\\mu \\int_0^{\\pi} d\\nu\n \\frac{u^{-i\\eta-2-c}}{e^{\\frac{\\zeta}{u}}-1} \\left(\\sin\\mu\\sin\\nu\\right)^{i\\eta+c} F(\\mu,\\nu)\n\\end{equation}\nNow define\n\\begin{equation}\n\\phi(s) = \\int_0^{\\pi} d\\mu \\int_0^{\\pi} d\\nu \\left(\\sin\\mu\\sin\\nu\\right)^{s} F(\\mu,\\nu)\n\\label{phidef}\n\\end{equation}\nand compute\n\\begin{equation}\n\\int_0^\\infty du \\frac{u^{-i\\eta-2-c}}{e^{\\frac{\\zeta}{u}}-1}\n= \\zeta^{-i\\eta-1-c}\\int_0^\\infty dx\\frac{x^{i\\eta+c}}{e^x-1} = \\zeta^{-i\\eta-1-c} \\Gamma(1+c+i\\eta)\\zeta(1+c+i\\eta)\n\\end{equation}\nwhich converges in virtue of $c>0$. We therefore obtain\n\\begin{equation}\nH(\\zeta) = - \\int_{-\\infty}^{+\\infty} \\frac{d\\eta}{2\\pi} \\zeta^{-i\\eta-c} \\Gamma(1+c+i\\eta)\\zeta(1+c+i\\eta)\\phi(i\\eta+c)\n\\end{equation}\nWe still need now to do the (sine) Fourier transform\n\\begin{equation}\n\\int_0^\\infty d\\zeta \\sin (4 g \\zeta) \\zeta^{-i\\eta-c} = (4g)^{i \\eta +c-1} \\cos \\frac{\\pi (i \\eta+c)}{2}\\Gamma(1-c-i \\eta)\n\\label{sineF}\n\\end{equation}\nNotice that this integral is well defined for $g>0$ and $00$.\n\nThis is quite generic, in our case, from eqs.(\\ref{genfun}), (\\ref{gen2}) and(\\ref{cct}) we find that\n$\\tilde{c}_{m \\bar{m}}$ can be expressed as\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}}(g)= -4 g^2 \\int_{0}^{\\pi}\\frac{d \\mu}{\\pi} \\int_{0}^{\\pi}\\frac{d \\nu}{\\pi}\n\\frac{(\\sin^2 \\mu - \\sin^2 \\nu)}{(m-\\bar{m})(m+\\bar{m}+1)} e^{- (2 m+1)i \\mu} e^{-(2 \\bar{m}+1)i\\nu} \\mbox{Im}\\psi'(1+ i \\bar{g})\n\\end{equation}\nwith $\\bar{g} = 4 g \\sin\\mu\\sin\\nu$. Comparing with (\\ref{fdef}) we define\n\\begin{equation}\n\\tilde{F}_{m\\bar{m}}(\\mu,\\nu)= -\\frac{4g^2}{\\pi^2}\\frac{\\sin^2 \\mu -\\sin^2 \\nu}{\\sin \\mu \\sin \\nu} \\frac{e^{-(2m+1) i \\mu} e^{-(2\\bar{m}+1) i \\nu}}{(m-\\bar{m})(m+\\bar{m}+1)}\n\\end{equation}\nand\n\\begin{equation}\n\\tilde{\\phi}_{m\\bar{m}}(s)= \\int_{0}^{\\pi} \\int_{0}^{\\pi} d \\mu d \\nu (\\sin \\mu \\sin \\nu)^s \\tilde{F}_{m,\\bar{m}}(\\mu,\\nu) \\label{phi1}\n\\end{equation}\nwhich is well defined for $\\mbox{Re}(s)>0$. In fact we can evaluate it to be\n\\begin{equation}\n\\tilde{\\phi}_{m\\bar{m}}(s) = \\frac{g^2 (-1)^{m+\\bar{m}}}{4^{s-1} s (s+2)}\n \\frac{\\Gamma(s+1)\\Gamma(s+3)}\n {\\Gamma(\\frac{s}{2}{\\scriptstyle+1 - m})\\Gamma(\\frac{s}{2}{ \\scriptstyle + 2 + m})\n \\Gamma(\\frac{s}{2}{\\scriptstyle+1 - \\bar{m}})\\Gamma(\\frac{s}{2} {\\scriptstyle + 2 + \\bar{m}})}\n\\label{phitdef}\n\\end{equation}\nFor later use we notice the large $s$ behavior of $\\tilde{\\phi}_{m\\bar{m}}(s)$ which is\n\\begin{equation}\n\\tilde{\\phi}_{m\\bar{m}}(s) =\n\\left\\{\\begin{array}{lcl} \\frac{32g^2(-)^{m+\\bar{m}}}{\\pi s^3} &\\mbox{\\ \\ for\\ \\ }& s\\rightarrow\\infty, \\ \\ (|\\mbox{Arg}(s)|<\\pi) \\\\ \\\\\n -\\frac{32g^2(-)^{m+\\bar{m}}}{\\pi s^3} \\tan^2\\frac{\\pi s}{2}&\\mbox{for}& s\\rightarrow\\infty, \\ \\ (\\mbox{Arg}(s)\\neq0) \\end{array} \\right.\n\\label{phiap}\n\\end{equation}\nThe functions $\\tilde{c}_{m,\\bar{m}}$ can be written as $(00$ to the left. To discard the integrals for large fixed imaginary part\nwe need to check later that the specific $\\phi(s)$ that we have stays bounded in that region. Then those integrals also vanish exponentially\nwhen taken to infinity. What we obtain is therefore\n\\begin{equation}\nf(g) = -\\frac{1}{2} \\sum_{k} \\mbox{Res}\\left[(4g)^{s-1} \\frac{s \\pi}{\\sin \\frac{\\pi s}{2}} \\zeta(1+s) \\phi(s), s=s_k\\right] + R(-K_2)\n \\label{strong}\n\\end{equation}\n where $s_k$ are the poles of the integrand such that $c-K_2<\\mbox{Re}(s_k)0$. Therefore, for $k< 2+ \\bar{m}$ there is a simple pole at $s= - 2 k$. The residue is\n\\begin{equation}\n \\mbox{Res}\\bigg[\\frac{\\Gamma^2(1+s)}{\\sin \\frac{\\pi s}{2} \\ \\Gamma(\\frac{s+2 - 2 m}{2}) \\ \\Gamma(\\frac{s+2 - 2 \\bar{m}}{2})}, s=-2 k \\bigg]\n = \\frac{(-1)^{m+\\bar{m}+k} \\ \\Gamma(m+k) \\ \\Gamma(\\bar{m}+k)}{2 \\pi \\ \\Gamma^2 (2 k)}\n\\end{equation}\nUsing this residue we find that the coefficients agree with the strong coupling expansion coefficients $c_{m,\\bar{m}}^{(n)}$ obtained in \\cite{bhl}\n(see eq.(\\ref{CL})). For $-k +2 +\\bar{m} \\leq 0$, the pole of $\\Gamma(-k +2 +\\bar{m})$ starts contributing resulting in no net pole.\nThus, the series terminates at $k=2+\\bar{m}$, which again is in agreement with the strong coupling coefficients.\n\n\nAs in the case of weak coupling there is a remainder $R(-K_2)$. That integral gets smaller as we increase $K_2$ but after certain value of $K_2$ it\nstarts increasing regardless of what large the value of $g$. A lengthy but simple computation shows that such value is $K_2=8\\pi g$ and therefore\nthe maximum precision that we can obtain at strong coupling is\n\\begin{equation}\nR(-8\\pi g) = (-)^{m+\\bar{m}+1} \\frac{5}{32\\pi^3} \\frac{e^{-8\\pi g}}{g^{\\frac{3}{2}}} \\left(1+\\mathcal{O}\\left(\\frac{1}{g}\\right)\\right) \\label{mp}\n\\end{equation}\nwhere we only kept the leading term in the large $g$ expansion of $R(-8\\pi g)$.\n\n\\bigskip\n\nAs we explain at the beginning of this section, this derivation proves the conjecture made in \\cite{bes} that the coefficients of the strong and weak\ncoupling are simply related. This comes out naturally from the integral representation (\\ref{exp}) of $c_{m, \\bar{m}}$ by closing up the\ncontour differently for strong and weak coupling.\n\n\n\n\\section{Summing the dressing phase}\n\nIn this section we assume $|x_1|>1$, $|x_2| > 1$ as appropriate for the problem we are studying \\cite{bes}. $x_1, x_2$ are $g$-dependent, however, here\nwe assume them fixed and consider only the $g$-dependence of the phase through $c_{m, \\bar{m}}(g)$. One needs to consider further the $g$-dependence of $x_1, x_2$, which depending on\nsolution one is interested in may give different terms, such as $\\ln g$ terms\\footnote{We thank A. Tseytlin for pointing this out to us.} \\cite{rs}.\nGiven that\n\\begin{eqnarray}\n\\chi(x_1,x_2,g) =-2 \\sum_{\\bar{m}=0}^{\\infty}\\sum_{m=\\bar{m}+1}^{\\infty} \\frac{\\tilde{c}_{m,\\bar{m}}(g) }{x_1^{m-\\bar{m}} x_2^{m+\\bar{m}+1}}\n\\end{eqnarray}\nand using eq.(\\ref{cmmbar}) we obtain, by performing the sums explicitly\\footnote{Although we followed a different route, we arrive at an expression very similar to the one obtained by Dorey, Hofman and Maldacena \\cite{dhm}. In fact they are related by a change of variables. Another related integral representation was found in \\cite{ksv}. The weak coupling expansion of the DHM representation was discussed in \\cite{Bajnok}.\nOur main contribution in this section is in how to systematically expand the function $\\chi(x_1,x_2,g)$ at weak and strong coupling.}:\n\\begin{equation}\n\\chi(x_1,x_2)\n= -2 x_2 \\int_0^{\\pi} \\frac{d \\mu}{\\pi}\\int_0^{\\pi} \\frac{d \\nu}{\\pi} \\frac{e^{i(\\mu+\\nu)}}{(x_1 x_2 e^{2 i \\mu}-1)(x_2^2 e^{2 i (\\mu+\\nu)}-1)}[\\gamma \\bar{g}+\n\\arg \\Gamma(1+ i \\bar{g})] \\label{qoi}\n\\end{equation}\nIt is more convenient to analyze the derivative\n\\begin{equation}\n\\partial^2_g \\chi(x_1,x_2)=32 x_2 \\int_0^{\\pi} \\frac{d \\mu}{\\pi}\\int_0^{\\pi} \\frac{d \\nu}{\\pi} \\frac{e^{ i (\\mu+\\nu)}(\\sin \\mu \\sin \\nu)^2}{(x_1 x_2 e^{2 i \\mu}-1)(x_2^2 e^{2 i (\\mu+\\nu)}-1)}\\mbox{Im}[\\psi'(1+ i \\bar{g})]\n\\end{equation}\nwhich has the form (\\ref{fdef}) with\n\\begin{equation}\nF_{\\chi}(\\mu,\\nu) = \\frac{32 x_2}{\\pi^2} \\frac{e^{ i (\\mu+\\nu)} \\sin \\mu \\sin \\nu }{(x_1 x_2 e^{2 i \\mu}-1)(x_2^2 e^{2 i (\\mu+\\nu)}-1)}\n\\label{Fchidef}\n\\end{equation}\nWe can now use the method described in the previous section to make a straight-forward small and large coupling expansion of $\\chi(x_1,x_2,g)$.\n\n\n\\subsection{Small coupling expansion}\n\n First we find the weak coupling expansion of $\\chi$. This can be obtained by using the method of shifting the contour or by\nsimply expanding (\\ref{qoi}) in small $g$\n\\begin{equation}\n\\chi(x_1,x_2) = \\sum_{k=1}^{\\infty}\\chi^{(k)}(x_1,x_2) g^{2 k+1}\n\\end{equation}\nwhere\n\\begin{equation}\n\\chi^{(k)}(x_1,x_2) =\\frac{1}{2} \\frac{(-1)^{k+1} 4^{2 k-1} \\zeta(2k+1) }{2 k+1}\\, \\phi(k)\n\\end{equation}\nand\n\\begin{equation}\n\\phi(k)=32 x_2 \\int_0^{\\pi} \\frac{d \\mu}{\\pi}\\int_0^{\\pi} \\frac{d \\nu}{\\pi}\\frac{(\\sin \\mu \\sin \\nu)^{2 k+1}e^{i (\\mu+\\nu)}}{(x_1 x_2 e^{2 i \\mu}-1)(x_2^2 e^{2 i (\\mu+\\nu)}-1)}\n\\end{equation}\nUsing $y= e^{2 i \\mu}, z=e^{2 i \\nu}$ we can write this integral as a double integral over two unit circles\n\\begin{equation}\n\\phi(k)= \\frac{2 x_2}{ \\pi^2 4^{n}}\\oint dy dz \\frac{(y-1)^{n+1} (z-1)^{n+1}}{y^{\\frac{n}{2}+1} z^{\\frac{n}{2}+1}}\\frac{1}{(x_1 x_2 y -1)(x_2^2 y z - 1)}\n\\label{chismall}\n\\end{equation}\nwhere $n=2k$ is the position of the pole. We use $n$ instead of $k$ for later use, now we can replace $n=2k$.\nThe simplest way to evaluate this integral is to expand it over the domain outside the unit circles. The only poles are those at infinity.\nFor convenience we consider further $y \\rightarrow 1\/y$, and $z \\rightarrow 1\/z$, then the integral becomes\n\\begin{equation}\n\\phi(k)= \\frac{2 x_2}{\\pi^2 4^{2 k}}\\oint dy dz \\frac{(1-y)^{2 k+1} (1-z)^{2k+1}}{y^k z^{k+1}}\\frac{1}{(x_1 x_2 -y)(x_2^2 - y z)}\n\\end{equation}\n Computing the residues of the poles at zero we obtain\n\\begin{equation}\n\\chi^{(k)}(x_1,x_2)= \\frac{2x_2 (-1)^{k+1} \\zeta(2 k+1)}{2k+1}\\frac{1}{k! (k-1)!}\\frac{d^{k}}{d z^k} \\frac{d^{k-1}}{d y^{k-1}}[\\frac{(1-y)^{2 k+1} (1-z)^{2 k+1}}{(x_1 x_2 -y)(x_2^2- y z)}]\\bigg|_{z=0,y=0} \\label{qko}\n\\end{equation}\nThe expansion coefficients at any order can be extracted right away from (\\ref{qko}). For example the first ones are\n\\begin{equation}\n\\chi^{(1)}(x_1,x_2)=-2\\frac{\\zeta(3)}{x_1 x_2^2}, \\quad \\quad \\chi^{(2)}(x_1,x_2)=2\\frac{x_1-2 x_2 +10 x_1 x_2^2}{x_1^2 x_2^4}\\zeta(5)\n\\end{equation}\nWe can write the result (\\ref{qko}) in terms of a finite double sum as\n\\begin{equation}\n\\chi^{(k)}(x_1,x_2)= 2 \\frac{ (-1)^{k+1} \\zeta(2 k+1)}{(2k+1)x_2^{2 k+1}}\\sum_{p=0}^{q-1} \\sum_{q=0}^k \\bino{2k+1}{p}\\bino{2k+1}{q} (-x_1 x_2)^p \\left(-\\frac{x_2}{x_1}\\right)^q\n\\end{equation}\n\n\n\n\n\n\\subsection{Large coupling expansion, odd coefficients}\n\nTo perform the strong coupling expansion let us use the same method as in the previous section. Analyzing eq.(\\ref{strong}) for $s=-2k-1$,\n$k=0,1,2, \\ldots$ the factor in front of $\\phi(s)$ actually vanishes because $\\zeta(-2k)=0$. It turns out, however, that $\\phi(s)$ has double poles\nthere. This is generic and can be seen by rewriting eq.(\\ref{phidef}) as\n\\begin{equation}\n\\phi(s) = \\int_0^\\pi d\\mu \\int_0^\\pi d\\nu \\,\\mu^s \\nu^s \\left(\\frac{\\sin\\mu\\sin\\nu}{\\mu\\nu}\\right)^s F(\\mu,\\nu)\n\\end{equation}\nWhen $s$ gets close to a negative integer $-n$ we can expand\n\\begin{equation}\n\\left(\\frac{\\mu\\nu}{\\sin\\mu\\sin\\nu}\\right)^n F(\\mu,\\nu) = \\sum_{l,l'} F_{l,l'} \\mu^{l} \\nu^{l'}\n\\end{equation}\nand perform the integrations\n\\begin{equation}\n\\phi(s) = \\sum_{l,l'} F_{l,l'} \\frac{\\pi^{l+l'+2s+1}}{(l+s+1)(l'+s+1)}\n\\end{equation}\nwhich can now be extended to arbitrary values of $s$. It is clear that there are double poles at negative integers $s=-n$ and the coefficient is\nsimply $F_{(n-1),(n-1)}$. Therefore, the coefficients of the double poles are the diagonal coefficients of the double Taylor expansion.\n There is one point still to take into account which is that there are potential contributions also from the $\\mu=\\pi$ or $\\nu=\\pi$ limits. In fact\nit is convenient to express everything in terms of integrals from $0$ to $\\frac{\\pi}{2}$ only\n\\begin{equation}\n\\partial^2_g \\chi(x_1,x_2)= \\int_0^{\\frac{\\pi}{2}} d \\mu \\int_0^{\\frac{\\pi}{2}} d \\nu \\,\n \\sin \\mu \\sin \\nu\\, \\mbox{Im}[\\psi'(1+ i \\bar{g})]B_{\\chi}(\\mu,\\nu)\n\\end{equation}\nwhere\n\\begin{equation}\nB_{\\chi}(\\mu,\\nu) =F_{\\chi}(\\mu,\\nu)+F_{\\chi}(-\\mu,\\nu)+F_{\\chi}(\\mu,-\\nu)+F_{\\chi}(-\\mu,-\\nu)\n\\end{equation}\nwith $F_{\\chi}$ as defined in (\\ref{Fchidef}). When expanding in powers of $\\mu,\\nu$ we only get even powers which then means that the\ndouble poles are at odd values of $n$. This explains why we only get even powers of the coupling this way. For odd powers (namely $s$ even),\nthere are poles in the factor in front of $\\phi(s)$, not in $\\phi(s)$ itself. Going back to the odd powers we can simply write for the coefficient\n\\begin{equation}\n\\partial_g^2\\chi^{(-2k-1)}(x_1,x_2) = -2 (4g)^{-2k-2} (2k+1) \\pi (-)^k \\zeta'(-2k) \\bar{\\phi}(-2k-1)\n\\end{equation}\nwhere $\\bar{\\phi}(-2k-1)$ is the coefficient of the double pole which as we just said can be computed by a double Taylor expansion. There is a factor of\nfour in front since each term in $B_{\\chi}(\\mu,\\nu)$ contributes the same.\nMore precisely, extending $\\mu$, $\\nu$ to complex values we can compute it as\n\\begin{equation}\n\\bar{\\phi}(-2k-1) = \\frac{128 x_2}{\\pi^2}\\frac{1}{(2\\pi i)^2} \\oint_{\\mathcal{C}_0} \\frac{d\\mu}{\\mu^{2k+1}} \\oint_{\\mathcal{C}_0} \\frac{d\\nu}{\\nu^{2k+1}}\n \\left(\\frac{\\mu\\nu}{\\sin\\mu\\sin\\nu}\\right)^{2k+1}\n \\frac{e^{ i (\\mu+\\nu)} \\sin \\mu \\sin \\nu }{(x_1 x_2 e^{2 i \\mu}-1)(x_2^2 e^{2 i (\\mu+\\nu)}-1)}\n\\end{equation}\nwhere ${\\mathcal{C}_0}$ denotes a small contour surrounding the origin. It is convenient to change variables to $y=e^{2i\\mu}$, $z=e^{2i\\nu}$ such that\n\\begin{equation}\n\\bar{\\phi}(-2k-1) =\n-4 \\frac{2 x_2}{ \\pi^2 4^{n}}\\frac{1}{(2\\pi i)^2}\\oint_{\\mathcal{C}_1} dy dz \\frac{(y-1)^{n+1} (z-1)^{n+1}}{y^{\\frac{n}{2}+1}\n z^{\\frac{n}{2}+1}}\\frac{1}{(x_1 x_2 y -1)(x_2^2 y z - 1)}\n\\label{phiodd}\n\\end{equation}\nwhere $n=-2k-1$. We write it in this way to show that the integrand is similar to the one at small coupling (\\ref{chismall}).\nThe difference is that the integral is done now over contours surrounding $y=z=1$ whereas before they where at infinity. To obtain an explicit expression\nis now convenient to change variables to $\\omega_1=y-1$, $\\omega_1=(z-1)y$ and then expand the integrals in powers of $\\omega_{1,2}$ to get\n\\begin{equation}\n\\bar{\\phi}(-n) = -\\frac{4^{n+2}}{2\\pi^2 x_1 x_2^2} \\sum_{a=0}^{n-2} \\sum_{b=0}^a\\sum_{c=0}^{2n-4-a}\n \\bino{n-2}{a-b}\\bino{\\frac{1}{2} n-1}{2n-4-a-c}\\bino{2n-4-a}{n-2-a}\n \\left(\\frac{x_1x_2}{1-x_1x_2}\\right)^{b+1}\\left(\\frac{x_2^2}{1-x_2^2}\\right)^{c+1}\n\\end{equation}\nwhere we now used $n=2k+1$. Notice that all sums are over a finite range. The final formula is therefore\n\\begin{eqnarray}\n\\lefteqn{\\chi^{(-n)}(x_1,x_2) = \\frac{1}{\\pi} g^{-n-1} (-)^{\\frac{n-1}{2}} \\frac{\\zeta'(1-n)}{n-1} \\frac{1}{x_1 x_2^2} }\\ \\ \\ \\ \\ && \\\\\n && \\sum_{a=0}^{n-2} \\sum_{b=0}^a\\sum_{c=0}^{2n-4-a}\n \\bino{n-2}{a-b}\\bino{\\frac{1}{2} n-1}{2n-4-a-c}\\bino{2n-4-a}{n-2-a}\n \\left(\\frac{x_1x_2}{1-x_1x_2}\\right)^{b+1}\\left(\\frac{x_2^2}{1-x_2^2}\\right)^{c+1} \\label{kio}\n\\end{eqnarray}\nfor $n$ odd. In the last step we integrated twice over $g$ since we were computing $\\partial_g^2 \\chi(x_1,x_2,g)$. The expression (\\ref{kio}) is not valid for $n=1$; however, this case can be considered separately and summations can be performed \\cite{af}. Although we derived this last expression for $n$ odd,\nit can be seen to also capture the correct $x_{1,2}$ dependence for $n$ even as we discuss below.\n\n\\subsection{Large coupling expansion, even coefficients}\n\nThe results in the previous section can be obtained in a simpler way for even $n=2k$. We take $k\\geq 1$; the case $n=0$ can be treated separately and the result is well known \\cite{af}. Using (\\ref{CL}) we can write\n\\begin{equation}\n\\chi^{(-2k)}(x_1,x_2)=-\\frac{\\zeta(2k)}{x_2 (-2 \\pi)^{2 k} \\Gamma(2k-1)}\\sum_{\\bar{m}=0}^{\\infty}\\sum_{m=\\bar{m}+1}^{\\infty}\\frac{\\Gamma(m+k)}{\\Gamma(m+2-k)}\\frac{\\Gamma(\\bar{m}+k)}{\\Gamma(\\bar{m}+2-k)}\n\\frac{1}{(x_1 x_2)^m}\\left(\\frac{x_1}{x_2}\\right)^{\\bar{m}}\n\\end{equation}\nAs in section 3 where we summed the weak coupling expansion, here we can extend the sum and compute\n\\begin{equation}\n\\tilde{D}^{(-2 k)}(y,z) \\equiv \\sum_{\\bar{m}=0}^{\\infty}\\sum_{m=0}^{\\infty}\\tilde{c}^{(-2k)}_{m, \\bar{m}} y^m z^{\\bar{m}}=\n\\frac{\\zeta(2k) \\Gamma(2k-1)}{2 (-2 \\pi)^{2 k}}(y-1)^{1-2k} y^{k-1} (z-1)^{1-2 k} z^{k-1}\n\\end{equation}\nIn order to perform the sums above we took $|y|<1$, $|z|<1$. We can then obtain back the coefficients $\\tilde{c}^{(-2k)}_{m, \\bar{m}}$ from\n\\begin{equation}\n\\tilde{c}^{(-2k)}_{m, \\bar{m}}=-\\frac{1}{4 \\pi^2}\\oint d y d z y^{-m-1} z^{-\\bar{m}-1}\\tilde{D}^{(-2 k)}(y,z)\n\\end{equation}\nwhere the integrals are over circles with radius smaller than unity. Replacing in $\\chi^{(-2k)}(x_1,x_2)$ and performing the sums over $m, \\bar{m}$ we obtain\n\\begin{equation}\n\\chi^{(-2k)}(x_1,x_2)= \\frac{x_2 \\zeta(2k) \\Gamma(2k-1)}{4 \\pi^2 (-2 \\pi)^{2 k}}\\oint d y dz \\frac{(y-1)^{1-2k} y^{k-1}(z-1)^{1-2k} z^{k-1}}{(x_1 x_2 y-1)(x_2^2 y z -1)}\n\\end{equation}\nComparing with eq.(\\ref{phiodd}) and since there are no poles at infinity, we see why the result (\\ref{kio}) has the right $x_{1,2}$ dependence for $n$\neven. In this case, however\\footnote{For $n$ odd there are cuts so the following procedure does not give a simpler answer.}, we can find a simpler expression if we perform first the integral in $z$. We only have a simple pole at $z= \\frac{1}{x_2^2 y}$. Computing the residue at the pole we obtain an integral over $y$\n\\begin{equation}\n\\chi^{(-2k)}(x_1,x_2)= \\frac{i x_2^{2k-1} \\zeta(2k) \\Gamma(2k-1)}{2 \\pi (-2 \\pi)^{2k}}\\oint dy \\frac{y^{2k-2} (y-1)^{1-2k}}{(x_1 x_2 y-1)(1-x_2^2 y)^{2k-1}}\n\\end{equation}\nThere is a simple pole at $y=\\frac{1}{x_1 x_2}$ and a pole of order $2k-1$ at $y=\\frac{1}{x_2^2}$. Computing the residues we obtain\n\\begin{eqnarray}\n \\chi^{(-2k)}(x_1,x_2)&=& - \\frac{\\zeta(2k) \\Gamma(2k-1)x_2^{2k-1}}{(-2 \\pi)^{2k}}\\bigg[(1-x_1 x_2)^{1-2k} (1-\\frac{x_2}{x_1})^{1-2k}\\nonumber\\\\\n &+&\n \\frac{1}{x_2^{4k-2}(2k-2)!}\\frac{d^{2k-2}}{d y^{2k-2}} \\frac{y^{2k-2} (y-1)^{1-2k}}{1- x_1 x_2 y} \\bigg|_{y=\\frac{1}{x_2^2}}\\bigg]\n\\end{eqnarray}\nWe can further express the derivative term in terms of a finite double sum\n\\begin{eqnarray}\n\\chi^{(-2k)}(x_1,x_2)&=& - \\frac{\\zeta(2 k) \\Gamma(2k-1) x_2^{2k-1}}{(-2 \\pi)^{2 k}}\\bigg[(1- x_1 x_2)^{1-2 k} (1-\\frac{x_2}{x_1})^{1-2 k}\\\\\n&-& \\frac{x_2 (x_2^2-1)^{1-2 k}}{x_2-x_1}\\sum_{p=0}^{2k-2}\\sum_{m=0}^p \\bino{2k-2}{p}\\bino{2k-2+m}{m} \\left(\\frac{x_1}{x_2-x_1}\\right)^p\n\\left(\\frac{x_1 (x_2^2-1)}{x_2-x_1}\\right)^{-m}\\bigg] \\nonumber\n\\end{eqnarray}\nThe result can be extracted right away for any $k$. For example $\\chi^{(-2)}(x_1,x_2)$ is\n\\begin{equation}\n\\chi^{(-2)}(x_1,x_2)=-\\frac{x_2}{24 (x_1 x_2-1)(x_2^2-1)}\n\\end{equation}\nThe results for $ \\chi^{(-2k)}(x_1,x_2)$ that we obtain match the corresponding expressions obtained in \\cite{bhl}.\n\n\\subsection{Large coupling expansion, exponential terms}\n\nFor the maximum precision at strong coupling we found in (\\ref{mp}) that $N=8 \\pi g$. Thus $N=8 \\pi g$ terms are to be summed in this case. The remainder $R_N$ can be summed over $m, \\bar{m}$ and we obtain exponential corrections\n\\begin{equation}\nR_N= - \\frac{5}{16 \\pi^3} \\frac{x_2}{(1+x_1 x_2)(x_2^2-1)}\\frac{e^{-8 \\pi g}}{g^{\\frac{3}{2}}} \\left(1+\\mathcal{O}\\left(\\frac{1}{g}\\right)\\right)\n\\end{equation}\nSuch exponential corrections appear in the all loop Bethe Ansatz, therefore they need to be included in the study of any particular solution.\n\n\n\\section{Summary and Outlook}\n\n In this paper we have analyzed the function $\\chi(x_1,x_2,g)$ that enters in the all-loop Bethe Ansatz for the $SL(2)$ sector of\n$\\mathcal{N}=4$ SYM theory. We found that the coefficients of its expansion in inverse powers of $x_1$ and $x_2$ can be written as\n\\begin{equation}\n\\tilde{c}_{m,\\bar{m}}(g)=\\frac{1}{2} i g (-1)^{m+\\bar{m}} \\int_{c-i\\infty}^{c+i\\infty} \\frac{ds}{2 \\pi}\\, g^{s} \\frac{(1+s) \\pi}{\\sin \\frac{\\pi s}{2}}\n\\zeta(1+s) \\frac{\\Gamma^2(1+s)}{\\Gamma(\\frac{s}{2}{\\scriptstyle+1 - m})\\Gamma(\\frac{s}{2}{ \\scriptstyle + 2 + m})\n \\Gamma(\\frac{s}{2}{\\scriptstyle+1 - \\bar{m}})\\Gamma(\\frac{s}{2} {\\scriptstyle + 2 + \\bar{m}})}\n\\end{equation}\nwhere $02$ (const.) & $d=f(n)$\\\\\n\t\t\t \\hline \\hline\n\t\t\tHomogeneity & $\\frac{1}{2}\\cdot\\frac{n \\log n}{\\left(\\sqrt{1-\\theta}-\\sqrt{\\theta}\\right)^2}$ & $\\frac{2^{d-2}}{d}\\cdot\\frac{n \\log n}{\\left(\\sqrt{1-\\theta}-\\sqrt{\\theta}\\right)^2}$ & N\/A\\\\\n\t\t\tParity &$\\frac{1}{2}\\cdot\\frac{n \\log n}{\\left(\\sqrt{1-\\theta}-\\sqrt{\\theta}\\right)^2}$ & $\\frac{1}{d}\\cdot \\frac{n \\log n}{\\left(\\sqrt{1-\\theta}-\\sqrt{\\theta}\\right)^2}$ & $\\Theta_{\\theta,d}\\left( \\max\\left\\{n,~ \\frac{n\\log n}{d}\\right\\}\\right)$\\\\\n\t\t\t\\hline \t\t\n\t\t\\end{tabular}\n\t\\end{center}\n\\end{table*}\n\n\n\n\nThese results provide some interesting implications to relevant applications such as subspace clustering and channel coding. \nIn particular, the results offer concrete guidelines as to how to choose $d$ that minimizes sample complexity while ensuring successful clustering. \nSee details in Sec.~\\ref{sec:model_just} and Sec.~\\ref{sec:MainResults}. \n\n\n\\subsection{Related work}\n\n\\subsubsection{The $d=2$ case} \nThe exact recovery problem in standard graphs ($d=2$) has been studied in great generality. \nIn SBM, both the fundamental limits and computationally efficient algorithms are investigated initially for the case of two communities~\\cite{abbe2016exact,7523889,MNS14a}, and recently for the case of an arbitrary number of communities~\\cite{abbe2015community}.\nIn CBM, \\cite{abbe2014decoding} characterizes the sample complexity limit, and \\cite{7523889} develops a computationally efficient algorithm that achieves the limit. \n\n\nAnother important recovery requirement is \\emph{detection}, which asks whether one can recover the clusters better than a random guess. The modern study of the detection problem in SBM is initiated by a paper by Decelle et al.~\\cite{decelle}, which conjectures\nphase transition phenomena for the detection problem\\footnote{In the paper, it is also conjectured that an information-computation gap might exist for the case of more than $3$ communites ($k\\geq 4$). This conjecture is also extensively studied in~\\cite{YC14, NN14, Mon15,BM16}, and is recently settled in~\\cite{abbe2015detection}.}.\nThis conjecture is initially tackled for the case of two communities. \nThe impossibility of the detection below the conjectured threshold is established in~\\cite{mossel2015reconstruction}, and it is proved in~\\cite{MNS14b, Mas14,bordenave} that the conjectured threshold can be achieved efficiently.\nThe conjecture for the arbitrary number of communities is recently settled by Abbe and Sandon~\\cite{abbe2015detection}.\nFor another line of researches, minimax-optimal rates are derived in~\\cite{zhang2016minimax}, and algorithms that achieve the rates are developed in~\\cite{gao2015achieving}. \nWe refer to a recent survey by Abbe~\\cite{abbe2017community} for more exhaustive information.\n\n\n\n\n\n\n\n\n\n\n\n\\subsubsection{The homogeneity measurement case}\n Recently, \\cite{JMLR:v18:16-100,ghoshdastidar2015consistency} consider a general model that includes our model as a special case (to be detailed in Sec.~\\ref{sec:PF}), and provide an upper bound on sample complexity for \\emph{almost exact} recovery, which allows a vanishing fraction of misclassified nodes.\nApplying their results to our model, their upper bound reduces to $p {n \\choose d}= \\Omega(n \\log^2n)$.\nWhether or not the sufficient condition is also necessary has been unknown.\n In this work, we show that it is not the case, demonstrating that the minimal sample complexity even for exact recovery is $\\Theta (n \\log n)$.\n \nWe note that the homogeneity measurement case is closely related to subspace clustering, one of the popular problems in computer vision~\\cite{govindu2005tensor, chen2009spectral,agarwal2006higher}; See Sec.~\\ref{sec:subspace} for details. \n\n\n\n\n\\subsubsection{The parity measurement case} \nThe parity measurement case has been explored by~\\cite{watanabe2013message} in the context of random constraint satisfaction problems.\nThe case of $d=3$ has been well-studied: it is shown that the maximum likelihood decoder succeeds if $p{n \\choose 3} \\geq 2\\cdot \\frac{n\\log n}{(0.5-\\theta)^2}$~\\cite{watanabe2013message}. \nUnlike the prior result which only considers the case of $d=3$, we cover an arbitrary constant $d$, and characterize the sharp threshold on the sample complexity. \n\nAbbe-Montanari~\\cite{abbe2013conditional} relate the parity measurement model to a channel coding problem in which random LDGM codes with a constant right-degree $d$~are employed.\nBy proving the concentration phenomenon of the mutual information between channel input and output, they demonstrate the existence of phase transition for an even $d$.\nOur results span \\emph{any} fixed $d$, and hence fully settle the phase transition (see Sec.~\\ref{sec:MainResults}).\n\n\\subsubsection{The stochastic block model for\n\thypergraphs}\nThere are several works which study the community recovery under SBM for hypergraphs.\nIn~\\cite{florescu2015spectral}, the authors explore the case of two equal-sized communities\\footnote{Actually, the main model in the paper is \\emph{the bipartite stochastic block model}, which is not a hypergraph model. However, the result for the hypergraph case follows as a corollary (see Theorem 5 therein).}. Specializing it to our model, one can readily show that detection is possible if $\\binom{n}{d}p =\\Omega(n)$. \nMoreover, \\cite{angelini} recently conjectures phase transition thresholds for detection.\nLastly, \\cite{wangetal} derives the minimax-optimal error rates, and generalizes the results in \\cite{zhang2016minimax} to the hypergraph case.\n\n\n\\subsubsection{Other relevant problems}\nCommunity recovery in hypergraphs bears similarities to other inference problems, in which the goal is to reconstruct data from multiple queries. Those problems include crowdsourced clustering~\\cite{vesdapunt2014crowdsourcing,ashtiani2016clustering}, group testing~\\cite{dorfman1943detection} and data exactration from histogram-type information~\\cite{7852208,7541526}. Here, one can make a connection to our problem by viewing each query as a hyperedge measurement. \nHowever, a distinction lies in the way that queries are collected. For instance, an adaptive measurement model is considered in the crowdsourced setting~\\cite{vesdapunt2014crowdsourcing,ashtiani2016clustering} unlike our non-adaptive setting in which hyperedges are sampled uniformly at random. \nHistogram-type information acts as a query in~\\cite{dorfman1943detection,7852208,7541526}.\n\n\\subsection{Paper organization}\nSec.~\\ref{sec:PF} introduces the considered model; \nin Sec.~\\ref{sec:MainResults}, our main results are presented along with some implications;\nin Sec.~\\ref{pf:thm1},~\\ref{pf:thm2} and~\\ref{pf:thm3}, we provide the proofs of the main theorems;\nSec.~\\ref{sec:simulation} presents experimental results that corroborate our theoretical findings and discuss interesting aspects in view of applications;\nand in Sec.~\\ref{sec:conclusion}, we conclude the paper with some future research directions. \n\n\\subsection{Notations}\nFor any two sequences $f(n)$ and $g(n)$: $f(n) = \\Omega(g(n))$ if there exists a positive constant $c$ such that $f(n)\\geq cg(n)$;\n $f(n)=O(g(n))$ if there exists a positive constant $c$ such that $f(n)\\leq c g(n)$;\n$f(n) = \\omega(g(n))$ if $\\lim_{n\\rightarrow \\infty} \\frac{f(n)}{g(n)} =\\infty$; $f(n) = o(g(n))$ if $\\lim_{n\\rightarrow \\infty} \\frac{f(n)}{g(n)} =0$;\n and $f(n)\\asymp g(n)$ or $f(n)=\\Theta(g(n))$ if there exist positive constants $c_1$ and $c_2$ such that $c_1g(n)\\leq f(n)\\leq c_2g(n)$.\n\n\n\n For a set $A$ and an integer $m\\leq |A|$, we denote $\\binom{A}{m} := \\{B \\subset A \\,:\\, |B|=m \\}.$ \n Let $[n]$ denote $\\{1,\\cdots,n\\}$.\n Let $\\mathbf{e}_i$ be the $i^{\\text{th}}$ standard unit vector. \n Let $\\mathbf{0}$ be the all-zero-vector and $\\mathbf{1}$ be the all-one-vector. \n We use $\\mathbb{I}\\{\\cdot\\}$ to denote an indicator function.\n Let ${\\sf D_{KL}}(p\\|q)$ be the Kullback-Leibler (KL) divergence between ${\\sf Bern}(p)$ and ${\\sf Bern}(q)$, i.e., ${\\sf D_{KL}}(p\\|q) := p\\log \\frac{p}{q}+(1-p)\\log\\frac{1-p}{1-q}$.\n We shall use $\\log(\\cdot)$ to indicate the natural logarithm.\n We use ${H}(\\cdot)$ to denote the binary entropy function.\n\n\n\n\\section{Generalized censored block models}\n\\label{sec:PF}\n \n \n Consider a collection of $n$ nodes $\\mathcal{V} = [n]$, each represented by a binary variable $X_i\\in\\{0,\\,1\\}$, $1\\leq i \\leq n$. \nLet $\\mathbf{X}:=\\{X_i\\}_{1\\leq i \\leq n}$ be the ground-truth vector.\nLet $d$ denote the size of a hyperedge. \n Samples are obtained as per a \\emph{measurement hypergraph} $\\mathcal{H} = (\\mathcal{V},\\mathcal{E})$ where $\\mathcal{E}\\subset \\binom{[n]}{d}$.\nWe assume that each element in $\\binom{[n]}{d}$ belongs to $\\mathcal{E}$ independently with probability $p\\in[0,1]$. \\emph{Sample complexity} is defined as the number of hyperedges in a random measurement hypergraph, which is concentrated around $p\\binom{n}{d}$ in the limit of $n$.\nEach sampled edge $E\\in \\mathcal{E}$ is associated with a noisy binary measurement $Y_E$:\n\\begin{align}\nY_{E} = f(X_{i_1},X_{i_2},\\cdots, X_{i_d}) \\oplus Z_E, \\label{def:model}\n\\end{align} where $f: \\{0,1\\}^d \\to \\{0,1\\}$ is some binary-valued function, $\\oplus$ denotes modulo-2 sum, and $Z_E \\overset{\\text{i.i.d.}}{\\sim} {\\sf Bern}(\\theta)$ is a random variable with noise rate $0\\leq \\theta<\\frac{1}{2}$. \nFor the choice of $f$, we focus on the two cases:\n\\begin{itemize}\n\\item \\emph{the homogeneity measurement:} \n\\begin{align*}\n~~~\\,f_h(X_{i_1},X_{i_2},\\cdots, X_{i_d}) = \\mathbb{I} \\{X_{i_1}= X_{i_2}=\\cdots= X_{i_d} \\}; \n\\end{align*}\n\\item \\emph{ the parity measurement:} \n\t\\begin{align*}\n\tf_p(X_{i_1},X_{i_2},\\cdots, X_{i_d}) = X_{i_1}\\oplus X_{i_2}\\oplus \\cdots \\oplus X_{i_d}.\n\t\\end{align*}\n\t\n\\end{itemize} \nLet $\\mathbf{Y}:= \\{Y_{E}\\}_{E\\in\\mathcal{E}}.$\nWe remark that when $d=2$, this reduces to CBM~\\cite{abbe2014decoding}. \n\nThe goal of this problem is to recover $\\mathbf{X}$ from $\\mathbf{Y}$. \nIn this work, we will focus on the case of even $d$ since the case of odd $d$ readily follows from the even case~\\cite{ahn2016community}.\nWhen $d$ is even, the conditional distribution of $\\mathbf{Y}|\\mathbf{X}$ is equal to that of $\\mathbf{Y}|\\mathbf{X}\\oplus\\mathbf{1}$.\nHence, given a recovery scheme $\\psi$, the probability of error is defined as \n\\[\nP_e(\\psi) := \\max_{\\mathbf{X}\\in \\{0,1\\}^n} \\Pr\\left(\\psi(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}\\right).\n\\]\nWe intend to characterize the minimum sample complexity, above which there exists a recovery algorithm $\\psi$ such that \n$P_e(\\psi) \\to 0$ as $n$ tends to infinity, and under which $P_e(\\psi) \\nrightarrow 0$ for all algorithms. \n\n\\subsection{Relevant applications}\\label{sec:model_just}\n\n\\subsubsection{Subspace clustering and the homogeneity measurement} \\label{sec:subspace}\n\t\\begin{figure}\n\t\t\\centering\n\t\t\\includegraphics[width=.45\\textwidth]{figs\/fig1.pdf}\n\t\t\\caption{\\footnotesize{\\textbf{Connection to subspace clustering.} Subspace clustering is illustrated for a simple scenario in which the entire signal space is two-dimensional and data points are approximately lying on a union of two $1$-dimensional affine spaces (lines). A common procedure in the existing algorithms includes construction of a $d$-th order affinity tensor ($d\\geq 2$) each entry of which represents a quantity that captures a level of similarity across $d$ data points, so taking either 0 or 1 depending on the similarity level. For instance, the four points involved in $E_1$ in the figure lie near the same affine space, so the similarity measure is decided as $1$; on the other hand, the four points in $E_2$ span different affine spaces, so the similarity measure is decided as $0$.\n\t\tSince each data point does not exactly lie in a subspace, an error can occur in the decision---the similarity measurement can be noisy. Hence one can view this problem as the GCBM under the homogeneity measurement model.}\n\t\t\t\\label{fig:main1}}\n\t\\end{figure}\n\tSubspace clustering is a popular problem of which the task is to cluster $n$ data points that approximately lie in a union of lower-dimensional affine spaces.\n\tThe problem arises in a variety of applications such as motion segmentation~\\cite{vidal2008multiframe} and face clustering~\\cite{ho2003clustering}, where data points corresponding to the same class (tracked points on a moving object or faces of a person) lie on a single lower-dimensional subspace; for details, see~\\cite{vidalsurvey} and references therein.\n\tA common procedure of the existing algorithms for subspace clustering~\\cite{chen2009spectral, elhamifar2013sparse, dyer2013greedy,heckel2015robust} begins construction of a $d$-th order affinity tensor ($d\\geq 2$) whose entries represent \\emph{similarities} between every $d$ data points.\n\tSince this construction incurs a complexity that scales like $n^d$, sampling-based approaches are proposed in~\\cite{govindu2005tensor, chen2009spectral,agarwal2006higher}. \n\t\n\t\tA similarity between $d$ data points in prior works~\\cite{govindu2005tensor, chen2009spectral,agarwal2006higher} is defined such that it tends to $1$ if all of the $d$ points are on the same subspace and $0$ otherwise. Hence, restricted to the two-subspace case, one can view a similarity over a $d$-tuple $E$ as a homogeneity measurement \\footnote{In subspace clustering, similarities can be sometimes noisy in that even though the $d$ data points are from the same (different) subspace, similarity can be $0$ ($1$). Note that $Z_E$ in \\eqref{def:model} precisely captures this noise.}. \n\t\tBy setting the probability of each entry being sampled as $p$, one can relate this to our homogeneity measurement model; see Fig.~\\ref{fig:main1} for visual illustration.\n\n\t\n\n\t\n\t\n\t\n\t\n \\subsubsection{Channel coding and the parity measurement}\n\t\\begin{figure}\n\t\t\\centering\n\t\t\\includegraphics[width=.45\\textwidth]{figs\/fig2.png}\n\t\t\\caption{\\footnotesize{\\textbf{Connection to channel coding.} GCBM with the parity information can be seen as a channel coding problem which employs random LDGM codes with a constant right-degree $d$.\n\t\tTo see this, we first draw a random $d$-uniform hypergraph with $n$ nodes, where each edge of size $d$ appears with probability $p$. \n\t\tGiven the input sequence of $n$ information bits, the parity bits corresponding to all the sampled hyperedges are concatenated, forming a codeword. \n\t\tThe noisy measurement can be mapped to the output of a binary symmetric channel (BSC) with crossover probability $\\theta$, when fed by the codeword.\n\t\tA recovery algorithm $\\psi$ corresponds to the decoder which wishes to infer the $n$ information bits from the received signals. \n\t\tOne can then see that recovering communities in hypergraphs is equivalent to the above channel coding problem.}\n\t\t\t\\label{fig:main}}\n\t\\end{figure}\n\t\n\tThe community recovery problem has an inherent connection with channel coding problems~\\cite{abbe2014decoding, abbe2016exact}. \nTo see this, consider a communication setting which employs random LDGM codes with a constant right-degree $d$. \n\tTo make a connection, we begin by constructing a random $d$-uniform hypergraph with $n$ nodes, where each edge of size $d$ appears with probability $p$. \n\tGiven the input sequence of $n$ information bits, we then concatenate the parity bits with respect to the sampled hyperedges to form a codeword of average length $p \\binom{n}{d}$. \n\tNote that the expected code rate is $\\frac{n}{p{n \\choose d}}$.\nThe noisy measurement can be mapped to the output of a binary symmetric channel (BSC) with crossover probability $\\theta$, when fed by the codeword.\n\tA recovery algorithm $\\psi$ corresponds to the decoder which wishes to infer the $n$ information bits from the received signals. \n\tOne can then see that recovering communities in hypergraphs is equivalent to the above channel coding problem; see Fig.~\\ref{fig:main} for visual illustration.\n\t\n\t\n\n\t\n\n\n\n\n\\section{Main results}\n\\label{sec:MainResults}\n \n\\subsection{The homogeneity measurement\n\t case}\n\\begin{theorem}\\label{thm:main1}\n\tFix $d \\geq 2$ and $\\epsilon >0$. Under the homogeneity measurement case ($f = f_h$),\n\t\\begin{align*}\n\t\t\\begin{cases}\n\t\t\t\\inf_{\\psi}P_e(\\psi) \\to 0 & \\text{if}~ \\binom{n}{d}p \\geq (1+\\epsilon)\\frac{2^{d-2}}{d} \\frac{n \\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}; \\\\\n\t\t\t\\inf_{\\psi}P_e(\\psi) \\not\\rightarrow 0 &\\text{if}~ \\binom{n}{d}p \\leq (1-\\epsilon)\\frac{2^{d-2}}{d} \\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}.\n\t\t\\end{cases}\n\t\\end{align*}\n\\end{theorem}\n\\begin{IEEEproof} See Sec.~\\ref{pf:thm1}.\\end{IEEEproof}\n\nWe first make a comparison to the result in~\\cite{JMLR:v18:16-100}.\nWhile~\\cite{JMLR:v18:16-100} models a fairly general similarity measurement, it considers a more relaxed performance metric, so called almost exact recovery, which allows a vanishing fraction of misclassified nodes; and provides a sufficient condition on sample complexity under the setting~\\cite{hajek2016information}. \nOn the other hand, we identify the sufficient and necessary condition for \\emph{exact} recovery, thereby characterizing the fundamental limit.\nSpecializing their result to the model of our interest, the sufficient condition in~\\cite{JMLR:v18:16-100} reads $\\Omega(n \\log^2n)$, which comes with an extra $\\log n$ factor gap to the optimality. \n\n\nOne interesting observation in Theorem~\\ref{thm:main1} is that the sample complexity limit is proportional to $\\frac{2^{d-2}}{d}$.\nThis suggests that the amount of information that one hyperedge reveals on average is approximately $\\frac{d}{2^{d-2}}$ bits.\nTo understand why this is the case, consider a setting in which $\\theta=0$ and an hyperedge $E=\\{i_1,i_2,\\cdots, i_d\\}$ is observed.\nThe case of $Y_E=1$ implies $X_{i_1} = X_{i_2} = \\cdots = X_{i_d}$, in which there are only two uncertain cases (all zeros and all ones), i.e., the $d-1$ bits of information are revealed. \nOn the other hand, the case of $Y_E=0$ provides much less information as it rules out only two possible cases ($X_{i_1} = X_{i_2} = \\cdots = X_{i_d} = 0$ and $X_{i_1} = X_{i_2} = \\cdots = X_{i_d} = 1$) out of $2^d$ possible candidates. This amounts to roughly $d\\cdot \\frac{2}{2^{d}}$ bits.\nSince $Y_E=1$ occurs with probability $\\frac{1}{2^{d-1}}$, the amount of information that one hyperedge can carry on average should read about $\\frac{1}{2^{d-1}}(d-1) + \\left(1 - \\frac{1}{2^{d-1}}\\right)\\frac{d}{2^{d-1}} \\approx \\frac{d}{2^{d-2}}$.\n\nRelying on the connection to subspace clustering elaborated in Sec.~\\ref{sec:model_just}, one can make an interesting implication from Theorem~\\ref{thm:main1}. The result offers a detailed guideline as to how to choose $d$ for sample-efficient subspace clustering.\nIn the case where the measurement quality reflected in $\\theta$ is irrelevant of the number $d$ of data points involved in a measurement, the limit increases in $d$.\nIn practical applications, however, $\\theta$ may depend on $d$. Actually, the quality of similarity measure can improve as more data points get involved, making $\\theta$ decrease as $d$ increases. \nIn this case, choosing $d$ as small as possible minimizes $\\frac{2^{d-2}}{d}$ but may make $\\theta$ too large.\nHence, there might be a \\emph{sweet spot} on $d$ that minimizes the sample complexity.\nIt turns out this is indeed the case in practice. \nActually we identify such optimal $d^*$ for motion segmentation application; see Sec.~\\ref{sec:exhom} for details.\n\n\n\\subsection{The parity measurement case}\n\n\\begin{theorem}\n\t\\label{thm:main2}\nFix $d \\geq 2$ and $\\epsilon >0$. Under the parity measurement case ($f = f_p$),\n\t\\begin{align*}\n\t\\begin{cases}\n\\inf_{\\psi}P_e (\\psi) \\rightarrow 0 & \\text{if}~ \\binom{n}{d}p \\geq (1+\\epsilon)\\frac{1}{d}\\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}\\,; \\\\\n\t\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0 & \\text{if}~ \\binom{n}{d}p \\leq (1+\\epsilon)\\frac{1}{d}\\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}\\,.\n\t\\end{cases}\n\t\\end{align*}\n\\end{theorem}\n\\begin{IEEEproof} See Sec.\\ref{pf:thm2}.\\end{IEEEproof}\n\nNotice that for a fixed $\\theta$ and $n$, the minimum sample complexity is proportional to $\\frac{1}{d}$, hence decreases in $d$ unlike the homogeneity measurement~case. \n\nIn view of the connection made in Sec.~\\ref{sec:model_just}, a natural question that arises in the context of channel coding is to ask how far the rate of the random LDGM code is from the capacity of the BSC channel.\nThe connection can help immediately answer the question. \nWe see from Theorem~\\ref{thm:main2} that the rate of the LDGM code is\n\\begin{align*}\n\\frac{n}{p{n \\choose d}} = \\frac{d(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}{\\log n}.\n\\end{align*} \nThis suggests that the code rate increases in $d$. Note that as long as $d$ is constant, the rate vanishes, being far from the capacity of BSC channel $1-H(\\theta)$.\nOn the other hand, it is not clear as to whether or not the random LDGM code can achieve a non-vanishing code rate possibly by increasing the value of $d$.\n To check this, we explore the case where $d$ can scale with $n$. \nBy symmetry, it suffices to consider the case $2\\leq d\\leq n\/2$.\nMoreover, to avoid pathological cases where $d$ fluctuates as $n$ increases, we assume that $d$ is a monotone function. \n\\begin{theorem}\n\\label{thm:main3}\nFix $d$, a monotone function of $n$ such that $2\\leq d \\leq n\/2$, and $\\epsilon > 0$.\nUnder the parity measurement case ($f = f_p$),\n\\begin{itemize}\n\t\\item(upper bound) $\\inf_{\\psi}P_e (\\psi) \\rightarrow 0$ if \n\t\\begin{align}\n\t\\binom{n}{d}p &\\geq (1+\\epsilon) \\frac{5\/2}{d}\\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}~\\text{and} \\label{ubb1}\\\\\n\t\\binom{n}{d}p &\\geq (1+\\epsilon) 5\\log 2\\frac{n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}\\,;\\label{ubb2}\n\t \\intertext{\\item(lower bound) $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ if}\n\t\\binom{n}{d} p &\\leq (1-\\epsilon) \\frac{1}{d} \\frac{n\\log n }{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}~\\text{or}\\label{lbb1}\\\\\n\t\\binom{n}{d} p &\\leq \\frac{n}{1-H(\\theta)}\\,. \\label{lbb2}\n\t\\end{align}\n\\end{itemize}\n\\end{theorem}\n\\begin{IEEEproof} See Sec.~\\ref{pf:thm3}.\\end{IEEEproof}\n\nTo see what these results mean, consider the two cases: $d = \\Omega(\\log n)$ and $d = o(\\log n)$.\nIn the case $d = \\Omega(\\log n)$, the theorem says that for a fixed $\\theta$,\n\\begin{align*}\n\\inf_{\\psi}P_e(\\psi)\\to 0 &\\text{ if } \\binom{n}{d}p > \\beta_1 n~\\text{and}\\\\\n\\inf_{\\psi}P_e(\\psi)\\not\\to 0 &\\text{ if } \\binom{n}{d}p < \\beta_2 n\n\\,,\n\\end{align*} where $\\beta_1 = \\max\\left\\{\\frac{5\/2 \\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2 d},~ \\frac{5\\log 2}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2} \\right\\}\\asymp 1$ and $\\beta_2=\\max\\left\\{ \\frac{\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2d},~ \\frac{1}{1-H(\\theta)}\\right\\}\\asymp 1$. \nThis suggests that as long as $d$ grows asymptotically larger than $\\log n$, we can achieve an order-wise tight sample complexity that is linear in $n$.\n On the other hand, in the case $d = o(\\log n)$, the theorem asserts that \\begin{align*}\n\\inf_{\\psi}P_e(\\psi)\\to 0 &\\text{ if }\\binom{n}{d}p >\\frac{5\/2}{d} \\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}~\\text{and}\\\\\n\\inf_{\\psi}P_e(\\psi) \\not\\to 0 &\\text{ if }\\binom{n}{d}p < \\frac{1}{d} \\frac{n\\log n }{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}\\,.\n\\end{align*} \nThis implies that one cannot achieve the linear-order sample complexity if $d$ grows slower than $\\log n$. \n The implication of the above two can be formally stated as follows. \n\n\n\n\\begin{corollary}\n\t\\label{thm:main_dstar}\n\tFor $d=o(\\log n)$, reliable recovery is impossible with linear-order sample complexity, while it is possible for $d=\\Omega(\\log n)$. \n\\end{corollary}\n\n\nFrom this, we see that the random LDGM code can achieve a constant rate as soon as $d=\\Omega(\\log n)$.\n\n\n\n\n\\section{Proof of Theorem~\\ref{thm:main1}}\n\\label{pf:thm1}\n\nThe achievability and converse proofs are streamlined with the help of Lemmas~\\ref{lem:bound} and \\ref{lem:ind}, of which the proofs are left in Appendix~\\ref{appenA}. \nFor illustrative purpose, we focus on the noisy case $(\\theta > 0)$ and assume that $n$ is even.\nFor a vector $\\mathbf{V}:=\\{V_i\\}_{1\\leq i\\leq n} \\in \\{0,1\\}^{n}$, we define\n\\begin{align}\n\\begin{cases}\nf_{\\{i_1,i_2,\\cdots, i_d \\}} ({\\bf V}) &:= f(V_{i_1}, V_{i_2},\\cdots , V_{i_d}); \\\\\n\\mathbf{F}(\\mathbf{V})& := \\{f_E(\\mathbf{V})\\}_{E\\in \\mathcal{E}};\\\\\n{\\sf d_H}(\\mathbf{V}) & := \\|\\mathbf{Y}-\\mathbf{F}\\mathbf{(V)}\\|_1\\,.\n\\end{cases}\\label{defs}\n\\end{align}\nLet $\\psi_{\\text{ML}}$ be the maximum likelihood (ML) decoder.\n One can easily verify that \n\\begin{align*}\n\\psi_\\text{ML}(\\mathbf{Y}) = \\arg \\min _{\\mathbf{V} \\in \\{0,1\\}^{n}} {\\sf d_H}(\\mathbf{V}),\n\\end{align*}\nwhere ties are randomly broken.\n\n\n\\subsection{Achievability proof}\n We intend to prove that\n\\begin{align*}\n\\max_{\\mathbf{X}\\in \\{0,1\\}^{n}} \\Pr(\\psi_{\\text{ML}}(\\mathbf{Y})\\notin \\{\\mathbf{X},\\mathbf{X}\\oplus \\mathbf{1}\\} ) \\rightarrow 0\n\\end{align*}\nunder the claimed condition.\nLet $ \\mathbf{A} \\in \\{0,1\\}^n$ be the ground-truth vector. Without loss of generality, assume that the first $k$ coordinates are $0$'s and the next $n-k$ coordinates are $1$'s, where $ 0 \\leq k \\leq n\/2$. \n\nLet $\\mathcal{A}_{i,j}$ denote the collection of all vectors whose coordinates are different from that of $\\mathbf{A}$ in $i$ many positions among the first $k$ coordinates and in $j$ many positions among the next $n-k$ coordinates.\nNote that $\\mathcal{A}_{0,0} =\\{\\mathbf{A}\\}$ and $\\mathcal{A}_{k,n-k} =\\{\\mathbf{A}\\oplus \\mathbf{1}\\}$.\nThus, a decoding algorithm $\\psi$ is successful if and only if the output $\\psi(\\mathbf{Y}) \\in\\mathcal{A}_{0,0} \\cup \\mathcal{A}_{k,n-k}$.\nLet $\\mathcal{I}:=\\{(i,j)~:~ (i,j)\\notin \\{ (0,0), (k,n-k)\\},~0\\leq i \\leq k,~ \\text{and}~0\\leq j\\leq n-k \\} $.\nWe also define\n\\begin{align*}\n\\mathbf{V}_{i,j} := ( \\underbrace{\\underbrace{1,\\cdots,1}_{i},0,\\cdots, 0}_{k}, \\underbrace{\\underbrace{0,\\cdots ,0}_{j},1,\\cdots,1}_{n-k} )\\,,\n\\end{align*}\nwhich is a representative vector of $\\mathcal{A}_{i,j}$.\n\nUsing these notations and the union bound, we get:\n\\begin{align}\n\t&\\Pr(\\psi_{\\text{ML}}(\\mathbf{Y})\\notin \\{\\mathbf{X},\\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} =\\mathbf{A} ) \\nonumber \\\\\n\t&\\overset{(a)}{\\leq} \\Pr\\left(\\bigcup_{(i,j)\\in \\mathcal{I}}\\bigcup_{ \\mathbf{V} \\in \\mathcal{A}_{i,j}} \\left[ {\\sf d_H}(\\mathbf{V}) \\leq {\\sf d_H}(\\mathbf{A}) \\right] \\right) \\nonumber\\\\\n\t&\\leq \\sum_{(i,j)\\in \\mathcal{I}}~~\\sum_{\\mathbf{V} \\in \\mathcal{A}_{i,j}}\\Pr\\left( {\\sf d_H}(\\mathbf{V}) \\leq {\\sf d_H}(\\mathbf{A}) \\right) \\nonumber\\\\\n\t&= \\sum_{(i,j)\\in \\mathcal{I}} \\binom{k}{i} \\binom{n-k}{j}\\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) \\right) \\label{upperbound},\n\\end{align}\nwhere the step ($a$) follows from the fact that the ML decoder outputs $\\mathbf{V} \\notin \\{\\mathbf{A},\\mathbf{A}\\oplus \\mathbf{1}\\}$ if ${\\sf d_H}(\\mathbf{V}) \\leq {\\sf d_H}(\\mathbf{A})$.\n\nTo compare ${\\sf d_H}(\\mathbf{V}_{i,j})$ with ${\\sf d_H}(\\mathbf{A})$, we define the set of \\emph{distinctive} hyperedges, i.e., the set of hyperedges such that $f_E (\\mathbf{A}) \\neq f_E (\\mathbf{V}_{i,j})$:\n \\begin{align}\n\\mathcal{F}_{i,j}:= \\left\\{ E\\in \\binom{[n]}{d} ~:~f_E(\\mathbf{A})\\neq f_E(\\mathbf{V}_{i,j}) \\right\\} \\label{comparison}\n\\end{align} and $\\mathcal{E}_{i,j}: = \\mathcal{E} \\cap \\mathcal{F}_{i,j}$.\nBy definition, for $E\\in\\mathcal{E}_{i,j} $, $Y_E =f_E(\\mathbf{A})$ if $Z_E =0$; $Y_E =f_E(\\mathbf{V}_{i,j})$ otherwise. Hence, ${\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A})$ if and only if $ \\sum_{E\\in \\mathcal{E}_{i,j} } Z_E \\geq \\frac{|\\mathcal{E}_{i,j}|}{2}$. This leads to:\n\\ifdefined1\n\t\\begin{align}\n\t\t&\\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) \\right)\\nonumber\\\\ &= \\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|}\\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) ~| ~ |\\mathcal{E}_{i,j}| = \\ell\\right) \\Pr(|\\mathcal{E}_{i,j}| = \\ell) \\label{expansion}\\\\\n\t\t&=\\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|}\\Pr\\left( \\sum_{E\\in \\mathcal{E}_{i,j} } Z_E \\geq \\frac{\\ell}{2} ~\\bigg| ~ |\\mathcal{E}_{i,j}| = \\ell\\right)\\cdot \\binom{|\\mathcal{F}_{i,j}|}{\\ell}p^{\\ell}(1-p)^{|\\mathcal{F}_{i,j}|-\\ell} \\nonumber\\\\\n\t\t&\\overset{(a)}{\\leq} \\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|} e^{-\\ell D(0.5\\| \\theta)} \\binom{|\\mathcal{F}_{i,j}|}{\\ell}p^{\\ell}(1-p)^{|\\mathcal{F}_{i,j}|-\\ell} \\nonumber\\\\\n\t\t&= (1-(1-e^{-D(0.5\\| \\theta )})p)^{|\\mathcal{F}_{i,j}|}\\,, \\label{exp1}\t\n\t\\end{align} \n\\else\n\t\\begin{align}\n\t\t&\\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) \\right)\\nonumber\\\\ &= \\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|}\\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) ~| ~ |\\mathcal{E}_{i,j}| = \\ell\\right) \\Pr(|\\mathcal{E}_{i,j}| = \\ell) \\label{expansion}\\\\\n\t\t&=\\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|}\\Pr\\left( \\sum_{E\\in \\mathcal{E}_{i,j} } Z_E \\geq \\frac{\\ell}{2} ~\\bigg| ~ |\\mathcal{E}_{i,j}| = \\ell\\right)\\nonumber\\\\\n\t\t&~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\\cdot \\binom{|\\mathcal{F}_{i,j}|}{\\ell}p^{\\ell}(1-p)^{|\\mathcal{F}_{i,j}|-\\ell} \\nonumber\\\\\n\t\t&\\overset{(a)}{\\leq} \\sum_{\\ell=1}^{|\\mathcal{F}_{i,j}|} e^{-\\ell D(0.5\\| \\theta)} \\binom{|\\mathcal{F}_{i,j}|}{\\ell}p^{\\ell}(1-p)^{|\\mathcal{F}_{i,j}|-\\ell} \\nonumber\\\\\n\t\t&= (1-(1-e^{-D(0.5\\| \\theta )})p)^{|\\mathcal{F}_{i,j}|}\\,, \\label{exp1}\t\n\t\\end{align} \n\\fi\n\nwhere ($a$) is due to Chernoff-Hoeffding~\\cite{hoeffding1963probability}. \nBy letting $p' := (1-e^{-D(0.5\\| \\theta )})p$ and applying this to \\eqref{upperbound}, we get:\n\\begin{align}\n\t&\\Pr(\\psi_{\\text{ML}}(\\mathbf{Y})\\notin \\{\\mathbf{X},\\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} =\\mathbf{A} ) \\nonumber\\\\\n\t&\\leq \\sum_{(i,j)\\in \\mathcal{I}} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} \\label{upperbound2}.\n\\end{align} \n\nTo give a tight upper bound on \\eqref{upperbound2}, one needs a tight lower bound on the size of the set of distinctive hyperedges, i.e., $|\\mathcal{F}_{i,j}|$. \nIt turns out that bounding $|{\\cal F}_{i,j}|$ when $d > 2$ requires non-trivial combinatorial counting.\nNote that this was not the case when $d = 2$ since $|{\\cal F}_{i,j}|$ can be exactly computed via simple counting.\nIndeed, one of our main technical contributions lies in the derivation of tight bounds on $|{\\cal F}_{i,j}|$, which we detail below.\n\n\n\n\\begin{fact} \\label{fact1} The number of distinctive hyperedges can be calculated as follows:\n\\ifdefined1\n\t\\begin{align}\n\t\t&|\\mathcal{F}_{i,j}| = \\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{k-i}{d-\\ell} +\\sum_{\\ell=1}^{d-1} \\binom{j}{\\ell}\\binom{n-k-j}{d-\\ell} +\\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{n-k-j}{d-\\ell}+ \\sum_{\\ell=1}^{d-1} \\binom{k-i}{\\ell}\\binom{j}{d-\\ell}. \\label{count}\n\t\\end{align}\n\\else\n\t\\begin{align}\n\t\t&|\\mathcal{F}_{i,j}| = \\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{k-i}{d-\\ell} +\\sum_{\\ell=1}^{d-1} \\binom{j}{\\ell}\\binom{n-k-j}{d-\\ell} \\nonumber\n\t\t\\\\&+\\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{n-k-j}{d-\\ell}+ \\sum_{\\ell=1}^{d-1} \\binom{k-i}{\\ell}\\binom{j}{d-\\ell}. \\label{count}\n\t\\end{align}\n\\fi\n\t\n\\end{fact}\n\\begin{IEEEproof}\nConsider a hyperedge $E = \\{i_1, i_2, \\cdots, i_d\\}$ such that $f_E(\\mathbf{A}) = 1$. That is, the hyperedge is connected only to a subset of the first $k$ nodes or only to a subset of the last $n-k$ nodes. \nThat is, $\\{i_1, i_2, \\cdots, i_d\\} \\subset \\{1,2,\\cdots, k\\}$ or $\\{i_1, i_2, \\cdots, i_d\\} \\subset \\{k+1,k+2,\\cdots, n\\}$.\nConsider the first case, i.e., $\\{i_1, i_2, \\cdots, i_d\\} \\subset \\{1,2,\\cdots, k\\}$. \nIn order for this hyperedge to be distinctive, i.e., $f_E(\\mathbf{V}_{i,j}) = 0$, at least one element of $E$ must be in $\\{1,2,\\cdots,i\\}$, and at least one element of $E$ must be in $\\{i+1, \\cdots, k\\}$.\nThus, the total number of such distinctive hyperedges is $\\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{k-i}{d-\\ell}$.\nSimilarly, one can count the number of distinctive hyperedges for the case $\\{i_1, i_2, \\cdots, i_d\\} \\subset \\{k+1,k+2,\\cdots, n\\}$: $\\sum_{\\ell=1}^{d-1} \\binom{j}{\\ell}\\binom{n-k-j}{d-\\ell}$.\nBy considering the opposite case where $f_E(\\mathbf{A}) = 0$ and $f_E(\\mathbf{V}_{i,j}) = 1$, one can also obtain the remaining two terms, proving the statement. \\end{IEEEproof}\n\n\n\n\nBy symmetry, we see that $|\\mathcal{F}_{i,j}| = |\\mathcal{F}_{k-i,n-k-j}|$.\nHence,\n\\begin{align}\n&\\sum_{(i,j)\\in \\mathcal{I}} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} \\\\\n&\\leq \\sum_{(i,j)\\in \\mathcal{I},~j\\leq\\lfloor\\frac{n-k}{2} \\rfloor} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} + \\sum_{(i,j)\\in \\mathcal{I},~j\\geq\\lceil\\frac{n-k}{2} \\rceil} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|}\\\\\n&= \\sum_{(i,j)\\in \\mathcal{I},~j\\leq\\lfloor\\frac{n-k}{2} \\rfloor} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} + \\sum_{(i,j)\\in \\mathcal{I},~j\\leq\\lfloor\\frac{n-k}{2} \\rfloor} \\binom{k}{k-i} \\binom{n-k}{n-k-j}(1-p')^{|\\mathcal{F}_{k-i,n-k-j}|}\\\\\n&= 2\\sum_{(i,j)\\in \\mathcal{I},~j\\leq\\lfloor\\frac{n-k}{2} \\rfloor} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} =: 2V.\n\\end{align}\n\n\n\nIn order to bound $V$, for a fixed constant $\\delta >0$, we define the following index sets: $\\mathcal{I}_\\text{big} := \\{(i,j)\\in \\mathcal{I} : \\left[j \\leq \\frac{n-k}{2}\\right] \\cap \\left(\\left[i \\geq \\delta n\\right] \\cup \\left[j \\geq \\delta n\\right]\\right)\\}$ and $\\mathcal{I}_\\text{small} := \\{(i,j)\\in \\mathcal{I} : \\left[j \\leq \\frac{n-k}{2}\\right] \\cap \\left(\\left[i < \\delta n\\right] \\cap \\left[j < \\delta n\\right]\\right)\\}$.\nThen, \n\\begin{align}\nV &= \\sum_{(i,j)\\in \\mathcal{I}_\\text{big} \\cup \\mathcal{I}_\\text{big}} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|}\\\\\n&= \\sum_{(i,j)\\in \\mathcal{I}_\\text{big}} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|} \\label{upperfirst}\\\\\n&+ \\sum_{(i,j)\\in \\mathcal{I}_\\text{small}} \\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|}.\\label{uppersec}\n\\end{align}\nLet us first consider \\eqref{upperfirst}. \nWithout loss of generality, assume $i\\geq \\delta n$.\nThen it follows from \\eqref{count} that \n\\begin{align*}\n\t|\\mathcal{F}_{i,j}| &\\geq \\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{n-k-j}{d-\\ell} \\overset{(a)}{\\geq} \\sum_{\\ell=1}^{d-1} \\binom{i}{\\ell}\\binom{n\/4}{d-\\ell}\\\\ \n\t&\\geq\\binom{i}{1}\\binom{n\/4}{d-1} \\geq \\delta n \\binom{n\/4}{d-1} = \\Omega(n^d), \n\\end{align*}\nwhere ($a$) follows from the hypothesis that $j\\leq \\frac{n-k}{2}$ and $k\\leq \\frac{n}{2}$.\nThen it is easy to show that \\eqref{upperfirst}$\\to 0$:\n\\begin{align*}\n\t\\eqref{upperfirst} &\\leq \\sum_{(i,j)\\in \\mathcal{I}} \\binom{k}{i} \\binom{n-k}{j}e^{-p'\\Omega(n^d)} \\\\\n\t&\\overset{(a)}{=}e ^{-\\Omega(n\\log n )}\\sum_{(i,j)\\in \\mathcal{I}} \\binom{k}{i} \\binom{n-k}{j}\\leq e ^{-\\Omega(n\\log n )} 2^{n} \\to 0, \n\\end{align*}\nwhere ($a$) follows from the fact that $p'\\Omega(n^d)\\asymp p\\binom{n}{d} =\\Omega(n\\log n)$.\n\nNow we consider \\eqref{uppersec}. \nThe following lemma gives a tight lower bound on $|\\mathcal{F}_{i,j}|$ for this case:\n\\begin{lemma}\\label{lem:bound}\n\tFor $i< \\delta n$ and $j<\\delta n $,\n\t\\[\n\t|\\mathcal{F}_{i,j}|\\geq (i+j)\\cdot\\frac{(1-2\\delta)^{d-1}}{2^{d-2}} \\binom{n-1}{d-1}.\n\t\\]\n\\end{lemma}\n\\begin{IEEEproof}\n\tSee Sec.~\\ref{app1}.\n\t\\end{IEEEproof}\nApplying Lemma~\\ref{lem:bound} to \\eqref{uppersec}, we get:\n\\begin{align}\n\t\\eqref{uppersec}\n\t&=\\sum_{(i,j)\\in \\mathcal{I}_\\text{small}}\\binom{k}{i} \\binom{n-k}{j}(1-p')^{|\\mathcal{F}_{i,j}|}\\nonumber\\\\\n\t&\\overset{(a)}{\\leq} \\sum_{(i,j)\\in \\mathcal{I}_\\text{small}} n^i n^j e^{-p'(i+j)\\cdot\\frac{(1-2\\delta)^{d-1}}{2^{d-2}} \\binom{n-1}{d-1}} \\nonumber\\\\\n\t&= \\sum_{(i,j)\\in \\mathcal{I}_\\text{small}} \\exp\\left((i+j)\\left\\{\\log n-\\frac{p'(1-2\\delta)^{d-1}\\binom{n-1}{d-1}}{2^{d-2}} \\right\\} \\right), \\label{c1}\n\\end{align}\nwhere ($a$) follows due to $\\binom{k}{i}\\leq n^i$, $\\binom{n-k}{j}\\leq n^j$ and Lemma~\\ref{lem:bound}.\nA straightforward computation yields $(1-e^{-{\\sf D_{KL}}(0.5\\| \\theta )})= (\\sqrt{1-\\theta}-\\sqrt{\\theta})^2$, so the claimed condition \\begin{align*}\n\\binom{n}{d}p \\geq (1+\\epsilon)\\frac{2^{d-2}}{d} \\frac{n \\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}\n\\end{align*} becomes \n\\begin{align}\n\t\\binom{n}{d}p' \\geq (1+\\epsilon) \\frac{2^{d-2}}{d} n\\log n\\,.\\label{suff}\n\\end{align}\nUnder the claimed condition, we get:\n\\begin{align*}\n\t\\frac{p'(1-2\\delta)^{d-1}\\binom{n-1}{d-1}}{2^{d-2}} &=\\frac{p'(1-2\\delta)^{d-1}\\binom{n}{d}\\frac{d}{n}}{2^{d-2}}\\\\\n\t&\\overset{(a)}{\\geq} (1+\\epsilon)(1-2\\delta)^{d-1} \\log n\\\\\n\t&\\overset{(b)}{\\geq} (1+\\epsilon\/2) \\log n,\n\\end{align*}\nwhere ($a$) follows from \\eqref{suff}; ($b$) follows by choosing $\\delta $ sufficiently small ($(1-2\\delta)^{d-1}\\to 0$ as $\\delta\\to 0$).\nThus, \\eqref{c1} converges to $0$ as $n$ tends to infinity. This completes the proof.\n\n\\subsection{Converse proof}\nLet $\\mathcal{V}_{1\/2}$ be the collection of $n$-dimensional vectors, each consisting of $n\/2$ number of $0$'s and $n\/2$ number of $1$'s. Moreover, let $\\mathbf{X}_{1\/2}$ be the random vector sampled uniformly at random over $\\mathcal{V}_{1\/2}$. For any scheme $\\psi$, by definition of $P_e (\\psi)$, we see that \n\\begin{align*}\n\t\\Pr\\left(\\psi(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{X}_{1\/2} \\right) \\leq P_e(\\psi)\n\\end{align*}\nand hence\n\\begin{align*}\n\t\\inf_{\\psi } \\Pr\\left(\\psi(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{X}_{1\/2} \\right) \\leq \\inf_{\\psi }P_e(\\psi).\n\\end{align*}\nRelying on this inequality, our proof strategy is to show that the left hand side is strictly bounded away from $0$.\nNote that the infimum in the left hand side is achieved by $\\psi_{\\text{ML},1\/2}$:\n\\begin{align*}\t\\psi_{\\text{ML},1\/2}(\\mathbf{Y}) = \\arg \\min _{\\mathbf{V} \\in \\mathcal{V}_{1\/2}} {\\sf d_H}(\\mathbf{V})\\,.\n\\end{align*}\t\nBy letting $\\mathbf{A} = ( \\underbrace{0,\\cdots, 0}_{n\/2}, \\underbrace{1,\\cdots,1}_{n\/2} )$, \nwe obtain \n\\begin{align*}\n\t&\\Pr\\left(\\psi_{\\text{ML},1\/2}(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{X}_{1\/2} \\right)\\\\\n\t= &\\Pr\\left(\\psi_{\\text{ML},1\/2}(\\mathbf{Y}) \\notin \\{\\mathbf{A},~ \\mathbf{A}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{A}\\right).\n\\end{align*}\nLet $S$ be the success event:\n\\begin{align*}\nS :=\\bigcap_{\\mathbf{V}\\in \\mathcal{V}_{1\/2}\\setminus \\{\\mathbf{A}, \\mathbf{A}\\oplus \\mathbf{1}\\} } \\left[{\\sf d_H}(\\mathbf{V})> {\\sf d_H}(\\mathbf{A})\\right]\\,.\n\\end{align*}\nOne can show that $\\Pr\\left(\\psi_{\\text{ML},1\/2}(\\mathbf{Y}) \\notin \\{\\mathbf{A},~ \\mathbf{A}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{A}\\right) \\geq \\frac{1}{3} \\Pr(S^c)$.\nThis is due to the fact that given $S^c$, there are more than two candidates for $\\arg\\min_{\\mathbf{V}\\in \\mathcal{V}_{1\/2}}{\\sf d_H}(\\mathbf{V})$, so \n\\[\n\\Pr\\left(\\psi_{\\text{ML},1\/2}(\\mathbf{Y}) \\notin \\{\\mathbf{A},~ \\mathbf{A}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{A},~S^c\\right) \\geq \\frac{1}{3}.\n\\]\nHence, it suffices to show $\\Pr(S)\\to 0$.\nTo give a tight upper bound on $\\Pr(S)$, we construct a subset of nodes such that any two nodes in the subset do not share the same hyperedge. To this end, we use the deletion technique (alteration technique)~\\cite{alon2004probabilistic}.\nWe first choose a big subset \n\\[\n\\mathcal{R}_{\\text{big}}=\\left\\{1,2,\\cdots,r \\right\\} \\bigcup \\left\\{\\frac{n}{2}+1,\\frac{n}{2}+2,\\cdots, \\frac{n}{2}+r \\right\\},\n\\]\nwhere $r=\\lceil \\frac{n}{\\log^7 n} \\rceil$; then erase every node in $\\mathcal{R}_{\\text{big}}$ which shares hyperedges with other nodes in $\\mathcal{R}_{\\text{big}}$ to obtain $\\mathcal{R}_{\\text{res}}$. The following lemma guarantees that $\\mathcal{R}_{\\text{res}}$ has a comparable size as that of $\\mathcal{R}_{\\text{big}}$ with high probability. For the later usage, we allow $d$ to scale with $n$. \n\\begin{lemma} \\label{lem:ind}\n\tSuppose $\\binom{n}{d}p=O(n\\log n)$ and $d=O(\\log n)$. Let $\\mathcal{R}_{\\text{big}}$ be a subset of $[n]$ and $\\mathcal{R}_{\\text{res}}$ be a subset obtained from $\\mathcal{R}_{\\text{big}}$ by deleting every node which shares hyperedges with other nodes in $\\mathcal{R}_{\\text{big}}$.\n\tIf $|\\mathcal{R}_{\\text{big}}| = O(n\/\\log^7 n)$, then \n\twith probability approaching $1$, \n\t\\begin{align*} \n\t\t|\\mathcal{R}_{\\text{res}}|=(1-o(1))|\\mathcal{R}_{\\text{big}}|\\,.\n\t\\end{align*}\n\\end{lemma}\n\\begin{IEEEproof}\n\tSee Sec.~\\ref{pf:ind}.\n\\end{IEEEproof}\nLet $\\Delta$ be the event that $|\\mathcal{R}_{\\text{res}}|\\geq (1-o(1))|\\mathcal{R}_{\\text{big}}|$.\nGiven the event $\\Delta$, both $\\{1,2,\\cdots,n\/2\\} \\cap \\mathcal{R}_{\\text{res}} \\label{set1}$ and $\\left\\{\\frac{n}{2}+1,\\frac{n}{2}+2,\\cdots,n\\right\\} \\cap \\mathcal{R}_{\\text{res}} \\label{set2}$ contain more than $r\/2$ elements.\nWe collect $r\/2$ elements from each of these sets and denote by $\\{ b_1, b_2 , \\cdots, b_{r\/2} \\}$ and $\\{ c_1, c_2 , \\cdots, c_{r\/2} \\}$, respectively. \nSuppose that there exist ($k,\\ell$) such that ${\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_k}) \\leq {\\sf d_H}(\\mathbf{A})$ and ${\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{c_\\ell}) \\leq {\\sf d_H}(\\mathbf{A})$. \nConditioning on $\\Delta$, there are no hyperedges that contain both $b_k$ and $c_\\ell$, so ${\\sf d_H}(\\mathbf{A} \\oplus\\mathbf{e}_{b_k} \\oplus \\mathbf{e}_{c_\\ell} )\\leq {\\sf d_H}(\\mathbf{A})$. Hence conditioning on $\\Delta$,\n\\begin{align*}\n\tS &\\subset \\bigcap_{k=1}^{r\/2} \\left[ {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_k}) >{\\sf d_H}(\\mathbf{A}) \\right] \\bigcup \\bigcap_{k=1}^{r\/2} \\left[ {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{c_k}) >{\\sf d_H}(\\mathbf{A}) \\right]\\\\\n\t&=:S'.\n\\end{align*}\nSince the event $\\Delta$ occurs with probability approaching $1$ and $S \\subset S'$, $\\Pr(S) \\simeq \\Pr(S~|~\\Delta) \\leq \\Pr(S'~|~\\Delta)$. \nHence, \n\\begin{align*}\n\t\\Pr(S) &\\lesssim \\Pr\\left (S' ~|~ \\Delta \\right)\\\\\n\t&\\leq 2\\Pr\\left ( \\bigcap_{k=1}^{r\/2} \\left[ {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_k}) >{\\sf d_H}(\\mathbf{A}) \\right] ~\\bigg|~ \\Delta \\right) \\\\ \n\t&\\overset{(a)}{=} 2\\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)^{r\/2}, \n\\end{align*}\nwhere $(a)$ follows from the fact that the events $\\{[{\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_k}) >{\\sf d_H}(\\mathbf{A})]\\}_{1\\leq k \\leq r\/2 }$ are mutually independent conditioned on $\\Delta$.\nLet $p' = (1-e^{-{\\sf D_{KL}}(0.5\\| \\theta )})p$ as in the achievability proof. We intend to give an upper bound on $\\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)$,\ni.e., a lower bound on $\\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)$.\nRecall from the proof of achievability (see \\eqref{exp1}) that\n\\begin{align*}\n \\Pr\\left( {\\sf d_H}(\\mathbf{V}_{i,j}) \\leq {\\sf d_H}(\\mathbf{A}) \\right) \\leq (1-(1-e^{-{\\sf D_{KL}}(0.5\\| \\theta )})p)^{|\\mathcal{F}_{i,j}|}\\,.\n\\end{align*}\nFor the case of $\\mathbf{V}_{i,j} =\\mathbf{A} \\oplus \\mathbf{e}_{b_1}$, $|\\mathcal{F}_{i,j}|= \\binom{n\/2-1}{d-1} + \\binom{n\/2}{d-1}$ (note that $k=n\/2, i=1, j=0$). So we get:\n\\begin{align}\n\\Pr\\left( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) \\right) \\leq e^{-p'\\left( \\binom{n\/2-1}{d-1} + \\binom{n\/2}{d-1}\\right)}\\,. \\label{exp:6}\n\\end{align} \n On the other hand, what we need for the converse proof is a lower bound. In what follows, we will show that \\eqref{exp:6} is tight enough, more precisely, \n\\begin{align}\n&\\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)\\geq (1-o(1))e^{-2p' \\binom{n\/2-1}{d-1}}\\,. \\label{tight}\n\\end{align}\nWhat this means at a high level is that Chernoff-Hoeffding is tight enough.\nLet us condition on the event $\\Delta$ for the time being. As in \\eqref{comparison}, we define the following sets:\n\\begin{align*}\n&\\mathcal{F}_{b_1}:= \\left\\{ E\\in \\binom{[n]}{d} ~:~ f_E(\\mathbf{A})\\neq f_E(\\mathbf{A} \\oplus \\mathbf{e}_{b_1})\\right\\}\n\\end{align*}\n and $\\mathcal{E}_{b_1}: = \\mathcal{E} \\cap \\mathcal{F}_{b_1}$. \n By definition, for $E\\in\\mathcal{E}_{b_1}$, $Y_E =f_E(\\mathbf{A})$ if $Z_E =0$; $Y_E =f_E(\\mathbf{A} \\oplus \\mathbf{e}_{b_1})$ otherwise. We see that\n \\[\n {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) \\Leftrightarrow \\sum_{E\\in \\mathcal{E}_{b_1}} Z_E \\geq \\frac{|\\mathcal{E}_{b_1}|}{2}\\,.\n \\] \n Now we want to manipulate $\\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)$ as we did in \\eqref{expansion}.\n However, here we need to give a careful attention to the range of summation as $\\mathcal{E}_{b_1}$ cannot be equal to $\\mathcal{F}_{b_1}$ due to the following reason. Since we conditioned on $\\Delta$, no hyperedge in $\\mathcal{E}_{b_1}$ intersects $\\mathcal{R}_{\\text{big}}$ at more than one node (indeed, $b_1$ is the only node where they intersect); in other words, $\\mathcal{E}_{b_1}$ is always contained in a proper subset of $\\mathcal{F}_{b_1}$: \n\\begin{align}\n\\mathcal{E}_{b_1} &\\subset \\mathcal{F}_{b_1} \\setminus \\left\\{E\\in \\binom{[n]}{d}~:~ |E\\cap \\mathcal{R}_{\\text{big}}| \\geq 2 \\right\\} =:\\mathcal{G}_{b_1}. \\label{def:G}\n\\end{align}\n\n\nNow a manipulation similar to~\\eqref{expansion} yields:\n\\begin{align*}\n&\\Pr\\left( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~|~ \\Delta\\right)\\nonumber\\\\ \n&= \\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|}\\Pr\\left({\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~\\big| ~ |\\mathcal{E}_{b_1}| = \\ell,~\\Delta\\right) \\Pr(|\\mathcal{E}_{b_1}| = \\ell| \\Delta).\n\\end{align*}\nSince the event $\\Delta$ is related to the occurrence of edges in \n\\begin{align*}\n\\left\\{E\\in \\binom{[n]}{d}~:~ |E\\cap \\mathcal{R}_{\\text{big}}| \\geq 2 \\right\\}\n\\end{align*}\nand ${\\cal E}_{b_1}$ is subject to \\eqref{def:G}, \n$\\Delta$ and $[|\\mathcal{E}_{b_1}|=\\ell]$ are independent. \n Thus, we get:\n\\begin{align}\n&\\Pr\\left( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~|~ \\Delta\\right)\\nonumber\\\\ \n&= \\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|}\\Pr\\left({\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{A}) ~\\big| ~ |\\mathcal{E}_{b_1}| = \\ell, ~\\Delta\\right) \\Pr(|\\mathcal{E}_{b_1}| = \\ell) \\nonumber\\\\\n&=\\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|}\\Pr\\left( \\sum_{E\\in \\mathcal{E}_{b_1} } Z_E \\geq \\frac{\\ell}{2} \\bigg| |\\mathcal{E}_{b_1}| = \\ell\\right) \\binom{|\\mathcal{G}_{b_1}|}{\\ell}\\frac{p^{\\ell}}{(1-p)^{\\ell-|\\mathcal{G}_{b_1}|}}. \\label{e1}\t\n\\end{align} \nBy the reverse Chernoff-Hoeffding bound~\\cite{hoeffding1963probability}, for a fixed $\\delta>0$, there exists $n_{\\delta}>0$ such that\n\\begin{align*}\n\\Pr\\left( \\sum_{E\\in \\mathcal{E}_{b_1} } Z_E \\geq \\frac{\\ell}{2} \\bigg| |\\mathcal{E}_{b_1}| = \\ell\\right) \\geq e^{-(1+\\delta)\\ell {\\sf D_{KL}}(0.5\\|\\theta)}\n\\end{align*}\nfor all $\\ell \\geq n_{\\delta}$. Let $g_n$ be a sequence (to be determined) such that $g_n\\to \\infty$ as $n\\to \\infty$. For sufficiently large $n$, \n\\begin{align}\n\\eqref{e1}&\\geq \\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|} \\binom{|\\mathcal{G}_{b_1}|}{\\ell}\\frac{(e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)}p)^{\\ell}}{(1-p)^{\\ell-|\\mathcal{G}_{b_1}|}} \\label{firstex1} \\\\\n&-\\sum_{\\ell=1}^{g_n-1} \\binom{|\\mathcal{G}_{b_1}|}{\\ell}\\frac{(e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)}p)^{\\ell}}{(1-p)^{\\ell-|\\mathcal{G}_{b_1}|}}\\,.\\label{secondex1} \n\\end{align} \n\nActually one can choose $g_n$ so that \\eqref{secondex1} is negligible compared to \\eqref{firstex1}. To see this, we consider:\n\\begin{align}\n\\frac{\\eqref{secondex1}}{ \\eqref{firstex1}} &\\leq \n\\frac{(1-p)^{|\\mathcal{G}_{b_1}|}\\sum_{\\ell=1}^{g_n-1}\\left(\n\t|\\mathcal{G}_{b_1}|\\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right)^\\ell}{ (1-p)^{|\\mathcal{G}_{b_1}|}\\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|}\\binom{|\\mathcal{G}_{b_1}|}{\\ell} \\left(\\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right)^\\ell} \\nonumber\\\\\n&= \\frac{\\sum_{\\ell=1}^{g_n-1}\\left(\n\t|\\mathcal{G}_{b_1}|\\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right)^\\ell}{\\left( 1+ \\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right)^{|\\mathcal{G}_{b_1}|} }\\nonumber\t\\\\\n&\\overset{(a)}{=} \\frac{\\sum_{\\ell=1}^{g_n-1}\\left(\n\t|\\mathcal{G}_{b_1}|\\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right)^\\ell}{(1+o(1))\\exp\\left( |\\mathcal{G}_{b_1}| \\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\right) } \\nonumber \\\\\n&=: \\frac{\\sum_{\\ell=1}^{g_n-1} q^\\ell }{(1+o(1))e^q} \\label{thirdex1},\n\\end{align}\nwhere ($a$) follows from the fact that $\\lim_{x\\to 0+}\\frac{1+x}{e^{x}}=1$, and the last equation is due to the following definition: $q:= |\\mathcal{G}_{b_1}| \\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}$.\nOne can easily verify that\n$|\\mathcal{F}_{b_1}| = \\binom{n\/2-1}{d-1} + \\binom{n\/2}{d-1}$ and $|\\mathcal{G}_{b_1}| = \\binom{n\/2-1-r}{d-1} + \\binom{n\/2-r}{d-1}$.\nSince $r = o(n)$, $\\lim_{n\\to \\infty}|\\mathcal{G}_{b_1}|\/|\\mathcal{F}_{b_1}| \\to 1$. \nThus, \n\\begin{align}\nq &=|\\mathcal{G}_{b_1}| \\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\\\\n&\\asymp |\\mathcal{F}_{b_1}| \\frac{pe^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)}}{1-p}\\asymp n^{d-1} p = \\Omega(\\log n)\\,. \\label{div}\n\\end{align} \n\nTherefore, if one chooses $g_n=\\left\\lfloor \\log q\\right \\rfloor$, \n\t$$\\frac{\\eqref{secondex1}}{ \\eqref{firstex1}} = \\frac{\\sum_{\\ell=1}^{g_n-1} q^\\ell}{e^q} \\leq \\frac{g_n q^{g_n}}{e^q} \\leq \\frac{\\log q \\cdot q^{\\log q}}{e^q} = \\frac{\\log q \\cdot e^{(\\log q)^2}}{e^q} \\rightarrow 0,$$\n\tand thus $\\eqref{secondex1} = o(1)\\cdot \\eqref{firstex1}$.\n\nHence, we get:\n\\begin{align*}\n\\eqref{e1}&=\\eqref{firstex1}-\\eqref{secondex1}\\\\ &\\geq (1-o(1)) \\sum_{\\ell=1}^{|\\mathcal{G}_{b_1}|} \\binom{|\\mathcal{G}_{b_1}|}{\\ell}\\frac{(e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)}p)^{\\ell}}{(1-p)^{\\ell-|\\mathcal{G}_{b_1}|}}\\\\\n& = (1-o(1)) \\left(1- (1-e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)})p \\right)^{|\\mathcal{G}_{b_1}|} \\\\\n&\\overset{(a)}{\\geq} (1-o(1)) \\left(1- (1-e^{-(1+\\delta){\\sf D_{KL}}(0.5\\|\\theta)})p \\right)^{2\\binom{n\/2}{d-1}} \\\\\n&\\overset{(b)}{=} (1-o(1)) \\exp\\left(- 2\\binom{n\/2}{d-1} (1-e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)})p \\right),\n\\end{align*}\t\nwhere ($a$) follows since $|\\mathcal{G}_{b_1}|\\leq |\\mathcal{F}_{b_1}| \\leq 2\\binom{n\/2}{d-1}$; ($b$) follows from the fact that $\\lim_{x\\to 0+}\\frac{1+x}{e^{x}}=1$. As $\\delta>0$ can be chosen arbitrarily small, the term $e^{-(1+\\delta) {\\sf D_{KL}}(0.5\\|\\theta)}$ can be made arbitrarily close to $e^{- {\\sf D_{KL}}(0.5\\|\\theta)}$, which in turn ensures that the last term is essentially equal to \n\\[\n(1-o(1)) e^{-2p'\\binom{n\/2}{d-1}}.\n\\]\nApplying this to the previous upper bound on $\\Pr(S)$, we get:\n\\begin{align*}\n\t\\Pr(S) &\\leq \\Pr\\left ( {\\sf d_H}(\\mathbf{A} \\oplus \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{A}) ~\\big|~ \\Delta \\right)^{r\/2}\\nonumber\\\\\n\t&\\leq \\left(1-(1-o(1))e^{-2p' \\binom{n\/2}{d-1}}\\right)^{r\/2}\\nonumber\\\\\n\t&\\leq \\exp\\left(-(1-o(1))\\frac{r}{2} e^{-2p' \\binom{n\/2}{d-1}} \\right)\\nonumber\\\\\n\t&= \\exp\\left(-(1-o(1))\\frac{n}{2\\log ^7 n} e^{-(1+o(1))\\cdot \\frac{p' d\\binom{n}{d}}{2^{d-2}n} } \\right),\n\\end{align*} \nwhere the last equality follows from the fact that\n\\begin{align*}\n\\lim_{n\\to \\infty}\\frac{2p' \\binom{n\/2}{d-1}}{\n\tp' d\\binom{n}{d}\/2^{d-2}n} \\to 1~\\text{and}~ r=\\left\\lceil \\frac{n}{\\log^7 n} \\right\\rceil.\n\\end{align*}\nThe last term converges to $0$ as $p'\\leq (1-\\epsilon)\\frac{2^{d-2}}{d} \\frac{n\\log n}{\\binom{n}{d}}$.\n\n\\section{Proof of Theorem~\\ref{thm:main2} } \\label{pf:thm2}\n\n\n\nIn this section, we prove a similar statement for the parity measurement case. \n\n\n\\subsection{Achievability proof}\nNote that the parity measurement is \\emph{symmetric} in a sense that for any two vector $\\mathbf{A}$ and $\\mathbf{B}$, $\\Pr\\left(\\psi_{\\text{ML}}(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{A}\\right) = \\Pr\\left(\\psi_{\\text{ML}}(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{B}\\right)$.\nHence, we will prove that\n\\begin{align*}\n\\Pr\\left(\\psi_{\\text{ML}}(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{0}\\right) \\rightarrow 0\n\\end{align*}\nunder the claimed condition.\nConditioning on $\\mathbf{X}=\\mathbf{0}$,\n\\begin{align}\n&\\Pr\\left(\\psi_{\\text{ML}}(\\mathbf{Y}) \\notin \\{\\mathbf{0}, \\mathbf{1}\\}\\right) \\nonumber\\\\\n&\\leq \\Pr\\left (\\bigcup_{\\mathbf{A}\\neq \\mathbf{0},\\mathbf{1}}\\left[{\\sf d_H}(\\mathbf{A})\\leq {\\sf d_H}(\\mathbf{0})\\right]\\right) \\nonumber \\\\\n&=\\Pr\\left(\\bigcup_{k=1}^{n-1}\\bigcup_{\\|\\mathbf{A}\\|_1 =k}\\left[{\\sf d_H}(\\mathbf{A})\\leq {\\sf d_H}(\\mathbf{0})\\right]\\right) \\nonumber\\\\\n&\\leq \\sum_{k=1}^{n-1} \\sum_{\\|\\mathbf{A}\\|_1=k}\\Pr\\left({\\sf d_H}(\\mathbf{A})\\leq {\\sf d_H}(\\mathbf{0})\\right) \\nonumber\\\\\n&\\overset{(a)}{=} 2\\cdot \\sum_{k=1}^{n\/2} \\sum_{\\|\\mathbf{A}\\|_1=k}\\Pr\\left({\\sf d_H}(\\mathbf{A})\\leq {\\sf d_H}(\\mathbf{0})\\right) \\nonumber\\\\\n&\\overset{(b)}{=}2\\cdot\\sum^{n\/2}_{k=1}\\binom{n}{k}\\Pr\\left({\\sf d_H}\\left(\\sum_{i=1}^k\\mathbf{e}_i\\right)\\leq {\\sf d_H}(\\mathbf{0}) \\right), \\label{eq:3}\n\\end{align}\nwhere ($a$) follows form the fact that $\\Pr\\left({\\sf d_H}(\\mathbf{A})\\leq {\\sf d_H}(\\mathbf{0})\\right) = \\Pr\\left({\\sf d_H}(\\mathbf{A}\\oplus \\mathbf{1})\\leq {\\sf d_H}(\\mathbf{0})\\right) $; ($b$) follows due to symmetry.\nTo compare ${\\sf d_H}\\left(\\sum_{i=1}^k\\mathbf{e}_i\\right)$ and ${\\sf d_H}(\\mathbf{0})$, we define \\begin{align*}\n\\mathcal{F}_{k}:= \\left\\{ E\\in \\binom{[n]}{d} ~:~f_E(\\mathbf{0})\\neq f_E\\left(\\sum_{i=1}^k\\mathbf{e}_i\\right) \\right\\}\n\\end{align*} and $\\mathcal{E}_{k}: = \\mathcal{E} \\cap \\mathcal{F}_{k}$.\nAs in \\eqref{exp1}, we obtain\n\\begin{align*}\n\\Pr\\left( {\\sf d_H}\\left(\\sum_{i=1}^k\\mathbf{e}_i\\right) \\leq {\\sf d_H}(\\mathbf{0}) \\right)\n&\\leq (1-(1-e^{-{\\sf D_{KL}}(0.5\\| \\theta )})p)^{|\\mathcal{F}_{k}|}\\\\\n&=(1-p')^{|\\mathcal{F}_{k}|}\t\\,,\n\\end{align*} \nyielding\n\\begin{align}\n\\frac{1}{2}\\cdot \\eqref{eq:3} \\leq \\sum_{k=1}^{n\/2} \\binom{n}{k}(1-p')^{|\\mathcal{F}_{k}|} \\label{ub2}.\n\\end{align} \nWe again count $|\\mathcal{F}_{k}|$ in an effort to obtain a tight upper bound on \\eqref{ub2}. Notice that $E\\in\\mathcal{F}_k$ if $|E\\cap [k]|$ is odd, and hence\n\\begin{align}\n|\\mathcal{F}_k|=\\sum_{\\substack{i \\leq d \\\\ i\\text{ is odd}}}\\binom{k}{i}\\cdot\\binom{n-k}{d-i}\\,. \\label{counting}\n\\end{align} \nLet $\\delta >0$ be a small constant that will be determined later. For the case $k\\geq \\delta n$, it follows that \n\\begin{align*}\n&|\\mathcal{F}_{k}| \\geq \\binom{k}{1} \\binom{n-k}{d-1}\\geq \\delta n \\binom{n\/2}{d-1} = \\Omega(n^d)\\,. \n\\end{align*}\nThen it is easy to show \\eqref{ub2}$\\to 0$ for this case:\n\\begin{align*}\n& \\sum_{k=\\delta n}^{n\/2} \\binom{n}{k}(1-p')^{|\\mathcal{F}_{k}|} \\leq \\sum_{k=\\delta n}^{n\/2} \\binom{n}{k}e^{-p'\\Omega(n^d)}\\\\\n&\\overset{(a)}{=}e ^{-\\Omega(n\\log n )}\\sum_{k=\\delta n}^{n\/2} \\binom{n}{k} \\leq e ^{-\\Omega(n\\log n )} 2^{n} \t\\to 0\\,,\n\\end{align*}\nwhere ($a$) follows from the fact that $p'\\Omega(n^d)\\asymp p\\binom{n}{d} =\\Omega(n\\log n)$.\nFor the case $k<\\delta n$, we see that \n\\begin{align}\n&|\\mathcal{F}_{k}| \\geq \\binom{k}{1} \\binom{n-k}{d-1}\\geq k \\binom{(1-\\delta)n}{d-1} \\nonumber \\\\\n& \\underset{n\\to \\infty}{\\overset{(a)}{=}} (1+o(1))k (1-\\delta)^{d-1}\\binom{n-1}{d-1}\\,, \\label{lb1}\n\\end{align}\nwhere ($a$) follows since\n\\begin{align}\n\\lim_{n\\to \\infty} \\frac{\\alpha^{d-1} \\binom{n-1}{d-1}}{\\binom{\\alpha n}{d-1}}=1\n\\end{align} holds for a fixed $d$ and $\\alpha\\in(0,1)$. Hence, we get \n\\begin{align}\n& \\sum_{k=1}^{\\delta n} \\binom{n}{k}(1-p')^{|\\mathcal{F}_{k}|} \\leq \\sum_{k=1}^{\\delta n} n^k e^{-(1+o(1))p'k (1-\\delta)^{d-1} \\binom{n}{d-1}} \\nonumber\\\\\n&= \\sum_{k=1}^{\\delta n} e^{k\\cdot \\left\\{\\log n -(1+o(1))p'(1-\\delta)^{d-1} \\binom{n}{d-1} \\right\\}}\\,. \\label{ub4}\n\\end{align}\nBy choosing $\\delta$ arbitrarily small, under the claimed condition, one can make\n\\begin{align*}\n&p'(1-\\delta)^{d-1} \\binom{n}{d-1} = (1+o(1)) (1-\\delta)^{d-1} \\binom{n}{d}p' \\frac{d}{n} \\\\\n&\\geq (1+\\epsilon\/2) \\log n\\,,\n\\end{align*}\nwhich implies that \\eqref{ub4} converges to $0$ as $n$ tends to infinity.\n\\subsection{Converse proof} As the parity measurement is symmetric,\n\\begin{align*}\n\\inf_{\\psi}P_e(\\psi) \n&=\\Pr\\left(\\psi_{\\text{ML}}(\\mathbf{Y}) \\notin \\{\\mathbf{X},~ \\mathbf{X}\\oplus \\mathbf{1}\\}~|~ \\mathbf{X} = \\mathbf{0}\\right)\\,.\n\\end{align*}\nAs before, we define the success event as: \n\\begin{align}\nS :=\\bigcap_{\\mathbf{V}\\neq \\mathbf{0}, \\mathbf{1} } \\left[{\\sf d_H}(\\mathbf{V})> {\\sf d_H}(\\mathbf{0})\\right]\\,. \\label{def:s}\n\\end{align}\nAgain, it suffices to show that $\\Pr(S)\\to 0$, and to this end, we construct a subset of nodes such that any two nodes in the subset do not share the same hyperedge. Unlike the previous case, the subset is now defined as:\n\\begin{align}\n\\mathcal{R}_{\\text{big}}:=\\left\\{1,2,\\cdots,r \\right\\} \\label{def:rbig}\n\\end{align}\nwhere $r=\\lceil \\frac{n}{\\log^7 n} \\rceil$, and we erase every node in $\\mathcal{R}_{\\text{big}}$ which shares hyperedges with other nodes in $\\mathcal{R}_{\\text{big}}$ to obtain $\\mathcal{R}_{\\text{res}}$. In view of Lemma~\\ref{lem:ind}, we have $|\\mathcal{R}_{\\text{res}}| \\geq (1-o(1))r$ almost surely; let $\\Delta$ be such event. Conditioning on $\\Delta$, we enumerate $r\/2$ many elements of $\\mathcal{R}_{\\text{res}}$ by $b_1,\\cdots, b_{r\/2}$. As there are no hyperedges that connect two nodes in $\\mathcal{R}_{\\text{res}}$, the events $\\{[{\\sf d_H}( \\mathbf{e}_{b_k}) >{\\sf d_H}(\\mathbf{0})]\\}_{1\\leq k \\leq r\/2 }$ are mutually independent conditioned on $\\Delta$.\nHence, we get:\n\\begin{align}\n\\Pr(S) &\\lesssim \\Pr\\left (S ~|~ \\Delta \\right)\\nonumber\\\\\n&\\leq \\Pr\\left ( \\bigcap_{k=1}^{r\/2} \\left[ {\\sf d_H}(\\mathbf{e}_{b_k}) >{\\sf d_H}(\\mathbf{0}) \\right] ~\\bigg|~ \\Delta \\right) \\nonumber \\\\ \n&= \\Pr\\left ( {\\sf d_H}( \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{0}) ~\\big|~ \\Delta \\right)^{r\/2}\\,. \\label{ubcon} \n\\end{align}\nLet $p' = (1-e^{-{\\sf D_{KL}}(0.5\\| \\theta )})p$ as before. \nUsing similar arguments used in the previous section, we have\n\t\\begin{align}\n\t\\Pr\\left ( {\\sf d_H}( \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{0}) ~\\big|~ \\Delta \\right)\\geq (1-o(1))e^{-p'\\binom{n-1}{d-1}}\\,. \\label{keylb}\n\t\\end{align}\nThis gives:\n\\begin{align*}\n& \\Pr\\left ( {\\sf d_H}( \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{0}) ~\\big|~ \\Delta \\right)^{r\/2}\\\\\n&\\leq \\left(1-(1-o(1))e^{-p' \\binom{n-1}{d-1}}\\right)^{r\/2}\\\\\n&\\leq \\exp\\left(-(1-o(1))\\frac{r}{2} \\exp\\left\\{-p' \\binom{n-1}{d-1} \\right\\} \\right)\\\\\n&\\leq \\exp\\left(-(1-o(1))\\frac{n}{2\\log ^7 n} \\exp\\left\\{-(1+o(1))\\cdot \\frac{p' \\binom{n}{d}d}{n} \\right\\} \\right)\\,.\n\\end{align*} \nNotice that the last term converges to $0$ as $\\binom{n}{d}p'\\leq (1-\\epsilon)\\frac{n\\log n}{d}$, which completes the proof.\n\n\n\n\n\n\n\n\n\n\n\n\\section{Proof of Theorem~\\ref{thm:main3}}\n\\label{pf:thm3}\n\n\nWhen $d$ scales with $n$, a technical challenge arises, and we will focus on such technical difficulties, skipping most of the redundant parts.\n\\subsection{Proof of the upper bound}\nFrom \\eqref{ub2} and \\eqref{counting}, we get \n\\begin{align}\nP_e(\\psi_{\\text{ML}}) \\leq \\sum_{k=1} ^{n\/2} \\binom{n}{k}(1-p')^{N_k}\\,, \\label{exp:key}\n\\end{align}\nwhere \\begin{align}\n\tN_k:= \\sum_{\\substack{1 \\leq i \\leq d \\\\ i\\text{ is odd}}}\\binom{k}{i}\\cdot\\binom{n-k}{d-i} \\label{exp:nk}\n\t\\end{align}\n\t and $p':= (\\sqrt{1-\\theta } -\\sqrt{\\theta})^2 p$.\nLet us focus on counting $N_k$. When $d\\asymp 1$, $\\binom{n}{d} \\approx \\frac{n^d}{d!}$ suffices to obtain a proper bound on $N_k$.\nHowever, in the general case where $d$ scales with $n$, one needs a more delicate bounding technique to obtain sharp results. \nThe following lemma presents our new bound. \n\\begin{lemma} ~\\label{lemma:general}\n\tLet $\\beta := \\lceil \\frac{n-d+1}{2d+1} \\rceil < n\/2$ and $\\alpha:=\\frac{n-d+1}{d}$.\n\tThen \n\t\\begin{align*}\n\t\\sum_{\\substack{1 \\leq i \\leq d \\\\ i \\text{ is odd}}} \\binom{k}{i}\\binom{n-k}{d-i}&\\geq \n\t\\begin{cases}\n\t\\frac{2k}{5\\alpha}\\binom{n}{d}, & \\hbox{$k < \\beta$;} \\\\\n\t\\frac{1}{5}\\binom{n}{d}, & \\hbox{$\\beta \\leq k \\leq n\/2$\\,.} \n\t\\end{cases}\n\t\\end{align*}\n\\end{lemma}\n\\begin{IEEEproof}\n\tSee Sec.~\\ref{pf:tech}. The proof requires an involved combinatorial counting, which is one of our main technical contributions.\n\\end{IEEEproof}\n\n\nEmploying Lemma~\\ref{lemma:general}, we get:\n\\begin{align}\n\\eqref{exp:key} \\leq& \\sum_{k=1}^{\\beta-1} \\binom{n}{k} (1-p')^{N_k} \\nonumber + \\sum_{k=\\beta}^{n\/2} \\binom{n}{k} (1-p')^{N_k} \\nonumber\\\\\n\\leq & \\sum_{k=1}^{\\beta-1} \\binom{n}{k} (1-p')^{\\frac{2k}{5\\alpha}\\binom{n}{d}}+\\sum_{k=\\beta}^{n\/2} \\binom{n}{k} (1-p')^{\\frac{1}{5}\\binom{n}{d}} \\nonumber\\\\\n\\leq & \\sum_{k=1}^{\\beta-1} n^k e^{-p' \\frac{2k}{5\\alpha}\\binom{n}{d}}+ 2^n e^{-\\frac{1}{5}p'\\binom{n}{d}} \\nonumber\\\\\n\\leq & \\sum_{k=1}^{\\beta-1} \\exp\\left \\{k\\left(\\log n- \\frac{2p'\\binom{n}{d}}{5\\alpha}\\right)\\right \\} \\label{one}\n\\\\ &+\\exp \\left \\{n\\log 2 -\\frac{1}{5}p'\\binom{n}{d} \\right \\}.\\label{two} \n\\end{align}\nNote that \\eqref{two} vanishes due to \\eqref{ubb2}.\nIn order to show that \\eqref{one} vanishes as well, we consider two cases: $d=o(n)$ and $d\\asymp n$.\nWhen $d=o(n)$,\n\\begin{align*}\n&\\sum_{k=1}^{\\beta-1} \\exp\\left \\{k\\left(\\log n- \\frac{2p'\\binom{n}{d}}{5\\alpha}\\right)\\right \\}\t\\\\\n\\leq &\\sum_{k=1}^{\\beta-1} \\exp\\left \\{k\\left(\\log n- \\frac{2dp'\\binom{n}{d}}{5n}\\right)\\right \\} \\\\\n\\leq & \\frac{\\exp{\\left(\\log n - \\frac{2dp'\\binom{n}{d}}{5n}\\right)}}{1 - \\exp{\\left(\\log n - \\frac{2dp'\\binom{n}{d}}{5n}\\right)}} \\rightarrow 0,\n\\end{align*}\nsince $\\log n - \\frac{2dp'\\binom{n}{d}}{5n} \\rightarrow -\\infty$.\n\nIf $d\\asymp n$, \n\t$$\\sum_{k=1}^{\\beta-1} \\exp\\left \\{k\\left(\\log n- \\frac{2p'\\binom{n}{d}}{5\\alpha}\\right)\\right \\} \\leq \\beta \\max_{1\\leq k \\leq \\beta-1}{\\exp\\left \\{k\\left(\\log n- \\frac{2p'\\binom{n}{d}}{5\\alpha}\\right)\\right \\} } = \\beta \\exp\\left(\\log n- \\frac{2p'\\binom{n}{d}}{5\\alpha}\\right),$$\n\twhere the last equality holds since $\\log n - \\frac{2p'\\binom{n}{d}}{5\\alpha} < 0$, and hence $k=1$ achieves the maximum value. \n\tNote that this vanishes since $\\beta$ is asymptotically bounded by a constant.\nTherefore, \\eqref{one} always vanishes, completing the proof.\n\n\n\n\n\\subsection{Proof of the lower bound}\n\nThe lower bound statement can be rewritten as follows: $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ if $\\binom{n}{d} p \\leq \\max\\left( (1-\\epsilon) \\frac{1}{d} \\frac{n\\log n }{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}, \\frac{n}{1-H(\\theta)} \\right)$.\n\tNote that when $d = \\omega(\\log n)$, the condition reduces to $\\binom{n}{d} p \\leq \\frac{n}{1-H(\\theta)}$.\n\tHence, it is sufficient to show the following two statements.\n\t\\begin{itemize}\n\t\t\\item If $d = O(\\log n)$: $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ if $\\binom{n}{d} p \\leq \\max\\left( (1-\\epsilon) \\frac{1}{d} \\frac{n\\log n }{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}, \\frac{n}{1-H(\\theta)} \\right)$.\n\t\t\\item If $d = \\omega(\\log n)$: $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ if $\\binom{n}{d} p \\leq \\frac{n}{1-H(\\theta)}$.\n\t\\end{itemize}\n\t\n\tWe first show that $\\binom{n}{d} p \\leq \\frac{n}{1-H(\\theta)}$ implies $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ for all $d$.\n\tBy rearranging terms, we have $\\binom{n}{d} p \\leq \\frac{n}{1-H(\\theta)} \\Leftrightarrow \\frac{n}{\\binom{n}{d} p} \\geq 1-H(\\theta)$. \n\tOne can immediately observe that this implies $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ since $\\frac{n}{\\binom{n}{d} p}$ (which can be viewed as the rate of a code) cannot exceed the Shannon capacity of the channel $1 - H(\\theta)$.\n\t\n\tWe now prove that $\\binom{n}{d} p \\leq (1-\\epsilon) \\frac{1}{d} \\frac{n\\log n }{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2}$ implies $\\inf_{\\psi}P_e (\\psi) \\not\\rightarrow 0$ if $d = O(\\log n)$.\n\tFurther, we will focus on the case of $\\binom{n}{d}p \\asymp \\frac{n\\log n}{d}$ since this is the regime where the largest amount of information is available.\nAgain, it is enough to show that $\\Pr(S)\\to 0$, where $S$ is defined as \\eqref{def:s}. By defining $\\mathcal{R}_{\\text{big}}, \\mathcal{R}_{\\text{res}},\\Delta$ and $b_1,\\cdots, b_{r\/2}$ as before, we again obtain~\\eqref{ubcon}: \n\\begin{align}\n\\Pr(S)\\leq \\Pr\\left ( {\\sf d_H}( \\mathbf{e}_{b_1}) >{\\sf d_H}(\\mathbf{0}) ~\\big|~ \\Delta \\right)^{r\/2}\\,.\n\\end{align}\n\n\nWe finish the proof by showing the following for the considered case:\n\\begin{align}\n\\Pr\\left ( {\\sf d_H}( \\mathbf{e}_{b_1}) \\leq {\\sf d_H}(\\mathbf{0}) ~\\big|~ \\Delta \\right)\\geq (1-o(1))e^{-2p'\\binom{n-1}{d-1}}\\,. \\nonumber\n\\end{align}\nWhile following the proof of \\eqref{tight}, the key technical difficulty arises when checking $q=\\Omega(\\log n)$ (see \\eqref{div}): a simple calculation yields $|\\mathcal{F}_{b_1}|=\\binom{n-1}{d-1}$ and $|\\mathcal{G}_{b_1}|=\\binom{n-|\\mathcal{R}_{\\text{big}}|}{d-1}$, but here it is not clear whether $\\binom{n-|\\mathcal{R}_{\\text{big}}|}{d-1}\\asymp \\binom{n-1}{d-1}$ when $d$ is not a constant.\n We resolve this using a careful estimation as follows.\n\tAs $|\\mathcal{R}_{\\text{big}}|=\\Theta(\\frac{n}{\\log^7 n})$ and $d=O(\\log n)$, it is straightforward to verify\n\\begin{align*}\n 1-\\frac{1}{\\log^2 n}\\leq \\frac{n-|\\mathcal{R}_{\\text{big}}|-j}{n-1-j}\n\\end{align*}\nfor $0\\leq j \\leq d-2$. \nThis simple yet crucial inequality concludes: \n\\begin{align*}\n&\\frac{\\binom{n-|\\mathcal{R}_{\\text{big}}|}{d-1}}{\\binom{n-1}{d-1}} = \\prod_{j=0}^{d-2}\\frac{n-|\\mathcal{R}_{\\text{big}}|-j}{n-1-j}\\\\\n&\\geq \\left(1-\\frac{1}{\\log^2 n}\\right)^{d-1}\\approx \\exp\\left\\{-\\frac{d-1}{\\log^2 n}\\right\\} \\to 1.\n\\end{align*}\n \n\n\\subsection{Proof of Lemma~\\ref{lemma:general}}\n\\label{pf:tech}\nWithout loss of generality, we prove the lemma assuming that $k \\geq d$. \nThe proof for the other cases is similar. \n\nWe wish to obtain lower bounds on\n\\begin{align}\nN_k=\\sum_{\\substack{1 \\leq i \\leq d \\\\ i\\text{ is odd}}}\\binom{k}{i}\\binom{n-k}{d-i} = \\underbrace{\\binom{k}{1}\\binom{n-k}{d-1}}_{\\text{boundary odd term}}+ \\underbrace{\\sum_{i=1,3,\\cdots,d-3,d-1} \\binom{k}{i}\\binom{n-k}{d-i}}_{\\text{intermediate odd terms}} + \\underbrace{\\binom{k}{d-1}\\binom{n-k}{1}}_{\\text{boundary odd term}} \\label{odd1}\n\\end{align}\nin terms of $\\binom{n}{d}$.\nFirst, observe that\n\\begin{align}\n\\binom{n}{d} =\\sum_{0\\leq i\\leq d} \\binom{k}{i}\\binom{n-k}{d-i}=\\underbrace{\\binom{k}{0}\\binom{n-k}{d}}_{\\text{boundary term}}+ \\underbrace{\\sum_{i=1,2,\\cdots,d-2,d-1} \\binom{k}{i}\\binom{n-k}{d-i}}_{\\text{intermediate terms}} + \\underbrace{\\binom{k}{d}\\binom{n-k}{0}}_{\\text{boundary term}}. \\label{intact}\n\\end{align}\nSuppose we have the following bounds:\n\\begin{align}\n\\underbrace{\\binom{k}{0}\\binom{n-k}{d} + \\binom{k}{d}\\binom{n-k}{0}}_{\\text{sum of boundary terms}}&\\leq A_1\\underbrace{\\left[ \\binom{k}{1}\\binom{n-k}{d-1} + \\binom{k}{d-1}\\binom{n-k}{1} \\right]}_{\\text{sum of boundary odd terms}}; \\label{bd:bdy}\\\\\n\\underbrace{\\sum_{i=1,2,\\cdots,d-2,d-1} \\binom{k}{i}\\binom{n-k}{d-i}}_\\text{intermediate terms} &\\leq A_2 \\underbrace{\\cdot \\sum_{i=1,3,\\cdots,d-3,d-1} \\binom{k}{i}\\binom{n-k}{d-i}}_\\text{intermediate odd terms} + A_3N_k\\,, \\label{bd:int}\n\\end{align}\nfor some quantities $A_1,A_2, A_3>0$.\nThen, by summing up the two inequalities, one can obtain a lower bound on $N_k$: \n\\begin{align}\\label{eq:alltogether}\n\\binom{n}{d} \\leq \\left(\\max(A_1,A_2) + A_3\\right) N_k\\,.\n\\end{align}\nThus, the proof is completed as long as one can find the quantities $A_1, A_2$ and $A_3$ that satisfy \\eqref{bd:bdy} and \\eqref{bd:int}.\n\nWe begin with \\eqref{bd:int}.\nThe following lemma asserts that $A_2 = 2$ and $A_3 = 3$ satisfy \\eqref{bd:int}.\n\\begin{lemma}\\label{lem:body} For $1 \\leq k \\leq n\/2$, \n\t$$\\sum_{i=1,2,\\cdots,d-2,d-1} \\binom{k}{i}\\binom{n-k}{d-i} \\leq 2 \\cdot \\sum_{i=1,3,\\cdots,d-3,d-1} \\binom{k}{i}\\binom{n-k}{d-i} + 3N_k.$$\n\\end{lemma}\n\\begin{IEEEproof}\n\tSee Sec.~\\ref{pf:body}.\n\\end{IEEEproof}\n\n\nFor \\eqref{bd:int}, the following lemma characterizes $A_1$. \n\\begin{lemma}\\label{lem:tail1}\n\tLet $\\beta := \\left\\lceil \\frac{n-d+1}{2d+1} \\right\\rceil$.\n\tFor $\\beta \\leq k \\leq n\/2$, \n\t\\begin{align}\n\t\\binom{k}{0}\\binom{n-k}{d} + \\binom{k}{d}\\binom{n-k}{0} \\leq 2\\left[ \\binom{k}{1}\\binom{n-k}{d-1} + \\binom{k}{d-1}\\binom{n-k}{1} \\right].\n\t\\end{align}\n\tFor $k< \\beta$, \n\t\\begin{align}\n\t\\binom{k}{0}\\binom{n-k}{d} + \\binom{k}{d}\\binom{n-k}{0} \\leq \\frac{\\alpha}{k}\\left[ \\binom{k}{1}\\binom{n-k}{d-1} + \\binom{k}{d-1}\\binom{n-k}{1} \\right]\n\t\\end{align}\n\tand \n\t\\begin{align}\n\t\\frac{\\alpha}{k}\\geq 2\\,,\n\t\\end{align}where $\\alpha = \\frac{n-d+1}{d}$.\n\\end{lemma}\n\\begin{IEEEproof}\n\tSee Sec.~\\ref{pf:tail1}.\n\\end{IEEEproof}\nThat is, $A_1 = 2$ if $\\beta \\leq k \\leq n\/2$, and $A_1 = \\frac{\\alpha}{k}$ if $k < \\beta$.\n\n\n\nWe now are ready to prove Lemma~\\ref{lemma:general} with the help of Lemma~\\ref{lem:body}, Lemma,~\\ref{lem:tail1} and \\eqref{eq:alltogether}.\nWhen $\\beta \\leq k0$), update $\\mathbf{X}^{(t)}= \\{X^{(t)}_i\\}_{1\\leq i \\leq n} $ as per\n\t\t\\begin{align*}\n\t\t\t&X^{(t+1)}_i = \\begin{cases} X^{(t)}_i &\\text{if}~{\\sf d_H}(\\mathbf{X}^{(t)}) <{\\sf d_H}(\\mathbf{X}^{(t)}\\oplus \\mathbf{e}_i);\\\\ X^{(t)}_i \\oplus 1 &\\text{if}~{\\sf d_H}(\\mathbf{X}^{(t)}) \\geq {\\sf d_H}(\\mathbf{X}^{(t)}\\oplus \\mathbf{e}_i), \\end{cases}\t\t\\end{align*}\n\t\tfor $i=1,2,\\cdots, n$, where ${\\sf d_H}(\\cdot)$ is defined in \\eqref{defs}.\n\t\t\\State Output $\\mathbf{X}^{(T)}= \\{X^{(T)}_i\\}_{1\\leq i \\leq n}$.\n\t\\end{algorithmic}\n\\end{algorithm}\n\n\n\\subsubsection{Performance of Algorithm~\\ref{alg}}\nWe demonstrate the performance of Algorithm~\\ref{alg} by running Monte Carlo simulations. \n\\begin{figure}\n\t\\centering\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\\includegraphics[width=\\textwidth]{figs\/fig3a.eps}\n\t\t\\caption{\\footnotesize{Varying $\\theta$}}\n\t\t\\label{fig:3-a}\n\t\\end{subfigure}\t\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\\includegraphics[width=\\textwidth]{figs\/fig3b.eps}\n\t\t\\caption{\\footnotesize{Varying $d$}}\n\t\t\\label{fig:3-b}\n\t\\end{subfigure}\t\n\t\\caption{\\footnotesize{\\textbf {Algorithm~\\ref{alg} achieves the optimal sample complexity.} We run Monte Carlo simulations to estimate the probability of success when: (a) $n=1000$, $d=4$, and for various choices of $\\theta$; (b) $n=1000$, $\\theta=0.05$, and for various choices of $d$. For each curve, we normalize the number of samples by the respective information theoretic limits, characterized in Theorem~\\ref{thm:main1}. Observe that the probability of success quickly approaches $1$ as the normalized sample complexity crosses $1$.}}\n\t\\label{fig:3}\t\n\\end{figure}\nEach point plotted in Fig.~\\ref{fig:3-a} and Fig.~\\ref{fig:3-b} indicates an empirical success rate. \nWe take $100$ Monte Carlo trials. \nFig.~\\ref{fig:3-a} shows the probability of success when $n=1000$, $d=4$, and for various choices of $\\theta$.\nShown in Fig.~\\ref{fig:3-b} is the performance of our algorithm with $n=1000$, $\\theta=0.05$, and for various choices of $d$.\nFor both figures, the $x$-axis denotes the number of samples normalized by the respective information-theoretic limits, characterized in Theorem~\\ref{thm:main1}. \nOne can observe that the success probability due to Algorithm~\\ref{alg} quickly approaches $1$ as the normalized sample complexity crosses $1$, which corroborates our theoretical findings.\n\n\n\n\\begin{figure}\n\t\\centering\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\t\\includegraphics[width=\\textwidth]{figs\/fig4a.eps}\n\t\t\\caption{\\footnotesize{Estimated empirical noise rate $\\hat{\\theta}$}}\n\t\t\\label{fig:4-a}\n\t\\end{subfigure}\t\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\\includegraphics[width=\\textwidth]{figs\/fig4b.eps}\n\t\t\\caption{\\footnotesize{$d^*$}}\n\t\t\\label{fig:4-b}\n\t\\end{subfigure}\t\n\t\n\t\\caption{\\footnotesize{\\textbf{Existence of $d^*$ in motion segmentation.} (a) We estimate the empirical noise rate $\\hat{\\theta}$ as a function of $d$ in motion segmentation. (b) We plug $\\hat{\\theta}$ to the limit characterized in Theorem~\\ref{thm:main1} and verify that $d^*=6$.}}\n\t\\label{fig:4}\t\n\\end{figure}\n\\begin{figure}\n\t\\centering\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\\includegraphics[width=\\textwidth]{figs\/fig5a.eps}\n\t\t\\caption{\\footnotesize{Randomly generated data set}}\n\t\t\\label{fig:5-a}\n\t\\end{subfigure}\t\n\t\\begin{subfigure}[b]{0.4\\columnwidth}\n\t\t\\includegraphics[width=\\textwidth]{figs\/fig5b.eps}\n\t\t\\caption{\\footnotesize{Varying $d$}}\n\t\t\\label{fig:5-b}\n\t\\end{subfigure}\t\n\t\n\t\\caption{\\footnotesize{\\textbf{Optimal choice of $d$ when $\\theta$ decays with $d$.} We run Monte Carlo simulations to estimate the probability of success with the data set shown in (a). We observe that the effective noise rate decreases as $d$ increases. For varying $d$ from $3$ to $6$, the success probability of Algorithm~\\ref{alg} is shown in (b): the best performance of the algorithm is observed when $d=4$.}}\n\t\\label{fig:5}\t\n\\end{figure}\n\n\\subsubsection{Optimal $d$ for subspace clustering}\nWe observe how the fundamental limit varies as a function of $d$. \nAs we briefly discussed in Sec.~\\ref{sec:MainResults}, if the noise rate $\\theta$ is irrelevant to $d$, the optimal choice of $d$ would be the minimum possible value of $d$.\nHowever, if the noise quality $\\theta$ depends on $d$, there may be a sweet spot for $d$.\n\nWe demonstrate the existence of a sweet spot in one of subspace clustering applications: motion segmentation. We use the benchmark Hopkins 155~\\cite{tron2007benchmark} dataset to compute an empirical noise rate ${\\theta}$ as a function $d$ as follows. \nFor each sampled hyperedge $E=\\{i_1,\\cdots, i_d\\}$, we adopt the method proposed in~\\cite{chen2009spectral} to evaluate similarity between the corresponding $d$ data points that we denote by $D$. Then, we set $Y_E = 1$ if and only if $D$ is less than a fixed threshold, which is appropriately chosen so that $\\Pr(Y_E=0 ~ |~ i_1,i_2,\\cdots, i_d \\text{ are from the same line})\\approx \\Pr(Y_E=1 ~|~ i_1,i_2,\\cdots, i_d \\text{ are not from the same line}).$\nWe estimate the effective noise rate $\\hat{\\theta} := \\Pr(Y_E=0 ~ |~ i_1,i_2,\\cdots, i_d \\text{ are from the same line})$ for various $d$, and observe that $\\hat{\\theta}$ quickly decreases as $d$ increases; see Fig.~\\ref{fig:4-a}.\nWe then plug these $\\hat{\\theta}$'s to the limit characterized in Theorem~\\ref{thm:main1}; see Fig.~\\ref{fig:4-b}. Note that $d=5$ is not the optimal choice, but $d=6$ is the sweet spot.\n\nWe also corroborate the existence of a sweet spot in a synthetic data set for subspace clustering, shown in Fig.~\\ref{fig:5-a}. Here the goal is to cluster $n~(=200)$ $2$-dimensional data points approximately lying on a union of two lines ($1$-dimensional subspaces).\nWe compute $Y_E$ as above and evaluate the performance of Algorithm~\\ref{alg}, shown in Fig.~\\ref{fig:5-b}.\nAs a result, we observe that the optimal choice of $d$ here is $4$ rather than $3$. \n\n\\subsection{The parity measurement case}\\label{sim:parity}\n\\subsubsection{Efficient algorithms} \\label{eff:parity}\nFor the parity measurement~case, there are two efficient algorithms in the literature~\\cite{watanabe2013message,jain2014provable}. In~\\cite{watanabe2013message}, it is shown that for $d=3$, a variant of message passing algorithm successfully recovers the ground-truth vector provided that $\\binom{n}{3}p =\\Omega(n^2 \/\\log n)$.\nAnother efficient algorithm is based on a low-rank tensor factorization algorithm proposed in~\\cite{jain2014provable}, and it is proved that reliable community recovery is feasible if $\\binom{n}{3}p =\\Omega(n^{1.5}\\log^4 n)$. \nIn either of the two cases, the sufficient condition comes with a polynomial term ($n$ or $n^{1\/2}$) to the fundamental limit characterized in Theorem~\\ref{thm:main1}.\nIn fact, it is conjectured in~\\cite{florescu2015spectral} (see Conjecture 1 therein) that at least $n^{1.5}$ many samples are required for exact recovery. \n\n\nOn the other hand, focusing on the $\\theta =0$ case, recovering the ground-truth vector from the measurement vector $\\mathbf{Y}$ is essentially the same as solving linear equations over the Galois field of two elements $\\mathbb{F}_2$.\nHence it immediately follows that efficient algorithms for solving linear equations such as Gaussian elimination can be employed in the noiseless case.\n\n\\begin{figure}\n\t\\centering\n\t\\includegraphics[width=.45\\textwidth]{figs\/fig6.eps}\n\t\\caption{\\footnotesize{We run the Monte Carlo simulations to estimate the probability of success for $n=1000$, varying $d$, and $\\theta=0$. For each $d$, we normalize the number of samples by $\\max({n, n\\log n\/d})$. Observe that the probability of success quickly approaches $1$ as the normalized sample complexity crosses $1$.}\n\t\t\\label{fig:6}}\n\\end{figure}\n\\begin{figure}\n\t\\centering\n\t\\includegraphics[width=0.45\\textwidth]{figs\/fig7.eps}\n\t\\caption{\\footnotesize{We run the Monte Carlo simulations to estimate the probability of success for varying $n$, varying $d$, $\\theta=0$, and $p = {1.1n}\/{n \\choose d}$.\n\t\t\tNote that when $n$ increases by a multiplicative factor of $4$, the curve shifts rightward about the same amount, supporting our result in Corollary~\\ref{thm:main_dstar}}\n\t\t\\label{fig:7}}\n\\end{figure}\n\n\\subsubsection{Information-theoretic limit} \nWe first provide Monte Carlo simulation results which corroborate our theoretical findings in Theorem~\\ref{thm:main2}.\nEach point plotted in Fig.~\\ref{fig:6} and Fig.~\\ref{fig:7} is an empirical success rate. \nAll results are obtained with $50$ Monte Carlo trials. \nIn Fig.~\\ref{fig:6}, we plot the probability of successful recovery for $n=1000$, varying $d$, and $\\theta=0$. For each $d$, we normalize the number of samples by $\\max({n, n\\log n\/d})$. \nOne can observe that the probability of success quickly approaches $1$ as the normalized sample complexity crosses $1$. \n\n\\subsubsection{Minimum $d$ for linear sample complexity} Plotted in Fig.~\\ref{fig:7} are the simulation results for varying $n$, varying $d$, $\\theta=0$, and $p = {1.1n}\/{n \\choose d}$. \nWe note that when $n$ increases by a multiplicative factor of $4$, the curve shifts rightward about the same amount, supporting our result in Corollary~\\ref{thm:main_dstar}. \n\n\n\n\n\\section{Conclusion}\n\\label{sec:conclusion}\n\nIn this paper, we investigate the problem of community recovery in hypergraphs under the two generalized censored block models (GCBM), one based on the homogeneity measurement~and the other based on the parity measurement. For these two models, we fully characterize the information-theoretic limits on sample complexity as a function of the number of nodes $n$, the size of edges $d$, the noise rate $\\theta$, and the edge observation probability $p$. \nWe also corroborate our theoretical findings via experiments. \n\n\nWe conclude our paper by highlighting a few interesting open problems.\nOne interesting question is whether or not one can sharpen Theorem~\\ref{thm:main3} to characterize exact information-theoretic limits for the scaling $d$ case. \nFrom the simulation results in Sec.~\\ref{sim:parity}, we make the following conjecture: Under the setting of Theorem~\\ref{thm:main3}, the information-theoretic limits is $\\max\\left\\{ \\frac{n}{1-H(\\theta)},~ \\frac{1}{d} \\frac{n\\log n}{(\\sqrt{1-\\theta}-\\sqrt{\\theta})^2} \\right\\}$.\nAnother interesting open problem is about the computational gap for the parity measurement~case: Investigating efficient algorithms for this case would shed some light on the study of information-computation gaps.\n\n\n\n\n\n\n\n\n\\bibliographystyle{IEEEtran}\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{Introduction}\n\\label{sec:intro}\n\n\n\nThe axion was introduced \nto solve the strong $CP$ problem~\\cite{Peccei:1977hh,Peccei:1977ur,Weinberg:1977ma,Wilczek:1977pj}, but has since matured into a broader concept addressing many open questions in particle physics and cosmology. These axion-like particles\\footnote{In the following, we will for brevity refer to all axion-like particles simply as `axions', using the term `QCD axion' to refer to the axion addressing the strong $CP$ problem.} are pseudoscalars which couple to the Standard Model (SM) gauge fields and fermions via (classically) shift-symmetric couplings mediated by dimension five operators. For example, in the context of cosmic inflation, this shift symmetry ensures a sufficiently flat direction in field space suitable to drive the exponential expansion of the very early Universe~\\cite{Freese:1990rb}. In the context of dark matter, these small interactions with the SM ensure that an axion dark matter candidate is sufficiently long lived, while simultaneously providing an avenue for detection~\\cite{PRESKILL1983127,ABBOTT1983133,DINE1983137}. In the context of string theory, axions are ubiquitous and typically arise as a result of the compactification~\\cite{Banks:2003sx,Svrcek:2006yi,Ibanez:1986xy}.\n\n\nBeyond all this, axions provide all the ingredients necessary to generate the matter antimatter asymmetry of our Universe via spontaneous baryogenesis: a non-vanishing velocity of a classical axion field spontaneously breaks $CPT$, which, in the presence of baryon number violating interactions, can generate a baryon asymmetry~\\cite{Cohen:1987vi,Cohen:1988kt}.\nThis idea has been pursued \\textit{e.g.}, in Refs.~\\cite{Chiba:2003vp,Takahashi:2003db,Kusenko:2014uta,Ibe:2015nfa,Takahashi:2015waa,Jeong:2018jqe,Bae:2018mlv,Co:2019wyp}. There are two main points which differ among these works. Firstly, the motion of the axion may happen at any time between cosmic inflation or the electroweak phase transition, with correspondingly different physical processes responsible for triggering this motion. Secondly, different studies chose different couplings of the axion to the SM particle content, \\textit{i.e.}, different linear combinations of the possible shift-symmetric operators.\n \nIn this paper we provide a simple formalism to study this class of models in a more systematic way. Starting from an axion $a$ coupling to an arbitrary combination of classically shift-symmetric operators (with coefficients encoded in the source charge vector $n_S$) we compute the final baryon asymmetry taking into account all the SM equilibration processes. \nA non-vanishing velocity of the axion biases the SM processes by acting as an effective chemical potential, thus modifying the equilibrium state of the system. As long as the baryon violating processes are involved in attaining this new equilibrium, the baryon asymmetry becomes non-zero and\nits final value is conserved when the baryon violating processes freeze-out (see Fig.~\\ref{fig:schematic} as an illustration).\nTherefore this mechanism generically leads to a generation of a baryon asymmetry even if there is no direct coupling between the axion and any baryon or lepton number violating operator.\\footnote{\nA similar idea was discussed in Refs.~\\cite{Chiba:2003vp, Takahashi:2003db}, \nwhere a baryon (and\/or) lepton asymmetry is generated from a scalar field that is not coupled to the baryon nor lepton current. \nThey consider the case of\nan operator $O_V$ that violates both a global Peccei-Quinn symmetry U(1)$_{\\rm PQ}$\nand the baryon (and\/or lepton) symmetry U(1)$_B$,\n\\textit{i.e.}, $\\partial_\\mu J_\\text{PQ}^\\mu = \\Delta_\\text{PQ} O_V$ and $\\partial_\\mu J_{B}^\\mu = \\Delta_{B} O_V$\nwith $\\Delta_{\\rm PQ}$ and $\\Delta_B$ characterizing the amounts of violation of each symmetry.\nAn axion coupling of $a \\partial_\\mu J_\\text{PQ}^\\mu$ can generate the baryon (and\/or lepton) asymmetry because one can rewrite $a \\partial_\\mu J_\\text{PQ}^\\mu$ as $a \\partial_\\mu J_B^\\mu$ by performing a field rotation associated with $Q_\\text{PQ} - (\\Delta_\\text{PQ}\/\\Delta_B) Q_B$.\nIn this paper, we will show that adding such an operator is not necessary for baryogenesis if we introduce an additional ingredient. See Fig.~\\ref{fig:schematic}.\nThere we illustrate our idea with a toy model: $\\partial_\\mu J_B^\\mu = \\partial_\\mu (J_1^\\mu + J_2^\\mu) = O_V$ and $\\partial_\\mu J_2^\\mu = O_X$. As explained in the caption, a derivative coupling of $a \\partial_\\mu J_2^\\mu$ can generate $Q_B$ although $J_2$ is not broken by $O_V$.\nBy applying this mechanism to a more realistic case, we show, for instance, the SU$(3)$ Chern-Simons coupling $a G \\tilde G$ can source the baryon asymmetry, although it has nothing to do with baryon number violation.\n}\n\n\n\\begin{figure}[t]\n\t\\centering\n \t\\includegraphics[width=0.65\\linewidth]{.\/fig\/orthogonality.pdf}\n\t\\caption{ \n\tA schematic figure of our baryogenesis mechanism. Since the SM involves many particle species and interactions,\n\there we consider a toy model composed of two species and two interactions as an illustration.\n\tIts current equations are $\\partial_\\mu J_1^\\mu = - O_X + O_V$ and $\\partial_\\mu J_2^\\mu = O_X$, and the degrees of freedom for $Q_1$ and $Q_2$ are assumed to be the same.\n\tWe would like to generate $Q_B = Q_1 + Q_2$, which is violated by $O_V$ as $\\partial_\\mu J^\\mu_B = O_V$.\n\tConventional spontaneous baryogenesis introduces a direct coupling of a scalar field $a$ to the $Q_B$-violating operator as $a O_V$ or equivalently $a \\partial_\\mu J_B^\\mu$.\n\tHowever, a coupling of $a O_X$ (or equivalently $a \\partial_\\mu J_2^\\mu$) which is not directly related to the $J_B$-current is enough for baryogenesis.\n\tA non-vanishing velocity ($\\dot a \\neq 0$) biases $Q_1$ and $Q_2$ through $a O_X$ while $O_V$ tries to wash out $Q_1$. As a result, the new equilibrium solution ({\\color[rgb]{0.147398,0.511420,0.836949}eq}) is different from the thermal equilibrium ({\\color[rgb]{0.185048,0.192302,0.272102}th-eq}) and has a non-vanishing $Q_B$.\n\tAfter $O_V$ freezes-out, $Q_B$ becomes conserved, and we end up with $Q_B \\neq 0$ ({\\color[rgb]{0.942597,0.388320,0.387950}final}) when $\\dot a = 0$. \n\tThe only way to \\textit{avoid} generating $Q_B \\neq 0$ is to couple the axion as $a(c_XO_X + c_V O_V)$ with $c_X+2c_V = 0$.\n\tThen the axion velocity only biases $Q_1 - Q_2$ violated by $-2 O_X + O_V$, which is orthogonal to $Q_B$.\n\t}\n\t\\label{fig:schematic}\n\\end{figure}\n\n\n\nWe formulate this process by an algebraic matrix equation with the entries of the matrix encoding the various SM processes and the source vector $n_S$ corresponding to the axion coupling.\nThe only condition for baryogenesis is that the source charge vector $n_S$ should not be fully orthogonal to the charge vector of the baryon number violating process, \\textit{i.e.}, a baryon number violating process needs to be involved either directly in the axion coupling or in the subsequent equilibration of the asymmetry. \nOur formalism correctly accounts for two important technical points: i) the transport equation, which describes the equilibration process, is independent of the choice of field basis related by field redefinitions and ii) the charge vectors of the involved processes are a priori not linearly independent.\nIn particular, point i) implies that performing a field rotation \nmapping the axion coupling to one operator (\\textit{e.g.}, the electroweak sphaleron $a W \\tilde W$) to another (such as the lepton current $a \\partial_\\mu J_L^\\mu$) \ndoes not change the dynamics of baryogenesis. Such operations, if performed correctly, can therefore never change the condition for baryogenesis, and hence the resulting baryon asymmetry should be given in a form invariant under this transformation.\\footnote{A similar point was noted in Ref.~\\cite{Abel:2018fqg}. Our analysis extends this result to non-equilibrium situations, which in particular arise when marginally relevant processes are involved in the generation of the baryon asymmetry.}\nAlso, if marginally relevant processes are involved, we have to track the time-evolution of the baryon asymmetry in order to determine its final value, but our condition remains as a necessary condition for successful baryogenesis.\n\nAs a concrete example we apply this formalism to baryogenesis around the electroweak phase transition, invoking the original Peccei-Quinn axion and an Affleck-Dine type mechanism to trigger the axion motion (see Ref.~\\cite{Co:2019wyp}). In this case, a notable subtlety arises because the charge vectors of the up-Yukawa, the down-Yukawa and the strong sphaleron and not linearly independent. As a consequence, the generated charge asymmetries in principle backreact on the axion equation of motion,\\footnote{\n\tThe backreaction to the axion is correctly taken into account in Refs.~\\cite{McLerran:1990de,Co:2019wyp} in the case where the axion couples to the strong Chern-Simons term, $a G \\tilde G$.\n\tOur formalism generalizes this to an arbitrary transport equation with an arbitrary axion couplings.\n} though in the parameter space of interest this is not of phenomenological importance.\n\n\n\nAs a second example, we consider high-scale baryogenesis invoking the lepton-number violating Weinberg operator as well as a coupling to the lepton current or to $\\tilde W W$ during reheating (see Ref.~\\cite{Kusenko:2014uta}). Since the electroweak sphaleron comes into equilibrium only when the Weinberg operator drops out of equilibrium, the final baryon asymmetry (obtained by numerically solving the appropriate differential equation) is suppressed compared to the equilibrium solution (see also Ref.~\\cite{Daido:2015gqa}). \nWe point out that, in the presence of the lepton-number violating Weinberg operator, the couplings to the lepton current and to $\\tilde W W$ are not equivalent. This is a consequence of the invariance of the transport equation under field rotations.\n\nIn addition, by deriving a general condition for the axion coupling to trigger successful baryogenesis, we show that other couplings such as the coupling of the axion to gluons, $a \\tilde G G$, which itself preserves baryon and lepton number, can account for the present baryon asymmetry both in electroweak-scale~\\cite{Co:2019wyp} and high-scale baryogenesis.\\footnote{\n\tSoon after we uploaded our paper on the arXiv, Ref.~\\cite{Co:2020jtv} appeared, independently also pointing out that $a G \\tilde G$ can source the $B-L$ asymmetry in the presence of the Weinberg operator.\n}\n\n\nThe remainder of this paper is organized as follows. In Sec.~\\ref{sec:transport} we derive the transport equation describing the time evolution of chemical potentials in the presence of an axion coupling to a set of operators (see Appendix~\\ref{sec:derivation} for details). Without making any assumptions on the particle content and operator involved, we lay out the framework to compute the equilibrium solution and the final asymmetries. We explicitly demonstrate the invariance of the transport equation under field rotations which seemingly change the axion coupling\nand discuss backreaction of the induced chemical potentials on the axion equation of motion (see Appendix~\\ref{sec:br_pr} for details). In Sec.~\\ref{sec:SM-transport} we specify the relevant Standard Model (SM) processes as well as their equilibration temperatures, extending the discussion in Ref.~\\cite{Garbrecht:2014kda} by including the renormalization group running of the Yukawa couplings. Sections~\\ref{sec:b+l} and \\ref{sec:b-l} are dedicated to two concrete examples of baryogenesis around the electroweak phase transition and reheating, respectively. We conclude in Sec.~\\ref{sec:conc}. \n\n\n\n\\section{Transport equation and basis independence}\n\\label{sec:transport}\n\n\n\\subsection{Transport equation}\n\\label{subsec:transport}\n\nIn this section, we discuss the general structure of the transport equation without specifying a particular system. We take a rather general attitude and derive several properties that hold for any transport equation in a homogeneous and isotropic system. Starting from the current equation and symmetry properties, which follow immediately from the Lagrangian of a given system, we invoke linear response theory to obtain a simple linear algebra system describing the equilibrium solution for all chemical potentials.\nSome concrete examples will be considered in Secs.~\\ref{sec:b+l} and \\ref{sec:b-l}, with a particular focus on the resulting asymmetries in the total baryon number.\nFor the convenience of readers, we summarize our definitions of indices and symbols in Appendix.~\\ref{sec:symbols}. \n\n\n\\paragraph{Current equation.}\nOur starting point is the following operator\nequation:\n\\begin{align}\n\t\\partial_{\\mu} J^{\\mu}_{i} (x) = \\sum_{\\alpha} n^{\\alpha}_{i} O_{\\alpha} (x)\\,.\n\t\\label{eq:current-eq}\n\\end{align}\nHere $J_{i}^{\\mu}$ is the current corresponding to a particle species $i$ (with $i = 1, \\cdots, N$) and the operator $O_{\\alpha}$ encodes \\textit{e.g.}, the anomalous contribution $F \\tilde F$ or Yukawa interactions.\nFor each $O_\\alpha$, there exists a vector $n_{i}^{\\alpha}$ that specifies the charge of each species $i$ involved in the process of $O_{\\alpha}$ (see Sec.~\\ref{sec:SM-transport} for details on these operators in the SM).\nFor conserved currents, the right-hand side of Eq.~\\eqref{eq:current-eq} vanishes.\n\n\\paragraph{Transport equation.}\nWe can derive a transport equation by taking the expectation value of both sides of this equation.\nAs usual, we assume that the chemical equilibration associated with the current equations is much slower than typical scatterings.\nThis justifies the approximation of kinetic equilibrium for the system, and hence the deviation from the chemical equilibrium can be characterized by slowly varying chemical potentials $\\mu_{i}$ for each charge $J_{i}^{0}$.\nLet $q_{i}$ be a charge density of species $i$ defined by\n\\begin{align}\n\tq_{i} (t) \\equiv \\frac{1}{\\operatorname{vol} (\\mathbb{R}^{3})} \\int \\mathrm{d}^{3} x \\,\\vev{J_{i}^{0} (t, \\bm{x})} = \\vev{J_{i}^{0} (t, \\bm{0})}\\,.\n\t\\label{eq:q_i}\n\\end{align}\nThroughout this paper, we assume homogeneity and isotropy of the system.\nWe use this property in the second equality.\nThe connection to the chemical potential is given by\n\\begin{align}\n\tq_{i} (t) = g_{i} \\mu_{i} (t) \\frac{T^{2}}{6}\\,,\n\t\\label{eq:mu_i}\n\\end{align}\nwhere $T$ is the temperature of the ambient plasma and the multiplicity is $g_{i} = 1, 2$ for a chiral fermion and a complex scalar, respectively. \nWe assume $\\mu_i \\ll T$ for all $i$ throughout this paper.\nNote that one should introduce different chemical potentials for each species which are distinguishable by any of the relevant interactions.\n\n\nThe left-hand side of Eq.~\\eqref{eq:current-eq} gives\n\\begin{align}\n\t\\frac{1}{\\operatorname{vol} (\\mathbb{R}^{3})} \\int \\mathrm{d}^{3} x\\, \\partial \\cdot \\vev{J_{i} (t, \\bm{x})}\n\t= \\dot q_{i} (t)\\,.\n\\end{align}\nOne may evaluate the right-hand side {by computing the linear response of the system to a small perturbation $\\mu_{i} \/ T \\ll 1$.}\nAs can be seen from Eq.~\\eqref{eq:current-eq}, an operator $\\alpha$ involves $n^{\\alpha}_{i}$ charges for each species $i$.\nTherefore, the expectation value of $O_{\\alpha}$ is given by\n\\begin{align}\n\t\\frac{1}{\\operatorname{vol} (\\mathbb{R}^{3})} \\int \\mathrm{d}^{3} x \\, \\vev{O_{\\alpha} (t, \\bm{x})} = -\n\t\\Gamma_{\\alpha} \\sum_{j} n^{\\alpha}_{j} \\frac{\\mu_{j}}{T}\\,,\n\t\\label{eq:transport-coef}\n\\end{align}\nwhere\n\\begin{align}\n\t\\Gamma_{\\alpha} \\equiv - \\left. \\frac{T G_{\\alpha}^{\\rho} (\\omega, \\bm{0})}{2 \\omega} \\right|_{\\omega = 0} \\,, \\quad \n\tG_{\\alpha}^{\\rho} (\\omega,\\bm{p}) \\equiv \\int \\mathrm{d}^4 x\\, e^{i\\omega x^0 - i \\bm{p} \\cdot \\bm{x}} \\vev{ \\left[ O_{\\alpha} (x), O_{\\alpha} (0) \\right] }.\n\t\\label{eq:Gamma_alpha}\n\\end{align}\nat the linear response.\\footnote{\nThis $\\Gamma_\\alpha$ is the linear response coefficient of interaction processes to a chemical potential. Regarding sphaleron processes, one may alternatively define $\\Gamma$ by the diffusion constant per unit volume of Chern-Simons number. The latter one is twice larger than the former one by a fluctuation dissipation relation. The difference comes from the average between the forward and backward sphaleron rates~\\cite{McLerran:1990de}. \n}\nSee Appendix.~\\ref{sec:derivation} for the derivation and a more precise definition of correlators.\n$\\Gamma_{\\alpha}$ represents the rate per unit time-volume for $O_{\\alpha}$.\nFor later convenience, we also define the rate per unit time by\n\\begin{align}\n\t\\gamma_{\\alpha} \\equiv \\frac{\\Gamma_{\\alpha}}{T^{3}\/6}\\,.\n\t\\label{eq:gamma_alpha}\n\\end{align}\nTherefore the transport equation corresponding to the current equation \\eqref{eq:current-eq} can be expressed as\n\\begin{align}\n\t\\dot q_{i} = - \\sum_{j} \\Gamma_{ij} \\frac{\\mu_{j}}{T}\\, , \\qquad\n\t\\Gamma_{ij} \\equiv \\sum_{\\alpha} \\Gamma_{\\alpha} n_{i}^{\\alpha} n_{j}^{\\alpha}\\, .\n\t\\label{eq:transport}\n\\end{align}\n\n\\paragraph{Conserved quantities.}\nIn general, this matrix $\\Gamma_{ij}$ can have vanishing eigenvalues.\nLet $\\{n_{i}^{A}\\}$ be a set of eigenvectors with zero eigenvalues.\nThe presence of these eigenvectors indicates that, if one pumps up a chemical potential as $\\sum_{i} n^{A}_{i} J^{0}_{i}$, it does not induce any chemical reactions.\nTherefore this set corresponds to the conserved charges in this system.\nOne can see this by multiplying this vector from the left to both sides of Eq.~\\eqref{eq:transport}, leading to\n\\begin{align}\n\t0 = \\sum_{i} n^{A}_{i} \\dot q_{i} \\quad \\longrightarrow \\quad\n\tq_{A} = \\text{const.}\\,, \\quad q_{A} \\equiv \\sum_{i} n^{A}_{i} q_{i}\\, ,\n\t\\label{eq:q_A}\n\\end{align}\nwhich is equivalent to\n\\begin{align}\n\t\\sum_{i} n^{A}_{i} g_{i} \\frac{\\mu_{i}}{T} = c_{A}\\,,\n\t\\label{eq:conservation}\n\\end{align}\nwith $c_A$ being a constant.\nHere a constant $c_{A}$ sets the conserved charge $A$ of this system as\n$q_{A} = c_{A} T^{3} \/ 6$.\n\n\\paragraph{Interaction basis.}\nIn general, some charge vectors can be expressed as a linear combination of the others.\nOne may choose a complete set of vectors $n^{\\alpha}_{i}$ (associated with $O_{\\alpha}$) that are linearly independent, which we denote as $\\{ n_i^{\\hat\\alpha} \\}$.\nFor later convenience, we denote the rest of the charge vectors as $n_i^{\\alpha_\\Delta}$ which can be expressed as a linear combination of $\\{n_i^{\\hat \\alpha}\\}$.\nNow the set of $\\{ n^{\\hat\\alpha}_{i}\\}$ and $\\{n^{A}_{i} \\}$ forms a complete basis of the chemical potential space.\nNote here that the vector spaces spanned by $\\{ n_i^{\\hat \\alpha} \\}$ and $\\{ n_i^A \\}$ are orthogonal because $0 = \\sum_i n_i^{\\hat \\alpha} n_i^A$ for any $\\hat \\alpha$ and $A$.\nSince the sets of basis vectors $\\{ n_i^{\\hat \\alpha} \\}$ and $\\{ n_i^A \\}$ are not orthonormal,\nwe define dual basis vectors $\\{ \\bar{n}_i^{\\hat \\alpha} \\}$ and $\\{ \\bar{n}_i^A \\}$ respectively such that $\\sum_i \\bar{n}_i^{\\hat \\alpha} n_i^{\\hat\\beta} = \\delta_{\\hat \\alpha \\hat \\beta}$ and $\\sum_i \\bar{n}_i^A n_i^{B} = \\delta_{AB}$.\nNote that we also have $0 = \\sum_i \\bar{n}_i^{\\hat \\alpha} n_i^A = \\sum_i \\bar{n}_i^A n_i^{\\hat \\alpha} = \\sum_i \\bar{n}_i^{\\hat \\alpha} \\bar{n}_i^{A}$ because the vector spaces spanned by $\\{ n^{\\hat\\alpha}_{i}\\}$ and $\\{n^{A}_{i} \\}$ are orthogonal.\nFor notational brevity, we introduce a collective notation $\\{ n^{X}_{i} \\} \\equiv \\{ n^{\\hat\\alpha}_{i}, n^{A}_{i} \\}$ and $\\{ \\bar n^{X}_{i} \\} \\equiv \\{ \\bar n^{\\hat\\alpha}_{i}, \\bar n^{A}_{i} \\}$ with\n\\begin{align}\n\t\\sum_{i} \\bar n^{X}_{i} n^{Y}_{i} = \\delta_{XY}\\,, \\quad\n\t\\sum_{X = \\hat\\alpha, A} \\bar n^{X}_{i} n^{X}_{j} = \\delta_{ij}\\,.\n\t\\label{eq:orthogonality}\n\\end{align}\nWe denote the number of the basis vectors $\\{ n^{\\hat\\alpha}_{i} \\}$ ($\\{ n^{A}_{i} \\}$) as $N_{\\hat\\alpha} (N_{A})$.\nBy definition, we have $N = N_{\\hat\\alpha} + N_{A}$. \nFor later convenience, we further divide the basis vectors $n_i^{\\hat\\alpha}$ into $\\{ n_i^{\\hat \\alpha_\\perp} \\} \\equiv \\{ n_i^{\\hat \\alpha} | \\sum_i \\bar{n}_i^{\\hat \\alpha} n_i^{\\alpha_\\Delta} = 0~\\text{for all}~\\alpha_\\Delta\\}$ and $\\{ n_i^{\\hat \\alpha_\\parallel} \\} \\equiv \\{ n_i^{\\hat \\alpha} | \\sum_i \\bar{n}_i^{\\hat \\alpha} n_i^{\\alpha_\\Delta} \\neq 0 ~\\text{for some}~\\alpha_\\Delta\\}$. The latter set $\\{n_i^{\\hat\\alpha_\\parallel}\\}$ involves a linear dependent relation with $n_i^{\\alpha_\\Delta}$ as $n_i^{\\alpha_\\Delta} = \\sum_{\\hat\\alpha_\\parallel} U^T_{\\alpha_\\Delta \\hat\\alpha_\\parallel} n_i^{\\hat\\alpha_\\parallel}$ with $U^T_{\\alpha_\\Delta \\hat\\alpha_\\parallel} \\neq 0$.\nNote that the dual vector $\\bar{n}_i^{\\hat\\alpha}$ is related to a conserved charge \nin the case where the interaction $\\hat\\alpha$ is turned off if $\\hat \\alpha \\in \\{ \\alpha_\\perp\\}$. In this case the conserved charge\nis $q_{\\hat\\alpha} = \\sum_i \\bar{n}_i^{\\hat\\alpha} q_i$ and the corresponding chemical potential is $\\mu_{\\hat\\alpha} = \\sum_i g_i \\bar{n}_i^{\\hat\\alpha}$.\\footnote{\nThese conserved charges provide the physical intuition behind distinguishing between linearly independent and dependent basis vectors, namely $\\sum_i \\bar{n}_i^{\\hat\\alpha} n_i^{\\alpha_\\Delta} = 0$ and $\\sum_i \\bar{n}_i^{\\hat\\alpha} n_i^{\\alpha_\\Delta}\\neq 0$, respectively. A linearly dependent basis vector implies a reduced number of conserved charges when we turn off its corresponding interaction.}\n\n\n\n\n\\subsection{Transport equation including an axion}\n\\label{sec:basis-indep}\n\nNow we shall include a coupling to an axion. In particular, we will provide a general transport equation in the presence of a non-vanishing velocity of the axion by assuming that the change of the axion velocity is much slower than the typical interactions in the ambient plasma (see Appendix.~\\ref{sec:derivation} for the details of derivation and assumptions).\nAs an aside, we show that the resulting transport equation is invariant under field redefinitions associated with charges in the current equation, which seemingly change the coupling to the axion.\n\n\n\\paragraph{Coupling to the axion.}\n\n\nBefore discussing the coupling to the axion, let us briefly recall the derivation of~\\eqref{eq:current-eq}.\nLet $\\{\\Phi\\}$ be a set of fields in the action $S$ and\nconsider a U$(1)_k$ transformation: $\\{\\Phi'\\} = \\{e^{i \\theta_k Q_k} \\Phi\\}$.\nThe current equation follows if the path-integral fulfills \n\\begin{align}\n\t\\int \\left[ \\mathrm{d} \\mu' \\right] F[\\{\\Phi'\\}] e^{i S[\\{ \\Phi' \\}]}\n\t&= \\int \\left[ \\mathrm{d} \\mu \\right] F[\\{\\Phi\\}] e^{i S[\\{ \\Phi \\}] \n\t+ \\int \\mathrm{d}^4 x\\, i \\theta_k \\left( \\partial \\cdot J_k - \\sum_\\alpha n_k^\\alpha O_\\alpha \\right) + i R (\\theta_k)}\n\t\\label{eq:derivation_current}\n\t\\\\\n\t&= \\int \\left[ \\mathrm{d} \\mu \\right] F[\\{\\Phi\\}] e^{i S[\\{ \\Phi \\}] }\n\t\\left[ 1 + \\int \\mathrm{d}^4 x \\, i \\theta_k \\left( \\partial \\cdot J_k - \\sum_\\alpha n_k^\\alpha O_\\alpha \\right) + \\mathcal{O} (\\theta_k^2) \\right]\n\t\\,,\n\\end{align}\nwith $[\\mathrm{d} \\mu]$ being a measure of the path-integral and $F[\\{\\Phi\\}]$ being a functional of $\\{\\Phi\\}$ invariant under the U$(1)_k$ transformation.\\footnote{\n\tWe take $F[\\{\\Phi\\}]$ invariant under the U$(1)_k$ transformation just for simplicity. If $F[\\{\\Phi\\}]$ is charged under this, we get the anomalous Ward-Takahashi identity associated with the commutator $[Q_k,F]$.\n}\nHere $R$ in the first equation involves terms at a higher order in $\\theta_k$.\nDifferentiating with respect to $\\theta_k$ and taking $\\theta_k = 0$, we obtain the current equation \\eqref{eq:current-eq}.\n\n\nNow we are ready to couple the current equation \\eqref{eq:current-eq} to a homogeneous axion field $a(t)$ with a decay constant $f$.\nThere are two types of (classically) shift-symmetric couplings.\nOne is a direct coupling with the current:\n\\begin{align}\n\t\\mathcal{L}_a = - \\frac{a}{f} \\partial \\cdot J_k\n\t= \\frac{\\dot a}{f} J_{k}^{0} + (\\text{total derivative})\\,.\n\t\\label{eq:current-coupling}\n\\end{align}\nAfter integration by parts, this coupling can be regarded as an external chemical potential.\nThe other is an indirect coupling to the current with an operator $O_{\\beta}$ appearing in the current equation:\n\\begin{align}\n\t\\mathcal{L}_a = \n\t- \\frac{a}{f} O_{\\beta}\\,,\n\t\\label{eq:operator-coupling}\n\\end{align}\nat linear order in $a\/f$.\nThe second coupling respects the classical shift symmetry of $a$,\nif one can rewrite it as $(a\/f) O_{\\hat\\beta} = (a\/f) \\sum_{i} \\bar n^{\\hat \\beta}_{i} \\partial \\cdot J_{i}$ by reversing the transformation in Eq.~\\eqref{eq:derivation_current} at linear order in $a\/f$\\footnote{\n\tIf we keep the nonlinear part appearing in the transformation~\\eqref{eq:derivation_current},\n\tthe equality should be $(a\/f) O_{\\hat\\beta} = \\sum_{i}\\bar n^{\\hat\\beta}_{i} (a\/f) \\partial \\cdot J_{i} + R(\\{\\bar{n}_i^{\\hat\\beta} a\/f\\})$.\n\tHowever, throughout the main text, we assume that the axion mass originating from this coupling is negligible and the typical time scale of axion motion is much slower than $1\/T$.\n\tUnder these approximations, one may always rotate away a constant term in the axion, and also expand the resulting equations in $\\dot a \/ (fT)$.\n\tThese are the underlying reasons why we may use transport equations at linear order in the axion field.\n\tSince we restrict ourselves to this case in this paper anyway, we can drop the nonlinear part of $a\/f$ in this discussion.\n\\label{fn:axion_mass}\n}\nor if it is a total derivative of some other operator $O_{\\beta} = \\partial \\cdot K_{\\beta}$ (\\textit{e.g.}, $W \\tilde W = \\partial \\cdot K_\\text{WS}$).\\footnote{\n\tThe latter case could be broken quantum mechanically by the instanton.\n\tThis is why we said ``classically'' shift symmetric.\n}\nMore general couplings can be generated from a linear combination of the two couplings in Eqs.~\\eqref{eq:current-coupling} and \\eqref{eq:operator-coupling}, and hence these two are sufficient for our discussion.\nThese shift-symmetric couplings with the axion modify the transport equation as follows:\n\\begin{align}\n\t\\dot q_{i} = - \\sum_{j} \\Gamma_{ij} \\frac{\\mu_{j}}{T} + \\frac{\\dot a \/ f}{T} S_{i}\\,.\n\t\\label{eq:transport-with-a}\n\\end{align}\nIn the following, we discuss the source term $S_{i}$ for each case.\n\n\n\n\n\n\n\\paragraph{Axion source terms.}\nLet us start with the direct coupling to the current, given by Eq.~\\eqref{eq:current-coupling}. As already mentioned, this coupling can be regarded as an external chemical potential of $(\\dot a \/ f) J_{k}^{0}$.\nSuch an external chemical potential gives rise to a shift of $\\mu_{k} \\mapsto \\mu_{k} - \\dot a \/ f$, indicating $\\mu_{k} = \\dot a \/ f$ at equilibrium.\nThis observation implies the following form for the transport equation:\n\\begin{align}\n\t\\dot q_{i} = - \\sum_{j} \\Gamma_{ij} \\left( \\frac{\\mu_{j}}{T} - \\frac{\\dot a \/ f}{T} \\delta_{jk} \\right)\n\t\\qquad \\text{for the axion coupling} \\quad \\frac{\\dot a}{f} J_{k}^{0}\\,.\n\t\\label{eq:transport-eq-current}\n\\end{align}\nThis means that the source term in Eq.~\\eqref{eq:transport-with-a} is given by\n\\begin{align}\n\tS_{i} = \\sum_{j} \\Gamma_{ij} \\delta_{jk}\n\t\\qquad \\text{for the axion coupling} \\quad \\frac{\\dot a}{f} J_{k}^{0}\\,.\n\t\\label{eq:axion-chemical}\n\\end{align}\nas expected.\n\n\nNext we move on to the coupling with an operator $- (a \/ f) O_{\\beta}$ [see Eq.~\\eqref{eq:operator-coupling}]. \nIn linear response, this interaction introduces a bias on the processes involving this operator.\nTherefore, we expect\n\\begin{align}\n\t\\frac{1}{\\operatorname{vol}(\\mathbb{R}^{3})} \\int \\mathrm{d}^{3}x\\, \\vev{ O_{\\alpha} (t, \\bm{x}) |_{a\/f} } = -\\Gamma_{\\alpha} \\sum_{j} n_{j}^{\\alpha} \\frac{\\mu_{j}}{T} \n\t+ \\delta_{\\alpha \\beta} \\Gamma_{\\alpha} \\frac{\\dot a \/ f}{T}\\,,\n\t\\label{eq:axion-op-lr}\n\\end{align}\nwhere the expectation value with a superscript of $a \/ f$ implies the presence of the axion coupling.\nWe show that this relation indeed holds in Appendix.~\\ref{sec:derivation} by means of linear response theory.\nIn the derivation of the transport equation from Eq.~\\eqref{eq:current-eq}, the expectation value of the right-hand side should be replaced with Eq.~\\eqref{eq:axion-op-lr}.\nHence, the transport equation becomes\n\\begin{align}\n\t\\dot q_{i} = - \\sum_{\\alpha} n^{\\alpha}_{i} \\Gamma_{\\alpha} \\left( \n\t \\sum_{j} n^{\\alpha}_{j} \\frac{\\mu_{j}}{T} - \\frac{\\dot a \/ f}{T} \\delta_{\\alpha \\beta} \n\t\\right) \\qquad\n\t\\text{for the axion coupling} \\quad - \\frac{a}{f} O_{\\beta}\\,,\n\t\\label{eq:axion-op-transport}\n\\end{align}\nimplying that the corresponding source term in Eq.~\\eqref{eq:transport-with-a} is given by\n\\begin{align}\n\tS_{i} = \\sum_{\\alpha} n^{\\alpha}_{i} \\Gamma_{\\alpha} \\delta_{\\alpha \\beta}\n\t\\qquad\n\t\\text{for the axion coupling} \\quad - \\frac{a}{f} O_{\\beta}\\,.\n\t\\label{eq:axion-op}\n\\end{align}\n\n\nFor a more general coupling, it is convenient to introduce a source vector $n_S^\\alpha$ such that \n\\begin{align}\n S_i \\equiv \\sum_\\alpha \\Gamma_\\alpha n_i^\\alpha n_S^\\alpha. \n \\label{eq:sourcevec}\n\\end{align}\nThen we obtain, \\textit{e.g.}, $n_S^\\alpha = \\delta_{\\alpha \\beta}$ for the coupling of $-(a\/f) O_\\beta$, and\n$n_S^\\alpha = n_k^\\alpha$ for $- (a \/ f) \\sum_{\\beta} n^{\\beta}_{k} O_{\\beta}$ or $- (a \/ f) \\del \\cdot J_k$. \nIf the axion couples to a current $J_Q$ ($= \\sum n_i^Q J_i$) where $n_i^Q$ is its charge vector, the source vector is given by $n_S^\\alpha = \\sum_i n_i^Q n_i^\\alpha$. \n\n\n\n\\paragraph{Basis independence.}\nSo far, we have seen how the shift-symmetric couplings of the axion given in Eqs.~\\eqref{eq:current-coupling} and \\eqref{eq:operator-coupling} give rise to the source terms in the transport equation.\nHowever, there are subtleties in this computation because the coupling to the axion has redundancies in its description owing to the current equations and the conserved charges.\n\n\nAs an illustration, let us consider a theory with $- (a\/f) \\partial \\cdot J_{k}$.\nOne may compute the source term of this coupling and then obtain Eq.~\\eqref{eq:axion-chemical}.\nInstead, one may perform a field rotation associated with the charge $J_{k}^{0}$,\nwhich yields $- (a\/f) \\sum_{i} n^{\\alpha}_{k} O_{\\alpha}$ at linear order in $a\/f$ [see Eq.~\\eqref{eq:derivation_current}].\\footnote{Also, one may consider other transformations such as a field rotation associated with a conserved charge. Then, one can replace the coupling with $a \\sum_{i\\neq k} n^{A}_{i} \\partial \\cdot J_{i}$.\nMoreover, one could perform a field rotation associated with other charges and then rewrite this coupling in a more complicated form.\nAll these transformations of a field basis (which we simply refer to as `field rotations' in this paper) give exactly the same transport equation.\n}\nThe transport equation computed in this field basis should be the same as the original transport equation sourced by $- (a\/f) \\partial \\cdot J_{k}$.\nIn the following, we directly confirm this \\emph{basis independence} of the axion coupling in the transport equation.\nIn other words, we will prove that the source vector $n_S^\\alpha$ does not depend on these redundancies of the axion-coupling related to a field rotation.\n\n\n\nThe fundamental building block of the independence under such basis transformations is an equivalence between $- a \\partial \\cdot J_{k}$ and $- a \\sum_{\\alpha} n^{\\alpha}_{k} O_{\\alpha}$.\nOnce we show this, other more complicated transformations are just given by considering linear combinations of these operators.\nHence, a proof for these two couplings is sufficient.\nFor the coupling of $-(a\/f) \\partial \\cdot J_{k}$, the source term is given in Eq.~\\eqref{eq:axion-chemical}:\n\\begin{align}\n\tS_{i} = \\sum_{j} \\Gamma_{ij} \\delta_{jk} = \\sum_{\\alpha} \\Gamma_{\\alpha} n^{\\alpha}_{i} n^{\\alpha}_{k}\\,.\n\t\\label{eq:basis1}\n\\end{align}\nOn the other hand, the source term for $- (a \/ f) \\sum_{\\beta} n^{\\beta}_{k} O_{\\beta}$ can be obtained from Eq.~\\eqref{eq:axion-op} by multiplying $n^{\\beta}_{k}$ and summing over $\\beta$.\nThis in the end gives\n\\begin{align}\n\tS_{i} = \\sum_{\\beta} n^{\\beta}_{k} \\sum_{\\alpha} n^{\\alpha}_{i} \\Gamma_{\\alpha} \\delta_{\\alpha \\beta} = \\sum_{\\alpha} \\Gamma_{\\alpha} n^{\\alpha}_{i} n^{\\alpha}_{k} \\,,\n\\end{align}\nwhich coincides with Eq.~\\eqref{eq:basis1}.\nTherefore these two couplings yield exactly the same transport equations as expected.\nThis proves that the transport equation is invariant under such field rotations, \\textit{i.e.}, the phenomenology of the axion couplings is basis independent.\n\n\n\n\\subsection{Asymmetry generation}\n\\label{sec:asymmetry_generation}\nIn this section, we discuss how the axion induces a non-vanishing asymmetry.\nAssuming that the equilibration is faster than the axion dynamics, we first sketch how to obtain an equilibrium solution of chemical potentials for a given set of conserved charges $\\{c_{A}\\}$ in the presence of non-vanishing $\\dot a$.\nThen, we derive a condition for the couplings to the axion so that the non-vanishing velocity $\\dot a$ yields an asymmetry for a specific charge.\nWe finally discuss how this dynamics gives rise to a friction term for the axion,\nand point out a special case where this friction term vanishes identically.\n\n\n\\paragraph{Equilibrium solution.}\nNow we sketch how to obtain the equilibrium solution for a given set of conserved charges $\\{c_{A}\\}$ in the presence of a source term.\nAn equilibrium solution is defined by $\\dot q_{i} = 0$ for all $i$.\nBy multiplying $\\bar n^{\\hat\\alpha}_{i}$ from the left to both sides of Eq.~\\eqref{eq:transport-with-a} we find the following set of equations :\n\\begin{align}\n\t\\sum_i \\bar{n}_i^{\\hat\\alpha} S_i \\frac{\\dot a \/ f}{T} = \\sum_{i,j} \\bar{n}_i^{\\hat\\alpha} \\Gamma_{ij} \\frac{\\mu_j}{T} \\quad \n\t\\longrightarrow\n\t\\quad\n\t\\sum_{\\beta} S_{\\hat\\alpha \\beta} n_S^{\\beta} \\frac{\\dot a \/ f}{T}\n\t= \\sum_{\\hat\\beta} \\Gamma_{\\hat\\alpha \\hat\\beta} \\sum_{j} n_j^{\\hat\\beta} \\frac{\\mu_j}{T}\\,.\n\\end{align}\nHere we define\n\\begin{align}\n\t\\Gamma_{\\hat\\alpha \\hat\\beta} \\equiv \\sum_{i,j} \\bar{n}_i^{\\hat\\alpha} \\Gamma_{ij} \\bar{n}^{\\hat\\beta}_j = \\sum_\\gamma U_{\\hat\\alpha \\gamma} \\Gamma_\\gamma U^T_{\\gamma \\hat\\beta}\\,,\n\t\\quad\n\tS_{\\hat\\alpha \\beta} \\equiv \\sum_i \\bar{n}_i^{\\hat\\alpha} \\Gamma_\\beta n_i^\\beta \n\t= U_{\\hat\\alpha \\beta} \\Gamma_\\beta\\,.\n\t\\label{eq:transport_matrix}\n\\end{align}\nwith\n\\begin{align}\n\tU_{\\hat\\alpha \\beta} \\equiv \\sum_i \\bar{n}^{\\hat\\alpha}_i n^\\beta_i\\,.\n\t\\label{eq:conversion}\n\\end{align}\nNote that, if all the vectors $\\{ n_i^\\alpha \\}$ are linearly independent, \\textit{i.e.}, $\\hat \\alpha = \\alpha$, the matrix becomes diagonal, $\\Gamma_{\\alpha \\beta} = \\Gamma_\\alpha \\delta_{\\alpha \\beta}$, $S_{\\alpha \\beta} = \\Gamma_\\alpha \\delta_{\\alpha \\beta}$, because $U_{\\alpha \\beta} = \\sum_i \\bar{n}_i^\\alpha n_i^\\beta = \\delta_{\\alpha \\beta}$.\n\n\nSince the matrix $\\Gamma_{\\hat\\alpha \\hat\\beta}$ is invertible,\\footnote{\n\tSuppose that a vector $v^{\\hat{\\alpha}}$ satisfies $0 = \\sum_{\\hat\\alpha}v^{\\hat{\\alpha}}\\Gamma_{\\hat{\\alpha}\\hat\\beta}$.\n\tThe positivity of $\\Gamma_\\alpha$ implies that $0 = \\sum_{\\hat \\alpha}v^{\\hat\\alpha}U_{\\hat\\alpha \\beta}$.\n\tBy restricting $\\beta$ to $\\hat{\\beta}$, the matrix $U_{\\hat\\alpha\\hat\\beta}$ is invertible\n\tand hence $v^{\\hat\\alpha} = 0$. It follows that $\\Gamma_{\\hat\\alpha \\hat\\beta}$ is invertible.\n}\nwe obtain the following equation in matrix notation [together with the conservation equations \\eqref{eq:conservation}], which determines the equilibrium solution:\n\\begin{align}\n\t\\left( M_{Xi} \\right)\n\t\\Bigg( \\frac{\\mu_{i}}{T} \\Bigg)\n\t=\n\t\\begin{pmatrix}\n\t\\sum_{\\hat \\beta, \\gamma} \\Gamma^{-1}_{\\hat \\alpha \\hat \\beta} S_{\\hat \\beta \\gamma} n_S^\\gamma \\frac{\\dot a \/ f}{T} \\\\\n\tc_{A}\n\t\\end{pmatrix}\n\t\\,, \\quad\n\t\\left( M_{Xi} \\right) \\equiv\n\t\\begin{pmatrix}\n\t\\left( n^{\\hat \\alpha}_i \\right) \\\\\n\t\\left( g_i n^A_i \\right)\n\t\\end{pmatrix}\\,.\n\t\\label{eq:matrix-equil}\n\\end{align}\nHere $\\hat\\alpha = 1, \\cdots, N_{\\hat\\alpha}$, $A = 1, \\cdots, N_A$, $i = 1, \\cdots, N$, and $X$ runs through $\\hat \\alpha$ and $A$. $c_A$ and $\\mu_i$ represent the $N_A$ and $N$ dimensional vectors, respectively. \n$(n^{\\hat\\alpha}_i)$ is an $N_{\\hat\\alpha} \\times N$ matrix, a $(g_i n^A_i)$ is $N_A \\times N$ matrix, and hence $M_{Xi}$ is an $N \\times N$ matrix.\nMultiplying an inverse matrix from the left,\\footnote{\n\tWe provide a proof that the $N \\times N$ matrix $M_{Xi}$ is invertible.\n\tSuppose that a vector $v^i$ satisfies $0 = \\sum_i M_{Xi} v^i$.\n\tBy definition, we have $\\sum_i M_{\\hat \\alpha i} \\bar{n}_i^{\\hat \\beta} = \\delta_{\\hat \\alpha \\hat \\beta}$ which is non-zero. Hence, $v^i$ can be expressed as a linear combination of $n_i^A$, \\textit{i.e.}, $v^i = \\sum_{A} n_i^A x_A$.\n\tNow, $0 = \\sum_i M_{Xi} v^i$ is rewritten as $0= \\sum_A x_A (\\sum_i n_i^A g_i n_i^{A'} )$.\n\tThe positivity of $g_i$ implies that $0 = \\sum_A x_A n^A_i$.\n\tBy multiplying $\\bar{n}_i^{A'}$ and summing over $i$, we find $x_A = 0$ for all $A$. It follows that $M_{Xi}$ is invertible.\n}\nwe obtain the equilibrium solution:\n\\begin{align}\n\t\\Bigg( \\frac{\\mu_{i}}{T} \\Bigg)_\\text{eq}\n\t=\n\t\\left( M^{-1}_{iX} \\right)\n\t\\begin{pmatrix}\n\t\\sum_{\\hat \\beta, \\gamma} \\Gamma^{-1}_{\\hat \\alpha \\hat \\beta} S_{\\hat \\beta \\gamma} n_S^\\gamma \\frac{\\dot a \/ f}{T} \\\\\n\tc_{A}\n\t\\end{pmatrix}\\,.\n\t\\label{eq:matrix-equil_sol}\n\\end{align}\nwhere $M^{-1}_{iX}$ is the inverse matrix of $M_{Xi}$ defined in Eq.~\\eqref{eq:matrix-equil}.\nNote that, if $n_S^\\gamma = c_{A} = 0$ for all $A$ and $\\gamma$, the solution is a trivial one, $\\mu_{i} = 0$ for all $i$. \nThis formula is useful when we calculate, \\textit{e.g.}, the resulting present-day baryon asymmetry.\n\n\n\\paragraph{Asymmetry generation.}\n\nHere we derive the condition to produce an asymmetry in a specific charge.\nSuppose that we are interested in generation of a certain charge $q_C$,\nwhose effective chemical potential is given by\n\\begin{align}\n\t\\mu_C = \\sum_i g_i n^C_i \\mu_i\\,.\n\t\\label{eq:mu_c}\n\\end{align}\nInserting Eq.~\\eqref{eq:matrix-equil_sol}, we can estimate the charge $q_C$ in the presence of the source term $n_S^\\alpha$ and non-vanishing conserved charges $c_A$:\n\\begin{align}\n\t\\frac{\\mu_C^\\text{eq}}{T} = \n\t\\begin{pmatrix}\n\t\t\\left( g_i n_i^C \\right)^T\n\t\\end{pmatrix}\n\t\\left( M^{-1}_{iX} \\right)\n\t\\begin{pmatrix}\n\t\\sum_{\\hat \\beta, \\gamma} \\Gamma^{-1}_{\\hat \\alpha \\hat \\beta} S_{\\hat \\beta \\gamma} n_S^\\gamma \\frac{\\dot a \/ f}{T} \\\\\n\tc_{A}\n\t\\end{pmatrix}\\,,\n\t\\label{eq:equilibrium_solution}\n\\end{align}\nwhere $(g_i n_i^C)^T$ is a $1 \\times N$ matrix.\nIn other words, this gives the condition on $n_S^\\alpha$ and $c_A$ to obtain non-vanishing $q_C$.\nIn particular, in the case with vanishing conserved charges $c_A = 0$ for all $A$, \nwe get non-vanishing $q_C$ if the vector $n_S^\\gamma$ fulfills\n\\begin{align}\n\t(n_S^\\gamma) \\not\\perp \n\t\\Bigg( \\sum_{i,\\hat \\alpha, \\hat \\beta} g_i n^C_i M^{-1}_{i\\hat\\alpha} \n\t\\Gamma^{-1}_{\\hat\\alpha \\hat\\beta} S_{\\hat\\beta \\gamma} \\Bigg) \\equiv v_\\gamma^C\\,.\n\t\\label{eq:cond_asym}\n\\end{align}\nIf all the vectors $n_i^\\alpha$ are linearly independent, this condition is further simplified as\n\\begin{align}\n\t(n_S^\\gamma) \\not\\perp \n\t\\Bigg( \\sum_{i} g_i n^C_i M^{-1}_{i\\gamma} \\Bigg)\\,.\n\t\\label{eq:cond_asym_lind}\n\\end{align}\nThese general formulae will prove useful when we discuss the condition to generate the baryon asymmetry in Secs.~\\ref{sec:b+l} and \\ref{sec:b-l}. \n\n\n\nThe physical intuition behind this formula is the following: The $CPT$-violating motion of the axion biases the processes encoded in the source vector $n_S^\\alpha$ such that they induce non-vanishing chemical potentials $\\mu_i$ for the particles involved in these processes. Meanwhile other processes (encoded in $M_{i \\hat \\alpha}^{-1} \\Gamma^{-1}_{\\hat \\alpha \\hat \\beta} S_{\\hat \\beta \\gamma}$) try to wash-out these chemical potentials. This competition determines the equilibrium solution. In order to generate the charge $q_C$ (which could be \\textit{e.g.}, baryon number), we need a $q_C$-violating operator. The only way to obtain a \\textit{vanishing} $q_C$ in the equilibrium solution is by choosing specific couplings such that the $q_C$-violating operator is not involved in this equilibration process.\nEq.~\\eqref{eq:cond_asym} or Eq.~\\eqref{eq:cond_asym_lind} indicate this specific coupling. After the decoupling of the $q_C$-violating interactions, the non-zero value of $q_C$ freezes out and becomes a conserved charge.\nFrom this it is clear that, for $C$-genesis, we in particular do not have to couple the axion to the $q_C$-violating operator directly. This opens up a variety of couplings successful in creating $q_c$.\n\n\n\n\n\\paragraph{Backreaction to the axion.}\nSo far, we have assumed that the production of asymmetries does not affect the dynamics of the axion.\nHere we discuss the backreaction to the equation of motion for the axion, and derive the condition under which we can neglect it.\nSince we have already proven the invariance under field rotations, the coupling to the current can be rewritten as the coupling to a linear combination of operators $O_\\alpha$.\nHence, it is sufficient to discuss the case with $\\mathcal{L}_a = - (a\/f) \\sum_\\alpha n_S^\\alpha O_\\alpha$.\nThe equation of motion for the homogeneous mode of the axion then becomes\n\\begin{align}\n\t0 &= \\ddot a + V'(a) + \\frac{1}{f} \\sum_\\alpha n_S^\\alpha \\vev{ O_\\alpha |_{a\/f} }= \\ddot a + V'(a) + \\sum_\\alpha n_S^\\alpha\\frac{\\Gamma_\\alpha}{fT} \\left( n_S^\\alpha \\frac{\\dot a}{f} - \\sum_j n^\\alpha_j \\mu_j \\right)\\,,\n\t\\label{eq:axion_eom}\n\\end{align}\nwhere the axion potential is $V(a)$. \nIn the second equality, we have used Eq.~\\eqref{eq:axion-op-lr}.\n\n\nLet us assume that the equilibration for the chemical potentials is much faster than the axion dynamics.\nUnder this approximation, we can insert the equilibrium solution given in Eq.~\\eqref{eq:matrix-equil_sol} in the last term of Eq.~\\eqref{eq:axion_eom}.\nThroughout this paper, we are interested in the case where there are no primordial asymmetries for all the conserved quantities, \\textit{i.e.}, $c_A = 0$ for all $A$.\nIn this way, we can evaluate the last term in Eq.~\\eqref{eq:axion_eom}, which defines the effective dissipation rate for the axion as\n\\begin{align}\n\t\\sum_\\alpha n_S^\\alpha \\frac{\\Gamma_\\alpha}{fT} \\left(n_S^\\alpha \\frac{\\dot a}{f} - \\sum_j n^\\alpha_j \\mu_j^\\text{eq} \\right)\n\t=: \\sum_{\\alpha, \\beta} n_S^\\alpha \\gamma^{\\text{eff}}_{a,\\alpha \\beta} n_S^\\beta \\, \\dot a\\,,\n\\end{align}\nimplying\n\\begin{align}\n\t\\gamma^{\\text{eff}}_{a,\\alpha\\beta} = \\frac{\\Gamma_\\alpha}{f^2 T} \n\t\\left( \\delta_{\\alpha\\beta} - \\sum_{i,\\hat \\gamma, \\hat \\rho} n_i^\\alpha M^{-1}_{i \\hat \\gamma} \\Gamma_{\\hat \\gamma \\hat \\rho}^{-1} S_{\\hat\\rho \\beta} \\right)\n\t= \\frac{1}{f^2 T} \n\t\\left( \\Gamma_\\alpha \\delta_{\\alpha\\beta} - \\sum_{\\hat \\gamma, \\hat \\rho} S_{\\alpha \\hat \\gamma}^T \\Gamma_{\\hat \\gamma \\hat \\rho}^{-1} S_{\\hat \\rho \\beta} \\right)\\,.\n\t\\label{eq:axion_dissipation}\n\\end{align}\nIn the second equality, we have used $n_i^\\alpha = \\sum_{\\hat \\beta} U^T_{\\alpha \\hat \\beta} n_i^{\\hat \\beta}$, $\\sum_{i} n_i^{\\hat\\beta} M_{i \\hat\\gamma}^{-1} = \\delta_{\\hat \\beta \\hat \\gamma}$, and the definition of $S_{\\hat \\gamma \\alpha} = U_{\\hat \\gamma \\alpha} \\Gamma_\\alpha$ in Eq.~\\eqref{eq:transport_matrix}.\nIf this rate is much slower than the typical interaction rate for chemical equilibration processes, the assumption of fast equilibration is justified a posteriori.\n\n\n\n\nWe remark that there is a special case where the effective dissipation, $\\sum_{ \\alpha \\beta} n_S^{\\alpha} n_S^{\\beta} \\gamma_{a,\\alpha \\beta}^\\text{eff}$, vanishes identically. Let us see when this happens.\nAs shown in Appendix.~\\ref{sec:br_pr}, the condition where the effective dissipation term vanishes is given by\n\\begin{align}\n\t\\sum_{\\alpha \\beta} \\gamma^{\\text{eff}}_{a, \\alpha \\beta} n_S^{\\alpha} n_S^{\\beta} = 0 \\quad \\text{iff}~n_S^{\\alpha_\\Delta} = \\sum_{\\hat \\alpha_\\parallel} U^T_{\\alpha_\\Delta \\hat\\alpha_\\parallel} n_S^{\\hat\\alpha_\\parallel} \\,,\n\t\\label{eq:zero-friction}\n\\end{align}\nwhere we use the classification of charge vectors into linearly (in)dependent vectors, denoted by the superscripts $\\alpha_\\Delta, \\alpha_\\parallel, \\alpha_\\perp$, as introduced around Eq.~\\eqref{eq:orthogonality}.\nFor instance, if the axion only couples to the operators whose charge vectors are linearly independent with respect to all other interactions, \\textit{i.e}, $n_S^\\alpha \\neq 0$ only if $\\alpha \\in \\{\\hat{\\alpha}_\\perp\\}$, \nthe right-hand condition is trivially fulfilled and hence the effective friction term vanishes.\nThe non-vanishing effective friction term arises only if the axion couples to an operator whose charge vector lies in the span of the charge vectors of other interactions,\n\\textit{i.e}, $n_S^\\alpha \\neq 0$ for $\\alpha \\in \\{\\hat{\\alpha}_\\parallel, \\alpha_\\Delta\\}$. \nStill, in this case, we could have a cancellation among the source vectors because the corresponding charge vectors are linearly dependent, and if the cancellation occurs, the effective friction term vanishes.\nThe condition of $n_S^{\\alpha_\\Delta} = \\sum_{\\hat \\alpha_\\parallel} U^T_{\\alpha_\\Delta \\hat\\alpha_\\parallel} n_S^{\\hat\\alpha_\\parallel}$ takes into account when this cancellation happens.\nIf the condition \\eqref{eq:zero-friction} is fulfilled, the constant motion of the axion is never stopped by the asymmetry generation. This means that a non-vanishing $\\dot a$ together with $\\mu_i^\\text{eq}$ is a non-trivial equilibrium solution even after the inclusion of the backreaction.\n\n\n\nWe can roughly understand its physical reason as follows.\nLet us take the limit of $V(a) \\to 0$ to get insight into the nature of this property.\nAs we will see below, the above non-trivial equilibrium solution exists if we get a new conserved charge in the limit of $V(a) \\to 0$.\nBy multiplying the current equation \\eqref{eq:current-eq} by $\\bar n_i^{\\hat\\alpha}$ and taking a summation over $i$, \nwe obtain $\\sum_{i}\\bar{n}_i^{\\hat \\alpha} \\partial_\\mu J_i^\\mu = \\sum_{\\beta} U_{\\hat\\alpha \\beta} O_{\\beta} = O_{\\hat\\alpha} + \\sum_{\\alpha_\\Delta} U_{\\hat\\alpha \\alpha_\\Delta} O_{\\alpha_\\Delta} $.\nThis implies $O_{\\hat\\alpha} = \\sum_i \\bar{n}_i^{\\hat\\alpha} \\partial_\\mu J_i^\\mu - \\sum_{\\alpha_\\Delta} U_{\\hat\\alpha \\alpha_\\Delta} O_{\\alpha_\\Delta}$.\nUsing this equation, we can rewrite the equation of motion for the axion as\n\\begin{align}\n\t\\frac{\\mathrm{d}}{\\mathrm{d} t} \\left( f \\dot a + \\sum_{\\hat\\alpha ,i} n_S^{\\hat\\alpha} \\bar{n}_i^{\\hat\\alpha} q_i \\right)\n\t= \\sum_{\\alpha_\\Delta} \\left( \\sum_{\\hat\\alpha_\\parallel} n_S^{\\hat\\alpha_\\parallel} U_{\\hat\\alpha_\\parallel \\alpha_\\Delta} - n_S^{\\alpha_\\Delta} \\right)\n\t\\vev{O_{\\alpha_\\Delta} |_{a\/f}} \n\\end{align}\nNow it is clear that, if the condition \\eqref{eq:zero-friction} is satisfied, we have a new conserved charge that is a summation of the axion shift charge $f \\dot a$ and $\\sum_{\\hat\\alpha,i} n_S^{\\hat \\alpha}\\bar{n}^{\\hat\\alpha}_i q_i$.\nThe presence of this new charge in principle allows an equilibrium solution with both charges, $f \\dot a$ and $\\sum_{\\hat\\alpha,i} n_S^{\\hat \\alpha}\\bar{n}^{\\hat\\alpha}_i q_i$, non-vanishing, which implies $\\dot a \\neq 0$ in equilibrium.\nHowever, if the condition \\eqref{eq:zero-friction} is violated, this new charge should vanish in equilibrium.\nThis means that there must exist a process driving the axion velocity to zero, which is nothing but a non-zero effective friction term.\n\n\n\n\n\n\\section{Transport equation in the Standard Model}\n\\label{sec:SM-transport}\n\nIn this section, we review the transport equation within the SM in the symmetric phase, before discussing the coupling to the axion in the subsequent sections.\n\n\\subsection{Standard Model interactions and charge vectors}\n\\label{sec:SM-interactions}\n\n\nLet us first specify the number of chemical potentials required to describe the system.\nThe SM consists of the right-handed lepton $e_f$, the left-handed lepton $L_f$, the right-handed up-type quark $u_f$, the right-handed down-type quark $d_f$, the left-handed quark $Q_f$, and the Higgs $H$, where the index $f$ runs from $1$ to $N_f$ with the number of flavors being $N_f = 3$.\nThe vector of chemical potentials hence has $5 N_f + 1$ components:\n\\begin{align}\n\t\\left( \\mu_i \\right) = \\left( \\mu_{e_1}, \\mu_{e_2}, \\mu_{e_3}, \\mu_{L_1}, \\mu_{L_2}, \\mu_{L_3}, \\mu_{u_1}, \\mu_{u_2}, \\mu_{u_3}, \\mu_{d_1} , \\mu_{d_2} , \\mu_{d_3}, \\mu_{Q_1}, \\mu_{Q_2}, \\mu_{Q_3}, \\mu_H \\right)\\,.\n\\end{align}\nThe SM transport equation is written by means of this chemical potential vector: \n\\begin{align}\n\t\\dot q_i = - \\sum_\\alpha \\Gamma_\\alpha n_i^\\alpha \\sum_j n_j^\\alpha \\frac{\\mu_j}{T}\\,.\n\\end{align}\nHere $\\alpha$ runs over the SM interactions relevant for the chemical equilibrium, which are the electroweak sphaleron, the strong sphaleron, the lepton Yukawa, the up-type quark Yukawa, and the down-type quark Yukawa.\n\nAs we are interested in the evolution of the chemical potential in the early Universe, \nwe should take into account the effect of the expansion of the Universe. \nDenoting $H$ as the Hubble parameter, \nwe rewrite \nthe transport equation \\eq{eq:transport-with-a} by the replacement of $\\dot{q}_i \\to \\dot{q}_i + 3 H q_i$. \nAssuming the radiation-dominated era, \nwe obtain $\\dot{T} = - H T$\nand \n\\begin{align}\n\tH = \\sqrt{\\frac{g_* \\pi^2}{90}} \\frac{T^2}{M_{\\rm pl}}, \n\\end{align}\nwhere $g_*$ ($= 106.75$) is the effective degrees of freedom of relativistic particles. \nThe transport equation is now written as\\footnote{\nThis is not the case before the reheating completes. \nWe implicitly assume that the reheating temperature is much higher than $10^{13} \\,\\mathrm{GeV}$ throughout this paper for simplicity. \n}\n\\begin{align}\n\t- \\frac{\\mathrm{d}}{\\mathrm{d} \\ln T} \\lmk \\frac{\\mu_i}{T} \\right) = -\\frac{1}{g_i}\\sum_\\alpha n_{i}^{\\alpha} \\frac{\\gamma_\\alpha}{H}\n\t\\left[\\sum_{j}n_{j}^{\\alpha} \\lmk \\frac{\\mu_j}{T} \\right) - n_{S}^{\\alpha} \\lmk \\frac{\\dot{a}\/f}{T} \\right) \\right], \n\t\\label{eq:fulltransporteq}\n\\end{align}\nwhere we have included an axion source term. \nWhen the prefactor in the right-hand side becomes larger than of order unity, \nthe square bracket in the right-hand side is driven to be zero within of order one Hubble time. \nIt is thus convenient to define an equilibration temperature, below which a given interaction is in equilibrium within the time-scale of the Hubble expansion. \n\n\nLet us focus on an interaction $\\beta$ in the right-hand side of \\eq{eq:fulltransporteq}. \nMultiplying $n_i^\\beta$ and taking a summation over $i$, \nwe obtain \n\\begin{align}\n\t- \\frac{\\mathrm{d}}{\\mathrm{d} \\ln T} \\lmk \\sum_i n_i^\\beta \\frac{\\mu_i}{T} \\right) \n\t= - \\sum_i \\frac{1}{g_i} \\lmk n_{i}^{\\beta} \\right)^2 \\frac{\\gamma_\\beta}{H}\n\t\\left[\\sum_{j}n_{j}^{\\beta} \\lmk \\frac{\\mu_j}{T} \\right) - n_{S}^{\\beta} \\lmk \\frac{\\dot{a}\/f}{T} \\right) \\right] + \\dots, \n\\end{align}\nwhere the dots represent the other interaction terms. \nThen the quantity $\\sum_i n_i^\\beta \\mu_i \/ T$ does not change much by the interaction $\\beta$ if \n\\begin{align}\n \\sum_i \\frac{1}{g_i} \\lmk n_{i}^{\\beta} \\right)^2 \\gamma_\\beta < H. \n \\label{eq:T_alpha}\n\\end{align}\nWe define the equilibration temperature of the interaction $\\beta$ by the threshold of this condition.\\footnote{Ref.~\\cite{Garbrecht:2014kda} defines the equilibration temperature of the weak and strong sphaleron processes \nby $6 \\gamma_{WS} = H$ and $4 \\gamma_{SS} = H$, respectively. \nThese are equivalent to our definitions. However, they define those of Yukawa interactions by $\\gamma_i \/g_L = H$, where $g_L$ is the degrees of freedom of left-handed lepton (quark) for lepton (quark) Yukawa interaction. \nThis is different from ours by a factor of $7\/2$ for the lepton Yukawa \nand $18\/4$ for the quark Yukawa. \n\\label{footnote:equilibration_temp}\n}\n\n\n\n\n\n\n\n\n\nIn the following, we give the rate per unit time-volume $\\Gamma_\\alpha$, the charge vector $n_i^\\alpha$, and the equilibration temperature $T_\\alpha$ for each interaction,\nsee Tab.~\\ref{tab:equilibration_temperature}. \nIt is important to include the renormalization group (RG) flow of the parameters to evaluate these quantities,\nwhich we have done using \\texttt{SARAH}~\\cite{Staub:2013tta}. \n\nBefore going to the details of the interactions, \nwe comment on the differences of our calculation of the equilibration temperature with respect to Ref.~\\cite{Garbrecht:2014kda}. \nAs explained in footnote~\\ref{footnote:equilibration_temp}, \nwe include the factor of $\\sum_i \\lmk n_{i}^{\\beta} \\right)^2 \/ g_i$ in the definition of the equilibration temperature of Yukawa interactions rather than $1\/g_L$, the latter of which is used in Ref.~\\cite{Garbrecht:2014kda}. \nWe also take into account the renormalization-group running of the Yukawa (as well as gauge) couplings, \nnot only for top Yukawa but also the other Yukawas. \nThis is quite important especially for the bottom Yukawa, where $T_b$ decreases by an order of magnitude. \nWe also use updated sphaleron rates following Ref.~\\cite{Moore:2010jd}. \n\n\n\n\\begin{table}[t]\n\t\\centering\n\t\\begin{tabular}{c|c|c|c|c|c|c} \\hline\n \t\tInteraction & Weinberg & WS & SS & $Y_e$ & $Y_\\mu$ & $Y_\\tau$ \n\t\t\\\\ \\hline\n \\rule[-10pt]{0pt}{25pt}\n\t\t$\\Gamma_\\alpha\/T^4$ & $\\kappa_\\text{W} \\frac{m_\\nu^2 T^2 }{ v_{\\rm EW}^4} $& $\\frac{1}{2} \\kappa_\\text{WS} \\alpha_2^5 $ & $\\frac{1}{2} \\kappa_\\text{SS} \\alpha_3^5$ \n\t\t& $\\kappa_{Y_e}\\, y_{e}^2$ & $\\kappa_{Y_e}\\, y_{\\mu}^2$ & $\\kappa_{Y_e}\\, y_{\\tau}^2$\n\t\t\\\\ \\hline\n \\rule[-10pt]{0pt}{25pt}\n\t\t$T_\\alpha\\,[\\mathrm{GeV}]$ & $6.0 \\times 10^{12}$ & $2.5 \\times 10^{12}$ & $2.8 \\times 10^{13}$\n\t\t& $1.1 \\times 10^{5}$ & $4.7 \\times 10^{9}$ & $1.3 \\times 10^{12}$ \\\\ \\hline\\hline\n \t\tInteraction & $Y_u$ & $Y_c$ & $Y_t$ & $Y_d$ & $Y_s$ & $Y_b$ \n\t\t\\\\ \\hline\n \\rule[-10pt]{0pt}{25pt}\n\t\t$\\Gamma_\\alpha\/T^4$ & $ \\kappa_{Y_u}\\, y_{u}^2$ & $ \\kappa_{Y_u}\\, y_{c}^2$ & $ \\kappa_{Y_t}\\, y_{t}^2$\n\t\t& $ \\kappa_{Y_d}\\, y_{d}^2$ & $\\kappa_{Y_d}\\, y_{s}^2$ & $\\kappa_{Y_d}\\, y_{b}^2$\n\t\t\\\\ \\hline\n \\rule[-10pt]{0pt}{25pt}\n\t\t$T_\\alpha\\,[\\mathrm{GeV}]$ & $1.0 \\times 10^6$ & $1.2 \\times 10^{11}$ & $4.7 \\times 10^{15}$\n\t\t& $4.5 \\times 10^{6}$ & $1.1 \\times 10^{9}$ & $1.5\\times 10^{12}$ \\\\ \\hline\n \t\\end{tabular}\n \t\\caption{ \n\tA summary of the rate per unit-time volume $\\Gamma_\\alpha$ and the corresponding equilibration temperature $T_\\alpha$ for the SM interactions and $L$-violating interaction by the dimension five Weinberg operator [see \\eq{Gamma_W}]. \n\tSee the main text for the explicit values of the numerical coefficients $\\kappa_\\alpha$. The differences with respect to Ref.~\\cite{Garbrecht:2014kda} are discussed in the main text. \n\t}\n \t\\label{tab:equilibration_temperature}\n\\end{table}\n\n\n\\begin{figure}[t]\n\t\\centering\n \t\\includegraphics[width=0.65\\linewidth]{.\/fig\/equilibration_temp.pdf}\n\t\\caption{ \n\tEquilibration temperatures for individual SM interactions, $T_\\alpha$. \n\tEach dashed line indicates the range from $10 T_\\alpha$ to $T_\\alpha$, within which one can expect non-trivial effects due to partial equilibration. The solid arrows (starting from the vertical lines) indicate that the interactions are in equilibrium for $T < T_\\alpha$. \n\tAt the top of the figure, we also show the decoupling temperature of lepton number violating interaction via the dimension five Weinberg operator as a vertical line, above which it is in equilibrium [see Eq.~(\\ref{eq:T_W}))]. The dashed line starts from $T_\\alpha \/ 10$ in this case, as this interaction is weaker for lower temperature. \n\t}\n\t\\label{fig:equilibration_temp}\n\\end{figure}\n\n\n\\paragraph{Electroweak sphaleron.}\n\nThe electroweak sphaleron involves all the left-handed fermions, which are charged under SU$(2)_\\text{W}$.\nThe corresponding charge vector, $n_i^\\text{WS}$, is defined so that\n\\begin{align}\n\t\\sum_i n_i^\\text{WS} \\mu_i = \\sum_f \\left( \\mu_{L_f} + 3 \\mu_{Q_f} \\right)\\,.\n\t\\label{eq:ws}\n\\end{align}\nThe sphaleron rate per unit time-volume in SU($N_c$) gauge theory with $N_f$ vector fermions and $N_H$ complex scalars is given by~\\cite{Bodeker:1999gx, Arnold:1999ux, Arnold:1999uy, Moore:2000mx, Moore:2000ara, Moore:2010jd} \n\\begin{align}\n& 2 \\Gamma_\\text{sphal} \\simeq 0.21 \n \\lmk \\frac{N_c g^2 T^2}{m_D^2} \\right) \n \\lmk \\ln \\frac{m_D}{\\gamma} + 3.0410 \\right) \n \\frac{N_c^2 - 1}{N_c^2} \\lmk N_c \\alpha \\right)^5 T^4, \n \\label{eq:sphaleron_rate}\n \\\\\n &\\gamma = N_c \\alpha T \\lmk \\ln \\frac{m_D}{\\gamma} + 3.041 \\right), \n \\\\\n &m_D^2 = \\frac{2 N_c + N_f + N_H}{6} g^2 T^2, \n\\end{align}\nwhere $g$ ($\\equiv \\sqrt{4 \\pi \\alpha}$) is a gauge coupling constant. \nUsing $m_D^2 = (11\/6) g_2^2 T^2$ in the SU(2) weak sector of the SM, \nwe thus estimate the rate as \n\\begin{align}\n\t\\Gamma_\\text{WS} = \\frac{\\kappa_\\text{WS}}{2} \\alpha_2^5 T^4\\,,\n\\end{align}\nwhere $\\kappa_\\text{WS} \\simeq 24$ for $T = 10^{12}\\,\\mathrm{GeV}$.\\footnote{\nThis sphaleron rate is about 1.3 times larger than the one reported in Ref.~\\cite{DOnofrio:2014rug}. \nIf one use the latter rate, $T_{\\rm WS}$ is estimated as $1.9 \\times 10^{12}\\,\\mathrm{GeV}$. \n}\nComparing the rate per unit time, $\\gamma_\\text{WS} \\sum_i (n_i^{\\rm WS})^2 \/ g_i = 36\\Gamma_\\text{WS} \/ T^3$,\nto the Hubble parameter, one may estimate the equilibration temperature as\n\\begin{align}\n\tT_\\text{WS} \\simeq 2.5 \\times 10^{12}\\,\\mathrm{GeV}\\,.\n\\end{align}\n\n\n\n\\paragraph{Strong sphaleron.}\n\nThe strong sphaleron involves both left- and right-handed quarks, which are charged under SU$(3)_\\text{C}$.\nThe charge vector, $n_i^\\text{SS}$, is given so that\n\\begin{align}\n\t\\sum_i n_i^\\text{SS} \\mu_i = \\sum_f \\left( 2 \\mu_{Q_f} - \\mu_{u_f} - \\mu_{d_f} \\right)\\,.\n\t\\label{eq:ss}\n\\end{align}\nSubstituting $m_D^2 = 2 g_3^2 T^2$ into \\eq{eq:sphaleron_rate}, \nwe can estimate the rate per unit time-volume as \n\\begin{align}\n\t\\Gamma_\\text{SS} = \\frac{\\kappa_\\text{SS}}{2} \\alpha_3^5 T^4\\,,\n\\end{align}\nwhere $\\kappa_\\text{SS} \\simeq 2.7 \\times 10^2$ for $T = 10^{13}\\,\\mathrm{GeV}$.\nComparing the rate per unit time, $\\gamma_\\text{SS} \\sum_i (n_i^{\\rm SS})^2 \/ g_i = 24 \\Gamma_\\text{SS} \/ T^3$, \nto the Hubble parameter, we get the equilibration temperature:\n\\begin{align}\n\tT_\\text{SS} \\simeq 2.8 \\times 10^{13}\\,\\mathrm{GeV}\\,.\n\\end{align}\n\n\n\n\\paragraph{Lepton Yukawa.}\nIn general, the lepton Yukawa is an $N_f \\times N_f$ matrix, $Y_e^{ff'}$.\nIf the effect of the neutrino mass can be neglected, one may redefine the leptons fields so that the lepton Yukawa becomes diagonal, \\textit{i.e.}, \n$(Y_{e}^{f f'}) = {\\rm diag} (y_e, y_\\mu, y_\\tau)$.\nLet us take this field basis and denote the corresponding chemical potentials as $\\mu_{e_f}$ and $\\mu_{L_f}$.\nThe charge vector, $n_i^{Y_e^{ff}}$, is given so that\n\\begin{align}\n\t\\sum_i n_i^{Y_e^{ff}} \\mu_i = - \\mu_{e_f} + \\mu_{L_f} - \\mu_H\\,.\n\t\\label{eq:Ye}\n\\end{align}\nThe rate per unit time-volume is estimated as\n\\begin{align}\n\t\\Gamma_{Y_e^{ff}} = \\kappa_{Y_e} (\\alpha_2) \\, y_{e_f}^2 T^4\\,,\n\\end{align}\nwhere we have made the dependence of $\\kappa_{Y_e}$ on $\\alpha_2$ explicit, \nwhich arises from taking into account $2 \\leftrightarrow 2$ scattering processes with single gauge boson emission\/absorption \n(among others).\nThe prefactor $\\kappa_{Y_e}$ is estimated in Ref.~\\cite{Garbrecht:2014kda} \nas $\\kappa_{Y_e}(\\alpha_2) \\simeq 1.7\\times 10^{-3}$. \nFrom this, we obtain the equilibration temperature of the lepton Yukawa for each flavor:\n\\begin{align}\n\tT_{y_e} \\simeq 1.1 \\times 10^{5}\\,\\mathrm{GeV}\\,, \n\t\\quad \n\tT_{y_\\mu} \\simeq 4.7 \\times 10^{9}\\,\\mathrm{GeV} \\,, \n\t\\quad \n\tT_{y_\\tau} \\simeq 1.3 \\times 10^{12}\\,\\mathrm{GeV} \\,,\n\\end{align}\nwhere we have used $\\sum_i (n_i^{Y_e^{ff}})^2 \/ g_i = 7\/4$. \n\n\n\n\n\\paragraph{Quark Yukawa.}\nSince there exist two $N_f \\times N_f$ matrices corresponding to the up-type and down-type quark Yukawas, we cannot diagonalize them simultaneously. \nThis is the origin of the well-known CKM matrix which leads to flavor changing processes.\nAt very high temperature, only the top Yukawa is in equilibrium, and other quark Yukawa interactions start to become efficient as the Universe cools down.\nAs we discuss in the subsequent Sec.~\\ref{sec:SM-charges}, special care about the quantum coherence of different flavors is required in order to describe this process properly.\nAs a result, we have to take an appropriate field basis in each temperature regime.\nThese effects have been investigated in the context of flavored leptogenesis~\\cite{Abada:2006fw,Nardi:2006fx,Abada:2006ea,Dev:2017trv}.\nBelow, let us just neglect these subtleties for the moment, and estimate a typical size of transport coefficients.\n\n\n\nThe charge vector for the up-type quark Yukawa, $n_i^{Y_u^{ff'}}$, is given by:\n\\begin{align}\n\t\\sum_i n_i^{Y_{u}^{ff'}} \\mu_i = - \\mu_{u_f} + \\mu_{Q_{f'}} + \\mu_H\\,.\n\t\\label{eq:Yu}\n\\end{align}\nIn an appropriate field basis of quarks, the transport coefficient is dominated by its diagonal part, which is estimated as\n\\begin{align}\n\t\\Gamma_{Y_u^{ff}} = \\kappa_{Y_u} (\\alpha_2, \\alpha_3) \\, y_{u_f}^2 T^4\\,,\n\\end{align}\nwhere $\\kappa_{Y_u}$ is again estimated in Ref.~\\cite{Garbrecht:2014kda} as \n$\\kappa_{Y_u} (\\alpha_2, \\alpha_3) \\simeq 1.0\\times 10^{-2}$ for $T \\simeq 10^{12}\\,\\mathrm{GeV}$, \n$1.2\\times 10^{-2}$ for $T \\simeq 10^9\\,\\mathrm{GeV}$,\nand $1.5\\times 10^{-2}$ for $T \\simeq 10^6\\, \\mathrm{GeV}$, respectively.\nWe estimate it as $\\kappa_{Y_u} \\simeq 8.0\\times 10^{-3}$ for $T \\simeq 10^{15}\\,\\mathrm{GeV}$\nfrom the running of $\\alpha_3$.\nAgain the dependence of $\\kappa_{Y_u}$ on $\\alpha_2$ and $\\alpha_3$ is made explicit.\nAs an indicator, let us estimate the corresponding equilibration temperature for the diagonal part:\n\\begin{align}\n\tT_{y_u} \\simeq 1.0 \\times 10^6\\,\\mathrm{GeV} \\,, \n\t\\quad T_{y_c} \\simeq 1.2 \\times 10^{11}\\,\\mathrm{GeV} \\,,\n\t\\quad T_{y_t} \\simeq 4.7 \\times 10^{15}\\,\\mathrm{GeV} \\,,\n\\end{align}\nwhere we have used $\\sum_i (n_i^{Y_u^{ff}})^2 \/ g_i = 3\/4$. \nThe equilibration temperature of the top Yukawa \nis comparable to the maximal temperature allowed by the constraints on the tensor-to-scalar ratio~\\cite{Akrami:2018odb}.\n\n\n\nThe charge vector for the down-type quark Yukawa, $n_i^{Y_d^{ff'}}$, is given by:\n\\begin{align}\n\t\\sum_i n_i^{Y_d^{ff'}} \\mu_i = - \\mu_{d_f} + \\mu_{Q_{f'}} - \\mu_H\\,.\n\t\\label{eq:Yd}\n\\end{align}\nAgain, in an appropriate field basis, the transport coefficient is dominated by its diagonal part, which is estimated as\n\\begin{align}\n\t\\Gamma_{Y_d^{ff}} = \\kappa_{Y_d} ( \\alpha_2, \\alpha_3) \\, y_{d_f}^2 T^4\\,,\n\\end{align}\nwhere $\\kappa_{Y_d} \\simeq \\kappa_{Y_u}$~\\cite{Garbrecht:2014kda}. \nAs an indicator, we evaluate the equilibration temperature for the diagonal part:\n\\begin{align}\n\tT_{y_d} \\simeq 4.5 \\times 10^{6}\\,\\mathrm{GeV}\\,, \n\t\\quad \n\tT_{y_s} \\simeq 1.1 \\times 10^{9}\\,\\mathrm{GeV} \\,, \n\t\\quad \n\tT_{y_b} \\simeq 1.5 \\times 10^{12}\\,\\mathrm{GeV}\\,,\n\\end{align}\nwhere we have used $\\sum_i (n_i^{Y_d^{ff}})^2 \/ g_i = 3\/4$. \n\n\n\n\\subsection{Conserved quantities and decoupling}\n\\label{sec:SM-charges}\n\n\nAs we have seen in the previous section, some interactions in the SM may not be efficient in the early Universe.\nTherefore, we expect that the number of (approximately) conserved quantities depends on the temperature of the ambient plasma.\nIn Secs.~\\ref{sec:b+l} and \\ref{sec:b-l}, we discuss the generation of baryon asymmetry around $T\\gtrsim 10^2$\\,GeV and $T \\gtrsim 10^{13}\\, \\mathrm{GeV}$ respectively.\nIn the following, we summarize conserved quantities for these two cases.\nWe also mention the quantum coherence from different flavors.\n\n\n\\paragraph{$\\bm{T \\gtrsim 10^2}$\\,GeV.}\nAt the temperature right before the electroweak phase transition, all the SM interactions are in equilibrium.\nWithout loss of generality, we can take a basis of chemical potentials so that the transport coefficients for the up-type quark Yukawa become diagonal $(\\Gamma_{Y_u^{ff'}}) = \\kappa_{Y_u} y_{u_f}^2 T^4 \\delta_{ff'}$ while those for the down-type quark Yukawa have off-diagonal elements.\nThe unitarity of the CKM matrix implies $\\Gamma_{Y_d^{f1}} + \\Gamma_{Y_d^{f2}} + \\Gamma_{Y_d^{f3}} = \\kappa_{Y_d} y_{d_f}^2 T^4$.\nAs can be seen from Eqs.~\\eqref{eq:ws}, \\eqref{eq:ss}, \\eqref{eq:Ye}, \\eqref{eq:Yu}, and \\eqref{eq:Yd}, we have $17$ charge vectors in this basis.\nOut of $17$, $12$ charge vectors are linearly independent since we have the following $5$ relations among the charge vectors:\n\\begin{align}\n\t&n^\\text{SS}_i = n^{Y_u^{11}}_i + n^{Y_u^{22}}_i + n^{Y_u^{33}}_i + n^{Y_d^{11}}_i + n^{Y_d^{22}}_i + n^{Y_d^{33}}_i\\,, \\quad\n\tn^{Y_d^{11}}_i + n^{Y_d^{22}}_i + n^{Y_d^{33}}_i = n^{Y_d^{31}}_i + n^{Y_d^{12}}_i + n^{Y_d^{23}}_i\\,, \\nonumber \\\\\n\t&n^{Y_d^{11}}_i + n^{Y_d^{22}}_i = n^{Y_d^{12}}_i + n^{Y_d^{21}}_i\\,, \\quad\n\tn^{Y_d^{22}}_i + n^{Y_d^{33}}_i = n^{Y_d^{23}}_i + n^{Y_d^{32}}_i\\,, \\quad\n\tn^{Y_d^{11}}_i + n^{Y_d^{33}}_i = n^{Y_d^{13}}_i + n^{Y_d^{31}}_i\\,.\n\t\\label{eq:relations-ew}\n\\end{align}\nTherefore, the charge vectors of interactions span a $12$-dimensional subspace out of $16$, which indicates the presence of $4$ conserved quantities.\nThe $4$ charge vectors orthogonal to the charge vectors of interactions correspond to U$(1)_Y$, U$(1)_{B-L}$, U$(1)_{L_1 - L_2}$, U$(1)_{L_2 - L_3}$:\n\\begin{align}\n\t&( n_i^{Q_Y} ) = \\left( -1,-1,-1,- \\frac{1}{2},- \\frac{1}{2},- \\frac{1}{2},\\frac{2}{3},\\frac{2}{3},\\frac{2}{3}, - \\frac{1}{3}, - \\frac{1}{3}, - \\frac{1}{3}, \\frac{1}{6}, \\frac{1}{6}, \\frac{1}{6}, \\frac{1}{2} \\right)\\,, \\nonumber \\\\\n\t&( n_i^{Q_{B-L}} ) = \\left( -1,-1,-1,-1,-1,-1,\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},\\frac{1}{3},0 \\right)\\,, \\nonumber\\\\\n\t&( n_i^{Q_{L_1 - L_2}} ) = ( 1,-1,0,1,-1,0,0,0,0,0,0,0,0,0,0,0 )\\,, \\nonumber \\\\\n\t&( n_i^{Q_{L_2 - L_3}} ) = ( 0, 1, -1, 0, 1, -1, 0,0,0,0,0,0,0,0,0,0 )\\,.\n\t\\label{eq:consv_ewscale}\n\\end{align}\nThe set of (linearly independent) $12$ charge vectors and $4$ conserved charge vectors \\eqref{eq:consv_ewscale} forms a complete basis of the $16$-dimensional chemical potential space.\n\n\n\n\\paragraph{$\\bm{T \\gtrsim 10^{13}}$\\,GeV.}\nIn Sec.~\\ref{sec:b-l}, we discuss the $B-L$ asymmetry generation from the dimension five Weinberg operator, which gives the origin of the neutrino masses.\nSince the Weinberg operator is efficient above $T \\sim 10^{13}\\, \\mathrm{GeV}$, we are interested in the properties of the SM transport equation at this high temperature regime.\nIn this regime, many of the SM interactions are not efficient, and\nonly the following interactions are relevant:\nthe top Yukawa and the strong sphaleron are efficient;\nthe electroweak sphaleron, the bottom and tau Yukawa are marginal.\n\n\nLet us briefly mention an appropriate field basis to treat the quantum coherence from different flavors.\nFor $T \\sim 10^{13}\\, \\mathrm{GeV}$, the relevant quark Yukawa interactions are only the top and bottom Yukawas, and hence we can take a field basis of quarks which completely diagonalizes both the up\/down-type Yukawa matrices: $y_t \\overline{u}_3 Q_3 \\cdot H$ and $y_b \\overline{d}_3 Q_3 H^\\dag$.\nAside from these top and bottom Yukawa interactions, no interactions distinguish different flavors.\nTherefore, we expect that charges for $Q_3$, $u_3$, and $d_3$ in this field basis would differ from other quarks while the charges for the first and second generation quarks are the same.\nWe should take this field basis since otherwise we need to take into account the coherence of different flavors which is beyond the formalism developed in this paper as we see below.\nThe subtleties arise when one would like to use another field basis $d'_f$ which does not diagonalize the Yukawa interactions.\nAs an illustration, let us suppose that we take the field basis of the third generation down-type quark where the bottom Yukawa is not diagonal, \\textit{i.e.}, $y_b \\overline{d}_3 Q_3 H^\\dag$ with $d_3 = \\sum_f U_{3f} d_f'$.\nAs explained above, we expect a different charge density for a particular linear combination of $d_f'$, \\textit{i.e.}, $d_3 = \\sum_f U_{3f} d_f'$.\nTherefore we need to describe the evolution of ``charges'' among different flavors for $d_f'$\nbecause $Q_{d_3} = \\int_{\\bm{x}}\\sum_{f,f'} U^\\dag_{f3} U_{3f'} d_f^{\\prime\\dag} d_{f'}' \\equiv \\int_{\\bm{x}} \\sum_{f,f'} U^\\dag_{f3} U_{3f'} Q_{d_{ff'}'}$.\nOur transport equation is not applicable to this $d_f'$ basis because we assume that the charge densities do not develop coherence among different flavors.\nA sophisticated formalism to deal with this quantum coherence has been developed in the context of flavored leptogenesis. See Refs.~\\cite{Abada:2006fw,Nardi:2006fx,Abada:2006ea,Dev:2017trv} for more details.\n\n\nNow we are ready to discuss conserved quantities.\nAs explained, in this temperature regime, the first and second generation left-handed leptons are indistinguishable. The same statement holds for the the first and second generation left-\/right-handed quarks.\nOne may take common chemical potentials for them, \\textit{i.e.}, $\\mu_{L_1} = \\mu_{L_2} = \\mu_{L_{12}}$, $\\mu_{Q_1} = \\mu_{Q_2} = \\mu_{Q_{12}}$, $\\mu_{u_1} = \\mu_{u_2} = \\mu_{u_{12}}$, and $\\mu_{d_1} = \\mu_{d_2} = \\mu_{d_{12}}$.\nThe first and second generation right-handed leptons are decoupled from all the interactions relevant for their asymmetry production, and hence their corresponding charges $Q_{e_f}$ with $f = 1,2$ become separately conserved quantities.\nTherefore, we can focus on the chemical potentials of $10$ species, \\textit{i.e.}, $\\mu_i$ with $i = \\tau, L_{12}, L_3, u_{12}, t, d_{12}, b, Q_{12}, Q_3, H$.\nThe multiplicity factor is given by $g_i = 1, 4, 2, 6, 3, 6, 3, 12, 6, 4$ respectively.\nThe charge vectors of each interaction in this basis are\n\\begin{align}\n\t&( n_i^\\text{WS} ) = ( 0, 2, 1, 0,0,0,0, 6, 3, 0 )\\,, \\quad\n\t( n_i^\\text{SS} ) = ( 0,0,0, -2, -1, -2, -1, 4, 2, 0 )\\,, \\quad\n\t( n_i^{Y_\\tau} ) = ( -1,0,1,0,0,0,0,0,0,1 )\\,,\\nonumber\\\\\n\t&( n_i^{Y_t} ) = ( 0,0,0,0,-1,0,0,0,1,1 )\\,, \\quad\n\t( n_i^{Y_b} ) = ( 0,0,0,0,0,0, -1, 0, 1, -1 )\\,.\n\t\\label{eq:basis_WOscale}\n\\end{align}\nThese linearly independent vectors span a $5$-dimensional subspace out of $10$.\nThe remaining $5$ vectors orthogonal to Eq.~\\eqref{eq:basis_WOscale} correspond to U$(1)_Y$, U$(1)_{B-L}$, U$(1)_{u_{12}-d_{12}}$, U$(1)_{L_{12}-2 L_3}$, and U$(1)_{B_{12}-2 B_3}$:\n\\begin{align}\n\t&( n_i^{Q_Y} ) = \\left( -1, - \\frac{1}{2}, - \\frac{1}{2}, \\frac{2}{3}, \\frac{2}{3}, - \\frac{1}{3}, - \\frac{1}{3}, \\frac{1}{6}, \\frac{1}{6}, \\frac{1}{2} \\right)\\,, \\quad\n\t( n_i^{Q_{B-L}} ) = \\left( -1, -1, -1, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, 0 \\right)\\,, \\nonumber \\\\\n\t&( n_i^{Q_{u_{12} - d_{12}}} ) = ( 0,0,0,1,0,-1,0,0,0,0 )\\,,\\quad\n\t( n_i^{Q_{L_{12} - 2 L_3}} ) = ( -2, 1, -2, 0,0,0,0,0,0,0 )\\,, \\nonumber\\\\\n\t&( n_i^{Q_{B_{12} - 2 B_3}} ) = \\left( 0,0,0, \\frac{1}{3}, -\\frac{2}{3}, \\frac{1}{3}, -\\frac{2}{3},\\frac{1}{3}, -\\frac{2}{3}, 0 \\right)\\,.\n\t\\label{eq:consv_WOscale}\n\\end{align}\nThe set of $5$ charge vectors \\eqref{eq:basis_WOscale} and conserved charge vectors \\eqref{eq:consv_WOscale} forms a complete basis of the $10$-dimensional space of chemical potentials.\n\n\n\n\\section{Spontaneous $B+L$-genesis before the electroweak phase transition}\n\\label{sec:b+l}\n\nSince the $B+L$ symmetry is violated by the electroweak sphaleron within the SM, it is tempting to discuss the possibility where the present-day baryon asymmetry is generated via this process.\nAt high temperature but below $T_\\text{WS}$, the electroweak sphaleron is efficient and could source the $B+L$ asymmetry.\nAfter the electroweak symmetry breaking, its rate per unit time is exponentially suppressed and $B+L$ becomes an approximately conserved quantity.\nTherefore, if we could generate the $B+L$ asymmetry right before the electroweak phase transition, the resulting asymmetry can explain the present baryon density.\nThe minimal scenario in this context is electroweak baryogenesis, which is unfortunately excluded by the observed Higgs mass and the lack of the sufficient $CP$-violation in the CKM matrix.\nHowever, as is known in the literature, the presence of an axion can reopen the possibility of baryogenesis at the electroweak phase transition~\\cite{Servant:2014bla,Jeong:2018jqe,Co:2019wyp,Croon:2019ugf}.\n\n\nIn this section, we consider spontaneous $B+L$-genesis prior to the electroweak transition.\nSuppose that the axion, which couples to the SM particles with (classically) shift symmetric couplings, has a non-vanishing velocity around the electroweak phase transition.\nThough we do not specify the mechanism, one could for instance consider the coherent axion rotation initiated by a higher dimensional explicit breaking term~\\cite{Co:2019jts,Co:2019wyp} or the onset of coherent axion oscillations.\nAs demonstrated in Sec.~\\ref{sec:basis-indep}, the non-vanishing velocity of the axion biases the chemical potentials.\nConsequently, the $B+L$ asymmetry is generated by the $B+L$-violating electroweak sphaleron, which can account for the present baryon density - even if the axion is not directly coupled to the electroweak sphaleron.\nWe clarify the condition of the coupling to the axion in order to generate the $B+L$ asymmetry.\nWe will see that couplings to the axion which have seemingly nothing to do with $B+L$ current, \\textit{e.g.}, the coupling to the strong sphaleron $a G \\tilde G$, can generate the sufficient $B+L$ asymmetry as shown in Ref.~\\cite{Co:2019wyp}.\n\n\n\n\\subsection{Basic properties of the transport equation}\n\n\\paragraph{Reduction of chemical potentials.}\n\nAs discussed in Sec.~\\ref{sec:SM-charges}, all SM interactions are in equilibrium around the electroweak phase transition.\nThis yields four independent conserved quantities, namely $Q_{Y}, Q_{B-L}$, $Q_{L_1 - L_2}$, and $Q_{L_2-L_3}$.\nSince we are interested in a situation where they have no primordial asymmetries, we have $c_Y = c_{B-L} = c_{L_1 - L_2} = c_{L_2 - L_3} = 0$ [see Eq.~\\eqref{eq:conservation}].\nIn order to reduce the number of species in the chemical potential vectors,\n it is convenient to implement the last two conditions from the beginning.\nIf we do not have primordial asymmetries in $Q_{L_1 - L_2}$ and $Q_{L_2-L_3}$, leptons in different flavors have the same properties.\\footnote{\n\tFor a lepton-flavor dependent axion coupling, this is not the case.\n\tWe restrict ourselves to a lepton-flavor independent axion coupling throughout this paper for simplicity.\n}\nWe can take common chemical potentials, \\textit{i.e.}, $\\mu_{e_f} = \\mu_e$, $\\mu_{L_f} = \\mu_L$ for $f = 1, \\cdots, N_f$.\n\n\nAs we have seen in Sec.~\\ref{sec:SM-charges}, the charge vectors of the SM interactions involve $5$ non-trivial linearly dependent relations among the charge vectors \\eqref{eq:relations-ew}.\nIf the axion couples to operators $O_{\\hat\\alpha_\\perp}$, which are not involved in these relations,\nwe can simplify the equilibrium solution \\eqref{eq:matrix-equil_sol} as\n$\\mu_i^\\text{eq} = \\sum_{\\hat\\alpha_\\perp} M^{-1}_{i \\hat\\alpha_\\perp} n_S^{\\hat \\alpha_\\perp} \\dot a \/ f$ where the actual value of the transport coefficients does not matter.\nOn the other hand, if the axion couples to operators involved in these relations $O_{\\hat\\alpha_\\parallel}$ or $O_{\\alpha_\\Delta}$, the equilibrium solution cannot be simplified in this way, rather we have \n$\\mu_i^\\text{eq} = \\sum_{\\hat\\alpha_\\perp, \\hat\\beta_\\parallel, \\gamma} M^{-1}_{i \\hat\\alpha_\\parallel} \\Gamma^{-1}_{\\hat\\alpha_\\parallel \\hat\\beta_\\parallel} S_{\\hat\\beta_\\parallel \\gamma} n_S^{\\gamma} \\dot a \/ f$.\nHere the matrix $\\sum_{\\hat\\beta_\\parallel}\\Gamma^{-1}_{\\hat\\alpha_\\parallel \\hat\\beta_\\parallel} S_{\\hat\\beta_\\parallel \\gamma}$ does depend on the actual value of the transport coefficients.\nThis explicit dependence should be dominated by the smallest interaction among linearly dependent relations because we have $\\sum_{\\hat\\beta_\\parallel}\\Gamma^{-1}_{\\hat\\alpha_\\parallel \\hat\\beta_\\parallel} S_{\\hat\\beta_\\parallel \\gamma} \\to \\delta_{\\hat\\alpha_\\parallel \\gamma}$ once one of them is switched off.\nTherefore, while we need to keep a value of the smallest transport coefficient, we can take others to be infinite at the end of computations.\nSince we restrict ourselves to a quark-flavor independent axion coupling, \\textit{i.e.,} the axion can only couple to the entire up\/down-type quark Yukawa, the relation among the strong Sphaleron and quark Yukawas in Eq.~\\eqref{eq:relations-ew} is quite important.\nThe first generation up\/down-type Yukawa interactions are the smallest couplings among them.\nHence, in order to estimate the equilibrium solution at leading order, we can take common chemical potentials for the second and third generation right-handed quarks, $\\mu_{u_{23}} = \\mu_{u_2} = \\mu_{u_3}$ and $\\mu_{d_{23}} = \\mu_{d_2} = \\mu_{d_3}$, while those for the first generation take different values.\nMoreover, we can take $\\mu_Q = \\mu_{Q_1} = \\mu_{Q_2} = \\mu_{Q_3}$\nsince they are related by $\\alpha = Y_d^{3f}$ and $Y_d^{2f}$ that are controlled by\nthe second and third generation down-type Yukawa couplings.\n\n\n\n\n\n\n\nAs a result, we can reduce the number of species in the chemical potential $\\mu_i$ from $16$ to $8$ as $i = e, L, u_1, u_{23}, d_1, d_{23}, Q, H$.\nThe corresponding multiplicity factor is $g_i = 3, 6, 3,6, 3,6, 18, 4$ respectively.\nOne may readily read off the charge vectors in this basis from Eqs.~\\eqref{eq:ws}, \\eqref{eq:ss}, \\eqref{eq:Ye}, \\eqref{eq:Yu}, and \\eqref{eq:Yd}:\n\\begin{align}\n\t&(n_i^\\text{WS}) = ( 0, 3, 0, 0, 0, 0, 9, 0 )\\,, \\quad\n\t(n_i^\\text{SS}) = (0, 0, -1,-2, -1,-2, 6, 0)\\,, \\quad\n\t(n_i^{Y_e}) = ( -1, 1, 0, 0, 0, 0, 0, -1)\\,, \\nonumber \\\\\n\t&(n_i^{Y_{u_1}}) = ( 0, 0, -1, 0, 0, 0, 1, 1 )\\,, \\quad\n\t(n_i^{Y_{u_{23}}}) = ( 0, 0, 0, -1, 0, 0, 1, 1 )\\,, \\nonumber \\\\\n\t&(n_i^{Y_{d_1}}) = ( 0, 0, 0, 0, -1, 0, 1, -1 )\\,, \\quad\n\t(n_i^{Y_{d_{23}}}) = ( 0, 0, 0, 0, 0, -1, 1, -1 )\\,.\n\\end{align}\nHere we have $n_i^\\text{SS} = n_i^{Y_{u_1}} + 2 n_i^{Y_{u_{23}}} + n_i^{Y_{d_1}} + 2 n_i^{Y_{d_{23}}}$.\nTwo conserved quantities corresponding to $Q_Y$ and $Q_{B-L}$ provide\n\\begin{align}\n\t(n_i^{Q_Y}) = \\left( -1, - \\frac{1}{2}, \\frac{2}{3}, \\frac{2}{3}, - \\frac{1}{3}, - \\frac{1}{3}, \\frac{1}{6}, \\frac{1}{2} \\right)\\,, \\quad\n\t(n_i^{Q_{B-L}}) = \\left( -1, -1, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, 0 \\right)\\,.\n\\end{align}\n\n\n\\paragraph{Transport matrix.}\nHere we provide explicit forms of matrices \n$\\Gamma_{\\hat\\alpha \\hat\\beta}$ and $S_{\\hat\\alpha \\beta}$ that are useful in obtaining equilibrium solution.\nThroughout this section, we choose the complete basis of the charge vectors for interactions as $n_i^{\\hat\\alpha}$ with $\\hat\\alpha = \\text{WS}, Y_e, \\text{SS}, Y_{u_{23}}, Y_{d_{1}}, Y_{d_{23}}$.\nTogether with $n_i^A$ with $A = Q_Y, Q_{B-L}$, they form a complete basis, and\nit is straightforward to compute its dual basis $\\bar n_i^X$.\nFrom this, we obtain the inverse matrix of $M_{Xi}$ in Eq.~\\eqref{eq:matrix-equil} \nas\\small\n\\begin{align}\n\t(M_{iX}^{-1}) = \n\t\\begin{pmatrix}\n\t\t\\frac{22}{237} & -\\frac{55}{79} & -\\frac{13}{79} & 0 & \\frac{15}{79} & \\frac{30}{79} & -\\frac{5}{79} & -\\frac{3}{79} \\\\\n \\frac{25}{237} & \\frac{33}{158} & -\\frac{4}{79} & 0 & -\\frac{9}{158} & -\\frac{9}{79} & \\frac{3}{158} & -\\frac{7}{79} \\\\\n \\frac{7}{79} & -\\frac{13}{79} & -\\frac{206}{237} & 2 & \\frac{61}{79} & \\frac{122}{79} & \\frac{6}{79} & -\\frac{5}{237} \\\\\n \\frac{7}{79} & -\\frac{13}{79} & \\frac{31}{237} & -1 & -\\frac{18}{79} & -\\frac{36}{79} & \\frac{6}{79} & -\\frac{5}{237} \\\\\n \\frac{5}{79} & \\frac{2}{79} & -\\frac{23}{237} & 0 & -\\frac{58}{79} & \\frac{42}{79} & -\\frac{7}{79} & \\frac{19}{237} \\\\\n \\frac{5}{79} & \\frac{2}{79} & -\\frac{23}{237} & 0 & \\frac{21}{79} & -\\frac{37}{79} & -\\frac{7}{79} & \\frac{19}{237} \\\\\n \\frac{6}{79} & -\\frac{11}{158} & \\frac{4}{237} & 0 & \\frac{3}{158} & \\frac{3}{79} & -\\frac{1}{158} & \\frac{7}{237} \\\\\n \\frac{1}{79} & -\\frac{15}{158} & \\frac{9}{79} & 0 & -\\frac{39}{158} & -\\frac{39}{79} & \\frac{13}{158} & -\\frac{4}{79}\n\t\\end{pmatrix}\\,,\n\t\\label{eq:Minv_sec4}\n\\end{align}\n\\normalsize\nand also transport matrices $\\Gamma_{\\hat\\alpha \\hat\\beta}$ and $S_{\\hat\\alpha\\beta}$ in Eq.~\\eqref{eq:transport_matrix} as\\tiny\n\\begin{align}\t\n\t(\\Gamma_{\\hat\\alpha \\hat\\beta}) = \n\t\\begin{pmatrix}\n\t\t\\Gamma_\\text{WS} & & & & & \\\\\n & \\Gamma_{Y_e} & & & & \\\\\n & & \\Gamma_\\text{SS}+\\Gamma_{Y_{u_1}}& -2 \\Gamma_{Y_{u_1}}& -\\Gamma_{Y_{u_1}}& -2 \\Gamma_{Y_{u_1}}\\\\\n & & -2 \\Gamma_{Y_{u_1}}& 4 \\Gamma_{Y_{u_1}}+\\Gamma_{Y_{u_{23}}} & 2 \\Gamma_{Y_{u_1}}& 4 \\Gamma_{Y_{u_1}}\\\\\n & & -\\Gamma_{Y_{u_1}}& 2 \\Gamma_{Y_{u_1}}& \\Gamma_{Y_{d_1}}+\\Gamma_{Y_{u_1}}& 2 \\Gamma_{Y_{u_1}}\\\\\n & & -2 \\Gamma_{Y_{u_1}}& 4 \\Gamma_{Y_{u_1}}& 2 \\Gamma_{Y_{u_1}}& \\Gamma_{Y_{d_{23}}}+4 \\Gamma_{Y_{u_1}}\n\t\\end{pmatrix}\\,, \\quad\t\n\t(S_{\\hat\\alpha \\beta}) = \n\t\\begin{pmatrix}\n\t\t\\Gamma_\\text{WS} & & & & & & \\\\\n & \\Gamma_{Y_e} & & & & & \\\\\n & & \\Gamma_\\text{SS} & & & & \\Gamma_{Y_{u_1}} \\\\\n & & & \\Gamma_{Y_{u_{23}}} & & & -2 \\Gamma_{Y_{u_1}} \\\\\n & & & & \\Gamma_{Y_{d_1}} & & -\\Gamma_{Y_{u_1}} \\\\\n & & & & & \\Gamma_{Y_{d_{23}}} & -2 \\Gamma_{Y_{u_1}}\n\t\\end{pmatrix}\\,.\n\t\\label{eq:GammaS-sec4}\n\\end{align}\n\\normalsize\nHere $\\Gamma_{Y_{u_{23}}}$ and $\\Gamma_{Y_{d_{23}}}$ in this matrix may be expressed as functions of $\\Gamma_{Y_{u_f}}$ and $\\Gamma_{Y_{d_f}}$ with $f=2,3$ because we have taken common chemical potentials for the second and third generation right-handed quarks.\nAs explained, the actual values of the transport coefficients only matter if the axion couples to an operator whose charge vector belongs to the set of linearly dependent charge vectors.\nMoreover, to evaluate the equilibrium solution at leading order in this case, we only need to keep the smallest interactions to be finite while taking the others to infinity at the end of the computation.\nTherefore, the precise values of $\\Gamma_{Y_{u_{23}}}$ and $\\Gamma_{Y_{d_{23}}}$ are not important as long as $\\Gamma_{Y_{u_{1}}}, \\Gamma_{Y_{d_{1}}} \\ll \\Gamma_{Y_{u_{23}}},\\Gamma_{Y_{d_{23}}}$, which is always fulfilled in our case because of $y_{u_1}, y_{d_1} \\ll y_{u_2}, y_{u_3}, y_{d_2}, y_{u_3}$.\nOne can check this explicitly starting from the full $16 \\times 16$ matrices and taking $y_{u_1}, y_{d_1} \\ll y_{u_2}, y_{u_3}, y_{d_2}, y_{u_3}$ at the end of the computation.\n\n\n\n\n\n\\subsection{Equilibrium solution including the axion}\nNow we are ready to discuss the equilibrium solution for the chemical potentials $\\mu_i$ in the presence of an axion with non-vanishing $\\dot a$.\nFrom this, we get the condition of the axion coupling in order to generate a baryon asymmetry.\nWe also discuss the condition so that the axion is not stopped by the backreaction.\n\n\n\\paragraph{Condition for baryogenesis.}\nThe $B+L$ asymmetry is given by\n\\begin{align}\n \tq_{B+L} = \\mu_{B+L} \\frac{T^2}{6} \\qquad \\text{with} \\quad \\mu_{B+L} \n \t= 3\\left(\\mu_e + 2\\mu_L\\right) + \\mu_{u_1} + \\mu_{u_2} + 2\\left(\\mu_{u_{23}} + \\mu_{d_{23}}\\right) + 6\\mu_Q\\,.\n\\end{align}\nThe equilibrium solution for the chemical potentials $\\mu_i$ is given by Eq.~\\eqref{eq:matrix-equil_sol}, with the matrices $M_{iX}$, $\\Gamma_{\\hat \\alpha \\hat \\beta}$ and $S_{\\hat \\alpha \\beta}$ given in Eqs.~\\eqref{eq:Minv_sec4} and \\eqref{eq:GammaS-sec4}. Let's suppose for simplicity that we do not have any primordial asymmetries for $q_y$ or $q_{B-L}$, \\textit{i.e.}, $c_{Q_y} = c_{Q_{B-L}} = 0$. The baryon asymmetry can thus be expressed as a linear combination of the source terms appearing on the right-hand side of Eq.~\\eqref{eq:matrix-equil}, incorporating the couplings to the axion. A non-zero baryon asymmetry is generated as long as the source vector is \\textit{not} orthogonal to the direction in $\\alpha$-space which is subject to baryon number changing interactions, as derived in Eq.~\\eqref{eq:cond_asym}. \nAs mentioned, we assume that the axion couples to the SM particles in a flavor independent way, which means that the source vectors fulfill $n_S^{Y_u} = n_S^{Y_{u_1}} = n_S^{Y_{u_{23}}}$ and $n_S^{Y_d} = n_S^{Y_{d_1}} = n_S^{Y_{d_{23}}}$.\nInserting the expressions in Eqs.~\\eqref{eq:Minv_sec4} and \\eqref{eq:GammaS-sec4} we obtain the condition for generating a $B+L$ asymmetry:\n\\begin{align}\n \\left(n_S^\\text{WS}, n_S^{Y_e}, n_S^\\text{SS}, n_S^{Y_d}, n_S^{Y_u} \\right) \\not\\perp v_\\gamma^{B+L}\n\\end{align}\nwith\n\\begin{align}\n v_\\gamma^{B+L} \n &\\simeq\n \\frac{6}{79} \\left(24, -22, \\frac{- 3 (7 \\Gamma_{Y_{d_1}} + 5 \\Gamma_{Y_{u_1}})}{\\Gamma_{Y_{u_1}} + \\Gamma_{Y_{d_1}}}, \\frac{18 \\Gamma_{Y_{d_1}}}{\\Gamma_{Y_{u_1}} + \\Gamma_{Y_{d_1}}},\\frac{-18 \\Gamma_{Y_{u_1}}}{\\Gamma_{Y_{\n u_1}} + \\Gamma_{Y_{d_1}}} \\right) \n\\end{align}\nThe appearance of the interaction rates for the strong sphaleron and up\/down-type Yukawas in the last three entries in the first line is due to the linear dependence between the respective charge vectors, as discussed above.\nHere we have used the fact that $\\Gamma_{Y_{u_1}},\\Gamma_{Y_{d_1}} \\ll \\Gamma_\\text{SS}, \\Gamma_{Y_{u_{23}}}, \\Gamma_{Y_{d_{23}}}$. From Eq.~\\eqref{eq:equilibrium_solution}, the equilibrium solution for the $B+L$ asymmetry is now immediately obtained as\n\\begin{align}\n \\mu_{B+L}^\\text{eq} = \\sum_\\gamma v_\\gamma^{B+L} n^\\gamma_S \\frac{\\dot a}{f} \\,.\n\\end{align}\n\n\n\nTo give some concrete examples, the coupling to the electroweak sphaleron, $(n_S^\\alpha) = (1,0,0,0,0)$, or a direct coupling to the $B+L$ current [see below \\eq{eq:sourcevec}], \n\\begin{align}\n (n_S^{\\alpha}) \n &= \\sum_i n_i^{Q_{B+L}} (n_i^\\alpha) \n \\nonumber\\\\\n &= (n^\\alpha_{e}) + (n^\\alpha_L) + \\frac{1}{3} ( n_u^\\alpha + n_d^\\alpha + n_Q^\\alpha ) = (6,0,0,0,0)\\,,\n \\label{eq:nS_B+L}\n\\end{align}\nclearly satisfy the condition for generating a baryon asymmetry. This is not surprising since both operators violate $B+L$. \nBy performing a $B+L$ rotation of the SM fermions, the coupling to the electroweak sphaleron can be rewritten as the coupling to the $B+L$ current. The above two charge vectors $n_S^\\alpha$ coincide up to an overall factor reflecting the invariance under this field rotation.\n\n\n\nAccording to the condition above, a coupling to the strong sphaleron $(n_S^\\alpha) = (0,0,1,0,0)$, the lepton Yukawa $(n_S^\\alpha) = (0,1,0,0,0)$, and the up\/down-type quark Yukawas $(n_S^\\alpha) = (0,0,0,0,1), (0,0,0,1,0)$ will also generate a baryon asymmetry. The coupling to the strong sphaleron $a G \\tilde G$ is particularly interesting because it is present in QCD axion models.\nThese examples are more surprising since these operators do not violate $B+L$.\nHowever, they generate an asymmetry for the left-handed leptons\/quarks, which can then be converted into a baryon asymmetry by the electroweak sphaleron. \n\n\nMore generally, this result explicitly demonstrates that a generic shift-symmetric coupling of an axion to SM particles typically generates a baryon asymmetry - in fact there is only one particular linear combinations of operators which, when coupled to the axion, does not source a baryon asymmetry. This is because, unless we choose a very specific coupling such that the electroweak sphaleron is not involved in achieving the equilibrium with $\\dot a \\neq 0$, the baryon asymmetry is generated.\nSince there is no reason for this specific coupling to be realized, we conclude that the generation of the baryon asymmetry is a generic consequence of the axion coupling to the SM particles if the homogeneous axion velocity is non-vanishing at the electroweak phase transition.\n\n\n\n\n\n\n\\paragraph{Backreaction to the axion.}\nLet us briefly discuss the effective friction term \\eqref{eq:axion_dissipation} for the axion.\\footnote{\n\tThroughout this paper, we assume that the SM particles are in equilibrium. This, however, implicitly assumes that the tachyonic instability of the gauge field via the Chern-Simons coupling $a W \\tilde W$ is suppressed.\n\tIn our case, this assumption is fulfilled because the typical axion velocity we have in mind is small, $\\dot a \/ f T \\sim 10^{-10}$, and the non-abelian gauge field acquires the magnetic mass term from the ambient plasma~(see \\textit{e.g.}\\cite{Hook:2016mqo}).\n}\nAs shown in Eq.~\\eqref{eq:zero-friction}, the effective friction term vanishes identically if the axion couples to the the electroweak Chern-Simons term or the lepton Yukawa:\n\\begin{align}\n\t\\gamma^\\text{eff}_{a, \\text{WS}} = \\gamma^\\text{eff}_{a, Y_e} = 0\\,.\n\\end{align}\nOn the other hand, the charge vectors for the strong sphaleron and the up\/down-type quark Yukawas are linearly dependent: $n_i^\\text{SS} = n_i^{Y_{u_1}} + 2 n_i^{Y_{u_{23}}} + n_i^{Y_{d_1}} + 2 n_i^{Y_{d_{23}}}$.\nHence, if the axion couples to these operators, the effective friction term becomes non-zero (for $\\gamma^\\text{eff}_{a, \\text{SS}} $ see also Ref.~\\cite{McLerran:1990de,Co:2019wyp}):\n\\begin{align}\n\t\\gamma^\\text{eff}_{a, \\text{SS}} \n\t\\simeq \\frac{1}{f^2 T} \\frac{1}{\\Gamma_{Y_{u_1}}^{-1} + \\Gamma_{Y_{d_1}}^{-1}} \\,,\\quad\n\t\\gamma^\\text{eff}_{a, Y_u} = \\gamma^\\text{eff}_{a, Y_d} \n\t\\simeq \\frac{1}{f^2 T} \\frac{9}{\\Gamma_{Y_{u_1}}^{-1} + \\Gamma_{Y_{d_1}}^{-1}}\\,.\n\\end{align}\nHere again we have used $\\Gamma_{Y_{u_1}},\\Gamma_{Y_{d_1}} \\ll \\Gamma_\\text{SS}, \\Gamma_{Y_{u_{23}}}, \\Gamma_{Y_{d_{23}}}$.\nOne can see that all of them have a similar value, \\textit{i.e.}, $\\gamma^\\text{eff}_{a, \\text{SS}} \\sim \\gamma^\\text{eff}_{a, Y_{u\/d}} \\sim \\kappa_{Y_u} y_u^2 T^3 \/ f^2$.\nBy comparing it with the Hubble parameter, we get the following condition for neglecting the backreaction:\n\\begin{align}\n\t\\frac{f^2}{T} \\gtrsim 10^6 \\,\\mathrm{GeV}\\,.\n\\end{align}\nRestricting the discussion to below the Peccei-Quinn breaking scale, $T\/f \\lesssim 1$, this implies that the backreaction can be neglected for $f \\gtrsim 10^6$~GeV.\n\n\n\n\n\\section{Spontaneous $B-L$-genesis around the reheating epoch}\n\\label{sec:b-l}\nIn this section, we consider an example of spontaneous baryogenesis\nat $T \\sim 10^{13}\\,\\mathrm{GeV}$, \\textit{i.e.}, during a much earlier epoch than the previous example in Sec.~\\ref{sec:b+l}.\nIt is well-known that the SM left-handed neutrinos are massive, which cannot be explained\nwithin the dimension four operators of the SM.\nA simple way to explain the neutrino masses is to introduce the dimension five Weinberg operator \n(suppressing species indices) as\n\\begin{align}\n\t\\mathcal{L}_{\\nu} = - \\frac{m_{\\nu}}{2v_{\\text{EW}}^{2}} \\left( L \\cdot H \\right)^{2} + \\text{H.c.}\\,,\n\t\\label{eq:LHLH}\n\\end{align}\nwhere $m_\\nu$ is the mass of the left-handed neutrino and $v_\\mathrm{EW} \\simeq 174\\,\\mathrm{GeV}$ \nis the Higgs vacuum expectation value.\nThis operator provides effective masses for the left-handed neutrinos after the electroweak symmetry breaking,\nand may be obtained from integrating out heavy right-handed neutrinos. Being a dimension five operator, the Weinberg operator becomes more effective at high temperatures.\nAs it violates lepton number, \nit (with the help of an axion) \ncan be a source of $B-L$ asymmetry in the early universe.\n\nAn overview of our $B-L$-genesis scenario in this section is as follows.\nWe introduce an axion and its shift symmetric coupling to the SM sector,\n\\textit{e.g.}, $a W\\tilde{W}$ or $a G\\tilde{G}$.\nSuppose that the axion develops a non-vanishing velocity before the Weinberg operator decouples from equilibrium.\nThe chemical potentials for the SM particles are then biased toward nonzero values via the shift-symmetric couplings. \nAs a result, a $B-L$ asymmetry is generated by the lepton number violating Weinberg operator. \nAs we will see shortly, \nthe lepton number violating interaction decouples at the temperature of order $10^{13}$\\,GeV. \nIf the axion keeps moving until this moment,\nthe produced $B-L$ asymmetry is never washed out afterwards,\nand is eventually converted to the baryon asymmetry of the present universe.\n\nMore explicitly, the baryon asymmetry in the present-day Universe, $Y_B$\n(= $9 \\times 10^{-11}$ from observation~\\cite{Ade:2015xua}),\nis given in terms of the final $B-L$ asymmetry as\n\\begin{align}\n Y_B = \\frac{q_B}{s} = \\frac{T^3}{6 \\, s} \\frac{\\mu_B}{T} = - \\frac{C_\\text{sph} T^3}{6 \\, s} \\frac{\\mu_{B-L}}{T} \\simeq - 0.03 \\, \\frac{\\mu_{B-L}}{T}\n \\label{eq:B-LtoB}\n\\end{align}\nwhere $s= 2 \\pi^2\/45 g_* T^3$ denotes the entropy of the thermal bath with $g_{*,0} = 43\/11$ counting the effective degrees of freedom, and $C_\\text{sph} = 8\/23$ indicates the sphaleron conversion factor translating the $B-L$ asymmetry into a baryon asymmetry at the electroweak phase transition.\n\n\nIn this section, we compute the resulting $B-L$ asymmetry well after the decoupling of the Weinberg operator.\nWe also clarify the condition of the coupling to the axion so that the $B-L$ asymmetry is generated.\nWe will see, for instance, the coupling to the strong sphaleron, which at first glance has nothing to do with $B-L$ or $B+L$ charges, \ncan produce a sufficient $B-L$ asymmetry.\n\n\\subsection{Transport equation including the Weinberg operator}\n\\label{subsec:b-l_transport_eq}\n\n\\paragraph{Weinberg operator.}\nHere we summarize the basic properties of the Weinberg operator~\\eqref{eq:LHLH}.\nWe assume that it is flavor-universal for simplicity.\nThen the rate per unit volume is also flavor-blind and is estimated as\n\\begin{align}\n\t\\Gamma_\\mathrm{W} = \\kappa_{\\rm W} \\frac{m_{\\nu}^2 T^6}{v_{\\text{EW}}^{4}}. \n\t\\label{Gamma_W}\n\\end{align}\nwhere $\\kappa_{\\rm W} \\sim 3 \\times 10^{-3}$. \nWe define the decoupling temperature of the lepton number violating process mediated by the flavor-universal Weinberg operator, $T_{\\rm W}$,\nby looking at the coefficient of the transport equation for the total lepton number density: \n\\begin{align}\n\t- \\frac{\\mathrm{d}}{\\mathrm{d} \\ln T} \\lmk 2 \\frac{\\mu_{L_1} +\\mu_{L_2} + \\mu_{L_3}}{3T} - 2 \\frac{\\mu_H}{T} \\right) \n\t= - \\sum_i \\frac{1}{g_i} \\lmk n_{i}^{\\rm W} \\right)^2 \\frac{3 \\gamma_{\\rm W}}{H}\n \\lmk 2 \\frac{\\mu_{L_1} +\\mu_{L_2} + \\mu_{L_3}}{3T} - 2 \\frac{\\mu_H}{T} \\right) \n+ \\dots, \n\\end{align}\nWe thus define the decoupling temperature by $5 \\gamma_{W} = H$. \nIt is calculated as \n\\begin{align}\n\tT_\\mathrm{W} \\simeq 6\\times 10^{12}\\,\\mathrm{GeV}\\times \\left(\\frac{0.05\\,\\mathrm{eV}}{m_\\nu}\\right)^2. \n\t\\label{eq:T_W}\n\\end{align}\nNote that the lepton number violating interaction is in thermal equilibrium when the temperature is {\\it higher} than $T_{\\rm W}$. \nOn the other hand, the other (SM) interactions $\\alpha$ (the sphalerons and the Yukawa interactions) are in thermal equilibrium when the temperature is {\\it lower} than $T_\\alpha$.\nThis is the reason why we refer to $T_\\mathrm{W}$ as the decoupling temperature as opposed to the term equilibration temperature used for the other interactions.\n\n\n\\paragraph{Transport equation.}\nWe are interested in the transport equation around the temperature of $T \\sim T_W \\sim 10^{13}\\,\\mathrm{GeV}$.\nAs we discussed in Sec.~\\ref{sec:SM-charges}, \nwe can focus on the chemical potentials of $10$ species\nat such a high temperature,, \\textit{i.e.}, $\\mu_i$ with $i = \\tau, L_{12}, L_3, u_{12}, t, d_{12}, b, Q_{12}, Q_3, H$.\nWe further assume that there is no initial charge asymmetry between $u_{12}$ and $d_{12}$, or $c_{u_{12}-d_{12}} = 0$,\nin this section.\nIt allows us to combine $u_{12}$ and $d_{12}$ as $q_{12}$.\nIn summary, the chemical potentials of our interest are $\\mu_i$ with\n\\begin{align}\n\ti = \\tau, ~L_{12}, ~L_3, ~q_{12}, ~t, ~b, ~Q_{12}, ~Q_3, ~H,\n\\end{align}\nand the multiplicity factor is $g_i = 1, 4, 2, 12, 3, 3, 12, 6, 4$ respectively.\nThe charge vectors of the relevant interactions are\\footnote{\nWe should note that there are three lepton number violating interactions \nthough we combine two of them into a single charge vector $n_i^{W_{12}}$. \nThe interaction rate should be then given by $\\Gamma_{{\\rm W}_{12}} = 2 \\Gamma_{{\\rm W}_3} = 2 \\Gamma_{\\rm W}$. \n}\n\\begin{align}\n\t&( n_i^\\text{WS} ) = ( 0, 2, 1, 0,0,0, 6, 3, 0 )\\,, \\quad\n\t( n_i^\\text{SS} ) = ( 0,0,0, -4, -1, -1, 4, 2, 0 )\\,, \\quad\n\t( n_i^{Y_\\tau} ) = ( -1,0,1,0,0,0,0,0,1 )\\,,\\nonumber\\\\\n\t&( n_i^{Y_t} ) = ( 0,0,0,0,-1,0,0,1,1 )\\,, \\quad\n\t( n_i^{Y_b} ) = ( 0,0,0,0,0, -1, 0, 1, -1 )\\,, \\nonumber\\\\\n\t&( n_i^{W_{12}} ) = (0,2,0,0,0,0,0,0,2)\\,, \\quad\n\t( n_i^{W_3} ) = (0,0,2,0,0,0,0,0,2).\n\t\\label{eq:b-l_int_vectors}\n\\end{align}\nThese linearly independent vectors span a $7$-dimensional subspace out of $9$.\nNote that all the charge vectors $n_i^\\alpha$ are linearly independent,\nand hence the axion does not have any friction term in equilibrium.\nThe remaining $2$ vectors orthogonal to Eq.~\\eqref{eq:b-l_int_vectors} correspond \nto U$(1)_Y$ and U$(1)_{B_{12}-2 B_3}$:\n\\begin{align}\n\t&( n_i^{Q_Y} ) = \\left( -1, - \\frac{1}{2}, - \\frac{1}{2}, \\frac{1}{6}, \\frac{2}{3}, - \\frac{1}{3}, \\frac{1}{6}, \\frac{1}{6}, \\frac{1}{2} \\right)\\,, \\quad\n\t( n_i^{Q_{B_{12} - 2 B_3}} ) = \\left( 0,0,0, \\frac{1}{3}, -\\frac{2}{3}, -\\frac{2}{3},\\frac{1}{3}, -\\frac{2}{3}, 0 \\right)\\,.\n\\end{align}\nThese vectors form a complete basis of the $9$-dimensional chemical potential space.\nHere that $U(1)_{B-L}$ is no longer a conserved charge because of the Weinberg operator.\nThe transport equation of our system is given by Eq.~\\eqref{eq:fulltransporteq}, which we show here again for reader's convenience:\n\\begin{align}\n\t- \\frac{\\mathrm{d}}{\\mathrm{d} \\ln T} \\lmk \\frac{\\mu_i}{T} \\right) = -\\frac{1}{g_i}\\sum_\\alpha n_{i}^{\\alpha} \\frac{\\gamma_\\alpha}{H}\n\t\\left[\\sum_{j}n_{j}^{\\alpha} \\lmk \\frac{\\mu_j}{T} \\right) - n_{S}^{\\alpha} \\lmk \\frac{\\dot{a}\/f}{T} \\right) \\right],\n\t\\label{eq:transport_eq_sec5}\n\\end{align}\nwith the charge vectors $n_i^\\alpha$ defined above.\n\n\nSince the bottom\/tau Yukawa couplings and the electroweak sphaleron are only marginally relevant at $T \\sim 10^{13}\\,\\mathrm{GeV}$,\nwe may further ignore them when we discuss the equilibrium solutions in Sec.~\\ref{subsec:b-l_equilibrium}.\nThese interactions are however fully included in our numerical results in Secs.~\\ref{subsec:b-l_numerics} and~\\ref{subsec:axion_model}.\n\n\n\\subsection{Equilibrium solution including the axion}\n\\label{subsec:b-l_equilibrium}\n\nIn this subsection, we discuss the equilibrium solution\nto get a rough idea of the $B-L$ asymmetry generation in our system.\nOur primary goal here is to derive a condition for the axion source vector $n_S^\\alpha$\nto obtain a non-zero $B-L$ asymmetry in equilibrium.\n\n\nIn this subsection, we ignore the bottom and tau Yukawa interactions in order to simplify our analysis.\nThe right-handed tau lepton $\\tau$ then plays no role and hence we omit it.\nThe right-handed bottom quark $b$ can be combined with $q_{12}$ (we denote them as $q$) \nby assuming that there is no initial asymmetry between $b$ and $q_{12}$.\nWe can also combine $L_{12}$ and $L_3$ as $L$ by again assuming that there is no initial asymmetry between them,\nsince we take the lepton number violating process as flavor-universal.\nThus, the chemical potentials of our interest reduce to $\\mu_i$ with\n\\begin{align}\n\ti = L, ~q, ~t, ~Q_{12}, ~Q_3, ~H,\n\\end{align}\nand the multiplicity factors are $g_i = 6, 15, 3, 12, 6, 4$ respectively.\nThe charge vectors of the relevant interactions are\n\\begin{align}\n\t&( n_i^\\text{WS} ) = (3, 0, 0, 6, 3, 0 )\\,, \\quad\n\t( n_i^\\text{SS} ) = ( 0,-5, -1, 4, 2, 0 )\\,, \\nonumber\\\\\n\t&( n_i^{Y_t} ) = ( 0,0,-1,0,1,1 )\\,, \\quad\n\t( n_i^{W} ) = (2,0,0,0,0,2),\n\\end{align}\nand the conserved charges are $Q_Y$ and $Q_{B_{12} - 2 B_3}$ with their charge vectors\n\\begin{align}\n\t&( n_i^{Q_Y} ) = \\left(-\\frac{1}{2}, \\frac{1}{15}, \\frac{2}{3}, \\frac{1}{6}, \\frac{1}{6}, \\frac{1}{2} \\right)\\,, \\quad\n\t( n_i^{Q_{B_{12}-2B_3}} ) = \\left(0, \\frac{2}{15}, -\\frac{2}{3}, \\frac{1}{3}, -\\frac{2}{3}, 0 \\right)\\,.\n\\end{align}\nAs the electroweak sphaleron is only marginally relevant, we may further ignore it.\nIn such a case the baryon number $Q_B$ is also conserved,\nwhose charge vector is\n\\begin{align}\n\tn_{i}^{Q_{B}} = \\left(0, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, 0\\right).\n\\end{align}\nThe $B-L$ charge vector in this basis is expressed as \n\\begin{align}\n\tn_{i}^{Q_{B-L}} = \\left(-1, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, \\frac{1}{3}, 0\\right).\n\\end{align}\nIn this case, all the charge vectors of the interactions are linearly independent,\nand hence we can directly apply Eq.~\\eqref{eq:cond_asym_lind} \nas a condition for the source vector $n_S^\\alpha$\nto generate a non-zero $B-L$ asymmetry.\nThe condition reads\n\\begin{align}\n\t(n_S^{\\mathrm{WS}}, n_S^{\\mathrm{SS}}, n_S^{Y_t}, n_S^{W})\n\t\\not\\perp\n\t\\frac{1}{174} (92, -114, 270, -345),\n\t\\label{eq:b-l_with_ws}\n\\end{align}\nif the electroweak sphaleron is in equilibrium, and\n\\begin{align}\n\t(n_S^{\\mathrm{SS}}, n_S^{Y_t}, n_S^{W})\n\t\\not\\perp\n\t\\frac{3}{44} (-3, 18, -23),\n\t\\label{eq:b-l_without_ws}\n\\end{align}\nif the electroweak sphaleron is decoupled, respectively. \nAccordingly, the $B-L$ asymmetry is given by\n\\begin{align}\n\t\\frac{\\mu_{B-L}^\\mathrm{eq}}{T} \n\t=\n\t\\left(\\frac{46}{87}n_S^{\\mathrm{WS}}\n\t-\\frac{19}{29}n_S^{\\mathrm{SS}} + \\frac{45}{29}n_S^{Y_t} - \\frac{115}{58}n_S^{W} \\right)\\frac{\\dot{a}\/f}{T} ,\n\\end{align}\nif the electroweak sphaleron is in equilibrium, and\n\n\\begin{align}\n\t\\frac{\\mu_{B-L}^\\mathrm{eq}}{T}\n\t=\n\t\\left(-\\frac{9}{44}n_S^{\\mathrm{SS}} + \\frac{27}{22}n_S^{Y_t} - \\frac{69}{44}n_S^{W} \\right)\\frac{\\dot{a}\/f}{T},\n\\end{align}\nif the electroweak sphaleron is out of equilibrium, respectively.\nHere we have assumed $c_Y = c_{B_{12}-2B_3} = 0$ for the former case\nand $c_Y = c_{B_{12}-2B_3} = c_{B} = 0$ for the latter case.\n\nThe conditions~\\eqref{eq:b-l_with_ws} and~\\eqref{eq:b-l_without_ws}\ntell us that, in the presence of the Weinberg operator, it is difficult \\textit{not} to produce the $B-L$ asymmetry\nonce the axion has shift-symmetric couplings to the SM particles\nwhich are relevant at that temperature.\nIn order not to produce the $B-L$ asymmetry,\nthe axion has to couple to the operators in a specific form such that\nits source vector is orthogonal to the right hand side of Eq.~\\eqref{eq:b-l_with_ws} or \\eqref{eq:b-l_without_ws}.\nThere is no reason for this to be the case, \nand hence we conclude that the generation of the $B-L$ asymmetry is a rather generic consequence\nof the axion shift-symmetric couplings to the SM particles \nif the homogeneous axion velocity is non-vanishing around $10^{13} \\,\\mathrm{GeV}$.\n\nSo far we have studied the equilibrium solutions.\nIn the next section, \nwe study three concrete scenarios numerically, without assuming equilibrium.\nFirst, we study the scenario that the axion couples to the divergence of the $B-L$ current,\na scenario often considered in the context of spontaneous baryogenesis.\\footnote{\n\tHere we consider the $B-L$ current, not the lepton current, to match with Ref.~\\cite{Kusenko:2014uta},\n\twhich does not incorporate the electroweak sphaleron in the transport equation.\n\tWe have numerically checked, however, that the final $B-L$ asymmetry is almost the same \n\tfor these two cases (the lepton current case tends to be slightly more suppressed).\n\tThis is because the axion directly couples to the Weinberg operator in both cases\n\twhich gives the dominant source of the $B-L$ asymmetry generation.\n}\nSecond, we study the coupling $a W \\tilde{W}$,\nwhich is also studied in Refs.~\\cite{Kusenko:2014uta,Takahashi:2015waa,Bae:2018mlv}.\nAs one can see from Eq.~\\eqref{eq:b-l_with_ws}, \nit can produce the $B-L$ asymmetry if the electroweak sphaleron is efficient enough.\nIn reality, however, the electroweak sphaleron is only marginally relevant when the Weinberg operator is efficient \n(or $T \\gtrsim 10^{13}\\,\\mathrm{GeV}$).\nThus, the resultant $B-L$ asymmetry is expected to be suppressed compared to the above estimation \nbased on the full equilibration of the electroweak sphaleron.\nWe will study this suppression factor numerically below.\nWe also clarify an issue in Refs.~\\cite{Kusenko:2014uta,Takahashi:2015waa} and its relation to the basis independence.\nFinally, we study the coupling $a G\\tilde{G}$,\nwhich might be the most non-trivial scenario.\nWe can see from Eqs.~\\eqref{eq:b-l_with_ws} and~\\eqref{eq:b-l_without_ws}\nthat a nonzero $B-L$ asymmetry is generated\neven if the axion couples only to the strong sphaleron or the top Yukawa coupling, \nwhich by them self cannot generate baryon nor lepton asymmetry. \nBelow we numerically confirm that it is also the case without assuming equilibrium.\n\n\n\n\\subsection{Numerical results}\n\\label{subsec:b-l_numerics}\nNow we study the $B-L$-genesis at $T \\sim 10^{13}\\,\\mathrm{GeV}$\nby solving the full transport equation~\\eqref{eq:transport_eq_sec5} numerically.\nAlthough we have ignored the bottom and tau Yukawa interactions in the previous Sec.~\\ref{subsec:b-l_equilibrium},\nwe fully take them into account in our numerical code.\nThus the chemical potentials of our interest are $\\mu_i$ with\n\\begin{align}\n\ti = \\tau, ~L_{12}, ~L_3, ~q_{12}, ~t, ~b, ~Q_{12}, ~Q_3, ~H,\n\\end{align}\nand we have solved the transport equation~\\eqref{eq:transport_eq_sec5} for them\nby assuming that there is no asymmetry at the end of the reheating,\n\\begin{align}\n\t\\mu_i(T = T_R) = 0,\n\\end{align}\nwhere $T_R$ is the reheating temperature.\n\nThe axion acts as an external force in Eq.~\\eqref{eq:transport_eq_sec5}.\nWe consider two types of the axion dynamics.\nFor the first case, we simply take\n\\begin{align}\n\t\\frac{\\dot{a}\/f}{T} = \\eta_0,\n\\end{align}\nwith $\\eta_0$ being a constant.\nWe also consider a more realistic case\nthat the axion starts to oscillate harmonically around its potential minimum \nat $T = T_\\mathrm{osc}$, and decays at $T = T_\\mathrm{dec}$.\nAn oscillating scalar field scales as\n\\begin{align}\n\t\\dot{\\phi} = v(t) \\sin\\left(m_\\phi t\\right),\n\t\\quad\n\t\\dot{v} = -\\frac{3H}{2}v.\n\\end{align}\nTherefore, we parametrize the axion dynamics assuming radiation domination as\n\\begin{align}\n\t\\frac{\\dot{a}\/f}{T} = \\eta_0 \\left(\\frac{T}{T_\\mathrm{osc}}\\right)^{1\/2}\n\t\\sin\\left[\\left(\\frac{T_\\mathrm{osc}}{T}\\right)^2 - 1\\right]\n\t\\Theta\\left[\\left(T_\\mathrm{osc}-T\\right)\\left(T-T_\\mathrm{dec}\\right)\\right],\n\\end{align}\nwhere we have taken the axion mass as $m_a = 2 H(T=T_\\mathrm{osc})$ and $\\Theta$ is the Heaviside theta function.\nHere $\\eta_0$ parametrizes the initial velocity of the axion.\nThe final $B-L$ asymmetry is proportional to $\\eta_0$ since the transport equation is linear.\nNote that $T_\\mathrm{osc} \\gtrsim T_W \\gtrsim T_\\mathrm{dec}$ is needed for the $B-L$-genesis\nsince otherwise either the produced asymmetry is washed out after the axion decay (for $T_\\mathrm{dec} \\gg T_W$),\nor no asymmetry is produced (for $T_\\mathrm{osc} \\ll T_W$).\n\nBelow we show our numerical results of the resulting $B-L$ asymmetry\nfor three shift-symmetric couplings: $a \\partial_\\mu J^\\mu_{B-L}$ where $J_{B-L}^\\mu$ is the $B-L$ current,\n$a W\\tilde{W}$ and $a G \\tilde{G}$.\nSince the lepton number violating process is well-decoupled at the end of our numerical computation\n(that is $T = 10^{10}\\,\\mathrm{GeV}$),\nit can be directly translated to the baryon asymmetry in the present universe.\nWe fix $T_R$ and $\\eta_0$ as\n\\begin{align}\n\tT_R = 10^{15}\\,\\mathrm{GeV}\\,,\n\t\\quad\n\t\\eta_0 = 10^{-9}\\,,\n\t\\label{eq:initial_cond}\n\\end{align}\nand the SM parameters as\n\\begin{align}\n\tg_2 = 0.55\\,,\n\t\\quad\n\tg_3 = 0.60\\,,\n\t\\quad\n\ty_\\tau = 1.0\\times 10^{-2}\\,\n\t\\quad\n\ty_t = 0.49\\,,\n\t\\quad\n\ty_b = 6.8\\times 10^{-3}\\,,\n\t\\quad\n\tm_\\nu = 0.05\\,\\mathrm{eV}\\,,\n\\end{align}\nin our numerical results below.\nFor the oscillating axion case, we fix the model parameters as\n\\begin{align}\n\tT_\\mathrm{osc} = 10^{13}\\,\\mathrm{GeV},\n\t\\quad\n\tT_\\mathrm{dec} = 10^{11}\\,\\mathrm{GeV},\n\\end{align}\nin this subsection. \nThe dependence of the final $B-L$ asymmetry on these parameters is studied in the next subsection.\n\n\\paragraph{$\\bm{B-L}$ current.}\n\nFirst, we consider the shift-symmetric coupling to the $B-L$ current: $(a\/f) \\partial_\\mu J^\\mu_{B-L}$.\nThis type of coupling is probably most common in the context of the spontaneous baryogenesis,\nsince it can be understood as a pure shift of the chemical potential of the lepton number charge \nas we saw in Sec.~\\ref{sec:basis-indep}.\nThe purpose to study this coupling here is two-fold. \nFirst, we demonstrate how our formalism applies to this most common example.\nSecond, we highlight a difference between this coupling and the coupling to the electroweak sphaleron $a W\\tilde{W}$,\nwhich we study next.\n\nSince this coupling shifts the chemical potential of the quarks and leptons, \nthe axion source vector is given by\n\\begin{align}\n\tn_S^\\alpha \n\t= \\sum_i n_i^{Q_{B-L}} n_i^\\alpha = -n_{\\tau}^{\\alpha} - n_{L_{12}}^{\\alpha} - n_{L_3}^{\\alpha}\n\t+\\frac{1}{3}\\left(n_{q_{12}}^{\\alpha} + n_{t}^{\\alpha} + n_{b}^{\\alpha} + n_{Q_{12}}^{\\alpha} + n_{Q_3}^{\\alpha}\\right).\n\\end{align}\nFrom Eq.~\\eqref{eq:b-l_int_vectors}, it is given as\n\\begin{align}\n\t( n_S^{\\alpha} ) = (0,0,0,0,0,-2,-2),\n\\end{align}\nwhere the ordering of the interactions is $\\alpha = \\mathrm{WS}, \\mathrm{SS}, Y_\\tau, Y_t, Y_b, W_{12}, W_{3}$.\nNote that it has non-zero entries only for the Weinberg operators.\nThis is due to the fact that they are the interactions that violate the $B-L$ symmetry, \nand hence enter into the $B-L$ current equation.\n\\begin{figure}[t]\n\t\\centering\n \t\\includegraphics[width=0.49\\linewidth]{.\/fig\/aJBL.pdf} \\hfill\n \t\\includegraphics[width=0.49\\linewidth]{.\/fig\/aWW.pdf}\n\t\\caption{ \n\tThe time evolution of the $B-L$ asymmetry produced from the shift-symmetric coupling $(a\/f) \\partial_\\mu J^\\mu_{B-L}$ (left panel) and $(a\/f) W \\tilde{W}$ (right panel) for constant $\\dot a\/(f T)$ (solid) and oscillating $\\dot a\/(f T)$ (dashed).\n\t}\n\t\\label{fig:b-l_aJBL}\n\\end{figure}\nWith this information, we can solve Eq.~\\eqref{eq:transport_eq_sec5} numerically.\nThe results are shown in the left panel of Fig.~\\ref{fig:b-l_aJBL}.\nWe can see from Eq.~\\eqref{eq:B-LtoB} that for parameters in the ball-park of Eq.~\\eqref{eq:initial_cond}, a sufficient amount of the $B-L$ asymmetry is produced from this coupling.\n\n\\paragraph{Electroweak sphaleron.}\n\nNext, we consider the shift-symmetric coupling to the electroweak sphaleron: $(a\/f) W\\tilde{W}$.\nThe axion source vector in this case is given by\n\\begin{align}\n\tn_S^{\\alpha} = (1,0,0,0,0,0,0),\n\t\\label{eq:source_vector_WS}\n\\end{align}\nwhere the ordering of the interactions is $\\alpha = \\mathrm{WS}, \\mathrm{SS}, Y_\\tau, Y_t, Y_b, W_{12}, W_{3}$.\n\n\n\nWe show our numerical result in the right panel of Fig.~\\ref{fig:b-l_aJBL}.\nIt can be seen that, although this coupling can produce the $B-L$ asymmetry, \nthe amount of the $B-L$ asymmetry is quite different from the coupling to the $B-L$ current.\nIn particular, the final $B-L$ asymmetry is suppressed\nby $\\mathcal{O}(10)$\n(notice the different $y$-axis normalizations n the two panels of Fig.~\\ref{fig:b-l_aJBL})\nfor both the constant case and the oscillation case \nwith $T_\\mathrm{osc} = 10^{13}\\,\\mathrm{GeV}$ and $T_\\mathrm{dec} = 10^{11}\\,\\mathrm{GeV}$.\nThis suppression can be understood as follows.\nThe Weinberg operator is only the source of the $B-L$ violation in our scenario,\nand hence it has to be effective to produce the $B-L$ asymmetry.\nAt the same time, the axion source term which in the current case is the electroweak sphaleron\nhas to be effective to produce the $B-L$ asymmetry.\nAs we saw in Secs.~\\ref{sec:SM-interactions} and~\\ref{subsec:b-l_transport_eq}, however,\nthe latter is at most only marginally relevant when the former is effective and vice versa, \nresulting in the suppression of the resulting $B-L$ asymmetry.\n\nHere we comment on Ref.~\\cite{Kusenko:2014uta}.\nThey started from the same coupling $(a\/f) W\\tilde{W}$ as we do.\nThey performed a chiral rotation of the leptons to remove this anomalous coupling,\nand wrote down the Boltzmann equation\nby assuming that the chemical potential of the lepton number charge \nis biased by the axion in the rotated basis.\nThis treatment is, however, not entirely correct in the presence of the Weinberg operator,\nsince the operators $W\\tilde{W}$ and the divergence of the lepton current are equivalent only when\nthere is no additional source of the lepton number violation.\\footnote{This was also noted in Ref.~\\cite{Shi:2015zwa}, based on explicitly examining the Boltzmann equations in these two particular field bases. In our formalism, this invariance is automatic for any basis transformations by definition as we have shown.}\nIn other words, once one performs a chiral rotation to remove the anomalous coupling,\nthe axion couples both to the lepton current and the Weinberg operator.\nIts couplings are such that the final expression of the source vector is still Eq.~\\eqref{eq:source_vector_WS}, \\textit{i.e.}, the same as the original coupling $(a\/f) W\\tilde{W}$,\nwhich follows from our general proof of the basis independence in Sec.~\\ref{sec:basis-indep}.\nThus, the coupling $(a\/f) W\\tilde{W}$ should not be interpreted as a pure shift of the chemical potential of the lepton number charge.\nThis subtlety is of phenomenological importance since the final $B-L$ asymmetry\ncan be quite different in the case of $(a\/f)W\\tilde{W}$ \ncompared to, \\textit{e.g.}, $(a\/f)\\partial_\\mu J^\\mu_{B-L}$,\nparticularly for the case in which the weak sphaleron is only marginally relevant at the decoupling of the $B-L$ violating process\nas we saw above. \n\n\nIn a similar spirit, it was noted in Ref.~\\cite{Takahashi:2015waa} that there can be \na strong suppression in baryon asymmetry for the case in which the weak sphaleron is not efficient at the decoupling of the $B-L$ violating process.\nBy using the same chiral rotation as Ref.~\\cite{Kusenko:2014uta} and discussing spontaneous baryogenesis, it was argued that this chiral rotation should not be performed if the weak sphaleron is not efficient.\nHere we emphasize that one can however always \nperform the chiral rotation without specifying a state with which one takes an expectation value.\nAs the transport equation is basis independent, a non-vanishing velocity of the axion just biases the weak sphaleron after we perform the chiral rotation completely.\nTo understand whether this bias on the weak sphaleron in the $B+L$ current is transferred to the $B-L$ asymmetry, we need to know how all the relevant SM interactions are involved in attaining equilibrium with $\\dot a \\neq 0$,\nand hence the chiral rotation, which leaves the transport equation unchanged, does not help us to understand this property.\n\n\n\n\n\\paragraph{Strong sphaleron.}\n\n\n\nFinally we consider the axion coupling to the strong sphaleron: $(a\/f) G \\tilde{G}$.\nThe axion source vector in this case is given by\n\\begin{align}\n\tn_S^{\\alpha} = (0,1,0,0,0,0,0),\n\\end{align}\nwhere the ordering of the interactions is $\\alpha = \\mathrm{WS}, \\mathrm{SS}, Y_\\tau, Y_t, Y_b, W_{12}, W_{3}$.\n\n\n\\begin{figure}[t]\n\t\\centering\n \t\\includegraphics[width=0.5\\linewidth]{.\/fig\/aGG.pdf}\n\t\\caption{\n\tThe time evolution of the $B-L$ asymmetry produced from the shift-symmetric coupling $(a\/f) G \\tilde{G}$\n\tfor constant $\\dot a\/(f T)$ (solid) and oscillating $\\dot a\/(f T)$ (dashed).\n\t}\n\t\\label{fig:b-l_aGG}\n\\end{figure}\n\nIn Fig.~\\ref{fig:b-l_aGG}, we show our numerical result.\nA sizable amount of the $B-L$ asymmetry can be produced from the coupling to the strong sphaleron.\nAt first sight, it might be surprising since the strong sphaleron has nothing to do with the $B-L$ nor $B+L$ symmetry.\nIt is nevertheless easily understood as follows.\nFirst of all, we have to use the Weinberg operator to create the $B-L$ asymmetry since it is the only source of $B-L$ violation.\nSince the Higgs and the leptons are involved in the Weinberg operator, \nthe chemical potentials of the Higgs and\/or \nthe leptons have to be biased to create the $B-L$ asymmetry. \nIn our case, the axion coupling $(a\/f) G\\tilde{G}$ \nfirst introduces a bias to the chemical potentials of the quarks.\nThis bias in the quark sector can be transferred into the Higgs sector by, \\textit{e.g.}, the top and bottom Yukawa couplings, \nand the lepton sector by, \\textit{e.g.} the electroweak sphaleron.\nOnce the Higgs and\/or the leptons have a bias in their chemical potentials, \nthe $B-L$ asymmetry is created through the lepton number violating process.\nIn short, a bias in a certain sector is eventually transferred to all the other sectors\nonce we have a sufficient variety of the interactions.\nIt is essentially what we have seen in Sec.~\\ref{subsec:b-l_equilibrium}.\n\n\\subsection{Dependence on axion model parameters}\n\\label{subsec:axion_model}\n\n\\begin{figure}[t]\n\t\\begin{minipage}{0.5\\linewidth}\n\t\\centering\n \t\\includegraphics[width=\\linewidth]{.\/fig\/TdecVsMuBL_Tosc1e13.pdf}\n\t\\end{minipage}\n\t\\begin{minipage}{0.5\\linewidth}\n\t\\centering\n \t\\includegraphics[width=\\linewidth]{.\/fig\/TdecVsMuBL_Tosc1e14.pdf}\n\t\\end{minipage}\n\t\\caption{\n\tThe final $B-L$ asymmetry produced for different values of the axion decay temperature $T_\\mathrm{dec}$.\n\tThe axion oscillation temperature is taken as $T_\\mathrm{osc} = 10^{13}\\,\\mathrm{GeV}$\n\tin the left panel, and $T_\\mathrm{osc} = 10^{14}\\,\\mathrm{GeV}$ in the right panel.\n\t}\n\t\\label{fig:b-l_TdecVsMuBL}\n\\end{figure}\n\n\nIn the previous Sec.~\\ref{subsec:b-l_numerics}, we have fixed the axion model parameters as\n$T_\\mathrm{osc} = 10^{13}\\,\\mathrm{GeV}$ and $T_\\mathrm{dec} = 10^{11}\\,\\mathrm{GeV}$.\nIn this subsection, we briefly discuss the dependence of the final $B-L$ asymmetry on these parameters.\n\n\\paragraph{Dependence on axion decay temperature.}\n\nFirst we study the dependence of the final $B-L$ asymmetry on the axion decay temperature $T_\\mathrm{dec}$.\nIn Fig.~\\ref{fig:b-l_TdecVsMuBL}, we plot the final $B-L$ asymmetry for different values of $T_\\mathrm{dec}$.\nThe axion oscillation temperature is $T_\\mathrm{osc} = 10^{13}\\,\\mathrm{GeV}$ in the left panel,\nand $T_\\mathrm{osc} = 10^{14}\\,\\mathrm{GeV}$ in the right panel, respectively.\n\nAs is clear from the figure, the final $B-L$ asymmetry does not depend on $T_\\mathrm{dec}$\nfor $T_\\mathrm{dec} \\lesssim 10^{13}\\,\\mathrm{GeV}$.\nThis is reasonable since the lepton number violating process decouples around this temperature,\nand the $B-L$ asymmetry is conserved irrespective of the axion dynamics afterwards.\nFor $T_\\mathrm{dec} \\gtrsim 10^{13}\\,\\mathrm{GeV}$, the final $B-L$ asymmetry is an oscillating function\nof $T_\\mathrm{dec}$, following the axion oscillation.\nIn particular, not only the first oscillation but also the later oscillations affect the final $B-L$ asymmetry,\nespecially for the coupling $a \\partial_\\mu J^{\\mu}_{B-L}$ with $T_\\mathrm{osc} = 10^{14}\\,\\mathrm{GeV}$.\nThis is because, in this case, \nthe axion dynamics is directly coupled to the lepton number violating process that is quite effective at high temperatures\nand hence the chemical potentials can track (part of) the axion oscillations.\nNevertheless, the final $B-L$ asymmetry on average is within roughly an order of magnitude from the asymptotic value \nfor $T_\\mathrm{dec} \\ll 10^{13}\\,\\mathrm{GeV}$.\n\n\\paragraph{Dependence on axion oscillation temperature.}\n\n\\begin{figure}[t]\n\t\\centering\n \t\\includegraphics[width=0.5\\linewidth]{.\/fig\/ToscVsMuBL_Tdec1e11.pdf}\n\t\\caption{\n\tThe final $B-L$ asymmetry produced for different values of the axion oscillation temperature $T_\\mathrm{osc}$.\n\tThe axion decay temperature is taken as $T_\\mathrm{dec} = 10^{11}\\,\\mathrm{GeV}$.\n\t}\n\t\\label{fig:b-l_ToscVsMuBL}\n\\end{figure}\n\nNext we study the dependence of the final $B-L$ asymmetry on the axion oscillation temperature $T_\\mathrm{osc}$.\nIn Fig.~\\ref{fig:b-l_ToscVsMuBL}, we plot the final $B-L$ asymmetry for different values of $T_\\mathrm{osc}$.\nWe focus on the asymptotic value of the final $B-L$ asymmetry for $T_\\mathrm{dec} \\ll 10^{13}\\,\\mathrm{GeV}$ here,\nand hence the axion decay temperature is taken as $T_\\mathrm{dec} = 10^{11}\\,\\mathrm{GeV}$.\n\nWe can roughly divide the parameter space into two regimes: $T_\\mathrm{osc} \\lesssim 10^{13}\\,\\mathrm{GeV}$\nand $T_\\mathrm{osc} \\gtrsim 10^{13}\\,\\mathrm{GeV}$.\nIn the former regime, $T_\\mathrm{osc} \\lesssim 10^{13}\\,\\mathrm{GeV}$, \nthe final $B-L$ asymmetry is an increasing function of $T_\\mathrm{osc}$.\nThis is understood from the fact that the lepton number violating process decouples at $T \\sim T_W \\sim 10^{13}\\,\\mathrm{GeV}$,\nand hence its effect is suppressed by $\\gamma_W\/H$ afterwards.\nIndeed, the $B-L$ asymmetry depends roughly linearly on $T_\\mathrm{osc}$ in this regime,\nwhich is consistent with the above reasoning since $\\gamma_W\/H \\propto T$.\nIn the latter regime, $T_\\mathrm{osc} \\gtrsim 10^{13}\\,\\mathrm{GeV}$, \nthe final $B-L$ asymmetry is a decreasing function of $T_\\mathrm{osc}$.\nThis property is easy to understand for the couplings $a W\\tilde{W}$ and $a G\\tilde{G}$\nsince these interactions are not in equilibrium,\nand hence the produced $B-L$ asymmetry is suppressed by $\\gamma_{\\mathrm{WS}}\/H$ and $\\gamma_\\mathrm{SS}\/H$\nfor the first oscillation in this regime.\nA larger value of $T_\\mathrm{osc}$ (for fixed $\\eta_0$) thus translates to a smaller value of the axion velocity when the axion couplings become effective.\nThe situation is more tricky for the coupling $a \\partial_\\mu J^\\mu_{B-L}$.\nIn this case, the axion source term is effective even for the first oscillation \nsince the axion directly couples to the lepton number violating process that is more effective for higher temperature.\nStill, the final $B-L$ asymmetry is suppressed for a larger value of $T_\\mathrm{osc}$. \nThis is because the interaction is strong enough so that $\\mu_{B-L}$ follows\n(part of) the axion dynamics,\nas one can also anticipate from the right panel of Fig.~\\ref{fig:b-l_TdecVsMuBL}.\nSince the axion oscillates a lot, the produced $B-L$ asymmetry is cancelled in the course of the oscillation,\nresulting in the suppression shown in Fig.~\\ref{fig:b-l_ToscVsMuBL}.\n\n\n\\section{Conclusion}\n\\label{sec:conc}\nAxion-like particles not only solves the strong $CP$ problem but also has an ability to account for several cosmological issues\nsuch as inflation, the dark matter, and the baryon asymmetry of the universe.\nIn particular, the axion(-like particle) is likely to be in a motion in the early universe,\nproviding a source of the $CPT$ symmetry violation.\nIf the axion is coupled to the SM,\nthis $CPT$ violation is transferred to the SM sector and,\nwith the help of a baryon number violating process, \ncan be the origin of the baryon asymmetry of the present universe,\nreferred to as spontaneous baryogenesis~\\cite{Cohen:1987vi,Cohen:1988kt}.\nIn this paper, we have developed a formalism that systematically accounts for spontaneous baryogenesis \nby an axion with general (classically) shift-symmetric couplings to the SM sector.\nIt consists of charge vectors $n_i^\\alpha$ that characterize charges of particles\nthat are involved in a given operator $O_\\alpha$,\nand a source vector $n_S^\\alpha$ that encodes couplings of the axion\nto the operators $O_\\alpha$.\nAssuming thermal equilibrium, the final baryon asymmetry is obtained \nby solving simple linear algebraic equations [see Eq.~\\eqref{eq:equilibrium_solution}].\nOur formalism is also ready for numerical implementation \nso that the final baryon asymmetry is easily computed even without assuming equilibrium [see Eq.~\\eqref{eq:fulltransporteq}].\nEquipped with this formalism, we have revealed several aspects of spontaneous baryogenesis \non both the theoretical and the phenomenological side.\n\n\n\nOn the theoretical side, we have shown that the transport equation and hence the final baryon asymmetry are invariant \nunder a field rotation involving the axion (see Sec~\\ref{sec:basis-indep}).\nThe explicit form of the axion coupling depends on the choice of the field basis.\nFor instance, an anomalous coupling to the SU(2) Chern-Simons term, $a W \\tilde{W}$, can be eliminated \nby a chiral rotation of the leptons.\nThe axion then couples to the divergence of the lepton current, $a \\partial_\\mu J^\\mu_{L}$, \nand (if present) to other lepton number violating operators such as the dimension-five Weinberg operator $\\left( L \\cdot H \\right)^{2}$.\nSince the chiral rotation is merely a field redefinition, physical quantities should not depend on the choice of this field basis,\nwhich is automatically satisfied in our formalism.\nHere we emphasize that the basis independence is not just an academic exercise.\nWithout accounting for this properly,\none may be lead to a wrong estimation of the final baryon asymmetry.\nFor instance, one may be tempted to regard the coupling $a W\\tilde{W}$\njust as a chemical potential of lepton number by a chiral rotation.\nThis is, however, not appropriate in the presence of the Weinberg operator,\nsince the axion also couples to the Weinberg operator after the chiral rotation.\nTaking into account all the axion couplings properly which appear after this chiral rotation, one ends up with exactly the same transport equation as originally obtained with just the $a W \\tilde W$ coupling.\nThis demonstrates that the field redefinition never helps to understand the dynamical of spontaneous baryogenesis because it does not change the governing equation, namely transport equation.\nAs a result, we find the final baryon asymmetry originating from the coupling $a W\\tilde{W}$ (in the presence of the Weinberg operator) to be an order of magnitude smaller than the baryon asymmetry obtained for a coupling to the lepton current \nif the weak sphaleron is only marginally efficient at the decoupling of the lepton number violating process (see Sec.~\\ref{subsec:b-l_numerics}). \nSince our formalism is basis-independent, it automatically takes into account this sort of subtleties.\n\nWe have also discussed the backreaction of the SM processes to the dynamics of the axion.\nThe axion coupling to the SM operator may act as a friction term in the axion equation of motion,\nslowing and eventually stopping the motion of the axion.\nIn Sec.~\\ref{sec:asymmetry_generation}, \nwe have derived a condition \nunder which the axion friction term identically vanishes.\nThe condition essentially states that the friction term vanishes if one can define a new conserved charge from \na combination of the axion shift symmetry and the fermion rotation [see Eq.~\\eqref{eq:zero-friction} for its precise definition].\nThe parameter space of the axion to obtain the correct amount of the baryon asymmetry is less\nrestricted if this condition is met, \nalthough a non-zero friction term does not necessarily spoil the spontaneous baryogenesis.\n\n\n\nOn the phenomenological side,\nwe have derived a condition for the axion couplings\nto produce the baryon asymmetry [see Sec.~\\ref{sec:asymmetry_generation},\nin particular Eqs.~\\eqref{eq:cond_asym} and~\\eqref{eq:cond_asym_lind}],\nwhich is invariant under a field rotation involving the axion.\nIt turns out that, once the axion has shift-symmetric couplings to the SM sector,\nit is rather difficult \\textit{not} to produce the baryon asymmetry,\nas long as we have a baryon number violating process.\nIn particular, the axion does not have to couple directly to the baryon number violating operator.\nThe physical intuition behind this is as follows.\nThe axion coupling to one specific operator generates a bias in the chemical potential of particles\nthat are involved in that operator.\nThis bias is in general transferred to other particles via other interactions \nand eventually to the baryon number violating process,\nresulting in the production of the baryon asymmetry.\nAs concrete examples, we have considered baryogenesis at $T\\gtrsim 10^{2}\\,\\mathrm{GeV}$ in Sec.~\\ref{sec:b+l},\nand $T\\gtrsim 10^{13}\\,\\mathrm{GeV}$ in Sec.~\\ref{sec:b-l}, respectively,\nwhere the baryon number violation is sourced by the electroweak sphaleron in the former case,\nand the electroweak sphaleron together with the Weinberg operator in the latter case.\nWe have derived a condition of the baryon asymmetry production for these specific cases,\nand confirmed that the baryon asymmetry is indeed a generic outcome of the axion shift-symmetric couplings.\nFor instance, we have shown for both cases that an axion coupling to the SU(3) Chern-Simons term, $a G \\tilde{G}$,\nultimately leads to the generation of a baryon asymmetry,\nalthough this operator itself has nothing to do with the $\\mathrm{U}(1)_{B-L}$- nor $\\mathrm{U}(1)_{B+L}$-violation.\nOur findings open up a variety of new possibilities to produce the baryon asymmetry of the universe from axion-like particles.\n\n\nAlong the way, we have summarized the basic properties\nof the SM transport equation in Sec.~\\ref{sec:SM-transport}\nas they are required in Secs.~\\ref{sec:b+l} and~\\ref{sec:b-l}.\nIn particular, we have estimated the equilibration temperature of the SM processes,\n\\textit{i.e.}, the strong\/electroweak sphaleron and Yukawa interactions,\nbelow which they are effective\n(see Tab.~\\ref{tab:equilibration_temperature} and Fig.~\\ref{fig:equilibration_temp}).\nOur estimation improves Ref.~\\cite{Garbrecht:2014kda} by including \nthe RG running of the Yukawa couplings in addition to the gauge couplings.\nIt is important especially for the quark Yukawa couplings as the strong interaction drives them to smaller values at high energy.\nThis section may be useful not only for the spontaneous baryogenesis but also for other baryogenesis scenarios \nsuch as the flavored leptogenesis~\\cite{Abada:2006fw,Nardi:2006fx,Abada:2006ea,Dev:2017trv}.\n\n\n\n\\section*{Acknowledgments}\nIt is a pleasure to thank Kai Schmitz and Fuminobu Takahashi for helpful discussions and comments on the manuscript.\nThis work was partially funded by the Deutsche Forschungsgemeinschaft under Germany's Excellence Strategy - EXC 2121 ``Quantum Universe'' - 390833306.\nThis work was also supported by the ERC Starting Grant 'NewAve' (638528).\nM.~Y. was supported by Leading Initiative for Excellent Young Researchers, MEXT, Japan. \nM.~Y. thanks the hospitality during his stay at DESY. \n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\\section{0pt}{12pt plus 4pt minus 4pt}{4pt plus 20pt minus 2pt}\n\\usepackage{xcolor}\n\\usepackage{braket}\n\\usepackage{amsmath}\n\\usepackage{comment}\n\\usepackage{physics}\n\\usepackage{afterpage}\n\\usepackage{placeins}\n\\usepackage{graphicx}\n\\usepackage{float}\n\\usepackage{booktabs}\n\\usepackage{multirow}\n\\usepackage{array}\n\\usepackage{setspace}\n\\graphicspath{{Figs\/}}\n\\usepackage{siunitx}\n\\usepackage{hhline}\n\\usepackage{xfrac}\n\\usepackage{float,graphicx}\n\\usepackage{mathtools}\n\\usepackage{listings}\n\\usepackage{amssymb}\n\\usepackage{titlesec}\n\\usepackage{amsfonts}\n\\usepackage[version=4]{mhchem}\n\\renewcommand\\thesubsection{\\Alph{subsection}}\n\\usepackage{epstopdf}\n\\catcode`@11\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{A\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{B\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{C\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{D\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{E\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{F\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{G\\arabic{equation}}}\n\\def\\@addtoreset{equation}{section{\\@addtoreset{equation}{section}\n\\defH\\arabic{equation}}{H\\arabic{equation}}}\n\\catcode`@11\n\n\n\n\\begin{document}\n\n\n\\title{Colossal anomalous Hall and Nernst effect from the breaking of nodal-line symmetry in Cu$_2$CoSn Weyl semimetal: A first-principles study}\n\n\\author{Gaurav K. Shukla}\n\\affiliation{School of Materials Science and Technology, Indian Institute of Technology (Banaras Hindu University), Varanasi 221005, India}\n\\author{Ujjawal Modanwal}\n\\author{Sanjay Singh*}\n\\affiliation{School of Materials Science and Technology, Indian Institute of Technology (Banaras Hindu University), Varanasi 221005, India}\n\n\n\n\\begin{abstract}\n The presence of topological band crossings near the Fermi energy is essential for the realization of large anomalous transport properties in the materials. The topological semimetals (TSMs) host such properties owing to their unique topological band structure such as Weyl points or nodal lines (NLs), that are protected by certain symmetries of the crystal. When the NLs break out in the system due to perturbation in Hamiltonian, a large Berry curvature arises in the surrounding area of the gapped NL. In the present work, we studied anomalous transport properties of Cu$_2$CoSn compound, which has cubic Heusler crystal structure (space group: Fm$\\bar{3}$m). The Cu$_2$CoSn full Heusler compound possesses three NLs in the absence of spin-orbit coupling close to the Fermi level. These NLs gap out with the consideration of the SOC and a large Berry curvature observed along the gapped NLs. The integral of Berry curvature gives the intrinsic anomalous Hall conductivity (AHC) about 1003 \\textit{S\/cm} and the anomalous Nernst conductivity (ANC) about 3.98 \\textit{A\/m-K} at the Fermi level. These values of AHC and ANC are comparable to the largest reported values for the Co$_2$MnGa Heusler compound. Therefore, Cu$_2$CoSn becomes a newborn member of the family of full Heusler compounds, which possesses giant AHC and ANC that can be useful for the spintronics application.\n\\end{abstract}\n\n\\maketitle\n\\section{INTRODUCTION}\nThe discovery of the Dirac fermions in the topological insulators became a hotspot of research of the past decade in condensed matter physics \\cite{wang2017quantum,hasan2021weyl,RevModPhys.81.109,RevModPhys.82.3045}. In recent years, the discovery of the Weyl semimetals (WSMs) and the related high-fold fermions materials have simulated immense research attention in the topological phase of materials \\cite{wang2017quantum,hasan2021weyl}. The WSM is a subset of the Dirac semimetal, where a pair of Weyl points forms due to the breaking of inversion and\/or time-reversal symmetry (TRS), which lifts the four-fold degeneracy of the Dirac point \\cite{vafek2014dirac,weyl1968gesammelte,burkov2016topological,hasan2017discovery}. WSMs show a variety of interesting phenomena such as chiral anomaly, chiral magnetotransport and anomalous transport response owing to their unique band topology \\cite{RevModPhys.90.015001,yan2017topological}. The WSMs due to the breaking of the inversion symmetry (IS) have been discovered widely \\cite{xu2015discovery,yang2015weyl,lv2015observation,PhysRevLett.117.146403,xu2015experimental}, while the WSMs result from the breaking of TRS symmetry called magnetic WSMs discovered recently \\cite{CTS,prb1}. The advantage of the magnetic WSM over the conventional WSM is that the band topology of magnetic WSMs can be easily tuned via manipulating the magnetic moment direction \\cite{CTS,Weyl}. Besides the zero dimension crossing of bands in the WSMs, the higher dimension crossing is also possible, where the bands cross each other along a closed curve called nodal lines (NLs) \\cite{burkov2011topological,PhysRevB.90.115111}. These NLs generally protected by the certain symmetry of the crystal. E.g., the TRS and IS can protect the NLs in the absence of spin-orbit coupling (SOC) \\cite{PhysRevB.92.081201,kim}. The mirror symmetries with opposite eigenvalues can also protect the NLs both in the presence and absence of SOC \\cite{bian2016topological,schoop2016dirac, PhysRevLett.117.016602}. \n\n\nAnomalous Hall effect (AHE) is a fundamental transport property, which describes the large transverse voltage drop in a current carrying ferromagnetic material even in the zero external magnetic field \\cite{nagaosa2006anomalous,nagaosa2010anomalous,tian2009proper,yue2017towards,manna2018heusler,sakuraba2020giant}. AHE got an immense interest in the condensed matter physics for its possible application in spintronic, Hall sensors and as a fundamental tool to detect the magnetization in a small volume, where the magnetometry measurements are not compatible \\cite{sensor,ning2020ultra,ohno2000electric}. The AHE arises due to the extrinsic mechanism related to the scattering events as well as the intrinsic mechanism related to the Berry curvature of Bloch bands \\cite{smit1955spontaneous,smit1958spontaneous,karplus1954hall, karplus1954hall,sundaram1999wave,xiao2010berry}. The Berry curvature is equivalent to the intrinsic pseudo-magnetic field in the reciprocal space which leads to the transverse deflection of spin-polarized moving charge carriers and develops the intrinsic AHE \\cite{xiao2010berry}. \n\nAnomalous Nernst effect (ANE); another interesting phenomenon that is a counterpart of AHE describes the generation of transverse voltage drop in the material with broken TRS, when subjected to a longitudinal temperature gradient \\cite{ikhlas2017large,guin2019anomalous,asaba2021colossal}. The ANE is closely analogous to the AHE \\textit{i.e.} ANE also arises from intrinsic and extrinsic contributions \\cite{guin2019anomalous, mizuguchi2019energy}. Several experimental, as well as theoretical studies on ANE, have been reported on magnetic materials \\cite{guin2019anomalous,chen2022large,sakai2020iron,PhysRevMaterials.4.024202,guo2017large}.\nWSMs are prominent materials for the large AHE and ANE as the Weyl points in the momentum space act as the magnetic monopole and are the source and drain of the Berry curvature \\cite{manna2018heusler,guin2019anomalous}. \nBesides the Weyl points, if the NLs present in the \\textit{k}-space gap out due to SOC, the Berry curvature introduces along the gapped NLs and creates the transverse voltage in the system \\cite{guin2019anomalous,manna2018heusler}. If the Weyl points or gapped NLs are near the Fermi level their signatures can be observed in the anomalous transport properties of materials \\cite{prb1,liu2018giant}. For \\textit{e.g.}, the first discovered magnetic WSMs Co$_3$Sn$_2$S$_2$ shows the large anomalous Hall conductivity (AHC) due to the gapped NLs and the Weyl points present in the system \\cite{liu2018giant}. The ANE in the Co$_3$Sn$_2$S$_2$, Mn$_3$X (X = Ge, Sn) and Fe$_3$X (X = Ga, Al) are interesting due to their characteristic low-energy electronics structure including Weyl points near to the Fermi energy \\cite{chen2022large,sakai2020iron,PhysRevMaterials.4.024202,guo2017large}. Among the different classes of materials, Heusler alloys are promising for their wide range of properties \\cite{graf2011simple,felser2015basics,felser2015heusler}. Recently, Heusler compound attracted much interest as quantum material because some of them are discovered as magnetic WSM due to the co-existence of the magnetism and the topology \\cite{prb1,guin2019anomalous,CTS, chang2016room,Weyl}. Heusler compounds also promise the large AHE and ANE due to large Berry curvature associated with their topological band structure \\cite{guin2019anomalous,li2020giant}. The magnetic Heusler compounds also offer the possibility to tune the band topology via manipulating the magnetic moment direction and hence the AHE and ANE can be easily tuned by changing the magnetic moment \\cite{CTS}. The largest AHC ($\\sim$ 1260 \\textit{S\/cm} \\cite{guin2019anomalous} and 2000 \\textit{S\/cm} at 2T \\cite{sakai2018giant}) and anomalous Nernst conductivity (ANC) ($\\sim$ 4 \\textit{A\/m-k} \\cite{sakai2018giant}) so far, reported in the Co$_2$MnGa magnetic Heusler compound.\n\nCu$_2$CoSn Heusler compound has been identified as the topological semimetal in the topological material database and expected to exhibit large AHC \\cite{bradlyn2017topological,vergniory2019complete,ji2022spin}. \nIn the present manuscript, we theoretically investigated the structural, magnetic, and anomalous transport properties \\textit{i.e.} AHE and ANE in the Cu$_2$CoSn Heusler compound. Cu$_2$CoSn is the ferromagnetic material, which exhibits three NLs in the absence of SOC due to the presence of the three relevant mirror reflection symmetries of the lattice. We found that by switching on the SOC the NLs gap out according to the magnetization direction and a strong Berry curvature originates along the gapped NL, which leads to the large Berry curvature in the system. The Berry curvature calculation gives the AHC and ANC around $\\sim$1000 \\textit{S\/cm} and $\\sim$ 3.98 \\textit{A\/m-K} at the Fermi level, which is comparable to the largest reported AHC and ANC in the well known Co$_2$MnGa Heusler compound \\cite{guin2019anomalous}.\n\\section{COMPUTATIONAL DETAIL}\n The \\textit{ab initio} calculation for the electronic band structure of Cu$_2$CoSn was performed by employing the density functional theory using the Quantum Espresso code \\cite{giannozzi2009quantum}. The Plane wave basis set and the Optimized norm-conserving Vanderbilt pseudo-potentials \\cite{PhysRevB.88.085117} were used for the calculation. The plane wave cutoff energy was chosen 80 Ry and the exchange-correlation functional was chosen in the generalized gradient approximation \\cite{perdew1996generalized}. The integration in \\textit{k}-space was carried out with 8$\\times$8$\\times$8 grid and the convergence criterion of total energy was chosen 10$^{-8}$ eV. The relaxed lattice parameter was used in the calculation. We extracted the Wannier functions from the DFT bands by Wannier90 code \\cite{marzari1997maximally,souza2001maximally}. The maximally localized Wannier functions (MLWFs) for s orbitals on Sn and d orbitals on Cu and Co have been used as the basis of the tight-binding Hamiltonian. Wanniertool software was used to investigate the topological properties such as NLs and Berry curvature in the two dimensions (2D) reciprocal plane. The Kubo formula implemented in Wannier90 code was used for the calculation of the Berry curvature, which can be given as \\cite{Gradhand_2012} \n \\begin{eqnarray}\n\\Omega^n_{ij} = i \\sum_{n \\neq n'} \\frac{{\\langle n|\\frac{\\partial H}{\\partial R^i}|n'\\rangle} {\\langle n'|\\frac{\\partial H}{\\partial R^j}|n \\rangle}-(i\\xleftrightarrow{}j)}{(E_n - E_n')^2}\n\\end{eqnarray}\n Here E$_n$ and $\\ket{n}$ are the eigenvalue and eigenstate of the Hamiltonian H. \n \n The AHC can be calculated using equation;\n\\begin{equation}\n\\sigma_{ij} = -{\\frac{e^2}{\\hbar} \\sum_{n}\\int\\frac{d^{3}\\textit{k}}{(2\\pi)^3}\\Omega^n_{ij}f_n}. \n\\end{equation}\nHere, f$_n$ represents the Fermi distribution function.\n\n\nThe expression for ANC can be given as \\cite{guin2019anomalous};\n\\begin{multline}\n\\alpha^A_{ij} (T, \\mu) = -\\frac{1}{T}\\frac{e}{\\hbar} \\sum_{n}\\int\\frac{d^{3}\\textit{k}}{(2\\pi)^3}\\Omega^n_{ij}[(E_n-{\\mu})f_n +\\\\\n K_BT\\, ln(1+exp(-\\frac{E_n-{\\mu}}{K{_B}T}))]. \n\\end{multline}\nNear zero temperature, the above equation can be written as\n\\begin{equation}\n \\frac{\\alpha^A_{ij}}{T} = -\\frac{\\pi^2}{3}\\frac{K_{B}^2}{e}\\frac{d\\sigma\\textsubscript{ij}}{d\\mu}\n\\end{equation}\nwhere $\\alpha^A_{ij}$, $K_{B}$, $\\sigma\\textsubscript{ij}$ and $\\mu $ are the ANC, Boltzmann constant, AHC, and chemical potential, respectively.\n \n\\section{RESULTS AND DISCUSSION}\nThe unit cell of Cu$_2$CoSn full Heusler compound (space group Fm$\\bar{3}$m (No.225)) is shown in Fig.\\,\\ref{Fig1}(a). The special Wyckoff's positions 8c (0.25, 0.25, 0.25), 4b (0.5, 0.5,0.5), and 4a (0, 0, 0) were considered for Cu, Co, and Sn atoms, respectively. The crystal structure has space inversion symmetry with three perpendicular relevant mirror planes. Figure \\ref{Fig1}(b) shows the energy versus lattice parameter curve, which suggests the lattice parameter a = b = c = 6.05 \u00c5 for the present system. The compound is ferromagnetic with a magnetic moment of 1.15 $\\mu_B$ per formula of the unit cell. The cobalt atom contributes exclusively to the magnetization ({$\\mu_{Co}$} = 1.147 $\\mu_B$\/f.u.) as Cu and Sn are the non-magnetic elements. The non-integer magnetic moment suggests that the system deviates from the half-metallic behavior. In the absence of SOC, the crystal symmetry of magnetic Cu$_2$CoSn full Heusler compound belongs to space group Fm$\\bar{3}$m, which exhibits three relevant mirror reflection symmetries \\textit{m}$_x$=0, \\textit{m}$_y$=0 and \\textit{m}$_z$=0 in the planes \\textit{k}$_x$=0, \\textit{k}$_y$=0 and \\textit{k}$_z$=0, respectively \\cite{prb1,PhysRevB.99.165117,PhysRevB.98.241106}. In each of these planes, there is a mirror symmetry protected NL in the Brillouin zone derived from the opposite eigenvalue of mirror symmetries and cross each other at six distinct points \\cite{PhysRevB.99.165117, PhysRevB.98.241106,Weyl}. These NLs gap out in the presence of SOC according to the magnetization direction, e.g., if the magnetization is considered along [001] direction, then the mirror symmetries \\textit{m$_x$} and \\textit{m$_y$} are no longer symmetry planes, while the \\textit{m$_z$} remains the symmetry plane, as the z-component of the spin S$_z$ is left invariant by \\textit{m$_z$}. Therefore, the NL in the \\textit{k}$_x$ = 0 and \\textit{k}$_y$ = 0 planes gap out, while the NL in the \\textit{k}$_z$=0 remain still protected by the mirror reflection symmetry. The total outward Berry flux from the gapless NL is zero, while the gapped NLs produce the non-zero Berry flux in the surrounding area \\cite{prb1,PhysRevB.100.054445}. The NLs in the \\textit{k}$_x$ = 0 and \\textit{k}$_y$ = 0 planes gapped out due to SOC result into the band anti-crossings, which restricts the Berry curvature to be aligned in magnetization direction \\cite{PhysRevX.8.041045}.\n\\begin{figure}[t]\n \\centering\n \\includegraphics[width=0.5\\textwidth]{Fig1.png}\n \\caption{ (a) An unit cell of Cu$_2$CoSn Heusler compound. Blue, red, and green colors represent the Cu, Co, and Sn atoms, respectively. Three perpendicular mirror planes are designated as \\textit{m$_x$}, \\textit{m$_y$}, and \\textit{m$_z$}, respectively.\n (b) Energy versus lattice parameter curve for the Cu$_2$CoSn Heusler compound.}\n \\label{Fig1}\n\\end{figure}\n\nThe spin-polarized band structure (absence of SOC) of Cu$_2$CoSn is presented in Fig.\\,\\ref{fig2}(a). The red and blue colors represent the majority and minority states, respectively. In the band structure of the present system, we observed an interesting linear band crossing point at high-symmetry point K close to the Fermi energy (shown inside the circle). The crossing point is made from the minority spin bands and supposes to form the NL-like band structure in \\textit{k}-plane. \\textbf{We did the symmetry analysis to analyze the formation of the nodal line in the system. When SOC is not considered there is no symmetry relation between the spin-up and down states and can be treated separately. The analysis of band symmetry along \\textit{W}-\\textit{K}-\\textit{${\\Gamma}$} direction, which lie on the \\textit{k}$_z$=0 plane of conventional Brillouin zone of FCC lattice was done by Irrep software \\cite{iraola2022irrep}. The {\\lq searchcell\\rq} tag was enabled for the transformation of the crystal coordinate into the cartesian coordinate. We found two symmetry operations for the interesting crossing point at high-symmetry point K (i) Identity (E) and (ii) two-fold rotation symmetry along [001] direction with an inversion center. The obtained matrix operation for the band was found \n\\begin{equation*}\nR({\\theta}) =\n\\begin{bmatrix}\n1 & 0 & 0\\\\\n0 & 1 & 0\\\\\n0 & 0 &-1\\\\\n\\end{bmatrix},\n\\end{equation*}\nwhich is a matrix corresponding to the \\textit{m}$_z$ mirror reflection symmetry, that derives the nodal line in \\textit{k}$_z$ = 0 plane. The valence and conduction bands which meet at point K [ In DFT cell \\textit{i.e} crystal coordinate (0.375, 0.375, 0.750), Cartesian coordinate (-0.75, 0.75, 0) ] belong to the different irreducible groups B$_2$ and A$_1$, respectively and protected by C$_{2v}$ (mm2) point group symmetry in the space group Fm$\\bar{3}$m. Hence the crossing point formed by the intersection of B$_2$ and A$_1$ bands form the two-fold nodal point at high-symmetry point K.}\n\\begin{figure}[t]\n \\centering\n \\includegraphics[width=0.52\\textwidth]{Fig2.png}\n \\caption{(a) Spin-polarized band structure (spin-up: red; spin-down: blue). (b) Band structure with spin-orbit coupling (SOC). The inset shows a zoomed view around the crossing point K. (c) The Brillouin zone in the conventional unit cell setting. (d) \\textit{k}-resolved Berry curvature for the Cu$_2$CoSn.}\n \\label{fig2}\n\\end{figure}\nSince SOC plays a pivotal role to realize the anomalous transport in materials and is also ubiquitous in materials with 3d elements \\cite{prb1}, therefore it is necessary to study the band structure with non-vanishing SOC.\nWhen SOC is included, we consider the hybridization of the majority and minority spin bands. The spin-up and spin-down energy bands cannot be distinguished separately because the spin no longer remains a good quantum number in the presence of SOC. The band structure in presence of SOC is shown in Fig.\\,\\ref{fig2}(b). The crossing point which is the interest of feature seems fragile for the SOC, where the degeneracy of the band is lost due to SOC (B$_2$ and A$_1$ transform into $ \\Gamma$$^{3+}$) and a gap open between the bands (as \\textit{W}-\\textit{K}-\\textit{${\\Gamma}$} are not in the \\textit{k$_z$}=0 plane in the crystal coordinate). The inset shows the enlarged view around the crossing point. Figure\\,\\ref{fig2}(c) is for the Brillouin zone of FCC lattice, which shows that \\textit{W}, \\textit{K}, and \\textit{${\\Gamma}$} high symmetry points lie on \\textit{k$_z$}=0 plane of conventional Brillouin zone. Next, we calculated the \\textit{k}-resolved Berry curvature along the same high-symmetry path chosen for band structure and found that a sharp peak of Berry curvature at point K and negligible Berry curvature from the other bands (Fig.\\,\\ref{fig2}d), therefore the Berry curvature distribution in surrounding the Fermi surface arises from gapped nodal line greatly affect the conduction electrons and produces a large AHC and ANC in the system (discussed later). \n\n\\begin{figure*}[t]\n\\centering\n\\includegraphics[width=1\\textwidth]{Fig3.png}\n\\caption{ (a) Surface states spectrum of Cu$_2$CoSn obtained from the projection of the bulk band structure on the (001) surface. (b) The energy gap in the (i) \\textit{k}$_z$ = 0 plane, (ii) \\textit{k}$_x$ = 0 plane. The black color represents the vanishing gap between the bands. Berry curvature distribution in the (iii) \\textit{k}$_z$ =0 plane, (iv) \\textit{k}$_x$ =0 plane. (c) The normalized Berry curvature for the Weyl points in \\textit{k}$_x$ = 0 plane. The Weyl points act as the source and drain of the Berry flux. (d) The variation of AHC with Fermi energy.} \n\\label{Fig3}\n\\end{figure*}\n\nTo inspect the topological states in our band structure, we projected the bulk band structure of Cu$_2$CoSn on the (001) surface along the {$\\overline{X}$}-{$\\overline{\\Gamma}$}-$\\overline{X}$ direction (Fig.\\,\\ref{Fig3}(a)). A clear mark encircled in the surface spectrum suggests the presence of the topological band crossings, which corresponds to the linear crossing point at high-symmetry point K, and the red spot represents the gap opening at the crossing point. The small gap opening between the bands makes the denominator of Eq. (1) small and the large Berry curvature arises in the system. \nTo calculate the topological properties for \\textit{e.g.} Berry curvature, AHC, and ANC, etc., we constructed the MLWF from the Bloch states using Wannier90 code and found a good match between the electronic and Wannier interpolated band structure. The Wannier interpolation is an effective tool to calculate the \\textit{k}-space integrals, which are involved to find out several properties of materials such as AHC, ANC, spin Hall conductivity, optical properties, etc. The MLWF method is popular to construct the Wannier functions, which is implemented in the WANNIER90 code \\cite{marzari1997maximally,souza2001maximally}. In this method, the Wannier functions are generated by the unitary transformation of the Bloch wave and there is no chance of loss of information \\cite{PhysRevB.105.035124}.\n\nFor a better understanding of the nature of band crossing at high-symmetry point K, we calculated the band gap in the different two-dimensions \\textit{k}-planes considering the magnetization quantization axis along the [001] direction.\nFigure\\,\\ref{Fig3}b(i) shows the energy gap in the \\textit{k}$_z$ = 0 plane, which still preserves mirror symmetry. As a consequence, a closed NL is observed in this plane as shown in the black color, which is protected by the \\textit{m$_z$} mirror reflection symmetry. The Berry curvature was calculated in the same \\textit{k}$_z$ = 0 plane as presented in Fig.\\,\\ref{Fig3}b(iii), which shows that the Berry curvature around the preserved NL is very weak. \nIt is interesting to look at the NL and Berry curvature in the \\textit{k}$_x$ = 0 plane, which is not a plane of symmetry after considering the SOC and the magnetization direction. The NL, which was preserved in the \\textit{k}$_z$ = 0 plane, gapped out in the \\textit{k}$_x$ = 0 plane (Fig.\\,\\ref{Fig3}(b)(ii)), because of the mirror symmetry in this plane breaks upon considering the SOC and magnetization direction. The Berry curvature distribution in the same \\textit{k}$_x$ = 0 plane is shown in Fig.\\,\\ref{Fig3}b(iv). As expected, a strong Berry curvature induces along the gapped NL, which can manifest a large transverse response in the system. A similar kind of NLs and the Berry curvature is also expected in the \\textit{k$_y$} = 0 plane. Since the mirror symmetry is broken in both \\textit{k$_y$} = 0 and \\textit{k$_x$} = 0 planes upon considering SOC and [001] magnetization, hence the Weyl points may emerge in these planes. The mirror symmetry is still preserved in \\textit{k$_z$} = 0 plane, therefore the Weyl point cannot be in the \\textit{k$_z$} = 0 plane. Noteworthy, these Weyl points do not exist in the system naturally due to SOC but rather derived from the NLs, because at some \\textit{k}-points the NLs refuse to break out \\cite{Weyl,chang2016room}. The Berry curvature due to Weyl points derived from the gapped NL is typically small as sometimes they lie far away from the Fermi level and\/or due to other Weyl points present in the same plane \\cite{Weyl,chang2016room}. The energy and momentum space location of the Weyl points in possible \\textit{k}-planes are mentioned in Table 1.\n\nTo further confirm the obtained points as the Weyl points, we plotted the normalized Berry curvature enclosing the coordinates of the points in \\textit{k$_x$}=0 plane (Fig.\\,\\ref{Fig3}(c)). We found that the Weyl point of chirality + 1 acts as a source of Berry curvature (outward flux in Fig.\\,\\ref{Fig3}(c)) and the Weyl point with chirality -1 acts as a sink of Berry curvature (inward flux in Fig.\\,\\ref{Fig3}(c)). \nThe strong enhancement in the Berry curvature around the gaped NLs is supposed to create the large AHC in the system. For this, we calculated the AHC by the integration of Berry curvature of all occupied dispersion bands using Eq. (1) and Eq.(2). The underlying space group with the magnetization along [001] direction contains the 4$_{001}$ symmetry operation and after summing the Berry curvature over whole Brillouin zone forces $\\Omega_x$ = $\\Omega_y$ = 0 and follow the relation \\cite{samathrakis2022tunable}\n\\begin{equation}\n \\begin{split} \n -\\Omega_x(k_x,k_y,k_z) = \\Omega_x(-k_x,-k_y,k_z)\\\\\n -\\Omega_y(k_x,k_y,k_z) = \\Omega_y(-k_x,-k_y,k_z)\\\\\n \\Omega_z(k_x,k_y,k_z) = \\Omega_z(-k_x,-k_y,k_z).\n\\end{split}\n\\end{equation}\nTherefore, following the symmetry operation the z-component of AHC $\\sigma^A_z$ is unrestricted, while $\\sigma^A_x$ and $\\sigma^A_y$ identically vanish.\nThe variation of AHC with Fermi energy is shown in Fig.\\,\\ref{Fig3} (d). We found the giant intrinsic AHC ($\\sigma^A_z$) about 1003 \\textit{S\/cm} at the Fermi energy, which varies to 1120\\textit{S\/cm} just 0.05 eV below the Fermi level. This magnitude of AHC is larger than most of the investigated systems \\cite{prb1,chen2022large, mende2021large,asaba2021colossal,chen2021anomalous,wang2017anisotropic} and comparable to the highest AHC reported for Co$_2$MnGa Heusler compound \\cite{guin2019anomalous, sakai2018giant}.\n \\begin{table}[htbp]\n \\centering\n \\begin{tabular}{lrrrrr}\n \\midrule\\midrule\n Weyl point & \\multicolumn{1}{l}\\,\\,{$k_x$ (2$\\pi$\/a)} & \\multicolumn{1}{l}\\,\\,{$k_y$ (2$\\pi$\/a)} & \n \\multicolumn{1}{l}\\,\\,{$k_z$(2$\\pi$\/a)} & \\multicolumn{1}{l}{ \\,\\,E (eV)} & \\\\\n \\midrule\n W$_{\\pm{A}}$ & \\,0.26 \\,\\,\\,& 0.00 & \\,\\,\\,$\\pm{0.95}$ & -0.240 & \\\\\n W$_{\\pm{B}}$ & 0.00 &\\,\\,\\, $\\pm{0.26}$ &\\,\\,\\, $\\mp{0.95}$ & 0.235 & \\\\\n W$_{\\pm{C}}$ & 0.00 & 0.00 & $\\pm{0.51}$ & 0.73 & \\\\\n \\midrule\\midrule\n \\end{tabular}%\n \\caption{Representative coordinates of Weyl points in different planes in the momentum space with their chemical potentials with reference to the Fermi energy.}\n \\label{tab:addlabel}%\n\\end{table}%\n\\begin{figure}[h]\n\\centering\n\\includegraphics[width=0.4\\textwidth]{Fig4.png}\n\\caption{Fermi surface and top of that (a) z-component of Berry curvature $\\Omega^z$ (b) y-component of Berry curvature $\\Omega^y$. (c) Fermi-level variation of anomalous Nernst conductivity.} \n\\label{Fig4}\n\\end{figure}\n\n Now we discuss the ANE in the present compound. The ANE is the thermometric counterpart of AHE, where the temperature gradient is used for the motion of charges instead of the electric field \\cite{PhysRevResearch.4.013215}. The origin of ANE is closely related to the AHE and the key difference is that the AHE is the summation of the Berry curvature over all occupied states, while the ANE is the sum of the Berry curvature of states close to the Fermi energy \\textit{i.e} the ANC is the sum of the Berry curvature on the Fermi surface \\cite{PhysRevB.98.241106,PhysRevResearch.4.013215}. The magnitude of ANC is related to the variation of the AHC near the Fermi energy. We plotted the z-component of Berry curvature ($\\Omega^z$) and y-component of Berry curvature ($\\Omega^y$) on the Fermi surface of the Cu$_2$CoSn system is shown in Fig.\\,\\ref{Fig4}(a)-(b) and using Eq.\\,(3) and (4) the ANC was calculated. We found the strong $\\Omega^z$ on the Fermi surface, while the $\\Omega^y$ identically cancels out due to the presence of the equal amount of positive and negative hotspot of the Berry curvature on the Fermi surface as shown in Fig.\\,\\ref{Fig4}(b). This strong Berry curvature on the Fermi surface gives the $\\frac{\\alpha^A}{T}$ = 0.013 \\textit{A\/m-K$^2$} and the ANC reaches to the $\\sim$ 3.98 A\/m-K at 300\\, K, which is similar to the highest reported value of ANC is 4.0 \\textit{A\/m-K} in the Co$_2$MnGa experimentally. The variation of the ANC with the Fermi energy is shown in Fig.\\,\\ref{Fig4} (c), which shows a sudden increase in the ANC below -0.25 eV that might be related to the presence of flat band at this energy level in the band structure.\n \\section{CONCLUSION}\nIn summary, we theoretically investigated the electronic, magnetic, and anomalous transport properties of Cu$_2$CoSn full Heusler compound. We found three NLs in the present compound, which are preserved by the mirror reflection symmetries of the system. Upon considering the SOC, the NLs gap out according to magnetization direction, consequently a strong Berry curvature develops along the gapped NL, which leads to the high AHC and ANC in the Cu$_2$CoSn Heusler compound. Therefore, the Cu$_2$CoSn is added as a new candidate in the family of Heusler compounds with high AHC and ANC. Our work provides a comprehensive understanding of the anomalous transport properties in the magnetic NL materials, specifically in the full Heusler compound, in context to the breaking of the protected mirror symmetries.\n\\section*{ACKNOWLEDGMENT}\nWe gratefully acknowledge the PARAMSHIVAY Supercomputing Centre of IIT(BHU) for cluster support. S.S. thanks the Science and Engineering Research Board\nof India for financial support through the \"CRG\" scheme (Grant No. CRG\/2021\/003256) and Ramanujan Fellowship (Grant No. SB\/S2\/RJN-015\/2017) and UGC-DAE CSR, Indore, for financial support through the \"CRS\" scheme. G.K.S. thanks the DST-INSPIRE scheme for support through a fellowship.\n\n*ssingh.mst@itbhu.ac.in \n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}} +{"text":"\n\n\n\n\n\n\n\n\\section{Introduction}\n\nThe usage of Monte Carlo simulations to study the transport and interaction of\nparticles and radiation is a powerful and popular technique, finding use\nthroughout a wide range of fields -- including but not limited to both high\nenergy and nuclear physics, as well as space and medical\nsciences~\\cite{mc_app_radphys_2000}. Naturally, a plethora of different\nframeworks and applications exist for carrying out these simulations\n(cf.\\ section~\\ref{sec:plugins} for examples), with implementations in different\nlanguages and domains ranging from general purpose to highly specialised field-\nand application-specific.\n\nA common principle used in the implementation of these applications is the\nrepresentation of particles by a set of state parameters -- usually including at\nleast particle type, time coordinate, position and velocity or momentum vectors\n-- and a suitable representation of the geometry of the problem (either via\ndescriptions of actual surfaces and volumes in a virtual three-dimensional\nspace, or through suitable parameterisations). In the simplest scenario where no\nvariance-reduction techniques are employed, simulations are typically carried\nout by proceeding iteratively in steps from an initial set of particles states,\nwith the state information being updated along the way as a result of the\npseudo-random or deterministic modelling of processes affecting the\nparticle. The modelling can represent particle self-interactions, interactions\nwith the material of the simulated geometry, or simply its forward transport\nthrough the geometry, using either straight-forward ray-tracing techniques or\nmore complicated trajectory calculations as appropriate. In addition to a\nsimple update of state parameters, the modelling can result in termination of\nthe simulation for the given particle or in the creation of new secondary\nparticle states, which will in turn undergo simulation themselves.\n\nOccasionally, use-cases arise in which it would be beneficial to be able to\ncapture a certain subset of particle states present in a given simulation, in\norder to continue their simulation at a later point in either the same or a\ndifferent framework. Such capabilities have typically been implemented using\ncustom application-specific means of data exchange, often involving the tedious\nwriting of custom input and output hooks for the specific frameworks and\nuse-cases in question. Here is instead presented a standard format for exchange\nof particle state data, \\emph{Monte Carlo Particle Lists} (\\texttt{MCPL}), which\nis intended to replace the plethora of custom converters with a more convenient\nscenario in which experts of each framework implement converters to the common\nformat, as a one-time effort. The idea being that users of the various\nframeworks then gain the ability to simply activate those pre-existing and\nvalidated converters in order to carry out their work.\n\nThe present work originated in the needs for simulations at neutron scattering\nfacilities, where a multitude of simulation frameworks are typically used to\ndescribe the various components from neutron production to detection, but\nhistorically other conceptually similar formats have been and are used in high\nenergy physics to communicate particle states between event generators and\ndetector simulations~\\cite{hepevt1989,hepmc2000,leshoucheseventfiles}. However,\nthese formats were developed for somewhat different purposes than the one\npresented here, keeping simulation histories, focusing on the description of\nintermediate unphysical or bound particles, existing primarily in-memory rather\nthan on-disk, or implemented in languages not readily accessible to applications\nbased on different technologies. For instance, \\cite{hepevt1989} is defined as\nan in-memory \\texttt{FORTRAN} common block, \\cite{hepmc2000} provides a\n\\texttt{C++} infrastructure for in-memory data with customisable\npersistification, and \\cite{leshoucheseventfiles} defines a text-based format\nfocused on descriptions of intermediate particles and lacking particle\npositions. These existing solutions were thus deemed unfit for the\ngoals of the work presented here: a compact yet flexible on-disk binary format\nfor particle state information, portable, well-defined and able to accommodate a wide range of use-cases\nwith close to optimal storage requirements. The accompanying code with which to\naccess and manipulate the files should be small, efficient and easily integrated into\nexisting codes and build systems. Consequently, it was chosen to implement the\nformat through a set of \\texttt{C} functions declared in a single header file,\n\\texttt{mcpl.h}, and implemented in a single file, \\texttt{mcpl.c}. These two\nfiles will here be referred to as the \\emph{core} \\texttt{MCPL} code, and are\nmade freely available under the CC0 1.0 Universal Creative Commons\nlicense. Along with associated code examples, documentation, configuration files\n(cf.\\ section~\\ref{sec:buildanddeploy}) and application-specific interface code\nwhich is not embedded in the relevant upstream projects\n(cf.\\ sections~\\ref{sec:plugins_geant4} and \\ref{sec:plugins_mcnp}), these files\nconstitute the \\texttt{MCPL} distribution. The present text concerns the second\npublic release of \\texttt{MCPL}, version 1.1.0. Future updates to the\ndistribution will be made available at the project website~\\cite{mcplwww}.\n\n\\section{The \\texttt{MCPL} format}\n\n\\texttt{MCPL} is a binary file format in which a header section, with\nconfiguration and meta-data, is followed by a data section, where the state\ninformation of the contained particles is kept. Data compression is available\nbut optional (cf.\\ section~\\ref{sec:compression}). The uncompressed storage size\nof a particle entry in the data section is determined by overall settings in the\nheader section, and depends on what exact information is stored for the\nparticles in a given file, as will be discussed shortly. Within a given file,\nall particle entries will always be of equal length, allowing for trivial\ncalculation of the absolute data location for a particle at a given index in the\nfile -- and thus for efficient seeking and skipping between particles if\ndesired. It is expected and recommended that \\texttt{MCPL} files will be\nmanipulated, directly or indirectly, by calls to the functions in\n\\texttt{mcpl.h} (cf.\\ section~\\ref{sec:progmcplaccess}), but for reference a\ncomplete specification of the binary layout of data in the files is provided in\n\\ref{appendix:mcpldetailedlayout}.\n\n\\subsection{Information available}\\label{sec:format_infoavail}\n\n\\input{graphics\/table_mcplhdr.tex}\n\nThe information available in the file header is indicated in\nTable~\\ref{tab:mcplhdr}: a unique 4-byte magic number identifying the format\nalways starts all files, and is followed by the format version, the endianness\n(\\emph{little} or \\emph{big}) in which numbers in the file are stored, and the\nnumber of particles in the file. The versioning provides a clear path for future\nupdates to the format, without losing the ability to read files created with\nprevious versions of the \\texttt{MCPL} code, and the endianness information\nprevents interpretation errors on different machines (although at present, most\nconsumer platforms are little-endian).\\footnote{In the current implementation,\n reading a little-endian \\texttt{MCPL} file on a big-endian machine or vice\n versa triggers an error message. It is envisioned that a future version of the\n \\texttt{MCPL} code could instead transparently correct the endianness at load\n time.} Next come five options indicating what data is stored per-particle,\nwhich will be discussed in the next paragraph. Finally, the header contains\nseveral options for embedding custom free-form information: first of all, the\nsource name, in the form of a single string containing the name and perhaps\nversion of the application which created the file. Secondly, any number of\nstrings can be added as human readable comments, and, thirdly, any number of\nbinary data blobs can be added, each identified by a string key. The\n\\texttt{MCPL} format itself provides no restrictions on what data, if any, can\nbe stored in these binary blobs, but useful content could for instance be a copy\nof configuration data used by the source application when the given file was\nproduced, kept for later reference. Also note that, for reasons of security, no\ncode in the \\texttt{MCPL} distribution ever attempts to interpret contents\nstored in such binary data blobs.\n\n\\input{graphics\/table_mcplpart.tex}\n\nTable~\\ref{tab:mcplpart} shows the state information available per-particle in\n\\texttt{MCPL} files, along with the storage requirements of each field. Particle\nposition, direction, kinetic energy and time are always stored.\\footnote{Note\n that a valid alternative to storing the directional unit vector along with the\n kinetic energy would have been the momentum vector. However, the choice here\n is consistent with the variables used in interfaces of both \\texttt{MCNP} and\n \\texttt{Geant4}, and means that the \\texttt{mcpl2ssw} converter discussed in\n section~\\ref{sec:plugins_mcnp} can be implemented without access to an\n unwieldy database of particle and isotope masses.} Polarisation vectors and\nso-called \\emph{user-flags} in the form of unsigned 32 bit integers are only\nstored when relevant flags in the header are enabled and weights are only stored\nexplicitly in each entry when no global common value was set in the\nheader. Likewise, the particle type information in the form of so-called PDG\ncodes is only stored when a global PDG code was not specified in the header. The\nPDG codes must follow the scheme developed by the Particle Data Group\nin~\\cite[ch.~42]{pdg2014}, which is inarguably the most comprehensive and widely\nadopted standard for particle type encoding in simulations. Finally, again\ndepending on a flag in the header, particle information uses either single- (4\nbytes) or double-precision (8 bytes) storage for floating point numbers. All in\nall, summing up the numbers in the last column of Table~\\ref{tab:mcplpart},\nparticles are seen to consume between 28 and 96 bytes of uncompressed storage\nspace per entry. The \\texttt{MCPL} format is thus designed to be flexible enough\nto handle use-cases requiring a high level of detail in the particle state\ninformation, without imposing excessive storage requirements on less demanding\nscenarios.\n\nNote that while the units for position, energy and time indicated in\nTable~\\ref{tab:mcplpart} of course must be respected, the choices themselves are\nsomewhat arbitrary and should in no way be taken to indicate the suitability of\nthe \\texttt{MCPL} format for a given simulation task. In particular, note that\nwithin the dynamic range of a given floating point representation, the relative\nnumerical precision is essentially independent of the magnitude of the numbers\ninvolved and is determined by the number of bits allocated for the\n\\emph{significand}~\\cite{IEEE754}. Thus, it is important to realise that\nusage of the \\texttt{MCPL} format to deal with a simulation task whose natural\nunits are many orders of magnitude different than the ones in\nTable~\\ref{tab:mcplpart} does \\emph{not} imply any detrimental impact on\nnumerical precision.\n\nPacking of the three-dimensional unit directional vector into just two floating\npoint numbers of storage is carried out via a new packing algorithm, tentatively\nnamed \\emph{Adaptive Projection Packing}, discussed in detail in\n\\ref{appendix:unitvectorpacking}. Unlike other popular packing strategies\nconsidered, the chosen algorithm provides what is for all practical purposes\nflawless performance, with a precision comparable to the one existing absent any\npacking (i.e.\\ direct storage of all coordinates into three floating point\nnumbers). It does so without suffering from domain validity issues, and the\nimplemented code is not significantly slower to execute than the alternatives.\n\n\\subsection{Accessing or creating \\texttt{MCPL} files programmatically}\\label{sec:progmcplaccess}\n\nWhile a complete documentation of the programming API provided by the\nimplementation of \\texttt{MCPL} in \\texttt{mcpl.h} and \\texttt{mcpl.c} can be\nfound in \\ref{appendix:reference_c_api}, the present discussion will restrict\nitself to a more digestible overview.\n\nThe main feature provided by the API is naturally the ability to create new\n\\texttt{MCPL} files and access the contents of existing ones, using a set of\ndedicated functions. No matter which settings were chosen when a given\n\\texttt{MCPL} file was created, the interface for accessing the header and\nparticle state information within it is the same, as can be seen in\nListing~\\ref{lst:readexample}: after obtaining a file handle via\n\\texttt{mcpl\\_open\\_file}, a pointer to an \\texttt{mcpl\\_particle\\_t}\n\\texttt{struct}, whose fields contain the state information available for a\ngiven particle, is returned by calling \\texttt{mcpl\\_read}. This also advances\nthe position in the file, and returns a null-pointer when there are no more\nparticles in the file, ending the loop. If a file was created with either\npolarisation vectors or user-flags disabled, the corresponding fields on the\nparticle will contain zeroes (thus representing polarisation information with\nnull-vectors and user-flags with an integer with no bits enabled). All floating\npoint fields on \\texttt{mcpl\\_particle\\_t} are represented with a\ndouble-precision type, but the actual precision of the numbers will obviously be\nlimited to that stored in the input file. In addition to the interface\nillustrated by Listing~\\ref{lst:readexample}, functions can be found in\n\\texttt{mcpl.h} for accessing any information available in the file header (see\nTable~\\ref{tab:mcplhdr}), or for seeking and skipping to particles at specific\npositions in the file, rather than simply iterating through the full file.\n\n\\lstinputlisting[float,language={[mcpl]C},\n label={lst:readexample},\n caption={Simple example for looping over all particles in an existing \\texttt{MCPL} file.}\n]{code_listings\/example_read.c}\n\nCode creating \\texttt{MCPL} files is typically slightly more involved, as the\ncreation process also involves deciding on the values of the various header\nflags and filling of free-form information like source name and comments. An\nexample producing a file with 1000 particles is shown in\nListing~\\ref{lst:writeexample}. The first part of the procedure is to obtain a\nfile handle through a call to \\texttt{mcpl\\_create\\_outfile}, configure the header\nand overall flags, and prepare a zero-initialised instance of\n\\texttt{mcpl\\_particle\\_t}. Next comes the loop filling the particles into the\nfile, which happens by updating the state information on the\n\\texttt{mcpl\\_particle\\_t} instance as needed, and passing it to\n\\texttt{mcpl\\_add\\_particle} each time. At the end, a call to\n\\texttt{mcpl\\_close\\_outfile} finishes up by flushing all internal buffers to\ndisk and updating the field containing the number of particles at the beginning\nof the file.\n\n\\lstinputlisting[float,language={[mcpl]C},\n label={lst:writeexample},\n caption={Simple example for creating an \\texttt{MCPL} file with 1000 particles.}\n]{code_listings\/example_write.c}\n\nShould the program abort before the call to\n\\texttt{mcpl\\_close\\_outfile}, particles already written into the output file\nare normally recoverable: upon opening such an incomplete file, the\n\\texttt{MCPL} code detects that the actual size of the file is inconsistent with\nthe value of the field in the header containing the number of particles. Thus,\nit emits a warning message and calculates a more appropriate value for the\nfield, ignoring any partially written particle state entry at the end of the\nfile. This ability to transparently correct incomplete files upon load also\nmeans that it is possible to inspect (with the \\texttt{mcpltool} command\ndiscussed in section~\\ref{sec:mcplfileaccesscmdline}) or analyse files that are\nstill being created. To avoid seeing a warning each time a file left over from\nan aborted job is opened, \\texttt{mcpl.h} also provides the function\n\\texttt{mcpl\\_repair} which can be used to permanently correct the header of the\nfile.\n\nLikewise, \\texttt{mcpl.h} also provides the function \\texttt{mcpl\\_merge\\_files} which\ncan be used to merge a list of compatible \\texttt{MCPL} files into a new one, which might\ntypically be useful when gathering up the output of simulations carried out via\nparallel processing techniques. Compatibility here means that the files must\nhave essentially identical header sections, except for the field holding the\nnumber of particles. Finally, the function \\texttt{mcpl\\_transfer\\_metadata} can\nbe used to easily implement custom extraction of particle subsets from existing\n\\texttt{MCPL} files into new (smaller) ones. An example of this is illustrated\nin Listing~\\ref{lst:editexample}.\n\n\\lstinputlisting[float,language={[mcpl]C},\n label={lst:editexample},\n caption={Example extracting low-energy neutrons (PDG code 2112) from an \\texttt{MCPL} file.}\n]{code_listings\/example_edit.c}\n\n\n\\subsection{Accessing \\texttt{MCPL} files from the command line}\\label{sec:mcplfileaccesscmdline}\n\nCompared with simpler text-based formats (e.g.\\ ASCII files with data formatted\nin columns), one potential disadvantage of a binary data format like\n\\texttt{MCPL} is the lack of an easy way for users to quickly inspect a file and\ninvestigate its contents. To alleviate this, \\texttt{mcpl.h} provides a function\nwhich, in a straight-forward manner, can be used to build a generic\n\\texttt{mcpltool} command-line executable:\n\\texttt{int~mcpl\\_tool(int~argc,char**~argv)}, for which full usage instructions\ncan be found in \\ref{appendix:reference_mcpltool_usage} or by invoking it with\nthe \\texttt{-{}-help} flag. Simply running this command on an\n\\texttt{MCPL} file without specifying other arguments, results in a short\nsummary of the file content being printed to standard output, which includes a\nlisting of the first 10 contained particles. An example of such a summary is\nprovided in Listing~\\ref{lst:mcpltool_example_output}: it is clear from the\ndisplayed meta-data that the particles in the given file represent a\ntransmission spectrum resulting from illumination of a block of lead by a\n\\SI{10}{GeV} proton beam in a \\texttt{Geant4}~\\cite{geant4a,geant4b}\nsimulation. The displayed header information and data columns should be mostly\nself-explanatory, noting that $(\\texttt{x},\\texttt{y},\\texttt{z})$ indicates the\nparticle position, $(\\texttt{ux},\\texttt{uy},\\texttt{uz})$ its normalised\ndirection, and that the \\texttt{pdgcode} column indeed shows particle types\ntypical in a hadronic shower: $\\pi^+$ (211), $\\gamma$ (22), protons (2212),\n$\\pi^-$ ($-211$) and neutrons (2112). If the file had user-flags or polarisation\nvectors enabled, appropriate columns for those would be shown as well. Finally,\nnote that the \\texttt{36~bytes\/particle} refers to uncompressed storage, and\nthat in this particular case the file actually has a compression ratio of\napproximately 70\\%, meaning that about 25 bytes of on-disk storage is used per\nparticle (cf.\\ section~\\ref{sec:compression}).\n\n\\afterpage{\\begin{landscape}\n \\lstinputlisting[float,language={},basicstyle={\\linespread{0.9}\\ttfamily\\ssmall},\n label={lst:mcpltool_example_output},\n caption={Example output of running \\texttt{mcpltool} with no arguments on a\n specific \\texttt{MCPL} file.}\n]{code_listings\/mcpltool_39mb_example_compressed_27mb.txt}\n\\end{landscape}}\n\nBy providing suitable arguments (cf.~\\ref{appendix:reference_mcpltool_usage}) to\n\\texttt{mcpltool}, it is possible to modify what information from the file is\ndisplayed. This includes the possibility to change what particles from the file,\nif any, should be listed, as well as the option to extract the contents of a\ngiven binary data blob to standard output. The latter might be particularly\nhandy when entire configuration files have been embedded\n(cf.\\ sections~\\ref{sec:plugins_mcnp} and\n\\ref{sec:plugins_mcstasmcxtrace}). Finally, the \\texttt{mcpltool} command also\nallows file merging and repairing, as discussed in\nsection~\\ref{sec:progmcplaccess}, and provides functionality for selecting a\nsubset of particles from a given file and extracting them into a new smaller\nfile.\n\nAdvanced functionality such as graphics display and interactive GUI-based\ninvestigation or manipulation of the contents of \\texttt{MCPL} files is not\nprovided by the \\texttt{mcpltool}, since those would imply additional unwanted\ndependencies to the core \\texttt{MCPL} code, which is required by design to be\nlight-weight and widely portable. However, it is the hope that the existence of\na standard format like \\texttt{MCPL} will encourage development of such tools,\nand indeed some already exist in the in-house framework~\\cite{dgcodechep2013}\nof the Detector Group at the European Spallation Source\n(ESS)~\\cite{esscdr,esstdr}. It is intended for a future distribution of\n\\texttt{MCPL} to include relevant parts of these tools as a separate and\noptional component.\n\n\\subsection{Compression}\\label{sec:compression}\n\nThe utilisation of data compression in a format like \\texttt{MCPL} is\npotentially an important feature, since on-disk storage size could be a concern\nfor some applications. Aiming to maximise flexibility, transparency and\nportability, optional compression of \\texttt{MCPL} files is simply provided by\nallowing whole-file compression into the widespread \\texttt{GZIP}\nformat~\\cite{RFC1952_gzip} (changing the file extension from \\texttt{.mcpl} to\n\\texttt{.mcpl.gz} in the process). This utilises the \\texttt{DEFLATE}\ncompression algorithm~\\cite{RFC1951_deflate} which offers a good performance\ncompromise with a reasonable compression ratio and an excellent speed of\ncompression and decompression.\n\nRelying on a standard format such as \\texttt{GZIP} means that, if needed, users\ncan avail themselves of existing tools (like the \\texttt{gzip} and\n\\texttt{gunzip} commands available on most \\texttt{UNIX} platforms) to change\nthe compression state of an existing \\texttt{MCPL} file. However, when the code\nin \\texttt{mcpl.c} is linked with the ubiquitous\n\\texttt{ZLIB}~\\cite{zlib_libandwww,RFC1950_zlib}\n(cf.\\ section~\\ref{sec:buildanddeploy}), compressed \\texttt{MCPL} files can be\nread directly. For convenience, \\texttt{mcpl.h} additionally provides a function\n\\texttt{mcpl\\_closeandgzip\\_outfile}, which can be used instead of\n\\texttt{mcpl\\_close\\_outfile} (cf.\\ Listing~\\ref{lst:writeexample}) to ensure\nthat newly created \\texttt{MCPL} files are automatically compressed if possible\n(either through a call to an external \\texttt{gzip} command or through custom\n\\texttt{ZLIB}-dependent code, depending on availability).\n\n\\subsection{Build and deployment}\\label{sec:buildanddeploy}\n\nIt is the hope that eventually \\texttt{MCPL} capabilities will be included\nupstream in many applications, and that users of those consequently won't have\nto do anything extra to start using it. As will be discussed in\nsection~\\ref{sec:plugins}, this is at present the case for users of recent\nversions of \\texttt{McStas}~\\cite{mcstas1,mcstas2} and\n\\texttt{McXtrace}~\\cite{mcxtrace1}, and is additionally the case for users of\nthe in-house \\texttt{Geant4}-based framework of the ESS Detector\nGroup~\\cite{dgcodechep2013}.\n\nBy design, it is expected that most developers wishing to add \\texttt{MCPL}\nsupport to their application will simply place copies of \\texttt{mcpl.h} and\n\\texttt{mcpl.c} into their existing build system and include \\texttt{mcpl.h}\nfrom either \\texttt{C} or \\texttt{C++} code.\\footnote{Compilation of\n \\texttt{mcpl.c} can happen with any of the following standards: \\texttt{C99},\n \\texttt{C11}, \\texttt{C++98}, \\texttt{C++11}, \\texttt{C++14}, or later. In\n addition to those, \\texttt{mcpl.h} is also \\texttt{C89} compatible. Note that\n on platforms where the standard \\texttt{C} math function \\texttt{sqrt} is\n provided in a separate library, that library must be available at link-time.}\nIn order to make the resulting binary code able to manipulate compressed files\ndirectly (cf.\\ section~\\ref{sec:compression}), the code in \\texttt{mcpl.c} must\nusually be compiled against and linked with an installation of \\texttt{ZLIB}\n(see detailed instructions regarding build flags at the top of\n\\texttt{mcpl.c}). Alternatively, the \\texttt{MCPL} distribution presented here\ncontains a ``fat'' auto-generated drop-in replacement for \\texttt{mcpl.c} named\n\\texttt{mcpl\\_fat.c}, in which the source code of \\texttt{ZLIB} has been\nincluded in its entirety.\\footnote{Note that all \\texttt{ZLIB} symbols have been\n prefixed, to guard against potential run-time clashes where a separate\n \\texttt{ZLIB} is nonetheless loaded.} Using this somewhat larger file enables\n\\texttt{ZLIB}-dependent code in \\texttt{MCPL} even in situations where\n\\texttt{ZLIB} might not be otherwise available.\n\nIn addition to the core \\texttt{MCPL} code, the \\texttt{MCPL} distribution also\ncontains a small file providing the \\texttt{mcpltool} executable, \\texttt{C++}\nfiles implementing the \\texttt{Geant4} classes discussed in\nsection~\\ref{sec:plugins_geant4}, \\texttt{C} files for the \\texttt{mcpl2ssw} and\n\\texttt{ssw2mcpl} executables discussed in section~\\ref{sec:plugins_mcnp}, and a\nfew examples show-casing how user code might look.\n\nBuilding of all of these parts should be straight-forward using standard tools,\nbut a configuration file for \\texttt{CMake}~\\cite{cmakebook2015} which builds\nand installs everything is nonetheless provided for reference and\nconvenience. Additionally, ``fat'' single-file versions of all command line\nutilities (\\texttt{mcpltool}, \\texttt{mcpl2ssw} and \\texttt{ssw2mcpl}) are also\nprovided, containing both \\texttt{MCPL} and \\texttt{ZLIB} code within as\nappropriate. Thus, any of these single-file versions can be compiled directly\ninto the corresponding command line executable, without any other dependencies\nthan a \\texttt{C} compiler. For more details about how to build and deploy,\nrefer to the \\texttt{INSTALL} file shipped with the \\texttt{MCPL} distribution.\n\n\\section{Application-specific converters and plugins}\\label{sec:plugins}\n\nWhile the examples in section~\\ref{sec:progmcplaccess} show how it is possible\nto manipulate \\texttt{MCPL} files directly from \\texttt{C} or \\texttt{C++} code,\nit is not envisioned that most users will have to write such code\nthemselves. Rather, in addition to using available tools (such as the\n\\texttt{mcpltool} described in section~\\ref{sec:mcplfileaccesscmdline}) to\naccess the contents of files as needed, users would ideally simply use\npre-existing plugins and converters written by application-specific experts, to\nload particles from \\texttt{MCPL} files into their given Monte Carlo\napplications, or extract particles from those into \\texttt{MCPL} files. At the\ntime of this initial public release of \\texttt{MCPL}, four such applications are\nalready \\texttt{MCPL}-aware in this manner: \\texttt{Geant4}, \\texttt{MCNP},\n\\texttt{McStas} and \\texttt{McXtrace}, and the details of the corresponding\nconverters and plugins are discussed in the following sub-sections, after a few\ngeneral pieces of advice for other implementers in the next paragraphs.\n\nIn order for \\texttt{MCPL} files to be as widely exchangeable as possible, code\nloading particles from \\texttt{MCPL} files into a given Monte Carlo application\nshould preferably be as accepting as possible. In particular, this means that\nwarnings rather than errors should result if the input file contains PDG codes\ncorresponding to particle types that can not be handled by the application in\nquestion. As an example, a detailed \\texttt{MCNP} or \\texttt{Geant4} simulation\nof a moderated neutron source will typically produce files containing not only\nneutrons, but also gammas and other particles. It should certainly be possible\nto load such a file into a neutron-only simulation application like\n\\texttt{McStas}, resulting in simulation of the contained neutrons (preferably\nwith a warning or informative message drawing attention to some particles being\nignored).\n\nApplications employing parallel processing techniques, must always pay\nparticular attention when implementing file-based I\/O, and this is naturally\nalso the case when creating \\texttt{MCPL}-aware plugins for them. However, the\navailable functionality for merging of \\texttt{MCPL} files makes the scenario of\nfile creation particularly simple to implement: each sub-task can simply write\nits own file, with the subsequent merging into a single file taking place during\npost-processing. For reading of particles in existing \\texttt{MCPL} files, it is\nrecommended that each sub-task performs a separate call to\n\\texttt{mcpl\\_open\\_file}, and use the skipping and seeking functionality to\nload just a subset of the particles within, as required. In the case of a\nmulti-threading application, it is of course also possible to handle concurrent\ninput or output directly through a single file handle. In this case, however,\ncalls to \\texttt{mcpl\\_add\\_particle} and \\texttt{mcpl\\_read} must be protected\nagainst concurrent invocations with a suitable lock or mutex.\n\nThe following three sub-sections are dedicated to discussions of presently\navailable \\texttt{MCPL} interfaces for specific Monte Carlo applications. The\ndiscussions will in each case presuppose familiarity with the application in\nquestion.\n\n\\subsection{\\texttt{Geant4} interface}\\label{sec:plugins_geant4}\n\nIn the most typical mode of working with the\n\\texttt{Geant4}~\\cite{geant4a,geant4b} toolkit, users create custom \\texttt{C++}\nclasses, sub-classing appropriate abstract interfaces, in order to set up\ngeometry, particle generation, custom data readout and physics modelling. At\nrun-time, those classes are then instantiated and registered with the\nframework. Accordingly, the \\texttt{MCPL}--\\texttt{Geant4} integration takes the\nform of two such sub-classes of \\texttt{Geant4} interface classes, which can be\neither directly instantiated or further sub-classed themselves as needed:\n\\texttt{G4MCPLGenerator} and \\texttt{G4MCPLWriter}. They are believed to be\ncompatible with any recent version of \\texttt{Geant4} and were explicitly tested\nwith versions 10.00.p03 and 10.02.p02.\n\nFirst, the \\texttt{G4MCPLGenerator}, the relevant parts of which are shown in\nListing~\\ref{lst:g4mcplgenerator}, implements a \\texttt{Geant4} generator by\nsub-classing the \\texttt{G4VUser\\-Primary\\-Generator\\-Action} interface class. The\nconstructor of \\texttt{G4MCPLGenerator} must be provided with the path to an\n\\texttt{MCPL} file, which will then be read one particle at a time whenever\n\\texttt{Geant4} calls the \\texttt{GeneratePrimaries} method, in order to\ngenerate \\texttt{Geant4} events with a single primary particle\nin each. If the file runs out of particles before the \\texttt{Geant4} simulation\nis ended for other reasons, the \\texttt{G4MCPLGenerator} graciously requests the\n\\texttt{G4RunManager} to abort the simulation. Thus, a convenient way in which\nto use the entire input file for simulation is to launch the simulation with a\nvery high number of events requested, as is done in the example in\nListing~\\ref{lst:example_g4gen}.\\footnote{Unfortunately, due to a limitation in\n the \\texttt{G4RunManager} interface, this number will be limited by the\n highest number representable with a \\texttt{G4int}, which on most modern\n platforms is 2147483647.}\n\n\\lstinputlisting[float,language={[mcpl]C++},\n label={lst:g4mcplgenerator},\n caption={The \\texttt{G4MCPLGenerator} class.}\n]{code_listings\/G4MCPLGenerator_snippet.hh}\n\n\\lstinputlisting[float,language={[mcpl]C++},\n label={lst:example_g4gen},\n caption={Example showing how to load particles from an \\texttt{MCPL} file into\n a \\texttt{Geant4} simulation.}\n]{code_listings\/example_geant4gen.cc}\n\nIn case the user wishes to use only certain particles from the input file for\nsimulation, the \\texttt{G4MCPLGenerator} class must be sub-classed and the\n\\texttt{UseParticle} method reimplemented, returning \\texttt{false} for\nparticles which should be skipped. Likewise, if it is desired to perform\ncoordinate transformations or reweighing before using the loaded particles, the\n\\texttt{ModifyParticle} method must be reimplemented.\n\nThe \\texttt{G4MCPLWriter} class, the relevant parts of which are shown in\nListing~\\ref{lst:g4mcplwriter}, is a \\texttt{G4VSensitiveDetector} which in the\ndefault configuration ``consumes'' all particles which, during a simulation,\nenter any geometrical volume(s) to which it is attached by the user and stores\nthem into the specified \\texttt{MCPL} file. At the same time it asks\n\\texttt{Geant4} to end further simulation of those particles (``killing''\nthem). This strategy of killing particles stored into the file was chosen as a\nsensible default behaviour, as it prevents potential double-counting in the\nscenarios where a particle (or its induced secondary particles) would otherwise\nbe able to enter a given volume multiple times. If it is desired to modify this\nstrategy, the user must sub-class \\texttt{G4MCPLWriter} and reimplement the\n\\texttt{ProcessHits} method, using calls to \\texttt{StorePreStep},\n\\texttt{StorePostStep} and \\texttt{Kill}, as appropriate. For reference, code\nresponsible for the default implementation is shown in\nListing~\\ref{lst:g4mcplwriter_processhits}. Likewise, to add \\texttt{MCPL}\nuser-flags into the file, the \\texttt{UserFlagsDescription} and\n\\texttt{UserFlags} methods must simply be reimplemented - the description\nnaturally ending up as a comment in the output file.\n\n\\lstinputlisting[float,language={[mcpl]C++},\n label={lst:g4mcplwriter},\n caption={The \\texttt{G4MCPLWriter} class.}\n]{code_listings\/G4MCPLWriter_snippet.hh}\n\n\\lstinputlisting[float,language={[mcpl]C++},\n label={lst:g4mcplwriter_processhits},\n caption={The default \\texttt{ProcessHits} implementation in the \\texttt{G4MCPLWriter} class.}\n]{code_listings\/G4MCPLWriter_snippet_ProcessHits.hh}\n\nIn Listing~\\ref{lst:example_g4write} is shown how the \\texttt{G4MCPLWriter} will\ntypically be configured and attached to logical volume(s) of the geometry.\n\n\\lstinputlisting[float,language={[mcpl]C++},\n label={lst:example_g4write},\n caption={Example showing how to produce an \\texttt{MCPL} file from a \\texttt{Geant4} simulation.}\n]{code_listings\/example_geant4write.cc}\n\n\\subsection{\\texttt{MCNP} interface}\\label{sec:plugins_mcnp}\n\nMost users of \\texttt{MCNP} are currently employing one of three distinct\nflavours: \\texttt{MCNPX}~\\cite{mcnpx2006,mcnpx2011}, \\texttt{MCNP5}~\\cite{mcnp5}\nor \\texttt{MCNP6}~\\cite{mcnp6}. In the most typical mode of working with any of\nthese software packages, users edit and launch \\texttt{MCNP} through the use of\ntext-based configuration files (so-called \\emph{input decks}), in order to set\nup details of the simulation including geometry, particle generation, and data\nextraction. The latter typically results in the creation of data files\ncontaining simulation results, ready for subsequent analysis.\n\nAlthough it would be conceivable to write in-process \\texttt{FORTRAN}-compatible\n\\texttt{MCPL} hooks for \\texttt{MCNP}, such an approach would require users to\nundertake some form of compilation and linking procedure. This would likely\nimpose a change in working mode for the majority of \\texttt{MCNP}\nusers, in addition to possibly requiring a special license for source-level\naccess to \\texttt{MCNP}. Instead, the \\texttt{MCNP}--\\texttt{MCPL} interface\npresented here exploits the existing \\texttt{MCNP} capability to stop and\nsubsequently restart simulations at a user-defined set of surfaces through the\n\\texttt{Surface Source Write\/Read} (\\texttt{SSW}\/\\texttt{SSR}) functionality. As\nthe name suggests, the state parameters of simulated particles crossing a given\nsurface are stored on disk in dedicated files, with the intentional use as a\nsurface source in subsequent simulations with the same \\texttt{MCNP}\nsetup. Presumably, these files (henceforth denoted ``\\texttt{SSW} files'' in the\npresent text) are intended for this internal intermediate usage only, since their\nformat differs between different flavours of \\texttt{MCNP}, and little effort\nhas been made to document the format in publicly available manuals. Despite\nthese obstacles, the \\texttt{SSW} format is stable enough that several existing\n\\texttt{MCNP}-aware tools\n(e.g.~\\cite{Klinkby2013106,kbat_mctools_2015,pyne2014}) have chosen to provide\nconverters for this format, with various levels of functionality, and it was\nthus deemed suitable also for the needs of the \\texttt{MCPL} project.\n\nThus, the \\texttt{MCPL} distribution presented here includes dependency-free\n\\texttt{C} code for two standalone executables, \\texttt{mcpl2ssw} and\n\\texttt{ssw2mcpl}, which users can invoke from the command-line in order to\nconvert between \\texttt{MCPL} and \\texttt{SSW} files.\\footnote{Prior work\n in~\\cite{Klinkby2013106,kbat_mctools_2015} served as valuable input when\n developing code for interpreting data sections in \\texttt{SSW} files.} The\nusage of these two executables will be discussed here, while users are referred\nto the relevant \\texttt{MCNP} manuals for details of how to set up their input\ndecks to enable \\texttt{SSW} input or output in their \\texttt{MCNP} simulations:\n\\cite[Ch.~II.3.7]{mcnp5man}, \\cite[Ch.~5.5.5]{mcnpxman} and\n\\cite[Ch.~3.3.4.7]{mcnp6man}. Note that through usage of \\texttt{ssw2mcpl} and\n\\texttt{mcpl2ssw}, it is even possible to transfer particles between different\nflavours and versions of \\texttt{MCNP}, which is otherwise not possible with\n\\texttt{SSW} files.\n\nFirst, the \\texttt{ssw2mcpl} command, for which the full usage instructions are\nshown in Listing~\\ref{lst:ssw2mcplusage}, is in its most base invocation\nstraight-forward to use. Simply provide it with the name of an existing\n\\texttt{SSW} file to run on, and it will result in the creation of a new\n(compressed) \\texttt{MCPL} file, \\texttt{output.mcpl.gz}, containing a copy of\nall particles found in the \\texttt{SSW} file. The \\texttt{MCNP} flavour\nresponsible for creating the \\texttt{SSW} file is automatically detected, the\nresulting differences in the file format are taken into account behind the\nscenes, and the detected \\texttt{MCNP} version is documented as a comment in the\nheader of the resulting \\texttt{MCPL} file.\n\n\\lstinputlisting[float,language={},\n basicstyle={\\linespread{0.9}\\ttfamily\\scriptsize},\n label={lst:ssw2mcplusage},\n caption={Usage instructions for the \\texttt{ssw2mcpl} command.}\n]{code_listings\/ssw2mcpl_help.txt}\n\nThe only relevant piece of information which is by default not transferred from\nthe \\texttt{SSW} particle state into the \\texttt{MCPL} file is the numerical ID\nof the surface where the particle was registered in the \\texttt{MCNP}\nsimulation. By supplying the \\texttt{-s} option, \\texttt{ssw2mcpl} will transfer\nthose to the \\texttt{MCPL} user-flags field, and document this in the\n\\texttt{MCPL} header. Additionally, while floating point numbers in the\n\\texttt{SSW} file are always stored in double-precision, the transfer to\n\\texttt{MCPL} will by default convert them to single-precision. This was chosen\nas the default behaviour to keep usual storage requirements low, as\nsingle-precision is arguably sufficient for most studies. By supplying the\n\\texttt{-d} option, \\texttt{ssw2mcpl} will keep the numbers in double-precision\nin the \\texttt{MCPL} file as well. Depending on compression and the applied\nflags, the on-disk size of the resulting \\texttt{MCPL} file will typically be\nsomewhere between 20\\% and 80\\% of the on-disk size of the \\texttt{SSW} file\nfrom which it was converted.\n\nFinally it is possible, via the \\texttt{-c~FILE} flag, to point the\n\\texttt{ssw2mcpl} command to the input deck file used when producing the\nprovided \\texttt{SSW} file. Doing so will result in a complete copy of that file\nbeing stored in the \\texttt{MCPL} header as a binary data blob under the string\nkey \\texttt{\"mcnp\\_input\\_deck\"}, thus providing users with a convenient\nsnapshot in the \\texttt{MCPL} file of the \\texttt{MCNP} setup used. Unfortunately,\nit was not possible to automate this procedure completely, and it thus relies\non the user to provide the correct input deck for a given \\texttt{SSW} file. But\nthe \\texttt{ssw2mcpl} command does at least check that the specified file is a\ntext-file and that it contains somewhere the correct value of the so-called \\emph{problem title}: a\ncustom free-form string which is specified by the user in the input deck and embedded in the\n\\texttt{SSW} file by \\texttt{MCNP}. The input deck embedded in a given \\texttt{MCPL} file can\nlater be inspected from the command line by invoking the command\n``\\texttt{mcpltool~-bmcnp\\_input\\_deck~}''.\n\nUsage of the \\texttt{mcpl2ssw} command, for which the full usage instructions\nare shown in Listing~\\ref{lst:mcpl2sswusage}, is slightly more involved: in\naddition to an input \\texttt{MCPL} file, the user must also supply a reference\n\\texttt{SSW} file in a format suitable for the \\texttt{MCNP} setup in which the\nresulting \\texttt{SSW} file is subsequently intended to be used as input. The\nneed for this added complexity stems from the constraint that the \\texttt{SSW}\nformat is merely intended as an internal format in which it is possible to stop\nand restart particles while remaining within a given setup of an \\texttt{MCNP}\nsimulation -- meaning at the very least that the \\texttt{MCNP} version and the\nconfiguration of the geometrical surfaces involved in the \\texttt{Surface Source\n Write\/Read} procedure must be unchanged. Thus, for maximal robustness, the\nuser must supply a reference \\texttt{SSW} file which was produced by the setup\nin which the \\texttt{SSW} file created with \\texttt{mcpl2ssw} is to be used (it\ndoes not matter how many particles the reference file contains). What will\nactually happen is that in addition to the particle state data itself, the\nnewly created \\texttt{SSW} file will contain the exact same header as the one in\nthe reference \\texttt{SSW} file, apart from the fields related to the number of\nparticles in the file.\n\n\\lstinputlisting[float,language={},\n basicstyle={\\linespread{0.9}\\ttfamily\\scriptsize},\n label={lst:mcpl2sswusage},\n caption={Usage instructions for the \\texttt{mcpl2ssw} command.}\n]{code_listings\/mcpl2ssw_help.txt}\n\nAdditionally, the user must consider carefully which \\texttt{MCNP} surface IDs\nthe particles from the \\texttt{MCPL} file should be associated with, once\ntransferred to the \\texttt{SSW} file. By default it will assume that the\n\\texttt{MCPL} user-flags field contains exactly this ID, but more often than\nnot, users will have to specify a global surface ID for all of the particles\nthrough the \\texttt{-s} command-line option for the \\texttt{mcpl2ssw}\ncommand.\n\nFinally, note that \\texttt{SSW} files do not contain polarisation information,\nand any such polarisation information in the input \\texttt{MCPL} file will\nconsequently be discarded in the translation. Likewise, in cases where the input\n\\texttt{MCPL} file contains one or more particles whose type does not have a\nrepresentation in the targeted flavour of \\texttt{MCNP}, they will be ignored\nwith suitable warnings.\n\n\\subsection{\\texttt{McStas} and \\texttt{McXtrace} interfaces}\\label{sec:plugins_mcstasmcxtrace}\n\nRecent releases of the neutron ray tracing software package\n\\texttt{McStas}~\\cite{mcstas1,mcstas2} (version 2.3 and later) and its X-ray\nsibling package \\texttt{McXtrace}~\\cite{mcxtrace1} (version 1.4 and later)\ninclude \\texttt{MCPL}-interfaces. Although \\texttt{McStas} and \\texttt{McXtrace}\nare two distinct software packages, they are implemented upon a common\ntechnological platform, \\texttt{McCode}, and the discussions here will for\nsimplicity use the term \\texttt{McCode} where the instructions are otherwise\nidentical for users of the two packages.\n\nThe particle model adopted in \\texttt{McCode} is directly compatible with\n\\texttt{MCPL}. In essence, apart from simple unit conversions, particles are read\nfrom or written to \\texttt{MCPL} files at one or more predefined logical points\ndefined in the \\texttt{McCode} configuration files (so-called \\emph{instrument\n files}). Specifically, two new components, \\texttt{MCPL\\_input} and\n\\texttt{MCPL\\_output}, are provided, which users can activate by adding\nentries at relevant points in their instrument files as is usual when working\nwith \\texttt{McCode}.\n\nFirst, when using the \\texttt{MCPL\\_input} component, particles are directly\nread from an \\texttt{MCPL} input file and injected into the simulation at the\ndesired point, thus playing the role of a source. In\nListing~\\ref{lst:mccode_mcplinput1} is shown how, in its simplest form, users\nwould insert an \\texttt{MCPL\\_input} component in their instrument file. This\nwill result in the \\texttt{MCPL} file being read in its entirety, and all found\nneutrons (for \\texttt{McStas}) or gamma particles (for \\texttt{McXtrace}) traced\nthrough the \\texttt{McCode} simulation. Listing~\\ref{lst:mccode_mcplinput2}\nindicates how the user can additionally impose an allowed energy range when\nloading particles by supplying the \\texttt{Emin} and \\texttt{Emax}\nparameters. The units are \\si{meV} and \\si{keV} respectively for \\texttt{McStas}\nand \\texttt{McXtrace}. Thus, the code in Listing~\\ref{lst:mccode_mcplinput2}\nwould select \\SIrange{12}{100}{meV} neutrons in \\texttt{McStas} and\n\\SIrange{12}{100}{keV} gammas in \\texttt{McXtrace}. A particle from the\n\\texttt{MCPL} file is injected at the position indicated by its \\texttt{MCPL}\ncoordinates \\emph{relative} to the position of the \\texttt{MCPL\\_input}\ncomponent in the \\texttt{McCode} instrument. Thus, a user can impose coordinate\ntransformations by altering the positioning of \\texttt{MCPL\\_input} as shown in\nListing~\\ref{lst:mccode_mcplinput3}, which would shift the initial position of\nthe particles by $(X,Y,Z)$ and rotate their initial velocities around the $x$,\n$y$ and $z$ axes (in that order) by respectively $Rx$, $Ry$ and $Rz$\ndegrees. Furthermore, Listing~\\ref{lst:mccode_mcplinput3} shows a way to\nintroduce a time shift of \\SI{2}{s} to all particles, using an \\texttt{EXTEND}\ncode block.\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcplinput1},\n caption={Code enabling \\texttt{MCPL} input in its simplest form.}\n]{code_listings\/mccode_mcplinput1.instr}\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcplinput2},\n caption={Code enabling \\texttt{MCPL} input, selecting particles in a given energy range.}\n]{code_listings\/mccode_mcplinput2.instr}\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcplinput3},\n caption={Code enabling \\texttt{MCPL} input, applying spatial and temporal transformations.}\n]{code_listings\/mccode_mcplinput3.instr}\n\nFor technical reasons, the number of particles to be simulated in\n\\texttt{McCode} must be fixed at initialisation time. Thus, the number of\nparticles will be set to the total number of particles in the input file, as\nthis is provided through the corresponding \\texttt{MCPL} header field. If and\nwhen a particle is encountered which can not be used (due to having a wrong\nparticle type or energy), it will lead to an empty event in which no particles\nleave the source. At the end of the run, the number of particles skipped over\nwill be summarised for the user. This approach obviates the need for running\ntwice over the input file and avoids the potential introduction of\nstatistical bias from reading a partial file.\n\nNote that if running \\texttt{McCode} in parallel processing mode using\nMPI~\\cite{mpi_standard_2015}, each process will operate on all particles in the\nentire file, but the particles will get their statistical weights reduced\naccordingly upon load. This behaviour is not specific to the\n\\texttt{MCPL\\_input} component, but is a general feature of how multiprocessing\nis implemented in \\texttt{McCode}.\n\n\nWhen adding an \\texttt{MCPL\\_output} component to a \\texttt{McCode} instrument\nfile, the complete state of all particles reaching that component is written to\nthe requested output file. In Listing~\\ref{lst:mccode_mcploutput1} is shown how,\nin its simplest form, users would insert such a component in their instrument\nfile, and get particles written with coordinates relative to the component\npreceding it, into the output file (replace \\texttt{RELATIVE PREVIOUS} with\n\\texttt{RELATIVE ABSOLUTE} to write absolute coordinates instead). For reference, a copy of the complete\ninstrument file is stored in the \\texttt{MCPL} header as a binary data blob\nunder the string key \\texttt{\"mccode\\_instr\\_file\"}. This feature provides users\nwith a convenient snapshot of the generating setup. The instrument file embedded\nin a given \\texttt{MCPL} file can be inspected from the command line by invoking\nthe command ``\\texttt{mcpltool -bmccode\\_instr\\_file }''.\n\nIf running \\texttt{McCode} in parallel processing mode using MPI, each process\nwill create a separate output file named after the pattern\n\\texttt{myoutput.node\\_idx.mcpl} where \\texttt{idx} is the process number (assuming\n\\texttt{filename=\"myoutput.mcpl\"} as in\nListing~\\ref{lst:mccode_mcploutput1}), and those files will be automatically\nmerged during post-processing into a single file.\\footnote{This automatic merging\nonly happens in \\texttt{McStas} version 2.4 or later and \\texttt{McXtrace}\nversion 1.4 or later, and can be disabled by setting the parameter \\texttt{merge\\_mpi=0}. Users of earlier versions will have to use the\n\\texttt{mcpltool} command to perform the merging manually, if desired.}\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcploutput1},\n caption={Code enabling \\texttt{MCPL} output in its simplest form.}\n]{code_listings\/mccode_mcploutput1.instr}\n\nTo avoid generating unnecessarily large files, the \\texttt{MCPL\\_output}\ncomponent stores particle state data using the global PDG code feature\n(cf.\\ section~\\ref{sec:format_infoavail}), uses single-precision floating point\nnumbers, and does \\emph{not} by default store polarisation vectors. The two\nlatter settings may be changed by the user through the \\texttt{polarisationuse}\nand \\texttt{doubleprec} parameters respectively, as shown in\nlisting~\\ref{lst:mccode_mcploutput2}.\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcploutput2},\n caption={Code enabling \\texttt{MCPL} output with polarisation and double-precision numbers.}\n]{code_listings\/mccode_mcploutput2.instr}\n\nFinally, if desired, custom information might be stored per-particle into the\n\\texttt{MCPL} user-flags field for later reference. This could be any property,\nsuch as for instance the number of reflections along a neutron guide, or the\ntype of scattering process in a crystal,\netc. Listing~\\ref{lst:mccode_mcploutput3} shows a simple example of this where\nthe particle ID, in the form of its \\texttt{McCode} ray number (returned from\nthe \\texttt{McCode} library function \\texttt{mcget\\_run\\_num}), is stored into\nthe user-flags field. A string, \\texttt{userflagcomment}, is required in order\nto describe the significance of the extra data, and will end up as a comment in\nthe resulting \\texttt{MCPL} file.\n\n\\lstinputlisting[float,language={[mccode]C},\n label={lst:mccode_mcploutput3},\n caption={Code enabling \\texttt{MCPL} output with custom user-flags information.}\n]{code_listings\/mccode_mcploutput3.instr}\n\n\\section{Example scientific use cases}\\label{sec:examples}\n\nThe possible uses for \\texttt{MCPL} are envisioned to be many and varied,\nfacilitating both straight-forward transfers of particle data between different\nsimulations, as well as data reuse and cross-code comparisons. Actual scientific\nstudies are already being performed with the help of \\texttt{MCPL},\ndemonstrating the suitability of the format ``in the field''. By way of\nexample, it will be discussed in the following how \\texttt{MCPL} is used in two\nsuch ongoing studies.\n\n\\subsection{Optimising the detectors for the LoKI instrument at ESS}\\label{sec:example_loki}\n\nThe ongoing construction of the European Spallation Source\n(ESS)~\\cite{esscdr,esstdr} has initiated significant development of novel\nneutronic technologies in the past 5 years. The performance requirements for\nneutron instruments at the ESS, in particular those resulting from the\nunprecedented cold and thermal neutron brightness, are at or beyond the\ncapabilities of detector technologies currently available~\\cite{kirstein2014}.\nAdditionally, shortage of $^3$He~\\cite{he3crisis1,he3crisis2}, upon which the\nvast majority of previous detectors were based, augments the need for\ndevelopment of new efficient and cost-effective detectors based on other\nisotopes with high neutronic conversion cross sections.\n\nA typical approach to instrument design and optimisation at ESS involves the\ndevelopment of a \\texttt{McStas}-based simulation of the instrument. Such a\nsimulation includes an appropriate neutron source description and detailed\nmodels of the major instrument components, such as benders, neutron guides,\nchopper systems, collimators, sample environment and sample. See~\\cite{carlile}\nfor an introduction to the role of the various instrument components. Detector\ncomponents in \\texttt{McStas} are, however, typically not implemented with any\ndetailed modelling, and are simply registering all neutrons as they\narrive. Thus, while the setup in \\texttt{McStas} allows for an efficient and\nprecise optimisation of most of the instrument parameters, detailed detector\noptimisation studies must out of necessity be carried out in a separate\nsimulation package, such as \\texttt{Geant4}.\n\nAs the detector development progresses in parallel with the general instrument\ndesign, it is crucial to be able to optimise the detector setup for the exact\ninstrument conditions under investigation in \\texttt{McStas}. The \\texttt{MCPL}\nformat, along with the interfaces discussed in sections~\\ref{sec:plugins_geant4}\nand \\ref{sec:plugins_mcstasmcxtrace}, facilitates this by allowing for easy\ntransfer of neutron states from the \\texttt{McStas} instrument simulation into\n\\texttt{Geant4} simulations with detailed setups of proposed detector designs.\n\nTechnically, this is done by placing the \\texttt{MCPL\\_output} component just\nafter the relevant sample component in the \\texttt{McStas} instrument\nfile. Additionally, using the procedure for creation and storage of custom\n\\texttt{MCPL} user-flags also discussed in\nsection~\\ref{sec:plugins_mcstasmcxtrace}, it is possible to differentiate\nneutrons that scattered on the sample from those which continued undisturbed, and\nto carry this information into the \\texttt{Geant4} simulations. This information\nis needed to understand the impact of the direct beam on the low angle\nmeasurements, in order to study the requirements for a so-called zero-angle\ndetector.\n\nFor example, in order to optimise the detector technology that the LoKI\ninstrument~\\cite{lokijackson2015, lokikanaki2013, lokikanaki2013corr} might adopt, a series of \\texttt{McStas}\nsimulations of the instrument components and the interactions in realistic\nsamples~\\cite{sasviewkernels} are performed (see Figure~\\ref{loki_mcstas} for a\nview of the instrument in \\texttt{McStas}). The parameters of the instrument and\nthe samples in the \\texttt{McStas} model are chosen in such a way, that various\naspects of the detector performance can be investigated, including rate\ncapability and spatial resolution. The neutrons emerging from the sample in\n\\texttt{McStas} are then transferred via \\texttt{MCPL} to the detector\nsimulation in \\texttt{Geant4}, where a detailed detector geometry and\nappropriate materials are implemented (see Figure~\\ref{loki_g4} for a\nvisualisation of the \\texttt{Geant4} model).\n\n\\begin{figure}\n \\centering\n \\includegraphics[scale=0.4]{graphics\/loki-master-model-layout}\n \\caption{Layout of the \\texttt{McStas} model of the LoKI instrument. Neutrons\n originate at the source located at $z=0$ and progress through the various\n instrument components toward the sample at $z=\\SI{22.5}{m}$.}\n \\label{loki_mcstas}\n\\end{figure}\n\n\\begin{figure}\n \\centering\n \\includegraphics[scale=0.4]{graphics\/loki-g4}\n \\caption{\\texttt{Geant4} model of a potential detector geometry for the LoKI\n instrument. Neutrons from the sample hitting the active detector area appear in red.}\n \\label{loki_g4}\n\\end{figure}\n\nNeutrons traversing the detector geometry in \\texttt{Geant4} undergo\ninteractions with the materials they pass on their flight-path, according to the\nphysics processes and respective cross sections available in the setup. Special\nattention is needed when configuring the \\texttt{Geant4} physics modelling, to\nensure that all processes relevant for neutron detection are taken into account\nand handled correctly. Specifically, the setup utilises the\nhigh-precision neutron models in \\texttt{Geant4} extended with~\\cite{nxsg4}, and\nis implemented in~\\cite{dgcodechep2013}. In the solid-converter based detectors\nunder consideration, a neutron absorption results in emission of charged products which then\ntravel a certain range inside the detector and deposit energy in a counting\ngas. It is possible to extract position and time information from the energy\ndeposition profile and use these space-time coordinates for further analysis, in\nthe same way that measurements in a real detector would be treated. This way it becomes\npossible to reproduce the distributions of observable quantities relevant for\nSmall Angle Neutron Scattering (SANS) analysis~\\cite{sansfeigin, sansimae}.\n\nOne such observable quantity is the $Q$ distribution~\\cite[Ch.~2.3.3]{carlile},\nwhere $Q$ is defined as the momentum change of the neutron as it scatters on the\nsample, divided by $\\hbar$: $Q\\equiv|\\Delta\\vec{p}|\/\\hbar$. Figure~\\ref{loki_q}\ndemonstrates such a distribution, based on the simulated\noutput of the middle detector bank of LoKI (cf.\\ Figure~\\ref{loki_g4}), for a\ncertain instrument setup -- including a sample modelled as consisting of spheres\nwith radii of \\SI{200}{\\angstrom}. The raw $Q$ distribution is calculated both\nbased on the neutron states as they emerge from the sample in \\texttt{McStas},\nand from the simulated measurements in \\texttt{Geant4}. With such a procedure,\nresolution-smearing effects can be correctly attributed to their sources,\ngeometrical acceptance and detector efficiency can be studied in detail, and the\nimpact of engineering features such as dead space can be accurately considered.\n\n\\begin{figure}\n \\centering\n \\includegraphics[scale=0.5]{graphics\/loki_q}\n \\caption{Raw $Q$ distribution for a subset of the LoKI detectors\n (middle detector bank of Figure~\\ref{loki_g4}). The\n \\texttt{McStas} post-sample output appears in blue, while the distribution calculated\n from the simulated measurements in \\texttt{Geant4} appears in red.}\n \\label{loki_q}\n\\end{figure}\n\n\\subsection{Neutron spectra predictions for cosmogenic dating studies}\n\nThe use of radionuclides produced in-situ by cosmic rays for dating purposes\nhas, in the last two decades, revolutionised the earth surface\nsciences~\\cite{Dunai2010}. The precise determination of the production rate of\nsuch isotopes, like $^{10}$Be and $^{26}$Al, poses the key challenge for this\ntechnique and relies on a folding of cosmic fluxes with energy dependent\nproduction cross sections~\\cite{Reedy2013}. The present discussion will focus on\nthe evaluation of the neutron flux induced by cosmic radiation, and in\nparticular on how \\texttt{MCPL} can be exploited both to facilitate the reuse of\ncomputationally intensive simulations, and as a means for cross-code\ncomparisons.\n\nAt sea level, neutrons constitute the most abundant hadronic component of cosmic\nray induced showers, and possess relatively high cross sections for production\nof isotopes relevant for radionuclide dating. Thus, it is the dominant\ncontributor to the relevant isotopic production in the first few meters below\nthe surface~\\cite{Gosse2001}. Extending further below the surface, the neutron\nflux decreases rapidly, and as a consequence the isotopic production rate\ninduced by cosmic muons eventually becomes the most significant\nfactor~\\cite{Heisinger2002a,Heisinger2002b}. At a depth of approximately\n\\SI{3}{\\meter} below the surface, the production rate due to muons is comparable\nwith the rate from neutrons~\\cite{Gosse2001}. Considering non-erosive surfaces\nand samples at depths significantly less than \\SI{3}{\\meter}, the production\nrates can thus be estimated by considering just the flux of neutrons. Thus,\ngiven known cross sections for neutronic production of $^{10}$Be or $^{26}$Al,\nproperties such as the cosmic irradiation time of a given sample can be directly\ninferred from its isotopic content -- providing information about geological\nactivity. In the present study, Monte Carlo methods are used to simulate\natmospheric cosmic rays~\\cite{Masarik1999,Masarik2009} and subsequently estimate\nthe neutron flux spectra as a function of depth under the surface of the Earth.\n\nPrimary cosmic rays constantly bombard the solar system and initiate cosmic ray\nshowers in the Earth's atmosphere, leading to the production of atmospheric\nneutrons. Figure~\\ref{fShower} shows the trajectories of a simulated air shower\ninduced by a single \\SI{100}{\\GeV} proton in \\texttt{Geant4}: very large numbers\nof secondary particles are generated in each shower, all of which must\nthemselves undergo simulation. Full scale simulation of such showers is\ntherefore relatively time consuming. On the other hand, simulations of the\npropagation of sea level neutrons in a few meters of solid material are\nrelatively fast. In the present work of estimating neutron spectra for\ndifferent underground materials, \\texttt{MCPL} is used to record particle\ninformation at sea level. Using the recorded data as input, subsequent\nsimulations are dedicated to the neutron transport in different underground\nmaterials. In this way, repetition of the time consuming parts of the simulation\nis avoided. \\texttt{Geant4} is used to simulate the air shower in this work,\nwhile both \\texttt{Geant4} and \\texttt{MCNPX} are used to simulate neutron\nspectra underground.\n\n\\begin{figure}\n \\centering\n \\includegraphics[width=.6\\textwidth]{graphics\/shower}\n \\caption{Cosmic shower simulated in \\texttt{Geant4}. The incident proton\n energy is \\SI{100}{\\GeV} and the length of the $x$-axis is \\SI{2}{\\km}. The\n straight grey trajectories are neutrinos. The yellow and green trajectories\n are photons and neutrons, respectively. }\n \\label{fShower}\n\\end{figure}\n\nIn the \\texttt{Geant4} simulation of the Earth's atmosphere, the geometry is\nimplemented as a \\SI{100}{km} thick shell with an inner radius of \\SI{6387}{km},\nsub-divided into 50 equally thick layers, the effective temperatures and\ndensities of which are calculated using the ``U.S. standard atmosphere, 1976''\nmodel~\\cite{Jursa1985}. Using the plugins described in\nsection~\\ref{sec:plugins_geant4}, the simulation of any particle reaching the\ninner surface of the atmosphere is ended and its state stored in an\n\\texttt{MCPL} file. To compare the simulated and measured~\\cite{Gordon2004}\nspectra at New York city, a lower cutoff of $E_c=\\SI{2.08}{GeV}$ on the kinetic\nenergy of the primary proton is applied, to take the geomagnetic field shielding\neffect at this location into account. The relationship between the number of\nsimulated primary protons, $N$, and the real world time-span, ${\\delta}t$, to\nwhich such a sample-size corresponds, is given by the following equation:\n\\begin{equation*}\n{\\delta}t=\\frac{N}{\\int\\limits_{E_{c}}^{\\infty} J(E) dE \\times 2\\pi\\times 4\\pi r^2 }\n\\end{equation*}\nHere, $r$ is the outer radius of the simulated atmosphere and $J$ the\ndifferential spectrum of Usoskin's model~\\cite{Usoskin2005} using the\nparameterisation in~\\cite{Herbst2010}.\n\nIn the simulation of \\SI{4.20e6} primary protons, the resulting integral\nneutronic flux above \\SI{20}{\\MeV} at sea level was found to be\n\\SI{3.27e-15}{\\per\\square\\cm}, corresponding to an absolute surface flux at New\nYork city of \\SI{4.22e-3}{\\per\\square\\cm\\per\\second}. Integrating the measured\nreference neutron spectrum tabulated in~\\cite{Gordon2004} above \\SI{20}{\\MeV},\nan integral flux of \\SI{3.15e-3}{\\per\\square\\cm\\per\\second} is obtained. The\nsimulation thus overestimates the measured flux by 34\\%, which is a level of\ndisagreement compatible with the variation in the predicted value of the integral flux\nbetween different models of the local interstellar spectrum~\\cite{Herbst2010}. Therefore,\nthe performance of the atmospheric simulation is concluded to be satisfactory.\n\nIn the subsequent underground simulations presented here, the Earth is for\nsimplicity modelled as consisting entirely of quartz (SiO$_2$), which is a\nsample material widely used in cosmogenic dating applications~\\cite{Dunai2010},\nas both $^{26}$Al and $^{10}$Be are produced within when subjected to neutron\nradiation -- normally via spallation. The \\texttt{MCPL} files generated by the\ncomputationally expensive atmospheric shower simulation described above, is\ninput to the underground simulations implemented in both \\texttt{Geant4} and\n\\texttt{MCNPX}, using the interfaces described in\nsections~\\ref{sec:plugins_geant4} and \\ref{sec:plugins_mcnp}. The geometries in\nboth cases are defined as \\SI{20}{\\cm} thick spherical shells consisting of pure\nquartz. As the threshold energies of the related spallation reactions are well\nabove \\SI{20}\\MeV, only spectra above this energy are compared in this study.\nThe simulated volume spectra in a few layers are compared in\nFigure~\\ref{fQuartz}. Good agreement between \\texttt{Geant4} and \\texttt{MCNPX}\nis observed.\n\n\\begin{figure}\n \\centering\n \\includegraphics[width=.8\\textwidth]{graphics\/geant4_mcnpx_quartz}\n \\caption{Comparisons of simulated neutron spectra in underground quartz.}\n \\label{fQuartz}\n\\end{figure}\n\nIn conclusion, a useful method for disentangling the resource intensive\nsimulation of cosmic showers from subsequent faster simulations of neutron\ntransport in the Earth crust has been demonstrated using \\texttt{MCPL} as an\nintermediate stepping stone. The simulation strategy thus employed eases the\nuse of computational resources, and provides a means for cross-comparison\nbetween simulation codes. Given reliable energy dependent cross sections, many\nof the key parameters for cosmogenic dating applications can be provided based\non the work described in this section.\n\n\\section{Summary and outlook}\n\nThe \\texttt{MCPL} format provides flexible yet efficient storage of\nparticle-state information, aimed at simplifying and standardising interchange\nof such data between applications and processes. The core parts of \\texttt{MCPL}\nare implemented in portable and legally unencumbered \\texttt{C} code. This is\nintended to facilitate adoption into existing packages and build systems, and\nthe creation of application-specific converters and plugins.\n\nIn connection with the initial release presented here, \\texttt{MCPL} interfaces\nwere created for several popular Monte Carlo particle simulation packages:\n\\texttt{Geant4}, \\texttt{MCNP}, \\texttt{McStas} and \\texttt{McXtrace}. It is the\nintention and hope that the number of such \\texttt{MCPL}-aware applications will\nincrease going forward. A website~\\cite{mcplwww} has been set up for the\n\\texttt{MCPL} project, on which users will be able to locate future updates to\nthe \\texttt{MCPL} distribution, as well as relevant documentation.\n\n\\section*{Acknowledgements}\n\nThis work was supported in part by the European Union's Horizon 2020 research\nand innovation programme under grant agreement No 676548 (the BrightnESS\nproject) and under grant agreement No 654000 (the SINE2020 project).\n\n\\section*{References}\n\n","meta":{"redpajama_set_name":"RedPajamaArXiv"}}