performance on the Avg.. (iii) Combining with the 5-shot results in Table 4 of
the main paper, we can find with the increasing training samples (i.e., 5-shot
$\rightarrow$ 20-shot $\rightarrow$ many-shot), the performance gain of our
IP-IRM decreases. This is in line with the conclusion of [88] that the
disentangled feature is more helpful for the learning with fewer training
samples.

Method |  Aircraft |  Caltech |  Cars |  Cifar10 |  Cifar100
---|---|---|---|---|---
InsDis [92] |  35.07$\pm$0.43 |  75.97$\pm$0.47 |  37.49$\pm$0.36 |  51.49$\pm$0.40 |  57.61$\pm$0.48
PCL [58] |  36.86$\pm$0.44 |  90.72$\pm$0.30 |  39.68$\pm$0.39 |  59.26$\pm$0.36 |  60.78$\pm$0.46
PIRL [63] |  36.70$\pm$0.44 |  78.63$\pm$0.46 |  39.21$\pm$0.37 |  49.85$\pm$0.42 |  55.23$\pm$0.52
MoCo-v1 [38] |  35.31$\pm$0.44 |  79.60$\pm$0.45 |  36.35$\pm$0.35 |  46.96$\pm$0.39 |  51.62$\pm$0.50
MoCo-v2 [19] |  31.98$\pm$0.38 |  92.32$\pm$0.29 |  41.47$\pm$0.41 |  56.50$\pm$0.42 |  63.33 $\pm$0.51
IP-IRM (Ours) |  32.98$\pm$0.40 |  93.16$\pm$0.26 |  42.87$\pm$0.41 |  60.73$\pm$0.39 |  68.54$\pm$0.49
Method |  DTD |  Flowers |  Food |  Pets |  SUN
InsDis [92] |  69.38$\pm$0.43 |  77.35$\pm$0.51 |  50.01$\pm$0.45 |  66.38$\pm$0.44 |  74.97$\pm$0.48
PCL [58] |  69.53$\pm$0.43 |  67.50$\pm$0.50 |  57.06$\pm$0.44 |  88.31$\pm$0.36 |  84.51$\pm$0.37
PIRL [63] |  70.43$\pm$0.42 |  78.37$\pm$0.48 |  51.61$\pm$0.45 |  69.40$\pm$0.43 |  76.64$\pm$0.46
MoCo-v1 [38] |  68.76$\pm$0.46 |  75.42$\pm$0.53 |  49.77$\pm$0.46 |  68.32$\pm$0.43 |  74.77$\pm$0.50
MoCo-v2 [19] |  78.00$\pm$0.38 |  80.05$\pm$0.45 |  57.25$\pm$0.48 |  83.23$\pm$0.40 |  88.10$\pm$0.33
IP-IRM (Ours) |  79.30$\pm$0.36 |  82.68$\pm$0.41 |  59.61$\pm$0.46 |  85.23$\pm$0.38 |  89.38$\pm$0.30

Table 14: Accuracy (%) of 5-way-5-shot few-shot evaluation with standard
deviation (mean$\pm$std) using the image representation learned on ImageNet
[26].

To report the error bars as stated in the checklist, here we presented the
standard deviation for the 5-shot experiments as a supplement for the Table 4
in the main paper. As shown in Table 14, all the methods perform in a stable
interval.

###  D.5 Interventional Few-Shot Learning

We evaluated the learned representations by SSL and our IP-IRM with the IFSL
classifier proposed in [98], which is an intervention-based classifier
designed to remove the confounding bias from the misuse of pre-trained
knowledge in few-shot learning (e.g., treating grass as dog when most dogs
appear with grass in the few-shot training images). We adopted the combined
adjustment implementation with $n=4$ (dividing feature channels into 4
subsets). For all models in all datasets, we trained the IFSL classifier using
the Adam optimizer with learning rate as 0.01 for 50 epochs. The batch size
was set as 4. The reported accuracy is based on the average across 2,000
episodes.

Method |  Aircraft |  Caltech |  Cars |  Cifar10 |  Cifar100 |  DTD |  Flowers |  Food |  Pets |  SUN |  Avg.
---|---|---|---|---|---|---|---|---|---|---|---
Linear |  InsDis [92] |  35.07 |  75.97 |  37.49 |  51.49 |  57.61 |  69.38 |  77.35 |  50.01 |  66.38 |  74.97 |  59.57
|  PCL [58] |  36.86 |  90.72 |  39.68 |  59.26 |  60.78 |  69.53 |  67.50 |  57.06 |  88.31 |  84.51 |  65.42
|  PIRL [63] |  36.70 |  78.63 |  39.21 |  49.85 |  55.23 |  70.43 |  78.37 |  51.61 |  69.40 |  76.64 |  60.61
|  MoCo-v1 [38] |  35.31 |  79.60 |  36.35 |  46.96 |  51.62 |  68.76 |  75.42 |  49.77 |  68.32 |  74.77 |  58.69
|  MoCo-v2 [19] |  31.98 |  92.32 |  41.47 |  56.50 |  63.33 |  78.00 |  80.05 |  57.25 |  83.23 |  88.10 |  67.22
|  IP-IRM (Ours) |  32.98 |  93.16 |  42.87 |  60.73 |  68.54 |  79.30 |  82.68 |  59.61 |  85.23 |  89.38 |  69.44
IFSL |  InsDis [92] |  41.49 |  86.53 |  45.37 |  60.51 |  66.94 |  75.99 |  87.61 |  58.85 |  80.12 |  85.87 |  68.93
|  PCL [58] |  41.22 |  91.23 |  44.55 |  64.96 |  68.10 |  73.10 |  77.99 |  62.35 |  90.88 |  87.28 |  70.17
|  PIRL [63] |  42.31 |  88.54 |  46.61 |  61.07 |  66.49 |  76.70 |  88.20 |  60.37 |  82.59 |  87.01 |  69.99
|  MoCo-v1 [38] |  41.43 |  89.30 |  44.20 |  57.01 |  63.29 |  76.84 |  87.12 |  60.80 |  81.73 |  85.90 |  68.76
|  MoCo-v2 [19] |  40.02 |  93.95 |  51.12 |  69.56 |  73.84 |  80.67 |  86.94 |  66.10 |  90.38 |  91.18 |  74.38
|  IP-IRM (Ours) |  41.49 |  94.31 |  52.80 |  72.02 |  76.52 |  80.78 |  87.69 |  67.35 |  91.13 |  91.62 |  75.57

Table 15: Accuracy (%) of IFSL classifier using representation trained on
ImageNet [26]. Experiment was conducted with 5-way-5-shot setting using 2,000
episodes. We used the combined adjustment for all experiments.

From the results shown in Table 15, we can observe that: i) our IP-IRM obtains
the best accuracy, validating the superiority of the learned disentangle
representation. ii) IFSL significantly improves the performance of the vanilla
linear classifier, showing that IFSL can further deconfound. iii) Compared
with linear classifier, the performance gain of IP-IRM over the best baseline
(MoCo-v2) is not as high (1.19% v.s. 2.22%). This is reasonable, since the
disentangled feature with our proposed IP-IRM helps the downstream classifier
to deconfound by neglecting the non-discriminative features (see Section 5.3).

##  Appendix E Others

###  E.1 License

We use the following open-source database and the license just follow them.

  * •

https://github.com/YannDubs/disentangling-vae

  * •

https://github.com/chingyaoc/DCL

  * •

https://github.com/joshr17/HCL

  * •

https://github.com/facebookresearch/moco

  * •

https://github.com/taoyang1122/pytorch-SimSiam

  * •

https://github.com/facebookresearch/InvariantRiskMinimization

  * •

https://github.com/kibok90/imix

###  E.2 Data Consent

We entirely use the open-source data and they have already obtained the
consent during the data collection. Details can be checked on their website.

###  E.3 Personally Identifiable Information

The open-source data we used does not contain personally identifiable
information or offensive context. More information can refer to the website of
the open-source data.


# The Transition of Polarized Dust Thermal Emission from the Protostellar
Envelope to the Disk Scale

Ka Ho Lam,1 Che-Yu Chen,1,2 Zhi-Yun Li,1 Haifeng Yang,3 Erin G. Cox,4 Leslie
W. Looney,5 and Ian Stephens6,7
1Department of Astronomy, University of Virginia, 530 McCormick Rd.,
Charlottesville 22904, Virginia, USA
2Lawrence Livermore National Laboratory, 7000 East Ave, Livermore, CA 94550,
USA
3Institute for Advanced Study, Tsinghua University, Beijing 100084, People’s
Republic of China
4Center for Interdisciplinary Exploration and Research in Astrophysics,
Northwestern University, 1800 Sherman Ave, Evanston, IL 60201, USA
5Department of Astronomy, University of Illinois, 1002 West Green Street,
Urbana, Illinois 61801, USA
6Harvard-Smithsonian Center for Astrophysics, 60 Garden Street, Cambridge, MA
02138, USA
7Department of Earth, Environment and Physics, Worcester State University,
Worcester, MA 01602, USA
E-mail<EMAIL_ADDRESS>
(Accepted XXX. Received YYY; in original form ZZZ)

###### Abstract

Polarized dust continuum emission has been observed with ALMA in an increasing
number of deeply embedded protostellar systems. It generally shows a sharp
transition going from the protostellar envelope to the disk scale, with the
polarization fraction typically dropping from ${\sim}5\%$ to ${\sim}1\%$ and
the inferred magnetic field orientations becoming more aligned with the major
axis of the system. We quantitatively investigate these observational trends
using a sample of protostars in the Perseus molecular cloud and compare these
features with a non-ideal MHD disk formation simulation. We find that the gas
density increases faster than the magnetic field strength in the transition
from the envelope to the disk scale, which makes it more difficult to
magnetically align the grains on the disk scale. Specifically, to produce the
observed ${\sim}1\%$ polarization at ${\sim}100\,\mathrm{au}$ scale via grains
aligned with the B-field, even relatively small grains of $1\,\mathrm{\mu m}$
in size need to have their magnetic susceptibilities significantly enhanced
(by a factor of ${\sim}20$) over the standard value, potentially through
superparamagnetic inclusions. This requirement is more stringent for larger
grains, with the enhancement factor increasing linearly with the grain size,
reaching ${\sim}2\times 10^{4}$ for millimeter-sized grains. Even if the
required enhancement can be achieved, the resulting inferred magnetic field
orientation in the simulation does not show a preference for the major axis,
which is inconsistent with the observed pattern. We thus conclude that the
observed trends are best described by the model where the polarization on the
envelope scale is dominated by magnetically aligned grains and that on the
disk scale by scattering.

###### keywords:

polarization – magnetic fields – MHD – protoplanetary discs – stars:formation
– stars:protostars

††pubyear: 2024††pagerange: The Transition of Polarized Dust Thermal Emission
from the Protostellar Envelope to the Disk Scale–B

##  1 Introduction

Magnetic fields have long been viewed as a key ingredient in molecular clouds
and star formation (McKee & Ostriker, 2007). This view has been greatly
strengthened by polarimetric observations of dust continuum emission in recent
years, especially through the Planck all-sky survey (e.g., Planck
Collaboration Int. XIX, 2015) and Atacama Large Millimeter/submillimeter Array
(ALMA, e.g., Hull & Zhang, 2019). On the relatively large cloud scales probed
by Planck, there is little doubt that the polarized dust emission traces the
magnetic field because the (relatively small, sub-micron-sized) dust grains
are known to be preferentially aligned with their short axis along the
magnetic field (e.g., Andersson et al., 2015). On the much smaller scales
probed by ALMA, the situation is less clear, which is the focus of our
investigation.

In particular, ALMA has detected dust polarization in an increasing number of
protostellar systems that are still deeply embedded in their massive envelopes
(e.g., Hull et al., 2017, 2020; Cox et al., 2018; Maury et al., 2018; Sadavoy
et al., 2018a, b, 2019; Kwon et al., 2019; Le Gouellec et al., 2019; Takahashi
et al., 2019; Ko et al., 2020; Yen et al., 2020). Le Gouellec et al. (2020)
analyzed the polarization data from Class 0 sources statistically, and found
an interesting anti-correlation between the dispersion of the polarization
orientations and the polarization fraction. Another interesting trend, first
discussed in Cox et al. (2018) and quantified further in this paper (see
Section 2 below), is that the typical dust polarization fraction on the
$10^{3}\,\mathrm{au}$ scale of the inner protostellar envelope
(${\gtrsim}5\%$) is much higher than that on the $10^{2}\,\mathrm{au}$ disk
scale (${\lesssim}1\%$). While the relatively high polarization fraction on
the envelope scale is likely still due to magnetically aligned grains (as on
the larger cloud scale), the origin of the much lower polarization fraction on
the disk scale is less certain.

One possible explanation of the lower polarization fraction on the disk scale
compared to that on the envelope scale is that the grains in the disk are much
larger than those in the envelope and thus harder to align magnetically
because of their longer Larmor precession timescale around the magnetic field
(e.g., Lazarian 2007; Yang 2021). The higher density in the disk also makes it
harder for grain alignment, regardless of the alignment mechanism because of
more frequent randomizing collisions of the grains with their ambient gas.
These lead to a larger ratio of the Larmor precession timescale to the gas
damping timescale in the disk compared to that in the envelope, and hence a
lower magnetic grain alignment efficiency in the disk (see equation 7 below),
which may explain its lower polarization fraction.

A potential scenario is that the reduction factor of magnetic alignment on the
disk scale is so large as to render the polarized emission from magnetically
aligned grains undetectable. In this case, another mechanism is needed to
explain the lower but still well-measured polarization at the ${\sim}1\%$
level. The most likely alternative to magnetically aligned grains is dust
self-scattering, which has been shown to be capable of producing percent-level
polarization at (sub)millimeter wavelengths (Kataoka et al., 2015), especially
in inclined disks (Yang et al., 2016).

The goal of our investigation is therefore to quantify the change in the dust
polarization fraction and pattern in the transition from the protostellar
envelope scale to the disk scale and to determine whether the observed trends
in the transition can be explained by magnetically aligned grains alone or
whether scattering is also needed. In particular, we examine how the condition
for magnetic grain alignment at a given location in the protostellar system
depends on its local environment, including the gas density, magnetic field
strength, and the grain properties such as size and magnetic susceptibility.
We also take into consideration the possible enhancement of dust magnetic
susceptibility by superparamagnetic inclusions (SPIs) based on the theory
recently developed by Yang (2021). Our analytic model is then tested in
synthetic polarization of a simulated protostellar disk-envelope system from
Lam et al. (2019) to provide a qualitative comparison to the ALMA observations
discussed in Cox et al. (2018).

The rest of the paper is organized as follows. We first revisit the ALMA
polarization data of 8 protostellar systems in the Perseus molecular clouds
presented in Cox et al. (2018) to quantify the sharp drop in polarization
fraction and change in polarization orientation from the protostellar envelope
scale to the disk scale (Section 2). In Section 3, we provide an overview of
the condition for magnetic alignment of dust grains based on Yang (2021). The
non-ideal MHD disk formation simulations of Lam et al. (2019) are described in
Section 4, where we also present the synthetic polarization observations and
their comparison with the ALMA data. Our results are discussed in Section 5.
Section 6 summarizes our conclusions.

##  2 Observational Motivation: Sharp Envelope-Disk Transition in Dust
Polarization

Figure 1: Trends of observed polarization from envelope to disk scales.
Plotted as functions of the deprojected distance from the center (normalized
by $R_{\rm 10\%}$; see text for definition) are the combined distributions of
the polarization fraction (left) and the orientation of the polarization
B-vector (rotated from the E-vector by 90∘; right), for 8 of the 10
protostellar systems presented in Cox et al. (2018). The orientation of the
polar plot is rotated so that the disk major axes align with the horizontal
line. Also, the polar plot is mirror-imaged to reflect the degeneracy of
polarization angles over $180^{\circ}$. The polarization fraction is color
coded in both panels to highlight its increase from the disk to envelope
scale.

The combination of sensitivity and resolution afforded by ALMA makes it
possible to detect polarized dust emission from the inner protostellar
envelope down to the disk scale. The behavior of the polarization in the
envelope-to-disk transition region is well illustrated in Cox et al. (2018),
which presented ALMA Band 7 polarization data on 10 Class 0/I protostars in
the Perseus molecular clouds (distance ${\sim}300\,\mathrm{pc}$; Zucker et al.
2019). They found that on the 100-au disk scale the polarization tends to be
well ordered, with a typical fraction of ${\lesssim}1\%$. In contrast, on the
larger envelope scale, the polarization becomes more disordered, with a
relatively large fraction of typically ${\gtrsim}5\%$. These differences were
clearly visible in their polarization maps (see their Figs. 1-3) and
quantified through cumulative probability distributions of the polarization
fraction (see their Fig. 4).

To characterize the polarization in the envelope-disk transition further and
facilitate a quantitative comparison of the observational data with synthetic
observations based on numerical simulation, we re-examine the polarization
data from Cox et al. (2018) from a different angle by taking into account the
spatial information more directly. In particular, we want to know how the
polarization fraction and direction change with the distance from the center.
Since the resolution of the ALMA data presented in Cox et al. (2018) is
$\approx 0.4^{\prime\prime}$, we regridded the data to have pixel size
$\approx 0.2^{\prime\prime}$ so that there are $\sim 2-4$ pixels per beam. To
correct for projection effects, we need to know the system orientation in the
plane of the sky and inclination relative to the sky plane. For the
orientation, we use the outflow directions inferred in Tobin et al. (2015) and
Stephens et al. (2017, 2018). Since protostellar outflows are generally
aligned perpendicular to the equatorial plane of the system, we adopt the
orientation $90^{\circ}$ to the outflow direction as the position angle of the
disk of the system. For the inclination angle of the system, we use the disk
orientation inferred from the VLA Ka-band continuum observations by Segura-Cox
et al. (2018), as part of the VANDAM survey (Tobin et al., 2016), whenever
such measurement is available. For the other 5 systems that do not have a
well-measured inclination, we assume $45^{\circ}$ for the inclination
angle.111We have tested that the inclination angle does not have a huge effect
(unless the system is nearly edge-on, which is less likely) on the features we
show in Fig. 1, since these features are visible even before de-projection
(see Appendix A). We therefore adopt a representative value of $45^{\circ}$.
Considering the targets are different in size, we further normalized the
derived radius by a characteristic “disk” radius, defined as the radius of a
circle that encloses the same area as the ellipse at 10% maximum intensity
from 2D Gaussian fitting of the ALMA Band 7 Stokes I image; i.e., we fit the
emission with 2D Gaussian distribution, measure the parameters of the ellipse
at the 10% peak level of the fitted distribution, and calculate $R_{\rm
10\%}\equiv\sqrt{a\cdot b}$ where $a$, $b$ are the half lengths of the major
and minor axes of the resulting ellipse from the fitted Gaussian,
respectively. The fitted Gaussian peak is adopted as the center of the system.
The same masking criteria as in Cox et al. (2018) are used, i.e.,
$I>5\sigma_{I}$ and $P>3\sigma_{P}$. More details on the de-projection
process, as well as the parameters adopted for individual sources, are
described in Appendix A.

In Fig. 1 we plot, as scatter plots color-coded by polarization fraction, the
combined distributions of the polarization fraction (left panel) and the
inferred orientation of the polarization B-vector (rotated from the E-vector
by 90∘; right panel), as a function of the normalized (deprojected) distance
from the center for 8 of the 10 sources discussed in Cox et al. (2018). We
note that, among the 10 sources presented in Cox et al. (2018), Per 41 has too
few polarization detections for meaningful analysis. The other source, Per 21,
is located within the highly perturbed protostellar envelope NGC 1333 IRAS 7
that harbors at least two other protostars (see e.g., Tobin et al., 2016; Chen
et al., 2019) with complex outflow morphologies (Stephens et al., 2017). The
complexity makes it difficult to assign an outflow direction for Per 21 with
confidence. We thus exclude it in this study as well.

The left panel of Fig. 1 shows that there is a clear trend for the
polarization fraction to stay roughly constant at typically a percent level
(although it is higher in a couple of cases; see discussion in Section 4)
within about one normalized radius (i.e., $r/R_{\rm 10\%}\lesssim 1$) and then
rapidly increases outwards, reaching values as high as $10-15\%$ or more. As
shown in Appendix A, the trend is clear in both the cases where a large number
of polarization vectors are detected on the envelope scale (such as Per 2, Per
5, Per 11, and Per 29) and those with fewer envelope-scale detections (such as
Per 14, Per 18, and Per 50). It is a robust feature that needs to be explained
by all models of envelope/disk polarization, including our own (see Section 4
below).

The right panel of Fig. 1 shows that the orientations of the polarization
B-vectors are clearly non-isotropic (e.g., two cavities devoid of data points)
within about one normalized radius ($R_{\rm 10\%}$), with a strong preference
towards the disk orientation. This is in strong contrast with the orientations
on the larger (envelope) scale, which are much more isotropic. The difference
can also be seen in individual sources (e.g., the right panels of Fig. 6),
which tend to have much more uniform polarization orientations (i.e., narrow
distributions) on the disk scale than on the envelope scale. Nevertheless, we
note that there are noticeable offsets between the disk-scale polarization
orientation and the outflow-based system major axis in some of our targets
(Per 5, Per 11, Per 18, and Per 26; see Fig. 6). It is unclear what is the
physical reason introducing such offset, and we discuss this further in Sec.
5. In any case, the difference in the polarization orientations between the
envelope and disk scales is significant, and is another feature that needs to
be explained.

##  3 Condition for Magnetic Grain Alignment

The simplest explanation of the observed drop in polarization fraction from
the envelope scale to the disk scale is that the grains are less well aligned
at higher densities, especially inside the disks. Here, to explore this
possibility quantitatively, we discuss the necessary conditions for magnetic
grain alignment based on the recent work by Yang (2021).

The investigation of magnetic alignment of spinning dust grains has a long and
distinguished history (see Andersson et al. 2015 for a review). Although there
are different proposed mechanisms to spin up the dust grains, the current
favorite is radiative alignment torque, which appears capable of spinning up
grains in protoplanetary disks (e.g., Tazaki et al., 2017; Lazarian, 2007).
However, for the spinning grains to align with the magnetic field, they have
to gyrate quickly around the magnetic field, with a Larmor precession
timescale $t_{L}$ shorter than the gas damping timescale on dust grains
$t_{d}$.

###  3.1 Larmor Precession Timescale

It is well-known that a spinning grain would be magnetized through the Barnett
(1915) effect. This spinning-induced magnetization can be quantified as
$\mathbf{M}=\chi\mathbf{\Omega}/\gamma$ (Purcell, 1979; Roberge et al., 1993),
where $\chi$ is the magnetic susceptibility, $\mathbf{\Omega}$ is the angular
velocity, $\gamma=g\mu_{B}/\hbar$ is the gyromagnetic ratio with
$\mu_{B}=9.27\times 10^{-21}$ erg$\cdot$G-1 (the Bohr magneton) and $g\approx
2$ (the $g$-factor) for electrons (Draine, 1996). For a dust grain with a
magnetic moment $|\mathbf{M}|V$, where $V$ is the volume of the dust grain
(i.e., $V\equiv 4\pi a^{3}/3$ for spherical grains with radius $a$), the
magnetic torque exerted on the dust grain by the external magnetic field $B$
is roughly $|\mathbf{M}|VB$. We can therefore define a Larmor precession
timescale as (Lazarian, 2007; Yang, 2021, see e.g.,):

$\begin{split}t_{L}=&\frac{2\pi
I|\mathbf{\Omega}|}{|\mathbf{M}|VB}=\frac{4\pi(\rho_{s}V)a^{2}/5\cdot\gamma}{\chi
VB}=\left(\frac{4\pi\gamma}{5}\right)\frac{\rho_{s}a^{2}}{\chi B}\\\ =&\
2.6\times 10^{11}\,\mathrm{s}\\\
&\times\hat{\chi}^{-1}\left(\frac{\rho_{s}}{3~{}\mathrm{g/cm^{3}}}\right)\left(\frac{T_{s}}{15~{}\mathrm{K}}\right)\left(\frac{B}{5~{}\mathrm{mG}}\right)^{-1}\left(\frac{a}{1~{}\mathrm{mm}}\right)^{2},\end{split}$
(1)

where $\rho_{s}$ is the mass density of the dust grain, and

$\hat{\chi}\equiv\chi\cdot 10^{3}\left(\frac{T_{s}}{15~{}\mathrm{K}}\right)$
(2)

is a dimensionless parameter of the magnetic susceptibility determined by the
composition of dust grains, and $T_{s}$ is the dust temperature.

For regular paramagnetic material, the magnetic susceptibility is given as
(e.g., Morrish, 1980; Draine, 1996)

$\chi_{\rm p}=\frac{n_{\rm p}\mu^{2}}{3kT},$ (3)

where $n_{\rm p}=f_{\rm p}n_{\rm tot}$ is the number density of paramagnetic
atoms with $f_{\rm p}$ the fraction of the atoms that are paramagnetic and
$n_{\rm tot}$ the total atomic density, and $\mu=p\mu_{B}$ is the averaged
Bohr magneton per iron atom. Draine (1996) noted that $p\approx 5.5$ for
paramagnetic materials, and gave a realistic estimate of paramagnetic
susceptibility:

$\chi_{\rm p}=4.2\times 10^{-2}f_{\rm p}\left(\frac{n_{\rm
tot}}{10^{23}~{}\mathrm{cm^{-3}}}\right)\left(\frac{T_{s}}{15~{}\mathrm{K}}\right)^{-1}\left(\frac{p}{5.5}\right)^{2}.$
(4)

For typical interstellar dust grains composed of {C, H, Mg, Si, Fe},
$\rho_{s}\sim 3~{}{\rm g/cm}^{3}$ and $n_{\rm tot}\sim 10^{23}~{}{\rm
cm}^{-3}$ (see e.g., Draine, 1996). With $f_{p}\approx 0.1$ (Draine, 1996),
this suggests that the dimensionless parameter $\hat{\chi}\sim 1$ in equation
(1), which we will refer to as the “standard" value for paramagnetic grains.

###  3.2 Gas Damping Timescale

Collisions between dust grains and surrounding gas particles have the
potential to randomize the angular momenta of grains and thus limit the degree
of magnetic alignment. In general, the damping timescale can be estimated as
the time needed to accumulate the same amount of mass from the gas material as
the mass of the dust grain (e.g., Purcell & Spitzer, 1971). Assuming every
colliding gas particle sticks long enough on the grain surface for its kinetic
energy to become thermalized at the grain temperature, Roberge et al. (1993)
derived a gas damping timescale

$\begin{split}t_{d}=&\frac{2\sqrt{\pi}}{5}\frac{\rho_{s}a}{n_{\rm g}m_{\rm
g}{\mathrm{v}}_{\rm g,th}}\\\ =&3.37\times 10^{8}~{}\mathrm{s}\\\
&\times\left(\frac{\rho_{s}}{3~{}\mathrm{g/cm^{3}}}\right)\left(\frac{a}{1~{}\mathrm{mm}}\right)\left(\frac{n_{\rm
g}}{5\times 10^{9}~{}\mathrm{cm^{-3}}}\right)^{-1}\left(\frac{T_{\rm
g}}{15~{}\mathrm{K}}\right)^{-1/2}\end{split}$ (5)

for the simplest case of spherical grains222Note that for polarization
produced by B-field aligned grains, non-spherical grains are required.
Nonetheless, the timescale would be at the same order of magnitude., where
$\rho_{s}$ and $a$ are the mass density and size of the grain,
$n_{\mathrm{g}}$ the number density of the gas, $m_{\mathrm{g}}$ the mass per
gas particle, and $\mathrm{v}_{\mathrm{g,th}}$ and $T_{\mathrm{g}}$ the gas
thermal velocity and temperature, respectively.

###  3.3 Condition for Magnetic Alignment with Superparamagnetic Inclusions

Combining equations (1) and (5) and assuming that the dust grains and gas
particles are in thermal equilibrium ($T_{s}=T_{\rm g}\equiv T$), we have

$\begin{split}\frac{t_{L}}{t_{d}}=771\times\left(\frac{a_{\rm
mm}}{\hat{\chi}}\right)\left(\frac{B}{5~{}\mathrm{mG}}\right)^{-1}\left(\frac{n_{\rm
g}}{5\times
10^{9}~{}\mathrm{cm^{-3}}}\right)\left(\frac{T}{15~{}\mathrm{K}}\right)^{3/2}\end{split}$
(6)

where $a_{\rm mm}\equiv(a/1\,{\rm mm})$ is the grain size in units of
millimeter. Note that, as discussed in Yang (2021), the magnetic
susceptibility parameter $\hat{\chi}$ and the grain size $a$ are degenerate in
the ratio between Larmor precession and gas damping. Equation (6) suggests
that, for paramagnetic materials with the standard value of magnetic
susceptibility $\hat{\chi}\sim 1$, only small, sub-micron-sized grains have
$t_{L}<t_{d}$ (and thus can align with the magnetic field) for the adopted
fiducial disk parameters of $B\sim 5~{}{\rm mG}$, $n_{\mathrm{g}}\sim 5\times
10^{9}~{}{\rm cm}^{-3}$, and $T\sim 15~{}{\rm K}$. However, $\hat{\chi}$ can
be enhanced by a large factor when superparamagnetic inclusions (SPIs
hereafter) are present in the grains (Jones & Spitzer, 1967).

Superparamagnetism appears in nanoparticles made of ferromagnetic or
ferrimagnetic materials. Unlike paramagnetic materials that have only un-
correlated electron spins, within one superparamagnetic particle, all the
atoms are spontaneously magnetized and behave like a single large magnetic
moment (“macro-spin”; Bean & Livingston 1959), which could greatly increase
the magnetic susceptibility. Yang (2021) considered three types of candidate
materials for the superparamagnetic inclusions, and estimated a maximum
enhancement factor of ${\hat{\chi}}_{\rm max}\sim 1.1\times 10^{3}$ for Fe3O4
(magnetite), $\sim 3.7\times 10^{3}$ for $\gamma$–Fe2O3 (maghemite), and $\sim
7.0\times 10^{4}$ for the extreme case of pure metallic iron (see their Table
1). Since magnetite and maghemite are more likely representative of
superparamagnetic materials than metallic iron, the magnetic susceptibility is
likely enhanced by a maximum factor up to a few thousands at most, rather than
tens of thousands. Yang (2021) also noted that this maximum enhancement is a
hard limit determined by the crystalline structure of the SPI material and the
energy needed to overcome the crystalline structure and align the initially
randomly oriented magnetic moments inside the SPIs to the direction of the
external magnetic field. The required energy is proportional to the volume of
the SPI. It therefore takes longer to align larger SPIs because of a larger
energy required. Indeed, the alignment timescale is exponentially sensitive to
the SPI size (see equation 9 of Yang (2021)), which severely limits the
contributions of SPIs larger than the critical size to the magnetic
susceptibility of the dust grain. Indeed, the maximum enhancement is reached
only when all SPIs inside a grain have the (same) critical size, which is
unlikely.

As briefly discussed in Yang (2021), while no magnetic alignment is expected
when the Larmor precession timescale is longer than the gas damping time scale
($t_{L}>t_{d}$), $t_{L}<t_{d}$ does not guarantee magnetic alignment. The
grain needs to gyrate around the magnetic field multiple times within a single
gas damping time in order to ensure magnetic alignment, which leads to a more
stringent alignment condition: $t_{L}<t_{d}/\eta$, where $\eta(>1)$ is the
number of gyrations per gas damping time needed for grain alignment. The exact
value of $\eta$ is uncertain; in the discussion below, we will follow Yang
(2021) and adopt a fiducial value of $10$. Making use of equation (6), the
alignment condition becomes:

$\lambda\equiv
771\times\left(\frac{B}{5\,\mathrm{mG}}\right)^{-1}\left(\frac{n_{\mathrm{g}}}{5\times
10^{9}\,\mathrm{cm^{-3}}}\right)\left(\frac{T}{15\,\mathrm{K}}\right)^{3/2}<\xi\equiv\frac{\hat{\chi}/\eta}{a_{\mathrm{mm}}},$
(7)

where the dimensionless parameter $\lambda$ and $\xi$ encapsulate,
respectively, the combination of the gas and magnetic field quantities and of
the grain properties that enter the alignment condition. They will be referred
to as gas and grain alignment parameter respectively hereafter. In regions
where the gas alignment parameter $\lambda$ is larger, the grains are harder
to magnetically align because of a higher gas density $n_{\rm g}$, a higher
temperature $T$, or a lower magnetic field strength $B$. Conversely, grains
with a larger grain alignment parameter $\xi$ are easier to align magnetically
because of a larger magnetic susceptibility enhancement ${\hat{\chi}}$ by
SPIs, a smaller grain size $a$, or a less stringent requirement on the number
of times $\eta$ that the spinning grains need to gyrate around the field line
before being knocked off by gas collisions in order to be magnetically
aligned. In particular, in the protostellar envelope where the gas density
$n_{\rm g}$ is lower and the grain size $a$ is expected to be smaller, the
condition for magnetic alignment should be satisfied more easily. In the next
section, we will quantify how the condition affects the polarization in the
transition region from the protostellar envelope scale to the disk scale,
using the physical quantities obtained from a non-ideal MHD disk formation
simulation.

##  4 Modeling Dust Polarization

###  4.1 Model Setup and Synthetic Observations

The simulation to be used for our polarization modeling comes from Lam et al.
(2019), which contains a series of non-ideal MHD simulations of turbulent core
collapse and disk formation with a range of values for the turbulent level and
ambipolar diffusion (see their Table 1). The simulations are isothermal with a
temperature of 10 K. They start with a centrally condensed core of
$0.5~{}\mathrm{M_{\odot}}$ in mass and 2000 au in radius and an initial solid-
body rotation of $\Omega=6\times 10^{-13}$ s-1. For the purpose of
illustrating the difference in dust polarization between the protostellar
envelope and disk, we pick a high-resolution version of their model
M1.0AD10.0, which has an initial turbulence Mach number of 1.0, a relatively
large ambipolar diffusion coefficient that is ten times the fiducial value
based on the standard cosmic ray ionization rate of $10^{-17}$ s-1 (see e.g.,
Shu, 1992), and a ${\sim}100\,\mathrm{au}$ disk. The simulation was performed
using the Athena code (Stone et al., 2008) on a uniform base grid of 5123. It
was zoomed in once with half box length while keeping the number of cells
fixed at 5123, which yields a minimum resolution of $5$ au. The high-
resolution simulation data at the time when the disk is well formed around the
central protostar of $0.22~{}\mathrm{M_{\odot}}$ is used for our polarization
analysis. The disk can be clearly see in the top panel of Fig. 2, which shows
a 3D view of the density distribution, together with several representative
magnetic field lines. The bottom panel shows the polarization vectors obtained
through the procedure discussed next.

Figure 2: Panel (a): A 3D view of the density distribution and magnetic field
lines of the simulated protostellar envelope-disk system that is used for the
dust polarization modeling. Plotted are the iso-density surfaces at
$n_{\mathrm{g}}=10^{7}$, $10^{8}$, $10^{9}$, $10^{10}\,\mathrm{cm^{-3}}$
(semi-transparent surfaces) and a sample of magnetic field lines, viewed at an
angle of $45^{\circ}$ to the rotation axis (as in the synthetic polarization
maps in the bottom panel and in Fig. 3 below). Panel (b): Polarization
(B-)vectors (with length proportional to the polarization fraction) superposed
on the color map of (mass) column density.

In the simplest case of optically thin dust with a spatially homogeneous grain
alignment efficiency, the Stokes parameters $I$, $Q$, and $U$ of dust thermal
emission along a given line of sight are given by (see e.g., Fiege & Pudritz,
2000):

$\displaystyle I$
$\displaystyle=\int\rho\left(1-\alpha\left(\frac{\cos^{2}\gamma}{2}-\frac{1}{3}\right)\right)ds,$
(8a) $\displaystyle Q$ $\displaystyle=\alpha\int\rho\,\cos
2\psi\,\cos^{2}\gamma\,ds,$ (8b) $\displaystyle U$
$\displaystyle=\alpha\int\rho\,\sin 2\psi\,\cos^{2}\gamma\,ds,$ (8c)

where $\rho$ and $s$ are, respectively, the mass density at a given location
and the distance into the cloud of that location along the line of sight. The
polarizability parameter $\alpha$ is determined by the grain cross sections
and alignment properties and assumed to be spatially constant. The quantity
$\gamma$ is the inclination angle of the field line with respect to the plane
of the sky, and $\psi$ is the angle of the magnetic field from the direction
of positive $Q$ in the sky plane. The maximum degree of polarization $p_{0}$
is related to the parameter $\alpha$ through $p_{0}=\alpha/(1-\alpha/6)$. For
simplicity, we set $\alpha=10\%$, which yields $p_{0}=10.17\%$333The maximum
polarization parameter $p_{0}$ should in principle be determined from grain
alignment theory, as done in, e.g., Valdivia et al. (2019); Kuffmeier et al.
(2020), using the POLARIS code (Reissl et al., 2016). However, the
uncertainties in the grain properties, especially their shapes, make it
difficult to firmly predict this parameter. Our choice is guided by the
typical values observed in the inner protostellar envelopes of the Perseus
protostars. It is the same as the constant value adopted by Valdivia et al.
(2019) but somewhat smaller than the value of $15\%$ adopted by Padovani et
al. (2012) and Lee et al. (2017).. The polarization fraction and direction are
obtained from the Stokes parameters through

$p=\frac{\sqrt{Q^{2}+U^{2}}}{I},\ \ \ \phi=\frac{1}{2}{\rm arctan2}(U,Q).$ (9)

There are a few complications. First, the densest part of the protostellar
disk formed in our simulation is moderately optically thick, which could lower
its polarization fraction somewhat (Yang et al., 2017; Lin et al., 2020). The
optical depth (and associated extinction) is accounted for by solving the
vector radiation transfer equation, as described in Appendix B. Second, the
magnetic alignment efficiency is not expected to be spatially homogeneous,
with grains in denser regions less likely magnetically aligned, as discussed
in Section 3. We capture this effect using a magnetic alignment probability
$A$, defined in each voxel of the simulation based on the alignment condition,
equation (7):

$A=\begin{cases}1,&\text{if the voxel satisfies
equation~{}(\ref{eq:aligncrit})}\\\ 0,&\text{if the voxel does not satisfy
equation~{}(\ref{eq:aligncrit})}.\end{cases}$ (10)

Finally, it is well known that dust scattering can provide significant
polarization in inclined disks along the disk minor axis (Kataoka et al.,
2015; Yang et al., 2016). To account for this possibility, in one of the
models, we added a scattering-induced polarization of fraction $p_{\rm sca}$
(see Section 4.2 below for discussions on the value of $p_{\rm sca}$) along
the disk minor axis (which is the negative $Q$ direction in our setup) only in
those voxels that do not satisfy the magnetic alignment condition (i.e.,
$A=0$).

The synthetic observations are conducted at a resolution of 5 au. To provide
better comparison to the ALMA observations of Cox et al. (2018), we smoothed
the synthetic $I$, $Q$, and $U$ maps with a 2D Gaussian beam with FWHM = 10
pixels (corresponding to $\sim 50$ au), which is large enough to illustrate
the beam convolution effect but small enough that the envelope and disk scales
remain distinct (see Fig. 3 below). To be consistent with our analysis on the
observational data, we downsampled the smoothed synthetic observations to have
$\approx 4$ pixels per beam. We did not include any noise in the synthetic
observations but applied the same masking criteria ($I>5\sigma_{I}$,
$P>3\sigma_{P}$, where $P=\sqrt{Q^{2}+U^{2}}$ is the polarized intensity and
$\sigma_{I}$, $\sigma_{P}$ are mean values measured from a relatively
quiescent $10\times 10$ pixel2 region on our synthetic maps) as adopted in Cox
et al. (2018) for consistency and better comparison with data.

###  4.2 Model Results

We consider 4 models that cover a range of parameters, with the simulated
system viewed along a representative line of sight that is $45^{\circ}$ to the
disk plane (i.e., an inclination angle $i=45^{\circ}$). The model names and
parameters are listed in Table 1. We follow the same deprojection process as
described in Section 2 and Appendix A with the known projected disk
orientation (horizontal) and inclination angle (45∘). Similar to Fig. 1, we
plot the polarization fraction and angle as functions of the normalized,
inclination-corrected radius for each synthetic observation in Fig. 3.

Table 1: Model parameters and outcome

Model Name | $\xi$ | $p_{\mathrm{sca}}$ | Consistencya
---|---|---|---
Xi-inf-NoSca | $\infty$ | 0.0 | no
Xi-100-NoSca | 100 | 0.0 | no
Xi-2000-NoSca | 2000 | 0.0 | partially
Xi-100-Sca | 100 | $1\%$ | yes

Notes. (a) Whether or not the model is broadly consistent with the observed
polarization trends from the envelope to disk scale discussed in Section 2.

Figure 3: Comparing the 4 models of synthetic polarization considered in this
study. Top to bottom: Model Xi-inf-NoSca, Xi-100-NoSca, Xi-2000-NoSca, and
Xi-100-Sca (see Table 1 for model parameters). Left panels: Maps of total
intensity (with mask $I>5\sigma_{I}$), overplotted with polarization
(B-)vectors (green segments), with length proportional to the polarization
fraction. Gray contours show the masking boundaries $P=3\sigma_{P}$ adopted
when calculating the scatter plots (middle and right panels). Black open
circles mark the locations of the protostar, and black dashed ellipses
represent the disk defined by horizontal position angle and $45^{\circ}$
inclination, with size comparable to the contour of $10\%$ peak intensity).
Middle and right panels: scatter plots of polarization fraction (middle) and
angle (right) in the corresponding envelope-disk system, as in Fig. 1. The
polarization fraction is color coded in both panels.

We start the discussion with the simplest case of spatially homogeneous
magnetic grain alignment without scattering (Model Xi-inf-NoSca, the first row
of Fig. 3). In this case, the alignment condition is satisfied everywhere,
including in the densest part of the disk. To facilitate comparison with
observations, we masked out regions with polarized intensity $P<3\sigma_{P}$,
which creates several spatially coherent patches of high polarization
separated by stripes of lower polarization. Since the dust is aligned with the
magnetic field everywhere, the relatively-low polarization stripes are caused
by a combination of field orientation along the line of sight and, more
importantly, the variation of the field component in the sky plane, which
leads to a cancellation of the polarized emission (e.g., Kataoka et al.,
2012). A clear example of the lower polarization stripes is located to the
upper-left of the disk (see the upper-left panel of Fig. 3 and, more clearly,
Fig. 2b, where the polarization map is not beam-convolved). The low
polarization in this region comes from its magnetic field lines being pinching
by the radial infall and twisted by rotation at the same time, which results
in roughly orthogonal magnetic fields at different locations along the same
line of sight (see Fig. 2a for a visual impression).

It is obvious that the simplest model fails to reproduce the observed trends
in two ways. First, although the polarization fraction on the envelope scale
is broadly consistent with the observed values, that on the disk scale is
higher than typically observed. This is not too surprising since the magnetic
field in the densest part of the disk that dominates the dust emission is
rather well-ordered (and not along the line of sight; see the representative
field lines threading the disk in Fig. 2a for an illustration), which leads to
relatively little cancellation of polarized emission. Indeed, the polarization
fraction would be even higher without the beam-convolution, as can be seen
from Fig. 2a, which shows that the intrinsic polarization fraction (before
beam convolution) on the disk scale is comparable to that on the envelope
scale. Clearly, magnetic field geometry alone cannot explain the large
reduction of the polarization fraction on the disk scale compared to the
envelope scale. Second, there is substantial variation of the polarization
orientations on the disk scale except in the very central region ($r\lesssim
0.4R_{\rm 10\%}$), where the polarization is aligned perpendicular to the disk
major axis. The reason for this polarization orientation is that the magnetic
field threading the disk has a significant poloidal component (as opposed to
being wound up by disk rotation into a completely toroidal configuration,
presumably because of the relatively large magnetic diffusivity that enabled
the disk to form and survive in the simulation in the first place). We should
note that the beam convolution makes the orientations of the polarization
vectors in the inner part of the disk more ordered but this effect is
relatively moderate (compare Figs. 2b and the top-left panel of Fig. 3). In
particular, it does not make the polarization (B-)vectors preferentially align
with the system major axis, which is one of the observed trends for the disk-
scale polarization (see the right panel of Fig. 1).

We next consider Model Xi-100-NoSca with the grain alignment parameter $\xi$
on the right side of the equation (7) set to 100 instead of $\infty$. The
results are shown in the second row of Fig. 3. Note that the combination of
physical parameters to reach $\xi\equiv\hat{\chi}/(\eta a_{\mathrm{mm}})=100$
is not unique. For the fiducial choice of $\eta=10$, the value corresponds to
micron-sized ($a_{\mathrm{mm}}=0.001$), regular paramagnetic grains without
any superparamagnetic inclusions ($\hat{\chi}=1$). Another combination is to
have much larger, mm-sized grains ($a_{\mathrm{mm}}=1$) with the magnetic
susceptibility enhanced by a factor of 1000 ($\hat{\chi}=10^{3}$) by SPI.
Compared with the simplest model with a spatially homogeneous grain alignment
(Model Xi-inf-NoSca, first row), the polarization on the envelope scale
appears little affected, indicating that the grains there remain efficiently
aligned with the magnetic field. In contrast, the polarization on the disk
scale is drastically reduced, to a level well below $1\%$.

The reason for the reduction can be understood from Fig. 4, where we show a
face-on view (along the $z-$axis) of the spatial distributions (in the $x-y$
plane) of the gas number density $n_{\mathrm{g}}$, the magnetic field strength
$B$, and the corresponding dimensionless gas alignment parameter $\lambda$
defined in equation (7). Along each $z-$sight line, these quantities are
plotted at the location where the density is the highest, which is chosen to
highlight the disk. It is clear that, while both the magnetic field strength
and the density increase from the envelope to the disk, the density increases
by a much larger factor, making it easier for the collisions with gas
particles to damp out the Larmor precession of the spinning grains around the
magnetic field in the disk than in the envelope. This drastic difference
between how the density and field strength vary from the envelope to the disk
scale is quantified in panel (d), where we plot the average and range of these
two quantities at each radius. The difference is reflected in the distribution
of the gas alignment parameter $\lambda\propto n_{\rm g}/B$, which is plotted
in panel (e). Clearly, $\lambda$ increases rapidly as the radius decreases,
crossing the value of 100 adopted for the grain alignment parameter $\xi$ for
Model Xi-100-NoSca (the lower dashed line in the panel) around a radius of
order 200 au. In the envelope outside this radius, the grain alignment
condition $\lambda<\xi$ (equation 7) is satisfied, which leads to a high
polarization fraction. Interior to this radius, the alignment condition is
violated for most of the mass, which leads to a polarization fraction well
below the observed value. An implication of this deficiency is that the
observed disk-scale polarization is unlikely produced by large, mm-sized,
magnetically aligned grains since it would require an unrealistically large
enhancement of the magnetic susceptibility (by a factor more than $10^{3}$).

Figure 4: Face-on view of the spatial distributions (in the $x-y$ plane) of
(a) volume density, (b) the magnetic field strength, and (c) the dimensionless
gas alignment parameter $\lambda$ (see equation 7), at the location along each
$z-$sight line where the density is the highest. The small black circle
highlights the location of the sink (stellar) particle in the simulation. Also
plotted are the azimuthal average and range of the density and field strength
(panel d) and gas alignment parameter $\lambda$ (panel e) as a function of
radius. Note that $\lambda$ is larger in the disk than in the envelope,
indicating that the condition for magnetic alignment is harder to satisfy in
the former than in the latter. The grain alignment parameter adopted in Models
Xi-100-NoSca and Xi-100-Sca ($\xi=100$) is shown as the lower dashed
horizontal line in panel (e), and that in Model Xi-2000-NoSca ($\xi=2000$) as
the upper dashed line.

To increase the polarization level on the disk scale, we consider a larger
grain alignment parameter, $\xi=2000$ (Model Xi-2000-NoSca, third row of Fig.
3). For the fiducial value of $\eta=10$, this choice corresponds to
$\hat{\chi}=20000\ a_{\mathrm{mm}}$, which means that, for large mm-sized
grains, the magnetic susceptibility must be enhanced by a factor close the
maximum possible value for the extreme case of pure metallic iron as the
material for superparamagnetic inclusions (Yang, 2021); the requirement would
be even more extreme when the higher temperature on the disk scale is taken
into account. For smaller grains, the requirement is less extreme. For
example, for 1 $\mu$m-sized grains, the enhancement factor is 20. In any case,
with the grain alignment parameter $\xi$ increased from 100 to 2000, we are
able to increase the polarization fraction on the disk scale from $\ll 1\%$ to
$\sim 1\%$, more in line with the typically observed values. At the same time,
this polarization fraction is smaller than that of Model Xi-inf-NoSca, where
the magnetically aligned grains in the disk produce a polarization fraction
significantly above the typically observed values.

Even though Model Xi-2000-NoSca has enough magnetic alignment of the grains to
produce a polarization fraction in line with the typically observed values on
the disk scale, its polarization orientations differ substantially from the
observed trend. In particular, there is a significant variation in
polarization orientation on the disk scale, with a preference along the disk
minor axis, which is the opposite of the observed trend. This discrepancy
motivates us to consider a model that includes another polarization mechanism
– dust scattering.

The degree of continuum polarization produced by dust scattering depends
sensitively on the grain size. At the wavelength of ALMA Band 7, the optimal
size is of order $10^{2}\ \mu$m (Kataoka et al., 2015). Such grains would
typically produce a percent-level polarization with E-vectors along the minor
axis of the inclined disk (e.g., Kataoka et al., 2016; Yang et al., 2016). To
capture this effect, we add in Model Xi-100-Sca a scattering-induced
polarization to Model Xi-100-NoSca according to the prescription given in
equation (15), with $p_{\mathrm{sca}}=0.01$. The result is displayed in the
last row of Fig. 3.

As expected, the polarization structure of Model Xi-100-Sca is very similar to
that of Model Xi-100-NoSca on the envelope scale, where the grains remain
mostly aligned to the magnetic field in both cases (comparing the second and
fourth row of Fig. 3). The main difference comes from the disk scale, where
the scattering in the former has now produced a percent-level polarization
with the B-vectors preferentially along the major axis of the disk, as
suggested by the ALMA observations in Cox et al. (2018). This hybrid model,
with polarization on the envelope scale dominated by magnetically aligned
grains and that on the disk scale by scattering, is thus the best of the four
representative models considered in this paper for interpreting the
observational results.

##  5 Discussion

We would like to point out that since the simulations in Lam et al. (2019) are
isothermal, the temperature dependence in the gas alignment parameter
$\lambda$ (see equation 7) is neglected in our analysis in Section 4.2.
However, we note that the increase in $\lambda$ from the envelope to the disk
scale is expected to be even faster when the temperature gradient is taken
into account under the following considerations. Generally speaking, the
temperature and thermal velocity (proportional to $\sqrt{T}$) are expected to
be higher at small radii. Assuming hydrostatic equilibrium, the thickness of
the disk is proportional to the thermal velocity, and the gas density is
inversely proportional to the disk height. This decrease in density as a
result of the thicker disk cancels out the dependence of collision frequency
(or the gas damping timescale; see equation 5) on the increasing temperature,
resulting in a similar gas damping timescale. However, the higher temperature
also reduces the magnetic susceptibility and increases the Larmor precession
timescale (see equation 1), making magnetic alignment more difficult for dust
grains in the disk. Therefore, including a temperature dependence in our
analysis in Section 4.2 would not enhance magnetic alignment on the disk
scale, and thus our qualitative conclusion would be strengthened.

Though we present the observational data from 8 sources as a combined plot in
Fig. 1, it is important to consider the differences among individual sources.
In particular, we note that some of the protostellar systems have higher disk-
scale polarization level than the others. This can be seen in the left panel
of Fig. 1: While the majority of the cells at $r/R_{\rm 10\%}\lesssim 0.5$
have polarization fraction $\approx 0.01$, there are systems showing $p\approx
0.02-0.03$ at the inner-most region of the disk (also see Fig. 6). The
detailed analysis of individual protostellar systems is beyond the scope of
this paper, but we would like to note the possibility that though dust
scattering works well for the general trend of the disk-scale polarization,
magnetically aligned grains may still dominate the polarization observed in
some protostellar systems if the grains have relatively small sizes and/or
their magnetic susceptibility is greatly enhanced by SPIs.

We also note that, while the preference of the B-vectors to align with the
major axis of the disk is clear in the ALMA data, they could be offset by up
to $\sim 45^{\circ}$ (see Sec. 2; also see Fig. 6). Since we derived the
direction of the disk major axis from the outflow orientation, which has a
relatively low uncertainty (typically $\lesssim 10^{\circ}$; see e.g.,
Stephens et al. 2018), this offset is likely real if the outflow is launched
perpendicular to the disk, as generally expected. It is possible that in the
systems with large polarization-disk orientation offsets (Per 5, Per 11, Per
18, and Per 26; see Fig. 6), the scattering-induced polarization on the disk
scale is contaminated by that from magnetically aligned grains, whose
orientation can deviate significantly from the disk major axis (see, e.g., the
top panel of Fig. 3). Higher resolution observations are needed to test this
possibility.

##  6 Summary

We have re-analyzed the ALMA Band 7 polarization data from Cox et al. (2018)
for deeply embedded protostars in the Perseus molecular cloud on the scales of
inner protostellar envelopes and disks. A simple dust polarization model was
constructed based on recent theoretical work by Yang (2021) and the non-ideal
MHD disk formation simulations of Lam et al. (2019) to explain the
observational trends. Our main results are summarized as follows:

1\. Using scatter plots, we quantified the observational trends first
identified in Cox et al. (2018) that the polarization fraction stays
relatively constant at a typical level of $\sim 1\%$ on the disk scale
($r\lesssim R_{10\%}$) and increases sharply going from the disk to the
envelope scale (see the left panel of Fig. 1). In addition, the polarization
(B-)vectors tend to orient more perpendicular than parallel to outflow axis
(right panel of Fig. 1), indicating a preferential alignment with the disk
major axis, under the assumption that all polarization is from magnetically
aligned grains. These quantitative behaviors provide guidance to theoretical
models of dust polarization in the earliest phases of low-mass star formation.

2\. Using MHD simulations of disk formation enabled by a combination of
ambipolar diffusion and turbulence (Lam et al., 2019), we showed that the
observed sharp reduction of polarization fraction from the envelope to disk
scale cannot be explained by the magnetic field geometry alone. The magnetic
field on the disk scale is rather well ordered (see Fig. 2) and produces an
intrinsic polarization fraction comparable to that in the envelope. Beam
averaging can significantly reduce the polarization fraction on the disk
scale, making it more consistent with the typically observed values. It
cannot, however, make the orientations of the polarization (B-)vectors
preferentially align with the system major axis (see Fig. 3, first row), which
is one of the observed trends.

3\. Our MHD simulations show that the magnetic field strength increases from
the envelope to the disk scale (Fig. 4a,d), which tends to increase the
ability of the magnetic field to align the spinning grains. However, this
tendency is overwhelmed by the much faster increase in density (Fig. 4b,d),
making grain alignment more difficult through more frequent gas collisions. We
show that large, mm-sized grains cannot be aligned by the magnetic field on
the disk scale to produce the typically observed polarization level of $\sim
1\%$ even if their magnetic susceptibility is enhanced by an uncomfortably
large factor of $10^{3}$ (see the second row of Fig. 3). In order for such
large grains to be aligned well enough to account for the percent level
polarization, the enhancement factor must reach a factor of $\sim 2\times
10^{4}$ (see the third row of Fig. 3), which is unlikely since it is close to
the maximum factor estimated for the extreme case of metallic iron as the
material for superparamagnetic inclusions. For smaller grains, the required
enhancement factor is less extreme. For example, for 1 $\mu$m grains, it is a
factor of 20, which is still quite significant; it is unclear whether such an
enhancement can be naturally achieved or not. Even if the required enhancement
can be achieved, the resulting polarization (B-vector) orientation does not
show a preference for the major axis on the disk scale, which is inconsistent
with the observed trend.

4\. The model most consistent with the observed trends is the one where the
polarization on the envelope scale is dominated by magnetically aligned grains
(with a relatively large maximum polarization fraction of order $10\%$) and by
scattering on the disk scale. The former is consistent with the expectation
that the grains in the low-density envelope remain relatively small and thus
more easily aligned magnetically because of fast Larmor precession and long
gas damping timescale. The latter requires grains of order $0.1$ mm in order
to efficiently produce polarization at (sub)millimeter wavelengths through
scattering.

## Acknowledgements

KHL acknowledges support from NRAO ALMA SOS awards and NSF AST-1716259. CYC is
supported in part by VITA (Virginia Institute for Theoretical Astrophysics)
and NSF AST-1815784. ZYL is supported in part by NASA 80NSSC20K0533 and
80NSSC18K1095. LWL acknowledges support from NSF AST-1910364. Resources
supporting this work were provided by the NASA High-End Computing (HEC)
Program through the NASA Advanced Supercomputing (NAS) Division at Ames
Research Center based on NASA grant 80NSSC18K0481.

## Data Availability

The data underlying this article will be shared on reasonable request to the
corresponding author.

## References

  * Andersson et al. (2015) Andersson B. G., Lazarian A., Vaillancourt J. E., 2015, ARA&A, 53, 501
  * Barnett (1915) Barnett S. J., 1915, Physical Review, 6, 239
  * Bean & Livingston (1959) Bean C. P., Livingston J. D., 1959, Journal of Applied Physics, 30, S120
  * Chen et al. (2019) Chen C.-Y., et al., 2019, MNRAS, 490, 527
  * Cox et al. (2018) Cox E. G., Harris R. J., Looney L. W., Li Z.-Y., Yang H., Tobin J. J., Stephens I., 2018, ApJ, 855, 92
  * Draine (1996) Draine B. T., 1996, in Roberge W. G., Whittet D. C. B., eds, Astronomical Society of the Pacific Conference Series Vol. 97, Polarimetry of the Interstellar Medium. p. 16 (arXiv:astro-ph/9603053)
  * Fiege & Pudritz (2000) Fiege J. D., Pudritz R. E., 2000, ApJ, 544, 830
  * Hull & Zhang (2019) Hull C. L. H., Zhang Q., 2019, Frontiers in Astronomy and Space Sciences, 6, 3
  * Hull et al. (2017) Hull C. L. H., et al., 2017, ApJ, 847, 92
  * Hull et al. (2020) Hull C. L. H., Le Gouellec V. J. M., Girart J. M., Tobin J. J., Bourke T. L., 2020, ApJ, 892, 152
  * Jones & Spitzer (1967) Jones R. V., Spitzer Lyman J., 1967, ApJ, 147, 943
  * Kataoka et al. (2012) Kataoka A., Machida M. N., Tomisaka K., 2012, ApJ, 761, 40
  * Kataoka et al. (2015) Kataoka A., et al., 2015, ApJ, 809, 78
  * Kataoka et al. (2016) Kataoka A., Muto T., Momose M., Tsukagoshi T., Dullemond C. P., 2016, ApJ, 820, 54
  * Ko et al. (2020) Ko C.-L., Liu H. B., Lai S.-P., Ching T.-C., Rao R., Girart J. M., 2020, ApJ, 889, 172
  * Kuffmeier et al. (2020) Kuffmeier M., Reissl S., Wolf S., Stephens I., Calcutt H., 2020, A&A, 639, A137
  * Kwon et al. (2019) Kwon W., Stephens I. W., Tobin J. J., Looney L. W., Li Z.-Y., van der Tak F. F. S., Crutcher R. M., 2019, ApJ, 879, 25
  * Lam et al. (2019) Lam K. H., Li Z.-Y., Chen C.-Y., Tomida K., Zhao B., 2019, MNRAS, 489, 5326
  * Lazarian (2007) Lazarian A., 2007, J. Quant. Spectrosc. Radiative Transfer, 106, 225
  * Le Gouellec et al. (2019) Le Gouellec V. J. M., et al., 2019, ApJ, 885, 106
  * Le Gouellec et al. (2020) Le Gouellec V. J. M., et al., 2020, A&A, 644, A11
  * Lee et al. (2017) Lee J. W. Y., Hull C. L. H., Offner S. S. R., 2017, ApJ, 834, 201
  * Lin et al. (2020) Lin Z.-Y. D., Li Z.-Y., Yang H., Looney L., Lee C.-F., Stephens I., Lai S.-P., 2020, MNRAS, 493, 4868
  * Maury et al. (2018) Maury A. J., et al., 2018, MNRAS, 477, 2760
  * McKee & Ostriker (2007) McKee C. F., Ostriker E. C., 2007, ARA&A, 45, 565
  * Morrish (1980) Morrish A. H., 1980, The Physical Principles of Magnetism. Wiley series on the science and technology of materials, R. E. Krieger Publishing Company, https://books.google.com/books?id=ZjUbAQAAIAAJ
  * Ossenkopf & Henning (1994) Ossenkopf V., Henning T., 1994, A&A, 291, 943
  * Padovani et al. (2012) Padovani M., et al., 2012, A&A, 543, A16
  * Planck Collaboration Int. XIX (2015) Planck Collaboration Int. XIX 2015, A&A, 576, A104
  * Purcell (1979) Purcell E. M., 1979, ApJ, 231, 404
  * Purcell & Spitzer (1971) Purcell E. M., Spitzer Lyman J., 1971, ApJ, 167, 31
  * Reissl et al. (2016) Reissl S., Wolf S., Brauer R., 2016, A&A, 593, A87
  * Roberge et al. (1993) Roberge W. G., Degraff T. A., Flaherty J. E., 1993, ApJ, 418, 287
  * Sadavoy et al. (2018a) Sadavoy S. I., et al., 2018a, ApJ, 859, 165
  * Sadavoy et al. (2018b) Sadavoy S. I., et al., 2018b, ApJ, 869, 115
  * Sadavoy et al. (2019) Sadavoy S. I., et al., 2019, ApJS, 245, 2
  * Segura-Cox et al. (2018) Segura-Cox D. M., et al., 2018, ApJ, 866, 161
  * Shu (1992) Shu F. H., 1992, The Physics of Astrophysics: Gas dynamics. Series of books in astronomy, University Science Books, https://books.google.com/books?id=50VYSc56URUC
  * Stephens et al. (2017) Stephens I. W., et al., 2017, ApJ, 846, 16
  * Stephens et al. (2018) Stephens I. W., et al., 2018, ApJS, 237, 22
  * Stone et al. (2008) Stone J. M., Gardiner T. A., Teuben P., Hawley J. F., Simon J. B., 2008, ApJS, 178, 137
  * Takahashi et al. (2019) Takahashi S., Machida M. N., Tomisaka K., Ho P. T. P., Fomalont E. B., Nakanishi K., Girart J. M., 2019, ApJ, 872, 70
  * Tazaki et al. (2017) Tazaki R., Lazarian A., Nomura H., 2017, ApJ, 839, 56
  * Tobin et al. (2015) Tobin J. J., et al., 2015, ApJ, 805, 125
  * Tobin et al. (2016) Tobin J. J., et al., 2016, ApJ, 818, 73
  * Valdivia et al. (2019) Valdivia V., Maury A., Brauer R., Hennebelle P., Galametz M., Guillet V., Reissl S., 2019, MNRAS, 488, 4897
  * Yang (2021) Yang H., 2021, arXiv e-prints, p. arXiv:2103.10243
  * Yang et al. (2016) Yang H., Li Z.-Y., Looney L., Stephens I., 2016, MNRAS, 456, 2794
  * Yang et al. (2017) Yang H., Li Z.-Y., Looney L. W., Girart J. M., Stephens I. W., 2017, MNRAS, 472, 373
  * Yen et al. (2020) Yen H.-W., et al., 2020, ApJ, 893, 54
  * Zucker et al. (2019) Zucker C., Speagle J. S., Schlafly E. F., Green G. M., Finkbeiner D. P., Goodman A. A., Alves J., 2019, ApJ, 879, 125

##  Appendix A Deprojected Polarization Results for Individual Sources

In this appendix, we describe the procedure for deprojecting the dust
continuum map to obtain the distributions of the polarization fraction and
orientation as a function of the radius for 8 of the 10 protostellar systems
reported in Cox et al. (2018). As discussed in Section 2, we define a disk
plane for each source based on its outflow direction inferred from the MASSES
survey (Stephens et al., 2017, 2018)). The inclination angle of a system to
the plane of the sky could be more uncertain unless a well-defined dust disk
is observed and fitted. This is the case for 3 of our 8 targets using the
analysis from the VLA Nascent Disk and Multiplicity Survey of Perseus
Protostars (VANDAM; Segura-Cox et al. 2018). We thus use the protostellar
disks-fitted inclination angles for these three systems (Per-emb-11, Per-
emb-14, Per-emb-50). For the remaining protostellar systems without well-
established disks, we adopt a single value of $45^{\circ}$; the exact value
adopted for the inclination angle does not change our conclusions
qualitatively.

To compare the polarization data from disks with different sizes, we normalize
the distance from the center by a characteristic radius $R_{\rm 10\%}$. As
described in Section 2, it is the radius of a circle that encloses the same
area as the ellipse at 10% maximum intensity from 2D Gaussian fitting of the
ALMA Band 7 Stokes I image. It is not our intention to claim that $R_{\rm
10\%}$ represents the actual disk radius, although the transition from disk-
scale to envelope-scale polarization patterns does seem to happen between
$\sim 1-2~{}R_{\rm 10\%}$ for all protostellar systems investigated in this
study (see e.g., Fig. 1).

The effects of the deprojection and radius normalization are illustrated in
Fig. 5 for Per-emb-14. The middle column shows the polarization fraction as a
function of distance to the center of the system (defined as the location of
the peak intensity), both before (top) and after (middle) the deprojection,
and after the normalization with $R_{\rm 10\%}$ (bottom). The normalization
suggests that the transition from flat (disk-scale) to steep (envelope-scale)
$p-r$ correlation happens roughly at $R_{\rm 10\%}$ (vertical dotted line in
the middle panel). The right column of Fig. 5 shows the corresponding polar
plot of the polarization orientations. Note that our deprojection routine only
provides a correction on the distance to the system center and does not modify
the orientation of the polarization segments; this is the reason why the
distributions of polarization orientations in the polar plots (the right
panels of Fig. 5) are barely impacted by the deprojection process.

Figure 5: Demonstration of the deprojection and renormalization effects on
observation data, using Per 14 as the example. Left: total intensity map (in
Jy/beam) and polarization (B-)vectors from ALMA Band 7 observation presented
in Cox et al. (2018), with outflow directions indicated by blue and red arrows
and beam in the lower left corner. The Gaussian-fitted $10\%$ peak intensity
contour (purple ellipse) and the inferred disk adopted in the deprojection
process (radius $=R_{\rm 10\%}$ and inclination $=45^{\circ}$; black dashed
ellipse) are also marked. Middle and right: similar to Fig. 1 but for the
original (top), deprojected (middle), and deprojected and normalized (bottom)
data of Per 14. The polarization fraction is color coded, with the color bar
shown on the right. Table 2: Deprojection parameters for individual sources

Target | PAa | inclinationb | $R_{\rm 10\%}$ | regridded | regridded
---|---|---|---|---|---
| $(^{\circ})$ | $(^{\circ})$ | (au) | $0.1^{\prime\prime}$ | $0.2^{\prime\prime}$
Per 2 | 39 | 45 | 311 | 301 | 313
Per 5 | 35 | 45 | 126 | 126 | 139
Per 11 | 72 | 44c | 138 | 137 | 154
Per 14 | 5 | 64c | 123 | 121 | 134
Per 18 | 60 | 45 | 161 | 158 | 166
Per 26 | 72 | 45 | 109 | 109 | 125
Per 29 | 42 | 45 | 117 | 117 | 136
Per 50 | 14 | 67c | 103 | 103 | 126

Notes. (a) The disk major axis is taken to be perpendicular to the outflow
direction given in Stephens et al. (2018). (b) Assumed to be $45^{\circ}$
unless otherwise noted. (c) From Segura-Cox et al. (2018).

Figure 6: Summary of the ALMA Band 7 polarization observations toward the 8
protostellar systems investigated in this study (with the exception of Per 14)
and the deprojection results. Plotted are the ALMA Band 7 polarization
B-vector map (left column) superposed on the dust continuum (background color
map in Jy/beam with mask $I>5\sigma_{I}$, outflow direction indicated by red
and blue arrows and beam in the lower right corner), the scatter plots of the
polarization fraction as a function of the normalized distance (middle column;
darker color means more pixels), and the scatter plots of the B-vector
orientations ($0^{\circ}$ for north, right column) with the “disk plane”
defined from the outflow direction marked as the dashed horizontal cyan line
(i.e., the polar plots are rotated so that the position angle of the disk is
horizontal). The polarization fraction is color coded, with the color bar
shown on the right.

Fig. 6 summarizes the deprojection results for the 8 ALMA targets considered
in this study except for Per-emb-14, which is presented in Fig. 5. The
deprojection parameters (position angle, inclination angle, normalized radius
$R_{\rm 10\%}$) for individual systems are listed in Table 2. The disk-to
envelope transition of the $p-r$ correlation at the distance $\sim 1-2R_{\rm
10\%}$ is clear in all systems. We would like to point out that such
transition is not an artificial result of our deprojection routine; in fact,
it could also be seen even before deprojection (see e.g., Fig. 5), and the
deprojection simply highlights this transition.

##  Appendix B Extinction of Polarized Emission

To properly account for the extinction of polarized emission, one needs to
solve the vector radiation transfer equation:

$\frac{d}{\rho\,ds}\mathbf{S}=-\mathcal{K}\,\mathbf{S}+B_{\nu}(T)\,\mathbf{a}.$
(11)

where $\mathbf{S}=(I,Q,U)$ is the radiation (Stokes) vector, $s$ the distance
along the light path, and $B_{\nu}(T)$ the Planck function. The extinction
matrix $\mathcal{K}$ and absorption vector $\mathbf{a}$ are related to the
extinction and polarization opacities, $C_{e}$ and $C_{p}$, by (see e.g. the
POLARIS code Reissl et al., 2016)

$\displaystyle\mathcal{K}=\left(~{}\begin{matrix}C_{e}&C_{p}\cos
2\psi&C_{p}\sin 2\psi\\\ C_{p}\cos 2\psi&C_{e}&0\\\ C_{p}\sin
2\psi&0&C_{e}\end{matrix}~{}\right),$ (12a)
$\displaystyle\mathbf{a}=\left(~{}\begin{matrix}C_{e}&C_{p}\cos
2\psi&C_{p}\sin 2\psi\end{matrix}~{}\right)^{T},$ (12b)

where $\psi$ is the angle between the magnetic field and the direction of
positive $Q$ in the sky plane. Taking into account of the magnetic alignment
condition, as specified by the magnetic alignment probability $A$, defined in
equation (10), we have the extinction and polarization opacities given by:

$\displaystyle C_{e}$
$\displaystyle=\kappa\left\\{1-\alpha\left[A\left(\frac{\cos^{2}\gamma}{2}-\frac{1}{3}\right)+\frac{1-A}{6}\right]\right\\},$
(13a) $\displaystyle C_{p}$ $\displaystyle=\kappa\,\alpha\,A\,\cos^{2}\gamma,$
(13b)

where $\kappa$ is the dust opacity (cross-section per gram of gas rather than
dust), which is taken to be $\kappa=1.75\times 10^{-2}\,\mathrm{cm^{2}/g}$
(assuming a gas-to-dust mass ratio of 100) at Band 7 (Ossenkopf & Henning,
1994, logarithmically interpolated at 870 $\mu$m).

One way to solve the vector radiative transfer equation (11) is through the
formal solution for the Stokes vector

$\mathbf{S}=\int\mathcal{T}(s)\,\frac{\mathbf{a}+\mathbf{a}_{\mathrm{sca}}}{\kappa}\,\rho\,ds$
(14)

where the vector

$\mathbf{a}_{\mathrm{sca}}=\left(~{}\begin{matrix}0&-p_{\mathrm{sca}}\,(1-A)\,C_{e}&0\end{matrix}~{}\right)^{T}$
(15)

accounts for the scattering-induced polarization included in one of the models
in those simulation cells where the magnetic alignment condition is not met
(i.e., $A=0$), and the matrix $\mathcal{T}(s)$ is obtained from the integral

$\mathcal{T}(s)=\Pi_{s}^{\infty}e^{-\mathcal{K}(s^{\prime})ds^{\prime}}$ (16)

where $\Pi_{s}^{\infty}$ denotes the (order-preserved) geometric integration
along the light path from the point of interest ($s$) to the “observer” at
infinite distance of a function with a matrix exponential. Note that the
Stokes parameters (I, Q, U) obtained from equation (14) at a given frequency
$\nu$ are normalized by the product $\kappa B_{\nu}(T)$ at the frequency, as
in equation (8) for the optical thin limit. Indeed, equation (14) reduces back
to equation (8) by setting $A=1$ (magnetically aligned everywhere) and
$\kappa\rightarrow 0$ (optically thin).


# Case-Enhanced Vision Transformer:
Improving Explanations of Image Similarity with a ViT-based Similarity Metric

Ziwei Zhao1 David Leake1 Xiaomeng Ye2&David Crandall1
1Indiana University, Bloomington IN 47408, USA
2Berry College, Mount Berry GA 30149, USA
{zz47, leake<EMAIL_ADDRESS><EMAIL_ADDRESS>
###### Abstract

This short paper presents preliminary research on the Case-Enhanced Vision
Transformer (CEViT), a similarity measurement method aimed at improving the
explainability of similarity assessments for image data. Initial experimental
results suggest that integrating CEViT into k-Nearest Neighbor (k-NN)
classification yields classification accuracy comparable to state-of-the-art
computer vision models, while adding capabilities for illustrating differences
between classes. CEViT explanations can be influenced by prior cases, to
illustrate aspects of similarity relevant to those cases. 111This paper has
been accepted at the IJCAI 2024 Workshop on Explainable Artificial
Intelligence (XAI).

##  1 Introduction

In computer vision, Convolutional Neural Networks (CNNs) for image
classification have achieved remarkable performance, but are black-box systems
that cannot be explained directly (Adadi and Berrada, 2018). In contrast,
traditional machine learning algorithms such as k-Nearest Neighbors (k-NN) are
inherently interpretable, due to the ability to present the examples on which
decisions are based. However, their accuracy tends to lag behind that of
modern ML models.

The interpretability of k-NN stems from its reliance on existing data. This
process is analogous to Case-Based Reasoning (CBR), a traditional AI paradigm
that involves solving new problems by recalling and adapting solutions from
past experiences, or ”cases”. The interpretability of CBR systems has long
been seen as an important strength, and human subjects studies support that
cases provide compelling explanations. (Cunningham et al., 2003; Gates et al.,
2023).

The core factor impacting the performance of k-NN is the similarity
measurement function it uses. Traditional methods for determining similarity,
such as L1 or L2 distance, prove inadequate for image data. This is because
two images may not align perfectly, and attempting to explain visually by
contrasting two images in pixel space results in a blurry image lacking
explanatory information. Similarity measurement is also important for CBR
studies to explain why a particular case was retrieved (Massie et al., 2004),
and for cases with feature-vector problem representations, explanations may be
based on feature-by-feature comparisons. This approach is not useful for
images processed on the pixel level.

Humans excel at explaining the differences between images concisely and
accurately, commonly using more abstract image characteristics to underpin
their explanations. For instance, as depicted in Figure 1(a), it is plausible
that the difference between an image of the digit 7 and an image of the digit
9 as characterized by a human would lie in the upper stroke, as shown by the
red boxes. Recent advances in computer vision include highly accurate
similarity measurement models, such as Siamese Neural Networks (Koch et al.,
2015; Leal-Taixé et al., 2016). Despite their high performance, these methods
share the same issue that they operate as black boxes. They commonly use
convolutional Neural Networks (CNNs) to generate features for determining
similarity resulting in two potential pitfalls: the process of feature
generation lacks explainability, and the features themselves may have limited
visual connection to the original image.

(a) Human explanations.

(b) CEViT explanations.

Figure 1: Explaining class differences.

The Vision Transformer (ViT) (Dosovitskiy et al., 2020) stands out as a
revolutionary architecture. Unlike conventional CNNs, ViT uses a transformer
architecture (Vaswani et al., 2017), enabling it to capture dependencies
across subpatches of an image. This approach has yielded remarkable
performance across various computer vision tasks, such as classification,
object detection, and segmentation.

The core of a transformer model is the Query-Key-Value (QKV) attention
mechanism. The QKV mechanism computes attention scores between query (Q) and
keys (K), determining the relevance and importance of each value (V) with
respect to the query. The attention scores (Q$\times$K) offer great potential
for explainability, as they naturally highlight the parts of the query that
are important during the process. Unfortunately, in traditional classification
tasks, these attention scores may have limited explanatory value. This
limitation arises from the system’s need to consider every possible class
during decision-making, often resulting in a widespread attention distribution
over the entire input.

Drawing inspiration from CBR, this paper presents the Case-Enhanced Vision
Transformer (CEViT), a ViT-based similarity measurement method aimed at
enhancing similarity assessment for image data. Initial experimental results
suggest that a k-NN model using CEViT as the similarity metric offers two
potential explainability advantages compared to image classification using
CNNs and ViT:

  * •

It yields comparable classification accuracy to state-of-the-art computer
vision methods, while retaining the inherent benefit of utilizing reference
cases.

  * •

The attention scores generated by CEViT can effectively illustrate the
differences between classes, as depicted in Figure 1(b).

The code for CEViT is publicly available at
https://github.com/ziweizhao1993/CEViT.

##  2 Related Work

###  2.1 Explainable AI for Computer Vision

Modern computer vision techniques have gained huge success through the use of
deep learning models. These models often operate as black boxes due to their
vast number of parameters and complex layer connections, making it challenging
to understand their inner function. Tremendous effort has been devoted to
opening the black box by explaining their decision making process. As some
examples, Saliency maps highlight regions in an image that are most activated
for the system’s prediction (Simonyan et al., 2013); Grad-CAM uses the
gradients of a target concept (e.g., a dog in an image) in convolutional
layers to produce a coarse localization map (Selvaraju et al., 2017);
Attention mechanisms assign weights to parts of the input image and higher
weights indicate more importance in the model’s decision (Guo et al., 2022).

###  2.2 Applying CBR to Image Data

CBR can be applied to many tasks that involve image inputs. In contrast to
common computer vision techniques, CBR methods can provide similar prior cases
as explanations of current decisions. Ye et al. (2021) applied the Case
Difference Heuristic (CDH) approach for learning case adaptations to predict
age from facial images. The Class-to-Class Variational Autoencoder (Ye et al.,
2022; Zhao et al., 2022) learns inter-class patterns, showing potential in
few-shot image generation and counterfactual visual explanations. Kenny and
Keane (2020) proposed PIECE, a method that modifies “exceptional” features in
images to generate counterfactual explanations for black-box CNN classifiers.
Kenny and collaborators (Kenny and Keane, 2019; Kenny et al., 2021) introduced
a twin-system that pairs a black box Neural Network with a white box CBR
system to identify nearest neighbor cases explaining image classification
outcomes. Ye et al. (2020) integrates CBR with a Siamese Network for image
classification and discovering prototypical cases. Our work contrasts with
previous research by using the Vision Transformer, a novel backbone model in
computer vision, instead of a traditional CNN.

###  2.3 Similarity Metrics in CBR

Case retrieval in CBR relies on a similarity metric to determine the distances
between cases. For simple data sets in which the problem addressed by the case
is described as a feature vector, Euclidean distance may suffice. Metric
learning methods such as NCA (Goldberger et al., 2004) and LMNN (Weinberger
and Saul, 2009) transforming the input space to enhance accuracy. Mathisen et
al. (2019) proposed and extended siamese neural network that learns an
embedding of cases and calculates distances between cases. For high
dimensional, complex, or structural data (e.g. audio, video, image, text),
deep learning models are often used to extract features to which the
similarity metric is applied (Sani et al., 2017; Wilkerson et al., 2021;
Turner et al., 2018).

##  3 The CEViT Method

In this section, we begin by explaining the design of our transformer model
(CEViT). Then, we show the procedure for accessing the attention mask of the
transformer model to enhance model explainability. Finally, we present a
classification pipeline that combines CEViT with k-NN by using CEViT as the
distance metric for k-NN.

###  3.1 Model design

We follow the model design of the Vision Transformer (ViT) introduced in
Dosovitskiy et al. (2020). Traditionally, ViT comprises 3 modules:

  * •

Patchify process: It splits the input image into smaller patches and processes
them into tokens via linear projection and positional embedding, as shown in
Figure 2.

  * •

Transformer module: This module comprises encoder blocks consisting of
normalization, MLP (Multi-Layer Perceptron), and multi-head attention layers.

  * •

MLP head: This produces the desired output, such as class labels ranging from
0 to 9 for digit recognition task.

Our method, CEViT, modifies ViT in two ways. First, instead of taking a single
h$\times$w$\times$c image as input, CEViT concatenates the input image with a
reference image along the channel dimension, resulting in an image-like tensor
with dimensions h$\times$w$\times$2c. Second, we modify the MLP head to
produce a single score between 0 and 1, indicating the likelihood that the two
images belong to the same class. Figure 3 illustrates the ViT and CEViT
processes. For an explanation of each ViT module, please see Dosovitskiy et
al. (2020).

Figure 2: The patchify process

(a) Traditional ViT

(b) Case-Enhanced ViT (CEViT)

Figure 3: Given an input image (or image-like tensor), the patchify process
divides it into $N^{2}$ smaller image patches (in this example, $N=4$). These
image tokens, along with a classification token, are then fed into the
transformer model to produce the output.

###  3.2 Attention Mask

During the inference of a ViT model, each encoder block computes an attention
mask between tokens. Typically, ViT includes an additional CLS
(classification) token, utilizing it as an aggregate representation for all
tokens to generate the final prediction. Consequently, we can trace back the
attention masks at each encoder level to observe how the CLS token attended to
the image tokens, with each token representing a region in the original image,
as shown in Figure 4. Hence, these attention masks can be used to visualize
how each region of the original image influenced the final classification.

In CEViT, by augmenting the input image with the reference image, the
attention masks visualize the regions that influenced the similarity or
dissimilarity between the query image and the reference image. This visual
representation is particularly valuable for explaining classification
differences.

Figure 4: Accessing the attention mask between the classification token and M
image tokens in a transformer model with L encoders.

###  3.3 Using CEViT for classification

To employ CEViT for classification, we integrate it into a k-NN system by
running CEViT between the query image and reference images from each class.
The K samples with the highest similarity scores then vote for the final
prediction.

##  4 Experiments

We evaluated the classification accuracy and explainability of CEViT against a
standard ViT and k-NN on the MNIST LeCun et al. (1998) dataset.

###  4.1 Implementation Details

We implemented both ViT and CEViT using the Pytorch framework (Paszke et al.,
2019) and the Torchvision library (maintainers and contributors, 2016). To
ensure a fair comparison, we used the same backbone for both ViT and CEViT,
incorporating a patchify module that subdivides the input into 49 ($7\times
7$) small patches, and a transformer module consisting of 6 encoder layers.

During training, CEViT was given pairs of images, each with a 50% probability
of being from the same class. The output of CEViT is a score between 0 and 1,
indicating the likelihood that the images belong to the same class. We then
applied cross-entropy loss, where a ground truth label of 0 (resp. 1)
indicates different (resp. same) classes.

Both ViT and CEViT were trained for 200 epochs using the AdamW optimizer
(Loshchilov and Hutter, 2017) with an empirically set learning rate of 0.001.
We decreased the rate by 10% per 20 epochs. For classification, we integrated
CEViT into a k-NN with K=15, chosen empirically.

###  4.2 Quantitative Evaluation

We first compare the fundamental performance of ViT, k-NN with Euclidean
distance, and k-NN using CEViT as similarity measure. As shown in Table 1, the
classification accuracy of CEViT+k-NN is higher than k-NN and comparable to
that of ViT. Meanwhile, CEViT preserves the advantage of k-NN by providing
nearest cases as explanations and can generate attention masks more related to
class differences, potentially leading to better explainability.

Method | Classification accuracy | Nearest neighbors | Attention mask | Inter-class attention mask
---|---|---|---|---
k-NN | 97.1% | Yes | No | No
ViT | 99.1% | No | Yes | No
CEViT+k-NN | 99.0% | Yes | Yes | Yes
Table 1: Comparison between k-NN, ViT and CEViT. CEViT achieved similar
accuracy on MNIST compared to ViT, while also having better explainability
potential.

We also introduce a quantitative evaluation method to assess the
explainability of the generated attention masks. The method is based on the
premise that the parts of an image contributing to class differences best
explain classifications, and that the extent to which a mask identifies such
parts can be judged by its ability to guide the modification of a query image
to match a distractor class.

Figure 5: The quantitative evaluation process. Following the patchify process, image patches from both the query image and the distractor image are merged based on the normalized masks. These hybrid tokens are used to compute updated class likelihoods. Method | ViT(first layer) | ViT(last layer) | ViT(Avg.) | CEViT(first layer) | CEViT(last layer) | CEViT(Avg.)
---|---|---|---|---|---|---
Distraction score$\uparrow$ | -0.0030 | -0.0062 | -0.0037 | 0.0286 | 0.0368 | 0.0259
Table 2: Results of our quantitative evaluation. Results from our quantitative
evaluation indicate that ViT performs comparably to the baseline (a uniform
mask). However, the masks generated by CEViT are more effective in diverting
the query image towards the distractor class. This suggests that CEViT is
better at illustrating the differences between classes.

As depicted in Figure 5, we start by selecting a query image with class $q$
and a distractor image with class $d$. Subsequently, we conduct classification
of the query image using both ViT and CEViT, resulting in attention masks
$M_{V}$ and $M_{C}$. Additionally, we employ a uniform mask $M_{U}$ with
consistent values across all pixels. The uniform mask $M_{U}$ serves as a
baseline, against which we assess the relative performance improvements of ViT
and CEViT. All three attention masks are normalized to have the same mean
value $\mu$. After the patchify process which divides the images into $N^{2}$
smaller image patches, we acquire image patches $P_{q1}...P_{qN^{2}}$ and
$P_{d1}...P_{dN^{2}}$, and merge them into hybrid patches
$P_{h1}...P_{hN^{2}}$ using the following equation:

$P_{hi}=(1-M_{i})P_{qi}+M_{i}P_{di}\qquad i\in{\\{1,...,N^{2}\\}}$ (1)

In the equation above, $M_{i}$ represents the value in mask $M$ corresponding
to the $i$th image patch, indicating the importance of that patch toward the
final prediction.

After the merge step, we use them to generate hybrid image tokens and feed the
three sets of hybrid tokens created by $M_{V}$, $M_{C}$, and $M_{U}$ into the
transformer module to compute the likelihoods for each class, resulting in
$P_{V}$, $P_{U}$, and $P_{C}$ respectively. Subsequently, we use the following
equation to determine the distraction scores for ViT and CEViT:

$\displaystyle S_{V}=P_{V}(d)-P_{U}(d)$ (2) $\displaystyle
S_{C}=P_{C}(d)-P_{U}(d)$ (3)

To better explain this process, consider the example depicted in Figure 5.
Here, we have a query image with class $q=6$ and a distractor image with class
$d=8$. Upon merging their image patches, guided by the masks, we recompute the
probability of each class. By ensuring the query image is modified by an equal
degree (achieved through normalization of all masks to maintain the same mean
value $\mu$), the hybrid tokens generated from masks that effectively
illustrate the difference between classes 6 and 8 should exhibit a higher
probability for class 8 (the distractor class).

We tested six attention masks generated by ViT and CEViT from the first
encoder layer, last encoder layer, and the average of all layers on 10 hand-
selected pairs of similar MNIST classes (e.g., 1 and 7), with scores averaged.
Table 2 shows that CEViT’s attention masks are better than ViT’s in modifying
images towards the distractor class, demonstrating our model’s enhanced
capability for explaining class differences.

Figure 6: Qualitative Results

###  4.3 Qualitative Evaluation

We present several qualitative results in Figure 6. To enhance visualization,
we sharpened the attention masks of both CEViT and ViT by scaling them to a
range of 0-1 and subsequently filtering out pixels with values less than 0.5.
As shown in Figure 6, the attention masks generated by CEViT are notably more
focused and better illustrate class differences compared to those generated by
ViT. The supplementary materials provide additional qualitative samples.

##  5 Conclusion and Future Work

In this paper, we introduce the Case-Enhanced Vision Transformer (CEViT), a
novel similarity metric for the CBR retrieval process. Initial experiments
show encouraging classification performance for CEViT combined with KNN, along
with the capability to explain class differences by generating attention
masks. We highlight two directions for future research: Investigating CEViT’s
performance on more challenging dataset, and using CEViT’s capabilities to
assist in generating counterfactual and semi-factual explanations.

##  6 Acknowledgements

We thank Lawrence Gates for his helpful comments on a draft of this paper.

## References

  * Adadi and Berrada [2018] Amina Adadi and Mohammed Berrada.  Peeking inside the black-box: a survey on explainable artificial intelligence (xai).  IEEE access, 6:52138–52160, 2018.
  * Cunningham et al. [2003] P. Cunningham, D. Doyle, and J. Loughrey.  An evaluation of the usefulness of case-based explanation.  In Case-Based Reasoning Research and Development: Proceedings of the Fifth International Conference on Case-Based Reasoning, ICCBR-03, pages 122–130, Berlin, 2003. Springer-Verlag.
  * Dosovitskiy et al. [2020] Alexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn, Xiaohua Zhai, Thomas Unterthiner, Mostafa Dehghani, Matthias Minderer, Georg Heigold, Sylvain Gelly, et al.  An image is worth 16x16 words: Transformers for image recognition at scale.  arXiv preprint arXiv:2010.11929, 2020.
  * Gates et al. [2023] Lawrence Gates, David Leake, and Kaitlynne Wilkerson.  Cases are king: A user study of case presentation to explain cbr decisions.  In International Conference on Case-Based Reasoning, pages 153–168. Springer, 2023.
  * Goldberger et al. [2004] Jacob Goldberger, Geoffrey E Hinton, Sam Roweis, and Russ R Salakhutdinov.  Neighbourhood components analysis.  In L. Saul, Y. Weiss, and L. Bottou, editors, Advances in Neural Information Processing Systems, volume 17. MIT Press, 2004.
  * Guo et al. [2022] Meng-Hao Guo, Tian-Xing Xu, Jiang-Jiang Liu, Zheng-Ning Liu, Peng-Tao Jiang, Tai-Jiang Mu, Song-Hai Zhang, Ralph R. Martin, Ming-Ming Cheng, and Shi-Min Hu.  Attention mechanisms in computer vision: A survey.  Computational Visual Media, 8(3):331–368, 2022.
  * Kenny and Keane [2019] Eoin M Kenny and Mark T Keane.  Twin-systems to explain artificial neural networks using case-based reasoning: Comparative tests of feature-weighting methods in ann-cbr twins for xai.  In Kraus, S.(ed.). Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence, 2019.
  * Kenny and Keane [2020] Eoin M. Kenny and Mark T. Keane.  On generating plausible counterfactual and semi-factual explanations for deep learning, 2020.
  * Kenny et al. [2021] Eoin M Kenny, Courtney Ford, Molly Quinn, and Mark T Keane.  Explaining black-box classifiers using post-hoc explanations-by-example: The effect of explanations and error-rates in xai user studies.  Artificial Intelligence, 294:103459, 2021.
  * Koch et al. [2015] Gregory Koch, Richard Zemel, Ruslan Salakhutdinov, et al.  Siamese neural networks for one-shot image recognition.  In ICML deep learning workshop, volume 2. Lille, 2015.
  * Leal-Taixé et al. [2016] Laura Leal-Taixé, Cristian Canton-Ferrer, and Konrad Schindler.  Learning by tracking: Siamese cnn for robust target association.  2016 IEEE Conference on Computer Vision and Pattern Recognition Workshops (CVPRW), pages 418–425, 2016.
  * LeCun et al. [1998] Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner.  Gradient-based learning applied to document recognition.  Proceedings of the IEEE, 86(11):2278–2324, 1998.
  * Loshchilov and Hutter [2017] Ilya Loshchilov and Frank Hutter.  Decoupled weight decay regularization.  arXiv preprint arXiv:1711.05101, 2017.
  * maintainers and contributors [2016] TorchVision maintainers and contributors.  TorchVision: PyTorch’s Computer Vision library, November 2016.
  * Massie et al. [2004] S. Massie, S. Craw, and N. Wiratunga.  A visualisation tool to explain case-base reasoning solutions for tablet formulation.  In Proceedings of the 24th SGAI International Conference on Innovative Techniques and Applications of Artificial Intelligence, Berlin, 2004. Springer-Verlag.
  * Mathisen et al. [2019] Bjørn Magnus Mathisen, Agnar Aamodt, Kerstin Bach, and Helge Langseth.  Learning similarity measures from data.  Progress in Artificial Intelligence, pages 129–143, 10 2019.
  * Paszke et al. [2019] Adam Paszke, Sam Gross, Francisco Massa, Adam Lerer, James Bradbury, Gregory Chanan, Trevor Killeen, Zeming Lin, Natalia Gimelshein, Luca Antiga, Alban Desmaison, Andreas Kopf, Edward Yang, Zachary DeVito, Martin Raison, Alykhan Tejani, Sasank Chilamkurthy, Benoit Steiner, Lu Fang, Junjie Bai, and Soumith Chintala.  PyTorch: An Imperative Style, High-Performance Deep Learning Library.  In H. Wallach, H. Larochelle, A. Beygelzimer, F. d’Alché Buc, E. Fox, and R. Garnett, editors, Advances in Neural Information Processing Systems 32, pages 8024–8035. Curran Associates, Inc., 2019.
  * Sani et al. [2017] Sadiq Sani, Nirmalie Wiratunga, and Stewart Massie.  Learning deep features for kNN-based human activity recognition.  In Antonio A. Sanchez-Ruiz and Anders Kofod-Petersen, editors, Workshop proceedings of the 25th International conference on case-based reasoning (ICCBR 2017), pages 95–103. CEUR Workshop Proceedings, 2017.
  * Selvaraju et al. [2017] Ramprasaath R. Selvaraju, Michael Cogswell, Abhishek Das, Ramakrishna Vedantam, Devi Parikh, and Dhruv Batra.  Grad-cam: Visual explanations from deep networks via gradient-based localization.  In 2017 IEEE International Conference on Computer Vision (ICCV), pages 618–626, 2017.
  * Simonyan et al. [2013] Karen Simonyan, Andrea Vedaldi, and Andrew Zisserman.  Deep inside convolutional networks: Visualising image classification models and saliency maps.  CoRR, abs/1312.6034, 2013.
  * Turner et al. [2018] J. T. Turner, Michael W. Floyd, Kalyan Moy Gupta, and David W. Aha.  Novel object discovery using case-based reasoning and convolutional neural networks.  In Case-Based Reasoning Research and Development, pages 399–414, Cham, 2018. Springer International Publishing.
  * Vaswani et al. [2017] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N Gomez, Łukasz Kaiser, and Illia Polosukhin.  Attention is all you need.  Advances in neural information processing systems, 30, 2017.
  * Weinberger and Saul [2009] Kilian Q. Weinberger and Lawrence K. Saul.  Distance metric learning for large margin nearest neighbor classification.  J. Mach. Learn. Res., 10:207–244, jun 2009.
  * Wilkerson et al. [2021] Zachary Wilkerson, David B. Leake, and David J. Crandall.  On combining knowledge-engineered and network-extracted features for retrieval.  In Case-Based Reasoning Research and Development, ICCBR-21, pages 248–262. Springer, 2021.
  * Ye et al. [2020] Xiaomeng Ye, David Leake, William Huibregtse, and Mehmet Dalkilic.  Applying class-to-class siamese networks to explain classifications with supportive and contrastive cases.  In Case-based reasoning research and development, ICCBR-20, pages 245–260. Springer, 2020.
  * Ye et al. [2021] Xiaomeng Ye, Ziwei Zhao, David Leake, Xizi Wang, and David Crandall.  Applying the case difference heuristic to learn adaptations from deep network features.  arXiv preprint arXiv:2107.07095, 2021.
  * Ye et al. [2022] Xiaomeng Ye, Ziwei Zhao, David Leake, and David Crandall.  Generation and evaluation of creative images from limited data: A class-to-class vae approach.  In Proceedings of the Thirteenth International Conference on Computational Creativity, 2022.
  * Zhao et al. [2022] Ziwei Zhao, David Leake, Xiaomeng Ye, and David Crandall.  Generating counterfactual images: Towards a C2C-VAE approach.  In ICCBR XCBR’22: 4th Workshop on XCBR: Case-based Reasoning for the Explanation of Intelligent Systems at ICCBR-2022, 2022.

## Supplementary Material

For our quantitative evaluation, we selected 10 pairs of classes spanning
every class of the MNIST dataset, with each pair representing two classes with
notable similarity (e.g., 1 and 7), as shown below:

  * •

Queries: 0,1,2,3,4,5,6,7,8,9

  * •

Distractors: 6,7,3,5,1,8,0,2,9,4

We did this because we expect it to be more difficult to explain the
difference between two classes when they are similar. For example, it is more
challenging to explain the difference between a white Persian cat and a white
Ragdoll cat than to explain the difference between a white Persian cat and a
black dog.

Figure 7 provides additional qualitative evaluation samples. We conducted
sharpening on all attention masks with a threshold of 0.75, similar to Section
4.3.

Figure 7: Additional qualitative evaluation samples. All attention masks were
sharpened with a threshold of 0.75.