# Using Machine Learning to Determine Morphologies of $z<1$ AGN Host Galaxies
in the Hyper Suprime-Cam Wide Survey

Chuan Tian (田川) Department of Physics, Yale University, New Haven, CT, USA
<EMAIL_ADDRESS><EMAIL_ADDRESS>C. Megan Urry Department of Physics,
Yale University, New Haven, CT, USA  Department of Astronomy, Yale University,
New Haven, CT, USA  Yale Center for Astronomy and Astrophysics, Yale
University, New Haven, CT, USA  Aritra Ghosh Department of Astronomy, Yale
University, New Haven, CT, USA  Yale Center for Astronomy and Astrophysics,
Yale University, New Haven, CT, USA  Ryan Ofman  Department of Astronomy, Yale
University, New Haven, CT, USA  Tonima Tasnim Ananna Department of Physics and
Astronomy, Dartmouth College, 6127 Wilder Laboratory, Hanover, NH, USA  Connor
Auge Institute for Astronomy, University of Hawaii, Honolulu, HI, USA  Nico
Cappelluti Department of Physics, University of Miami, Coral Gables, FL, USA
INAF - Osservatorio di Astrofisica e Scienza dello Spazio di Bologna, Bologna,
Italy  Meredith C. Powell Kavli Institute for Particle Astrophysics and
Cosmology, Stanford University, Stanford, CA, USA  David B. Sanders Institute
for Astronomy, University of Hawaii, Honolulu, HI, USA  Kevin Schawinski
Modulos AG, Technoparkstr. 1, CH-8005, Zurich, Switzerland  Dominic Stark
Modulos AG, Technoparkstr. 1, CH-8005, Zurich, Switzerland  Grant R. Tremblay
Center for Astrophysics |Harvard & Smithsonian, 60 Gardent St., Cambridge, MA
02138, USA

###### Abstract

We present a machine-learning framework to accurately characterize
morphologies of Active Galactic Nucleus (AGN) host galaxies within $z<1$. We
first use PSFGAN to decouple host galaxy light from the central point source,
then we invoke the Galaxy Morphology Network (GaMorNet) to estimate whether
the host galaxy is disk-dominated, bulge-dominated, or indeterminate. Using
optical images from five bands of the HSC Wide Survey, we build models
independently in three redshift bins: low ($0<z<0.25$), medium ($0.25<z<0.5$),
and high ($0.5<z<1.0$). By first training on a large number of simulated
galaxies, then fine-tuning using far fewer classified real galaxies, our
framework predicts the actual morphology for $\sim$ 60% - 70% host galaxies
from test sets, with a classification precision of $\sim$ 80% - 95%, depending
on redshift bin. Specifically, our models achieve disk precision of
96%/82%/79% and bulge precision of 90%/90%/80% (for the 3 redshift bins), at
thresholds corresponding to indeterminate fractions of 30%/43%/42%. The
classification precision of our models has a noticeable dependency on host
galaxy radius and magnitude. No strong dependency is observed on contrast
ratio. Comparing classifications of real AGNs, our models agree well with
traditional 2D fitting with GALFIT. The PSFGAN+GaMorNet framework does not
depend on the choice of fitting functions or galaxy-related input parameters,
runs orders of magnitude faster than GALFIT, and is easily generalizable via
transfer learning, making it an ideal tool for studying AGN host galaxy
morphology in forthcoming large imaging survey.

Active galactic nuclei (16), Galaxies (573), Galaxy classification systems
(582), Astronomy data analysis (1858), Neural networks (1933), Convolutional
neural networks (1938), AGN host galaxies (2017)

††software: PSFGAN (Stark et al., 2018), GaMorNet (Ghosh et al., 2020), TOPCAT
(Taylor, 2005), GALFIT (Peng et al., 2002), NumPy (Harris et al., 2020), SciPy
(Virtanen et al., 2020), Astropy (Astropy Collaboration et al., 2018), Pandas
(McKinney, 2010), Matplotlib (Hunter, 2007)

##  1 Introduction

Two decades ago, it was suggested that AGN feedback could play a pivotal role
in galaxy evolution, based on observed correlations between the mass of the
central supermassive black hole (SMBH) and the stellar velocity dispersion in
the host galaxy, or with the host galaxy mass, luminosity and other properties
(Ferrarese & Merritt, 2000; Gebhardt et al., 2000; Kormendy & Ho, 2013). The
impact of an AGN on its host galaxy has also been incorporated into galaxy
evolution models to account for the inefficiency of star formation in massive
galaxies (e.g. Di Matteo et al., 2005; Croton et al., 2006; Fabian et al.,
2006; Hopkins et al., 2007; Fabian et al., 2008; Harrison, 2017). AGN emits
radiation across the electromagnetic spectrum as matter accretes onto the
SMBH, which can effectively heat or expel the surrounding gas, suppressing
star formation in the host galaxy and possibly fueling of the AGN itself
(Fabian, 2012; Heckman & Best, 2014; Harrison, 2017).

Because of the potentially large impact on galaxy evolution, it is important
to understand how AGNs are triggered. Current theory suggests two triggering
modes: (1) a violent merger between two gas-rich disk-dominated galaxies, or
(2) a much slower secular process in the host galaxy that is unrelated to
mergers (e.g. Sanders et al., 1988; Hopkins et al., 2005, 2006; Schawinski et
al., 2014; Ricci et al., 2017). Since disk-dominated galaxies can often (but
not always) transform into bulge-dominated ones in the first scenario (e.g.
Stewart et al., 2008; Lotz et al., 2008; Wilman et al., 2013), morphology can
be a good indicator of a galaxy’s recent merger history. It is unclear from
the published literature whether AGNs appear preferentially in recently merged
galaxies (e.g. Cisternas et al., 2011; Schawinski et al., 2012; Villforth et
al., 2014; Hewlett et al., 2017; Ellison et al., 2019; Marian et al., 2019),
although there is evidence that the most luminous AGNs have undergone recent
major mergers (e.g. Urrutia et al., 2008; Treister et al., 2012). In any case,
determining the morphologies of AGN host galaxies is very important for
understanding AGN triggering.

AGN activity and star formation increase substantially with redshift (Madau et
al., 1998; Volonteri et al., 2003; Shankar et al., 2009; Madau & Dickinson,
2014)—it is likely that AGN feedback also evolves strongly—and luminous AGNs
are rare enough that they are found preferentially at higher redshifts. This
means we need to determine host galaxy morphologies beyond the local universe.
With space-based Hubble Space Telescope imaging, it is possible to study AGN
host galaxies out to redshifts $z\sim 2$ (e.g. Schawinski et al., 2011, 2012;
Kocevski et al., 2012; Ueda et al., 2014; Glikman et al., 2015; Powell et al.,
2017; Ananna et al., 2020). For ground-based imaging, the task is more
challenging but in the best cases we can reach $z\sim 1$, a limit we explore
in this paper.

In the past, studying morphologies of AGN host galaxies generally involved
fitting two-dimension light profiles with tools such as GIM2D (Simard, 1998),
GALFIT (Peng et al., 2002), and automated versions thereof (e.g., GALAPAGOS;
Barden et al., 2012). While these methods work well, they are difficult to
scale up to large data sets. Furthermore, AGN host galaxies are complicated by
the presence of an often bright central point source. Even if one tries to fit
the point source as an additional component, the parameters can be degenerate.
And clearly, these methods are not ideal when dealing with larger datasets
that we face today.

In contrast, machine learning (ML) has proved useful in measuring galaxy
morphologies at scale (e.g. Dieleman et al., 2015; Huertas-Company et al.,
2015; Tuccillo et al., 2018; Dimauro et al., 2018; Domínguez Sánchez et al.,
2018; Barchi et al., 2020; Walmsley et al., 2020; Vega-Ferrero et al., 2021;
Cheng et al., 2021a, b), which can be done both qualitatively (Ghosh et al.,
2020) and quantitatively (Ghosh et al., 2022). Specifically, GaMorNet, a
Convolutional Neural Network (Lecun et al., 1998; Krizhevsky et al., 2012),
classifies galaxies as either disk-dominated, bulge-dominated, or
indeterminate, with a precision of $99.7\%$($94.8\%$) for
disk(bulge)-dominated SDSS (York et al., 2000) galaxies and a precision of
$91.8\%$($78.6\%$) for disk(bulge)-dominated CANDELS (Koekemoer et al., 2011)
galaxies (Ghosh et al., 2020). GaMorNet can be easily trained first on a large
amount of simulated data then on a small amount of real data via transfer
learning (e.g. Ackermann et al., 2018; Domínguez Sánchez et al., 2019; Variawa
et al., 2022). Here we develop and implement ML techniques to address AGN host
galaxies in particular. First, to remove the AGN point source we utilize a
modified implementation of PSFGAN, a Generative Adversarial Network (GAN;
Goodfellow et al., 2014) designed for that purpose (Stark et al., 2018). An
advantage over fitting programs is that PSFGAN does not require explicit
knowledge of the point spread function (PSF), and the data processing is
orders of magnitude faster. Then, we analyze the residual host galaxy light to
determine whether the galaxy is disk-dominated or bulge-dominated, using a
specially trained version of GaMorNet, in order to provide hints of whether or
not a galaxy has undergone a recent major merger. Although our approach is
completely general, we optimize the particular networks for the high-quality
imaging data available from the Hyper Suprime-Cam (HSC) Wide survey (Aihara et
al., 2018, 2019, 2021), which covers about $1400$ deg2 of sky in five broad-
band filters ($grizy$) with a depth at about 26th magnitude and a pixel scale
of 0.168 arcsec per pixel.

This paper is organized as follows. In § 2.1 we describe the HSC data and
simulated data used for neural network training, and in § 2.2 we outline the
process of building a ML model for AGN host galaxy morphology classification.
The details of training the PSFGAN and GaMorNet networks, including transfer
learning, are described in § 3. Model performance is analyzed in § 4. In § 5,
we summarize our results and main conclusions, and discuss additional
implementations in the near future. We adopt a $\Lambda$CDM Cosmology with
$h_{0}=0.7$, $\Omega_{m}=0.3$, and $\Omega_{\Lambda}=0.7$ throughout this
paper.

##  2 Data and Methods

###  2.1 HSC Data

We use publicly available imaging data from the seven fields in the Subaru HSC
Wide survey, in its five wide field bands: $g$, $r$, $i$, $z$, and $y$, all
from HSC Second Public Data Release (Aihara et al., 2019). We consider only
galaxies with their photometric redshift (Nishizawa et al., 2020) less than
one, the precision for more distant galaxies being unacceptably low, and we
divide them into three redshift bins: $0<z<0.25$, $0.25<z<0.5$, and
$0.5<z<1.0$111After training models (Section 3.4) and choosing mapping
thresholds (Section 4.1), we further analyzed how models for different
redshift bins compare, and specifically, whether they create discontinuities
at redshift bin boundaries. See Appendix C for details.. We use the $g$ band
($400-550$ nm), $r$ band ($550-695$ nm), and $i$ band ($695-845$ nm) for the
low, medium and high redshift bins, respectively, to approximate similar rest-
frame wavelengths. We then develop machine learning models to characterize the
galaxy morphologies. The division in redshift bins allows separate ML models
to each focus on smaller ranges of galaxy apparent magnitude and size,
minimizing the parameter space they have to optimize over, and improving their
overall precision.

Figure 1a: Photometric redshift distribution of HSC galaxies used to train and
test our ML models: overlapping 50,873 low-redshift SDSS galaxies (blue,
$z<0.25$) analyzed by Simard et al. (2011), and 1,649 medium-redshift (green,
mostly $0.25<z<0.5$) and 3,382 high-redshift (red, $0.5<z<1$) CANDELS galaxies
analyzed by Dimauro et al. (2018). Each histogram is normalized separately to
unity. Colored lines show the estimated probability density curves using a
Kernel Density Estimator (see § 2.1 for details).  Figure 1b: Magnitude
distribution (g-band) of HSC galaxies used to train and test our ML models
(colors as in Fig. 1a). Each histogram is normalized separately to unity.
Figure 1c: Kron radius distribution (g-band) of HSC galaxies used to train and
test our ML models (from HSC DR2 Public Data Access Page; colors as in Fig.
1a). Each histogram is normalized separately to unity.

When training the ML models, we use both simulated galaxies (see § 3.1) and
previously morphologically-classified galaxies. The number of simulated
galaxies can be arbitrarily large, even while the number of previously
classified galaxies is generally small. Concerning the latter, no bulge-disk
decomposition has been done specifically for HSC-imaged galaxies. Therefore,
we used TOPCAT (Taylor, 2005) to find HSC galaxies that have been classified
in other imaging data. We first searched for all bona fide galaxies in HSC
Wide, resulting in 151,534,486 primary sources. We did this by requiring the
source’s $\\{filter\\}\\_extendedness\\_value$ (from table $wide.forced$),
which is based on a magnitude difference between PSF and CModel photometry, to
be $1$ (extended source) in all 5 bands.

We then cross-matched these sources to published results from two papers,
Simard et al. (2011) and Dimauro et al. (2018), which we used to train and
test our ML models. Simard et al. (2011) reported bulge plus disk fits for
1,116,369 galaxies with SDSS DR7 $g$\- and $r$-band images. Cross-matching the
HSC galaxies to their Table 1, using a positional uncertainty of 0.336 arcsec
(2 HSC pixels), we found 50,873 HSC galaxies, for which we prepared 239-pixel
(about 40 arcsec in HSC Wide) square cutouts in all five bands using the Image
Cutout tool provided by HSC. For higher redshifts, the Gold catalog of Dimauro
et al. (2018) contains single Sérsic fits to CANDELS images in 4 bands
($F606W,F814W,F125W,F160W$) for 17,327 galaxies with H-band flux $F160W$
brighter than 23 mag. Cross matching these to HSC galaxies (using the same
positional uncertainty, $0.336$ arcsec), we found 5,082 sources in the
redshift range $0<z<1$, for which we again prepared 239-pixel square cutouts.
The 3,382 galaxies at $0.5<z<1.0$ were used for the high-redshift bin, and the
1,649 galaxies at $0<z<0.5$ (including 291 galaxies at $z<0.25$) were used for
the medium-redshift bin. Figure 1a, Figure 1b and Figure 1c show the redshift,
g band magnitude, and g band kron radius distributions of the matched HSC
galaxies in each bin using normalized histograms, respectively. We also use
the Kernel Density Estimator (KDE)222KDE assumes our data are samples drawn
from an underlying probability distribution, and it tries to estimate this
distribution using kernel functions. See Chen (2017) for its definition and an
overview. to visualize the data distribution as a continuous variable.

The medium- and high-redshift calibration samples are quite a bit smaller than
the low-redshift sample, so we use a standard approach of augmenting the
training set. For the medium-redshift bin, we make 8 copies of each image by a
possible rotation of $90$, $180$, or $270$ degrees and a possible reflection
with respect to the x-axis. For the high-redshift bin, we make 4 copies of
each via rotation, omitting the reflection for a comparable number of samples
as in the mid-redshift bin. The final calibration samples have 13,192 and
13,528 galaxies for the medium- and high-redshift bins, respectively. We also
prepared 239-pixel square cutouts in the five HSC bands for $\sim 400$ local
stars, in order to create multiple PSFs, for use in creating artificial AGNs
(see § 3).

###  2.2 Overview of PSFGAN and GaMorNet Training

In this section, we give an overview of how we use PSFGAN and GaMorNet to
build a model that can accurately classify AGN host galaxy morphologies in HSC
Wide fields. In our initial approach, we tested the practicality of training
PSFGAN and GaMorNet separately—that is, first using PSFGAN for AGN point
source removal and then sending PSFGAN-recovered host galaxies to a GaMorNet
trained on ordinary (inactive) galaxies for classification. This test resulted
in a fairly low precision, which never exceeded $70\%$. This is because PSFGAN
introduces subtle patterns (at very low amplitude) not seen in the original
(inactive) galaxies used for training, which therefore confused GaMorNet. We
found that the classification precision was much higher when using these
networks as a linked pair—that is, after training GaMorNet on PSFGAN-recovered
galaxies rather than inactive galaxies. This section describes the linked
training approach.

Traditionally, there are two main challenges to classifying AGN host galaxies
morphologically using ML tools: (1) the impact of the luminous AGN point
source and (2) insufficient training data with classified morphological
labels. We show explicitly that these obstacles can be overcome using PSFGAN
and GaMorNet because those results agree well with results from legacy 2D
fitting methods.

Figure 2:  Diagram showing our use of PSFGAN and GaMorNet to build a model for
AGN morphology classification.
Top: initial training with simulated galaxies. We create simulated galaxies
(convolved with real PSFs before adding noise) with known morphologies and
reasonable parameters for their redshifts. Artificial AGN point sources are
added and both the original galaxy and the original + AGN are fed to PSFGAN
for training. In the training process, PSFGAN compares each recovered galaxy
(i.e., its own guess) to the original galaxy and tries to adjust itself such
that the difference between these two are minimal (by incorporating a residual
term to the loss function of its generator). The PSFGAN-recovered galaxies are
then used by GaMorNet for initial training to classify galaxy as either disk-
dominated, indeterminate, or bulge-dominated.
Bottom: transfer learning and validation with real galaxies. We use real
galaxies which were classified using traditional 2D fitting methods in place
of simulated galaxies and repeat process in the top chart. We directly take
the GaMorNet trained with simulated galaxies and fine-tune its parameters
using labelled real galaxies. Once both PSFGAN and GaMorNet are trained, we
feed active galaxy in HSC Wide in place of original + AGN (PSFGAN), and
classify the morphology of the recovered host galaxy (GaMorNet). GaMorNet
outputs are then compared against GALFIT fitting results.

Our approach includes the following steps, described in the three panels in
Figure 2:

  1. 1.

Initial training of PSFGAN + GaMorNet with simulated galaxies;

  2. 2.

Transfer learning (described below) with labelled real galaxies (to which
point sources were added, then removed with PSFGAN);

  3. 3.

Validation against GALFIT 2D fitting results.

We first used GalSim (Rowe et al., 2015) to create simulated galaxies with
bulges and/or disks. Each galaxy was convolved with the PSF before noise was
added. We created artificial AGNs by combining simulated galaxies and PSFs
with a range of contrast ratios. We then trained a single-band version of
PSFGAN to remove the added point source accurately, generating recovered
galaxies with known morphological labels that are used to train GaMorNet from
scratch. We can generate arbitrarily large sets of simulated AGNs with no
cost, and more training data will make the ML tools more accurate. However,
the precision obtained for the final PSFGAN+GaMorNet tool is limited by the
computational resources available for the initial training, so in practice we
used a few hundred thousand simulated galaxies.

The same training process was then repeated, in the transfer learning step,
using real galaxies with known morphological parameters—a much smaller data
set (see § 2.1). The only difference is that instead of training another
GaMorNet from scratch, we start with the GaMorNet trained on simulated
galaxies, and fine-tune its parameters using the real galaxies. (Note that we
first added artificial point sources to these real galaxies, then removed them
with PSFGAN, as for the simulated galaxy training set, in order to teach
GaMorNet to ignore any PSFGAN-induced patterns.) The approach of first
training with a large amount of simulated data, and then re-training with a
small amount of real, labelled data, allows us to drastically reduce the
number of previously labelled real galaxies needed for training.

Once the transfer learning was done, we fed real active galaxies to PSFGAN.
The recovered host galaxies were then fed to both GaMorNet and GALFIT and
their results were compared against each other.

##  3 Neural Network Training

###  3.1 Preparing Simulated AGN Host Galaxies for Initial Training

Here we describe the simulation of galaxies and the addition of an artificial
AGN point source, to be used in the initial training of PSFGAN and GaMorNet
described in § 3.2. We used GalSim to create 2D light profiles of $150,000$
galaxies in the $g$, $r$, and $i$ wavebands. In the low ($0<z<0.25$), medium
($0.25<z<0.5$), and high ($0.5<z<1.0$) redshift bins, we are focusing on
galaxy morphology in the $g$, $r$, and $i$ bands, respectively, so that we are
looking at roughly the same wavelength in the rest frame. We chose simulation
parameters (e.g., ranges of galaxy flux and half-light radius) that match
corresponding ranges observed in most real galaxies in each redshift bin and
each band, according to Binney & Merrifield (1998), as summarized in Table 1.
With these parameters, we created simulated galaxies in each redshift bin and
each band. Furthermore, we convolved each simulated galaxy with real
instrumental PSF and then we added noise. This step ensures our simulated
galaxies closely resemble observed real galaxies, and are thus appropriate to
be used in the training step for our initial models. Details are discussed
below.

Three quarters of simulated galaxies ($112,500$) have both a disk and a bulge.
To have a diverse range of light profiles in the training set, we used a range
of Sérsic index $n$ ($0.8<n<1.2$ for the disk component, $3.5<n<5.0$ for the
bulge component) instead of single values ($n=1$ for a pure disk, $n=4$ for a
pure bulge). The exact ranges of Sérsic index are not important because
training with simulated data is just the starting point; the final networks
will be modified by training on real data (see § 3.4). The remaining quarter
of the galaxies ($37,500$) have a single component that is either a disk or a
bulge (with the same fuzzy range of Sérsic index; $18,750$ for each category).
For double component galaxies, we drew an axis ratio $b/a$ between $0.25$ and
$1.0$ for the disk and the bulge components (mutually independent). For the
position angle, we first chose the disk orientation randomly between
$-90^{\circ}$ to $90^{\circ}$, then choose a random bulge orientation within
$\pm 15^{\circ}$ of the disk orientation. The bulge-to-total flux ratio,
$L_{B}/L_{T}$, is uniformly distributed between $0$ and $1$. Single component
galaxies were simulated using the same ranges of parameters used for the disk
component in double component galaxies. Each simulated galaxy cutout was
chosen to have a size of 239 $\times$ 239 pixels (about 40 arcsec $\times$ 40
arcsec in HSC Wide); the same cutout size was used for all images discussed in
this paper.

Table 1: Parameter Ranges for Simulated Galaxies in Each Redshift Bin

Component | Sérsic Index | Half-Light Radius | Flux | Axis Ratio | Position Angle
---|---|---|---|---|---
|  | (Arcseconds) | (ADUs) |  | (Degrees)
37,500 Single-Component GalaxiesaaDivided equally into disks and bulges.,
images in key bandbbBand $g$, $r$, or $i$ for the low ($0<z<0.25$), medium
($0.25<z<0.5$), or high ($0.5<z<1.0$) redshift bin, respectively.
|  | 0.1 — 5.0 (low-z) | 30 — 135000 (low-z) |  |
Single | 0.8 — 1.2 or 3.5 — 5.0 | 0.1 — 2.0 (mid-z) | 30 — 25000 (mid-z) | 0.25 — 1.0 |  $-$90.0 — 90.0
|  | 0.2 — 1.3 (high-z) | 30 — 40000 (high-z) |  |
112,500 Double-Component Galaxies, images in key band
Disk | 0.8 — 1.2 | same as “Single”ccThe range of half-light radius for the disk component in double-component galaxies is set equal to the range of the same parameter for single component galaxies, in each redshift bin respectively. | 0 — 1ddOnly the fractional flux is mentioned here. Flux for the disk (bulge) component equals to the total flux multiplied by the disk (bulge) fractional flux. The total flux is chosen from the same range as for single component galaxies, in each redshift bin respectively. | 0.25 — 1.0 |  $-$90.0 — 90.0
|  | 0.1 — 3.0 (low-z) |  |  |
Bulge | 3.5 — 5.0 | 0.1 — 1.5 (mid-z) | 1 $-$ Disk Frac. | 0.25 — 1.0 | Disk Comp. $\pm\,(0,15)$eeThe bulge position angle differs from the disk position angle by a randomly chosen value between $-15^{\circ}$ and $+15^{\circ}$.
|  | 0.2 — 0.8 (high-z) |  |  |

Note. — The table shows details of parameter ranges of simulated galaxies in
each of the three redshift bins. All parameters are drawn from uniform
distributions except bulge position angle in double component galaxies. We
choose parameter ranges such that given the size of our simulated data, they
resemble real galaxies in corresponding redshifted bands. See § 3.1 for more
details.

To make the simulated galaxies closely resemble real ones, we convolve them
with the instrumental PSF. Using the HSC PSF Picker Tool333https://hsc-
release.mtk.nao.ac.jp/psf/pdr2/, we select 50 PSFs for each band from random
locations in HSC Wide fields (Aihara et al., 2019). We then convolve each
simulated galaxy with a PSF randomly selected from this group of 50. Then we
add noise using GalSim’s inherent noise module444https://galsim-
developers.github.io/GalSim/_build/html/noise.html (to replicate the real HSC
data555See table 1 in Aihara et al., 2018 we choose: type=CCD; gain=3.0;
read_noise=4.5). The first column of Figure 3 shows three examples of the
final simulated galaxies, one for each redshift band.666For these and
subsequent figures, we show the central part of the image, not the full cutout
analyzed by the model.

To represent the AGN PSF, we prepare 239-pixel square cutouts of 392 local,
bright, stellar point sources ($\\{filter\\}\\_extendedness\\_value=0$ in all
five bands) from HSC Wide, each of which:

  1. 1.

Is not blended with other sources and is in the inner region of a coadd patch
and tract (isprimary = TRUE);

  2. 2.

Is not near the image edge ({filter}_pixelflags_edge = FALSE);

  3. 3.

SDSS centroid algorithm succeeded in all bands ({filter}_sdsscentroid_flag =
FALSE);

  4. 4.

Flux well determined in all bands (i.e., final CModel fit succeeded;
{filter}_cmodel_flag = FALSE);

  5. 5.

Is not contaminated by cosmic rays in any band ({filter}_pixelflags_cr =
FALSE);

  6. 6.

Cutout contains no bad CCD pixels in any band ({filter}_pixelflags_bad =
FALSE);

  7. 7.

HSC image is clean in all bands ({filter}_cleanflags_center = TRUE,
{filter}_cleanflags_any = TRUE).

We randomly select 50 of the 392 stars (combining them minimizes the impact of
different seeing conditions). For a given simulated galaxy, we scale the flux
of each star to the desired AGN-to-host-galaxy contrast ratio, $R$, which is
randomly selected from a logarithmic uniform distribution between $-1<\log
R<0.6$, appropriate to realistic AGN host galaxies (e.g., Gabor et al., 2009)
and optimal for PSFGAN subtraction (Stark et al., 2018). We average all 50
stars to create the artificial AGN point source (PS) and add it to this galaxy
to obtain a simulated AGN. We repeat this process 150,000 times for all the
simulated galaxies.

The second and third column of Figure 3 depict examples of a simulated AGN,
one for each band. We are now ready to train PSFGAN to remove these point
sources, then train GaMorNet to classify the PSFGAN-recovered host galaxies.
The value of using large numbers of simulated galaxies to train these networks
is that fewer real galaxies are then needed in the final transfer-learning
step.

Figure 3: Examples of AGN host galaxy simulations in three redshift bins. Left
to right: Original galaxy, AGN point source, combined galaxy and AGN PSF. Top
to bottom: Examples from low ($0<z<0.25$), medium ($0.25<z<0.5$), and high
($0.5<z<1$) redshift bins, using observed wavelength bands (g, r, and i,
respectively) that correspond to roughly the same rest-frame wavelength.
Simulated galaxies (left column) were convolved with the PSF and noise was
added. AGNs were simulated with a wide range of contrast ratios, of which
three randomly chosen values are shown (right column). The colorbar at far
right shows the flux in Analog-Digital Units (ADUs).

###  3.2 Initial Training with Single-band PSFGAN and GaMorNet

Using simulated AGN host galaxies described in the previous section, we train
three separate, single-band PSFGAN networks, one for each band (as in the
original version; Stark et al., 2018). Likewise, we train GaMorNet separately
for each band. The $g$ band is used for the lowest redshift bin, the $r$ band
for medium redshifts, and the $i$ band for high redshifts.

We first split each simulated dataset—$150,000$ galaxies for each band—into
five smaller subsets: a training set for PSFGAN ($9,000$ galaxies), a
validation set for PSFGAN ($1,000$ galaxies), a training set for GaMorNet
($90,000$ galaxies), a validation set for GaMorNet ($10,000$ galaxies) and a
test set for the combined framework ($40,000$ galaxies). Since the data split
is completely random, each subset has roughly the same ratio of double to
single component galaxies, and the same ratio of bulges to disks. We
intentionally assign the majority of galaxies to train GaMorNet from scratch,
as that is generally desired in training convolutional neural networks for
image classification (e.g., Cho et al., 2015); in general, networks that
require labels, like GaMorNet, require more training data, whereas PSFGAN
compares images internally.

We create morphology labels for each galaxy that describe the ground truth in
GaMorNet training. Galaxies are defined as disk-dominated, indeterminate777As
we will show in later sections, we introduced the indeterminate type for
galaxies which either have similar amount of light from disk and bulge or have
sizes too small or signal-to-noise ratios too low. See § 4.2 for details., or
bulge-dominated, following Ghosh et al. (2020). For double component galaxies
($\sim 75\%$), we define the galaxy as:

  1. 1.

disk-dominated if $L_{B}/L_{T}<0.45$,

  2. 2.

bulge-dominated if $L_{B}/L_{T}>0.55$,

  3. 3.

indeterminate if $0.45\leq L_{B}/L_{T}\leq 0.55$.

For single component galaxies ($\sim 25\%$), we assign these labels:

  1. 1.

disk dominated if $n<2.0$,

  2. 2.

bulge dominated if $n>2.5$,

  3. 3.

indeterminate if $2.0\leq n\leq 2.5$,

Simulated single-component galaxies can only be classified as disks or bulges,
and were simulated with limited values of the Sérsic index (see Table 1).

A GAN consists of two sub-networks: a generator and a discriminator. While the
generator tries to create fake images, the discriminator tries to
differentiate generator-created images from real ones. Both of them are
trained simultaneously in an adversarial way (i.e., performances of both sub-
networks improve simultaneously). PSFGAN is a conditional GAN (Reed et al.,
2016): its generator takes an image of a host galaxy with an AGN point source
(generator input), and it tries to create a fake image that contains only the
host galaxy (generator output). At the same time, the discriminator in PSFGAN
compares this fake image with the image of the actual host galaxy. Note that
in our experiments, since the discriminator always has access to the image of
the actual host galaxy, at the end of the training step, the generator has to
create fake images that very closely resemble the real ones.

We train each single-band PSFGAN by requiring that a processed AGN image
(i.e., with PSF removed by PSFGAN) resemble the original galaxy (i.e., the
simulated galaxy to which we added a PSF to make the simulated AGN). Following
Stark et al. (2018), we use a generator loss function, $L_{gen}$, with an
attention window to up-weight the central pixels, while the discriminator loss
function, $L_{dsc}$, is unchanged:

$\begin{split}L_{gen}&=L_{adv\\_gen}\\\ &+\frac{\lambda
P_{att}}{N^{2}}\sum_{i,j=0}^{N-1}|X^{ori}_{ij}-X^{gen}_{ij}|\\\
&+\frac{\lambda}{{S_{att}}^{2}}\sum_{i,j=(N-1)/2-(S_{att}/2)+1}^{(N-1)/2+(S_{att}/2)}|X^{ori}_{ij}-X^{gen}_{ij}|,\\\
L_{dsc}&=L_{adv\\_dsc}.\end{split}$ (1)

where $L_{adv\\_gen}$ and $L_{adv\\_dsc}$ represent adversarial loss terms in
the generator and the discriminator of the vanilla GAN, respectively888See Eq.
1 in Goodfellow et al. (2014) for the mathematical forms of $L_{adv\\_gen}$
and $L_{adv\\_dsc}$.; $\lambda=100$ and $P_{att}=0.05$ (attention parameter)
are two parameters that control the relative importance of terms in the loss
function; $N=239$ and $S_{att}$999See Table 2 for chosen values of the
attention window size, $S_{att}$, in different redshift bins. are image and
attention window sizes in pixels, respectively; $X^{ori}_{ij}$ and
$X^{gen}_{ij}$ denote the flux values for pixel $ij$ in the original and
generated images. With the chosen values of $\lambda$ and $P_{att}$, the
absolute difference between the entire original and generated images are
$100*0.05=5$ times more important than the adversarial loss, while the
absolute difference between the original and generated images within the
central attention window is $100$ times more important than the adversarial
loss and 20 times more important than the absolute difference across the
entire image. This ensures that while minimizing the residuals across the
entire image101010Residual is defined as recovered (generated) galaxy minus
original galaxy, PSFGAN puts much more focus on the central region.
Minimization of the loss function is done using Adam, a well-known first-order
gradient-based optimizer (Kingma & Ba, 2014). In addition to the attention
parameter ($P_{att}$) and the attention window size ($S_{att}$), certain
hyper-parameters are necessary to the training. These include the learning
rate, which governs the parameter increment at each learning step and the
number of epochs over which the network is trained.

Moreover, three hyper-parameters are used in image normalization, both in a
normalization prior to PSFGAN, and the inverse operation prior to GaMorNet.
Every pixel value, $x$, is transformed using:

$x^{\prime}=\frac{\rm arcsinh(A*x)}{\rm arcsinh(A*x_{\rm max})}.$ (2)

where $x_{\rm max}$ is the maximum pixel value for the entire set of images to
be normalized, and $A$ is a stretch factor. This normalization step has been
found very helpful, especially in cases where the dynamic range of pixel
values is high. After trying a range of hyper-parameters, we determined the
values that give the best results, for each band, as shown in Table 2.

Table 2: Hyper-Parameters for Single-band PSFGAN Training On Simulated Galaxies Redshift Bin | Low | Mid | High
---|---|---|---
| ($g$ band) | ($r$ band) | ($i$ band)
Attention Window Size $(S_{att})$aaThe length of each side, in pixels, of the square attention window at the image center. | $22$ | $12$ | $12$
Attention Parameter ($P_{att}$) | $0.05$ | $0.05$ | $0.05$
Learning Rate | $5\times 10^{-5}$ | $1.5\times 10^{-5}$ | $2\times 10^{-5}$
Epoch | $20$ | $30$ | $20$
Stretch Function | arcsinh | arcsinh | arcsinh
Stretch Factor | $50$ | $50$ | $50$
Maximum Pixel Value | $25,000$ | $5,000$ | $10,000$

The original PSFGAN used an input image size of $424\times 424$ pixels (Stark
et al., 2018). Since our cutouts are much smaller ($239\times 239$ pixels), we
removed one layer from the 8 layers in the encoding and decoding parts of the
original generator111111Our motivation of this modification is explained in
Appendix B.; apart from this change, we used the original PSFGAN architecture
to train PSFGAN from scratch. We stopped the training once the PSFGAN loss
converged, then we verified with the validation set that there was no sign of
over-training. Figure 4 shows three examples of the application of the trained
PSFGAN to galaxies from the final test set, for each of the three redshift
ranges.

We next apply PSFGAN to the training and validation sets for GaMorNet, as well
as the common test set, removing the artificial AGN point source and
generating recovered images for each galaxy. Originally, we had tried running
PSFGAN-ed images through a version of GaMorNet trained on an independent set
of galaxies; however, we found that the residuals, though very small, have a
structure quite different from unprocessed (natural) galaxy images, which led
to low precision for the GaMorNet classifications. Therefore, we devised the
present approach—training a new version of GaMorNet only on PSFGAN-recovered
galaxies—which results in much higher precision.

Table 3: Hyper-Parametersaa For a description of these hyper-parameters, see GaMorNet Tutorials.  for Initial Training of GaMorNet On Simulated Galaxies Redshift Bin | Low | Mid | High
---|---|---|---
| ($g$ band) | ($r$ band) | ($i$ band)
Learning Rate | $5\times 10^{-5}$ | $5\times 10^{-5}$ | $5\times 10^{-5}$
Epoch | $100$ | $100$ | $100$
Batch Size | $128$ | $128$ | $128$
Momentum | $0.9$ | $0.9$ | $0.9$
Learning Rate Decay | $0$ | $0$ | $0$
Stretch Factor | $50$ | $50$ | $50$
Loss Function | cross entropy | cross entropy | cross entropy
Figure 4: The effectiveness of PSFGAN trained on simulations is illustrated
with examples from low, medium, and high redshift, for which we used $g$, $r$,
and $i$ band images, respectively. The first column shows the original galaxy
simulated with GalSim; the second column adds a point source at the galaxy
center; the third column shows the recovered galaxy after processing with
PSFGAN; and the final column shows the residual image (recovered minus
original). Labels denote, from left to right, morphology of the original
galaxy, contrast ratio for the simulated AGN, and probability that GaMorNet
correctly predicts the morphology of the recovered galaxy. The intensity is
given by the color bar at the right, which is the same as in the previous
figure.

CNN is a type of feed-forward neural network which specializes in image
processing and recognition. A typical CNN contains three types of layers:
convolutional layers, pooling layers, and fully connected layers. An input
image is first sent to a convolutional layer which usually has multiple
channels. Within each channel, each artificial neuron only responses to a
limited region of the input image (“receptive field”). Specifically, two
neighboring neurons separated by a certain distance in a certain dimension
respond to two receptive fields that are displaced by a proportional distance
in the same dimension. For a certain channel, the connection between each
receptive field and each neuron is translation invariant (i.e. they share the
same weight matrix). Thus, it can be interpreted that neurons in each channel
are trying to extract a particular feature at different locations of the input
image. Feature maps of a convolutional layer, or equivalently the output of
neurons of its channels, are then sent to a pooling layer, which usually
preserves only the maximum values of its input, making the network insensitive
to minor differences between images. A CNN usually contains multiple pairs of
convolutional and pooling layers. The output of the last pooling layer is sent
to a few fully connected layers, and the output of the last fully connected
layer is therefore the output of the network, which contains information of
the classified labels. During the training step, these output labels are
compared against ground truth labels via a loss function (“supervised
learning”). The losses are back-propagated to each layer of the network, and
the network itself will try to adjust its parameters to making better
classifications next time. As a CNN, our GaMorNet shares all these features.
Readers are encouraged to refer to Section 3.2, Figure 4, and Table 2 in Ghosh
et al. (2020) for details of its structure.

We train GaMorNet from scratch with its training set and determine the best
hyper-parameters with its validation set, using PSFGAN-processed images (i.e.
the AGN point source is removed from each simulated AGN in the training and
validation sets for GaMorNet). Our choices of hyper-parameters for each band
are shown in Table 3. Using these hyper-parameters, we next test GaMorNet on
the common test set. We map each GaMorNet output, which has a form of a
3-tuple ($P_{\rm D}$, $P_{\rm I}$, $P_{\rm B}$), into a predicted
morphological type by choosing the maximum value of the three (i.e. if $P_{\rm
D}$ is the highest, we map the input galaxy as a predicted disk). We then
compare these predicted morphological types against the ground truth
morphological labels (which we know from the simulation), and we compute the
precision on disks (bulges) as the ratio between true disks (bulges), which
are actual disks (bulges) that are also predicted as disks (bulges), to all
galaxies predicted as disks (bulges).121212Readers are encouraged to refer to
§ 4.1, in which we discussed precision and other metrics in detail. GaMorNet
achieves a precision $\gtrsim 90$%. Precision values for each redshift bin are
shown in Table 4.

Figure 5:  (Top) Radial profiles of simulated AGN (orange), original galaxy (blue), recovered galaxy (green), and residuals (i.e., recovered minus original galaxy; red), for the three example galaxies shown in Figure 4. (Bottom) Fractal residuals ($residual/original$) of the same example galaxies. Over most of the galaxy, the residuals are a small percentage of the original flux. Even at image center where residual becomes larger, GaMorNet is not confused, as shown evidently by its output probabilities in the third column of Figure 4.  Table 4: Summary for GaMorNet Classification Results on Test Sets of Simulated Galaxies Redshift Bin | Low | Mid | High
---|---|---|---
| ($g$ band) | ($r$ band) | ($i$ band)
Precision on Disks | $91.15\%$ | $90.33\%$ | $89.75\%$
Precision on Bulges | $91.83\%$ | $90.63\%$ | $88.92\%$

Figure 5 shows radial profiles of the original simulated galaxy, AGN, and
residuals, for the three example galaxies from Figure 4, obtained from
application of the initial trained PSFGAN+GaMorNet to galaxies in the test
set. (These are still all simulated galaxies.) These models are used as the
starting point for training on real galaxies, as described in the next two
sections.

###  3.3 Combining Point Sources with Real Galaxies in Preparation for
Transfer Learning

After preparing simulated datasets and training and testing our networks with
them, we next made more realistic simulated AGNs out of real galaxies. Details
are described below. Use of these datasets in refining PSFGAN and GaMorNet is
described in § 3.4.

We used the three sets of morphologically classified real galaxies described
in § 2.1 (also Fig. 1a, 1b, and 1c). The low-, medium-, and high-redshift bins
contain 50,873, 13,192, and 13,528 real HSC galaxies, respectively. We
prepared 239$\times$239-pixel cutouts for each galaxy in these sets, in all
five HSC Wide bands: $g$, $r$, $i$, $z$, and $y$. We again used the set of 392
local stars discussed in § 2.1 and 3.1, preparing 239$\times$239-pixel cutouts
in all five bands.

For each real galaxy, we randomly selected 50 of the 392 stars to create the
artificial AGN PSF (as before). For real AGNs, the contrast ratios in the five
HSC bands are not independent, so we used results from actual AGN SEDs in
order to make band-specific contrast ratios that are physically realistic. In
detail, we used the 41 AGN SEDs fitted by Brown et al. (2019), which represent
a wide range of AGN types (see Table 1 in Brown et al., 2019). Randomly
selecting one of 41 AGN SEDs, we redshifted it to match the real galaxy. We
then chose an overall AGN-to-host-galaxy contrast ratio, $R$, from a uniform
logarithmic distribution between $-1<\log R<0.6$. Using band-specific and
bolometric (all five HSC bands combined) fluxes of the real galaxy and the
chosen AGN SED, we converted this overall contrast ratio into band-specific
contrast ratios, as follows.

First, the contrast ratio is defined as the ratio of the desired bolometric
flux of the AGN point source, $F_{\rm AGN\\_desired}$, to the bolometric flux
of the real galaxy, $F_{\rm galaxy}$; that is, $R={F_{\rm
AGN\\_desired}}/{F_{\rm galaxy}}$. To convert the actual bolometric flux of
the randomly chosen AGN SED, $F_{\rm AGN\\_actual}$, to $F_{\rm
AGN\\_desired}$, we defined a scale factor $s={F_{\rm AGN\\_desired}}/{F_{\rm
AGN\\_actual}}$. Combining the expressions for $s$ and $R$ gives $s=R*{F_{\rm
galaxy}}/{F_{\rm AGN\\_actual}}$. In practice, $R$ must be calculated
separately for each band:

$R^{\rm band}=\frac{F^{\rm band}_{\rm AGN\\_desired}}{F^{\rm band}_{\rm
galaxy}}.$ (3)

while $s$ is independent of wavelength, so that

$R*\frac{F_{\rm galaxy}}{F_{\rm AGN\\_actual}}=R^{\rm band}*\frac{F^{\rm
band}_{\rm galaxy}}{F^{\rm band}_{\rm AGN\\_actual}}.$ (4)

Rearranging, we obtained an expression for band-specific contrast ratio
$R^{band}$:

$R^{\rm band}=R*\frac{F_{\rm galaxy}}{F_{\rm AGN\\_actual}}*\frac{F^{\rm
band}_{\rm AGN\\_actual}}{F^{\rm band}_{\rm galaxy}}.$ (5)

Randomly selecting from the $R$ distribution, using the randomly selected AGN
SED and real galaxy, provides all the quantities needed to create the
realistic simulated AGN (terms on the right side of Equation 5), following the
steps described in § 3.1.

Figure 6a: Example of adding an artificial AGN point source to a real galaxy
in the low redshift bin. Top to bottom: Images in the $g$, $r$, $i$, $z$, and
$y$ bands. Left to right: Original galaxy, AGN point source, galaxy plus AGN
point source (what we call a “realistic simulated AGN” in the text). Contrast
ratios were determined using real AGN SEDs, as described in the text. All 15
sub-figures use the same colorbar limits.  Figure 6b: Example of a realistic
simulated AGN in the medium redshift bin. All details are as in Figure 6a.
Figure 6c: Example of a realistic simulated AGN for the high redshift bin. All
details are as in Figure 6a.

Figures 6a, 6b, and 6c show three randomly selected examples of our multi-band
simulated AGNs, one figure for each redshift bin. We are now ready to
replicate the steps of § 3.2, modifying the version of GaMorNet previously
trained on simulated galaxies—specifically, fine-tuning its parameters using
realistic simulated AGNs in a transfer learning step rather than re-training
from scratch.

###  3.4 Transfer Learning with Multi-band PSFGAN and GaMorNet

Having assembled all the pieces needed to train our final models, the next
step was to convert the original PSFGAN, which processed images from a single
band only, to a final version that processes all five bands at the same time
(i.e., changing the number of input channels from one to five). Hereafter, we
refer to this final version as multi-band PSFGAN131313Note that compared to
the original Stark et al. (2018) PSFGAN, our version of the encoding and
decoding parts of the generator has only 7 instead of 8 layers, as explained
in § 3.2.. For each redshift bin, we trained a multi-band PSFGAN from scratch,
such that it removed AGN point sources in all five bands simultaneously.

We then took the GaMorNet trained previously on simulated galaxies (§ 3.2),
made five copies of it (one for each band), and fine-tuned the hyper-
parameters of each copy using PSFGAN-processed images of realistic simulated
AGNs (§ 3.3) in each of the five bands. Details of these steps are described
below.

First, we created ground-truth morphology labels using bulge-to-total flux
ratios and single Sérsic indices, for galaxies from Simard et al. (2011) and
galaxies from Dimauro et al. (2018), respectively. Specifically, following
conventions introduced in Ghosh et al. (2020), for Simard et al. (2011) data,
we defined galaxies with $(B/T)<0.45$ ($(B/T)>0.55$) as disk-dominated (bulge-
dominated), while galaxies with $0.45<(B/T)<0.55$ are indeterminate. On
another hand, for Dimauro et al. (2018) data, as indicated by Ghosh et al.
(2020), there does not exist a perfect nor unique way to map Sérsic indices to
bulge-to-total flux ratios. Rather, they illustrated in their Figure 6 using
simulation results in the redshift bin $z=1.075$ from Simmons & Urry (2008)
that a choice of $n<2$ gives purely disk-dominated ($(B/T)<0.45$) galaxies,
while galaxies with $n>2.5$ are mostly bulge-dominated ($(B/T)>0.55$)141414We
rechecked this correspondence between single Sérsic indices and bulge-to-total
flux ratios using our 50,873 low-redshift (mostly $z<0.25$) SDSS galaxies
(Simard et al., 2011) by comparing $(B/T)_{g}$ from Table 1 (SDSS Structural
Parameters from $n_{b}=4$ bulge + disk Decompositions) and $n_{g}$ from Table
3 (SDSS Structural Parameters from Pure Sérsic Decompositions), and confirmed
that the $n_{g}<2$ bin is overwhelmingly dominated by galaxies with
$(B/T)_{g}<0.45$, while the majority of galaxies with $n_{g}>2.5$ satisfy
$(B/T)_{g}>0.55$..

To summarize, we used the following redshift bin-dependent rules:

  1. 1.

For the low-redshift bin (Simard et al., 2011):

    1. (a)

Galaxy is disk-dominated if the $g$-band bulge fraction, $(B/T)_{g}$, is less
than 0.45.

    2. (b)

Galaxy is bulge-dominated if $(B/T)_{g}>0.55$.

    3. (c)

Galaxy is indeterminate otherwise.

  2. 2.

For the medium-redshift bin (Dimauro et al., 2018):

    1. (a)

Galaxy is disk-dominated if the F606-band single Sérsic index, $n\\_F606$, is
less than 2.0.

    2. (b)

Galaxy is bulge-dominated if $n\\_F606$ is greater than 2.5.

    3. (c)

Galaxy is indeterminate otherwise.

  3. 3.

For the high-redshift bin (Dimauro et al., 2018):

    1. (a)

Galaxy is disk-dominated if the F814-band single Sérsic index, $n\\_F814$, is
less than 2.0.

    2. (b)

Galaxy is bulge-dominated if $n\\_F814$ is greater than 2.5.

    3. (c)

Galaxy is indeterminate otherwise.

The point of using different observed bands for each redshift bin is to
characterize galaxy morphology in the same approximate rest frame. That said,
a separate version of GaMorNet was trained for each of the five HSC bands and
we have made all five available to the public.

Table 5: Number of Real Galaxies Used to Train and Test PSFGAN & GaMorNet by
Morphology and Redshift

Morphology | PSFGAN Train | PSFGAN Eval | GaMorNet Train | GaMorNet Eval | Test | Total
---|---|---|---|---|---|---
$0<z<0.25$
Disk-dominated | 5304 | 572 | 18849 | 2107 | 2795 | 29627
Indeterminate | 1012 | 113 | 3549 | 398 | 534 | 5606
Bulge-dominated | 2684 | 315 | 10002 | 1095 | 1544 | 15640
Total | 9000 | 1000 | 32400 | 3600 | 4873 | 50873
$0.25<z<0.5$
Disk-dominated | 4113 | 443 | 3859 | 450 | 767 | 9632
Indeterminate | 387 | 57 | 432 | 46 | 78 | 1000
Bulge-dominated | 0 | 0 | 2009 | 204 | 347 | 2560
Total | 4500 | 500 | 6300 | 700 | 1192 | 13192
$0.5<z<1.0$
Disk-dominated | 4059 | 444 | 3372 | 389 | 796 | 9060
Indeterminate | 441 | 56 | 359 | 37 | 111 | 1004
Bulge-dominated | 0 | 0 | 2569 | 274 | 617 | 3460
Total | 4500 | 500 | 6300 | 700 | 1524 | 13524

Note. — This table shows the number of disk-dominated, indeterminate, and
bulge-dominated galaxies in each of the five training sets, for each of three
redshift bins. Morphology labels were generated according to the rules in §
3.4. No bulges were included in the training and validation sets for PSFGAN in
the mid- and high-redshift bins, in order to better balance the numbers of
disks and bulges for GaMorNet training and validation and in the common test
set.

Next, we randomly split each sample of realistic simulated AGNs, in each
redshift bin, into five subsets, analogous to what was done in § 3.2: a
training set for PSFGAN, a validation set for PSFGAN, a training set for
GaMorNet, a validation set for GaMorNet, and a common test set. The number of
galaxies of each morphology in each subset and each redshift bin is shown in
Table 5.

For real galaxies, there are generally more disks than bulges. As we
empirically tested, if a certain type (either disk or bulge) has a
disproportionately small number of examples in the training set, GaMorNet will
be unable to correctly identify that type. This is exactly the case in the
medium- and high-redshift bins (there are too few bulges, see § 2.1).
Moreover, even after creating rotated and reflected copies of bulge-dominated
systems for these redshift bins, the number of real spheroidal galaxies is
still too limited. Rather than discard some disks in order to make the numbers
more even, we put all the bulge-dominated galaxies into the GaMorNet training,
validation and common test sets, allocating none to the PSFGAN training and
validation. This works because removal of the bright AGN point source is
basically independent of the host galaxy morphology. We checked this by
comparing two PSFGANs: one trained with only disk-dominated and indeterminate
galaxies, and a second trained with all three morphological types (fluxes,
sizes, and all other parameters were the same). We found no difference between
the two; the quality of the host galaxy reconstruction, as measured by the
residuals is the same. Apart from this exclusion, data sets were evenly
distributed with respect to any other parameter (e.g., half light radius,
galaxy flux, etc.).

We trained each multi-band PSFGAN by requiring the processed AGN image closely
resembles the original galaxy, simultaneously in all five HSC bands. We
trained a separate multi-band PSFGAN for each redshift bin (i.e., there are
three versions of multi-band PSFGAN). The best sets of hyper-parameters for
each redshift bin are summarized in Table 6. These PSFGANs were applied to the
training and validation sets of GaMorNet, as well as to the common test set.

We then used the PSFGAN-processed images in the transfer learning step for
GaMorNet. For each redshift bin, we took the GaMorNet previously trained on
simulated galaxies (§ 3.2), and made five copies of it. Each copy was re-
trained on the training set of GaMorNet in each of the five HSC bands. In
total, there are 15 versions of GaMorNet corresponding to $3$ redshift bins
and $5$ bands. For each version, we tested various combinations of hyper-
parameters using the validation set of GaMorNet, as summarized in Table 7. The
best sets of hyper-parameters151515We empirically found that, although in the
low-redshift bin the difference of fixing different layers is usually minor or
moderate (i.e. a less than $5\%$ increase in precision), in the mid- or high-
redshift bin this difference could be major (i.e. an increase in precision
close to $10\%$). We therefore choose to fix different layers in each redshift
bin and each band, in order to maximize the performance of each version of
GaMorNet., shown in Table 8, were used to train the final versions of
GaMorNet.

However, choosing which layer(s) to fix for different bands and/or redshift
bins is purely an empirical decision. As our goal is to maximize model
performance for each individual version of GaMorNet, we let the choice of
layers with fixed parameters vary independently in each redshift bin and each
band. The performance difference between cases of fixing different layers in
the low-redshift bin is usually minor to moderate (e.g. a precision increase
from $84\%$ to $88\%$), but in the mid- and high-redshift bins it could be
major (e.g. a precision increase from $71\%$ to $82\%$). We therefore decided
to use redshift bin and band dependent choices of fixed layers.

Table 6: Hyper-Parameters for Multi-band PSFGAN Training On Real Galaxies Redshift Bin | Low | Mid | High
---|---|---|---
Learning Rate | $9\times 10^{-5}$ | $2\times 10^{-5}$ | $5\times 10^{-6}$
Epoch | $20$ | $40$ | $40$
Attention WindowaaThe length of each side, in pixels, of the square attention window at the image center. | $22$ | $16$ | $12$
Attention Parameter | $0.05$ | $0.05$ | $0.05$
Stretch Function | arcsinh | arcsinh | arcsinh
Stretch Factor | $50$ | $50$ | $50$
Maximum Pixel Value | $45,000$ | $10,000$ | $1,000$
Table 7: Hyper-Parameters Tested for GaMorNet Transfer Learning On Recovered Real Galaxies  Hyper-Parameter (Values Tested on the Right) |  |  |  |
---|---|---|---|---
Epochs | $50$ | $100$ | $200$ | $500$
Batch Size | $64$ | $128$ | $256$ | $512$
Learning Rate | $1\times 10^{-5}$ | $2\times 10^{-5}$ | $5\times 10^{-5}$ | $1\times 10^{-4}$
Fixed LayersaaThere are 17 layers in GaMorNet (see Figure 4 and Table 2 in Ghosh et al., 2020), of which five are convolutional (layers 2, 5, 8, 9, 10), three are fully connected (13, 15, and 17), and the rest are functional (specifically, max pooling, dropout, and local response normalization layers, which contain no trainable parameters). Further details are given in § 3.4. (Loaded from Previous Model) | None | (2) | (2, 5) | (2, 5, 8)
Layers Trained from Scratch | None | (17) | (15, 17) | (13, 15, 17)
Trainable Layers Loaded from Previous Model |  | All remaining layersbbAll layers that are not fixed or trained from scratch. |  |
Table 8: Hyper-Parameters Used for Transfer Learning of GaMorNet On Recovered
Real Galaxies

Band | Epoch | Batch Size | Learning Rate | LayersaaThere are 17 layers in GaMorNet (see Figure 4 and Table 2 in Ghosh et al., 2020), of which five are convolutional (layers 2, 5, 8, 9, 10), three are fully connected (13, 15, and 17), and the rest are functional (specifically, max pooling, dropout, and local response normalization layers, which contain no trainable parameters). Further details are given in § 3.4. Loaded, Fixed | Layers Loaded, Trainable | Layers Trained from Scratch
---|---|---|---|---|---|---
$0<z<0.25$
G | 100 | 128 | $5\times 10^{-5}$ | (2) | (5, 8, 9, 10) | (13, 15, 17)
R | 100 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10, 13, 15, 17) | None
I | 100 | 128 | $5\times 10^{-5}$ | None | All layers | None
Z | 100 | 128 | $5\times 10^{-5}$ | (2, 5) | (8, 9, 10, 13, 15, 17) | None
Y | 100 | 128 | $5\times 10^{-5}$ | (2) | (5, 8, 9, 10, 13, 15, 17) | None
$0.25<z<0.5$
G | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10, 13, 15, 17) | None
R | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10) | (13, 15, 17)
I | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10, 13, 15) | (17)
Z | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10, 13, 15) | (17)
Y | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10) | (13, 15, 17)
$0.5<z<1.0$
G | 200 | 128 | $5\times 10^{-5}$ | (2) | (5, 8, 9, 10, 13, 15, 17) | None
R | 200 | 128 | $5\times 10^{-5}$ | None | All layers | None
I | 200 | 128 | $5\times 10^{-5}$ | (2, 5) | (8, 9, 10) | (13, 15, 17)
Z | 200 | 128 | $5\times 10^{-5}$ | (2) | (5, 8, 9, 10, 13, 15) | (17)
Y | 200 | 128 | $5\times 10^{-5}$ | (2, 5, 8) | (9, 10, 13) | (15, 17)

Note. — This table shows hyper-parameters for 15 versions of GaMorNet (5 bands
$\times$ 3 redshift bins) which are trained separately in the transfer
learning step. Other (common) hyper-parameters include momentum (0.9),
learning rate decay (0), loss function (cross entropy).

Figure 7a:  Examples of the performance of multi-band PSFGAN and GaMorNet on a
realistic simulated AGN in the low-redshift bin ($0<z<0.25$). Each row
corresponds to a different HSC band (top to bottom): $g$, $r$, $i$, $z$, and
$y$. Left to right: original galaxy (from the HSC Wide survey), realistic
simulated AGN (i.e., original galaxy with an AGN point source added), galaxy
recovered by multi-band PSFGAN, and the residual image (recovered galaxy minus
original galaxy). Labels in the boxes represent (left to right) the morphology
labels from Simard et al. (2011) or Dimauro et al. (2018), contrast ratios
(AGN flux to galaxy flux in that band), and probabilities that GaMorNet
correctly identifies the morphology of the recovered galaxy. The small
residuals and accurate morphologies shows that PSFGAN+GaMorNet works well to
characterize AGN host galaxies.  Figure 7b: Performance of multi-band PSFGAN
and GaMorNet on a realistic simulated AGN in the medium-redshift bin
($0.25<z<0.5$). Format and details as in Fig. 7a. Figure 7c: Performance of
multi-band PSFGAN and GaMorNet on a realistic simulated AGN in the high-
redshift bin ($0.5<z<1$). Format and details as in Fig. 7a. Figure 8a: Radial
profiles (top) of the example images from Fig. 7a, from the low-redshift bin,
for the realistic simulated AGN (orange curve), original galaxy (blue curve),
recovered galaxy (green curve), and residual (red curve, defined as original
minus recovered flux). Bottom panels show the absolute value of the residuals
(red curve), expressed as the percentage of the flux of the original galaxy.
In most cases, the residuals are a few percent of the original flux across
most of the profile.  Figure 8b: Radial profiles of the example images from
Fig. 7b, from the medium-redshift bin. Format and colors as in Fig. 8a. Again,
residuals are a few percent of the original flux across most of the profile.
Figure 8c: Radial profiles of the example images from Fig. 7c, from the high-
redshift bin. Format and colors as in Fig. 8a. Again, residuals are a few
percent of the original flux across most of the profile.

The final PSFGAN + GaMorNet model consists of, for each redshift bin, 1 multi-
band PSFGAN and 5 versions of GaMorNet, one for each band. We applied this
final model to realistic simulated AGNs in the common test set—specifically,
applying the multi-band PSFGAN to remove the AGN point source in five bands
simultaneously, then using the appropriate GaMorNet to characterize the
morphology of the PSFGAN-processed image in each band. Figures 7a, 7b, and 7c
shows a representative example for each of the three redshift bins,
respectively, using the same format as Figure 4. GaMorNet predictions (given
in the third column of each row of images) are generally pretty accurate,
falling off slightly at higher redshift as the signal-to-noise ratio
decreases. For galaxies similar in size to the AGN point source, GaMorNet
becomes less accurate but still has $\gtrsim 80$% precision in most bands.
Corresponding radial profiles are shown in Figures 8a, 8b, and 8c, in the same
format as Figure 5. Most of the residuals are a few percent of the flux of the
original galaxy over most of the profile.

Table 9:  Summary of Terminology for True and False Identifications

| Pred Disk | Pred Indet | Pred Bulge
---|---|---|---
Actual Disk | $TD$ | $FI_{D}$ | $FB_{D}$
Actual Indet | $FD_{I}$ | $TI$ | $FB_{I}$
Actual Bulge | $FD_{B}$ | $FI_{B}$ | $TB$

Note. — Each PSFGAN-recovered galaxy from the common test set has an “actual”
morphology (given by Simard et al., 2011 or Dimauro et al., 2018) and a
“predicted” morphology (from GaMorNet). For example, “$TD$” (True Disk) stands
for actual disks that are correctly predicted as disks, while “$FD_{B}$”
(False Disk [Actual Bulge]) stands for actual bulges that are incorrectly
predicted as disks. These quantities are used in § 4.1 to evaluate performance
of the GaMorNet models.

Figure 9:  How output from PSFGAN+GaMorNet is mapped to a predicted
morphology. A realistic simulated AGN (top left) is input to the final
PSFGAN+GaMorNet, which outputs 3 raw probabilities that the host galaxy is a
disk, indeterminate, or bulge (top right). These are mapped to a predicted
morphology (bottom right) by comparing with the actual morphology (Simard et
al., 2011 or Dimauro et al., 2018; bottom left), as described in § 4.1.
Figure 10:  Precision versus indeterminate fraction for galaxies in the common
test set. Left to right: low-, mid- and high-redshift bins, in the same rest-
frame band ($g$, $r$, $i$, respectively). Numbered points (diamonds) indicate
a possible threshold for mapping the GaMorNet probability to a galaxy
classification (see Eq. 12), for disks or bulges only. The unnumbered point
(cross) corresponds to not using any threshold. In this case, we use the
maximum probability for each galaxy (i.e., the maximum of $P_{D}$, $P_{B}$,
$P_{I}$). Our chosen trade-off between $Indet\\_Frac$ and $Ave\\_Precision$
(cyan circle) ensures high precision for at least half the galaxies; depending
on science goals, other users may prefer a different threshold.  Figure 11:
Disk precision, bulge precision and indeterminate fraction (left to right)
versus threshold, for galaxies in the common test set. Each panel shows low-
redshift ($g$-band, green), medium-redshift ($r$-band, red), and high-redshift
($i$-band, brown) galaxies, for comparison. $Diamonds$ were generated using
the threshold mapping in § 4.1. $Disk\\_Precision$, $Bulge\\_Precision$ and
$Indet\\_Frac$ obtained without using a threshold (i.e., using the highest
GaMorNet probability) are shown in horizontal lines. Our chosen thresholds are
marked by light blue open circles. In general, precision is best at lower
redshifts, and better for disks than for bulges.  Figure 12:  Disk precision,
bulge precision and indeterminate fraction (left to right) versus confidence
threshold, for galaxies in the common test set, for all five bands (colors
shown in the key). Low-, mid- and high-redshift bins are in the top, middle,
and bottom rows, respectively. $Disk\\_Precision$, $Bulge\\_Precision$ and
$Indet\\_Frac$ obtained without using a threshold (i.e., using the highest
GaMorNet probability) are shown in horizontal lines. Chosen thresholds are
shown by cyan lines. Overall, both the precision and the indeterminate
fraction increase with increasing thresholds (in most bands/bins
monotonically).  Figure 13:  First row: Normalized histogram of the GaMorNet
probability that the recovered galaxy predicted as a disk, $P_{D}$, for all
actual disks in the low-redshift common test set. Disk recall is annotated at
the top left of each histogram. Second row: Same for the probability that the
recovered galaxy is a bulge, $P_{B}$, for all actual bulges in the low-
redshift common test set. Bulge recall is similarly annotated. Color code:
True Disk (TD): dark blue; False Disk (FD): light blue; True Bulge (TB): dark
red; False Bulge (FB): light red; False Indeterminate (FI): yellow. Note True
Indeterminate (TI) are not included, for we only selected actual disks and
bulges. Third and fourth rows: Same histograms for the medium-redshift bin.
Fifth and sixth rows: Same histograms for the high-redshift bin. Left to
right: band $g$, $r$, $i$, $z$, $y$.

##  4 Performance of Final PSFGAN+GaMorNet Model

###  4.1 Mapping Three Prediction Probabilities to One Morphological Type

In this section, we map the final PSFGAN+ GaMorNet predicted probabilities—for
disks, bulges, and indeterminate types—to a single morphological
determination, by incorporating thresholds. Below we describe the choice of
threshold and apply the best threshold to the common test set for each band
and redshift bin.

Specifically, we apply PSFGAN+GaMorNet to each realistic simulated AGN from
the common test set in each redshift bin. Figure 9 shows the flowchart for our
approach: (1) a realistic simulated AGN is fed as an input to the final model;
(2) GaMorNet produces three probabilities ($P_{\rm D}$, $P_{\rm I}$, $P_{\rm
B}$) that a given galaxy is a disk, indeterminate, or a bulge, respectively
(see Ghosh et al., 2020); (3) these probabilities are mapped (using a set of
rules described below) to a predicted morphology; (4) the predicted and actual
morphologies of the host galaxy are compared. We now describe exactly how
these last two steps are done.

Note that every galaxy in the common test set has an “actual” morphology,
given by Simard et al. (2011) or Dimauro et al. (2018), and a “predicted”
morphology from GaMorNet. Since we have three morphological types, we assess
the precision of predicted morphologies using the following metrics (see
summary in Table 9), analogous to the usual binary classifiers161616The usual
definitions for a binary classifier are “$TP$” (True Positive), “$TN$” (True
Negative), “$FP$” (False Positive), and “$FN$” (False Negative), with
precision defined as $Precision=TP/(TP+FP)$.:

  * •

“$TD$” represents actual disks that are correctly predicted as disks.

  * •

“$FD_{B}$” represents actual bulges that are incorrectly predicted as disks.

  * •

“$FD_{I}$” represents actual indeterminate types that are incorrectly
predicted as disks.

  * •

“$FD$” represents the sum of actual bulges and indeterminate types that are
incorrectly predicted as disks ($FD=FD_{I}+FD_{B}$).

  * •

Analogous definitions apply to the other morphological labels; for instance,
$FB=FB_{I}+FB_{D}$ represents the sum of actual indeterminate types and disks
that are incorrectly predicted as bulges.

These new metrics, appropriate to the 3-tuple outputs of GaMorNet, are
directly related to the binary metrics. When “Positive” corresponds to “Disk”
and “Negative” to “Non-disk” (i.e., actual bulges or indeterminate types), the
following relations hold:

$\begin{split}TP&=TD\\\ TN&=TI+FB_{I}+FI_{B}+TB\\\ FP&=FD_{I}+FD_{B}\\\
FN&=FI_{D}+FB_{D}\end{split}$ (6)

Analogous equations apply when “Positive” means correctly identifying a galaxy
as “Indeterminate” or as a “Bulge”.

We now define metrics to evaluate GaMorNet’s performance, with the goal of
maximizing the fraction of actual disks (bulges) in galaxies that are
predicted as disks (bulges). Therefore, we define $Disk\\_Precision$ and
$Bulge\\_Precision$ as follows:

$\begin{split}Disk\\_Precision=\frac{TD}{TD+FD},\\\
Bulge\\_Precision=\frac{TB}{TB+FB}.\end{split}$ (7)

Note that we do not seek to maximize the precision of the indeterminate types.
Some galaxies are difficult to classify as disk- or bulge-dominated, either
because they have similar amounts of light in the disk and bulge, or they are
too small or have too low single-to-noise ratios. Therefore, we avoid
classifying such galaxies as disks or bulges (which would decrease
$Disk\\_Precision$ and $Bulge\\_Precision$) by identifying them as
indeterminate. That is, indeterminate types include both galaxies with bulge-
to-total light ratios between 0.45 and 0.55 and galaxies about which GaMorNet
cannot make accurate determinations. We define the fraction of galaxies being
predicted as indeterminate types as:

$\begin{split}Indet\\_Frac=\frac{TI+FI}{N}.\end{split}$ (8)

where $FI=FI_{D}+FI_{B}$ and $N=TD+FD+TI+FI+TB+FB$.

Ideally, we would like to classify every galaxy correctly; however, there is
an obvious trade-off between the size of the indeterminate fraction and the
precision of disk and bulge classifications. Each GaMorNet user must decide
this balance according to their scientific goals. Here, we have enormous
numbers of galaxies, so correctly identifying 100% of the sample is not
essential, while achieving high precision for the sample is important to our
science goals.

To find this balance, we maximize an averaged precision for disks and bulges
(rather than individual $Disk\\_Precision$ or $Bulge\\_Precision$):

$\begin{split}Ave\\_Precision_{B,D}=\frac{1}{2}(\frac{TD}{TD+FD}+\frac{TB}{TB+FB}).\end{split}$
(9)

We then decide on a mapping rule from GaMorNet outputs (3-tuples) to predicted
morphological types that strikes an optimal balance between (1) averaged
precision and (2) the indeterminate fraction.

For our scientific goals, we care less about the fraction of actual disks or
bulges that are correctly predicted, which we call $Disk\\_Recall$ and
$Bulge\\_Recall$, but these quantities may be important for other
applications:

$\begin{split}Disk\\_Recall=\frac{TD}{TD+FI_{D}+FB_{D}},\\\
Bulge\\_Recall=\frac{TB}{TB+FD_{B}+FI_{B}}.\end{split}$ (10)

For completeness, we also define accuracy, in the usual way:

$\begin{split}Accuracy=\frac{TD+TI+TB}{N},\end{split}$ (11)

where $N=TD+FD+TI+FI+TB+FB$.

GaMorNet produces three outputs, $P_{\rm D}$, $P_{\rm I}$, $P_{\rm B}$, which
are the probabilities that the galaxy is a disk, bulge, or indeterminate,
respectively. (By design, $P_{\rm D}+P_{\rm I}+P_{\rm B}=1$.) One way to
deduce the morphology would be to simply choose the highest probability; that
is, the galaxy is $\\{type\\}$ if $P_{\\{type\\}}=max(P_{D},P_{I},P_{B})$.
However, this does not result in the highest possible precision. Instead, we
use the following threshold mapping suggested by Ghosh et al. (2020):

$\begin{split}Galaxy\>is\>\textit{disk-
dominated}\;\textit{if}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\\\
P_{D}=max(P_{D},P_{I},P_{B})\>and\>P_{D}>Th_{D};\\\ Galaxy\>is\>\textit{bulge-
dominated}\;\textit{if}\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\;\\\
P_{B}=max(P_{D},P_{I},P_{B})\>and\>P_{B}>Th_{B};\\\
Galaxy\>is\>\textit{indeterminate}\;otherwise.\;\;\;\;\;\;\;\;\;\;\end{split}$
(12)

Here $Th_{D}$ and $Th_{B}$ are confidence thresholds (between 0 and 1) chosen
by the user. The higher the threshold, the higher the precision but also, the
greater the fraction of galaxies classified as indeterminate (as discussed
further below). The threshold mapping results in a higher precision compared
to the simpler most-probable mapping, at a cost of having a larger fraction of
galaxies being classified as indeterminate.

For each redshift bin, we searched for the sweet spot between the predicted
indeterminate fraction (defined by Equation 8) and averaged precision (between
disks and bulges only, defined by Equation 9), by varying the common
threshold, $Th$171717We use the same threshold for both disks and bulges:
$Th_{D}$ = $Th_{B}$ = $Th$.. Figure 10 shows the threshold to be used by our
model in each redshift bin, which was chosen by user’s preference, based on
the principle of maximizing averaged precision while minimizing indeterminate
fraction. Namely, $Th_{Low}=0.8$, $Th_{Mid}=0.7$, and $Th_{High}=0.65$. It is
evident that our choices of thresholds are not unique: (1) depending on how
favorable of a higher averaged precision to a lower indeterminate fraction
(based on the scientific question at hand), one may use a different threshold
(2) there could be a case of multiple candidates with negligible differences
(i.e. in low-redshift bin, Figure 10) (3) we have tested only a finite number
of thresholds — one could surely find another threshold that has better
performance than any one we have tested. Such exploration can be done by
heuristically testing other values. Performance based on our chosen threshold
only represents a lower bound of this approach.

Figure 11 shows disk precision, bulge precision and indeterminate fraction vs.
confidence threshold, using results from all three redshift bins (key bands)
for a quantitative comparison. Generally speaking, precision values in the
low-redshift bin are better than the ones in the mid- and high-redshift bins.
In addition, the indeterminate fraction in the low-redshift bin is also much
lower than cases in the other two bins. For completeness, Figure 12 shows a
similar comparison in each redshift bin using results from all five bands. In
the majority of cases, disk and bulge precision values increase monotonically
with increasing threshold, as does the indeterminate fraction. In both
figures, the chosen thresholds are highlighted with light blue open circles
(lines). At these thresholds, our PSFGAN+GaMorNet model achieves a precision
of, in the low-redshift bin, $96\%$ for disks and $90\%$ for bulges, with
fewer than one third of galaxies in the test set being indeterminate. For the
mid- and high-redshift bins, our model is still robust enough to achieve
precision values between $79\%$ and $90\%$ for at least three fifths of
galaxies.

In Figure 13, we show histograms of the GaMorNet-predicted probabilities, for
actual disks and actual bulges only, in two rows per redshift bin. Actual
disks are colored by their predicted morphologies ($TD$, $FB$, and $FI$) and
similarly for actual bulges ($FD$, $FI$, and $TB$). Note we used our final
models (with chosen thresholds) on recovered galaxies in the common test set
when plotting these histograms. Since we chose to optimize disk and bulge
precision (instead of recall), recall is lower. Specifically, disk recall
ranges from $50\%$ to $80\%$, while bulge recall is lower, $30\%$-$70\%$ in
the low-redshift bin and $20\%$-$40\%$ in the mid- and high-redshift bins.
Essentially, this is a consequence of choosing fairly high thresholds, which
effectively moves some actual disks (bulges) to the predicted indeterminate
category (thus reducing disk and bulge recall), in order to guarantee a high
disk (bulge) precision in the category of predicted disks (bulges). Finally,
it is worth mentioning that the balance between precision and recall depends
heavily on the chosen thresholds. Different thresholds can be selected to
achieve (for instance) higher recall and lower precision, based on the
scientific question at hand.

###  4.2 Relation Between GaMorNet Precision and Key Variables

Here we discuss how disk and bulge precision relate to three key parameters of
the host galaxies, namely, g-band Kron radius, g-band magnitude, and contrast
ratio. We first sort galaxies into True Disk (TD), False Disk (FD), True Bulge
(TB), False Bulge (FB), True Indeterminate (TI), and False Indeterminate (FI)
categories (see Table 9). The indeterminate category includes galaxies that
have actual bulge-to-total flux ratios between $0.45$ and $0.55$ (i.e., actual
indeterminate types) or that GaMorNet incorrectly identifies as indeterminate;
this category increases the fraction of actual disks (bulges) left in the
predicted disk (predicted bulge) category. Here, we do not differentiate
between TI and FI, nor do we particularly care about indeterminate precision
or recall. We instead focus on how disk and bulge precision depends on size,
magnitude, and contrast ratio.

Figures 14a, 14b, and 14c show the distributions of these six subgroups, as a
function of the three chosen parameters, in each of the three redshift bins.
To assess the similarity of distributions, we did Kolmogorov-Smirnov (K-S)
tests (Massey, 1951)—one for each parameter in each redshift bin—between the
parameter distributions for true and false disks (Table 10). We did the same
for bulges (Table 11).

These tests and figures suggest that true disks and falsely identified disks
have different size distributions, at least for low and mid redshifts. (The
high-redshift data might be noisier and thus less sensitive to this
difference.) This phenomenon is obvious in the lower redshift bins, where
false disks tend to have smaller radii than true disks; that is, smaller
galaxies are clearly harder to classify correctly, and thus disk precision
depends on galaxy size. Likewise, bulge precision shows some dependency on
galaxy radius, although the K-S tests are less significant. In some cases,
disk and bulge precision depend slightly on magnitude, in the sense that
fainter galaxies are harder to classify correctly. Finally, neither precision
depends strongly on contrast ratio.

Figure 14a:  Distributions of galaxies in the common test set of the low-redshift bin ($0<z<0.25$), colored by their GaMorNet predicted morphologies in g-band and the correctness of this prediction, on log10 g-band Kron radius (arcsec), g-band magnitude, and log10 contrast ratio (in g-band). This corner plot shows True Disks (blue filled circles), True Bulges (purple filled squares), False Disks (red filled circles), False Bulges (orange filled squares), and True and False Indeterminate cases (yellow filled triangles). Specifically, histograms (diagonal) show the dependency of these categories on each key variable as an univariate function; scatter plots (off-diagonal) show the joint dependence on two variables. See § 4.2 for analysis in detail.  Figure 14b: Distributions of galaxies in the common test set of the mid-redshift bin ($0.25<z<0.5$), colored by their GaMorNet predicted morphologies in r-band and the correctness of this prediction, on log10 g-band Kron radius (arcsec), g-band magnitude, and log10 contrast ratio (in r-band). Symbols and colors as in Fig. 14a. See § 4.2 for analysis in detail.  Figure 14c: Distributions of galaxies in the common test set of the high-redshift bin ($0.5<z<1.0$), colored by their GaMorNet predicted morphologies in i-band and the correctness of this prediction, on log10 g-band Kron radius (arcsec), g-band magnitude, and log10 contrast ratio (in i-band). Symbols and colors as in Fig. 14a. See § 4.2 for analysis in detail.  Table 10: P-values from K-S Tests of Each Galaxy Parameter Distribution between True Disks and False DisksaaK-S probability that True Disks and False Disks have the same underlying distribution of a given parameter in a given redshift bin. Redshift | Low | Mid | High
---|---|---|---
| ($g$ band) | ($r$ band) | ($i$ band)
Galaxy Parameter |  |  |
$log_{10}(R_{Kron})$bbLog10 $g$-band Kron radius (arcsec). | $<10^{-4}$ | $<10^{-4}$ | $0.3761$
$m_{g}$cc$g$-band magnitude. | $0.0017$ | $0.0052$ | $0.0004$
$log_{10}(R_{\\{keyband\\}})$ddLog10 contrast ratio between point source and host galaxy in $g$, $r$, and $i$ bands for the low-, mid-, and high-redshift bins, respectively. | $0.6103$ | $0.5538$ | $0.0578$
Table 11:  P-values from K-S Tests of Each Galaxy Parameter Distribution between True Bulges and False BulgesaaK-S probability that True Bulges and False Bulges have the same underlying distribution of a given parameter in a given redshift bin. Redshift | Low | Mid | High
---|---|---|---
| ($g$ band) | ($r$ band) | ($i$ band)
Galaxy Parameter |  |  |
$log_{10}(R_{Kron})$bbLog10 $g$-band Kron radius (arcsec). | $0.0044$ | $0.0667$ | $0.0011$
$m_{g}$cc$g$-band magnitude. | $0.1234$ | $0.2076$ | $0.0004$
$log_{10}(R_{\\{keyband\\}})$ddLog10 contrast ratio between point source and host galaxy in $g$, $r$, and $i$ bands for the low-, mid-, and high-redshift bins, respectively. | $0.0355$ | $0.232$ | $0.0195$

###  4.3 GaMorNet Predictions Compared to GALFIT Results for Previously
Unclassified Real AGNs

To examine the robustness and precision of our GaMorNet model, we compared its
predictions to GALFIT results for PSFGAN-processed AGN images. That is, we
compared GaMorNet (not PSFGAN+GaMorNet) to GALFIT. Specifically, we fitted
light profiles of AGNs from the HSC Wide survey, for three samples: 1,330 low-
redshift broad H-alpha selected AGNs (mostly $0<z<0.25$) from Liu et al.,
2019, 227 medium-redshift X-ray and/or IR selected AGNs (mostly $0.25<z<0.5$)
from Stemo et al., 2020, and 644 high-redshift X-ray and/or IR selected AGNs
($0.5<z<1.0$) from Stemo et al., 2020 again. (Cross matching of these catalogs
with HSC was done as in § 2.1.) For each AGN, we first removed the central
point source using multi-band PSFGAN from our final model, in all five HSC
bands. We then used GALFIT to fit a single Sérsic profile plus sky background
to each recovered host galaxy, in the band of interest—i.e., $g$, $r$, and $i$
for the low-, medium- and high-redshift bins, respectively. We mapped each
Sérsic index into a morphological type using the same rules for single-
component galaxies described in § 3.2 (i.e., $n<2$ is a disk, $n>2.5$ is a
bulge).

For comparison, we used GaMorNet to classify each recovered host galaxy in the
band of interest. We mapped the three GaMorNet probabilities into
morphological types, as discussed in § 4.1, choosing the following thresholds
(for both $P_{D}$ and $P_{B}$): $\textit{Th}=0.8$, $0.7$, and $0.65$ for the
low-, medium- and high-redshift bins, respectively.

We then compared the morphological labels from GALFIT and GaMorNet. Results
are shown in Figure 15, for each of the three redshift bins. In the low-
redshift bin, the vast majority of galaxies predicted as disks by GaMorNet
($P_{D}>T$, above the cyan solid line) are also predicted as disks by GALFIT
($n<2$, to the left of the blue dashed line). Similarly, the majority of
galaxies predicted as bulges by GaMorNet ($P_{B}>T$, above the cyan solid
line) are also predicted as bulges by GALFIT ($n>2.5$, to the right of red
dashed line). Results for the mid- and high-redshift bins are similar (medium
and bottom rows, Figure 15). In very few cases are galaxies characterized as
bulges by GALFIT and as disks by GaMorNet, or vice versa.

Table 12 shows the exact numbers for these morphology comparisons, as well as
the associated precision values. For instance, in the low-redshift bin, of the
452 galaxies predicted as disks by GaMorNet, 426 (94%) are also determined to
be disks by GALFIT. Overall, classification results between GaMorNet and
GALFIT agree well ($>90$% for disks, $>80$% for bulges). This means GaMorNet
(preceded by PSFGAN) determines the morphologies of AGN host galaxies as well
as GALFIT, while running much faster and not needing customized input
parameters.

Figure 15:  GaMorNet predictions agree well with GALFIT results.
(Specifically, here we compare PSFGAN+GaMorNet predictions to GALFIT analysis
of PSFGAN-processed AGN images.) Top row: Scatter plot with contours
superimposed, for galaxy morphologies in the low redshift sample ($0<z<0.25$).
Middle row: Same for the medium redshift ($0.25<z<0.5$). Bottom row: Same for
the high redshift ($0.5<z<1.0$). Left: Probability that the galaxy is a disk
($P_{D}$ from GaMorNet) versus single Sérsic index ($n$ from GALFIT). Right:
Probability that the galaxy is a bulge ($P_{B}$ from GaMorNet) versus Sérsic
index. The horizontal long-dash cyan line indicates the chosen threshold for
GaMorNet; above this line, GaMorNet classifies galaxies as disks (left) or
bulges (right). The vertical dark blue dashed line ($n=2$, on the left) and
red dashed line ($n=2.5$, on the right) mark the boundaries for GALFIT-ed
Sérsic indices indicating disks ($n<2$) and bulges ($n>2.5$). Each subplot
uses a unique color bar to show the estimated probability density function of
its data (generated using a Kernel Density Estimator).  Table 12: Comparison
of GaMorNet and GALFIT Classifications

| Disks (GaMorNet) | Bulges (GaMorNet)
---|---|---
Low redshift bin
Disks (GALFIT) |  $426$($94\%$) |  $3$($1\%$)
Indets (GALFIT) |  $23$($5\%$) |  $25$($7\%$)
Bulges (GALFIT) |  $3$($1\%$) |  $355$($93\%$)
Total (GALFIT) | $452$ | $383$
Medium redshift bin
Disks (GALFIT) |  $97$($93\%$) |  $3$($9\%$)
Indets (GALFIT) |  $1$($1\%$) |  $2$($6\%$)
Bulges (GALFIT) |  $6$($6\%$) |  $27$($84\%$)
Total (GALFIT) | $104$ | $32$
High redshift bin
Disks (GALFIT) |  $225$($91\%$) |  $8$($8\%$)
Indets (GALFIT) |  $4$($2\%$) |  $12$($11\%$)
Bulges (GALFIT) |  $17$($7\%$) |  $86$($81\%$)
Total (GALFIT) | $246$ | $106$

Note. — Percentages refer to precision, i.e., the number of correctly
classified $\\{type\\}$ divided by the number of total galaxies predicted as
this $\\{type\\}$.

##  5 Summary and Discussion

We developed a comprehensive machine learning framework to morphologically
classify AGN host galaxies, tailored specifically to HSC Wide survey images.
Because the signal-to-noise ratio depends strongly on redshift, we divided
data into, and separately built models for, three redshift bins: low
($0<z<0.25$), medium ($0.25<z<0.5$), and high ($0.5<z<1.0$). We focused on
specific HSC bands for each—namely $g$, $r$, and $i$ for the low-, medium-,
and high-redshift bins, respectively. This ensures we are classifying within
approximately the same rest-frame wavelength range. In each redshift bin, we
modified the original version of PSFGAN (Stark et al., 2018) to remove the AGN
point source in five HSC bands simultaneously. We then trained a version of
GaMorNet (Ghosh et al., 2020) to morphologically classify PSFGAN-processed
images, for each of the five bands. We used a large number of simulated
galaxies for the initial training, for which we know the correct morphological
parameters perfectly. This initial training was followed by a transfer-
learning step, in which we used a small amount of real data to fine-tune model
parameters. The final PSFGAN+GaMorNet model was then tested on either
simulated realistic AGNs (i.e., inactive galaxies that were already
morphological classified, to which point sources were added) or unclassified
real AGNs (which we fitted with GALFIT, for comparison). The precision is
highest for disks and slightly lower for bulges, because of the much higher
fraction of disks in the training samples. The precision is also highest for
the lowest redshift bin ($\sim 95$%), where the signal-to-noise ratio is
highest, but is still very good ($80-90$%) for the higher redshift bins.

Specifically, by first training our models from scratch using 150,000
simulated galaxies with artificial AGN point sources (§ 3.1), we achieved
$\sim 90\%$ classification precision values and mis-classification rates
between $2\%$ and $5\%$ on test sets (§ 3.2). We then used transfer learning
to fine-tune parameters of trained models with respect to $\sim$50,000 (low-
redshift bin) or $\sim$13,000 (medium- and high-redshift bins) real galaxies
with artificial AGN point sources, which were previously classified by
traditional methods (§ 3.3 and § 3.4). We showed explicitly that in the low-,
medium- and high-redshift bins, using thresholds of $T=0.8$, 0.7, and 0.65,
respectively, for both disks and bulges, our models achieved precision values
of 96%, 82%, and 79% on disks, and 90%, 90%, and 80% on bulges, with
corresponding incompleteness (indeterminate fractions) of 30%, 43%, and 42% (§
4.1). We explored how this precision depends on host galaxy magnitude, radius,
and the contrast ratio between AGN point source and host galaxy. We verified
the parameter space in which PSFGAN+GaMorNet works well (§ 4.2). Finally, we
GALFIT-ed 2,201 galaxies, after processing them with PSFGAN, and compared
those classifications to results from GaMorNet, demonstrating that our models
agree $80\%-95\%$ of time (§ 4.3).

We reached two main conclusions. First, our experiment confirms the
feasibility of combining PSFGAN (which removes the AGN point source) and
GaMorNet (which classifies the galaxy morphology). Our PSFGAN+GaMorNet model
achieves good precision for AGNs for redshifts $z<1$. Although our model was
tailored specifically to the HSC Wide survey, the same approach can be easily
generalized to other surveys of interest, and it is particularly helpful that
only a limited number of morphology labels are needed for the transfer
learning step.

Second, our final GaMorNet model predicts morphologies that agree well with
those from a traditional two-dimensional fitting method, GALFIT. Moreover, it
is a non-parametric method, that does not require specific fitting functions
and galaxy-wise input parameters during inference. In addition, it runs two to
three orders of magnitude faster at least. PSFGAN+GaMorNet is an ideal tool
for determining morphologies of AGNs in upcoming data-intensive surveys.

In near future, we are planning to apply our PSFGAN+GaMorNet framework on real
AGNs to study their host galaxy morphologies. We are also interested in using
a similar approach with other ML frameworks to study host galaxy properties
beyond morphology.

The authors are very grateful to the anonymous referees for their insightful,
encouraging, and pertinent comments, which were extremely helpful in improving
the manuscript, clarifying discussions, and making the results more accessible
to readers. This material is based upon work supported by the National Science
Foundation under Grant No. 1715512. We acknowledge support from National
Aeronautics and Space Administration via ADAP grant 80NSSC18K0418. We thank
the Yale Center for Research Computing (YCRC) for guidance and use of the
research computing infrastructure. The Hyper Suprime-Cam (HSC) collaboration
includes the astronomical communities of Japan and Taiwan, and Princeton
University. The HSC instrumentation and software were developed by the
National Astronomical Observatory of Japan (NAOJ), the Kavli Institute for the
Physics and Mathematics of the Universe (Kavli IPMU), the University of Tokyo,
the High Energy Accelerator Research Organization (KEK), the Academia Sinica
Institute for Astronomy and Astrophysics in Taiwan (ASIAA), and Princeton
University. Funding was contributed by the FIRST program from the Japanese
Cabinet Office, the Ministry of Education, Culture, Sports, Science and
Technology (MEXT), the Japan Society for the Promotion of Science (JSPS),
Japan Science and Technology Agency (JST), the Toray Science Foundation, NAOJ,
Kavli IPMU, KEK, ASIAA, and Princeton University. This paper makes use of
software developed for the Large Synoptic Survey Telescope. We thank the LSST
Project for making their code available as free software at http://dm.lsst.org
This paper is based (in part) on data collected at the Subaru Telescope and
retrieved from the HSC data archive system, which is operated by the Subaru
Telescope and Astronomy Data Center (ADC) at National Astronomical Observatory
of Japan. Data analysis was in part carried out with the cooperation of Center
for Computational Astrophysics (CfCA), National Astronomical Observatory of
Japan. The Subaru Telescope is honored and grateful for the opportunity of
observing the Universe from Maunakea, which has the cultural, historical and
natural significance in Hawaii. The Pan-STARRS1 Surveys (PS1) and the PS1
public science archive have been made possible through contributions by the
Institute for Astronomy, the University of Hawaii, the Pan-STARRS Project
Office, the Max Planck Society and its participating institutes, the Max
Planck Institute for Astronomy, Heidelberg, and the Max Planck Institute for
Extraterrestrial Physics, Garching, The Johns Hopkins University, Durham
University, the University of Edinburgh, the Queen’s University Belfast, the
Harvard-Smithsonian Center for Astrophysics, the Las Cumbres Observatory
Global Telescope Network Incorporated, the National Central University of
Taiwan, the Space Telescope Science Institute, the National Aeronautics and
Space Administration under grant No. NNX08AR22G issued through the Planetary
Science Division of the NASA Science Mission Directorate, the National Science
Foundation grant No. AST-1238877, the University of Maryland, Eotvos Lorand
University (ELTE), the Los Alamos National Laboratory, and the Gordon and
Betty Moore Foundation.

##  Appendix A Online Data Access

Our PSFGAN+GaMorNet framework, along with trained models and detailed
instructions, are made accessible to the public. Interested readers can access
them at the following GitHub Repository:

  * •

https://github.com/ufsccosmos/PSFGAN-GaMorNet.

##  Appendix B Motivation of modifying the generator in PSFGAN

The generator in PSFGAN, by design, has a structure of an encoder-decoder
(i.e. image side length first decreases monotonically then increases
monotonically). Image side length at the “bottleneck” (where side length is at
its minimum) is 4 in the default structure of PSFGAN. (Side lengths of encoder
layers, by default: [424, 212, 106, 53, 27, 14, 7, 4]; order reversed for
decoder layers) In our experiments, since our image has a side length of 239,
we removed one layer from the encoder-decoder, so that side length at the
bottleneck remains the same. (Side lengths of encoder layers: [239, 120, 60,
30, 15, 8, 4]; order reversed for decoder layers) By design, (using the
encoder as example) side lengths of two adjacent layers, $s_{n}$ and
$s_{n+1}$, satisfy a relation such that $s_{n+1}$ equals to the integer
division (i.e. division without remainder) of $(s_{n}+1)$ by 2.

Recall that in both the original PSFGAN paper and our work, the PSFGAN is used
for the same task: to remove the (usually bright) AGN point source at image
center. Thus, a latent space (bottleneck) with similar size should suffice our
need as well. We have not explicitly tested the case of having a different
side length at the bottleneck and how this would affect our results. Such
experiments would be very computationally expensive, for we trained versions
of PSFGAN and GaMorNet as linked pairs (i.e. for each unique structure of
PSFGAN, one needs to train and test a set of versions of GaMorNet).

##  Appendix C Prediction Continuity Analysis for Adjacent Models

We divided our datasets into three redshift bins: low ($0<z<0.25$), medium
($0.25<z<0.5$), and high ($0.5<z<1.0$), before training PSFGAN and GaMorNet
models independently in each bin. Although this approach benefits our final
models (i.e. each of them becomes more precise by focusing on narrower ranges
of galaxy magnitude and radius), it is natural to ask whether two adjacent
models (e.g. model A trained on low-redshift bin vs. model B trained on mid-
redshift bin, both for the same band) will give one identical answer for an
input galaxy. We answer this question specifically in this section.

Recall that for each redshift bin, we trained one version of multi-band PSFGAN
and five versions (one for each band) of GaMorNet (Section 3.4). We then
determined mapping rules (and common thresholds) to project GaMorNet output
probabilities into predicted morphological types (Section 4.1). Hereafter, for
convenience, we denote the final model we trained for band $\\{filter\\}$ in
$\\{bin\\_name\\}$ as $model-\\{filter\\}-\\{bin\\_name\\}$ (e.g. $model-g-
low$ stands for our final model trained for band $g$ in the low-redshift bin).
Note that we already applied the mapping rules ($Th_{Low}=0.8$,
$Th_{Mid}=0.7$, and $Th_{High}=0.65$, regardless of the band) for each model
(i.e. outputs of our final models are predicted morphological types, instead
of probabilities).

For two models A and B and a certain bin X, we can define the Agreed
Predictions Fraction as:

$Agrd\\_Pred\\_Frac_{X}^{AB}=\frac{N(agrd\\_disks)_{X}^{AB}+N(agrd\\_indets)_{X}^{AB}+N(agrd\\_bulges)_{X}^{AB}}{N(all\\_gals)_{X}^{AB}}$
(C1)

Where $N(agrd\\_disks)_{X}^{AB}$ is the number of galaxies in bin X that are
predicted as disks by both model A and B (similarly for
$N(agrd\\_indets)_{X}^{AB}$ and $N(agrd\\_bulges)_{X}^{AB}$).

For completeness, these definitions can be related to metrics introduced in
Table 9. We first denote galaxies predicted as disks as $PD$, which can be
related to $TD$ and $FD$ as simply $PD=TD+FD$ (see Table 9). Then we denote
galaxies predicted as disks by a certain model A as $PD^{A}$ (similarly for
other metrics). At last, we denote galaxies predicted as disks by both model A
and B as $PD^{A}\cap PD^{B}$ (that is, one may look at $PD^{A}$ as a set of
all galaxies predicted by model A, so the $\cap$ symbol makes sense).
Definitions for other morphological types are similar. The following relations
holds:

$N(agrd\\_disks)_{X}^{AB}=PD^{A}\cap PD^{B}$ (C2)

$N(agrd\\_indets)_{X}^{AB}=PI^{A}\cap PI^{B}$ (C3)

$N(agrd\\_bulges)_{X}^{AB}=PB^{A}\cap PB^{B}$ (C4)

We compared predictions from each of the three final models, $model-g-low$,
$model-r-mid$ and $model-i-high$ (note each of them was trained in the key
band for corresponding redshift bin), against predictions from each model’s
adjacent model(s), in appropriate redshift bins, respectively. The following
combinations of model A (main model), model B (adjacent model) and redshift
bin X are chosen for analysis:

  1. 1.

A: $model-g-low$; B: $model-g-mid$; X: low-redshift bin or mid-redshift bin.

  2. 2.

A: $model-r-mid$; B: $model-r-low$ ($model-r-high$); X: mid-redshift bin or
low-redshift bin (high-redshift bin).

  3. 3.

A: $model-i-high$; B: $model-i-mid$; X: high-redshift bin or mid-redshift bin.

It is worth to mention that in the high-redshift bin, all 1,524 galaxies from
the common test set were used, while in the low-redshift (mid-redshift) bin,
only 4,635 (958) galaxies with strictly $z<0.25$ ($0.25<z<0.5$) were used (see
Figure 1a and Table 5). Moreover, in addition to analyzing the continuity of
adjacent models in each redshift bin, we divide each redshift bin evenly into
five smaller sub-bins, and repeat this analysis to capture how the agreed
prediction fraction changes as a function of redshift.

Table 13, 14, and 15 show our continuity analysis results for $model-g-low$,
$model-r-mid$, and $model-i-high$ with each model’s adjacent model(s),
respectively. We observe that the agreed prediction fraction between two
adjacent models is always highest at redshift bin boundaries, and it decreases
monotonically as we go away. It is also noticeable that the agreed prediction
fraction is lower at the low-mid boundary than at the mid-high boundary —
intuitively speaking, this could be a direct consequence of the fact that
galaxies from mid- and high-redshift bins have relatively larger overlaps in
magnitude and radius.

Table 13: Continuity Analysis Results for $model-g-low$ and Its Adjacent Model
($model-g-mid$)

Sub-redshift-bin | First bin | Second bin | Third bin | Fourth bin | Fifth bin | Five bins combined
---|---|---|---|---|---|---
with $model-g-mid$ in low-redshift bin
Redshift Range | $0<z<0.05$ | $0.05<z<0.1$ | $0.1<z<0.15$ | $0.15<z<0.2$ | $0.2<z<0.25$ | All ($0<z<0.25$)
Agreed Predictions | 40 (59.7%) | 867 (69.1%) | 1450 (76.2%) | 815 (81.0%) | 356 (87.7%) | 3528 (76.1%)
All Galaxies | 67 (100%) | 1254 (100%) | 1902 (100%) | 1006 (100%) | 406 (100%) | 4635 (100%)
with $model-g-mid$ in mid-redshift bin
Redshift Range | $0.25<z<0.3$ | $0.3<z<0.35$ | $0.35<z<0.4$ | $0.4<z<0.45$ | $0.45<z<0.5$ | All ($0.25<z<0.5$)
Agreed Predictions | 85 (85.9%) | 142 (83.0%) | 201 (79.1%) | 126 (71.2%) | 162 (63.0%) | 716 (74.7%)
All Galaxies | 99 (100%) | 171 (100%) | 254 (100%) | 177 (100%) | 257 (100%) | 958 (100%)

Note. — We apply $model-g-low$ and its adjacent model ($model-g-mid$) in the
low- and mid-redshift bins, and calculate their agreed prediction fractions.
We then divide each redshift bin into five smaller sub-bins, and repeat this
calculation in each of these sub-bins.

Table 14: Continuity Analysis Results for $model-r-mid$ and Its Adjacent
Models ($model-r-low$ and $model-r-high$)

Sub-redshift-bin | First bin | Second bin | Third bin | Fourth bin | Fifth bin | Five bins combined
---|---|---|---|---|---|---
with $model-r-low$ in low-redshift bin
Redshift Range | $0<z<0.05$ | $0.05<z<0.1$ | $0.1<z<0.15$ | $0.15<z<0.2$ | $0.2<z<0.25$ | All ($0<z<0.25$)
Agreed Predictions | 37 (55.2%) | 851 (67.9%) | 1435 (75.4%) | 846 (84.1%) | 362 (89.2%) | 3531 (76.2%)
All Galaxies | 67 (100%) | 1254 (100%) | 1902 (100%) | 1006 (100%) | 406 (100%) | 4635 (100%)
with $model-r-low$ in mid-redshift bin
Redshift Range | $0.25<z<0.3$ | $0.3<z<0.35$ | $0.35<z<0.4$ | $0.4<z<0.45$ | $0.45<z<0.5$ | All ($0.25<z<0.5$)
Agreed Predictions | 87 (87.9%) | 146 (85.4%) | 197 (77.6%) | 119 (67.2%) | 153 (59.5%) | 702 (73.3%)
All Galaxies | 99 (100%) | 171 (100%) | 254 (100%) | 177 (100%) | 257 (100%) | 958 (100%)
with $model-r-high$ in mid-redshift bin
Redshift Range | $0.25<z<0.3$ | $0.3<z<0.35$ | $0.35<z<0.4$ | $0.4<z<0.45$ | $0.45<z<0.5$ | All ($0.25<z<0.5$)
Agreed Predictions | 78 (78.8%) | 145 (84.8%) | 226 (89.0%) | 159 (90.0%) | 236 (91.8%) | 844 (88.1%)
All Galaxies | 99 (100%) | 171 (100%) | 254 (100%) | 177 (100%) | 257 (100%) | 958 (100%)
with $model-r-high$ in high-redshift bin
Redshift Range | $0.5<z<0.6$ | $0.6<z<0.7$ | $0.7<z<0.8$ | $0.8<z<0.9$ | $0.9<z<1.0$ | All ($0.5<z<1.0$)
Agreed Predictions | 177 (92.7%) | 372 (91.4%) | 325 (86.2%) | 269 (81.5%) | 164 (74.9%) | 1307 (85.8%)
All Galaxies | 191 (100%) | 407 (100%) | 377 (100%) | 330 (100%) | 219 (100%) | 1524 (100%)

Note. — We apply $model-r-mid$ and its adjacent models ($model-r-low$ and
$model-r-high$) in the low-, mid- and high-redshift bins, and calculate their
agreed prediction fractions. We then divide each redshift bin into five
smaller sub-bins, and repeat this calculation in each of these sub-bins.

Table 15: Continuity Analysis Results for $model-i-high$ and Its Adjacent
Model ($model-i-mid$)

Sub-redshift-bin | First bin | Second bin | Third bin | Fourth bin | Fifth bin | Five bins combined
---|---|---|---|---|---|---
with $model-i-mid$ in mid-redshift bin
Redshift Range | $0.25<z<0.3$ | $0.3<z<0.35$ | $0.35<z<0.4$ | $0.4<z<0.45$ | $0.45<z<0.5$ | All ($0.25<z<0.5$)
Agreed Predictions | 75 (75.8%) | 142 (83.0%) | 223 (87.8%) | 157 (88.7%) | 233 (90.7%) | 830 (86.6%)
All Galaxies | 99 (100%) | 171 (100%) | 254 (100%) | 177 (100%) | 257 (100%) | 958 (100%)
with $model-i-mid$ in high-redshift bin
Redshift Range | $0.5<z<0.6$ | $0.6<z<0.7$ | $0.7<z<0.8$ | $0.8<z<0.9$ | $0.9<z<1.0$ | All ($0.5<z<1.0$)
Agreed Predictions | 174 (91.1%) | 369 (90.7%) | 323 (85.7%) | 266 (80.6%) | 162 (74.0%) | 1294 (84.9%)
All Galaxies | 191 (100%) | 407 (100%) | 377 (100%) | 330 (100%) | 219 (100%) | 1524 (100%)

Note. — We apply $model-i-high$ and its adjacent model ($model-i-mid$) in the
mid- and high-redshift bins, and calculate their agreed prediction fractions.
We then divide each redshift bin into five smaller sub-bins, and repeat this
calculation in each of these sub-bins.

## References

  * Ackermann et al. (2018) Ackermann, S., Schawinski, K., Zhang, C., Weigel, A. K., & Turp, M. D. 2018, MNRAS, 479, 415, doi: 10.1093/mnras/sty1398
  * Aihara et al. (2018) Aihara, H., Arimoto, N., Armstrong, R., et al. 2018, PASJ, 70, S4, doi: 10.1093/pasj/psx066
  * Aihara et al. (2019) Aihara, H., AlSayyad, Y., Ando, M., et al. 2019, PASJ, 71, 114, doi: 10.1093/pasj/psz103
  * Aihara et al. (2021) —. 2021, arXiv e-prints, arXiv:2108.13045.  https://arxiv.org/abs/2108.13045
  * Ananna et al. (2020) Ananna, T. T., Urry, C. M., Treister, E., et al. 2020, ApJ, 903, 85, doi: 10.3847/1538-4357/abb815
  * Astropy Collaboration et al. (2018) Astropy Collaboration, Price-Whelan, A. M., Sipőcz, B. M., et al. 2018, AJ, 156, 123, doi: 10.3847/1538-3881/aabc4f
  * Barchi et al. (2020) Barchi, P. H., de Carvalho, R. R., Rosa, R. R., et al. 2020, Astronomy and Computing, 30, 100334, doi: 10.1016/j.ascom.2019.100334
  * Barden et al. (2012) Barden, M., Häußler, B., Peng, C. Y., McIntosh, D. H., & Guo, Y. 2012, MNRAS, 422, 449, doi: 10.1111/j.1365-2966.2012.20619.x
  * Binney & Merrifield (1998) Binney, J., & Merrifield, M. 1998, Galactic astronomy (Princeton University Press), 796.  https://press.princeton.edu/titles/6358.html
  * Brown et al. (2019) Brown, M. J. I., Duncan, K. J., Landt, H., et al. 2019, MNRAS, 489, 3351, doi: 10.1093/mnras/stz2324
  * Chen (2017) Chen, Y.-C. 2017, arXiv e-prints, arXiv:1704.03924.  https://arxiv.org/abs/1704.03924
  * Cheng et al. (2021a) Cheng, T.-Y., Huertas-Company, M., Conselice, C. J., et al. 2021a, MNRAS, 503, 4446, doi: 10.1093/mnras/stab734
  * Cheng et al. (2021b) Cheng, T.-Y., Conselice, C. J., Aragón-Salamanca, A., et al. 2021b, MNRAS, 507, 4425, doi: 10.1093/mnras/stab2142
  * Cho et al. (2015) Cho, J., Lee, K., Shin, E., Choy, G., & Do, S. 2015, arXiv e-prints, arXiv:1511.06348.  https://arxiv.org/abs/1511.06348
  * Cisternas et al. (2011) Cisternas, M., Jahnke, K., Bongiorno, A., et al. 2011, ApJ, 741, L11, doi: 10.1088/2041-8205/741/1/L11
  * Croton et al. (2006) Croton, D. J., Springel, V., White, S. D. M., et al. 2006, MNRAS, 365, 11, doi: 10.1111/j.1365-2966.2005.09675.x
  * Di Matteo et al. (2005) Di Matteo, T., Springel, V., & Hernquist, L. 2005, Nature, 433, 604, doi: 10.1038/nature03335
  * Dieleman et al. (2015) Dieleman, S., Willett, K. W., & Dambre, J. 2015, MNRAS, 450, 1441, doi: 10.1093/mnras/stv632
  * Dimauro et al. (2018) Dimauro, P., Huertas-Company, M., Daddi, E., et al. 2018, MNRAS, 478, 5410, doi: 10.1093/mnras/sty1379
  * Domínguez Sánchez et al. (2018) Domínguez Sánchez, H., Huertas-Company, M., Bernardi, M., Tuccillo, D., & Fischer, J. L. 2018, MNRAS, 476, 3661, doi: 10.1093/mnras/sty338
  * Domínguez Sánchez et al. (2019) Domínguez Sánchez, H., Huertas-Company, M., Bernardi, M., et al. 2019, MNRAS, 484, 93, doi: 10.1093/mnras/sty3497
  * Ellison et al. (2019) Ellison, S. L., Viswanathan, A., Patton, D. R., et al. 2019, MNRAS, 487, 2491, doi: 10.1093/mnras/stz1431
  * Fabian (2012) Fabian, A. C. 2012, ARA&A, 50, 455, doi: 10.1146/annurev-astro-081811-125521
  * Fabian et al. (2006) Fabian, A. C., Celotti, A., & Erlund, M. C. 2006, Monthly Notices of the Royal Astronomical Society: Letters, 373, L16, doi: 10.1111/j.1745-3933.2006.00234.x
  * Fabian et al. (2008) Fabian, A. C., Vasudevan, R. V., & Gandhi, P. 2008, Monthly Notices of the Royal Astronomical Society: Letters, 385, L43, doi: 10.1111/j.1745-3933.2008.00430.x
  * Ferrarese & Merritt (2000) Ferrarese, L., & Merritt, D. 2000, ApJ, 539, L9, doi: 10.1086/312838
  * Gabor et al. (2009) Gabor, J. M., Impey, C. D., Jahnke, K., et al. 2009, ApJ, 691, 705–722, doi: 10.1088/0004-637x/691/1/705
  * Gebhardt et al. (2000) Gebhardt, K., Bender, R., Bower, G., et al. 2000, ApJ, 539, L13, doi: 10.1086/312840
  * Ghosh et al. (2020) Ghosh, A., Urry, C. M., Wang, Z., et al. 2020, ApJ, 895, 112, doi: 10.3847/1538-4357/ab8a47
  * Ghosh et al. (2022) Ghosh, A., Urry, C. M., Rau, A., et al. 2022, ApJ, 935, 138, doi: 10.3847/1538-4357/ac7f9e
  * Glikman et al. (2015) Glikman, E., Simmons, B., Mailly, M., et al. 2015, ApJ, 806, 218, doi: 10.1088/0004-637X/806/2/218
  * Goodfellow et al. (2014) Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., et al. 2014, Generative Adversarial Networks, https://arxiv.org/abs/1406.2661.  https://arxiv.org/abs/1406.2661
  * Harris et al. (2020) Harris, C. R., Millman, K. J., van der Walt, S. J., et al. 2020, Nature, 585, 357, doi: 10.1038/s41586-020-2649-2
  * Harrison (2017) Harrison, C. M. 2017, Nature Astronomy, 1, 0165, doi: 10.1038/s41550-017-0165
  * Heckman & Best (2014) Heckman, T. M., & Best, P. N. 2014, ARA&A, 52, 589, doi: 10.1146/annurev-astro-081913-035722
  * Hewlett et al. (2017) Hewlett, T., Villforth, C., Wild, V., et al. 2017, MNRAS, 470, 755, doi: 10.1093/mnras/stx997
  * Hopkins et al. (2005) Hopkins, P. F., Hernquist, L., Cox, T. J., et al. 2005, ApJ, 630, 705, doi: 10.1086/432438
  * Hopkins et al. (2006) —. 2006, ApJS, 163, 1, doi: 10.1086/499298
  * Hopkins et al. (2007) Hopkins, P. F., Richards, G. T., & Hernquist, L. 2007, ApJ, 654, 731, doi: 10.1086/509629
  * Huertas-Company et al. (2015) Huertas-Company, M., Gravet, R., Cabrera-Vives, G., et al. 2015, ApJS, 221, 8, doi: 10.1088/0067-0049/221/1/8
  * Hunter (2007) Hunter, J. D. 2007, Computing in Science & Engineering, 9, 90, doi: 10.1109/MCSE.2007.55
  * Kingma & Ba (2014) Kingma, D. P., & Ba, J. 2014, arXiv e-prints, arXiv:1412.6980.  https://arxiv.org/abs/1412.6980
  * Kocevski et al. (2012) Kocevski, D. D., Faber, S. M., Mozena, M., et al. 2012, ApJ, 744, 148, doi: 10.1088/0004-637X/744/2/148
  * Koekemoer et al. (2011) Koekemoer, A. M., Faber, S. M., Ferguson, H. C., et al. 2011, ApJS, 197, 36, doi: 10.1088/0067-0049/197/2/36
  * Kormendy & Ho (2013) Kormendy, J., & Ho, L. C. 2013, ARA&A, 51, 511, doi: 10.1146/annurev-astro-082708-101811
  * Krizhevsky et al. (2012) Krizhevsky, A., Sutskever, I., & Hinton, G. 2012, NeurIPS, 25, doi: 10.1145/3065386
  * Lecun et al. (1998) Lecun, Y., Bottou, L., Bengio, Y., & Haffner, P. 1998, Proceedings of the IEEE, 86, 2278, doi: 10.1109/5.726791
  * Liu et al. (2019) Liu, H.-Y., Liu, W.-J., Dong, X.-B., et al. 2019, ApJS, 243, 21, doi: 10.3847/1538-4365/ab298b
  * Lotz et al. (2008) Lotz, J. M., Jonsson, P., Cox, T. J., & Primack, J. R. 2008, MNRAS, 391, 1137, doi: 10.1111/j.1365-2966.2008.14004.x
  * Madau & Dickinson (2014) Madau, P., & Dickinson, M. 2014, Annual Review of Astronomy and Astrophysics, 52, 415, doi: 10.1146/annurev-astro-081811-125615
  * Madau et al. (1998) Madau, P., Pozzetti, L., & Dickinson, M. 1998, ApJ, 498, 106, doi: 10.1086/305523
  * Marian et al. (2019) Marian, V., Jahnke, K., Mechtley, M., et al. 2019, ApJ, 882, 141, doi: 10.3847/1538-4357/ab385b
  * Massey (1951) Massey, F. J. 1951, Journal of the American Statistical Association, 46, 68.  http://www.jstor.org/stable/2280095
  * McKinney (2010) McKinney, W. 2010, in Proceedings of the 9th Python in Science Conference, 56–61, doi: 10.25080/Majora-92bf1922-00a
  * Nishizawa et al. (2020) Nishizawa, A. J., Hsieh, B.-C., Tanaka, M., & Takata, T. 2020, arXiv e-prints, arXiv:2003.01511.  https://arxiv.org/abs/2003.01511
  * Peng et al. (2002) Peng, C. Y., Ho, L. C., Impey, C. D., & Rix, H.-W. 2002, AJ, 124, 266, doi: 10.1086/340952
  * Powell et al. (2017) Powell, M. C., Urry, C. M., Cardamone, C. N., et al. 2017, ApJ, 835, 22, doi: 10.3847/1538-4357/835/1/22
  * Reed et al. (2016) Reed, S., Akata, Z., Yan, X., et al. 2016, arXiv e-prints, arXiv:1605.05396.  https://arxiv.org/abs/1605.05396
  * Ricci et al. (2017) Ricci, C., Bauer, F. E., Treister, E., et al. 2017, MNRAS, 468, 1273, doi: 10.1093/mnras/stx173
  * Rowe et al. (2015) Rowe, B. T. P., Jarvis, M., Mandelbaum, R., et al. 2015, Astronomy and Computing, 10, 121, doi: 10.1016/j.ascom.2015.02.002
  * Sanders et al. (1988) Sanders, D. B., Soifer, B. T., Elias, J. H., et al. 1988, ApJ, 325, 74, doi: 10.1086/165983
  * Schawinski et al. (2012) Schawinski, K., Simmons, B. D., Urry, C. M., Treister, E., & Glikman, E. 2012, MNRAS, 425, L61, doi: 10.1111/j.1745-3933.2012.01302.x
  * Schawinski et al. (2011) Schawinski, K., Treister, E., Urry, C. M., et al. 2011, ApJ, 727, L31, doi: 10.1088/2041-8205/727/2/L31
  * Schawinski et al. (2014) Schawinski, K., Urry, C. M., Simmons, B. D., et al. 2014, MNRAS, 440, 889, doi: 10.1093/mnras/stu327
  * Shankar et al. (2009) Shankar, F., Weinberg, D. H., & Miralda-Escudé, J. 2009, ApJ, 690, 20, doi: 10.1088/0004-637X/690/1/20
  * Simard (1998) Simard, L. 1998, in Astronomical Society of the Pacific Conference Series, Vol. 145, Astronomical Data Analysis Software and Systems VII, ed. R. Albrecht, R. N. Hook, & H. A. Bushouse, 108
  * Simard et al. (2011) Simard, L., Mendel, J. T., Patton, D. R., Ellison, S. L., & McConnachie, A. W. 2011, ApJS, 196, 11, doi: 10.1088/0067-0049/196/1/11
  * Simmons & Urry (2008) Simmons, B. D., & Urry, C. M. 2008, ApJ, 683, 644, doi: 10.1086/589827
  * Stark et al. (2018) Stark, D., Launet, B., Schawinski, K., et al. 2018, MNRAS, 477, 2513, doi: 10.1093/mnras/sty764
  * Stemo et al. (2020) Stemo, A., Comerford, J. M., Barrows, R. S., et al. 2020, ApJ, 888, 78, doi: 10.3847/1538-4357/ab5f66
  * Stewart et al. (2008) Stewart, K. R., Bullock, J. S., Wechsler, R. H., Maller, A. H., & Zentner, A. R. 2008, ApJ, 683, 597, doi: 10.1086/588579
  * Taylor (2005) Taylor, M. B. 2005, in Astronomical Society of the Pacific Conference Series, Vol. 347, Astronomical Data Analysis Software and Systems XIV, ed. P. Shopbell, M. Britton, & R. Ebert, 29
  * Treister et al. (2012) Treister, E., Schawinski, K., Urry, C. M., & Simmons, B. D. 2012, ApJ, 758, L39, doi: 10.1088/2041-8205/758/2/L39
  * Tuccillo et al. (2018) Tuccillo, D., Huertas-Company, M., Decencière, E., et al. 2018, MNRAS, 475, 894, doi: 10.1093/mnras/stx3186
  * Ueda et al. (2014) Ueda, Y., Akiyama, M., Hasinger, G., Miyaji, T., & Watson, M. G. 2014, ApJ, 786, 104, doi: 10.1088/0004-637X/786/2/104
  * Urrutia et al. (2008) Urrutia, T., Lacy, M., & Becker, R. H. 2008, ApJ, 674, 80, doi: 10.1086/523959
  * Variawa et al. (2022) Variawa, M. Z., Van Zyl, T. L., & Woolway, M. 2022, IEEE Access, 10, 19539, doi: 10.1109/ACCESS.2022.3150881
  * Vega-Ferrero et al. (2021) Vega-Ferrero, J., Domínguez Sánchez, H., Bernardi, M., et al. 2021, MNRAS, 506, 1927, doi: 10.1093/mnras/stab594
  * Villforth et al. (2014) Villforth, C., Hamann, F., Rosario, D. J., et al. 2014, MNRAS, 439, 3342, doi: 10.1093/mnras/stu173
  * Virtanen et al. (2020) Virtanen, P., Gommers, R., Oliphant, T. E., et al. 2020, Nature Methods, 17, 261, doi: 10.1038/s41592-019-0686-2
  * Volonteri et al. (2003) Volonteri, M., Haardt, F., & Madau, P. 2003, ApJ, 582, 559, doi: 10.1086/344675
  * Walmsley et al. (2020) Walmsley, M., Smith, L., Lintott, C., et al. 2020, MNRAS, 491, 1554, doi: 10.1093/mnras/stz2816
  * Wilman et al. (2013) Wilman, D. J., Fontanot, F., De Lucia, G., Erwin, P., & Monaco, P. 2013, MNRAS, 433, 2986, doi: 10.1093/mnras/stt941
  * York et al. (2000) York, D. G., Adelman, J., Anderson, John E., J., et al. 2000, AJ, 120, 1579, doi: 10.1086/301513