Dataset Viewer
Auto-converted to Parquet Duplicate
text
stringlengths
1
7.6M
meta
dict
\section{Introduction} In the standard cosmological scenario, CDM particles decouple while non-relativistic from the primordial thermal bath. Their consequently small speeds allow for a clustering that agrees well with an impressive array of observations on large scales \citep{Frenk2012}. But this same `coldness' leads to excessive central densities in the nonlinear regime. As soon as they could resolve the central regions, simulations showed that CDM haloes were endowed with central density cusps, with their density diverging towards the centre \citep{Dubinski1991, Warren1992}. It subsequently transpired that this reflected nearly `universal', self-similar, behaviour; with the density profiles of haloes at different masses, identified at various epochs, well fit with by simple empirical formulae \citep{nfw}. But the central density cusps seemed too dense to match those inferred for dark matter dominated galaxies, like low-surface-brightness and dwarf galaxies \citep{Moore1994, Flores1994}. This `cusp-core' problem is central to the low-redshift small-scale issues associated with CDM structure formation, which have attracted much attention during the past decades, as its resolution may simultaneously alleviate other puzzles associated with small scale structure in CDM simulations, such as the so-called `too-big-to-fail' problem (\citealp{ReadTBF2006, BoylanTBF2011, OgiyaBurkTBF2015}; for general reviews see, e.g., \citealp{delPopolo2017,Bullock_B2017, Salucci:2018hqu}). CDM-based simulations also predict a general over-abundance of small haloes compared to small galaxies. This issue has however become progressively less severe as small Milky Way satellite galaxies, which may be associated with the small CDM haloes, are being discovered and counted in (e.g., \citealp{nadler2020}). Assuming that the data has not been misinterpreted (e.g.~\citealp{Oman2019}), solutions to the aforementioned problems can be principally divided into two sets; those modifying the underlying dark matter particle physics model and those invoking gravitationally mediated CDM interaction with baryons. The most popular of the first category have been warm dark matter and self interacting dark matter, and the more recently topical fuzzy dark matter. The simplest models of the latter type have problems explaining core scaling relations in galaxies \citep{DHHertz18, Burkert20, BarBlumRotII21}, and warm dark matter does not generally succeed in producing central density cores at all, as cold collapse occurs unless the dark matter is `warm' enough to prevent the halo at hand from forming in the first place \citep{Maccio2012b}. Warm dark matter may make baryonic core formation easier, due to lower halo concentrations, but this is debated since warm dark matter also acts to suppress early star formation \citep{Governato2015}. In general particle physics based modifications to the standard structure formation scenario invoking warm dark matter or fuzzy dark matter, have been more successful in explaining the apparent over-abundance of small scale structure. But this, instead of being a strong point, has now joined Lyman-$\alpha$ constraints (e.g., \citealp{ViDvielWDM2017, VidVielFDM}) and strong lensing (e.g., \citealp{GilmanLensMisssat2020}) in setting limits on the efficacy of such models~\citep{SimonMisssat2007, KopGilMisssat2008, KimMisssat2018, ReadMisssat2019, NewtonMisssat2021,nadler2020, Nadler2021}. Interacting dark matter-based models on the other hand generically suffer from eventual gravothermal contraction of cores, which are not easily avoided for all relevant spatial and time scales \citep{Burkert2000, Kochanek2000, CoreColSIDM21}. A non-negligible scattering crossection between standard model particles and dark matter has also been proposed (\citealp{FamaueyBarint2020, SallucciBarint2020}), although this option has not been as fully investigated so far, On the other hand, gravitational coupling between dark matter and baryons has long been known to be effective in transforming CDM cusps into cores. Its main shortcoming however comes from the complex physics and the associated uncertainties in the parameters involved. Indeed, cusp-core transformation through such coupling come in three different forms: one time mass blowout due to a single burst of energy feedback (\citealt{Navarro1996a}, and more recently \citealt{Freundlich2020} and \citealt{Li2022}); the pumping of energy from (gaseous or stellar) baryonic clumps to CDM via dynamical friction \citep{Zant2001, Zant2004}; and density and potential fluctuations in feedback-driven gas during galaxy formation \citep{Read2005, Pontzen2014}. Despite the apparent similarity of the first and third mechanisms (as they both invoke feedback), it is the last two that are in fact more closely related at a deeper level --- as they both involve a long-lived fluctuations progressively heating the CDM on timescales much longer than that of a single feedback starburst, as discussed in \citet{EZFC}. Dynamical friction heating is nevertheless expected to be observationally distinct from supernova heating since the latter correlates with star formation \citep[e.g.][]{Read2019} while the former does not, and both may act in tandem during galaxy formation \citep{Orkney2021, Dekel2021, OgiyaDF2022}. In the particular case of dwarf galaxies, there is mounting observational evidence for dark matter heating from impulsive, `bursty', star formation, ubiquitous in dwarfs below a stellar mass of $M_* \sim 10^8$\,M$_\odot$ \citep[e.g.][]{Collins2022}. Indeed, there is an observed anticorrelation between the inner dark matter density of dwarfs and their stellar-to-halo mass ratio $M_*/M_{200}$ \citep{Read2019, Bouche2022}, which is a proxy for the amount of star formation -- and therefore dark matter heating -- that has taken place \citep[e.g.][]{Penarrubia2012, DiCintio2014, Freundlich2020b}. This may favour a scenario of feedback-driven core formation in such galaxies. As conjectured in \cite{EZFC}, it may be possible to understand the process of feedback-driven core formation with repeated bursts from first principles, bypassing the uncertain complexities of `gastrophysics' and its various subgrid implementations. Indeed the stochastic dynamical model presented there suggested that the process of core formation depended primarily on just two parameters, namely the gas mass fraction and the strength of the fluctuations characterised by the normalisation of a power-law power spectrum. It is our purpose here to study the properties of feedback-driven fluctuations in a full hydrodynamic simulation where a cups-core transformation occurs, with the aforementioned model forming an interpretive framework and guide. Thus testing, in the process, its assumptions and predictions. \section{Modelling halo heating from gas fluctuations} \label{sec:level2} \subsection{Physical setting} \label{sec:physicalset} The general picture envisioned, in \citet{EZFC}, and here, is that of a gas settling into a CDM halo. As it contracts, a critical density is reached, leading to star formation and consequent starburst. The star formation process assumed is akin to that described in \citet{Teyssier2013} and \citet{Readsim2016}. Namely, the threshold is considered high enough so that most star formation does not occur in a few bursts, but instead repetitively over a long timespan. This leads to sustained density and mass fluctuations in the gas that appear amenable to a description in terms of a stationary stochastic process over the timescale of the simulation. If, to a first approximation, the gas density is assumed to be isotropic and homogeneous when averaged over large spatial or time scales, with average density $\rho_0$, then the mass fluctuations within a spatial scale $R$ can (as in characterising cosmic structure) be characterized by a dispersion \begin{equation} \sigma _R^2 = \frac{1}{2 \pi ^2} \int _0^\infty W^2(k,R) \mathcal {P}(k) k^2 {\rm d}k, \label{eq:RMS} \end{equation} where $\mathcal {P}(k)$ is the equal time power spectrum of the density fluctuations $\delta \rho ({\bf r}, t)/\rho_0 - 1$, and $W$ is a Fourier filter function. If the fluctuations furthermore constitute a stationary Gaussian random process, this is all what one needs to know to completely characterise them. The stochastic dynamics can likewise be described completely in terms of the first and second moment statistics of the force field, which are easily obtainable from the Poisson equations: in particular, the $k$-modes of the potential fluctuations are related to those of the density by $\phi _{\boldsymbol k} = -4 \pi G \rho _0 \delta _{\boldsymbol k} k^{-2}$, as discussed in~\cite{EZFC} and, in another context, in~\cite{EZFCH}. As shown in the latter work, this formulation can also describe standard two-body relaxation. As such, it can be used to calculate the effect of fluctuations arising from the presence of a collection of massive particles on a system of lighter ones. Relaxation in this context `heats' the light particles, by increasing their velocity dispersion, while the heavier particles lose energy via dynamical friction. The general theoretical framework used here thus also applies to dynamical friction heating of the halo in the presence of massive clumps. The relevant power spectrum of density fluctuations, in that case, is flat (white noise) over scales larger than the maximum size of the (monolithic) clumps. Thus the description in terms of dynamical friction\ heating is more relevant when the gas fluctuations can be described in terms of a system of long lived distinct clumps with sizes significantly smaller than the region where the core forms. When feedback is strong, and the gas fully turbulent on scales relevant to core formation, the spectrum of density fluctuations may be assumed to be approximated by a power law over such scales. As in the white noise case, the fluctuations lead to energy transfer from the gas to the halo particles, which drives the transformation of the latter's problematic central cusp into a core. The energy transfer may still be described in particularly simple terms, reminiscent of Chandrasekhar's theory of two body relaxation; for a given halo and power spectrum $\mathcal {P} \propto k^{-n}$, the associated relaxation time $t_{\rm relax}$ is predicted to principally depend just on the normalization of that spectrum at the minimal wavenumber $\mathcal{P} (k_m)$ (at which the power law breaks), and the average gas density $\rho_0$. More concretely, for a halo particle moving with an unperturbed speed $v_p$ in a field of gas fluctuations carried by bulk flows moving with characteristic speed $v_r$ relative to it, one finds \begin{equation} t_{\rm relax} = \frac{n v_r v_p^2}{8 \pi (G \rho _0)^2\mathcal {P} (k_m)}. \label{eq:relax} \end{equation} This is the timescale for the random velocity gained by a CDM particle, as a result of its motion in the stochastic force field born of gas fluctuations, to reach the unperturbed characteristic speed $v_p$ (and which reduces to Chandrasekhar's formula for $n = 0$; \citealp{EZFCH}). In this context, the timescale of significant central halo transformation, from cusp to core, should also scale thus. Controlled simulations (using the Herquist-Ostriker code (\citealt{Hernquist1992}), whereby Gaussian random noise was applied to particles of live CDM haloes, produced cores on the expected timescale, when the haloes were kept strictly spherical \citep{EZFC}.~\footnote{When this condition was relaxed, the timescales for core formation were found to be about an order of magnitude shorter. But the scaling with the normalisation of the power spectrum and average density, as reflected in Eq.~(\ref{eq:relax}), remained. As noted in Section~\ref{sec:massmod}, we find no evidence of such accelerated (relative to the relaxation time) core formation rate here.} The characteristic velocity $v_r$ appearing in Eq.~(\ref{eq:relax}) is estimated through the `sweeping' approximation, long used in turbulence theory (\citealp{TaylSwepp1938,KraichSweep1964,TennekSweep1975}) and invoked by~\cite{EZFC}. It assumes that the equal-time spatial statistics of the fluctuation field are swept ('frozen in') into the time domain through large scale fluid flows. In this picture $v_r$ consists of random and regular velocity components $U$ and $V$, such that $v_r = \sqrt{U^2+V^2}$ that are characteristic of those flow. In our case, since the halo particles are also moving with respect to the gaseous flows, the characteristic $v_r$ may be considered to include such motions.~\footnote{In principle, each fluctuating mode may have its own sweeping speed and the velocity distribution of the particles can be taken into account, as in \cite{EZFCH}. We do not consider this more complex case here.} We test this assumption in Section~\ref{sec:disp}. Finally, as the average gas density in a realistic system will not be constant (even if it may slowly change within a certain radius as we will see in relation to Fig.~\ref{fig:densityprofiletime_all}), we thus define the average density, at a given time, within a sphere with radial coordinate $r$ by \begin{equation} \rho_0 (r, t) = \langle \rho_g ({\bf r},~t) \rangle_{|{\bf r}|<r}, \label{eq: rhoavdef} \end{equation} where $\rho_g ({\bf r}, t)$ is the local gas density and the average is evaluated within the volume enclosed by $r = |{\bf r}|$. A further average over time results in $\rho_0 (r)$. If the averaging is not evaluated over a sphere centered at the origin, but over spheres with centres at radial coordinate $r$ and radius $r_{\rm av}$, an analogous average may also be defined (as in equation~\ref{eq:semiloc}). \subsection{Numerical implementation} \begin{figure*} \centering \includegraphics[width=\textwidth]{./PDFFigs/densityMap_faceedge.pdf} \caption{Gas projected density map inside a box of length 5 kpc (2.5 kpc on a side from the centre of the halo). The gas contracts from the initial NFW profile, then much of it is expelled from the inner region during the first few hundred Myr. It gradually settles into a disk-like configuration, but its distribution fluctuates over time.} \label{fig:Gas_Map} \end{figure*} We wish to examine feedback-driven gas fluctuations in a full hydrodynamic simulation, to find out whether their characteristics and their effects may fit the picture outlined above. To facilitate the isolation of the principal features, we focus on the case of an isolated galaxy. Its parameters (Table \ref{table:halo}) are chosen to correspond to those of dwarf galaxies, where dark matter dominates even in the central regions and the discrepancy between the inferred density and a centrally concentrated halo profile seems particularly clear. The simulation of the isolated dwarf is set up and run with the RAMSES adaptive mesh refinement code \citep{Teyssier2002}, and already presented in \citet{Readsim2016}. We use `Run M9c224e6' from that paper, which has 281 time outputs regularly spaced over a timespan of 13.7 Gyr. The initial condition for this simulation assumes a NFW dark matter halo \citep{nfw} with total mass inside the virial radius $M_{200} = 10^9$\,M$_\odot$ and concentration parameter $c_{200} = 22.23$. A fraction $f_b = 0.15$ of that mass ($M_g (r_{\rm vir}) = 0.15 \times 10^9\,M_\odot$), is in gas that is initially in hydrostatic equilibrium, with a metallicity of $10^{-3}$\,Z$_\odot$ and some angular momentum set to match median expectations in a $\Lambda$CDM cosmology. While the simulation assumes that the dwarf galaxy contains the Universal baryon fraction out to its virial radius, the ratio between the gas mass initially within the region of interest for core formation ($\sim 1~{\rm kpc}$) and the mass within the virial radius is much lower, and thus consistent with observational constraints (e.g.~\citealp{ReadBarFrac2005}). At the start of the simulation, the gas rapidly cools and collapses, then re-expands under the influence of feedback. In the process, the central gas mass fraction further decreases (cf. Section~\ref{sec:gasdens}). The sub-grid model for star formation and feedback is described in detail in \citet{Readsim2016}. Briefly, star formation follows a Schmidt relation with a star formation efficiency per free fall time of $\epsilon_{\rm ff} = 0.1$ and a density threshold for star formation of $\rho_* = 300$\,atoms\,cm$^{-3}$. The stellar feedback model is as in \citet{Agertz2013} and includes a model for Type II and Tyle Ia supernovae, stellar winds and radiation pressure. The simulation resolution was chosen to capture momentum driving from individual supernovae events, with a gas spatial resolution of $\Delta x \sim 4$\,pc and a mass resolution in gas, stars and dark matter of $m_{\rm g} = 60\,{\rm M}_\odot$ and $m_* = M_{\rm DM} = 250\,{\rm M}_\odot$, respectively. This allows individual star formation events to be resolved, injecting stellar feedback to the interstellar medium in the correct locations at the correct times. \begin{table} \centering \caption{Initial profile parameters.} \label{tab:nfw} \begin{tabular}{lll} \hline NFW scale length & $r_s$ & $0.88\; {\rm kpc}$ \\ NFW characteristic density & $\rho_s$ & $5.34 \times 10^7~ {\rm M_{\odot} ~kpc^{-3}}$ \\ Concentration parameter & c & $22.23$ \\ Mass within the virial radius & $M_{\rm vir}$ & $10^9\; {\rm M_{\odot}}$ \\ Baryonic mass fraction & $f_b$ & $0.15$ \\ \hline \end{tabular} \label{table:halo} \end{table} \section{Characterizing the gas fluctuations} \begin{figure} \centering \includegraphics[width=\linewidth]{./PDFFigs/GasMassTimeSeries_HSSC.pdf} \caption{Time variation of the gas mass enclosed within different radii $r$ (in kpc), suggesting a quasi-stationary stochastic process.} \label{fig:MTsiers} \end{figure} \begin{figure*} \centering \includegraphics[width= 0.48\textwidth, ]{./PDFFigs/GasAverageDensity_HSSC_fnl_vf.pdf} \includegraphics[width= 0.49\textwidth, ]{./PDFFigs/gas_mass_ratio_vff.pdf} \caption{{\it Left:} Average gas density inside radius $r$, $\rho_0 (r, t)$, for all snapshots, obtained by using equation~(\ref{eq: rhoavdef}). The dashed line is a time average over the indicated interval, which corresponds to the simulation time beyond an initial non-equilibrium phase through which much of the gas is blown out of the region inside $r_s \simeq 1~{\rm kpc}$. The time averaged profile is only mildly varying inside $r_s$. {\it Right:} Ratio of the gas to combined gas and dark matter masses $f_g =M_g /(M_g + M_d)$, with $f_g (r_s)$ denoting the fraction inside $r_s$; thus here $M_g = M_g (<r_s, t)$ and $M_d = M (<r_s, t)$, while $f_{g0}$ denotes the ratio of the gas mass to the initial total mass enclosed: $f_{g0} (r_s) = M_g (<r_s, t) /[M_g (r_s, 0) + M_d (< r_s, 0)]$. Similarly $f_g (r_{1/2})$ and $f_{g0} (r_{1/2})$ refer to those ratios inside the half mass radius of the stellar component that forms from the repeated starbursts, $r_{1/2} \simeq 0.5 {\rm kpc}$, and which physically correlates with the scale of the relatively steady gas density associated with strong fluctuations.} \label{fig:densityprofiletime_all} \end{figure*} In order to apply the physical model described above, leading to Eq.~(\ref{eq:relax}), we need to know the average gas density $\rho_0$. We also need to evaluate the power spectrum of the gas fluctuations and find out whether it may indeed be adequately described by a power-law, in which case we need to estimate values for its normalization $\mathcal{P} (k_m)$ and index $n$, and verify that the spatial spectrum is relevant in describing the temporal fluctuations. This is the objective of this section. \subsection{Gas density and mass over time} \label{sec:gasdens} Fig.~\ref{fig:Gas_Map} shows gas density contrast maps, within a 5 kpc box, 2.5 kpc on a side from the halo centre\footnote{Unless otherwise stated, all centering here refers to the halo centre located using the shrinking sphere method.}. The gas initially contracts from an NFW profile with scale length $r_s$ until the critical threshold for star formation is reached. The fluid is then driven by the nascent feedback, much of it driven completely out of the region delineated by $r_s$; the gas mass inside $\sim$$r_s$ decreases to less than half its initial value (but the dark matter mass is largely unaffected, decreasing only by about $20 \%$ within $r_s$, and thus the ratio decreases significantly, as shown in the right hand panel of Fig.~\ref{fig:densityprofiletime_all}). After that, the gas mass inside $\sim$$r_s$ is relatively well conserved. Variations in the gas mass enclosed within a given radius then principally arise from a pattern of fluctuations (gaseous blobs) materialising on a large range of scales. The gas progressively settles into a disk-like configuration, but the mass fluctuations remain sustained and steady. The assumption that the fluctuations form a quasi-steady stochastic process is suggested by Fig.~\ref{fig:MTsiers}, showing the mass variation within different radii over time. The mass fluctuations persist in time but diminish with radius, as higher mass scales are reached. Significant variations on larger time-scales persist however. They correspond to large scale flows. In the context of the model of \cite{EZFC} (recapped in Section~\ref{sec:physicalset}), such large scale motions `sweep' the smaller scale fluctuations with the characteristic speed $v_r$ (equation~\ref{eq:relax}). For the description of the effect of the gas fluctuations on the halo particles in terms of a standard diffusion process (leading to relaxation timescales in the form of Eq.~\ref{eq:relax}) to be complete, the statistics of the stationary stochastic process should also be entirely described by averages and dispersions, as in a Gaussian random process. This is examined in Appendix~\ref{Sec:Additional_Gauss}. The gas density inside spheres of radius $r$ is shown in Fig.~\ref{fig:densityprofiletime_all}, as a functions of time. After the initial outflow during the first few hundred Myr, the averaged (over time) gas profile is only mildly varying with radius inside the initial NFW scale length ($r_s = 0.88~{\rm kpc}$), and then starts decreasing rapidly beyond that. Any core that forms is expected to be of the order of the scale length of the cusp, which renders the assumptions in~\cite{EZFC} (discussed in Section 2.1.2 therein), plausible. One may for instance attempt to estimate the relaxation time using Eq.~(\ref{eq:relax}) with mean density $\rho_0$ evaluated at radius $\gtrsim r_s$, as the sharp decrease in density beyond that scale suggests that fluctuations in the gas at larger radii would contribute little to the overall variations in the gas potential and associated energy input to the central halo. In Section~\ref{sec:relax}, we estimate that this may indeed be a good approximation. Here we note that there are two theoretically independent reasons why, given the parameters of the simulation, a core is expected to form on a scale of order $1~{\rm kpc}$. For, even if the gas density does not drop beyond $r \gtrsim r_s$, and strong fluctuations are present much beyond that radius, the resulting stochastic perturbations are expected to have a major dynamical effect only up to scale of order $r_s$. This was in fact found to be the case even when the amplitude of the fluctuations (as fixed by the normalization of the power spectrum) were increased well beyond the minimum level required to significantly affect the inner halo profile (cf. Fig.~6 of~\cite{EZFC}). The phenomenon is likely due to the transition to an isothermal profile in an NFW halo at $r \simeq r_s$, which is relatively stable against fluctuations (given that the distribution function tends to the exponential Boltzmann form in that regime (see, e.g., Fig~1 in~\citealp{WidrowDF2000}). This phenomenon relates to the {\it effect} of the fluctuations.The other reason why a core that forms out of a cusp here should have radial scale of order $1 {\rm kpc}$ has to do with the existence of fluctuations in a realistic system: the extent of the spatial scale where the gas density and density contrasts are large is characteristic of the half mass radius $r_{1/2}$ of the stellar component that forms from the repeated starbursts. In our case about $0.5 {\rm kpc}$. Because of this, we will be able to define (in relation to Fig.~\ref{fig:Ein_main}) an energy input saturation radius, of order $\simeq 2 r_{1/2}$, which results from the decreasing gas density and level of fluctuations. Beyond it, there is negligible energy transfer from gas to halo. The right panel of Fig.~\ref{fig:densityprofiletime_all} shows the fraction of gas inside both $r_s$ and $r_{1/2}$. We note that due to the small variation of the gas density averaged over radius, the lines closely correspond to one another. In addition, after the gas loss associated with the initial blowout phase, the gas fraction decreases to about half its initial value. Thus, any effect due to core formation will result from fluctuations from a rather small gas fraction in the inner regions. The efficacy of this perhaps surprisingly small central gas fraction in modifying the dark matter dynamics is in fact a generic prediction of our theoretical framework, provided the strength of the gas fluctuations is at the level of the fiducial model in~\cite{EZFC} (cf. Section~2.1.2 and 4.4.2 there). Below, we will find that the fluctuation levels in the present simulation, as measured by the normalisation of the power spectrum, are in indeed consistent with those assumed in that fiducial model. \subsection{Power spectra} \begin{figure} \centering \includegraphics[width=\linewidth]{./PDFFigs/GasPowSpec_HSSC_vf.pdf} \caption{Power spectrum of gas density fluctuations, averaged over 1 Gyr intervals. The shaded region corresponds to variation of a power law $\sim k^{-n}$, with $2 \le n \le 3$; the horizontal line corresponds to $\mathcal {P} (k_m) = 4~{\rm kpc^3}$. The spectrum follows a power-law form over a range of scales, with a best-fit exponential index $n_{\rm best fit} = 2.31\pm 0.02$ (black dashed line).} \label{fig:powerspecavrg} \end{figure} We now proceed to determine the power spectrum of the density fluctuations qualitatively probed above. We evaluate it in the following way. For a given time snapshot, we consider gas cells within a cubical box of extent 2.5~kpc on each side from the origin.\footnote{Taken here to be the centre of the halo located through the shrinking sphere method. We have verified that the results are robust to displacements of that centre by up to $\sim {\rm 1~kpc}$, and similar results are obtained when the gas centre of mass or shrinking sphere centres are used.} We assign each cell, depending on its radial location, to a spherical shell. The density at the given cell is then subtracted from the average gas density inside the shell. Finally, the Fourier transform is taken and squared in the usual manner. This is done for each time snapshot, and the results are averaged over a chosen set of snapshots. The outcome is shown in Fig.~\ref{fig:powerspecavrg}. The spectrum follows a power-law form over a range of scales, with an index consistent with that assumed in the fiducial model of~\cite{EZFC}, where it was assumed to correspond to 2.4. If we take $k_m \simeq 2 {\rm kpc^{-1}}$, then $\mathcal {P} (k_m) \simeq 4~{\rm kpc}^3$ (again close to what was assumed in the fiducial model of \citealt{EZFC}, namely $\mathcal {P} (k_m) = 4.6 ~{\rm kpc}^3$). \begin{figure} \centering \includegraphics[width=\linewidth]{PDFFigs/HSSC_Pk_E_vf.pdf} \caption{Kinetic energy power spectrum of gas motion with least squares best fit (black dashed line) and Kolmogorov spectrum ($\propto k^{-5/3})$, blue dashed line). The spectrum is calculated through the square of the Fourier transform of $\rho^{1/2}_{g_i} {\bf v}_i$, taken over gas cells $i$ inside a 5~kpc box around the halo (shrinking sphere) centre. The agreement with the Kolmogorov form supports feedback-driven fluctuations having characteristics of fully developed turbulence.} \label{fig:velocitypowerspecfit} \end{figure} The picture of fully turbulent feedback-driven fluctuations is supported by the near Kolmogorov form of the specific kinetic energy spectrum, shown in Fig.~\ref{fig:velocitypowerspecfit}, which is followed for a large range in wave numbers. This spectrum persists even as the gaseous system evolves from a fully three dimensional configuration to disk-like form. Indeed~\cite{GrisRomReadTurb2017} found that it is present even in relatively quiescent phases, as long as feedback is also present (noting that the spectrum flattened when feedback is eliminated). In principle, turbulence may also be driven by self gravitating instabilities rather than feedback (e.g., \citealp{YUKrumTurb2021, NusSilkTurb2022}). A simple calculation of the gas Toomre parameter in the present case nevertheless suggests an absence of strong gravitational instabilities (see however~\citealp{DekelQ2016}). In the context of our theoretical framework, a further (likely related) physical distinction may also be reflected in the shape of the density fluctuation power spectrum; for, as mentioned in Section~\ref{sec:physicalset}, a flat (white noise) power spectrum corresponds to the limit when heating through dynamical friction coupling beween monolithic clumps and the dark matter is the dominant process. In this case the clumps are long lived and distinct, and their maximum size is significantly smaller than the scale associated with the region where the cusp-core transformation takes place (and on which the spectrum takes the flat form). The steep power-law dependence that continues up to large scales, as found here, signals a preeminence of feedback driven fluctuations. Finally, we note that the break in the kinetic energy power spectrum at $k_m \simeq 2 ~{\rm kpc}^{-1}$ is consistent with that inferred from Fig.~\ref{fig:powerspecavrg}, suggesting a demarcation between the turbulent scaling regime and the large scale flows that may carry the fluctuations into the time domain. We examine this issue of the transposition of the fluctuation characteristics from the spatial to temporal domains further in the next subsection. \subsection{RMS mass fluctuations} \label{sec:disp} \begin{figure} \centering \includegraphics[width= 0.49\textwidth]{PDFFigs/sigmaR_wbestfits_vf.pdf} \caption{Gas mass dispersion at scale $R$, $\sigma^2_R = \sum_i (M_i (R) - \langle M (R) \rangle_i)^2/\langle M (R) \rangle_i^2$, where $i$ denotes different time snapshots, and $M(R)$ is the mass inside a sphere of radius $R$. The centre of the sphere is randomized; chosen from a homogeneous distribution inside radius 1~kpc ($\simeq r_s$). The process is repeated for 80 realizations and the average $\sigma_R$ over the realizations (solid line) and dispersion (error bars) are evaluated. The dotted line refers to a (least squares) best-fit using Eq.~(\ref{eq:RMS}) with a power-law power spectrum and a top-hat filter, while the shaded region shows the variation with $n$ in the range of the corresponding shaded region on Fig.~\ref{fig:powerspecavrg}, with moderately smaller normalization at $k_m =2~ {\rm kpc}^{-1}$. All fits assume $\mathcal {P} (< k_m) = \mathcal {P} (k_m)$. The power spectrum parameters, inferred here from simulation data in the time domain, are generally consistent with those of the equal-time power spectra of Fig.~\ref{fig:powerspecavrg}.} \label{fig:massdisper} \end{figure} Our formulation of the dynamical effect of the gas fluctuations makes use of the sweeping and random sweeping approximations of turbulence theory, mentioned at the end of Section~\ref{sec:physicalset}. At some level, this is analogous to an ergodic assumption, in the sense that statistical properties of the random field in the spatial domain are transferred into the time domain. If such an approximation is valid in our case, then we should expect the following: if the variance $\sigma_R^2$ on the left hand side of Eq.~(\ref{eq:RMS}) is calculated in the time domain over the simulation snapshots, it should correspond to the result obtained by plugging the equal-time power spectrum $\mathcal{P} (k)$, with parameters consistent with what is inferred above (Fig.~\ref{fig:powerspecavrg}), into the right hand side of Eq.~(\ref{eq:RMS}). In a stochastic process that is homogeneous in space and time, with the sweeping assumptions holding, the $\sigma_R$ measured in the time domain (over sufficiently long time) will be invariant with respect to the centre it is measured from. This cannot be strictly the case here, however, since the average gas density is not strictly homogeneous. Furthermore, the effect of fluctuations carried by rotational flows will be reduced when calculating $\sigma_R$ in spheres anchored close to the centre of rotation, with little mass transiting through the shells (and those carried by large scale radial flows are enhanced). To account for such effects, we randomise the centre of the sphere within which the mass is calculated. The centres are, in practice, sampled from a homogeneous distribution within the radius of interest for core formation (1~kpc from the origin). We then conduct eighty different realizations of such randomisations and evaluate the average of the dispersion over the realisations. Fig.~\ref{fig:massdisper} shows the result. The best-fit using Eq.~(\ref{eq:RMS}) involves a power-law power spectrum with index $n$ consistent with the lower limit in the shaded region of Fig.~\ref{fig:powerspecavrg}; and also with similar normalization $\mathcal{P} (k_m)$, but at smaller $k_m$. The change in $k_m$, by itself, is not expected to affect the dynamical effect of the fluctuations in the diffusion limit at the basis of our model (with consequence that the relaxation time in Eq.~\ref{eq:relax} does not directly depend on $k_m$; see also Fig.~8 of~\citealt{EZFC}). On the other hand, the shaded area of Fig.~\ref{fig:massdisper} suggests that the mass dispersion is also consistent with larger values of $k_m$, but with mildly smaller normalization (which does moderately affect the relaxation time). The general consistency of the parameters inferred here, in comparison with those obtained from the spatial power spectrum (Fig.~\ref{fig:powerspecavrg}), supports the contention that the spatial fluctuations are transported to the time domain in accordance with the sweeping assumptions (although the separation between the large scale `carrier flows' and the transported fluctuations may not be sharp, and this may contribute to the smaller best fit $k_m$ here). As we will see below, these parameters are also consistent with the actual energy input, from the fluctuating gas to the halo component, in the simulation studied here; in the sense that the inferred energy input is consistent with theoretical estimates using such values. \section{Stochastic energy transfer and core formation} \label{sec:relax} \subsection{The relaxation time and its parameters} Now that we have estimates of the parameters entering Eq.~(\ref{eq:relax}), we can apply it in order to check whether it predicts significant effect for the model galaxy at hand. As a first estimate we simply assume $v_p \approx v_r \approx v_c$, where $v_c = v_c (r_s)$ is the circular speed at $r_s$ (close to the maximal rotation speed). If we furthermore use a value for $\rho_0$ characteristic of the region when the density starts to decrese rapidly ($r \gtrsim r_s$ from Fig.~\ref{fig:densityprofiletime_all}), we find \begin{equation} t_{\rm relax} = 13.2~{\rm Gyr} ~ \frac{n}{2.5} \left(\frac{v}{20 {\rm ~km/s}} \right)^3 \left(\frac{\mathcal{P} (k_m) }{3 {\rm ~kpc}^3}\right)^{-1} \left(\frac{\rho_0}{10^{6} ~{\rm M}_\odot/{\rm kpc}^3}\right)^{-2}\!\!. \label{eq:relaxnum} \end{equation} This suggests that gas fluctuations may have a significant effect on dark matter orbits within $r_s$ on a timescale of the order of a Hubble time. If $v_p$ and $v_r$ are associated with the characteristic velocity dispersion (rather than $v_c$), which is slightly larger (by a factor of about $10 \%$ at $\sim$$r_s$), the above timescale increases by a factor of about $(1.1)^{3/2}$. The timescale also increases if the characteristic speed of the halo particles relative to the gas $v_r$ (cf. Section\ref{sec:physicalset}) is associated with gas velocities at $\sim$$r_s$, which are around ${\rm 30 ~km/s}$ (cf. Fig. ~\ref{fig:velav}). Because flows may take the gas well beyond $r_s$, gas velocities are generally larger than $v_p$. Once a rotating disk starts to materialise (Fig.~\ref{fig:Gas_Map}), the regular component would also include gas rotation, in addition to the orbital speeds of the halo particles. Below, we will generally set $v_r \simeq 30 ~{\rm km/s}$, but note that $v_r$ should increase with radius inside $r_s$, and that it may generally be larger than the value adopted here when all the aforementioned motions and flows are taken into account. The variation of the relaxation time with radius also depends on whether the energy input from gas fluctuations is assumed to be primarily global or local: the relaxation mechanism may in principle be global, in the sense of depending only on some effective $\rho_0$, corresponding to a space and time average over an appropriately chosen region (e.g., the region within which the feedback driven fluctuations are significant), or it may be local; depending on the local gas density $\langle \rho_g \rangle (r)$ (averaged only over time). This is an issue we discuss further below, in connection to Fig.~\ref{fig:Lovsglb}. For a global energy input, the relaxation time depends only on variation in $v_p$, if $v_r$ is kept fixed. with radius. If $v_p$ is associated with $v_c (r)$, then within the initial NFW cusp $v_p^2 \sim r/r_s$ increases by a factor of 6.25 as $r/r_s$ goes from 0.1 to 1. If $v_p$ is taken to correspond to the velocity dispersion then $v_p^2 \sim - r/r_s \ln r/r_s$ deep inside the cusp, and increases by a factor of about 2.25 between $r/r_s =0.1$ and 1. Thus, particles nearer to the centre are expected to be affected first by the fluctuations; if only simply because their initial velocities, and therefore the relaxation times required to affect them significantly, tend to be smaller. Core formation would thus proceed inside out, with mass distribution at larger radii affected at later times. In what follows we evaluate the energy input in the simulation at hand and compare it with the theoretical picture sketched here; testing the `inside out' scheme of core formation and the assumption of dependence of the energy transfer principally on the average density inside $\sim$$r_s$ rather than the local density. \subsection{Energy input} \begin{figure} \centering \includegraphics[width=\linewidth]{./PDFFigs/HaloEnrgyInput_vf.pdf} \caption{Energy input to halo particles from gas fluctuations inside indicated radii $r$. $E_r$ is evaluated via Eq.~(\ref{eq:Eind}), and measured from the temporal zero point $t = t_{\rm diff}$, beyond which the diffusion limit may be assumed to hold. In line with the discussion following Eq.~(\ref{eq:vdisp}), we take $t_{\rm diff} = 1 ~{\rm Gyr}$. In order to reduce fluctuations related to the precise choice of zero point, we calculate in practice $\Delta E_r = E_r (t> t_{\rm diff}) - \langle E_r \rangle_{t_{\rm diff}}$, where the average is taken in the interval $0.5~ {\rm Gyr} \le t \le 1.5 ~{\rm Gyr}$. The dashed line indicates energy transfer through a stationary stochastic process, with parameter values appearing in Eq.~(\ref{eq:Ein}). It assumes that energy input saturates around $r_{\rm sat} = 1.5~ r_s \simeq 1.3~ {\rm kpc}$ (corresponding to the converging lines). For smaller radii, the lines flatten after a few Gyr due to mass and energy transfer resulting from particle migration towards larger radii.} \label{fig:Ein_main} \end{figure} \begin{figure*} \centering \includegraphics[width= 0.49\textwidth]{./PDFFigs/E_in_sub_vf.pdf} \includegraphics[width= 0.49\textwidth]{./PDFFigs/Lovsglb_vf.pdf} \caption{Local vs global energy transfer. {\it Left:} Radial energy transfer as a function of time. {\it Right:} Energy input rate as a function of radius. The left hand panel shows that radial energy transfer is slow compared to the energy input; the straight lines represent steady diffusive energy input, with no transfer outside the radii enclosed. While this holds, one may estimate the energy input rate at various radii by simply evaluating the average slope of the generally linear energy increase. The right hand panel shows those slopes over the first 1, 2, 3 and 4 Gyr (solid lines with indicated values of $T$). The dashed line corresponds to estimate assuming global energy transfer; using Eq.~(\ref{eq:EGlob}) with $n = 2.5$, $v_r = 30.0 ~{\rm km/s}$, $\mathcal{P} (k_m) = 3.6~ {\rm kpc^3}$, and average gas density within $r_s$, $\rho_0 (r_s) = \langle \rho_0 (r_s, t) \rangle_T$, with $\rho(r, t)$ measured directly from the simulation (using Eq.~\ref{eq: rhoavdef}) and averaged over $T = [0: 4] ~{\rm Gyr}$ (giving $\rho_0 = 1.95 \times 10^6 ~M_\odot/{\rm kpc^3}$). The dotted line corresponds to the assumption of purely local energy input; using the indicated equation, where the local gas density $\rho_g ({\bf r}, t)$ is time-averaged (in the range $T = [0: 4] ~{\rm Gyr}$) over spherical shells at $r$. This vastly overestimates the energy input at all radii. The dashed dotted line represents an intermediate alternative, whereby $\rho_g$ is averaged over spheres of radius $r_s$ and centered at $r$ (as in Eq.~\ref{eq:semiloc}).} \label{fig:Lovsglb} \end{figure*} Equation~(\ref{eq:relax}) implies that a particle increases its velocity variance with time $T$ as \begin{equation} \langle (\Delta v)^2 \rangle = \frac{8 \pi (G \rho_0)^2 \mathcal{P}({k_m})}{n v_r} T. \label{eq:vdisp} \end{equation} The linear time dependence here is characteristic of a diffusion process. It is valid in the diffusion limit, which means that $T \gg t_{\rm diff} \equiv (v_r k_m)^{-1}$~\citep{EZFC}. To account for this in practice, we will generally measure $T$ and $\langle (\Delta v)^2 \rangle$ from zero points at times $t \gtrsim t_{\rm diff}$. This is necessitated not just by the applicability of the diffusion limit, but also by the assumption of a quasi-steady stochastic process, which is clearly invalid during the first few hundred Myr, which are characterised by a highly evolving phase, involving the initial gas contraction and the triggering of a starburst that expels most of it out of $r_s$. Assuming $v_r \simeq 30 ~{\rm kpc/Gyr}$, gives $(v_r k_m)^{-1} \lesssim 1/30 {~\rm Gyr}$, for $1/k_m\lesssim 1~{\rm kpc}$. Thus the steady state diffusion limit may be safely assumed to be established beyond 1~Gyr. We will take it to be our zero point for $T = t - t_{\rm diff}$. As in standard two body relaxation, one may assume that fluctuations initially change just the velocities of the halo particles. The average energy change per unit mass resulting from this is $\langle \Delta E \rangle = \langle \Delta~\frac{1}{2} (\Delta v)^2\rangle = v \langle \Delta v \rangle + \frac{1}{2} \langle (\Delta v)^2 \rangle$. In principle, the particles may gain energy through the first term or lose it to the fluctuating field through dynamical friction, as in any general diffusive dynamical process. But in practice the mass of the particles is far too small and so the average energy gain per unit mass is simply $\langle \Delta E \rangle =\frac{1}{2} \langle (\Delta v)^2 \rangle$. By fixing $v_r$, and assuming the energy transfer mechanism to be global --- again, in the sense of depending on an effective characteristic density $\rho_0$ rather than on the local $\langle \rho_g \rangle_T (r)$ --- the expected energy input to halo particles within radius $r$ may be estimated as \begin{equation} E_{\rm in} (< r) =~\langle M (<r) \rangle~\langle \Delta E \rangle~=~\langle M (<r) \rangle~\frac{4 \pi (G \rho_0)^2 \mathcal{P}_{k_m}}{n v_r}~T, \label{eq:EGlob} \end{equation} where $\langle M(<r) \rangle$ is the (time) average of the halo mass enclosed within $r$. We discuss the assumption of global energy input below. First, we assume it holds at least approximately, and use it to estimate the total energy transfer from the gas to the halo. Given the rapidly decreasing gas density beyond $r_s$ (Fig.~\ref{fig:densityprofiletime_all}), one may suppose that the energy input saturates at $r_{\rm sat} \gtrsim r_s$. If the energy transfer depends on global properties, then $\rho_0$ may be considered to correspond to the space and time average of the gas density inside $r_{\rm sat}$, i.e. $\rho_0 ({\rm sat}) = \langle \rho_0 (r_{\rm sat}, t)\rangle_T$, where $\rho_0 (r_{\rm sat}, t)$ is given by~(\ref{eq: rhoavdef}), with $r = r_{\rm sat}$ (unless otherwise stated, particularly in relation to Fig.~\ref{fig:Lovsglb}, time averages are evaluated from $T=0$, i.e. $t = t_{\rm diff}=1~\rm Gyr$, to the end of the simulation at $t = 13.7 \rm Gyr$). For $r_{\rm sat} \gtrsim r_s$, $\langle M (<r) \rangle$ is close to the initial mass at $T=0$, since the dark matter mass inside it is essentially conserved. We thus write, in terms of the initial mass $M_0 (< r)$, \begin{multline} E_{\rm in} (<r_{\rm sat}) = 10^9~M_\odot~{\rm kpc^2~Gyr^{-2}}~\frac{M_0 (< r_{\rm sat})}{10^8 M_\odot}~\frac{T}{\rm Gyr}~\times\\ \left(\frac{n}{2.5}\right)^{-1} \left(\frac{v_r}{30 ~{\rm km/s}} \right)^{-1} \left(\frac{\mathcal{P} (k_m)}{3 {\rm~ kpc}^3}\right) \left(\frac{\rho_0~(r_{\rm sat}) }{10^{6} ~M_\odot ~{\rm kpc}^{-3}}\right)^2, \label{eq:Ein} \end{multline} where we have chosen $v_r$ in accordance with the discussion of the previous subsection, and inserted values characteristic of the initial halo mass and average gas density (as defined above) around $r_s$. More precisely, the numbers correspond to values at $r = r_{\rm sat} = 1.5 r_s \simeq 1.3 ~{\rm kpc}$, but we note that the estimate of the total energy input is not sensitive to the choice of $r_{\rm sat}$; as the product $M_0 (< r) \rho_0^2 (r)$ varies slowly with radius around $r_s$ (indeed, more generally, $\langle M (<r) \rangle \rho_0^2 (r)$ varies by at most a factor of 2 in the range $0.1~ r_s \le r \le 2 r_s$). The power spectrum parameters are estimated from the results in figures \ref{fig:powerspecavrg} and \ref{fig:massdisper} (a larger $\mathcal{P} (k_m) = 4 {\rm kpc}^3$ gives the same result if $v_r = 40 {\rm km/s}$, which would take into account enhancement in the speeds of halo halo particles, relative to the gas, due to their own motion). We now wish to compare the prediction in Eq.~(\ref{eq:Ein}) with the actual energy input inferred from the simulation. For this purpose, we define the quantity \begin{equation} E_r = \frac{m}{2} \left( \sum_i v_i^2 + \Phi_i \right), \label{eq:Eind} \end{equation} where $m$ is the halo particle mass in the simulation, $v_i$ is the speed of particle $i$ and $\Phi_i$ is the Newtonian potential at its location. The summation is evaluated over all particles within radius $r$. Increase in this quantity measures the energy input inside radius $r$, provided there is no dark matter mass or energy outflow from that radius and the mass distribution beyond it remains constant (so that changes in the potential are solely due to modification of the mass distribution within $r$)~\footnote{The potential $\Phi_i$ at particle $i$ is due to other halo particles; we ignore changes in the potential arising directly from the gas flows, as these constitute a fluctuating contribution with small average, particularly after the initial expulsion episode during the first few hundred Myr}. We may expect that these conditions hold, at all radii, for sufficiently small times, as the kinetic energy acquired by the halo particles is still being converted into changes in the mass distribution and potential, a process slower than that characterising the initial energy input. The conditions should hold for longer times as $r$ increases; and we expect that beyond $r_{\rm sat} \gtrsim r_s$, the energy input saturates to a specific value regardless of radius, and little energy is transferred beyond that radius, so the change in $E_r$ from its initial value (at $T=0$) corresponds to the total energy input from the fluctuating gas. In particular, if that input may be estimated theoretically using Eq.~(\ref{eq:Ein}), then one expects $\Delta E_{r_{\rm sat}} \simeq E_{\rm in} (< r_{\rm sat})$. These expectations are confirmed in Fig.~\ref{fig:Ein_main}. At all radii, we initially find a general linear increase in $E_r$, as expected from a steady diffusive process, with stochastic variations on this general trend. At smaller radii, the lines clearly flatten after a few Gyr, as a result of energy and mass outflow onto larger $r$. A saturation radius $r_{\rm sat} \gtrsim r_s$, beyond which the lines converge, can be defined with value consistent with $r_{\rm sat} = 1.5 ~r_s \simeq 1.3 ~{\rm kpc}$ as assumed in Eq.~(\ref{eq:Ein}). The slope derived from that relation is also consistent with that derived directly from the simulation, as indicated by the dashed line. The above suggests that the total energy input within $r_{\rm sat}$ may be adequately described by assuming a global energy transfer mechanism, parameterised by the average gas density and halo mass at $r_{\rm sat}$ inferred from the simulation; and with $v_r$ and density contrast power spectrum parameters also consistent with those found in the simulated hydrodynamics. We now wish to ask to what extent this global approximation holds in general; for, as the time averaged gas density inside $r_s$ is not strictly constant, energy transfer may, in principle, depend instead on the local density. This is a possibility akin to invoking the purely local approximation when evaluating the effect of two body relaxation in stellar dynamics, by using Chandrasekhar's formula and plugging in the local stellar density. This is in principle plausible, but more difficult to interpret in the present case; whereas in two body relaxation logarithmic intervals in impact parameters (or spatial scales) equally contribute to the fluctuations leading to relaxation, here fluctuations at the largest scales (characterized by $\mathcal{P} (k_m)$) are more important. Global energy transfer implies the validity of Eq.~(\ref{eq:EGlob}). Local energy transfer, on the other hand, requires the evaluation of the time average $\langle \rho_g (r,t) \rangle^2 (r)$ over spherical shells centered at $r$, and integrating it over the dark matter mass in those shells, $4 \pi r^2 \rho_d (r)$ (assuming a fixed $v_r$). The right panel of Fig.~\ref{fig:Lovsglb} (dotted line) shows that, when assuming power spectrum parameters and velocity $v_r$ consistent with the simulation, this vastly overestimates the energy input. The non-local assumption --- with energy input rate within radius $r$ scaling simply as $\rho_0^2 M(<r)$ as implied by Eq.~(\ref{eq:EGlob}) --- results in much better agreement, with a moderate discrepancy at small radii that may at least partly be accounted for by an increase of $v_r$ with radius (as discussed above and expected from Fig.~\ref{fig:velav}), which we do not take into account here for simplicity. The global approximation, with total energy input within radius $r$ simply proportional to $M (<r)$, clearly cannot remain valid as $r \rightarrow r_{\rm sat}$, when the gas density and fluctuations rapidly decrease. Indeed, the difference between $\rho_0 (r_s)$ that fits the energy transfer rate in Fig.~\ref{fig:Lovsglb} and $\rho_0(r_{\rm sat})$ used in Fig.~\ref{fig:Ein_main}, principally reflects the gradual saturation process; the fit in Fig.~\ref{fig:Ein_main} effectively assumes sudden saturation, while in reality the process is gradual. To take this into account one may invoke an intermediate regime, between the purely local and purely global energy transfer limits. We do this by defining \begin{equation} \rho_0 (r, r_{\rm av}) = \langle~\rho_g ({\bf r}, ~{\bf r} - {\bf r}_g)~\rangle_{r, |{\bf r} - {\bf r}_g)| < r_{\rm av} , T}, \label{eq:semiloc} \end{equation} where the average over the gas density is evaluated over time at points ${\bf r}_g$ inside spheres with centres at radial coordinate $r$ and radii $r_{\rm av}$. Thus in this context, $\rho_0 (r_{\rm sat}) = \rho_0 (0, r_{\rm sat})$ and $\rho_0 (r_s) = \rho_0 (0, r_s)$. The results for $\rho_0 (r, r_s)$ are shown by the dashed dotted line in the right hand panel of Fig.~\ref{fig:Lovsglb}. They suggest that the energy transfer process is best considered as non-local, with a range $\sim$$r_s$. Finally, we note that although the energy is assumed to be transferred to halo particles initially as kinetic energy, due to modification in their velocities (as given by equation~\ref{eq:vdisp}), the changes eventually affect the self consistent potential. The resulting average gain in total energy per unit mass turns out to be amenable to estimation from a low energy cutoff that appears in the phase space distribution function. In Appendix~\ref{sec:cut}, we show how this can be related to the energy input calculated here, and connected to the change in the potential that accompanies core formation. \begin{figure*} \centering \includegraphics[width= 0.495\linewidth]{./PDFFigs/Mass_linlog.pdf} \includegraphics[width= 0.495\linewidth]{./PDFFigs/densityprof_thr_vf.pdf} \caption{Mass migration and core formation. The left panel shows the ratio between the halo mass within radii $r$ (in kpc) and the corresponding initial mass at $T= 0$ ($t = t_{\rm diff} = 1 {\rm Gyr}$, as discussed in relation to Fig.~\ref{fig:Ein_main}). The dashed lines are exponential fits, $\propto \exp(\alpha T)$, with numbers corresponding to $\alpha (r)$ in ${\rm Gyr}^{-1}$. The exponential decay may be derived from a simple theoretical model for the mass transfer; in its context $\alpha$ is predicted to scale with the inverse of an energy relaxation time (obtained using Eqs.~\ref{eq:Erelax}. \ref{eq:Dcoef}, and~\ref{eq:Einits}). The right panel shows the corresponding evolution in density. Theoretical expectations are shown by the dashed lines. They are obtained by differentiating Eq.~(\ref{eq:ME}), starting from an NFW fit to the dark matter density in the simulation at $T =0$. To reduce uncertainties arising from fluctuations in the density profile around $T=0$, we average simulation outputs over the range $0.5 ~{\rm Gyr} \le t \le 1.5 ~{\rm Gyr}$ (as in Fig.~\ref{fig:Ein_main}). Model predictions are shown at $T =0$ (fitting the averaged profile), and at $2, 4, 6, 8, 10$ and 12 Gyr, corresponding to times $1, 3, 5, 7, 9, 11$ and 13 Gyr.} \label{fig:core} \end{figure*} \subsection{Mass migration and core formation} \label{sec:massmod} The energy input from the fluctuating gas leads to the migration of halo particles from the inner radii, which decreases the enclosed mass, as shown in Fig.~\ref{fig:core}, left panel. Straight lines on the log linear scale suggest a general exponential decrease in mass with time. A full examination of its origin in the context of a diffusion model would require a full Fokker Planck formulation, using the full (first and second order) diffusion coefficients and explicitly including changes in the potential due to the evolving mass distribution (the full formula for the expected mass transfer in this context can be found for example in \citealt{El-Zant08}, Eq.~40). Here, we proceed heuristically in order to obtain a rough estimate. We suppose that the mass flux across energy surface $E$ changes the mass within it principally through the first order energy diffusion coefficient \begin{equation} D [\Delta E] = \frac{1}{M(< r_{\rm sat})} \frac{E_{\rm in} (r_{\rm sat})}{T}, \label{eq:Dcoef} \end{equation} describing the average rate of change of halo particle energy per unit mass due the gas fluctuations. From equation~(\ref{eq:Ein}), this is of the order of $10 ~{\rm kpc^2~Gyr^{-3}}$ in the simulation a hand. The change in mass of particles with energy less than $E$ is \begin{equation} \frac{\partial M (< E)}{\partial t}~= -\frac{\partial M (<E)}{\partial E}~D~[\Delta E], \label{eq:Mflux} \end{equation} where $M (< E)$ is the mass in halo particles with energy less than $E$ and $\partial M (<E)/\partial E$ is the mass-weighed differential energy distribution \citep{BT}. Furthermore, we approximate this latter quantity by its average within $E$, such that \begin{equation} \frac{\partial M (<E)}{\partial E} \approx~a~\frac{M(<E) - M(0)}{E - E (0)}, \end{equation} where $E (0)$ is the energy of a particle at rest at the centre of the potential (so $E (0)= \Phi (0)$ and $M (0) = 0$), and $a$ is a constant numerical factor of order 1. This holds exactly inside pure power-law cusps: e.g., using formulas in \cite{El-Zant08}, one finds $a = (3 + \gamma) / (2 + \gamma)$ for $\rho \propto r^{\gamma}$ (thus $a = 2$ for a $1/r$ cusp, tends towards $1.5$ for flatter profiles, and is larger for steeper ones; diverging in the case of the singular isothermal sphere, where a potential zero point at the centre cannot be fixed as above due to logarithmic divergence). We define the energy relaxation time as \begin{equation} t_{\rm relax} (E) = D[\Delta E]^{-1}~[E- E (0)]. \label{eq:Erelax} \end{equation} Assuming that equation~(\ref{eq:Mflux}) is applicable in the diffusion limit, solving it (starting at time $T=0$) results in \begin{equation} M (< E) = M_0 (<E)~\exp\left[-a~T/t_{\rm relax}(E)\right], \label{eq:ME} \end{equation} where $M_0$ refers to the mass at time $T=0$. Within this picture, the numbers on the lines in the left panel of Fig.~\ref{fig:core}, denoted by $\alpha$, should correspond to $ a/t_{\rm relax} (E)$, if $E$ is associated with particle energies inside the chosen radii. To make this correspondence, we fix $E = \langle E \rangle (r)$ to be the average specific energy at radius $r$ in the initial profile. As a first approximation, we simply associate this with the initial NFW profile of the configuration. The specific potential energy $\Phi (r) - \Phi (0)$ in this case is $4 \pi G \rho_s r_s^2 [1- \ln (1+x)/x]$, with $x = r/r_s$, and $r_s$ and $\rho_s$ as in Table~1. To obtain a simple form for the kinetic energy we make use of established empirical relations according to which the pseudo phase space density varies with radius approximately as $\rho/\langle v^2 \rangle^{3/2} \sim r^{-1.875}$ \citep{TayNav01}, and normalize the velocity variance to its value around $r = r_s$, such that $\langle v^2 \rangle \simeq 470~ {\rm km^2/s^2}$. One may then write \begin{equation} E - E (0) \simeq 4 \pi G \rho_s r_s^2 \left[1 + \frac{2^{4/3}}{10} \frac{\left(x^{0.875}\right)^{2/3}}{(1+x)^{4/3}} - \frac{\ln (1+x)}{x}\right]. \label{eq:Einits} \end{equation} Using this formula in conjunction with equation~(\ref{eq:Erelax}), and using $a = 3.4$, we find $a/t_{\rm relax} = 0.034, 0.047, 0.071, 0.11, 0.17~{\rm Gyr}^{-1}$ at $r = 1, 0.5, 0.25, 0.125, 0.0625~{\rm kpc}$ respectively. These numbers agree to better than $20 \%$ with the values of $\alpha$ indicated on the fitting lines in Fig.~\ref{fig:core} (left panel). The corresponding energy relaxation times are about $100, 72.3, 47.9, 30.9$ and $20 ~{\rm Gyr}$. A more careful analysis, taking into account that the quasi-steady state diffusive process is well established only after $t \gtrsim t_{\rm diff} = 1 \rm Gyr$, suggests $a \simeq 2.5$ (cf. below). The corresponding energy relaxation times are therefore lower by a factor of about 1.4 than those quoted above. Even then, these relaxation times are still significantly larger than what is obtained from the velocity variance (equation~\ref{eq:relaxnum}). This is because $E - E(0)$ is generally larger than the average kinetic energy (from Eq.~\ref{eq:Einits}, by a factor of about four at $r_s$). Indeed, changes in kinetic energy lead to relatively little change in total energy. In fact the relative change in $E_r$ at 1 kpc (as calculated from Eq.~\ref{eq:Eind}, starting at $T=0$), is $\Delta E_{r}/ E_{r} \simeq 0.2$, over 12.7 Gyr. Initially the rate of relative change in energy is much larger at smaller radii (as illustrated by the differences in $E_{\rm in}/T$ inferred from Figs.~\ref{fig:Ein_main} and~\ref{fig:Lovsglb}). But it subsequently saturates, as the energy is redistributed in the system, with mass and energy flowing towards outer radii (Fig.~\ref{fig:Lovsglb}, left panel). When thus redistributed, the modest changes in total energy lead to a modification of the self consistent potential, including the minimal possible energy in it, as discussed in Appendix~\ref{sec:cut}. This leads to core formation, as observed in the right panel of Fig.~\ref{fig:core}, There, we note that we find no evidence of any accelerated core formation, relative to the velocity relaxation time (eq.~\ref{eq:relaxnum}), as found in~\cite{EZFC}, when non-spherical modes were used in conjunction with the Hernquist-Ostriker code. Having obtained the evolution of the enclosed mass within a given radius, it is also possible to define a theoretical density $\rho = r^{-2} d M/d r$ and derive a closed form formula for it using Eqs.~(\ref{eq:ME}), (\ref{eq:Erelax}), and~(\ref{eq:Einits}). The result may then be compared with the dark matter density evolution in the simulation. More care is however required here in defining the initial energies in equation~(\ref{eq:Einits}), as we must start our comparison at $T = t - t_{\rm diff} =0$, i.e., when the diffusion limit at the basis of our model is valid (cf. the discussion in relation to Fig.~\ref{fig:Ein_main}). For this purpose, we average simulation outputs in the time range $0.5~ {\rm Gyr} \le t \le 1.5~ {\rm Gyr}$, and then fit the resulting dark matter density with an NFW profile. The corresponding parameters are $r_s = 1.17 ~{\rm kpc}$ and $\rho_s = 2.7 \times 10^7~ M_\odot/{\rm kpc^3}$. When the latter is adjusted by adding a gas fraction of about $0.075$ (assumed for simplicity to be also NFW with same $r_s$, but taking into account the initial central gas expulsion), the multiplicative factor $\rho_s r_s^2$ in front of the bracket in equation~(\ref{eq:Einits}) remains approximately the same as in the case of the $t=0$ profile. After some trials, we found that values of $a$ in the range 2.5 to 2.8 provide reasonable approximations to the density evolution inferred from the simulation (perhaps surprisingly so, given the various simplifying assumptions of our mass transfer model). This is illustrated in the right panel of Fig.~\ref{fig:core}, where we compare the density evolution expected from our model (fixing $a = 2.5)$ with the results from the simulation. \section{Conclusion} Potential fluctuations from feedback driven gas can `heat' halo cusps, turning them into cores. This work aimed at quantifying this, by measuring the gas fluctuations and tracking the way they transfer energy to the central halo, forcing the outward migration of the dark matter. The interpretive framework we use is a model, first outlined in \citet{EZFC}, which predicts that these processes principally depend on the amplitude of the fluctuations, as measured by the normalisation of their power spectrum, and the average gas density. The result being a standard diffusion process, characterised by a linear temporal increase in velocity variance and energy of halo particles as a result of their interaction with the fluctuating gas field. As shown previously (\citealp{EZFCH}), in this picture the effect of the fluctuations reduces to standard two body relaxation in the case of a white noise power spectrum. It may thus, in this limit, also describe halo heating {\it via} dynamical friction from a system of compact, monolithic massive clumps moving among much lighter dark matter particles. To test this interpretative framework, we measure the density fluctuations in feedback-driven gas from a full hydrodynamic simulation of a model dwarf galaxy (Figs. \ref{fig:Gas_Map}-\ref{fig:densityprofiletime_all}), and obtain their density contrast power spectrum (Fig.~\ref{fig:powerspecavrg}). We find that the spectrum follows a power-law in wave number ($\propto k^{-n}$), with an exponent $ 2 \lesssim n \lesssim 3 $, for the whole period of the simulation (spanning a Hubble time). Although the time-averaged density of the driven gas varies with radius, the variation is modest inside the initial NFW scale length, relative to a sharp drop outside. This suggests a characteristic density that may be used as input for the model. We also examine the velocity distribution of the gas and find that it is approximately fit by Maxwellians at larger radii (Appendix~\ref{Sec:Additional_Gauss}). The kinetic energy power spectrum is close to the Kolmogorov form over large range of scales (Fig.~\ref{fig:velocitypowerspecfit}). This reinforces the picture of a fully turbulent medium. With the input parameters directly measured from the simulation, we use our model to calculate the total energy transfer rate from fluctuating gas to the central halo. The result is compared with the actual energy input to the system of halo particles, as directly inferred from the simulation (Fig.~\ref{fig:Ein_main}). This is found to generally agree --- displaying the general linear increase, expected of a steady diffusion process --- over almost a Hubble time. We also examine the radial distribution of the energy input rate (Fig. \ref{fig:Lovsglb}). We find that the energy transfer is indeed much better approximated as a global rather than local process; in the sense that it depends on the average gas energy density within the core region rather than the local density at each radius. The energy is initially transferred from the gas as kinetic energy to individual halo particles, but it is then redistributed through the self consistent gravity of the system, a process through which the core replaces the cusp. The process comes with a low energy cutoff in the halo phase space distribution function, as particles migrate to higher energy levels. It is straightforward to link the level of this cutoff to the total energy input from the gas, and to the resulting change in halo gravitational potential that comes with core formation (Appendix~\ref{sec:cut}). The energy flow upwards is accompanied by a mass flow outwards. We empirically find an exponential decrease in halo mass with time, within a given radius, in the initial cusp. We then devise a simple approximate description of the mass flow, based on our model, from which the exponential form may be inferred. In this context, the exponential decay time scales with (and is of the order of) the local (energy) relaxation time, and the evolution of the corresponding theoretical density profile mimics that in the simulation (Fig.~\ref{fig:core}). Strictly speaking, energy transfer {\it via} a standard diffusion process requires the gas force fluctuations to be normally distributed. We have verified this to be the case to a good approximation (even if the larger {\it density} fluctuations can be lognormal rather than Gaussian at small radii, cf. Appendix~\ref{Sec:Additional_Gauss}). Another assumption of the model is the use of the `sweeping' approximations of turbulence theory, whereby the statistics of the spatial fluctuations are transferred to the time domain through large scale flows. The general consistency of the spatial power spectrum parameters with those that fit the mass dispersion in the time domain (Fig.~\ref{fig:massdisper}), confirm that this may be an applicable approximation. In general, the assumptions and predictions of the theoretical framework seem vindicated for the model galaxy studied here. This suggests a remarkably concise description of halo core formation from gaseous fluctuations, summarizing the effect of much complex `gastrophysics' in terms of the two principal parameters of gas density and fluctuation levels. Obvious extensions include considering different galaxy masses, as well as verifying that the model also predicts a lack of core formation in simulations that do not produce them. Success there would help delineate particular elements in the physical `subgrid' input that are most crucial in producing the required conditions for core formation, and examining how they compare with observations. It may also be possible to test the predictions regarding the level of the fluctuations required for core formation directly from observations. In particular, it has already been possible to derive surface density power spectra for larger,and relatively quiescent galaxies. Estimating these for actively star forming galaxies, and calibrating them with three dimensional density contrast power spectra entering into our model calculations, may provide a direct test of our picture of core formation through gaseous fluctuations. \section*{Data Availability} The simulation data underlying this article will be shared on reasonable request. \bibliographystyle{mnras}
{ "timestamp": "2022-09-20T02:20:48", "yymm": "2209", "arxiv_id": "2209.08631", "language": "en", "url": "https://arxiv.org/abs/2209.08631" }
\section{Introduction} Modeling in computer vision has long been dominated by convolutional neural networks (CNNs). Recently, transformer models in the field of natural language processing (NLP) \cite{DBLP:journals/corr/abs-1810-04805,NIPS2017-3f5ee243,10.1145/3437963.3441667} have attracted great interests of computer vision (CV) researchers. The Vision Transformer (ViT) \cite{DBLP:journals/corr/abs-2010-11929} model and its variants have gained state-of-the-art results on many core vision tasks \cite{Zhao2020CVPR,pmlr-v139-touvron21a}. The original ViT, inherited from NLP, first splits an input image into patches, while equipped with a trainable class (CLS) token that is appended to the input patch tokens. Following, patches are treated in the same way as tokens in NLP applications, using self-attention layers for global information communication, and finally uses the output CLS token for prediction. Recent work \cite{DBLP:journals/corr/abs-2010-11929,Liu-2021-ICCV} shows that ViT outperforms state-of-the-art convolutional networks \cite{Huang-2018-CVPR} on large-scale datasets. However, when trained on smaller datasets, ViT usually underperforms its counterparts based on convolutional layers. The original ViT lacks inductive bias such as locality and translation equivariance, which leads to overfitting and data inefficiency of ViT models. To address this data inefficiency, numerous subsequent efforts have studied how to introduce the locality of the CNN model into the ViT model to improve its scalability \cite{NEURIPS2021-4e0928de,DBLP:journals/corr/abs-2107-00641}. These methods typically re-introduce hierarchical architectures to compensate for the loss of non-locality, such as the Swin Transformer \cite{Liu-2021-ICCV}. \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{DifferentAttentionMechanisms.pdf} \caption{Illustration of different self-attention mechanisms in Transformer backbones. Our AEWin is different from two aspects. First, we split multi-heads into three groups and perform self-attention in local window, horizontal and vertical axes simultaneously. Second, we set different token lengths for window attention and axial attention to achieve fine-grained local and coarse-grained global interactions, which can achieve better trade-off between computation cost and capability.} \label{DifferentAttentionMechanisms-flabel} \end{figure} Local self-attention and hierarchical ViT (LSAH-ViT) has been demonstrated to address data inefficiency and alleviate model overfitting. However, LSAH-ViT uses window-based attention at shallow layers, losing the non-locality of original ViT, which leads to LSAH-ViT having limited model capacity and henceforth scales unfavorably on larger data regimes such as ImageNet-21K \cite{NEURIPS2021-20568692}. To bridge the connection between windows, previous LSAH-ViT works propose specialized designs such as the “haloing operation” \cite{Vaswani-2021-CVPR} and “shifted window” \cite{Liu-2021-ICCV}. These approaches often need complex architectural designs and the receptive field is enlarged quite slowly and it requires stacking a great number of blocks to achieve global self-attention. \begin{figure}[t] \centering \includegraphics[width=1.0\linewidth]{SplitGroup.pdf} \caption{Illustration of parallel implementation of AEWin. It is worthwhile to note that the token length of axial attention is only half of that of windowed attention, so as to set different granularity for local and global.} \label{SplitGroup-flabel} \end{figure} When observing a scene, humans usually focus on a local region while attending to non-attentional regions at coarse granularity. Based on this observation, we present the Axially Expanded Window (AEWin) self-attention, which is illustrated in Figure \ref{DifferentAttentionMechanisms-flabel} and compared with existing self-attention mechanisms. Considering that the visual dependencies between nearby regions are usually stronger than those far away, we perform the fine-grained self-attention within the local window and coarse-grained attention on the horizontal and vertical axes. We split the multi-heads into three parallel groups and the number of heads in the first two groups is half of that in the final group, the first two groups are used for self-attention on the horizontal and vertical axes respectively, and the final group is used for self-attention within the local window. It is worth noting that with AEWin self-attention mechanism, the self-attention in the local window, horizontal axis, and vertical axis are calculated in parallel, and this parallel strategy does not introduce extra computation cost. As shown in Figure \ref{SplitGroup-flabel}, the feature map focuses on its closest surroundings with long tokens and the surrounding on its horizontal and vertical axes with short tokens to capture coarse-grained visual dependencies. Therefore, it has the ability to capture both short- and long-range visual dependencies efficiently. Benefit from the fine-grained window self-attention and coarse-grained axial self-attention, our AEWin self-attention can better balance performance and computational cost compared to existing local self-attention mechanisms shown in Figure \ref{DifferentAttentionMechanisms-flabel}. Based on the proposed AEWin self-attention, we design a general vision transformer backbone with a hierarchical architecture, named AEWin Transformer. Our tiny variant AEWin-T achieves 83.6\% Top-1 accuracy on ImageNet-1K without any extra training data or label. \section{Related Work} Transformers were proposed by Vaswani et al. \cite{NIPS2017-3f5ee243} for machine translation, and have since become the state of the art method in many NLP tasks. Recently, the pioneering work ViT \cite{DBLP:journals/corr/abs-2010-11929} demonstrates that pure Transformer-based architectures can also achieve very competitive results. One challenge for vision transformer-based models is data efficiency. Although ViT \cite{DBLP:journals/corr/abs-2010-11929} can perform better than convolutional networks with hundreds of millions images for pre-training, such a data requirement is not always practical. To improve data efficiency, many recent works have focused on introducing the locality and hierarchical structure of convolutional neural networks into ViT, proposing a series of local and hierarchical ViT. The Swin Transformer \cite{Liu-2021-ICCV} focuses attention on shifted windows in a hierarchical architecture. Nested ViT \cite{zhang2022nested} proposes a block aggregation module, which can more easily achieves cross-block non-local information communication. Focal ViT \cite{DBLP:journals/corr/abs-2107-00641} presents focal self-attention, each token attends its closest surrounding tokens at fine granularity and the tokens far away at coarse granularity, which can effectively capture both short- and long-range visual dependencies. Based on the local window, a series of local self-attentions with different shapes are proposed in subsequent work. Axial self-attention \cite{DBLP:journals/corr/abs-1912-12180} and criss-cross attention \cite{Huang-2019-ICCV} achieve longer-range dependencies in horizontal and vertical directions respectively by performing self-attention in each single row or column of the feature map. CSWin \cite{Dong-2022-CVPR} proposed a cross-shaped window self-attention region including multiple rows and columns. Pale Transformer \cite{DBLP:journals/corr/abs-2112-14000} proposes a Pale-Shaped self-Attention, which performs self-attention within a pale-shaped region to capture richer contextual information. The performance of the above attention mechanisms is either limited by the restricted window size or has a high computation cost, which cannot achieve better trade-off between computation cost and global-local interaction. In this paper, we propose a new hierarchical vision Transformer backbone by introducing axially expanded window self-attention. Focal ViT \cite{DBLP:journals/corr/abs-2107-00641} and CSWin \cite{Dong-2022-CVPR} are the most related works with our AEWin, which allows a better trade-off between computation cost and global-local interaction compared to them. \begin{figure*}[t] \centering \includegraphics[width=1.0\linewidth]{OverallArchitecture.pdf} \caption{(a) The overall architecture of our AEWin Transformer. (b) The composition of each block. } \label{OverallArchitecture-flabel} \end{figure*} \section{Method} \subsection{Overall Architecture} An overview of the AEWin-ViT architecture is presented in Figure \ref{OverallArchitecture-flabel} (a), which illustrates the tiny version. AEWin-ViT consists of four hierarchical stages, and we follow the popular design in Swin-ViT \cite{Liu-2021-ICCV} to build hierarchical architecture to capture multi-scale features and alternately use shifted window. Each stage contains a patch merging layer and multiple AEWin Transformer blocks. As the network gets deeper, the input features are spatially downsample by a certain ratio through the patch merging layer, and the channel dimension is expanded by twice to produce a hierarchical image representation. Specifically, the spatial downsampling ratio is set to 4 in the first stage and 2 in the last three stages, using the same patch merging layer as Swin-ViT. The outputs of the patch merging layer are fed into the subsequent AEWin Transformer block, and the number of tokens is kept constant. Finally, we apply a global average pooling step on the output of the last block to obtain the image representation vector for the final prediction. \subsection{Axially Expanded Window Self-Attention} LSAH-ViT uses window-based attention at shallow layers, losing the non-locality of original ViT, which leads to LSAH-ViT having limited model capacity and henceforth scales unfavorably on larger data regimes. Existing works propose specialized designs such as the “haloing operation” \cite{Vaswani-2021-CVPR} and “shifted window” \cite{Liu-2021-ICCV}, to communicate information between windows. These approaches often need complex architectural designs and the receptive field is enlarged quite slowly and it requires stacking a great number of blocks to achieve global self-attention. For capturing dependencies varied from short-range to long-range, inspired by human observation scenes, we propose Axially Expanded Window Self-Attention (AEWin-Attention), which performs fine-grained self-attention within the local window and coarse-grained self-attention on the horizontal and vertical axes. \noindent \textbf{Axially Expanded Windows.} According to the multi head self-attention mechanism, the input feature $X\in {{R}^{(H\times W)\times C}}$ will be first linearly projected to $K$ heads, and then each head will perform local self-attention within the window or horizontal axis or vertical axis. For horizontal axial self-attention, $X$ is evenly split into non-overlapping horizontal stripes $[{{X}^{1}},\cdots ,{{X}^{H}}]$, and each stripe contains $1\times W$ tokens. Formally, suppose the projected queries, keys and values of the ${{k}^{th}}$ head all have dimension ${{d}_{k}}$, then the output of the ${{k}^{th}}$ head's horizontal axis self-attention is defined as: \begin{equation} \begin{aligned} & X=[{{X}^{1}},{{X}^{2}},\cdots ,{{X}^{H}}], \\ & Y_{k}^{i}=\text{MSA}({{X}^{i}}W_{k}^{Q},{{X}^{i}}W_{k}^{K},{{X}^{i}}W_{k}^{V}), \\ & \text{H-MS}{{\text{A}}_{k}}(X)=[Y_{k}^{1},Y_{k}^{2},\cdots ,Y_{k}^{H}] \\ \end{aligned} \label{horizontalAttention-glabel} \end{equation} where ${{X}^{i}}\in {{R}^{(1\times W)\times C}}$, $i\in \left\{ 1,2,\cdots H \right\}$, and $\text{MSA}$ indicates the Multi-head Self-Attention. $W_{k}^{Q}\in {{R}^{C\times {{d}_{k}}}}$, $W_{k}^{K}\in {{R}^{C\times {{d}_{k}}}}$, $W_{k}^{V}\in {{R}^{C\times {{d}_{k}}}}$ represent the projection matrices of queries, keys and values for the ${{k}^{th}}$ head respectively, and ${{d}_{k}}=C/K$. The vertical axial self-attention can be similarly derived, and its output for ${{k}^{th}}$ head is denoted as $\text{V-MS}{{\text{A}}_{k}}(X)$. For windowed self-attention, $X$ is evenly split into non-overlapping local windows $[X_{m}^{1},\cdots ,X_{m}^{N}]$ with height and width equal to $M$, and each window contains $M\times M$ tokens. Based on the above analysis, the output of the windowed self-attention for ${{k}^{th}}$ head is defined as: \begin{equation} \begin{aligned} & {{X}_{m}}=[X_{m}^{1},X_{m}^{2},\cdots ,X_{m}^{N}], \\ & Y_{k}^{i}=\text{MSA}(X_{m}^{i}W_{k}^{Q},X_{m}^{i}W_{k}^{K},X_{m}^{i}W_{k}^{V}), \\ & \text{W-MS}{{\text{A}}_{k}}(X)=[Y_{k}^{1},Y_{k}^{2},\cdots ,Y_{k}^{N}] \\ \end{aligned} \label{windowAttention-glabel} \end{equation} where $N=(H\times W)/(M\times M)$, $M$ defaults to 7. \noindent \textbf{Parallel implementation of different granularities.} We split the $K$ heads into three parallel groups, with $K/4$ heads in the first two groups and $K/2$ heads in the last group, thus building a different granularity between local and global, as shown in Figure \ref{SplitGroup-flabel}. The first group of heads perform horizontal axis self-attention, the second group of heads perform vertical axis self-attention, and the third group of heads perform local window self-attention. Finally, the output of these three parallel groups will be concatenated back together. \begin{equation} \text{hea}{{\text{d}}_{k}}=\left\{ \begin{matrix} \text{H-MS}{{\text{A}}_{k}}\text{(}X\text{) } \\ \text{V-MS}{{\text{A}}_{k}}\text{(}X\text{) } \\ \text{W-MS}{{\text{A}}_{k}}\text{(}X\text{) } \\ \end{matrix}\begin{array}{*{35}{l}} k=1,\cdots ,K/4 \\ k=K/4+1,\cdots ,K/2 \\ k=K/2+1,\cdots ,K \\ \end{array} \right. \label{mergingtoken-glabel} \end{equation} \begin{equation} \text{AEWin(}X\text{)=Concat(hea}{{\text{d}}_{1}}\text{,}\cdots \text{,hea}{{\text{d}}_{K}}\text{)}{{W}^{O}} \label{finalOutMlp-glabel} \end{equation} where ${{W}^{O}}\in {{R}^{C\times C}}$ is the commonly used projection matrix that is used to integrate the output tokens of the three groups. Compared to the step-by-step implementation of axial and windowed self-attention separately, such a parallel mechanism has a lower computation complexity and can achieve different granularities by carefully designing the number of heads in different groups. \noindent \textbf{Complexity Analysis.} Given the input feature of size $H\times W\times C$ and window size $(M,M)$, $M$ is set to 7 by default, the standard global self-attention has a computational complexity of \begin{equation} \Omega (\text{Global})=4HW{{C}^{2}}+2{{(HW)}^{2}}C \label{GlobalComplexity-glabel} \end{equation} however, our proposed AEWin-Attention under the parallel implementation has a computational complexity of \begin{equation} \Omega (\text{AEWin})=4HW{{C}^{2}}+HWC*(\frac{1}{2}H+\frac{1}{2}W+{{M}^{2}}) \label{AEWinComplexity-glabel} \end{equation} which can obviously alleviate the computation and memory burden compared with the global one, since $2HW>>(\frac{1}{2}H+\frac{1}{2}W+{{M}^{2}})$ always holds. \subsection{AEWin Transformer Block} Equipped with the above self-attention mechanism, AEWin Transformer block is formally defined as: \begin{equation} \begin{aligned} & \overset{\wedge }{\mathop{{{X}^{l}}}}\,=\text{AEWin-Attention}(\text{LN}({{X}^{l-1}}))+{{X}^{l-1}}, \\ & {{X}^{l}}=\text{MLP}(\text{LN}(\overset{\wedge }{\mathop{{{X}^{l}}}}\,))+\overset{\wedge }{\mathop{{{X}^{l}}}}\, \\ \end{aligned} \label{windowAttention-glabel} \end{equation} where $\overset{\wedge }{\mathop{{{X}^{l}}}}\,$ and ${{X}^{l}}$ denote the output features of the $\mathsf{AEWin}$ module and the $\mathsf{MLP}$ module for block $l$, respectively. In computing self-attention, we follow Swin-ViT by including a relative position bias $B$ to each head in computing similarity. \section{Experiments} We first compare our AEWin Transformer with the state-of-the-art Transformer backbones on ImageNet-1K \cite{5206848} for image classification. We then compare the performance of AEWin and state-of-the-art Transformer backbones on small datasets Caltech-256 \cite{griffin2007caltech} and Mini-ImageNet \cite{krizhevsky2012imagenet}. Finally, we perform comprehensive ablation studies to analyze each component of AEWin Transformer. \subsection{Experiment Settings} \noindent \textbf{Dataset}. For image classification, we benchmark the proposed AEWin Transformer on the ImageNet-1K, which contains 1.28M training images and 50K validation images from 1,000 classes. To explore the performance of AEWin Transformer on small datasets, we also conducted experiments on Caltech-256 and Mini-ImageNet. Caltech-256 has 257 classes with more than 80 images in each class. Mini-ImageNet contains a total of 60,000 images from 100 classes. \noindent \textbf{Implementation details}. This setting mostly follows \cite{Liu-2021-ICCV}. We use the PyTorch toolbox \cite{paszke2019pytorch} to implement all our experiments. We employ an AdamW \cite{kingma2014adam} optimizer for 300 epochs using a cosine decay learning rate scheduler and 20 epochs of linear warm-up. A batch size of 256, an initial learning rate of 0.001, and a weight decay of 0.05 are used. ViT-B/16 uses an image size 384 and others use 224. We include most of the augmentation and regularization strategies of \cite{Liu-2021-ICCV} in training. \subsection{Image Classification on the ImageNet-1K} \begin{table}[h] \centering \caption{Comparison of different models on ImageNet-1K.} \resizebox{\linewidth}{!}{ \begin{tabular}{l|ccc|c} \hline Method & Image Size & Param. & FLOPs & Top-1 acc. \\ \hline ViT-B \cite{DBLP:journals/corr/abs-2010-11929} & ${{384}^{2}}$ & 86M & 55.4G &77.9 \\ \hline Swin-T \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 29M & 4.5G &81.3 \\ Swin-B \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 88M & 15.4G &83.3 \\ \hline Pale-T \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 22M & 4.2G &83.4 \\ Pale-B \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 85M & 15.6G &84.9 \\ \hline CSWin-T \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 23M & 4.3G &82.7 \\ CSWin-B \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 78M & 15.0G &84.2 \\ \hline AEWin-T (ours) & ${{224}^{2}}$ & 23M & 4.0G & \textbf{83.6} \\ AEWin-B (ours) & ${{224}^{2}}$ & 78M & 14.6G &\textbf{85.0} \\ \hline \end{tabular} } \label{ImageNet-Top1} \end{table} Table \ref{ImageNet-Top1} compares the performance of our AEWin Transformer with the state-of-the-art Vision Transformer backbones on ImageNet-1K. Compared to ViT-B, our AEWin-T model is +5.7\% better and has much lower computation complexity than ViT-B. Meanwhile, our AEWin Transformer variants outperform the state-of-the-art Transformer-based backbones, and is +0.9\% higher than the most related CSWin Transformer. AEWin Transformer has the lowest computation complexity compared to all models in Table \ref{ImageNet-Top1}. For example, AEWin-T achieves 83.6\% Top-1 accuracy with only 4.0G FLOPs. And for the base model setting, our AEWin-B also achieves the best performance. \begin{table}[h] \centering \caption{Comparison of different models on Caltech-256.} \resizebox{\linewidth}{!}{ \begin{tabular}{l|ccc|c} \hline Method & Image Size & Param. & FLOPs & Top-1 acc. \\ \hline ViT-B \cite{DBLP:journals/corr/abs-2010-11929} & ${{384}^{2}}$ & 86M & 55.4G &37.6 \\ \hline Swin-T \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 29M & 4.5G &43.3 \\ Swin-B \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 88M & 15.4G &46.7 \\ \hline Pale-T \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 22M & 4.2G &45.2 \\ Pale-B \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 85M & 15.6G &47.1 \\ \hline CSWin-T \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 23M & 4.3G &47.7 \\ CSWin-B \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 78M & 15.0G &48.5 \\ \hline AEWin-T (ours) & ${{224}^{2}}$ & 23M & 4.0G & \textbf{48.6} \\ AEWin-B (ours) & ${{224}^{2}}$ & 78M & 14.6G &\textbf{49.3} \\ \hline \end{tabular} } \label{Caltech-256-Top1} \end{table} \subsection{Image Classification on Caltech-256 and Mini-ImageNet} We show the performance of ViT on small datasets in Table \ref{Caltech-256-Top1} and Table \ref{Mini-ImageNet-Top1}. It is known that ViTs usually perform poorly on such tasks as they typically require large datasets to be trained on. The models that perform well on large-scale ImageNet do not necessary work perform on small-scale Mini-ImageNet and Caltech-256, e.g., ViT-B has top-1 accuracy of 58.3\% and Swin-B has top-1 accuracy of 67.4\% on the Mini-ImageNet, which suggests that ViTs are more challenging to train with less data. Our proposed AEWin can significantly improve the data efficiency and performs well on small datasets such as Caltech-256 and Mini-ImageNet. Compared with CSWin, it has increased by 0.8\% and 0.7\% respectively. \begin{table}[h] \centering \caption{Comparison of different models on Mini-ImageNet.} \resizebox{\linewidth}{!}{ \begin{tabular}{l|ccc|c} \hline Method & Image Size & Param. & FLOPs & Top-1 acc. \\ \hline ViT-B \cite{DBLP:journals/corr/abs-2010-11929} & ${{384}^{2}}$ & 86M & 55.4G &58.3 \\ \hline Swin-T \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 29M & 4.5G &66.3 \\ Swin-B \cite{Liu-2021-ICCV} & ${{224}^{2}}$ & 88M & 15.4G &67.4 \\ \hline Pale-T \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 22M & 4.2G &67.4 \\ Pale-B \cite{DBLP:journals/corr/abs-2112-14000} & ${{224}^{2}}$ & 85M & 15.6G &68.5 \\ \hline CSWin-T \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 23M & 4.3G &66.8 \\ CSWin-B \cite{Dong-2022-CVPR} & ${{224}^{2}}$ & 78M & 15.0G &68.4 \\ \hline AEWin-T (ours) & ${{224}^{2}}$ & 23M & 4.0G & \textbf{68.2} \\ AEWin-B (ours) & ${{224}^{2}}$ & 78M & 14.6G &\textbf{69.1} \\ \hline \end{tabular} } \label{Mini-ImageNet-Top1} \end{table} \subsection{Ablation Study} In this section, we compare with existing self-attention mechanisms. For a fair comparison, we use Swin-T as backbone and only change the self-attention mechanism. As shown in Table \ref{differentMechanisms}, our AEWin self-attention mechanism performs better than the existing self-attention mechanism. \begin{table}[h] \centering \caption{Comparison of different self-attention mechanisms.} \resizebox{\linewidth}{!}{ \begin{tabular}{l|c} \hline Attention mode & ImageNet-1K Top-1 acc. \\ \hline Shifted Window \cite{Liu-2021-ICCV} & 81.3 \\ Sequential Axial \cite{DBLP:journals/corr/abs-1912-12180} &81.5 \\ Criss-Cross \cite{Huang-2019-ICCV} & 81.7 \\ Pale \cite{DBLP:journals/corr/abs-2112-14000} & 82.5 \\ Cross-shaped window \cite{Dong-2022-CVPR} & 82.2 \\ Axially expanded window & \textbf{83.1} \\ \hline \end{tabular}} \label{differentMechanisms} \end{table} \section{Conclusions} This work proposes a new efficient self-attention mechanism, called axially expanded window attention (AEWin-Attention). Compared with previous local self-attention mechanisms, AEWin-Attention simulates the way humans observe a scene by performing fine-grained attention locally and coarse-grained attention in non-attentional regions. Different granularities are distinguished by setting different number of group heads, and the parallel computing of three groups further improves the efficiency of AEWin. Based on the proposed AEWin-Attention, we develop a Vision Transformer backbone, called AEWin Transformer, which achieves state-of-the-art performance on ImageNet-1K for image classification. \bibliographystyle{named}
{ "timestamp": "2022-09-20T02:23:50", "yymm": "2209", "arxiv_id": "2209.08726", "language": "en", "url": "https://arxiv.org/abs/2209.08726" }
"\n\\section{Introduction}\\label{sec:intro}\n\nLinear programming (LP) is one of the most useful to(...TRUNCATED)
{"timestamp":"2022-09-26T02:13:56","yymm":"2209","arxiv_id":"2209.08722","language":"en","url":"http(...TRUNCATED)
"\\section{Introduction}\nResearchers, including journalists \\cite{mask_stockpile_ars_2020,buffalo_(...TRUNCATED)
{"timestamp":"2022-09-20T02:21:20","yymm":"2209","arxiv_id":"2209.08649","language":"en","url":"http(...TRUNCATED)
"\\section{Introduction}\n\\label{sec:introduction}\n\n\\begin{figure}[t!]\n\\centering\n\\includegr(...TRUNCATED)
{"timestamp":"2022-09-20T02:20:31","yymm":"2209","arxiv_id":"2209.08619","language":"en","url":"http(...TRUNCATED)
"\\section{Introduction}\n\nOver the past decade, deep neural networks have produced groundbreaking (...TRUNCATED)
{"timestamp":"2022-09-20T02:20:43","yymm":"2209","arxiv_id":"2209.08627","language":"en","url":"http(...TRUNCATED)
"\n\\section{Introduction}\\label{sec:intro}\nQuantum speed limit \\cite{Mandelstam45,Mandelstam1991(...TRUNCATED)
{"timestamp":"2022-09-20T02:22:41","yymm":"2209","arxiv_id":"2209.08689","language":"en","url":"http(...TRUNCATED)
"\\section{Introduction}\nDeep neural networks (DNNs) have been deployed in many applications includ(...TRUNCATED)
{"timestamp":"2022-09-20T02:23:44","yymm":"2209","arxiv_id":"2209.08724","language":"en","url":"http(...TRUNCATED)
"\\section{Introduction}\nCurrent best practice in recommender systems evaluation, both in academic (...TRUNCATED)
{"timestamp":"2022-09-20T02:21:15","yymm":"2209","arxiv_id":"2209.08642","language":"en","url":"http(...TRUNCATED)
"\\section{Using Uncertainty for Next-Best View Selection and Model Refinement}\n\\begin{figure}[t]\(...TRUNCATED)
{"timestamp":"2022-09-20T02:23:38","yymm":"2209","arxiv_id":"2209.08718","language":"en","url":"http(...TRUNCATED)
End of preview. Expand in Data Studio

No dataset card yet

Downloads last month
6