\section{Introduction}
\label{sec:intro}
Bose--Einstein condensates (BECs) play a very exciting and essential role in modern physics, relating a multitude of models spreading from microscopic well proved behavior of ultra--cold quantum gases to galactic and cosmological scales. Nevertheless, there is an issue not well understood in this scenario which deserves more in-depth study, i.e., the non--trivial conditions in which scalar fields can form BECs \cite{B1,B2,B3,B4,B5,B6,B7,Nos}. However, it seems to be that scalar fields in the form of some type of BEC formed by generic bosons can describe the basic properties of dark matter (DM) in the universe \cite{DM,DM1,DM2,DM3,DM4,DM5,DM6}. According to this line of thought, DM consists of a certain type of spin--zero bosons, such as ultra-light scalar field dark matter or fuzzy dark matter, weakly interacting massive particles, axions, etc.,
(depending on the specific model under consideration) which have not yet been observed.
The bosonic character of these particles, using the theory of relativistic Bose gases \cite{JB,LP},
also opens the door for the existence of scalar field dark matter in the
form of BECs \cite{BoehmerHarko2007,ure}.\\
Complementary to the ideas mentioned above, some particular theoretical objects can be formed in a very similar manner. In some circumstances, a system of \textit{generic bosons} can form gravitationally bound  BECs leading to macroscopic objects,
the so--called boson stars (BSs) \cite{1,2,3}.
On the one hand, some research lines suggest that BSs could be alternative candidates for black holes in the center of galaxies. On the other hand, it is generally accepted that the fundamental constituents of BSs are some generic scalars in the form of some type of BEC \cite{Eckehard}. This last assertion opens up the opportunity to describe these objects with BEC's formalism, which enriches the analysis.
We must mention that the study of BSs and its interpretation as BECs has been extensively analyzed \cite{SL}. Although these objects have also not been observed yet, their behavior and their structural properties lead us to think that these systems are highly related to scalar dark matter clouds in the universe.
There is a \textit{zoo} of these objects (BSs) in the literature \cite{Eckehard}, basically characterized according to its dynamical behavior. For instance, BS could lie in the relativistic regime or not,
they can also be characterized with respect to the type of self--interactions within the system \cite{Eckehard}, etc.
The structural properties of the BS are quite interesting. For instance, Heisenberg's Uncertainty Principle provides pressure support in order to get a stable object.
The size of the BS ranges from giant  to very compact objects
depending on the nature of the involved functional interactions among the constituents of the system. Finally, we must mention that the Klein--Gordon equation coupled with gravity describes the dynamics of BSs in the relativistic regime, and consequently, some Gross--Pitaevskii like--equations also coupled with gravity describe the dynamics in the non--relativistic limit, the so--called \textit{Gross--Pitaevskii--Poisson equation}, see for instance \cite{Kling1,Kling2} and references therein.
It is quite interesting that the non--relativistic limit of the self--interacting Klein--Gordon equation, which describes the dynamics of BSs, leads to the so--called Gross--Pitaevskii equation, when the scalar potential is of the form  $m^{2}|\phi|^{2}+\lambda |\phi|^{4}$, being $m$ the mass parameter and $\lambda$ the term related to self--interactions. Clearly, more general forms of the Gross--Pitaevskii equation can be used to generalize the corresponding interactions within the system. Those mentioned earlier lead to criteria of structural characterization of the BS, for instance, its size, stability, etc., by using (under certain conditions) the basic formalism behind usual laboratory BECs.
 Strictly speaking, the Gross--Pitaevskii equation is an approximated equation valid for systems at zero temperature. Nevertheless, the predictions made by the Gross--Pitaevskii equation are a good approximation for temperatures $T <T_{c}$, where $T_{c}$ is the condensation temperature of the system. Such an equation can be used to analyze diluted weakly interacting systems' properties and when the number of particles is large enough for the condensed phase.
However, when the corresponding \textit{Gross--Pitaevskii--Poisson equation} is used to study the structural properties of the BS, the N--particles that constitute the system are analyzed as a single particle(--field). In other words, the nature of the phase transition provides the advantage to reduce the analysis of the $N$-body system to the analysis of the dynamics of a single body(--field) as in usual BECs. For this reason, we call the field appearing in the \textit{Gross--Pitaevskii--Poisson equation} the order parameter. The order parameter contains the information of the N--particles forming the condensed phase, and due to the highly correlated behavior of the BEC, this system behaves as a single entity. \\
In this work, we assume from the very beginning that the non--relativistic behavior of the BS can be described as a collection of weakly interacting generic bosons that are able to form gravitationally bound BECs. In other words, we describe some structural properties related to the BS through the quantum properties of its basic constituents, i.e., the properties of a single particle. \\
 The paper is organized as follows. In section \ref{sec:NB}, we study the fundamental properties of the BS viewed as a collection of bosons starting from the single particle description. We assume that the system behaves as a BEC. Also, we describe the approximation in which the Newtonian gravitational potential can be expressed as a harmonic oscillator potential that we interpreted as the trapping potential, like in usual laboratory BECs. In section \ref{sec:SBS}, we analyze the relevant structural functions that characterize the ground state of the system to obtain criteria of stability upon the BS. Finally, in section \ref{sec:CON}, we present a discussion, conclusions, and outlook.
\section{N--Body Quantum System as a Non--Relativistic Boson Star }
\label{sec:NB}
As was mentioned in the introduction, the basic constituents of BSs are scalar particles(--field) (or spin zero--bosons), probably in the form of a BEC.
In this section we analyze the non--relativistic BSs behavior as a collection of bosons interpreted as a quantum $N$--body system,  in order to analyze some relevant properties associated with the bosonic cloud viewed as a BEC.
In this aim, we define the following $N$--body Hamiltonian which describes our non--relativistic BS
\begin{eqnarray}
 \label{MH}
 \hat{H}&=&-\frac{\hbar^{2}}{2m_{\phi}}\sum_{\delta,\gamma}\langle\delta\vert\nabla^{2}\vert \gamma\rangle\hat{a}^{\dag}_{\delta}\hat{a}_{\gamma}\\\nonumber&+&\frac{1}{2} \sum_{\delta,\gamma,\mu,\nu}\langle\delta,\gamma\vert V_{int} \vert\mu,\nu\rangle
 \hat{a}^{\dag}_{\delta}\hat{a}_{\gamma}\hat{a}^{\dag}_{\mu}\hat{a}_{\nu}\\\nonumber&+& \sum_{\delta,\gamma}\langle\delta \vert V_{g}\vert\gamma\rangle\hat{a}^{\dag}_{\delta}\hat{a}_{\gamma}
\end{eqnarray}
where $m_{\phi}$ is the mass of the boson particle and $V_{int}$ is the potential which describe the interactions within the system. Moreover, we have also inserted in Eq.\,(\ref{MH}) the contributions of the gravitational potential $V_{g}$. Additionally, the operators $\hat{a}$ and $\hat{a}^\dag $, correspond to the
creation and annihilation operators for bosons, satisfying the usual canonical commutation relations
\begin{equation}
[\hat{a}_{\mu},\hat{a}_{\nu}^{\dagger}]=\delta_{\mu \nu},\,\,\,\ [\hat{a}_{\mu},\hat{a}_{\nu}]=[\hat{a}_{\mu}^{\dagger},\hat{a}_{\nu}^{\dagger}]=0.
\end{equation}
As was mentioned above, the term, $V_{int}$ denotes the inter--particle potential, that will be assumed as $V_{int}\equiv U_{0}=\frac{4 \pi
\hbar^{2}}{m_{\phi}}a$, with $a$ the s--wave scattering length, i.e., at temperatures below the condensation temperature, only two--body interactions are taken into account. In other words, the system is diluted enough, and fulfills the condition $\rho |a|^{3}\ll 1$, where $\rho$ is the density of particles \cite{Dalfovo,Ueda,Pitaevski,Pethick}.
Additionally, $V_{g}$ depicts the contributions of the gravitational potential within the BS that we assume for simplicity with spherical symmetry.

Notice that in the corresponding $N$--body Hamiltonian
Eq.\,(\ref{MH}) we have the following terms
\begin{equation}
\label{ef1}
\langle\delta\vert{\nabla}^{2}\vert\gamma\rangle=\int{d}^{3}r{u}_{\delta}^{*}(\vec{r}){\nabla}^{2}{u}_{\gamma}(\vec{r}),
\end{equation}
\begin{eqnarray}
&& \langle\delta,\gamma\vert
V_{int}\vert\mu,\nu\rangle =\\\nonumber&&\int\int{d}^{3}{r}_{1}{d}^{3}{r}_{2}{u}_{\delta}^{*}(\vec{r}_{1}){u}_{\gamma}^{*}(\vec{r}_{2})
 U_{0}{u}_{\mu}(\vec{r}_{2}){u}_{\nu}(\vec{r}_{1}),
\end{eqnarray}
\begin{equation}
\langle\delta \vert
V_{g}\vert\gamma\rangle=\int{d}^{3}r{u}_{\delta}^{*}(\vec{r})V_{g}
{u}_{\gamma}(\vec{r}),
\end{equation}
where $\{{u}_{\gamma}(\vec{r})\}$ is a set of single--particle
functions.

Although the mean field solutions for the gravitational potential with no interactions, are known in terms of hypergemoeometric functions, one can in principle,
introduce some approximation to the gravitational potential. Let us consider a test particle in the outermost layer of the star, then its gravitational potential energy is proportional to the product of its masses, by the inverse of the distance to the center of the star that concentrates the largest part of the mass. For a spherically symmetric distribution, the first approximation is such that the mass is proportional to the central density times the volume of the sphere. Then, the gravitational potential would be proportional to the distance squared, i.e., a \textit{harmonic potential}. This approximation is made precise in Refs. \cite{Abel,Abel1}.

First, let us recall that the mass $M_{T}$ within a spherically symmetric BS, is given by
\begin{equation}
\label{eq:TMass}
M_{T}(r)=4 \pi\, m_{\phi} N \int_{0}^{r}\rho(r')\,{r'}^{2}\,dr'.
\end{equation}
where $0\leqslant r \leqslant R$. The radius $R$ will be considered the radius of the BS if most of its mass is contained in a region bounded by that radius. $N$ is the corresponding number of particles and $\rho(r)$ is the one particle probability density, which admits a series expansion when
most of the matter of the BS is close enough to $r=0$, i.e.,
\begin{equation}
\label{eq:SE}
\rho(r)=\rho(r=0)+\sum_{n=1}^{\infty}\frac{\rho^{(n)}(r=0)r^{n}}{n\,!},
\end{equation}
where $m_{\phi} N\rho(r=0)$ is the central mass density of the BS, and $\rho^{(n)}$ its corresponding derivatives.
However, the density $\rho(r)$ tends to infinity as $r \rightarrow \infty$ which is a non physical behavior since the density $\rho(r)$ must tends zero for large $r$. In order to avoid this unphysical scenario it is assumed that
\begin{equation}
\label{assu}
\Bigg|\frac{\rho^{(n)}(r=0)}{\rho(r=0)}\Bigg| \approx \frac{1}{R^{n}}.
\end{equation}

Now, for the motion of a test particle that goes through the BS along the collinear diameter with the $z$-axis, the density peak is at the center of the BS, yielding
\begin{equation}
\label{TMr}
M_{T}(r)=\frac{4}{3}\pi\,m_{\phi} N \rho(r=0)r^{3}\Bigg[1+3\sum_{n=2}^{\infty}\frac{1}{(n+3) n\,!}\Bigl(\frac{r}{R}\Bigr)^{n}\Bigg].
\end{equation}
The sum in Eq.\,(\ref{TMr}) must be convergent, but small by hypothesis. Indeed, in Ref.\,\cite{Abel}, it is shown that $\forall \delta$  there is an index of the sum such that, for all the terms greater than that corresponding to such index, the sum is bounded by $ \delta $. For $\delta$ small enough but not negligible, the remaining terms of the sum can be considered as perturbations. Therefore, the main term of the potential is reduced to a harmonic potential with an \textit{effective gravitational frequency} given by
\begin{equation}
\label{omegaG}
\omega_{g}=\sqrt{\alpha \pi Gm_{\phi} N \rho(r=0)},
\end{equation}
where $G$ is the Newtonian constant of gravitation. Here also $\alpha =4/3+4\delta$. If $\delta=10^{-1}$, corresponding to less than 10 \% of the total mass, the factor $ 52/ 30$ of Ref.\,\cite{Abel} is recovered. Briefly, we can define an \textit{effective gravitational frequency}, so that the gravitational potential can be interpreted at first order, as a trapping harmonic--like potential, as occurs in the usual BEC's formalism.
\bigskip

\section{Boson Star Structural Analysis}
\label{sec:SBS}
According to the conditions obtained in the previous section, the corresponding analysis for the properties related to the BS can be summarized as follows, the trapping potential is given by
\begin{equation}
\label{eq:potito}
V_{g}\approx \frac{1}{2}m_{\phi}\omega_{g}^{2}r^{2},
\end{equation}
and the approximation for the total mass
\begin{equation}
\label{totM}
M_{T}\approx 4 \pi\, N m_{\phi}\int_{0}^{R}\rho(r=0)\,r^{2}\,dr.
\end{equation}

On the other hand, if we further assume that most of the particles are inside the condensate, that is, in the $\vec{p}=0$ state then, this implies that the number of particles in the excited states is negligible for temperatures $T<T_{c}$, where $T_{c}$ is the condensation temperature. The contributions of the particles in the excited states could affect the properties of the system, see for instance Ref.\,\cite{Abel}. However, we consider here that almost all the particles lies in the corresponding ground state according to the approximation Eq.\,(\ref{eq:AP}). The contributions of the  excited states could be important in the stability analysis and will be analyzed in future works.
Thus, the last assertions can be expressed as follows.
\begin{equation}
\label{eq:AP}
N_{0}\approx N, \hspace{0.5cm}\sum_{\vec{p} \not=0} N_{\vec{p}} \ll N,
\end{equation}
being $N$ the total number of particles, $N_{\vec{p}}$ the number of particles in the excited states, and $N_{0}$ the number of particles in the ground state. Keeping terms up to second order in $\hat{a}_{0}$ and $\hat{a}^{\dag}_{0}$, i.e., $\langle \hat{a}_{0}^{\dag} \hat{a}_{0} \rangle=\langle N \rangle$, we are able to obtain the ground
state energy ($E_{0}$) associated with our BS
\begin{eqnarray}
 \label{E0}
 E_{0}&=&-\frac{{\hbar}^{2}}{2m_{\phi}}\langle0\vert\nabla^{2}\vert0\rangle N + \frac{1}{2}\langle0,0\vert U_{0} \vert0,0\rangle{N}^{2} \\ \nonumber
 &+& \langle0 \vert
 V_{g}\vert0\rangle N
 \end{eqnarray}
Thus, we have for instance for the kinetic energy
\begin{eqnarray}
\label{Exa}
\langle0\vert\nabla^{2}\vert0\rangle=\int_{0}^{\infty}\int_{\Omega}^{}\Psi_{0}^{*}(r)\nabla^{2}\Psi_{0}(r){r}^{2}\sin\theta
dr d\theta d\phi,\,\,\,\,
\end{eqnarray}
 and so on for each of the energy contributions to the ground state Eq.~(\ref{E0}).

\begin{widetext}

\begin{table}[h]
\centering
\makebox[\textwidth]{
\resizebox{0.9\columnwidth}{!}{\begingroup
\setlength{\tabcolsep}{10pt}
\renewcommand{\arraystretch}{1.8}
 \begin{tabular}{c c c c c c}
 \hline \hline
  & & G  & E & LE & C \\ [1ex]
 \hline
 $\Psi_{0}(r)$ & & ${\Bigl(\frac{{\beta}^{2}}{\pi}\Bigr)}^{3/4}{e}^{-{\beta}^{2}{r}^{2}/2}$ & ${\Bigl(\frac{{\beta}^{2}}{\pi^{2/3}}\Bigr)}^{3/4}{e}^{-{\beta}r}$ & ${\Bigl(\frac{{\beta}^{2}}{7^{2/3}\pi^{2}}\Bigr)}^{3/4} \left(1+r\beta \right){e}^{-{\beta} r}$ & $\sqrt{\frac{4\pi\beta^{3}}{(2\pi^{2}-15)}}\cos^{2}\left(\frac{\pi \beta r}{2}\right)$ \\
 A & & $\pi^{-3/2}$ & $\pi^{-1}$ & $\frac{1}{7\pi^3}$ & $\frac{4\pi}{(2\pi^{2}-15)}$ \\
 $\kappa$ & & $2.8$ & $4.2$ & $5.4$ & $1$ \\
 $\epsilon_1$ & & $\frac{3}{4}$ & $\frac{1}{2}$ & $\frac{3}{14\pi^2}$ & $\frac{(4\pi^{2}-6)\pi^{2}}{(24\pi^{2}-180)}$ \\
 $\epsilon_2$ & & $\frac{3}{4}$ & $\frac{1}{2}$ & $\frac{81}{28\pi^2}$ & $\frac{3(2\pi^{4}-5\pi^{2}+315)}{10(2\pi^{3}-15\pi)}$ \\
 $\epsilon_3$ & & $\frac{1}{2(2\pi)^{3/2}} $ & $\frac{1}{16 \pi}$ & $\frac{437}{25088\pi^5}$ & $\frac{35(24\pi^{3}-205\pi)}{288(2\pi^{2}-15)}$ \\ [1ex]

 \hline \hline
 \end{tabular}
 \endgroup
 }}
 \caption{Ans\"atze table for the wave function of a single particle and its corresponding parameters $A, \kappa, \epsilon_1,\epsilon_3,\epsilon_3$. The ans\"atze presented here are known in the literature as the Gaussian (G), exponential (E), the linear exponential (LE) and the compact (C), respectively.}
\label{table:1}
\end{table}

\end{widetext}

At this point, we introduce some well--known \textit{ans\"atze} for the single-particle wave function $\Psi_{0}(r)$, which are summarized in the Table \ref{table:1}.
There are several ans\"atze used in the literature. As the wave functions for BS usually do not have compact support, three non--compact \textit{ans\"atze} are proposed, see for instance Ref.\,\cite{Joshua} and references therein. However, in the Thomas--Fermi approximation, the BS can have a fixed radius, which may have some advantages \cite{Joshua1}, for which we also propose a compact ansatz. Sometimes, these functions contain adjustable parameters to compare with the numerical solutions \cite{Joshua}. As we see in the Table \ref{table:1},  each of our proposed wave function has a single parameter $ \beta $ with units of the inverse of length. In principle, this parameter can be different in each case, but due to the approximation of the harmonic potential, we will assume that it fulfills ${\beta}=\sqrt{\frac{m_{\phi} \omega_g}{\hbar}}$. Moreover, as we will see later in the manuscript, its meaning is related to the BS's radius.

On the other hand, the probability density is the square of the wave function, $\rho(r) = |\Psi_{0}(r)|^{2}$. From this definition, we can obtain the corresponding central density evaluating at $ r = 0 $, i. e.
 \begin{equation}
 \label{eq:r0}
 \rho(r=0)=   A\, \beta^3,
 \end{equation}
where $A$ is a numerical factor that depends on whether it is Gaussian (G), Exponential (E), Linear--Exponential (LE), or Compact (C) anzatz, according to table \ref{table:1}.
Notice that the central density in each case is expressed in terms of the parameter $\beta$. We can substitute these central densities in the expression for the \textit{effective gravitational frequency} Eq.\,(\ref{omegaG}) that gives us
 %
   \begin{equation}
 \label{frecg00}
\omega_g =   \sqrt{\alpha \pi A G m_{\phi} N \beta^3 },
\end{equation}
also in terms of the inverse length $\beta$.

Let us realize that $\beta$ depends on the \textit{effective gravitational frequency}, and this, in turn, depends on the central density, i.e., by using Eq.\,(\ref{eq:r0}) we obtain
  %
  \begin{eqnarray}\label{dens}
\rho(r=0)&=&   A \beta^3 = A \left( \frac{m_{\phi} \omega_g}{ \hbar} \right)^{3/2} \\\nonumber&=& A \left( \frac{m_{\phi} }{ \hbar} \right)^{3/2} \left(\alpha G\pi m_{\phi} N \rho(r=0)  \right)^{3/4}.
\end{eqnarray}
Therefore, if the \textit{ans\"atze} given in Table\,\ref{table:1} and the potential Eq. (\ref{eq:potito}) be compatible, then the following expression for the central density of the BS must be consistent
 %
  \begin{equation}
\label{rocero10}
\rho(r=0)=  \left(\alpha G \pi  \frac{m_{\phi}^3}{\hbar^2} \right)^{3}A^4N^{3}.
\end{equation}

Notice that for all practical purposes the \textit{effective gravitational frequency} for each ansatz has the same functional form, qualitatively speaking, and consequently the functional form of the central density for each ansatz has this shape.

On the other hand, with the expression for $\beta$ in terms of the \textit{effective gravitational frequency}, if we substitute $\omega_g$ form Eq.\,(\ref{omegaG}), and central density from Eq.\,(\ref{rocero10}), we obtain an order of magnitude for the inverse length parameter $\beta$ for each ans\"atze, as follows
  \begin{equation}
  \label{beta000}
\beta = \frac{\alpha \pi G A N }{ \hbar^2}m_{\phi}^3.
\end{equation}

Although this characteristic length is not precisely the BS's radius, it gives us an estimate of its size. Indeed, the ratio between the BS radius and this length is a fixed quantity $ R\beta = \kappa$ that depends on the chosen ansatz \cite{Joshua}  as shown in table \ref{table:1} . In the case of the compact ansatz, the radius can be considered as the inverse of the $\beta$ parameter, $R = \beta^{-1}$.

Let us calculate the corresponding ground state energy of the BS,  by substituting each ans\"atze into the ground state energy Eq.\,(\ref{E0}), to obtain the following expression
\begin{eqnarray}
\label{eq:i}
 E_{0}=\epsilon_1\frac{{\hbar}^{2} \beta^2 N}{m_{\phi} } + \epsilon_2 \frac{m_{\phi}\omega_{g}^{2}N}{\beta^2} + \epsilon_3 U_{0}\beta^3 N^{2},
\end{eqnarray}
where the numerical coefficients $\epsilon_i$ differ for each ans\"atze and are also shown in Table  \ref{table:1}. Note that the radial integral in Eq.\,(\ref{E0}) cannot be performed up to infinity for the compact ansatz case, since one need to ask that the function vanishes for radii greater than $ \beta^{-1} $. In other circumstances, it is known that this can lead to some difficulties \cite{Joshua}. However, in this case, it is enough to integrate up to $ \beta^{-1} $ to obtain the numerical coefficients above.

To obtain the thermodynamic quantities, it will be necessary to replace $\beta$ and $\omega_g$ as functions of the volume. Since we are considering a spherically symmetric BS, the available volume in the ideal case,  i.e., when the interactions among the constituents within the BS are neglected, is as follows $V_{BS} = 4\pi \kappa^3\beta^{-3}/3$, so ground state energy becomes
\begin{eqnarray}
\label{eq:gii}
 E_{0} &=&\epsilon_1\frac{{\hbar}^{2}N }{m_{\phi} } \left(\frac{4 \pi \kappa^3}{3} \right)^{2/3} V_{BS}^{-2/3}
 \\ \nonumber &+&  \epsilon_2  \pi A \alpha G  m_{\phi}^{2}N^{2}  \left(\frac{4 \pi \kappa^3}{3} \right)^{1/3} V_{BS}^{-1/3}  \\ \nonumber &+& \epsilon_3 U_{0}N^{2}  \left(\frac{4 \pi \kappa^3}{3} \right) V_{BS}^{-1},
\end{eqnarray}
 From the $N$--body ground state energy Eq.\,(\ref{eq:gii})  we therefore calculate the ground state pressure  $P_0 = -\frac{\partial E_0}{\partial V_{BS}}$ for each ans\"atze with the result
\begin{eqnarray}
\label{eq:PI}
   P_{0} &=& \left( \frac{3}{4\pi \kappa^3}  \right)  \Bigl[  \frac{2}{3} \epsilon_1 \frac{\hbar^2 N}{ m_{\phi} }\beta^5  \\ \nonumber   &+& \frac{1}{3} \epsilon_2\pi A  \alpha G  m_{\phi}^2N^2  \beta^4 +  \epsilon_3 U_{0}N^{2} \beta^6\Bigr].
\end{eqnarray}

After rearranging the terms by identifying the scale $\beta$ from Eq.\,(\ref{beta000}), we can obtain the following two terms, which are of the same order in the length scale that those usually found, but with different coefficients
\begin{eqnarray}
\label{eq:P2}
   P_{0} &=&   \left( \frac{3}{4\pi \kappa^3}  \right)  \left[ \frac{\left( 2\epsilon_1 + \epsilon_2 \right)}{3}    \frac{\hbar^2 N}{m_{\phi} }\beta^5   +   \epsilon_3 U_{0}N^{2} \beta^6  \right].
\end{eqnarray}

\begin{figure}[h!]
    \includegraphics[width=0.39\textwidth]{Boson_3plots.pdf}
    \caption{\footnotesize{ Plots of the Radii (top panel), Mass (middle panel) and Pressure (Bottom panel) for a Boson star. Red (and black) lines represent extreme high (low) values for each case, for the radii panel are a dark matter halo characteristic radius of $10^{14}$ Mpc, $R_{\rm halo}$ (in red), and the Solar radius, $R_\odot$ in black.  In the case of the mass, we show contour lines for a solar mass, $M_\odot$ (in black), and a typical mass for dark matter halos $10^{12} \, M_\odot$ , $M_{\rm halo}$ (in red). For the pressure we show lines that represent the pressure of a neutron star $\mathcal{O} (10^{31})$ Pa, $P_{\rm ns}$ (in red), and 1 atmosphere of pressure, $P_{\rm atm}$ (in black). Different line--styles represent the different approximations, straight, dashed, dotted, dash--dotted represent the gaussian, linear--exponential, exponential and cosine, respectively.}}
    \label{fig:eos}
\end{figure}

If we assume that the pressure and gravity allows the BS to remain in equilibrium, then the following constraint to the number of particles is reached $N_e$,
\begin{equation}
	N_e = \frac{\left(2\epsilon_1 + \epsilon_2 \right) }{12\pi \kappa \epsilon_3}\frac{R}{|a|},
\end{equation} \label{eq:scat_len}
where clearly $N$ is several orders of magnitud greater than $\kappa$. The scattering length, whose value can also be negative, should be only constrained from the particle physics model, this is, from Eq.\,\eqref{eq:scat_len} given a value for $a$ we should know the region where systems are not allowed to exist due to equilibrium. Clearly, if $N < N_e$ gravity overcome pressure and we could have an implosion of the system, if $N > N_e$ then pressure overcome gravity and apparently the system becomes unstable. $N_e$ allow us to find the systems that are in equilibrium, and stability condition will be study in a future work, where the rotation of the BS can be also included.

Alternatively to this scenario a phenomenological stability condition has been proposed in Ref.\,\cite{cornell} for a trapped laboratory BEC. For a system with an attractive interaction, there is not enough kinetic energy to stabilize the BEC and it is expected to implode. A BEC can avoid implosion only as long as the number of atoms is less than a critical value given by
\begin{equation}
\label{eq:NC}
N_{c}=\gamma ^{2}\frac{R}{|a|},
\end{equation}
where the parameter $\gamma^{2}$ is the so--called stability coefficient and $R$ the size of the system. The the stability coefficient depends on the properties of the trapping potential, see Ref.\,\cite{cornell} for details. Thus, according to our model  the stability coefficient is in each case

\begin{equation}
	 \gamma^{2} = \frac{\left(2\epsilon_1 + \epsilon_2 \right) }{12\pi \kappa \epsilon_3}.
\end{equation}\label{eq:NC1}
Introducing Eq.\,\eqref{eq:NC} into Eq.\,\eqref{eq:P2}, we notice that the scattering length, $a$, must have positive sign, otherwise both terms in Eq.\,\eqref{eq:P2} are identical but opposite in sign. If $a>0$ the pressure simplifies as follows
\begin{equation}
	P_e =  \frac{\left(2\epsilon_1 + \epsilon_2 \right)^2}{24 \pi^2 \epsilon_3}  \frac{\kappa \hbar^2}{a m_\phi R_e^4},
\end{equation} \label{eq:P3}
where the subindex $e$ means that is evaluated at gravitational equilibrium, $N = N_e$.

To compute the equilibrium number of particles of the system, $N_e$, we still need to solve Eq.\,\eqref{eq:NC} because $R$ is function of the number of particles, $N$. Using $R = \kappa/\beta$ and Eq.\,\eqref{beta000} we have,
\begin{equation}
\label{eq:n_equilibrium}
	 N_e  = \left( \frac{(2\epsilon_1 + \epsilon_2)\hbar^2}{ 12\pi^2 A \epsilon_3  a G m_\phi^3 \alpha }  \right)^{1/2}.
\end{equation}

then, the only free parameter is the scattering length, $a$.

 \begin{table*}[t]
\centering
	\begin{tabular}{c||l|llll}
	& & Gaussian & Exponential & Lin-Exp & Compact \\
	\hline
	\multirow{4}{*}{ Sun--like } & $m_\phi$ [eV] & $ 1.29 \times 10^{-12} $ & $ 5.15 \times 10^{-12} $ & $ 8.51 \times 10^{-12} $ & $ 2.92 \times 10^{-13} $ \\
	& N & $ 5.23 \times 10^{76} $ & $ 2.19 \times 10^{75} $ & $ 4.31 \times 10^{76} $ & $ 3.44 \times 10^{77} $ \\
	& a [m] & $ 9.6 \times 10^{-69} $ & $ 3.96 \times 10^{-67} $ & $ 6.35 \times 10^{-66} $ & $ 2.47 \times 10^{-63} $ \\
	& P [Pa] & $ 3.03 \times 10^{12} $ & $ 1.17 \times 10^{11} $ & $ 2.66 \times 10^{12} $ & $ 2.75 \times 10^{20} $ \\
	\hline
	\multirow{4}{*}{ Dwarf halo } & $m_\phi$ [eV] & $ 1.35 \times 10^{-22} $ & $ 5.37 \times 10^{-22} $ & $ 8.87 \times 10^{-22} $ & $ 3.04 \times 10^{-23} $ \\
	& N & $ 5.02 \times 10^{94} $ & $ 2.1 \times 10^{93} $ & $ 4.14 \times 10^{94} $ & $ 3.3 \times 10^{95} $ \\
	& a [m] & $ 9.21 \times 10^{-75} $ & $ 3.8 \times 10^{-73} $ & $ 6.09 \times 10^{-72} $ & $ 2.37 \times 10^{-69} $ \\
	& P [Pa] & $ 4.22 \times 10^{-20} $ & $ 1.62 \times 10^{-21} $ & $ 3.7 \times 10^{-20} $ & $ 3.83 \times 10^{-12} $ \\
	\hline
	\multirow{4}{*}{ Cluster halo } & $m_\phi$ [eV] & $ 2.01 \times 10^{-26} $ & $ 8.02 \times 10^{-26} $ & $ 1.33 \times 10^{-25} $ & $ 4.54 \times 10^{-27} $ \\
	& N & $ 3.36 \times 10^{104} $ & $ 1.41 \times 10^{103} $ & $ 2.77 \times 10^{104} $ & $ 2.21 \times 10^{105} $ \\
	& a [m] & $ 6.17 \times 10^{-83} $ & $ 2.54 \times 10^{-81} $ & $ 4.08 \times 10^{-80} $ & $ 1.59 \times 10^{-77} $ \\
	& P [Pa] & $ 1.05 \times 10^{-14} $ & $ 4.03 \times 10^{-16} $ & $ 9.17 \times 10^{-15} $ & $ 9.5 \times 10^{-7} $ \\
	\end{tabular}

  \caption{ Values to form a Sun--like or galaxy cluster halo system for the different ans\"atze the gaussian, the exponential, the linear exponential (Lin--Exp) and the compact. $m_\phi$ is the mass of the particle, $N$ is the number of particles, $a$ is the scattering length, and $P$ is the pressure of the system.}
\label{table:2}
\end{table*}

\section{Numerical analysis}
In Fig. \ref{fig:all_gausian}, black lines represent systems in equilibrium, in all the figures we have taken two extreme examples. The dashed line is defined using $a_{\odot}$ is for a system of with a mass ($M_e = M_\odot$) and radius ($R_e = R_\odot$) as the Sun. Dash--dotted lines is for a system defined with the value of $a_h$ to represent a system of the size and mass of a typical cluster of dark matter halo, this is $M_{e} = 10^{14} \; {\rm M_\odot}$ and $R_e = 10^3$ kpc \cite{Newman:2012nv}.

We find interesting that with only one parameter this approach can predict BECs of very different scales, and may be consider a fine--tuning problem to differentiate the value of the scattering length $a$. The larger value for $a$ is give to describe Sun--like systems and the compact hypothesis gives its largest values, which is of the order of $10^{-63}$ m. For each of the hypothesis taken, the values of $a$ is different  depending if one wants to describe a Sun--like, dwarf DM halo, or a cluster DM halo system, see the Appendix \ref{appendix1} in which we show all the cases. It is interesting that, independent of the hypothesis taken, the value of $a_{sun}$ is 14 order of magnitud bigger than the case for the cluster dark matter halo, $a_h$.

Additionally, by using Eqns.\,\eqref{eq:gii}, \eqref{eq:P2}, and \eqref{eq:n_equilibrium} we can find a relation between the pressure, $P$, and the energy density, $\varrho$, to compute the equation of state (EoS) of the type $P  = \omega\varrho$. Thus, we obtain
\begin{equation}\label{eq:w_eos}
 	\omega = \frac{1 + \left( \frac{N}{N_e} \right)^2}{\frac{3(\epsilon_1 + \epsilon_2)}{2\epsilon_1 + \epsilon_2} + \left( \frac{N}{N_e} \right)^2} \;\; .
\end{equation}
When $N \gg N_e$ then $\omega \sim 1$ this may describe systems with properties know as a \textit{stiff matter}, see for instance Ref.\,\cite{chavanis} and references therein for details on this kind of schemes. For systems in equilibrium, Eq.\,\eqref{eq:w_eos} simplifies
\begin{equation}
	\omega =\frac{1 + \frac{2\epsilon_1}{\epsilon_2}}{2\left(  1 + \frac{5\epsilon_1}{4\epsilon_2}  \right)},
\end{equation}
then, for the gaussian and exponential case we have $\epsilon_1/\epsilon_2 = 1$, this is, $\omega = 2/3$ describing an ideal system. For the exponential case $\epsilon_1 / \epsilon_2 = 2/27$ and $\omega = 31/59 \approx 0.53$ and the compact case $\omega \approx 0.63$. Notice that for systems in equilibrium, the equation of state does not depend on any of the variables for the different models, and this also coincide with the fact that the scattering length, $a$, is very small, which reflect the nature of an ideal non--relativistic gas.

Despite the value of $\omega$ in the EoS, the fact that the pressure of the system, Eq.\,\eqref{eq:P3}, depends on $a$ make possible to form halos in equilibrium of a galaxy cluster size with very small pressure, this characteristics resemble the properties of the dark matter. For instance, to form a system with the properties a dark matter halo that soround a galaxy cluster in the gaussian case we would need a scattering length of $a_h = 6.17\times 10^{-83}$ m, a boson particle of mass $m_\phi = 2.01\times10^{-26}$ eV, and $N = 3.36\times10^{104}$ particles, and the BEC would have a pressure of $1.05\times10^{-14}$ Pa, it is the extension of the condensate that makes it plausible to existence of this kind of systems.

To form system with mass and size of the Sun, for instance, we would need $N = 5.23 \times 10^{76}$ particles of mass $m_\phi = 1.29\times 10^{-12}$ eV with an scattering length $a_{sun} = 9.6\times 10^{-69}$ m. This Sun--like systems would have a pressure  of $P_e = 3.03 \times 10^12$ Pa. The shadowed areas In Fig.\,\ref{fig:all_gausian} represent systems with reasonable radii, mass and pressure for an astrophysical system. It is also interesting that systems with very high pressure can be found in this scheme, for instance, systems with $N = 9.3 \times 10^{91}$ particles with mass $m_{\phi} = 8.0\times 10^{-18}$ eV and scattering length $a = 9.6 \times 10^{-84}$ m would have a pressure of $P = 1.5\times 10^{31}$ Pa, which is of the order of the inner crust pressure of a neutron star \cite{1603.02698}. However the approach we are proposing may not be valid to such a high pressures and relativistic corrections may have to be taken into account. Notice also that  when quantum effects are taken into account, the pressure tends to zero at zero temperature for bosons \cite{pathria}. Conversely, the equation of state $P=\varrho_{e}$ in which the pressure is proportional to the energy density $\rho_{e}$ is known in the literature as the so--called \textit{stiff matter}, see for instance Ref.\,\cite{chavanis} and references therein. We must mention that we are able to obtain apparently a \textit{stiff matter} equation of state at $T=0$, even when our BS lies in the non--relativistic and low--density regime. The topics mentioned above deserves more in--depth analysis and will be presented elsewhere \cite{jaja}.

Finally, several previous works \cite{Padilla:2020jdj,Matos:2000ss,Matos:2000ki,Lora:2011yc,RodriguezMontoya:2010zza,Harko:2011zt,Hu:2000ke} have put constrains on the mass of scalar fields  using galaxy rotation curves of dwarf galaxies since it is believe that the kinematic of this kind of systems is dominated by a DM halo. A typical size of the DM halo for a dwarf galaxy is of the order 22 kpc and have a total mass of the order of $10^8 \; {\rm M_\odot}$  \cite{Kravtsov:2012jn, Walker:2009zp}. To form systems with this features we would need a boson particle with a mass of $m_\phi = 1.35 \times 10^{-22}$ eV and a scattering length $a = 9.21 \times 10^{-75}$ m, this is consistent within an order of magnitude with previous results, and it is consistent with the DM as dust hypothesis since the pressure is very small $P = 4.22 \times 10^{-20}$ Pa.

A relevant difference between anzats is the order of magnitude for the pressure of the systems in the compact scenario i.e., the compact ansatz, in which case is up to 9 orders of magnitude bigger than the exponential ansatz for the cluster halo and the Sun--like examples. It is seem to be that this discrepancy in the pressure between the compact and the non--compact ans\"atze relies on the choice for the corresponding BS's radius $R=\beta^{-1}$, i.e., $\kappa=1$ for the compact ansatz, see Eq.\,(\ref{eq:P3}). In other words, the results obtained in the present work agree with previous results reported in Ref.\,\cite{Joshua}, which suggests that the case of the compact ansatz deserves deeper study and should be handled carefully.

\begin{figure}[t]
    \includegraphics[width=0.45\textwidth]{all_togheter_G.pdf}
    \caption{\footnotesize{Contour plots where shaded regions may represent realistic astrophysical systems. Black region represents system of the size between $R_\odot$ and a typical dark matter halo in a galaxy cluster $10^3$ kpc. Red region represent system between a solar mass ($M_\odot$) and the mass of a dark matter halo in a galaxy cluster ($10^{14} \; M_{\odot}$). Blue region represent systems between 1 atmosphere and inner crust neutron star ($10^{31}$ Pa) pressure. Black lines are system in equilibrium given by Eq.\eqref{eq:n_equilibrium}, dashed (dash-dotted) line is taken $a$ for a Sun--like (dark matter halo kind) system. Yellow, green, and black dots represent the Sun, dwarf DM halo, and galaxy cluster dark matter halo system, respectively.}}
    \label{fig:all_gausian}
\end{figure}

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

We have analyzed a collection of non--relativistic gravitational bounded generic bosons forming a Bose--Einstein condensate starting from the single particle properties. We have also proved that the system can form stable structures in several scenarios that can be interpreted as BSs. By using four \textit{ans\"atze}, the Gaussian, Exponential, the Linear exponential (non--compact ansatz), and the Cosine (compact ansatz), we are able to prove that they predict almost the same structural configuration, qualitatively speaking. Additionally,  we have shown that different values of the corresponding scattering length, together with some specific values of the corresponding number of particles, lead to several sizes of BS in gravitational equilibrium. With our model, we can obtain from compact objects (i.e., the size of the sun, for instance) to gigantic configurations comparable to the size of galaxy cluster dark matter halos. In other words, our model predicts several configurations that may be stable and can form systems in gravitational equilibrium in a wide range of sizes.
Notice that we are able to extract also significant properties associated with the BS thermodynamics. For instance, concerning the equation of state, we have calculated the corresponding ground state energy for each ansatz, from which we can obtain the corresponding internal energy and, consequently, the corresponding pressure. We can define two apparent limits according to the definition of the pressure $P=-\partial E_{0}/\partial V_{BS}$. The first one corresponds to the ideal case, i.e., $U_{0}=0$, and the second one at zero temperature. For the first case, we obtain that the equation of state is given by
$P=\frac{2}{3}\frac{E_{0}}{V_{BS}}=\frac{2}{3} \varrho_{e}$. Conversely, at zero temperature (in which we can neglect the contributions of the kinetic energy) the equation of state can be expressed approximately as $P=\frac{E_{0}}{V_{BS}}=\varrho_{e}$.
Let us remark that the aforementioned equations of state are irrespective of the considered ansatz. Notice that $P=\frac{2}{3}\varrho_{e}$ is the standard equation of state for an ideal non--relativistic bosonic system (it can be proved also that this is the equation of state for a system of ideal non--relativistic fermions in the classical regime \cite{pathria}). Additionally, when quantum effects are taken into account, the pressure also tends to zero at zero temperature for bosons \cite{pathria}. Conversely, the equation of state $P=\varrho_{e}$ in which the pressure is proportional to the energy density $\varrho_{e}$ is known in the literature as the so--called \textit{stiff matter}.
We must mention that we are able to obtain apparently a \textit{stiff matter} equation of state at $T=0$, even when our BS lies in the non--relativistic and low--density regime. The topics mentioned above deserves more in--depth analysis and will be presented elsewhere \cite{jaja}.
Finally, the present work must be extended to rotating systems in order to analyze the corresponding stability. Moreover, more general interactions within the system could be also relevant for compact objects, i.e., three--body interactions, and so on. Consequently, logarithmic interactions within a compact non--relativistic BS could be able to describe these scenarios. One more issue related to the BS configurations described in the present work is that they can be useful, in principle, to estimate the quantity of DM in the solar system. The topics mentioned above also deserve more in--depth analysis to study the eventual relation of BSs and DM as BECs of generic bosons in the universe.
\acknowledgments
E.C. acknowledges the receipt of
the grant from the Abdus Salam International Centre for Theoretical Physics, Trieste, Italy. This work was supported also by CONACyT M\'exico under Grant No. 304001.


\section*{Appendix}
\label{appendix: Appendix}
\input{A0_supp}

\end{document}

\section{Introduction}
\label{sec:introduction}

Deep neural networks
usually do not generalize well to domains that are not distributed identically to the training data.
Domain adaptation~\cite{csurka2017domain, wang2018deep} addresses this problem by transferring knowledge from a label-rich source domain to a target domain where labels are scarce or unavailable.
Despite impressive results on commonly used benchmark datasets, domain adaptation algorithms often assume that the source and target domains share the same label space~\cite{ganin2015unsupervised, gretton2012kernel, long2015learning, long2018conditional, long2016unsupervised, shen2017wasserstein, sun2016deep}. However, since large-scale labelled datasets are readily accessible as source domain data, a more realistic scenario is partial domain adaptation (PDA), which assumes that the target label space is a subset of the source label space, that has received increasing research attention recently~\cite{bucci2019tackling, chen2019domain, chen2020selective, hu2019multi, xu2019larger, zhang2018importance}.

Several methods have been proposed to solve partial domain adaptation by reweighting source samples~\cite{bucci2019tackling, chen2019domain, chen2020selective, hu2019multi, xu2019larger, zhang2018importance}.
However, (1) most of the existing methods still suffer from negative transfer due to the presence of outlier source domain classes,
which cripples domain-wise transfer with untransferable knowledge; (2) in absence of labels, they often neglect the class-aware information in the target domain which fails to guarantee the discriminability of the latent space; and (3) given filtering of the outliers, samples from the source and the target domain are not alone sufficient to learn domain invariant features for such a complex problem. As a result, the domain classifier may falsely align unlabeled target samples with samples of a different class in the source domain, leading to inconsistent predictions.

To address the above mentioned challenges, we propose a novel end-to-end \textbf{Select, Label, and Mix (\texttt{\textbf{SLM}}\xspace)} framework for learning discriminative invariant feature representation while preventing negative transfer in partial domain adaptation. Our framework consists of three unique modules working in concert, \textit{i.e.}, select, label and mix, as shown in Figure~\ref{fig:teaser}. First, the select module facilitates the identification of relevant source samples while preventing the negative transfer of untransferrable knowledge. To be specific, our main idea is to learn a model (referred to as the selector network) that outputs the posterior probabilities of all the binary decisions for selecting or discarding each source domain sample before aligning source and target distributions using an adversarial discriminator~\cite{ganin2016domain,long2018conditional}. As these decision functions are discrete and non-differentiable, we rely on a recent Gumbel Softmax sampling approach~\cite{jang2016categorical} to learn the policy jointly with the network parameters through standard back-propagation, without resorting to complex reinforcement learning settings, as in~\cite{chen2019domain, chen2020selective}. Second, we develop an efficient self-labeling strategy that iteratively trains the classifier using both the labeled source domain data and the generated soft pseudo-labels for the target domain to enhance the discriminabilty of the latent space. Finally, the mix module utilizes both intra-domain and inter-domain mixup regularization~\cite{zhang2017mixup} to generate convex combinations of pairs of training samples and their corresponding labels in both domains. Our proposed mix strategy not only helps to explore more intrinsic structures across domains leading to an invariant latent space, but also helps to stabilize the domain discriminator while bridging the distribution shift across domains. In each mini-batch, our unified framework simultaneously eliminates negative transfer by removing outlier source samples and learns discriminative invariant features by labeling and mixing samples respectively for partial domain adaptation.
Experiments on several datasets illustrate the effectiveness of our proposed framework with state-of-the-art performance (e.g., our approach outperforms DRCN~\cite{li2020deep} (TPAMI'20) by 18.91\% on the challenging VisDA-2017~\cite{peng2017visda} benchmark).
To summarize, our key contributions include:

\begin{itemize}
\setlength{\itemsep}{-1pt}
    \item We propose a novel Select, Label, and Mix (\texttt{\textbf{SLM}}\xspace) framework for learning discriminative and invariant feature representation while preventing intrinsic negative transfer in partial domain adaptation.
    \item We develop a simple and efficient source sample selection strategy where the selector network is jointly trained with the domain adaptation model using backpropagation through Gumbel Softmax sampling.
    \item We conduct extensive experiments on several PDA benchmark datasets, including Office31~\cite{saenko2010adapting}, Office-Home~\cite{venkateswara2017deep}, ImageNet-Caltech, and VisDA-2017~\cite{peng2017visda} to demonstrate the superiority of our proposed approach over state-of-the-art methods.
\end{itemize}

\section{Related Work}
\label{sec:relatedwork}

\noindent\textbf{Unsupervised Domain Adaptation.} Unsupervised domain adaptation which aims to leverage labeled source domain data to learn to classify unlabeled target domain data has been studied from multiple perspectives (see reviews~\cite{csurka2017domain, wang2018deep}). Various strategies have been developed, including methods for reducing the cross-domain divergence~\cite{gretton2012kernel, long2015learning, shen2017wasserstein, sun2016deep}, adding domain discriminators for adversarial training~\cite{chen2019joint, ganin2015unsupervised, ganin2016domain, long2015learning, long2018conditional, long2016unsupervised, pei2018multi, tzeng2017adversarial}, and image-to-image translation techniques~\cite{hoffman2018cycada,hu2018duplex,murez2018image}. Despite remarkable progress, UDA methods assume that label spaces across source and target domains are identical unlike the practical problem we consider in this work.

\vspace{1mm}
\noindent\textbf{Partial Domain Adaptation.}
Representative PDA methods train domain discriminators~\cite{cao2018partialsan, cao2018partialpada, zhang2018importance} with weighting, or use residual correction blocks~\cite{li2020deep}, or weight source examples based on their similarities to target domain~\cite{cao2019learning}. Most relevant to our approach is the work in~\cite{chen2019domain, chen2020selective} which uses Reinforcement Learning (RL) for source data selection in partial domain adaptation. RL policy gradients are
often complex, unwieldy to train and require techniques to reduce variance during training.
By contrast, our approach utilizes a gradient based optimization for relevant source sample selection which is extremely fast and computationally efficient.
Moreover, while prior PDA methods try to reweigh source samples in some form or other, they often do not take class-aware information in target domain into consideration. Our approach instead, ensures discriminability and invariance of the latent space by considering both pseudo-labeling and cross-domain mixup with sample selection in an unified framework for partial domain adaptation.

\vspace{1mm}
\noindent\textbf{Self-training with Pseudo-Labels.} Deep self-training methods that focus on iteratively training the model by using both labeled source data and generated target pseudo-labels have been proposed for aligning both domains~\cite{inoue2018cross, mei2020instance, saito2017asymmetric, zhang2020label}. While majority of the methods directly choose hard pseudo-labels with high prediction confidence, the works in~\cite{zou2019confidence,zou2018unsupervised} use class-balanced confidence regularizers to generate soft pseudo-labels for unsupervised domain adaptation that share same label space across domains. Our work on the other hand iteratively utilizes soft pseudo-labels within a batch by smoothing one-hot pseudo-label to a conservative target distribution for partial domain adaptation.

\vspace{1mm}
\noindent\textbf{Mixup Regularization.} Mixup regularization~\cite{zhang2017mixup} or its variants~\cite{berthelot2019mixmatch, verma2019manifold} that train models on virtual examples constructed as convex combinations of pairs of inputs and labels are recently used in many computer vision tasks to improve the generalization of neural networks. A few very recent methods apply Mixup, but mainly for UDA to stabilize the domain discriminator~\cite{wu2020dual, xu2019adversarial, yan2020improve} or to smoothen the predictions~\cite{mao2019virtual}. Our proposed SLM strategy can be regarded as an extension of this line of research by introducing both intra-domain and inter-domain mixup not only to stabilize the discriminator but also to guide the classifier in enriching the intrinsic structure of the latent space to solve the more challenging partial domain adaptation task.

\section{Proposed Method}
\label{sec:proposedmethod}

Partial domain adaptation aims to mitigate the domain shift and generalize the model to an unlabelled target domain with a label space which is a subset of that of the labelled source domain. Formally, given a set of labelled source domain samples $\mathcal{D}_{source}\!=\!\{(\textbf{x}_{i}^{s}, y_{i})\}_{i=1}^{N_{S}}$ and unlabelled target domain samples $\mathcal{D}_{target}\!=\!\{\textbf{x}_{i}^{t}\}_{i=1}^{N_{T}}$, with label spaces $\mathcal{L}_{source}$ and $\mathcal{L}_{target}$, respectively, where $\mathcal{L}_{source}\!\subsetneq\!\mathcal{L}_{target}$. Let $p$ and $q$ represent the probability distribution of data in source and target domain respectively. In case of PDA, we further have $p\!\neq\!q$ and $p_{\mathcal{L}_{target}}\!\neq\!q$, where $p_{\mathcal{L}_{target}}$ is the distribution of source domain data in $\mathcal{L}_{target}$. Our goal is to develop an approach with the above given data to improve the performance of a model on $\mathcal{D}_{target}$.

\subsection{Approach Overview}
Figure~\ref{fig:main_figure} illustrates an overview of our proposed approach. Our framework consists of a feature extractor $\mathcal{G}$, a classifier network $\mathcal{F}$, a domain discriminator $\mathcal{D}$ and a selector network $\mathcal{H}$. Our goal is to improve the classification performance of the combined network $\mathcal{F(G(.))}$ on $\mathcal{D}_{target}$. While the feature extractor $\mathcal{G}$ maps the images to a common latent space, the task of the classifier $\mathcal{F}$ is to output a probability distribution over the classes for a given feature from $\mathcal{G}$. Given a feature from $\mathcal{G}$, the discriminator $\mathcal{D}$ helps in minimizing the domain discrepancy by identifying the domain (either source or target) to which it belongs. The selector network $\mathcal{H}$ helps in reducing negative transfer by identifying outlier source samples from $\mathcal{D}_{source}$. On the other hand, label module utilizes the predictions of $\mathcal{F(G(.))}$ to obtain the soft pseudo-labels for the target domain samples. Finally, the mix module leverages both pseudo-labeled target samples and source samples to generate augmented images for achieving a domain invariance in the latent space. During training, for a mini-batch of images, all the components are trained jointly in an iterative manner and during testing, we evaluate the performance using classification accuracy of the network $\mathcal{F(G(.))}$ on target domain data $\mathcal{D}_{target}$.

\subsection{Select, Label, and Mix Framework} Our approach adopts three unique modules namely Select, Label and Mix in a unified framework for learning discriminative invariant feature representation while eliminating negative transfer in partial domain adaptation.
The individual modules are discussed below.

\vspace{1mm}
\noindent\textbf{Select Module.}
This module aims to identify and get rid of the outlier class samples in the source domain to minimize negative transfer in partial domain adaptation. Instead of using different heuristically designed criteria for weighting source samples, we develop a novel selector network $\mathcal{H}$, that takes images from the source domain as input and decides the relevant source samples to align with the target samples.
Specifically, the selector network $\mathcal{H}$ performs robust selection by providing a discrete output of either a 0 (discard) or 1 (select) for each source sample, \textit{i.e.}, $\mathcal{H}: \mathcal{D}_{source}\!\rightarrow\!\{0, 1\}$.
However,  the fact that the decision policy is discrete makes the network non-differentiable and therefore difficult to optimize via standard backpropagation.
To resolve the non-differentiability and enable gradient descent optimization for the selector, we adopt Gumbel-Softmax distribution~\cite{jang2016categorical, maddison2016concrete} that uses the Gumbel-Max trick with softmax as a continuous relaxation to $arg max$. For a binary decision space, as in our case (select or discard), the formulation is as follows:
\begin{align}
    \mathcal{Y}_{i} = \frac{\exp((\log\alpha_{i}\! +\! G_{i})/\tau)}{\sum_{j\in\{0, 1\}} \exp((\log\alpha_{j}\! +\! G_{j})/\tau)} \quad \textnormal{for } i\! \in\!\{0, 1\}
    \label{eq:gumbel_softmax}
\end{align}
where $G_{i}$'s are i.i.d samples from standard Gumbel distribution $Gumbel(0, 1) = -log(-log(U))$, where $U\sim\text{Uniform}[0,1]$,
$\alpha_{0}$ and $\alpha_{1}$ are output probability of the selector network for a sample to be selected and discarded respectively. $\tau$ denotes temperature of the softmax. Clearly, when $\tau>$ 0, the Gumbel-Softmax distribution is smooth and hence gradients can be computed with respect to  logits $\alpha_{i}$'s to train the selector network using backpropagation. As $\tau$ approaches 0, the decision $\mathcal{Y}_{i}$ becomes one-hot and discrete.
Note that to avoid any interference from the backbone feature extractor $\mathcal{G}$, we use a separate feature extractor for the select module, while making these decisions.

For a given batch of source domain images $\mathcal{D}_{source}^{b}$ and target domain images $\mathcal{D}_{target}^{b}$, of size $b$, the selector results in two subsets of source samples $\mathcal{D}_{sel}^{b}\! =\! \{ x\! \in\! \mathcal{D}_{source}^{b}\! :\! \mathcal{H}(x)\! =\! 1\}$ and $\mathcal{D}_{dis}^{b}\! =\! \{ x\! \in\! \mathcal{D}_{source}^{b}\! :\! \mathcal{H}(x)\! =\! 0\}$. For training the selector, we propose a triplet loss $\mathcal{L}_{select}$ that tries to bring $\mathcal{D}_{sel}^{b}$ \& $\mathcal{D}_{target}^{b}$ closer while pushing apart $\mathcal{D}_{dis}^{b}$ \& $\mathcal{D}_{target}^{b}$ in the latent feature space of $\mathcal{G}$ as follows:
\begin{align}
    d_{sel} &= d_{H}(\mathcal{G}(\mathcal{D}_{sel}^{b}), \mathcal{G}(\mathcal{D}_{target}^{b})) \nonumber \\
    d_{dis} &= d_{H}(\mathcal{G}(\mathcal{D}_{dis}^{b}), \mathcal{G}(\mathcal{D}_{target}^{b})) \nonumber \\
    \mathcal{L}_{select} &= \lambda_{s}max(d_{sel} - d_{dis} + margin, 0) + \mathcal{L}_{reg}
    \label{eq:loss_select}
\end{align}
where $d_{H}(X, Y)$ represents the average Hausdorff distance between set of features $X$ and $Y$. $\mathcal{L}_{reg} = \lambda_{reg1}\sum_{x\in\mathcal{D}_{source}^{b}} \mathcal{H}(x)\log(\mathcal{H}(x)) + \lambda_{reg2}\{\sum_{\hat{p}}l_{ent}(\hat{p}) - l_{ent}(\hat{p}_{m})\}$, with $l_{ent}$ being the entropy loss, $\hat{p}$ is the Softmax prediction of $\mathcal{F(G(D}_{target}))$ and $\hat{p}_{m}$ is mean prediction of output $\hat{p}$. $\mathcal{L}_{reg}$ is a regularization to restrict $\mathcal{H}$ from producing trivial all-0 or all-1 outputs as well as ensuring confident and diverse predictions by $\mathcal{F(G(.))}$ for $\mathcal{D}_{target}$. During forward pass, we obtain discrete decisions for source images to discard the outliers, and during backward pass, we learn the parameters of selector network using Gumbel-Softmax while jointly training it with other components.

\vspace{1mm}
\noindent\textbf{Label Module.} While our select module helps in removing source domain outliers, it fails to guarantee the discriminability of the latent space due to the absence of class-aware information in the target domain. Specifically, given our main objective is to improve the classification performance on target domain samples, it becomes essential for the classifier to learn confident decision boundaries in the latent feature space. To this end, we propose a label module that provides additional self-supervision for target domain samples. Motivated by the effectiveness of confidence guided self-training~\cite{zou2019confidence}, we generate soft pseudo-labels for the target domain samples that efficiently attenuates the unwanted deviations caused by false and noisy one-hot pseudo-labels. For a target domain sample $\textbf{x}_{k}^{t} \in \mathcal{D}_{target}$, the soft-pseudo-label $\hat{y}_{k}^{t}$ is computed as follows:
\begin{align}
    \hat{y}_{k}^{t(i)} = \frac{p(i|\textbf{x}_{i}^{t})^{\frac{1}{\alpha}}}{\sum_{j=1}^{|\mathcal{L}_{source}|}p(j|\textbf{x}_{i}^{t})^{\frac{1}{\alpha}}}
    \label{eq:soft_pseudo_label}
\end{align}
where $p(j|\textbf{x}_{i}^{t}) = \mathcal{F(G(}\textbf{x}_{i}^{t}))^{(j)}$ is the softmax probability of the classifier for class $j$ given $\textbf{x}_{i}^{t}$ as input, and $\alpha$ is a hyper-parameter that controls the softness of the label.
The soft pseudo-label $\hat{y}_{i}^{t}$ is then used to compute the loss $\mathcal{L}_{label}$ for a given batch of target samples $\mathcal{D}_{target}^{b}$ as follows:
\begin{align}
    \mathcal{L}_{label} = \mathbb{E}_{\textbf{x}_{i}^{t} \in \mathcal{D}_{target}^{b}} l_{ce}(\mathcal{F(G(}\textbf{x}_{i}^{t})), \hat{y}_{i}^{t})
    \label{eq:loss_label}
\end{align}
where $l_{ce}(.)$ represents the cross-entropy loss.

\vspace{1mm}
\noindent\textbf{Mix Module.}
Learning a domain-invariant latent space is crucial for effective adaptation of a classifier from source to target domain. However, with limited samples per batch and after discarding the outlier samples, it becomes even more challenging in preventing over-fitting and learning domain invariant representation in partial domain adaptation. To mitigate this problem, we apply MixUp~\cite{zhang2017mixup} on the relevant source samples and the target samples for discovering ingrained structures in establishing domain invariance. Given $\mathcal{D}_{sel}^{b}$ from the select module and $\mathcal{D}_{target}^{b}$ with corresponding labels $\hat{y}^{t}$ from the label module, we perform convex combinations of the images belonging to these two sets on pixel-level in three different ways namely, inter-domain, intra-source domain and intra-target domain to obtain the following sets of augmented data:
\begin{align}
    \mathcal{D}_{inter\_mix}^{b} = \{(\lambda\textbf{x}_{i}^{s} + (1\!-\!\lambda)\textbf{x}_{j}^{t}, \lambda y_{i} + (1\!-\!\lambda)\hat{y}_{j}^{t})\} \nonumber\\
    \mathcal{D}_{intra\_mix\_s}^{b} = \{(\lambda\textbf{x}_{i}^{s} + (1\!-\!\lambda)\textbf{x}_{j}^{s}, \lambda y_{i} + (1\!-\!\lambda)y_{j})\} \nonumber\\
    \mathcal{D}_{intra\_mix\_t}^{b} = \{(\lambda\textbf{x}_{i}^{t} + (1\!-\!\lambda)\textbf{x}_{j}^{t}, \lambda\hat{y}_{i}^{t} + (1\!-\!\lambda)\hat{y}_{j}^{t})\} \nonumber\\
    \mathcal{D}_{mix}^{b} = \mathcal{D}_{inter\_mix}^{b} \cup \mathcal{D}_{intra\_mix\_s}^{b} \cup \mathcal{D}_{intra\_mix\_t}^{b}
    \label{eq:mixed_data}
\end{align}
where $(\textbf{x}_{i/j}^{s}, y_{i/j}) \in \mathcal{D}_{sel}^{b}$, while $\textbf{x}_{i/j}^{t} \in \mathcal{D}_{target}^{b}$ with  $\hat{y}_{i/j}^{t}$ being the corresponding soft-pseudo-labels. $\lambda$ is the mix-ratio randomly sampled from a beta distribution $Beta(\alpha, \alpha)$ for $\alpha \in (0, \infty)$. We use $\alpha=2.0$ in all our experiments.
We utilize the new augmented images in training both the classifier $\mathcal{F}$ and the domain discriminator $\mathcal{D}$ as follows:
\begin{align}
    \mathcal{L}_{mix\_cls} &= \mathbb{E}_{(\textbf{x}_{i}, y_{i}) \in \mathcal{D}_{mix}^{b}} l_{ce}(\mathcal{F(G(}\textbf{x}_{i})), y_{i}) \nonumber\\
    \mathcal{L}_{mix\_dom} &= \mathbb{E}_{\textbf{x}_{i} \sim \mathcal{D}_{inter\_mix}^{b}} \{\lambda\log(\mathcal{D(G(}\textbf{x}_{i}))) \nonumber\\
    &+ (1\!-\!\lambda)\log(1\!-\!\mathcal{D(G(}\textbf{x}_{i})))\} \nonumber\\
    &+ \mathbb{E}_{\textbf{x}_{i} \sim \mathcal{D}_{intra\_mix\_s}^{b}} \log(\mathcal{D(G(}\textbf{x}_{i}))) \nonumber\\
    &+ \mathbb{E}_{\textbf{x}_{i} \sim \mathcal{D}_{intra\_mix\_t}^{b}} \log(1\!-\!\mathcal{D(G(}\textbf{x}_{i}))) \nonumber\\
    \mathcal{L}_{mix} &= \mathcal{L}_{mix\_cls} + \mathcal{L}_{mix\_dom}
    \label{eq:loss_mix}
\end{align}
where $\mathcal{L}_{mix\_cls}$ and $\mathcal{L}_{mix\_dom}$ represent loss for classifier and domain discriminator respectively. Our mix strategy with the combined loss $\mathcal{L}_{mix}$ not only helps to explore more intrinsic structures across domains leading to an invariant latent space, but also helps to stabilize the domain discriminator while bridging the distribution shift across domains.

\subsection{Optimization}
Besides the above three unique modules that are tailored for PDA, we use the standard supervised loss on the labeled source data and domain adversarial loss as follows:
\begin{align}
    \mathcal{L}_{sup} &= \mathbb{E}_{(\textbf{x}_{i}, y_{i}) \in \mathcal{D}_{sel}^{b}} l_{ce}(\mathcal{F(G(}\textbf{x}_{i})), y_{i})\nonumber\\
    \mathcal{L}_{adv} &= \mathbb{E}_{\textbf{x}^{s} \sim \mathcal{D}_{sel}^{b}} w^{s}\log(\mathcal{D(G(}\textbf{x}^{s}))) \nonumber\\
    &+ \mathbb{E}_{\textbf{x}^{t} \sim \mathcal{D}_{target}^{b}} w^{t}\log(1\!-\!\mathcal{D(G(}\textbf{x}^{t})))
    \label{eq:loss_standard}
\end{align}
where $\mathcal{L}_{adv}$ is standard entropy-conditioned domain adversarial loss with weights  $w^{s}$ and $w^{t}$ for source and target domain respectively~\cite{long2018conditional}. The overall loss $\mathcal{L}_{total}$ is
\begin{align}
    \mathcal{L}_{total} = \mathcal{L}_{sup} + \mathcal{L}_{adv} + \mathcal{L}_{select} + \mathcal{L}_{label} + \mathcal{L}_{mix}
    \label{eq:loss_total}
\end{align}
where $\mathcal{L}_{select}$, $\mathcal{L}_{label}$, and $\mathcal{L}_{mix}$ are given by Equations (\ref{eq:loss_select}), (\ref{eq:loss_label}), and (\ref{eq:loss_mix}) respectively. We integrate all the modules into one framework, as shown in the Figure~\ref{fig:main_figure} and train the network jointly for partial domain adaptation.

\section{Experiments}
\label{sec:experiments}

We conduct extensive experiments to show that our \texttt{\textbf{SLM}}\xspace framework outperforms many competing approaches to achieve the new state-of-the-art on several PDA benchmark datasets. We also perform comprehensive ablation experiments and feature visualizations to verify the effectiveness of different components in detail.

\subsection{Experimental Setup}

\noindent\textbf{Datasets.} We evaluate the performance of our approach using several standard domain adaptation datasets under PDA setting, namely Office31~\cite{saenko2010adapting}, Office-Home~\cite{venkateswara2017deep} ImageNet-Caltech and VisDA-2017~\cite{peng2017visda}.
Office31 contains 4,110 images of 31 classes from three distinct domains, namely Amazon (A), Webcam (W) and DSLR (D). We follow the setting in~\cite{chen2020selective,li2020deep} and select 10 classes shared by Office31 and Caltech256~\cite{griffin2007caltech} as target categories. Office-Home is a challenging dataset that contains images of everyday objects from four domains: Artistic images (Ar), Clipart images (Cl), Product images (Pr) and Real-World images (Rw). We follow~\cite{chen2020selective} to select the first 25 categories (in alphabetic order) in each domain as the target classes.
ImageNet-Caltech is another challenging dataset that consists of two subsets, ImageNet1K (I)~\cite{russakovsky2015imagenet} and Caltech256 (C)~\cite{griffin2007caltech}. While source domain contains 1,000 and 256 classes for ImageNet and Caltech respectively, each target domain contains only 84 classes that are common across both domains.
VisDA-2017 is a large-scale dataset with 12 categories across 2 domains: one consists photo-realistic images or real images (R) and the other comprises of synthetic 2D renderings of 3D models (S). Following~\cite{li2020deep}, we select the first 6 categories (in alphabetical order) in each of the domain as the target categories.

\vspace{1mm}
\noindent\textbf{Baselines.} We compare our approach with several methods that fall into two main categories: (1) popular unsupervised domain adaptation methods like DAN~\cite{long2015learning}, DANN~\cite{ganin2016domain}, and CORAL~\cite{sun2016deep}, (2) existing partial domain adaptation methods including PADA~\cite{cao2018partialpada}, SAN~\cite{cao2018partialsan}, ETN~\cite{cao2019learning}, and DRCN~\cite{li2020deep}. We also compare with the recent state-of-the-art method, RTNet~\cite{chen2020selective} (CVPR'20) that uses reinforcement learning for source dataset selection in partial domain adaptation. We directly quote the numbers reported in published papers~\cite{chen2020selective,li2020deep} and use the same backbone network in our approach to make a fair comparison with different baselines.

\vspace{1mm}
\noindent\textbf{Implementation Details.}
We use ResNet-50~\cite{he2016deep} as the backbone network for the feature extractor while we use ResNet-18 for the selector network, initialized with ImageNet~\cite{russakovsky2015imagenet} pretrained weights.
In Eqn.~\ref{eq:loss_select} we set $\lambda_{s}, \lambda_{reg1}$ and $\lambda_{reg2}$ as $0.01, 10.0$ and $0.1$, respectively. We use gradient reversal layer (GRL) for adversarially training the discriminator. We set $\tau=1.0$ in Eqn.~\ref{eq:gumbel_softmax}, $\alpha=0.1$ in Eqn.~\ref{eq:soft_pseudo_label}, and $\lambda=0.0$ for the GRL as initial values and gradually anneal $\tau$ and $\alpha$ down to 0 while increase $\lambda$ to 1.0 during the training, as in~\cite{jang2016categorical}. We set a threshold of $0.3$ while obtaining the soft pseudo-labels for all the datasets except for the case when ImageNet was used as the source domain where we did not use any threshold value. Additionally, we use label-smoothing for all the losses for the feature extractor involving source domain images as in~\cite{liang2020we, muller2019does}, with $\epsilon\!=\!0.2$.
We use SGD for optimization with momentum=0.9 while a weight decay of 1e-3 and 5e-4 for the selector network and the other networks respectively. We use an initial learning rate of 5e-3 for the selector and the classifier, while 5e-4 for the rest of the networks and decay it following a cosine annealing strategy. A batch size of 64 is used for all datasets except ImageNet-Caltech for which a batch size of 128 is used. We report average classification accuracy and standard deviation over 3 random trials. More implementation details are included in Appendix and we will make our source codes publicly available at \url{https://github.com/CVIR/Select-Label-Mix-SLM-PDA}.

\input{tables/OfficeHome}

\subsection{Results and Analysis}

Table~\ref{table:cls-office-31} shows the results of our method and other competing approaches on Office31 dataset. We have the following key observations.
(1) As expected, the popular UDA methods fail to outperform the simple no adaptation model (ResNet-50), which implies that they suffer from negative transfer due to the presence of outlier source samples.
(2) Overall, our \texttt{\textbf{SLM}}\xspace framework outperforms all the existing PDA methods by achieving the best results on \textbf{5 out of 6} transfer tasks. Among PDA methods, $\text{RTNet}_{adv}$~\cite{chen2020selective} is the most competitive.
However, the gap is still significant (96.9\% vs 98.3\%) due to our two novel components working in concert with the removal of outliers: enhancing discriminability of the latent space via iterative pseudo-labeling of target domain samples and learning domain-invariance through mixup regularizations.
(3) Our approach performed remarkably well on transfer tasks from a large source domain to small target domains, e.g., on A $\!\rightarrow\!$ W, \texttt{\textbf{SLM}}\xspace outperforms $\text{RTNet}_{adv}$ by \textbf{3.5\%}.
Likewise, our approach obtains \textbf{3.8\%} improvement over $\text{RTNet}_{adv}$ on D $\!\rightarrow\!$ A task where the source domain is very small compared to the target domain. These results well demonstrate that our method improves the generalization ability of the source classifier in the target domain while reducing the negative transfer.

On the challenging Office-Home dataset, our proposed approach significantly outperforms all the compared methods to obtain the best performance of 75.3\% which is about \textbf{3\%} more than the previous state-of-the-art performance on this dataset (Table~\ref{table:cls-office-home}).
Our method obtains the best on \textbf{9 out of 12} transfer tasks.
Table~\ref{table:image} summarizes the results of different baselines on ImageNet-Caltech and VisDA-2017 datasets. Our approach achieves new state-of-the-art result, outperforming the next competitive method by a margin of about \textbf{2.8\%} and \textbf{18.9\%} on ImageNet-Caltech and VisDA-2017 datasets respectively. Especially for task S $\rightarrow$ R on VisDA-2017, our approach significantly outperforms SAFN~\cite{xu2019larger} and DRCN~\cite{li2020deep} by an increase of \textbf{24.1\%} and \textbf{33.5\%} respectively. Note that on the most challenging VisDA-2017 dataset, our approach is still able to distill more positive knowledge from the synthetic to the real domain despite significant domain gap across them. In summary, our \texttt{\textbf{SLM}}\xspace framework clearly outperforms the existing PDA methods on all four datasets, showing the effectiveness of our approach in not only identifying the most relevant source classes but also learning more transferable features for partial domain adaptation.

\input{tables/ImageNetCaltech_VisDA17}

\input{tables/OfficeHome_Ablation}

\subsection{Ablation Studies} We perform the following experiments to test the effectiveness of the proposed modules including the effect of number of target classes on different datasets.

\vspace{1mm}
\noindent\textbf{Effectiveness of Individual Modules.} We conduct experiments to investigate the importance of our three unique modules on Office-Home dataset.
As seen from Table~\ref{table:cls-office-home-ablation}, while the Select only module improves the vanilla performance by 8\%, addition of Label and Mix modules progressively improves the result to obtain the best performance of 75.29\% on Office-Home dataset. This
corroborates the fact that both discriminability and invariance of the latent space plays a crucial role in partial domain adaptation in addition to the removal of source domain outlier samples.

\vspace{1mm}
\noindent\textbf{Comparison with Varying Number of Target Classes.} We compare different methods by varying the number of target classes. Figure~\ref{fig:var_tgt_cls} shows that our \texttt{\textbf{SLM}}\xspace framework consistently obtains the best results indicating its advantage in alleviating negative transfer by removing outlier source samples. Moreover, our approach outperforms all the compared methods even in the case of completely shared space (A31 $\rightarrow$ W31), which shows that it does not discard relevant samples incorrectly when there are no outlier classes.

\vspace{1mm}
\noindent\textbf{Effectiveness of Hausdorff Distance.} We investigate the effect of Hausdorff distance (Eqn.~\ref{eq:loss_select}) in training the selector network and find that by removing it from the total loss lowers down the performance from 75.29\% to 73.67\% on Office-Home dataset, showing its importance in guiding the selector network to discard the outlier source samples for effective reduction in negative transfer.

\input{figures/tSNEPlot}
\input{figures/PlotVaryTargetClass}

\vspace{1mm}
\noindent\textbf{Distance between Domains.} Following~\cite{chen2020selective}, we compute the Wasserstein distance between the probability distribution of the target samples (T) with that of the selected ($\text{S}_{sel}$) and discarded samples ($\text{S}_{dis}$) by the selector network. Table~\ref{table:wasser} shows that $\texttt{dist} (\text{S}_{sel}, \text{T})$ is smaller than $\texttt{dist} (\text{S}_{all}, \text{T})$, while $\texttt{dist} (\text{S}_{dis}, \text{T})$ is greater than $\texttt{dist} (\text{S}_{all}, \text{T})$ on two randomly sampled adaptation tasks from Office31 and Office-Home datasets. This results indicate that the samples selected by our selector network is closer to the target domain while  the discarded samples are very dissimilar to the target domain.

\vspace{1mm}
\noindent\textbf{Effectiveness of Soft Pseudo-Labels.} We also test the effectiveness of soft pseudo-labels by replacing them with hard pseudo-labels for the target samples and observe that hard pseudo-labels decreases the average performance from 75.29\% to 71.96\% on Office-Home dataset. This confirms that soft pseudo-labels are critical for good performance as it efficiently attenuates the unwanted deviations caused by the false and noisy hard pseudo-labels.

\vspace{1mm}
\noindent\textbf{Effectiveness of Different Mixup.} We examine the effect of mixup regularization on both domain discriminator and classifier on Office-Home dataset. With mixup regularizations working for both discriminator and classifier, the average performance on Office-Home dataset is 75.29\%. By removing mixup regularization from the training of domain discriminator, the performance decreases to 73.58\%. Similarly, by removing mixup regularization from the classifier training, the average performance becomes 73.85\%. This corroborates the fact that our Mix strategy not only helps to explore intrinsic structures across domains, but also helps to stabilize the domain discriminator.

\subsection{Feature Visualizations}

We use t-SNE~\cite{maaten2008visualizing} to visualize the features learned using different components of our \texttt{\textbf{SLM}}\xspace framework. We choose an UDA setup (similar to DANN~\cite{ganin2016domain}) as a vanilla method and add different modules one-by-one to visualize the contribution of each of the modules in learning discriminative features for partial domain adaptation. As can be seen from Figure~\ref{fig:tsne}, the feature space for the vanilla setup lacks dicriminability for both source and target features. The discriminability improves for both source as well as the target features as we add ``Select" and ``Label" to the Vanilla setup. The best results are obtained when all the three modules ``Select", ``Label" and ``Mix" i.e.~\texttt{\textbf{SLM}}\xspace are added and trained jointly in an end-to-end manner.

Additional results, discussions and more visualization are included in the Appendix.

\input{tables/WassersteinDistance}

\section{Conclusion}
\label{sec:conclusions}

In this paper, we propose an end-to-end framework for learning discriminative invariant feature representation while preventing negative transfer in partial domain adaptation. While our select module facilitates the identification of relevant source samples for adaptation, the label module enhances the discriminability of the latent space by utilizing pseudo-labels for the target domain samples. The mix module uses mixup regularizations jointly with the other two strategies to enforce domain invariance in latent space.
We demonstrate the effectiveness of our approach on four standard datasets, outperforming several competing methods.
\section{Appendix Overview}

\input{A1_dataset}

\input{A2_implementation}

\input{A3_experiments}

\input{A4_qualitative}

\section{Dataset Details}
We evaluate the performance of our approach on several benchmark datasets for partial domain adaptation, namely Office31~\cite{saenko2010adapting}, Office-Home~\cite{venkateswara2017deep}, ImageNet-Caltech and VisDA-2017~\cite{peng2017visda}. The following are the detailed descriptions of the above datasets: \\

\vspace{-3mm}
\noindent \textbf{Office31.} This dataset contains 4,110 images distributed among 31 different classes and collected from three different domains: Amazon (A), Webcam (W) and DSLR (D), resulting in 6 transfer tasks. The dataset is imbalanced across domains with 2,817 images belonging to Amazon, 795 images to Webcam, and 498 images to DSLR, making Amazon a larger domain as compared to Webcam and DSLR. For all our experiments, we select the 10 classes shared by Office31 and Caltech256~\cite{griffin2007caltech} as the target categories and obtain the following label spaces: \\
$\mathcal{L}_{source} = \{0, 1, 2, ... , 30\}$.\\
$\mathcal{L}_{target} = \{0, 1, 5, 10, 11, 12, 15, 16, 17, 22\}$.\\
Number of Outlier Classes = $21$.\\
Figure~\ref{fig:office-31-gallery} shows few randomly sampled images from this dataset. The dataset is publicly available to download at: \url{https://people.eecs.berkeley.edu/~jhoffman/domainadapt/#datasets_code}.

\input{figures/Office31Gallery}

\vspace{2mm}
\noindent \textbf{Office-Home.} This dataset contains 15,588 images distributed among 65 different classes and collected from four different domains: Art (Ar), Clipart (Cl), Product (Pr), and RealWorld (Rw), resulting in 12 transfer tasks. The dataset is split across domains with 2427 images belonging to Art, 4365 images to Clipart, 4439 images to Product, and 4347 images to RealWorld. We select the first 25 categories (in alphabetic order) in each domain as the target classes and obtain the following label spaces:\\
$\mathcal{L}_{source} = \{0, 1, 2, ... , 64\}$.\\
$\mathcal{L}_{target} = \{0, 1, 2, ... , 24\}$.\\
Number of Outlier Classes = $40$.\\
Figure~\ref{fig:office-home-gallery} displays a gallery of sample images for this dataset. The dataset is publicly available to download at: \url{http://hemanthdv.org/OfficeHome-Dataset/}. \\

\input{figures/OfficeHomeGallery}

\vspace{2mm}
\noindent
\textbf{ImageNet-Caltech.} This large-scale dataset consists of two datasets (ImageNet1K~\cite{russakovsky2015imagenet} (I) \& Caltech256~\cite{griffin2007caltech} (C)) as two separate domains and consist of over 14 million images combined. 2 transfer tasks are formed for this dataset. While source domain contains 1,000 and 256 classes for ImageNet and Caltech respectively, each target domain contains only 84 classes that are common across both domains. As it is a general practice to use ImageNet pretrained weights for network initialization, we use the validation set images when using ImageNet as the target domain.
\noindent
Number of Outlier Classes = $172$ for C$\rightarrow$I, $916$ for I$\rightarrow$C.
Figure~\ref{fig:imagenet-caltech-gallery} displays a gallery of sample images for this dataset. The datasets are publicly available to download at: \url{http://www.image-net.org/} \\ \url{http://www.vision.caltech.edu/Image_Datasets/Caltech256/}.

\input{figures/ImageNetCaltechGallery}

\vspace{2mm}
\noindent
\textbf{VisDA-2017.} This dataset contains 280,157 images distributed among 12 different classes and two domains. The dataset contains three sets of images: training, validation and testing. The training set contains 152,397 synthetic (S) images, the validation set contains 55,388 real-world (R) images, while the test set contains 72,372 real-world images. For the experiments, the training set is considered as the Synthetic (S) domain, while the validation set as the Real (R) domain, following~\cite{li2020deep}. This results in 2 transfer tasks. The first 6 categories (in alphabetical order) are selected in each of the domains as the target classes, and the following label spaces are obtained: \\
$\mathcal{L}_{source} = \{0, 1, 2, ... , 11\}$.\\
$\mathcal{L}_{target} = \{0, 1, 2, ... , 5\}$.\\
Number of Outlier Classes = $6$.\\
Figure~\ref{fig:visda-gallery} displays a gallery of sample images for this dataset. The dataset is publicly available to download at:\\ \url{http://ai.bu.edu/visda-2017/#download}.

\input{figures/VisDAGallery}
\section{Implementation Details}
Following are the detailed description of the implementation we follow for various components of the framework:

\vspace{1mm}
\noindent
\textbf{Feature Extractor ($\mathcal{G}$).} We use ResNet-50~\cite{he2016deep} backbone for the feature extractor. The overall structure of ResNet-50 is \texttt{Initial Layers, Layer-1, Layer-2, Layer-3, Layer-4, AvgPool, Fc}. The model is initialized with ImageNet~\cite{russakovsky2015imagenet} pretrained weights. Additionally, we add a bottleneck layer of width 256 just after the \texttt{AvgPool} layer to obtain the features and replace all the BatchNorm layers with Domain-Specific Batch-Normalization~\cite{chang2019domain} layers. All the layers till \texttt{Layer-3} are frozen and only the rest of the layers are fine-tuned.

\vspace{1mm}
\noindent\textbf{Selector Network ($\mathcal{H}$).} We use a ResNet-18~\cite{he2016deep} network with the \texttt{Fc} layer replaced with a binary-length fully connected layer as the selector network in our framework. The network is initialized with ImageNet pretrained weights and all the layers are trained while optimization.

\vspace{1mm}
\noindent\textbf{Classifier ($\mathcal{F}$).} The final \texttt{Fc} layer of ResNet-50 described above is replaced with a task-specific fully-connected layer to form the classifier network of our framework.

\vspace{1mm}
\noindent\textbf{Domain Discriminator ($\mathcal{D}$).} A three-layer fully-connected network is used as the domain discriminator network. It takes the 256-length features obtained from the feature extractor as input. The adversarial training is incorporated using a gradient reversal layer (GRL).

\vspace{1mm}
\noindent\textbf{Hyperparameters.}
All the networks are optimised with using mini-batch stochastic gradient descent with a momentum of 0.9. A batch size of 64 is used for Office31, Office-Home and VisDA-2017, while a batch size of 128 is used for ImageNet-Caltech. For feature extractor an initial learning rate of 5e-5 for the convolutional layers while an initial learning rate of 5e-4 for all the fully-connected layers is used. For the selector network and the domain discriminator an initial learning rate of 5e-3 and 5e-4 are used respectively. The learning rates are decayed following a cosine-annealing strategy as the training progresses. The best models are captured by obtaining the performance on a validation set. We do not follow the ten-crop technique~\cite{cao2018partialpada, cao2019learning}, to improve the performance in the inference phase.
\section{Additional Experimental Results}

\input{tables/Office31_VGG16}
\input{tables/Office31_VisDA17_Ablation}
\input{tables/OfficeHome_HausdorffAblation}

\noindent
\textbf{Effectiveness on Different Backbone Networks.}
To show that the proposed framework is backbone-agnostic, i.e. it provides the best performance irrespective of the architecture of the feature extractor, we conduct experiments using a VGG-16~\cite{Simonyan15} backbone for the feature extractor. We report the results on the transfer tasks from the Office31 dataset in Table~\ref{table:cls-office-31-vgg16} and compare it with the current state-of-the-art methods. Our method outperforms the previously best results by a margin of \textbf{3.05\%} on average and achieves new state-of-the-art results. This confirms that our proposed framework for partial domain adaptation is robust with respect to the change of backbone network.

\vspace{1mm}
\noindent
\textbf{Effectiveness of Individual Modules.}
In Section 4.3 of the main paper, we discussed the importance of the proposed three unique modules on Office-Home dataset. Here, we extend the experiments to Office31 and VisDA-2017 and provide the performance on the transfer tasks in Table~\ref{table:cls-office31-visda17-ablation}. Similar to the results on Office-Home dataset, our approach with all the three modules (Select, Label and Mix) working jointly, works the best on both datasets.

\input{tables/OfficeHome_HardPLAblation}
\input{tables/OfficeHome_MixAblation}

\vspace{1mm}
\noindent
\textbf{Effectiveness of Hausdorff Distance.}
In Section 4.3 of the main paper, we discussed the importance of Hausdorff Distance loss in guiding the selector network to discard the outlier source samples. Here we provide the individual performance of all the transfer tasks on Office-Home dataset in Table~\ref{table:cls-office-home-hausdorff}, which shows that our approach with Hausdorff distance loss works the best in all cases.

\vspace{1mm}
\noindent
\textbf{Effectiveness of Soft Pseudo-Labels.}
As discussed in the Section 4.3, we confirmed the importance of soft pseudo-labels for our framework as it attenuates the unwanted deviations because of noisy and false hard pseudo-labels. Here, we provide the performance on each of the transfer tasks from Office-Home in Table~\ref{table:cls-office-home-ablation-hardpl}.

\vspace{1mm}
\noindent
\textbf{Effectiveness of Different MixUp.}
We examined the effect of mixup regularization on both domain discriminator and classifier separately in Section 4.3 of the main paper. We concluded that our Mix strategy not only helps to explore intrinsic structures across domains, but also helps
to stabilize the domain discriminator. Here, we provide the corresponding performance on each of the transfer tasks of Office-Home in Table~\ref{table:cls-office-home-ablation-mix}.

\section{Qualitative Results}
\vspace{-0.8mm}
\input{figures/tSNEPlot_Supp}

\noindent
\textbf{Feature Visualizations.}
We provide some additional feature visualizations using t-SNE~\cite{maaten2008visualizing} in Figure~\ref{fig:tsne_supp}. Similar to Section 4.4 in the main paper, we choose an UDA setup as a vanilla method and add the proposed modules one-by-one to visualize the contribution of each of the modules in learning discriminative features for partial domain adaptation.