# Dust and power: Unravelling the merger-active galactic nucleus connection in the second half of cosmic history

A. La Marca, B. Margalef-Bentabol, L. Wang, F. Gao, A. D. Goulding, G.

Martin, V. Rodriguez-Gomez, S. C. Trager, G. Yang, R. Davé, et al.

► To cite this version:

A. La Marca, B. Margalef-Bentabol, L. Wang, F. Gao, A. D. Goulding, et al. Dust and power: Unravelling the merger-active galactic nucleus connection in the second half of cosmic history. Astronomy & Astrophysics - A&A, 2024, 690, 10.1051/0004-6361/202348188. insu-04851515

HAL Id: insu-04851515

https://insu.hal.science/insu-04851515v1

Submitted on 21 Dec 2024

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
# Dust and power: Unravelling the merger-active galactic nucleus connection in the second half of cosmic history

A. La Marca<sup>1,2,*</sup> ◦, B. Margalef-Bentabol<sup>1</sup> ◦, L. Wang<sup>1,2</sup> ◦, F. Gao<sup>2,3,4</sup> ◦, A. D. Goulding<sup>5</sup>, G. Martin<sup>6,7,8</sup>, V. Rodriguez-Gomez<sup>9</sup>, S. C. Trager<sup>2</sup> ◦, G. Yang<sup>1,2</sup>, R. Davé<sup>10,11</sup> ◦, and Y. Dubois<sup>12</sup> ◦

Received 6 October 2023 / Accepted 14 August 2024

## ABSTRACT

**Aims.** Galaxy mergers represent a fundamental physical process under hierarchical structure formation, but their role in triggering active galactic nuclei (AGNs) is still unclear. We aim to investigate the merger-AGN connection using state-of-the-art observations and novel methods for detecting mergers and AGNs.

**Methods.** We selected stellar mass-limited samples at redshift $z < 1$ from the Kilo-Degree Survey (KiDS), focussing on the KiDS-N-W2 field with a wide range of multi-wavelength data. We analysed three AGN types, selected in the mid-infrared (MIR), X-ray, and via spectral energy distribution (SED) modelling. To identify mergers, we used convolutional neural networks (CNNs) trained on two cosmological simulations. We created mass- and redshift-matched control samples of non-mergers and non-AGNs.

**Results.** We first investigated the merger-AGN connection using a binary AGN/non-AGN classification. We observed a clear AGN excess (of a factor of 2–3) in mergers with respect to non-mergers for the MIR AGNs, along with a mild excess for the X-ray and SED AGNs. This result indicates that mergers could trigger all three types, but are more connected to the MIR AGNs. About half of the MIR AGNs are in mergers but it is unclear whether mergers are the main trigger. For the X-ray and SED AGNs, mergers are unlikely to be the dominant triggering mechanism. We also explored the connection using the continuous AGN fraction $f_{AGN}$ parameter. Mergers exhibit a clear excess of high $f_{AGN}$ values relative to non-mergers, for all AGN types. We unveil the first merger fraction $f_{merger} - f_{AGN}$ relation with two distinct regimes. When the AGN is not very dominant, the relation is only mildly increasing or even flat, with the MIR AGNs showing the highest $f_{merger}$. In the regime of very dominant AGNs ($f_{AGN} \ge 0.8$), $f_{merger}$ shows the same steeply rising trend with increasing $f_{AGN}$ for all AGN types. These trends are also seen when plotted against AGN bolometric luminosity. We conclude that mergers are most closely connected to dust-obscured AGNs, generally linked to a fast-growing phase of the supermassive black hole. Such mergers therefore stand as the main (or even the sole) fuelling mechanism of the most powerful AGNs.

**Key words.** techniques: image processing – galaxies: evolution – galaxies: interactions

## 1. Introduction

In the context of the widely accepted Λ-cold dark matter (ΛCDM) cosmology, structure formation proceeds in a hierarchical fashion, involving frequent mergers of smaller structures. During these merger events, the baryonic components of lower-mass dark matter halos collide and coalesce, eventually forming a single more massive galaxy (Conselice 2014; Somerville & Davé 2015). This process is driven by gravitational forces, which pull and distort the galaxies, rearranging their stars and gas and sometimes leading to dispersion-dominated systems (Toomre & Toomre 1972; Somerville & Davé 2015, and references therein). In addition

to mass assembly and morphological transformation, mergers are also expected to impact a wide range of galactic properties. For example, mergers have been shown to cause an increase in the star formation rate (SFR) in some cases (e.g. Ellison et al. 2013; Knapen et al. 2015; Martin et al. 2017, 2021; Pearson et al. 2019; Cibinel et al. 2019).

Mergers may also lead to the inflow of gas onto the central supermassive black holes (SMBHs, Barnes & Hernquist 1991; Hopkins et al. 2006; Blumenthal & Barnes 2018). Various simulations predict that mergers can fuel SMBH accretion, initiating the active galactic nuclei (AGN) phase (e.g. Di Matteo et al. 2005; Hopkins et al. 2008; Blecha et al. 2018). However, some simulations also suggest that mergers may be responsible for only a minority of the AGN population (Di Matteo et al. 2003; Alexander & Hickox 2012;

<footnote n="1">¹ SRON Netherlands Institute for Space Research, Landleven 12, 9747 AD Groningen, The Netherlands</footnote>

<footnote n="2">² Kapteyn Astronomical Institute, University of Groningen, Postbus 800, 9700 AV Groningen, The Netherlands</footnote>

<footnote n="3">³ Department of Astronomy, Nanjing University, Nanjing 210093, China</footnote>

<footnote n="4">⁴ Key Laboratory of Modern Astronomy and Astrophysics (Nanjing University), Ministry of Education, Nanjing 210093, China</footnote>

<footnote n="5">⁵ Department of Astrophysical Sciences, Princeton University, 4 Ivy Lane, Princeton, NJ 08544, USA</footnote>

<footnote n="6">⁶ Korea Astronomy and Space Science Institute, 776 Daedeok-daero, Yuseong-gu, Daejeon 34055, Korea</footnote>

<footnote n="7">⁷ Steward Observatory, University of Arizona, 933 N. Cherry Ave, Tucson, AZ 85719, USA</footnote>

<footnote n="8">⁸ School of Physics and Astronomy, University of Nottingham, University Park, Nottingham NG7 2RD, UK</footnote>

<footnote n="9">⁹ Instituto de Radioastronomía y Astrofísica, Universidad Nacional Autónoma de México, A.P. 72-3, 58089 Morelia, Mexico</footnote>

<footnote n="10">¹⁰ School of Physics and Astronomy, University of Edinburgh, Edinburgh EH9 3HJ, UK</footnote>

<footnote n="11">¹¹ Department of Physics and Astronomy, University of the Western Cape, Bellville 7535, South Africa</footnote>

<footnote n="12">¹² Institut d'Astrophysique de Paris, Sorbonne Université, CNRS, UMR 7095, 98 bis bd Arago, 75014 Paris, France</footnote>

<footnote>* Corresponding author; a.la.marca@sron.nl</footnote>
Martin et al. 2018; Bhowmick et al. 2020; Byrne-Mamahit et al. 2022; Smethurst et al. 2023). Observationally, the merger-AGN connection remains a topic of intense debate (Heckman & Best 2014), with many studies either supporting (Koss et al. 2010; Ellison et al. 2011, 2019; Hwang et al. 2012; Satyapal et al. 2014; Kocevski et al. 2015; Bickley et al. 2023; Tanaka et al. 2023) or refuting (Grogin et al. 2005; Reichard et al. 2009; Cisternas et al. 2011; Kocevski et al. 2012; Sabater et al. 2015; Mechtley et al. 2016; Smethurst et al. 2019) this link. In addition, there may be a dependence on AGN luminosity, with mergers playing a more important role in triggering more luminous AGNs (Urrutia et al. 2008; Treister et al. 2012; Glikman et al. 2015; Weigel et al. 2018; Ellison et al. 2019; Pierce et al. 2022; Bickley et al. 2023), although some counterclaims also exist (Villforth et al. 2017; Hewlett et al. 2017).

There are many potential factors for the mixed observational results. One major issue is that AGNs are a complex and multi-faceted phenomenon, which releases a large amount of radiation from radio to X-rays (see Alexander & Hickox 2012, for a review). However, not all AGNs emit simultaneously across the entire spectrum. Thus, selecting AGNs within different frequency windows may result in AGNs (and host galaxies) with distinct properties (Yang et al. 2023). To study the merger-AGN connection, various methods have been employed to identify AGNs, such as mid-infrared (MIR) colour selection (e.g. Satyapal et al. 2014; Goulding et al. 2018; Ellison et al. 2019, X-ray selection (e.g. Koss et al. 2010; Kocevski et al. 2015; Hewlett et al. 2017), optical emission line ratios and radio selection based on flux, and/or morphology (e.g. Ellison et al. 2015; Gordon et al. 2019; Gao et al. 2020; Bickley et al. 2023).

A second problem concerns the way mergers are selected, via visual classification (Darg et al. 2010; Tanaka et al. 2023), the close-pair method (Knapen et al. 2015; Davies et al. 2015), non-parametric morphological statistics (Lotz et al. 2004; Pawlik et al. 2016), or machine learning (ML) and deep learning (DL) techniques (Goulding et al. 2018; Bottrell et al. 2019; Pearson et al. 2019; Nevin et al. 2019; Bickley et al. 2021). Visual classification is hard to reproduce, time-consuming, and suffers from low accuracy and incompleteness (Huertas-Company et al. 2015). The close-pair method typically requires highly complete spectroscopic data and so is observationally expensive. Moreover, this method cannot identify post-mergers. Morphological statistics are reproducible and relatively quick to compute but rely on high-quality imaging data. Consequently, misclassifications can rise significantly at higher redshifts (Huertas-Company et al. 2015). Supervised ML and DL techniques are both efficient and reproducible. In recent years, various studies have applied convolutional neural networks (CNNs) with varying degrees of success (e.g. Ackermann et al. 2018; Pearson et al. 2019; Wang et al. 2020; Ferreira et al. 2020; Bickley et al. 2021, 2023; Ciprijanović et al. 2020, 2021). The performance of these methods is fundamentally limited by the quality of classification labels in the training data. For instance, visual labels are biased towards the most conspicuous mergers.

Lastly, merger and AGN timescales are very different, which could further complicate studies aiming to elucidate the merger-AGN connection. An AGN duty cycle usually lasts ~10–100 Myr (Marconi et al. 2004), while galaxy interaction features can survive up to a few giga-years (Moreno et al. 2019). Additionally, the inflowing gas needs time to fall onto the SMBH and turn on the AGN phase. Therefore, some AGNs may be in their 'off' state when their host galaxies appear to be merging, biasing towards fewer AGNs detected in mergers (Villforth et al. 2014; Shabala et al. 2017). Some models predict that most of

the SMBH and galaxy growth occur in an early obscured phase (e.g. Blecha et al. 2018), followed by a 'blowout' phase in which AGN feedback limits SMBH growth and ejects gas from the galaxy (e.g. Ishibashi & Fabian 2016).

In this study, we re-visit the relationship between mergers and the triggering of AGN, using large stellar mass limited galaxy samples at redshifts $z < 1$ selected from the Kilo-Degree Survey (KiDS; de Jong et al. 2013, with rich ancillary data from the X-ray to the sub-millimetre (sub-mm). Specifically, we address two aspects of the merger-AGN connection, namely, (1) we consider whether mergers trigger AGNs and, if so, whether this is an important triggering mechanism for different types of AGNs; (2) how the role of mergers changes with increasing AGN fraction. In other words, we explore whether galaxies hosting more dominant AGNs are more likely to be mergers. To shed new light on these questions, we adopted innovative approaches for identifying AGNs and mergers. For detecting AGNs, in addition to standard binary methods (such as the MIR colour selection technique), we also employed spectral energy distribution (SED) modelling. Thanks to the availability of high-quality multi-wavelength data, we are able to characterise AGN contribution relative to the host galaxy. To identify mergers, we trained CNNs and applied the trained model to the Hyper-Suprime-Cam Subaru Strategic Program (HSC-SSP; Aihara et al. 2018a) survey images of the KiDS galaxies. To mitigate issues with visual classification, we trained CNNs on mock observations generated from cosmological hydrodynamical simulations, where galaxy merger histories are available.

This paper is organised as follows. In Sect. 2, we first present a summary of the multi-wavelength observations used in this work. Then, we introduce the two simulations, Illustris TNG (Pillepich et al. 2018) and Horizon-AGN (Dubois et al. 2014), used to train CNNs to detect mergers. In Sect. 3, we describe the SED fitting process to detect AGNs and the CNN-based merger classifier. In Sect. 4, we present our results on how mergers are related to the binary AGN and non-AGN classification, as well as to the continuous AGN fraction parameter. We also present a set of detailed comparisons among our findings and previous works. Finally, we summarise our main conclusions and future outlook in Sect. 5. Throughout the paper, we assume a flat $\Lambda$CDM universe with $\Omega_M = 0.2865$, $\Omega_\Lambda = 0.7135$, and $H_0 = 69.32 \text{ km s}^{-1} \text{ Mpc}^{-1}$ (Hinshaw et al. 2013). Unless otherwise stated, all magnitudes are in the AB system.

## 2. Data

In this section, we first introduce the various datasets from the multi-wavelength galaxy surveys used to construct our sample. Then we briefly describe the cosmological hydrodynamic simulations used to train our CNN-based merger classifier.

### 2.1. Observations

We focussed our study on one of the KiDS equatorial fields, the KiDS-N-W2 field, which spans $128.5^\circ \le RA \le 141.5^\circ$ and $-2^\circ \le Dec \le 3^\circ$ (Kuijken et al. 2019). KiDS-N-W2 benefits from extensive multi-wavelength coverage. Moreover, this field contains one of the Galaxy and Mass Assembly survey (GAMA; Driver et al. 2011) equatorial fields, the GAMA-09 field. GAMA is a spectroscopic survey of $r < 19.8$ mag galaxies selected from the Sloan Digital Sky Survey (SDSS; York et al. 2000), which facilitates calibration of photometric redshifts. Thanks to its large area ($65 \text{ deg}^2$) and panchromatic coverage, KiDS-N-W2 is an ideal field for this study. Figure 1 shows the footprints and
<figure><img src="image_2.png" /></figure>

**Fig. 1.** Multi-wavelength data used in this study. Top: Footprints of the surveys. The eFEDS coverage is not corrected for vignetting. We do not show the WISE survey area as it covers the entire sky. Bottom: Transmission curves of the filters, from the optical to the sub-mm. For clarity, we do not show the eROSITA soft X-ray band. Similarly, we only display the KiDS u-band as the other KiDS bands overlap with the HSC filters.

filters of the various surveys. Below we describe the individual
surveys.

2.1.1. X-ray data

The extended ROentgen Survey with an Imaging Tele-
scope Array (eROSITA; Predehl et al. 2021) X-ray instrument
observed ~140 deg<fnref n="2" /> in this area, as part of the eROSITA
Final Equatorial Depth Survey (eFEDS; Brunner et al. 2022).
Brunner et al. (2022) performed source detection in the 0.2-
2.3 keV range to create the eFEDS source catalogue, referred
to as the main sample. Salvato et al. (2022) identified the multi-
wavelength counterparts of these sources to derive crucial infor-
mation such as photometric redshifts photo-z or z<sub>phot</sub><sup>1</sup>. Point
sources are separated into Galactic and extragalactic samples.
We selected extragalactic point sources (CTP_CLASS ‘likely’ or
‘secure’) with a reliable counterpart (CTP质量≥ 2) from
the eFEDS main sample in the KiDS-N-W2 field.

2.1.2. Optical and Near-IR (NIR) data

We selected optical and NIR data from the combined VISTA Kilo-degree INfrared Galaxy survey (KiDS-VIKING Kuijken et al. 2019; Edge et al. 2013) and the HSC-SSP survey. KiDS imaged a large part of the sky in *ugri* (de Jong et al. 2013). The limiting magnitudes for the fourth data release (DR4) are *r* ~ 25 and *i* ~ 23.6 mag at 5σ (de Jong et al. 2017). The mean seeing is 0.70” in the *r* band and 0.80” in *i*. The VIKING survey observed the same region in *ZYJHKS*, reaching

$K_S \sim 21$ mag at $5\sigma$ (de Jong et al. 2017). A detection catalogue was used for list-driven photometry on the KiDS and VIKING images (Kuijken et al. 2019). A final nine-band KiDS-VIKING (hereafter KV) catalogue was produced$^2$, containing PSF- and aperture-matched photometry using the GAAP technique (Gaussian Aperture and PSF photometry, Kuijken et al. 2015). Photometric Redshift code (BPZ; Benítez 2000). The normalised median absolute deviation $\sigma_m$ of ($z_{\text{phot}} - z_{\text{spec}}$)/(1 + $z_{\text{spec}}$) is 0.061. At $z_{\text{phot}} < 0.9$, 11.8% of the sources have $|\Delta z|/(1 + z_{\text{spec}})| > 3\sigma_m$ (Wright et al. 2019). We selected sources in KiDS-N-W2 and adopted the GAAP photometry. However, these aperture fluxes are not optimised for total fluxes (Kuijken et al. 2015). Following Wright et al. (2019), we applied a scale factor, $F$, which is the ratio of the *r*-band AUTO flux to the GAAP *r*-band flux

$$F = f_{\text{AUTO}}/f_{	ext{GAAP}}.$$

We used the HSC-SSP images to detect mergers, as they are
deeper and sharper than KiDS. The HSC-SSP is a ground-based
imaging survey that, to date, has covered ~1200 deg<fnref n="2" /> in *grizy*,
with a pixel resolution of 0.168"/pixel (Aihara et al. 2018a).
The KiDS-N-W2 field was observed as part of its ‘Wide’ survey,
down to *i* ~ 26 mag at 5σ for point sources, with an average
seeing of 0.61" in *i* (Aihara et al. 2022)<fnref n="3" />. We made use of the
DR2 forced photometry catalogue (Aihara et al. 2019), which
includes spectroscopic *z* (spec-*z*) when available from other
surveys. The HSC pipeline provided model-fitted photometry
obtained with the CMODEL algorithm (Huang et al. 2018). As
we used the KV photo-*z*, we limited the HSC-SSP catalogue
to *i* < 24 mag, as this is roughly the KiDS depth. The HSC-
SSP DR2 has significant background subtraction issues that

<footnote n="1">¹ The eROSITA/eFEDS main point source counterparts catalogue is available at the CDS via anonymous ftp to cdsarc.u-strasbg.fr (130.79.128.5) or via http://cdsarc.u-strasbg.fr/viz-bin/cat/J/A+A/661/A3</footnote>

<footnote n="2">² The KV catalogue is available at http://archive.eso.org/</footnote>

<footnote n="3">³ All HSC-SSP data products are accessible at https://hsc-release.mtk.nao.ac.jp/</footnote>
require an aggressive star mask to be used (Aihara et al. 2019). Therefore we rejected masked objects using the flags mask pdr2 bright objectcenter and pixelflags bright objectcenter. Moreover, we excluded sources with the following pixel flags, pixelflags edge, pixelflags interpolatedcenter, pixelflags saturatedcenter, pixelflags crcenter, pixelflags bad (Aihara et al. 2018b), and with failed CMODEL fits. We downloaded the i-band coadded images of each galaxy in our sample from the HSC-SSP DR3 (Aihara et al. 2022). Details on the cutouts are provided in Sect. 2.3.

### 2.1.3. Mid-IR and sub-mm data

The NASA Wide-field Infrared Survey Explorer (WISE; Wright et al. 2010) mapped the entire sky at 3.4, 4.6, 12, and 22 µm (i.e. bands W1, W2, W3, and W4). The latest Data Release, AllWISE (Cutri et al. 2013, 2014), combined data from the cryogenic and NEOWISE (Mainzer et al. 2011) post-cryogenic phases<fnref n="4" />, reaching a 5σ depth of 16.96, 15.95, 11.46, and 8.04 mag Vega (54, 71, 730, and 5000 µJy) in W1, W2, W3, and W4, respectively (Cutri et al. 2013). We selected objects with a signal-to-noise ratio (S/N) > 1 in W1 and W2, and S/N ≥ 3 in W1 or W2. Furthermore, we only included sources below the saturation limits, which are W1 > 8 mag and W2 > 7 mag (Vega). We converted the WISE magnitudes from Vega to AB using the conversions provided by the WISE team<fnref n="5" />.

The Herschel Astrophysical Terahertz Large Area Survey (H-ATLAS; Valiante et al. 2016) observed ~600 deg² at 100, 160, 250, 350, 500 µm. Applying the source detection software MADX (Maddox & Dunne 2020) on the 250 µm background-subtracted map resulted in a catalogue containing point source fluxes and aperture photometry for resolved sources. SDSS optical counterparts were identified using a likelihood ratio technique (Bourne et al. 2016). We selected sources with reliable optical counterparts (reliability $R \ge 0.80$; Bourne et al. 2016) from the DR1 catalogue<fnref n="6" />, which includes all sources $>2.5\sigma$ at 250 µm and $\ge 4\sigma$ at 250, 350, or 500 µm. Additionally, detections $\ge 3\sigma$ at 100 and 160 µm are included. The $1\sigma$ limits are 14.7, 16.3, 7.4, 9.4, and 10.2 mJy at 100, 160, 250, 350, and 500 µm, respectively (Valiante et al. 2016). Finally, we multiplied the 250, 350, and 500 µm fluxes by the $K_{\text{CO}}$ parameter given in Table 5.7 in the Spectral and Photometric Imaging Receiver (SPIRE) handbook (see also Valiante et al. 2016, Appendix A1).

### 2.1.4. Catalogue cross-matching and summary

First, we cross-matched the KV catalogue and the HSC-SSP DR2 catalogue, adopting a 1" search radius. Requiring sources to be detected in both surveys ensured that both HSC images and KV photo-z were available. For matching to other surveys, we used HSC coordinates, given its superior resolution. We matched the HSC-KV sample with AllWISE, using a 1.4" radius (Goulding et al. 2018). We retained the sources with no WISE counterparts but removed WISE detections with multiple optical counterparts (see also Toba et al. 2015; Jarrett et al. 2017), which account for ~0.4% of the HSC-KV sample. We compare

<figure><img src="image_3.png" /><figcaption>**Fig. 2.** Flux comparison. Top: KiDS $r_{\text{MAG AUTO}}$ vs HSC $r_{\text{cModel}}$. Bottom: WISE W1 vs VIKING $K_S$ magnitude. The red line indicates the one-to-one line. The white lines show the density contours.</figcaption></figure>

KiDS and HSC r-band magnitudes, and VIKING $K_S$ magnitudes with WISE W1 magnitudes in Fig. 2. Most of the KiDS-HSC matches lie close to the 1:1, with increased scatter at fainter magnitudes. Likewise, W1 magnitudes correlate with $m_{K_S}$, with a tail toward the fainter end. Finally, H-ATLAS and eFEDs measurements are included by cross-matching to their optical counterparts, using a search radius of 1.5". We prioritised spec-z when available, followed by photo-z from eFEDS, and then photo-z from the KV catalogue. The last one constituted the largest redshift source, ~98% of the total sample.

To perform the data cleaning, we first selected objects at $0.1 \le z \le 1.0$, as HSC imaging does not allow merger identification at higher z (Goulding et al. 2018). We then removed stars identified by the HSC pipeline by excluding detections with prob_star = 1 for sources without spec-z. Finally, we applied the recommended KV quality flags cuts, IMAFLAGS_ISO = 0 and SEXTRACTOR < 4, to exclude objects with bad photometry and bad detections (Kuijken et al. 2019). After data cleaning, our sample contained just over one million galaxies. Final galaxy counts and band coverage details are presented in Table 1.

### 2.2. The IllustrisTNG and Horizon-AGN simulations

The IllustrisTNG project is a cosmological hydro-dynamical simulation that consists of three volumes varying in size and resolution (Pillepich et al. 2018; Nelson et al. 2019). We used the TNG-100 and TNG-300 boxes. The latter was chosen because of its larger volume and larger number of more massive galaxies. On the other hand, TNG-100 has a factor of 8 better baryonic matter resolution ($1.4 \times 10^6 M_{\odot}$) and is used to extend

<footnote n="4">⁴ The AllWISE catalogue is available at https://irsa.ipac.caltech.edu/frontpage/</footnote>

<footnote n="5">⁵ https://wise2.ipac.caltech.edu/docs/release/allsky/expsup/sec4_4h.html</footnote>

<footnote n="6">⁶ All H-ATLAS data are available at http://www.h-atlas.org/</footnote>
<table><caption>**Table 1.** Number of galaxies in our sample.</caption><thead><tr><th>Survey</th><th>Nr. galaxies</th><th>Summary</th></tr></thead><tbody><tr><td>HSC-SSP & KV</td><td>1 075 815</td><td>HSC i ≤ 24 mag; matching radius 1"</td></tr><tr><td>WISE</td><td>72 875</td><td>W1 or W2 S/N ≥ 3; W1 and W2 S/N ≥ 1; matching radius 1.4"</td></tr><tr><td>H-ATLAS (250, 350 and 500 µm)</td><td>5492</td><td>Optical counterparts reliability R ≥ 0.80; matching radius 1.5"</td></tr><tr><td>H-ATLAS (100 and 160 µm)</td><td>4990</td><td>—</td></tr><tr><td>eFEDS soft band</td><td>3139</td><td>Only extragalactic point sources in the main sample; matching radius 1.5"</td></tr></tbody></table>

**Notes.** The columns correspond to the survey name, number of galaxies detected, matching radius used and other important selections applied to a specific survey. KV and HSC-SSP are listed together as we required galaxies to be detected by both surveys.

the sample to lower masses. We selected galaxies between $z = 0.1$ and $1$, corresponding to simulation snapshot numbers 50–91. The TNG-300 and TNG-100 samples were restricted to stellar mass $M_* > 5 \times 10^9 M_\odot$ and $>10^9 M_\odot$ respectively, to ensure that all galaxies have a reasonable number of particles. A complete merger history is available for each galaxy (Rodriguez-Gomez et al. 2015), identified using the SUBFIND algorithm (Springel et al. 2001). To construct the merger sample, we tracked the merger trees and selected galaxies that had a merger event in the last 300 Myr or will merge in the next 800 Myr. We only considered major mergers with stellar mass ratios up to 4. Galaxies within the defined temporal window, mass and $z$ ranges, were labelled as mergers. In total, we found 280 753 mergers. To create a balanced dataset of non-merging galaxies, we selected galaxies that did not meet those criteria. Since this population is much larger, we randomly chose an equal number of non-mergers.

The Horizon-AGN simulation is a cosmological hydrodynamical simulation of $(100 \text{ Mpc h}^{-1})^3$ comoving volume, with a stellar mass particle resolution of $2 \times 10^6 M_\odot$ (Dubois et al. 2014, 2016). Horizon-AGN includes various sub-grid models such as star formation and feedback from stars and AGNs. Galaxies are identified with a recent version of the ADAPTAHOP algorithm, updated for building merger trees (Tweed et al. 2009). We selected galaxies with $0.1 < z < 1$ and $M_* > 10^9 M_\odot$ and adopted the same merger definition to build a sample of mergers and non-mergers. Additionally, to increase sample size, we produced two images for each galaxy from two different projections and ended up with 232 296 mergers and 161 374 non-mergers. Finally, we divided both simulation samples into four redshift intervals, $z$-bin 1 = [0.1, 0.31), $z$-bin 2 = [0.31, 0.52), $z$-bin 3 = [0.52, 0.76), and $z$-bin 4 = [0.76, 1.00], with each bin containing a similar number of galaxies.

## 2.3. Mock images preparation

Observational effects, such as the presence of background galaxies and noise are crucial for improving the performance of CNN-based merger classifiers (Bottrell et al. 2019; Huertas-Company et al. 2019; Rodriguez-Gomez et al. 2019; Snyder et al. 2019). To emulate HSC observations, first, we generated synthetic $i$-band images from the simulations, with a physical size of $160 \times 160 \text{ kpc}$ and the same pixel resolution as the HSC images. This size choice is motivated by the expected maximum radial separation between merging galaxies in the chosen time window (Moreno et al. 2019). Then, the synthetic images were convolved with the real $i$-band PSF, retrieved from the HSC-SSP database. Lastly, we added Poisson noise and injected each image into cutouts of real HSC observations, which are described below.

To make cutouts of HSC observations without bright sources and/or artefacts, first, we generated a catalogue of low-$z$ and relatively bright sources that we want to avoid. We selected these objects from the HSC-SSP source catalogue using the following criteria, $129^\circ \le RA \le 180^\circ$ and $-2^\circ \le Dec \le 2^\circ$, photo-$z \le 1$ (with reduced $\chi^2 \le 3$), $g_{cModel} \le 26.0$ mag, $r_{cModel} \le 25.6$ mag, $i_{cModel} \le 25.4$ mag, $z_{cModel} \le 24.2$ mag, and $y_{cModel} \le 23.4$ mag. We still allowed our sky cutouts to contain possible faint sources and higher-$z$ background galaxies, as would happen in real observations. Then, we generated random sky coordinates while ensuring that there is no catalogued bright or low-$z$ source within $21''$ (based on the density of the sources to be avoided). These coordinates were used as the centres of our sky cutouts. After that, we examined each cutout to remove possible pixel defects. In particular, we removed post-stamps with bad pixels, saturated pixels, unmasked NaN, and possible missed bright objects. A complete list of mask flags is given by Bosch et al. (2018).

Our network architecture requires images of a single size. Thus we resized all images to a common size for each $z$-bin. At the midpoint of each redshift bin, a physical size of 160 kpc would correspond to 320, 192, 160, and 128 pixels, respectively. While resizing the images, we kept a constant physical size of 160 kpc. After that, we cropped the central part of the images using a different size according to the $z$-bin. We selected the central $120 \times 120, 96 \times 96, 80 \times 80$, and $64 \times 64$ pixels for the galaxies in $z$-bins 1, 2, 3, and 4, respectively. Normalisation was applied following Bottrell et al. (2019), so that all images were in hyperbolic arcsin-scale in the range $0-1$ and were scaled to maximise the contrast for the central target. Below, we summarise the normalisation steps:

(i) We took the hyperbolic arcsin of the sky-subtracted images. Values $< -7$ were converted to NaNs.

(ii) We computed the median of each image, $a_{min}$, and the 99th percentile, $a_{max}$, for central boxes of side 40, 32, 26, and 22 pixels, in $z$-bins 1, 2, 3, and 4, respectively.

(iii) Values $<a_{min}$ were set to $a_{min}$, including the NaNs. Values $>a_{max}$ were set to $a_{max}$. The resulting clipped images were normalised by subtracting $a_{min}$ and dividing by $a_{max} - a_{min}$.

# 3. Methods

## 3.1. CIGALE SED fitting

We used the SED fitting and modelling tool Code Investigating GALaxy Emission (CIGALE; Burgarella et al. 2005; Noll et al. 2009; Boquien et al. 2019) to derive properties such as stellar mass. The latest version includes AGN models and can fit data from the X-ray to the radio (version 2022.1$^7$; Yang et al. 2020, 2022). CIGALE assumes energy balance so that the energy

<footnote>$^7$ Every CIGALE version is accessible at https://cigale.lam.fr/</footnote>
<table><caption>**Table 2.** Fitting parameters in the CIGALE runs.</caption><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td colspan="3">Star-Formation History</td></tr><tr><td rowspan="5">Delayed τ+starburst</td><td>e-folding time of the main population</td><td>1000, 3000, 5000, 8000 Myrs</td></tr><tr><td>Age the main population</td><td>4000–13 000 (step 1000) Myrs</td></tr><tr><td>e-folding time of the late starburst population</td><td>9000, 13 000 Myrs</td></tr><tr><td>Age of the late starburst population</td><td>1, 50, 150 Myrs</td></tr><tr><td>Mass fraction of the late starburst population</td><td>0.01, 0.1, 0.25</td></tr><tr><td colspan="3">Single Stellar Population</td></tr><tr><td rowspan="2">Bruzual & Charlot (2003)</td><td>IMF</td><td>Chabrier (1)</td></tr><tr><td>Metallicity</td><td>Solar (0.02)</td></tr><tr><td colspan="3">Dust attenuation</td></tr><tr><td rowspan="4">Modified starburst</td><td>Colour excess</td><td>0.0, 0.1, 0.25, 0.4, 0.55, 0.7, 0.85, 1.0</td></tr><tr><td>Reduction factor</td><td>0.25, 0.5, 0.75</td></tr><tr><td>Slope delta of the power law modifying the attenuation curve</td><td>-0.45, -0.3, -0.2, -0.1, 0</td></tr><tr><td>Extinction law</td><td>Milky Way (1)</td></tr><tr><td colspan="3">Dust emission</td></tr><tr><td rowspan="4">Draine et al. (2014)</td><td>Mass fraction of PAH</td><td>2.5</td></tr><tr><td>Minimum radiation field</td><td>5, 15, 25</td></tr><tr><td>Power-law slope α in dM/dU ∝ U<sup>α</sup></td><td>2</td></tr><tr><td>Fraction illuminated from minimum to maximum radiation field</td><td>0.02</td></tr><tr><td colspan="3">X-ray</td></tr><tr><td rowspan="4">X-CIGALE X-ray<br>(Yang et al. 2020, 2022)</td><td>AGN photon index Γ</td><td>1.8</td></tr><tr><td>Power slope α<sub>OX</sub></td><td>-2.0, -1.8, -1.6, -1.4, -1.2</td></tr><tr><td>Max deviation from the α<sub>OX</sub> - L<sub>v,2500 Å</sub> relation</td><td>0.4</td></tr><tr><td>AGN X-ray angle coefficients (a<sub>1</sub>, a<sub>2</sub>)</td><td>(0.5, 0)</td></tr><tr><td colspan="3">AGN template</td></tr><tr><td rowspan="12">SKIRTOR<br>(Stalevski et al. 2012)</td><td>Average edge-on optical depth at 9.7 µm</td><td>3, 7, 11</td></tr><tr><td>Torus density radial parameter p</td><td>1</td></tr><tr><td>Torus density angular parameter q</td><td>1</td></tr><tr><td>Angle between the equatorial plane and edge of the torus</td><td>40°</td></tr><tr><td>Viewing angle</td><td>10, 30, 50, 70°</td></tr><tr><td>AGN fraction, f<sub>AGN</sub></td><td>0, 0.1, 0.2, 0.3, 0.45, 0.6, 0.75, 0.9, 0.99</td></tr><tr><td>Restframe wavelength range where f<sub>AGN</sub> is computed</td><td>3–30 µm</td></tr><tr><td>Extinction law of polar dust</td><td>SMC (0)</td></tr><tr><td>E(B-V) of polar dust</td><td>0, 0.2, 0.4, 0.8</td></tr><tr><td>Temperature of polar dust</td><td>100</td></tr><tr><td>Emissivity of polar dust</td><td>1.6</td></tr></tbody></table>

absorbed by dust is re-emitted in the IR/sub-mm. We used a delayed–τ star-formation history (SFH), which is able to model both early- and late-type galaxies, using small and large τ respectively (Boquien et al. 2019). We also included an optional exponential burst component for possible recent star formation. We chose the Bruzual & Charlot (2003) single stellar population (SSP) model, Chabrier initial mass function (IMF), solar metallicity, Calzetti et al. (2000) dust attenuation law and Draine et al. (2014) dust emission models. We included the X-ray module for modelling X-ray emission from both AGNs and galaxies. CIGALE offers two AGN template libraries. The first is the Fritz et al. (2006) smooth AGN model that assumes a flared disk geometry for the dust distribution and includes a distribution function of graphite and silicate grains. The second is the SKIRTOR model (Stalevski et al. 2012), which also assumes a flared disk geometry but models the dusty torus as a two-phase medium consisting of high-density clumps and a low-density medium between the clumps. We used the SKIRTOR model as it is more physical (Yang et al. 2020). To accurately determine the AGN component, we only applied the described configuration to galaxies with at least one MIR or X-ray measurement. For the remaining galaxies, we only used CIGALE to estimate their stellar masses $M_*$ without including the X-ray and AGN modules, significantly reducing computing time. A summary of the fitted CIGALE parameters can be found in Table 2.

We selected a reliable sample by discarding SED fits with reduced $\chi^2 > 5$. We used the Bayesian results in the CIGALE output instead of the best-fit values. This approach includes the effect of intrinsic degeneracies between parameters, which allows us to obtain more reliable estimates and uncertainties (Boquien et al. 2019). In Fig. 3, we show the stellar mass distribution of the entire sample as a function of z. Hereafter, we focus on the first three redshift bins, given the difficulty in identifying mergers in the last z-bin (see Sect. 3.3.1). To construct a stellar mass limited sample within each z-bin, we used the mass limits estimated by Wright et al. (2019) for the KV survey in combination with the simulation limits. This is a reasonable choice, as we required all galaxies to be detected by the KV survey and our models were trained on simulated galaxies with $M_* \ge 10^9 M_\odot$ (see Sect. 3.3). We defined the limits as $M_* \ge 10^9 M_\odot$ in the first two redshift bins ($0.1 \le z < 0.52$), and $M_* \ge 2.5 \times 10^9 M_\odot$ in the z-bin 3 ($0.52 \le z < 0.76$). After applying the limits, we were left with a mass-complete sample of 69 140, 183 554 and 266 709 galaxies, in z-bins 1, 2, and 3, respectively. Of these,
<figure><img src="image_4.png" /><figcaption>Fig. 3. Stellar mass distribution as a function of redshift shown as a 2D histogram with logarithmic scaling as indicated by the colour bar. The red line is the mass limit of the KV survey. The vertical lines indicate the z-bins and the corresponding mass limits are shown in the legend.</figcaption></figure>

<figure><img src="image_5.png" /><figcaption>Fig. 4. MIR and X-ray AGNs. Mid: Rest-frame 6 µm luminosity $L_{6µm}$ vs z for the MIR AGNs. Bottom: Soft X-ray luminosity $L_{0.2-2.3\,keV}$ vs z for the X-ray AGNs. Top: Redshift distributions of the MIR and X-ray AGNs.</figcaption></figure>

9 159, 10 614, and 23 108 galaxies have a fitted AGN component. We show examples of best-fit SEDs in Appendix A.

## 3.2. AGN selection

To select MIR AGN, we used a single colour cut $W1 - W2 > 0.8$ mag Vega (Stern et al. 2012) for all galaxies with $W2 \le 15$ mag Vega, requiring $S/N \ge 5$ in both bands, which yielded 96, 118, and 145 AGNs in z-bins 1, 2, and 3, respectively. We used the rest-frame 6 µm luminosity to trace the AGN accretion

<figure><img src="image_6.png" /><figcaption>Fig. 5. Venn diagram for the three AGN types for the classified galaxies (Sect. 3.3). While different types of AGNs do have some overlap, each selection also identifies unique AGNs missed by other methods.</figcaption></figure>

power. The AGN dusty torus structure is believed to absorb the AGN bolometric luminosity produced in the X-ray/UV/optical and re-emit mainly at ~5–30 µm (Lutz et al. 2004; Mateos et al. 2015). The rest-frame 6 µm flux is derived by linearly interpolating the WISE W1, W2, and W3 band fluxes. The X-ray AGNs were selected from the eFEDS main catalogue (Salvato et al. 2022), resulting in 289, 699, and 830 AGNs in z-bins 1, 2, and 3, respectively. These X-ray AGNs are dominated by X-ray unobscured sources (Liu et al. 2022). We used the soft band luminosity, $L_{0.2-2.3\,keV}$, to trace the AGN emission power. In Fig. 4, we show the MIR and X-ray AGNs in the luminosity vs z space. The MIR AGNs lie in the range $L_{6\,µm} \approx 10^{43}-10^{46}$ erg/s, while the X-ray AGNs span over $L_{0.2-2.3\,keV} \approx 3 \times 10^{41}-10^{45}$ erg/s. The X-ray luminosity range we observe is in agreement with the AGN catalogue presented by Liu et al. (2022), which performed an X-ray spectral analysis. They found that about 80% of the eFEDS point sources are in the eFEDS AGN catalogue. It is common to require $L_{0.2-2.3\,keV} > 10^{42}$ erg/s to select X-ray AGNs (e.g. Riccio et al. 2023), even though some AGNs may be fainter (Aird et al. 2015; Liu et al. 2022). In our sample, only ≤4% of the X-ray AGNs show $L_{0.2-2.3\,keV} \le 10^{42}$ erg/s. We conducted our analysis including and excluding them and found no significant difference. Therefore, we opted to keep these sources.

In addition to the MIR and X-ray AGNs, we also selected SED AGNs if the SED fitting yielded $f_{AGN} \ge 5\%$, resulting in 2260, 3125, and 11 214 SED AGNs in z-bins 1, 2, and 3, respectively. Figure 5 provides the AGN counts for each AGN type for the classified galaxies (see Sect. 3.3). From the SED fits, we also computed the viewing angle-averaged intrinsic accretion-disk luminosity $L_{disc}$ (Yang et al. 2018) and AGN fraction ($f_{AGN}$). The $L_{disc}$ distributions for the three AGN types are displayed in Fig. 6. $L_{disc}$ is numerically equivalent to the angle averaged AGN bolometric luminosity due to energy conservation. The black hole accretion rate (BHAR) is related to the AGN bolometric luminosity as follows,

$$ \text{BHAR} = \frac{L_{\text{disc}}(1 - \epsilon)}{\epsilon c^2} = \frac{1.59 L_{\text{disc}}}{10^{46} \text{ erg s}^{-1}} M_{\odot}, \quad (1) $$

where c is the speed of light and $\epsilon$ is the radiative efficiency, for which we adopted a conventional value of $\epsilon = 0.1$ (e.g.
<figure><img src="image_7.png" /><figcaption>**Fig. 6.** AGN bolometric luminosity $L_{\text{disc}}$ vs redshift for MIR AGNs (triangles) and X-ray AGNs (circles). We also plot the 2D distribution of the SED AGNs (with colour-coding based on the number of sources).</figcaption></figure>

<figure><img src="image_8.png" /><figcaption>**Fig. 7.** AGN fraction distributions for the SED AGNs (orange bins), MIR AGNs (solid red line), and X-ray AGNs (dashed blue line). Horizontal bars indicate the median uncertainty in $f_{\text{AGN}}$ in each bin. The left panel displays the distributions over the entire redshift range and the three panels on the right in individual z-bins. The sample shown here contains only galaxies detected in the MIR and/or in the X-ray.</figcaption></figure>

Brandt & Alexander 2015). AGN fraction ($f_{\text{AGN}}$) is defined as the AGN strength relative to the host galaxy ($L_{\text{AGN}}/L_{\text{tot}}$). In this work, we calculated $f_{\text{AGN}}$ in the rest-frame 3–30 µm. In Fig. 7, we plot the $f_{\text{AGN}}$ distributions of the three AGN types, for the entire z range and individual z-bins. The SED AGNs are dominated by galaxies with low $f_{\text{AGN}}$ (mostly <0.3). The MIR AGNs have typically high $f_{\text{AGN}}$, with the X-ray AGNs in between the other two AGN types.

### 3.3. Merger identification with CNNs

To classify mergers and non-mergers, we used convolutional neural networks (CNN; Lecun et al. 1998), which have multiple layers to effectively extract features from the input images. The lower layers consist of convolutional layers which convolve the data from the previous layer with a pre-defined number of filters, composed of sets of neurons with trainable weights and biases. The output is a feature map, which is passed to the next layer. The higher layers are typically 1D fully-connected layers, where all the neurons are connected to all the neurons in the previous layer.

<table><caption>**Table 3.** CNN architectures.</caption><thead><tr><th>Layer type</th><th># Param.</th><th>Output shape</th><th>Properties</th></tr></thead><tbody><tr><td>Input</td><td>0</td><td>(1,N,N)</td><td></td></tr><tr><td>Convolutional<br>16 filters (11,11)</td><td>1952</td><td>(16,N/2,N/2)</td><td>2 pixels stride,<br>same padding,<br>Leaky ReLU act.</td></tr><tr><td>Batch Norm.</td><td>2N</td><td>(16,N/2,N/2)</td><td></td></tr><tr><td>Dropout</td><td>0</td><td>(16,N/2,N/2)</td><td>50%</td></tr><tr><td>Convolutional<br>32 filters (5,5)</td><td>12 832</td><td>(32,N/4,N/4)</td><td>2 pixels stride,<br>same padding,<br>Leaky ReLU act.</td></tr><tr><td>Batch Norm.</td><td>N</td><td>(32,N/4,N/4)</td><td></td></tr><tr><td>Dropout</td><td>0</td><td>(32,N/4,N/4)</td><td>50%</td></tr><tr><td>Convolutional<br>64 filters (3,3)</td><td>18 496</td><td>(64,N/8,N/8)</td><td>2 pixels stride,<br>same padding,<br>Leaky ReLU act.</td></tr><tr><td>Batch Norm.</td><td>N/2</td><td>(64,N/8,N/8)</td><td></td></tr><tr><td>Dropout</td><td>0</td><td>(64,N/8,N/8)</td><td>50%</td></tr><tr><td>Flatten</td><td>0</td><td>(N<sup>2</sup>)</td><td></td></tr><tr><td>Dense</td><td>(N<sup>2</sup>+1)·64</td><td>(64)</td><td>64 units,<br>ReLU act.</td></tr><tr><td>Dropout</td><td>0</td><td>(64)</td><td>30%</td></tr><tr><td>Dense</td><td>2080</td><td>(32)</td><td>32 units<br>ReLU act.</td></tr><tr><td>Dropout</td><td>0</td><td>(32)</td><td>30%</td></tr><tr><td>Dense</td><td>33</td><td>(1)</td><td>1 unit,<br>sigmoid act.</td></tr></tbody></table>

**Notes.** The columns are the name of the Keras layer (and the filters for the convolutional layers), the number of trainable parameters, output, and hyper-parameters for each layer. N represents the size of the input images which is 120, 96, 80, and 64 for z-bins 1, 2, 3, and 4, respectively.

The CNN gives a score for each input image as the final output, which is then used for classification. To train the CNN, a large number of labelled images are needed to adjust the weights to match the given classification. To develop, train, and test the CNNs we utilised the latest Keras framework for the TensorFlow platform (Chollet 2023; Abadi et al. 2016). For each redshift bin, we built a three-layer CNN with a common architecture to adapt it to input images with different sizes. Table 3 shows the adopted architectures and the associated number of parameters and properties. In each convolution layer, we used a stride of 2 and a Leaky Rectified Linear Unit (Leaky ReLU; Maas et al. 2013) as an activation function. Similarly, in the fully connected layer, we made use of a ReLu activation function (Nair & Hinton 2010). The last CNN unit was provided with a sigmoid activation function to predict a score between 0 and 1. To prevent any over-fitting we introduced a dropout after each processing layer. At each step during training, the dropout layer randomly sets input units to 0 with a rate specified by the user. To further prevent over-fitting, early stopping in the training phase was used as well. The hyper-parameters are reported in Table 3, including filter numbers and sizes, dropout rates, and strides chosen based on a grid search.

#### 3.3.1. CNN training and performance

For each z-bin, we constructed two CNNs with the above-described architecture, trained on mock images from IllustrisTNG and Horizon-AGN respectively. Both simulation samples were split into a 90% training set and a 10% test set. Galaxies from the
<table><caption>**Table 4.** Performance of the CNNs on the simulated test sets.</caption><thead><tr><th rowspan="2">Metric</th><th colspan="4">IllustrisTNG</th><th colspan="4">Horizon-AGN</th></tr><tr><th>z-bin 1<br>[0.1; 0.31]</th><th>z-bin 2<br>[0.31; 0.52]</th><th>z-bin 3<br>[0.52; 0.76]</th><th>z-bin 4<br>[0.76; 1.0]</th><th>z-bin 1<br>[0.1; 0.31]</th><th>z-bin 2<br>[0.31; 0.52]</th><th>z-bin 3<br>[0.52; 0.76]</th><th>z-bin 4<br>[0.76; 1.0]</th></tr></thead><tbody><tr><td>Precision</td><td>0.79</td><td>0.76</td><td>0.74</td><td>0.73</td><td>0.84</td><td>0.72</td><td>0.69</td><td>0.62</td></tr><tr><td>Recall</td><td>0.70</td><td>0.72</td><td>0.71</td><td>0.63</td><td>0.62</td><td>0.66</td><td>0.67</td><td>0.69</td></tr><tr><td>F1-score</td><td>0.74</td><td>0.74</td><td>0.72</td><td>0.68</td><td>0.71</td><td>0.69</td><td>0.68</td><td>0.65</td></tr><tr><td>Accuracy</td><td>0.76</td><td>0.75</td><td>0.73</td><td>0.70</td><td>0.75</td><td>0.70</td><td>0.68</td><td>0.64</td></tr></tbody></table>

**Notes.** Precision, recall and F1-score refer only to the merger class.

<figure><img src="image_9.png" /><figcaption>**Fig. 8.** Examples of visually classified mergers (Goulding et al. 2018) and non-mergers (this work) at different redshifts. The HSC-SSP DR3 i-band cutouts have an approximate physical size of 160 kpc and have been resized to 160 × 160 pixels. An arcsinh inverted grey scale is used.</figcaption></figure>

same merger tree were put in only one of the two sets, which prevented the networks from learning any of the galaxies in the test set. Henceforth, we define the CNN trained on the IllustrisTNG sample as the TNG-CNN and the CNN trained on the Horizon-AGN sample as the Horizon-CNN. We trained each network using the corresponding simulation and z-bin training sample until early stopping was reached. Each training sample was balanced to have an equal number of mergers and non-mergers. To evaluate the performance of the CNNs, we used precision, recall, and F1-score. Precision is the ratio of correctly identified mergers over the total number of classified mergers. Recall is the fraction of correctly identified mergers out of the total number of true mergers. F1-score is the harmonic mean of precision and recall. We also computed the overall accuracy, which is the ratio of correctly classified objects, of both classes. Below we detail the performance of the CNNs on the simulation test sets and a third test set based on visual inspection of real observations.

The IllustrisTNG test sets consisted of 13 382, 13 302, 14 082, and 15 400 images, balanced between mergers and non-mergers, in z-bins 1, 2, 3, and 4, respectively. The Horizon-AGN test sets contained 8764, 6984, 8196, and 8328 images in z-bins 1, 2, 3, and 4, respectively, equally split into mergers and non-mergers. We classified the IllustrisTNG and Horizon-AGN test set images using the CNNs trained on the respective training sets. Images with predicted scores ≤0.5 (>0.5) are classified as mergers (non-mergers). The results are presented in Table 4. Generally, both CNNs perform worse towards higher z. For example, the precision of the TNG-CNN (Horizon-CNN) decreases from 79% to 73% (from 84% to 62%). However, the recall is roughly constant at ~60–70% for both CNNs.

We also assessed the performance of the CNNs on real HSC images. For the mergers, we used galaxies visually classified

as clear mergers by Goulding et al. (2018), which include 545 galaxies with $0.1 \le \text{spec} - z \le 0.9$ and $M_* > 10^9 M_\odot$. For the non-mergers, we randomly selected 2000 galaxies from our sample with spec-z in the same redshift and mass ranges. We visually inspected them and found 1339 clear non-mergers. Examples of the visually classified galaxies are shown in Fig. 8. To create a balanced test set, we randomly picked 545 non-mergers and joined them with the mergers from Goulding et al. (2018). To reduce selection bias, we repeated this step five times and created five different test sets. We show the performance of the CNNs, averaged over the five test sets, in Table 5. Given the poor performance and the low number statistics in the last z-bin, we removed this bin from Table 5 and subsequent analyses. Rather than applying the same threshold as for the simulation test sets, we chose a threshold $p$ to obtain the highest F1-score. Consequently, we set $p = 0.5$ for both CNNs in z-bin 1, $p = 0.4$ (0.5) for the TNG-CNN (Horizon-CNN) in z-bin 2, and $p = 0.35$ (0.55) for the TNG-CNN (Horizon-CNN) in z-bin 3. In z-bin 1, the CNNs have comparable accuracy and F1-score. The TNG-CNN is more precise and the Horizon-CNN has better recall. In z-bin 2, the TNG-CNN is much worse in every metric than the Horizon-CNN. In z-bin 3, the TNG-CNN achieves better recall, but worse precision and accuracy. We also made activation maps to help interpret the CNN classifications. Examples of both classes, with their corresponding activation maps, are presented in Appendix B.

### 3.3.2. Combined CNN classifier

Studying the merger-AGN connection requires high-purity samples of mergers and non-mergers. To increase precision, we combined predictions from the two CNNs. In this combined
<figure><img src="image_10.png" /><figcaption>Fig. 9. Comparison of the predicted scores from the TNG-CNN and Horizon-CNN for the HSC test set in z-bin 1. Visual labels are given in the legend. NM denotes a non-merger (red dots) and M denotes a merger (blue triangles). The red and blue shaded areas represent the combined model’s non-merger and merger class definitions with two thresholds.</figcaption></figure>

model (Comb-CNN), galaxies for which both CNNs predicted a score <p were labelled as mergers and galaxies for which at least one CNN predicted a score >p were labelled as non-mergers. The Comb-CNN shows a higher precision compared to the best single model. However, the recall drops significantly, which is expected as some of the galaxies classified as mergers by one CNN are now non-mergers. To mitigate this, we then selected galaxies for which at least one CNN predicted a score > another threshold p' as non-mergers. This new threshold is set to p' = 0.7 for the TNG-CNN in all z-bin, p' = 0.65 for the Horizon-CNN in z-bin 1, and p' = 0.7 for z-bins 2 and 3. Galaxies outside the two defined regions are unclassified, as illustrated in Fig. 9 for z-bin 1. The performances of the Comb-CNN using one and two thresholds are summarised in Table 5 and the confusion matrices are compared with each other in Fig. 10. When using the Comb-CNN with two thresholds, we were able to improve both precision and recall as well as reduce contamination in the non-merger class.

We applied this combined model with two thresholds to our stellar mass-limited samples. We prepared the HSC images in the same way as the mock images. A galaxy is labelled as a merger if both CNNs predict a score <p, and as a non-merger if one of the two predictions is >p', according to the z-bin and the CNN. Unless otherwise stated, unclassified galaxies are excluded from our analysis. In z-bin 1, we classified 1272 mergers, 5808 non-mergers, and rejected 2079 galaxies. In z-bin 2, we classified 1073 mergers, 6514 non-mergers, and removed 3027 galaxies. In z-bin 3, there are 2060 mergers, 15 841 non-mergers, and 5207 galaxies removed. Examples of visually inspected galaxies and our classifications are shown in Appendix C.

## 4. Results

In this section, we first study the merger-AGN connection using a binary AGN and non-AGN classification for the three AGN types. Then, we analyse the merger-AGN relation using the continuous $f_{AGN}$ parameter and AGN bolometric luminosity.

### 4.1. Merger-AGN connection using a binary AGN classification

In the first half of the analysis, we performed two experiments: (1) a comparison of AGN frequency in merging and non-merging galaxies, where a higher AGN frequency in mergers would suggest that mergers can indeed trigger AGN activity; and (2) a comparison of merger fractions in AGN and non-AGN host galaxies. If the majority of AGN host galaxies show merging signs, it could indicate that mergers are dominant in activating AGNs. It is crucial to construct proper control samples as AGN occurrence can depend on properties such as stellar mass and redshift. Following Gao et al. (2020), for each merger in our sample, we identified a non-merger counterpart that met the following conditions:

$$|z_{\text{control}} - z_{\text{sample}}| \le 0.05 \qquad (2)$$

and

$$|\log M_{*,\text{control}} - \log M_{*,\text{sample}}| \le 0.1 \text{ dex.} \qquad (3)$$

We only included mergers that have ≥10 non-merger counterparts and randomly picked ten of them to add to the control sample. For each AGN, we looked for possible non-AGN galaxies (defined as galaxies not classified as X-ray or SED AGNs, and with $W1 - W2 < 0.5$) satisfying Eqs. (2) and (3). We only kept AGNs that have ≥10 non-AGN counterparts and randomly chose 10 of them to create the non-AGN control sample. Some sources in the control groups may appear more than once.

When calculating fractions of mergers, we considered only classified galaxies, namely $f_{merger} = N_{merger}/(N_{merger} + N_{non-merger})$. We refer to this as our main classification. In some cases, we also show the results for the worst-case scenario, in which all unclassified galaxies are considered as non-mergers.

#### 4.1.1. AGN frequency in mergers versus non-mergers

The top panel in Fig. 11 shows the frequencies of MIR, X-ray, and SED AGNs in mergers and non-merger controls, which are also reported in Table 6. The bottom panel of Fig. 11 displays the excess, which is the ratio of the AGN frequency in mergers relative to non-mergers. Typically ~3% of the mergers and ≤1% of the non-mergers contain MIR AGNs. This leads to a factor of 2–3 excess of MIR AGNs in mergers, which is the highest among the three AGN types. Around 5–10% of the mergers host X-ray AGNs and a similar frequency is found in the non-mergers, except in z-bin 3 where mergers show an excess of ~2. Much higher fractions of mergers and non-mergers contain SED AGNs, which is expected as they are weaker AGNs identified via SED fitting. However, we find a consistently low SED AGN excess at ~1.4 across the three z-bins.

Our findings are reasonably consistent with most previous studies. As shown in Fig. 11, Bickley et al. (2023) found a MIR AGN excess of 3–4 in post-mergers at $z < 0.3$. Gao et al. (2020) studied merging galaxies at $z < 0.1$ from SDSS and at $z < 0.6$ from GAMA. They determined a slightly lower MIR AGN excess at ~1.5–2. Goulding et al. (2018) found that mergers at $z < 0.9$ are a factor of ~2–7 more likely to contain MIR AGNs than non-interacting galaxies. Ellison et al. (2013) found a significantly higher MIR AGN excess (~13) in visually confirmed post-mergers at $z < 0.3$. This could be because their sample consisted of visually conspicuous, highly disturbed post-mergers, which may host more dust-obscured AGNs (Bickley et al. 2023).
<figure><img src="image_11.png" /><figcaption>**Fig. 10.** Confusion matrices for the combined model classification scheme using two thresholds, averaged over the five HSC test sets (left: z-bin 1; middle: z-bin 2; right: z-bin 3). The x axis corresponds to the predicted class and the y axis represents the visual label. In each cell, we also report the number of galaxies with a given visual label divided by the number of galaxies with a given predicted label. For the predicted non-mergers, we report between brackets the fractions obtained using only one threshold to show the improvement obtained by adding a second threshold.</figcaption></figure>

<table><caption>**Table 5.** Performance of the CNNs averaged over the five test sets containing visually classified galaxies from the HSC-SSP survey.</caption><thead><tr><th rowspan="2">CNN model</th><th colspan="3">Precision</th><th colspan="3">Recall</th></tr><tr><th>z-bin 1<br>[0.1; 0.31]</th><th>z-bin 2<br>[0.31; 0.52]</th><th>z-bin 3<br>[0.52; 0.76]</th><th>z-bin 1<br>[0.1; 0.31]</th><th>z-bin 2<br>[0.31; 0.52]</th><th>z-bin 3<br>[0.52; 0.76]</th></tr></thead><tbody><tr><td>TNG-CNN</td><td>0.78 ± 0.02</td><td>0.67 ± 0.02</td><td>0.61 ± 0.02</td><td>0.74 ± 0.01</td><td>0.67 ± 0.02</td><td>0.81 ± 0.01</td></tr><tr><td>Horizon-CNN</td><td>0.71 ± 0.01</td><td>0.76 ± 0.02</td><td>0.82 ± 0.01</td><td>0.84 ± 0.01</td><td>0.76 ± 0.01</td><td>0.63 ± 0.01</td></tr><tr><td>Comb-CNN</td><td>0.86 ± 0.02</td><td>0.80 ± 0.03</td><td>0.85 ± 0.02</td><td>0.68 ± 0.01</td><td>0.58 ± 0.02</td><td>0.56 ± 0.01</td></tr><tr><td>Comb-CNN-2thr.</td><td>0.86 ± 0.01</td><td>0.80 ± 0.03</td><td>0.85 ± 0.02</td><td>0.88 ± 0.01</td><td>0.81 ± 0.03</td><td>0.80 ± 0.03</td></tr><tr><th colspan="7">F1-score</th></tr><tr><td>TNG-CNN</td><td>0.76 ± 0.01</td><td>0.67 ± 0.02</td><td>0.69 ± 0.01</td><td>0.76 ± 0.01</td><td>0.67 ± 0.02</td><td>0.64 ± 0.02</td></tr><tr><td>Horizon-CNN</td><td>0.77 ± 0.01</td><td>0.76 ± 0.01</td><td>0.71 ± 0.01</td><td>0.75 ± 0.01</td><td>0.76 ± 0.02</td><td>0.75 ± 0.01</td></tr><tr><td>Comb-CNN</td><td>0.76 ± 0.01</td><td>0.67 ± 0.02</td><td>0.68 ± 0.01</td><td>0.79 ± 0.01</td><td>0.72 ± 0.02</td><td>0.73 ± 0.01</td></tr><tr><td>Comb-CNN-2thr.</td><td>0.87 ± 0.01</td><td>0.80 ± 0.02</td><td>0.82 ± 0.03</td><td>0.86 ± 0.01</td><td>0.77 ± 0.02</td><td>0.82 ± 0.03</td></tr></tbody></table>

**Notes.** The reported errors correspond to the standard deviation. Precision, recall, and F1-score refer only to the merger class.

In comparison, our sample also includes less disturbed systems and pre-mergers. On the other hand, the excess for the X-ray and SED AGNs we measure are comparable to each other and to previous measurements for optical AGNs (Ellison et al. 2013; Gao et al. 2020). Bickley et al. (2023) found a considerably higher optical AGN excess (~4) in their post-mergers, similar to their MIR AGNs. There is also a small difference between our results for the X-ray AGNs and Hewlett et al. (2017). The latter found no difference in mergers and undisturbed controls, while we see a slight excess in mergers. To conclude, we find a clear excess of AGN occurrence in mergers, for all three types of AGNs, which demonstrates mergers can trigger AGN activity, regardless of AGN type. Our findings also reveal a higher MIR AGN excess relative to the X-ray and SED AGNs. These results could imply the following:

(i) Mergers are more likely to be connected to the triggering of MIR AGNs, possibly due to a physical connection (for instance, if the SMBH mass assembly in mergers preferentially occurs in a dust-obscured phase).

(ii) The MIR AGNs generally have higher AGN fractions. Therefore, mergers could be more connected with triggering more luminous and/or dominant AGNs.

(iii) The SED AGNs, with the lowest AGN fractions, could be triggered by secular processes. The same may apply to the X-ray AGNs to a lesser extent.

(iv) Merger could redistribute gas and dust and increase dust obscuration. Thus detecting AGNs in the (soft) X-ray or optical would be more challenging.

### 4.1.2. Merger fraction in AGN versus non-AGN

Here we perform the reverse experiment by measuring merger fractions in AGN host galaxies and non-AGN control samples. In Fig. 12, we plot the merger fractions obtained using the main classification for identifying mergers and non-mergers in the AGN and non-AGN controls, which are also listed in the top half of Table 7. Of the MIR AGNs, around half reside in mergers. A much lower fraction of mergers ($f_{merger}$), by ~20–25%, is observed in the MIR non-AGN controls. The X-ray AGNs have considerably lower $f_{merger}$ (~30%) and even lower $f_{merger}$ (~15–25%) in the corresponding non-X-ray AGN controls. The SED AGNs have the lowest $f_{merger}$ (~10–20%) and the corresponding non-SED AGN control samples show roughly a factor of two lower $f_{merger}$. We define merger excess as the merger fraction in AGNs divided by that in non-AGN controls, which is plotted in the bottom panel of Fig. 12. The merger excess in the MIR AGNs varies from ~1.6 to ~2.4 across the three z-bins. The merger excesses in the X-ray AGNs (~1.2 at $z < 0.5$, and ~1.8 at $z > 0.5$) are lower than that in the MIR AGNs. The merger excess in the SED AGNs (~2) is similar to that in the MIR AGNs.

We now repeat the same experiment, using the worst-case classification scheme in which unclassified galaxies are regarded as non-mergers. The merger number counts and fractions are presented in the bottom half of Table 7. As expected, the merger fraction decreases. Nevertheless, we derive similar merger excess values to those obtained with the main classification scheme, as shown in the bottom panel of Fig. 12. We also compare with previous measurements. In z-bin 1, our results
<table><caption>**Table 6.** Frequencies of MIR-, X-ray-, and SED-selected AGNs in mergers and non-mergers, in different redshift bins.</caption><thead><tr><th rowspan="2">z bin</th><th colspan="2">MIR AGNs</th><th colspan="2">X-ray AGNs</th><th colspan="2">SED AGNs</th></tr><tr><th>Merger</th><th>Non-merger (control)</th><th>Merger</th><th>Non-merger (control)</th><th>Merger</th><th>Non-merger (control)</th></tr></thead><tbody><tr><td>[0.1, 0.31)</td><td>3.0 ± 0.5%<br>(38/1260)</td><td>0.98 ± 0.09%<br>(124/12600)</td><td>4.9 ± 0.6%<br>(62/1260)</td><td>3.7 ± 0.2%<br>(461/12600)</td><td>29.8 ± 1.3%<br>(375/1260)</td><td>20.3 ± 0.4%<br>(2555/12600)</td></tr><tr><td>[0.31, 0.52)</td><td>3.1 ± 0.5%<br>(33/1059)</td><td>1.56 ± 0.12%<br>(165/10590)</td><td>11 ± 1%<br>(119/1059)</td><td>8.6 ± 0.3%<br>(911/10590)</td><td>27.0 ± 1.4%<br>(286/1059)</td><td>17.9 ± 0.4%<br>(1901/10590)</td></tr><tr><td>[0.52, 0.76)</td><td>1.8 ± 0.3%<br>(37/2036)</td><td>0.60 ± 0.05%<br>(122/20360)</td><td>7.3 ± 0.6%<br>(149/2036)</td><td>3.81 ± 0.13%<br>(776/20360)</td><td>50.1 ± 1.1%<br>(1021/2036)</td><td>37.8 ± 0.3%<br>(7685/20360)</td></tr></tbody></table>

**Notes.** Errors are calculated through binomial statistics. In brackets, we provide the numbers of AGNs, for each type, over the total number of mergers and non-merger controls, in each z-bin.

<table><caption>**Table 7.** Merger fractions in the MIR, X-ray, and SED AGNs and their respective non-AGN control sample, in different redshift bins.</caption><thead><tr><th rowspan="2">z</th><th>f<sub>merger</sub> in MIR AGNs</th><th>f<sub>merger</sub> in non-MIR AGNs (control)</th><th>f<sub>merger</sub> in X-ray AGNs</th><th>f<sub>merger</sub> in non-X-ray AGNs (control)</th><th>f<sub>merger</sub> in SED AGNs</th><th>f<sub>merger</sub> in non-SED AGNs (control)</th></tr></thead><tbody><tr><td colspan="7" style="text-align: center; font-weight: bold;">Main</td></tr><tr><td>[0.1, 0.31)</td><td>55.1 ± 6.0%<br>(38/69)</td><td>27.0 ± 1.7%<br>(186/690)</td><td>33.2 ± 3.4%<br>(64/193)</td><td>24.6 ± 1.0%<br>(475/1930)</td><td>22.1 ± 1.1%<br>(324/1467)</td><td>10.7 ± 0.3%<br>(1571/14670)</td></tr><tr><td>[0.31, 0.52)</td><td>45.1 ± 5.9%<br>(32/71)</td><td>28.0 ± 1.7%<br>(199/710)</td><td>30.1 ± 2.3%<br>(120/399)</td><td>23.0 ± 0.7%<br>(916/3990)</td><td>14.1 ± 0.8%<br>(245/1741)</td><td>7.0 ± 0.2%<br>(1223/17410)</td></tr><tr><td>[0.52, 0.76)</td><td>43.7 ± 5.6%<br>(35/80)</td><td>18.2 ± 1.4%<br>(146/800)</td><td>27.6 ± 1.9%<br>(152/550)</td><td>15.1 ± 0.5%<br>(831/5500)</td><td>11.8 ± 0.4%<br>(965/8151)</td><td>5.7 ± 0.1%<br>(4677/81510)</td></tr><tr><td colspan="7" style="text-align: center; font-weight: bold;">Worst-case</td></tr><tr><td>[0.1, 0.31)</td><td>40.4 ± 5.1%<br>(38/94)</td><td>20.5 ± 1.3%<br>(193/940)</td><td>22.9 ± 2.5%<br>(65/284)</td><td>16.8 ± 0.7%<br>(478/2840)</td><td>16.5 ± 0.8%<br>(325/1968)</td><td>8.1 ± 0.2%<br>(1596/19680)</td></tr><tr><td>[0.31, 0.52)</td><td>28.7 ± 4.2%<br>(33/115)</td><td>18.0 ± 1.1%<br>(207/1150)</td><td>17.4 ± 1.4%<br>(120/690)</td><td>14.6 ± 0.4%<br>(1008/6900)</td><td>10.0 ± 0.6%<br>(245/2450)</td><td>5.5 ± 0.2%<br>(1350/24500)</td></tr><tr><td>[0.52, 0.76)</td><td>26.4 ± 3.7%<br>(38/144)</td><td>12.9 ± 0.9%<br>(186/1440)</td><td>18.6 ± 1.4%<br>(153/825)</td><td>11.0 ± 0.3%<br>(909/8250)</td><td>9.1 ± 0.3%<br>(971/10609)</td><td>4.6 ± 0.1%<br>(4925/106090)</td></tr></tbody></table>

**Notes.** The top half of the table corresponds to galaxies classified using the main classification scheme. The bottom half corresponds to the worst-case scenario, where all unclassified galaxies are labelled as non-mergers. Errors are calculated through binomial statistics. In brackets are the number of mergers out of the total number of AGNs and non-AGN controls, per AGN type and z-bin.

for the MIR AGNs agree well with Ellison et al. (2019) who analysed $z < 0.25$ galaxies from the Canada France Imaging Survey. Gao et al. (2020) found a lower excess, similar to what we see in z-bin 2 for the MIR AGNs. At $z > 0.5$, our merger excess in the X-ray AGNs is similar to that in optical AGNs by Ellison et al. (2019). However, at $z < 0.5$, our results are significantly lower but comparable to the values in Gao et al. (2020) for optical AGNs. Our findings for the SED AGNs are very close to excess values measured by Ellison et al. (2019) for optical AGNs.

At face value, we might conclude that merger is the dominant mechanism for triggering the MIR AGNs, given half of them are in mergers. However, this interpretation may be oversimplified. We also detect mergers in the non-AGN controls, which could mean that mergers do not necessarily cause AGN activity. On the other hand, due to the large mismatch in the merger and AGN timescales, it is also possible that mergers do trigger AGNs but we happen to observe the AGN in an off-state in some systems. For instance, in z-bin 1, 55% of the MIR AGNs reside in mergers, which could imply that mergers play a dominant role. However, 27% of the non-MIR AGN controls also reside in mergers. Therefore, we could have two possible scenarios. In the first case, only 55% - 27% = 28% of the MIR AGNs are really trig-

gered by mergers. In the second scenario, 55% + 27% = 82% of the MIR AGNs are triggered by mergers (but some of them happen to be switched off). The real merger fraction could be somewhere between 28% and 82% if both scenarios are acting in the observed systems. Similar arguments could be applied to the X-ray and SED AGNs. For the X-ray AGNs, mergers may or may not be the dominant triggering process. But for the SED AGNs, it seems clear that merger is not the main mechanism even if we consider all the non-AGNs in mergers are actually AGNs. In summary, we cannot conclude on the extent of the role of mergers in triggering AGNs, but it is likely that mergers are more important (or even dominant) for the MIR AGNs. On the other hand, for the X-ray and SED AGNs mergers are unlikely to be the primary trigger.

## 4.2. merger-AGN connection using the continuous $f_{AGN}$ parameter

In the second half of the analysis, we investigate the merger-AGN connection, using the continuous AGN fraction $f_{AGN}$ parameter derived from SED fitting in the rest-frame 3–30µm. We also examine the connection using the BHARs and the equivalent bolometric luminosities.
<figure><img src="image_12.png" /></figure>

**Fig. 11.** AGN frequency in mergers vs non-mergers. Top: Frequency of AGNs (MIR AGN: red; X-ray AGN: blue; SED AGN: orange) in mergers (filled symbols) and non-mergers (empty symbols) per z-bin. Errors are calculated using binomial statistics. Bottom: Ratio of AGN frequency in mergers relative to that in non-mergers (i.e. AGN excess). The dashed line indicates no excess. Previous measurements are shown on the left. Ellison et al. (2013) found a MIR AGN excess of 13.3, shown as an arrow for readability.

### 4.2.1. The $f_{AGN}$ parameter in mergers versus non-mergers

First, we compare the distribution of $f_{AGN}$ between mergers and non-mergers. Fig. 13 displays the normalised distributions of $f_{AGN}$ in the merger and non-merger control samples. To assess the statistical significance of the differences between the two populations, we employ a two-sample Kolmogorov–Smirnov test (KS test; Hodges 1958) and report the results in each panel of Fig. 13. It is clear that in all z-bins and for all AGN types, the $f_{AGN}$ distributions in mergers and non-merger controls are different, with a clear excess of high $f_{AGN}$ in mergers (particularly at the highest $f_{AGN}$ values). For the MIR AGNs, the excess of high $f_{AGN}$ values in mergers appears to be the strongest, except in z-bin 1 which is limited by low-number statistics. These results again indicate that mergers are more relevant for more dominant AGNs and dust-obscured AGNs. We also compare the distributions of BHAR (or bolometric luminosity) between mergers and non-mergers. A similar picture emerges in the sense that mergers have a larger fraction of AGNs with high BHAR ($>10^{-2}$ M$_{\odot}$/yr) or equivalently more luminous AGNs ($L_{\text{disc}} \ge 10^{44}$ erg/s) with respect to non-mergers. In addition, the excess of more powerful AGNs with higher BHARs is the strongest in the MIR AGNs.

To investigate further the link between mergers and the more dominant AGNs we perform an additional experiment by comparing the number of AGNs with $f_{AGN} \ge 0.5$ or $\ge 0.7$ in the merger sample and non-merger controls. Here, we only consider the SED AGNs. The MIR and X-ray AGNs are excluded due to low-number statistics. Fig. 14 shows that $\ge 2\%$ (~1%) of the mergers host an SED AGN with $f_{AGN} \ge 0.5$ ($\ge 0.7$). In comparison, only ~1% (~0.4%) of the non-mergers host such a dominant AGN. As a result, the SED AGN excess in mergers for $f_{AGN} \ge 0.5$ is a factor of ~2, 4, and 3 in z-bins 1, 2, and 3, respectively. When considering $f_{AGN} \ge 0.7$, the excess factor in mergers

<figure><img src="image_13.png" /></figure>

**Fig. 12.** Merger fraction in AGNs vs non-AGNs. Top: Merger fraction in MIR, X-ray, and SED AGNs and the respective non-AGN control samples per z-bin. Filled bars indicate the merger fractions for MIR (red), X-ray AGNs (blue), and SED AGNs (orange), respectively. Empty bars correspond to the merger fractions in the non-AGN controls. Errors are calculated through binomial statistics. Bottom: Ratio of the merger fraction in AGNs relative to non-AGN controls (i.e. the merger excess) for the main classification (filled symbols) and the worst-case scenario (empty symbols). Dashed line indicates no merger excess. First column displays previous literature results.

increases to ~3, 5, and 3 in z-bins 1, 2, and 3, respectively. These excess factors are comparable to the values measured for the MIR AGNs and significantly higher than those for the entire SED AGN sample (Sect. 4.1.1). As shown in Fig. 7, the SED AGNs are largely weak AGNs, while a considerable fraction of the MIR AGNs have $f_{AGN} \ge 0.5$. Yet, when concentrating to the most powerful AGNs, the SED AGNs exhibit higher AGN excesses, comparable to the MIR AGNs. These results hint at a scenario where mergers play a more important role in triggering more powerful AGNs, independent of selection.

### 4.2.2. Merger fraction as a function of $f_{AGN}$ and BHAR

Finally, we investigate how the merger fraction, $f_{merger}$, varies with AGN fraction, $f_{AGN}$. We plot $f_{merger}$ as a function of $f_{AGN}$ in the top panel in Fig. 15, which shows the SED AGNs in three z-bins and the entire samples of the MIR and X-ray AGNs (due to low number statistics). For the SED AGNs, $f_{merger}$ generally increases with $f_{AGN}$ in all z-bins, with a plateau around $f_{merger} \sim 0.3$ at $f_{AGN} \sim 0.4-0.8$. At $f_{AGN} > 0.8$, a sharp increase in $f_{merger}$ can be seen in z-bin 1 and 3 (missing in z-bin 2 due to a lack of data). The MIR AGNs exhibit similar behaviour, with an almost flat relation around $f_{merger} \sim 50\%$ for AGN fractions up to $f_{AGN} \approx 0.8$, followed by a sharp increase in $f_{merger}$ at $f_{AGN} > 0.8$. The X-ray AGNs also follow a similar pattern, with a mildly increasing (almost flat) $f_{merger} \sim 30\%$ at $f_{AGN} < 0.8$ and then a steep increase to $\sim 80\%$ at the highest $f_{AGN}$ values.

From this first attempt to characterise the relation between $f_{merger}$ and $f_{AGN}$, we find clear evidence for a connection between AGNs and mergers with two distinct regimes. For all three types
<figure><img src="image_14.png" /><figcaption>**Fig. 13.** Normalised distributions of AGN fraction in mergers (orange) and non-mergers (blue), as a function of redshift ($z$-bin 1: left; $z$-bin 2: middle; $z$-bin 3: right) and AGN type (SED AGN: top; MIR AGN: bottom). In each panel, we show the results of a KS test, where $D$ is the test result and $p$ is the corresponding $p$-value. For SED AGNs, the $f_{\text{AGN}}$ distribution in mergers is considerably different from that in non-mergers in all $z$-bins. MIR AGNs have different merger and non-merger distributions at $z \ge 0.31$.</figcaption></figure>

of AGNs, the qualitative trend in $f_{\text{merger}}$ vs $f_{\text{AGN}}$ is the same. At $f_{\text{AGN}} > 80\%$, $f_{\text{merger}}$ rises quickly to ~80–100%. In addition, this steep rising trend in the three AGN types seems to overlap with each other. This could indicate that mergers are the dominant or even the only triggering mechanism for galaxies with a very dominant AGN, regardless of AGN type. At $f_{\text{AGN}} < 0.8$, there appears to be a mildly increasing or even flat trend in $f_{\text{merger}}$ vs $f_{\text{AGN}}$. This could be due to other physical processes, such as disk instability, galactic bars, and stellar winds (Bournaud et al. 2011; Garland et al. 2023; Ciotti & Ostriker 2007), playing a more important role in fuelling SMBHs. It is also possible that the triggering of AGNs by mergers is somewhat stochastic when the AGN is relatively weak compared to the host galaxy. Moreover, in the regime of less dominant AGNs, $f_{\text{merger}}$ does depend on AGN type, with $f_{\text{merger}} \sim 50\%$ in the MIR AGN, ~30% in the X-ray AGNs, and slightly lower in the SED AGNs at around 20–30%. This could imply that when the AGN is not very dominant or relatively weak, mergers preferentially trigger dust-obscured AGNs, consistent with our findings in Sect. 4.1. We also investigate the correlation between $f_{\text{merger}}$ and AGN bolometric luminosity or BHAR. We split the AGNs into bins of bolometric power and calculate $f_{\text{merger}}$ in each bin according to our main classification scheme. We present the results in the bottom panel in Fig. 15. Overall, we see a similar picture with $f_{\text{merger}}$ vs $f_{\text{AGN}}$. When the AGN bolometric luminosity or BHAR is very high ($L_{\text{disc}} \ge 3 \times 10^{45}$ erg/s, BHAR $\ge 0.5 M_{\odot}/\text{yr}$), $f_{\text{merger}}$ can increase very rapidly, approaching 70–100%. When the AGN bolometric luminosity or BHAR is not that extreme, $f_{\text{merger}}$ can vary between ~20–50%, depending on the AGN type.

Some previous studies also found evidence that the most luminous AGNs preferentially reside in mergers. For example, Gao et al. (2020) found an increase in $f_{\text{merger}}$ as AGN luminosity increases, with $f_{\text{merger}} \ge 50\%$ for the most luminous MIR AGNs ($L_{6\mu\text{m}} > 10^{44}$ erg/s or $L_{\text{AGN}} \ge 10^{44}$ erg/s). For the optical AGNs, Ellison et al. (2019) and Gao et al. (2020) observed an enhanced $f_{\text{merger}}$ (~40–60%) at $L_{\text{[OIII]}} \ge 10^{42.5}$ erg/s (equivalent to $L_{\text{AGN}} \ge 10^{44}$ erg/s). Likewise, Pierce et al. (2022) showed that the pro-

portion of disturbed galaxies is >60% at $L_{\text{[OIII]}} > 10^{42}$ erg/s. Goulding et al. (2018) found that AGNs with $L_{\text{AGN}} \ge 10^{45}$ erg/s mostly reside in mergers. Similarly, Urrutia et al. (2008) and Glikman et al. (2015) found $f_{\text{merger}} > 80\%$ in luminous dust-reddened quasars ($L_{\text{AGN}} > 10^{46}$ erg/s), consistent with what we observe for the most luminous AGNs. Treister et al. (2012) observed a lower $f_{\text{merger}}$ for less powerful AGNs ($f_{\text{merger}} \le 20\%$ at $L_{\text{AGN}} < 10^{44}$ erg/s), and a rapid increase to $f_{\text{merger}} \sim 90\%$ at $L_{\text{AGN}} \approx 10^{46}$ erg/s. These findings reinforce the scenario we propose in which mergers are strongly linked to the triggering of dust-obscured AGNs and the most dominant/powerful AGNs (or even the only viable mechanism in the latter case), while less rapidly accreting AGNs may be mainly fuelled by secular processes or stochastically by mergers.

Other studies found less convincing evidence for a dependence of $f_{\text{merger}}$ on AGN luminosity. Villforth et al. (2017) analysed 20 luminous ($L_{\text{AGN}} \ge 10^{45}$ erg/s) X-ray AGNs at $z = 0.5–0.7$ and found no signs of enhanced $f_{\text{merger}}$. However, after taking into account mild disturbances, they estimated an upper limit for $f_{\text{merger}}$ of 38%, comparable to what we find for the X-ray AGNs with $10^{45} \le L_{\text{disc}} \le 10^{46}$ erg/s. Hewlett et al. (2017) studied ~100 X-ray AGNs, spanning a wider redshift range ($0.5 \le z \le 2.2$) and luminosity range ($10^{43} \le L_{\text{X}} \le 10^{45}$ erg/s), finding no evidence that mergers play a more dominant role at higher luminosities. Nevertheless, the fraction of galaxies classified as clear mergers and disturbed by Hewlett et al. (2017) is ~20–30%, in agreement with what we find. These apparently contradictory results could be at least partly explained by the two-regime behaviour shown in Fig. 15, namely mergers could be a secondary trigger for the X-ray AGNs up to $L_{\text{disc}} \approx 5 \times 10^{45}$ erg/s, and only become the principal triggering mechanism for the most dominant/luminous AGNs.

### 4.2.3. Caveats on the $f_{\text{merger}} - f_{\text{AGN}}$ relation

Bright point sources may affect our CNN classifiers, thus influencing the measured merger fraction. For example, optically
<figure><img src="image_15.png" /></figure>

**Fig. 14.** Dominant subset of the SED AGNs. Top: Frequency of the SED AGNs with $f_{AGN} \ge 0.5$ (circles) or $f_{AGN} \ge 0.7$ (squares) in mergers (filled symbols) and non-mergers (empty symbols) as a function of redshift. Uncertainties are estimated using binomial statistics. Bottom: Excess of the dominant SED AGNs in mergers. The red and orange bands display the AGN excess for the MIR and SED AGNs as a whole, respectively (Fig. 11).

unobscured luminous quasars can outshine the host galaxy, potentially hampering merger detection. In Appendix D, we investigate the impact of the SDSS quasars as they represent the brightest optical AGNs and so are most likely to affect our ability to detect merging features in the host galaxy. We find that our results on the $f_{merger} - f_{AGN}$ relation are not significantly affected.

We also conducted a second experiment to assess the potential impact by injecting point sources modelled on the HSC PSF into our simulation test sets. The luminosity of the point sources is set to a certain fraction of the total light within a circular aperture with a radius equal to half of the PSF full-width half maximum (FWHM, ~0.6"). Hereafter, we use the terminology 'PSF contribution' to indicate this fraction, $f_{PSF} = L_{PSF,aper}/(L_{PSF,aper} + L_{galaxy,aper})$. We set the injected $f_{PSF}$ to 50%, 80%, and 90%. Examples of simulated galaxies with injected PSFs are shown in Appendix E. We applied our merger identification to these test sets to examine changes in $f_{merger}$ as a function of the injected $f_{PSF}$, as shown in Fig. 16. The intrinsic merger fractions in the test sets are set to 5% and 10%, covering the range generally reported in the literature in the redshift and stellar mass range studied in this work (e.g. Duncan et al. 2019; Ferreira et al. 2020; Whitney et al. 2021; Margalef-Bentabol et al. 2024). In the first two z-bins, the change in $f_{merger}$ is very small (≤0.02) after adding point sources. In z-bin 3, $f_{merger}$ is more or less the same as for the images without injected PSFs at $f_{PSF} = 50\%$. At $f_{PSF} = 80\% (90\%)$, $f_{merger}$ increases by ~0.05 (~0.1). Therefore, we can conclude that the overall merger classification is unaffected by point source contamination at $z < 0.52$ at levels up to 90%, and in the last z-bin at $f_{PSF} \le 50\%$. However, we do observe a ~5–10% increase in $f_{merger}$ in the last z-bin at $f_{PSF} \ge 80\%$.

As our merger classifiers are mostly unaffected by point source contamination at $z < 0.52$ based on the test on the simulations, we now focus on z-bin 3 to investigate how potential misclassifications may affect the $f_{merger} - f_{AGN}$ relation in Fig. 15.

<figure><img src="image_16.png" /></figure>

**Fig. 15.** Merger fraction as a function of AGN fraction and BHAR. Top: $f_{merger}$ as a function of $f_{AGN}$. The $f_{AGN}$ bin width is 0.15 and $f_{merger}$ is plotted at the centre of each bin. Errors are calculated through binomial statistics. Qualitatively similar trends in $f_{merger}$ vs $f_{AGN}$ are seen for all three AGN types, namely a mildly increasing $f_{merger}$ at $f_{AGN} < 0.8$, followed by a rapid increase to $f_{merger}$ ~80–100% when the AGN is very dominant. Bottom: $f_{merger}$ as a function of BHAR and the equivalent AGN bolometric luminosity $L_{disc}$.

First, we need to estimate $f_{PSF}$ in the AGN host galaxies to have an overview of the extent of PSF contamination in our AGN samples. We did this as follows: (i) For each image, we scaled the PSF to match the brightest central pixel and then subtracted it from the image; (ii) We performed aperture photometry, using the same aperture as before, on the residual images and estimated the fractional point source contamination as $1 - (F_{residual}/F_{tot})$.

In the top panel of Fig. 17, we plot the measured $f_{PSF}$ vs $f_{AGN}$, for the three AGN types in z-bin 3. Given the larger number of the SED AGNs compared to the other two AGN types, we randomly selected 500 SED AGNs. While there does exist a general correlation, the scatter is very significant. In the bottom panel of Fig. 17, we plot the differential and cumulative $f_{PSF}$ distributions, for the three AGN types in z-bin 3. It is clear that for all three AGN types, most host galaxies (~90%) have a measured PSF contribution $f_{PSF} < 0.80$. From the previous experiment of injecting PSFs into the simulation test sets, we measured a change in $f_{merger}$ ~0.05 at $f_{PSF} = 80\%$ in z-bin 3. Therefore, even if we take the extreme scenario for the level of PSF contamination in our AGN samples, this small change of ~0.05 is insignificant compared to the much steeper increase in $f_{merger}$ (~40%) in the regime of very dominant AGNs in Fig. 15.
<figure><img src="image_17.png" /><figcaption>**Fig. 16.** Difference between the merger fraction measured in the test sets with and without injected PSF ($f_{\text{merger with PSF}} - f_{\text{merger without PSF}}$) as a function of the contribution of the PSF. The filled (empty) symbols refer to the test sets with an intrinsic merger fraction of 5% (10%). Symbols are shifted slightly along the x-axis to prevent overlapping with each other. The main difference is observed in z-bin 3 at PSF contribution levels of 80% and 90%.</figcaption></figure>

<figure><img src="image_18.png" /><figcaption>**Fig. 17.** Point source contribution measured in AGN host galaxies in z-bin 3. Top: PSF contribution measured in the i-band images vs $f_{\text{AGN}}$ obtained via SED fitting. Bottom: Cumulative (solid lines) and differential (dashed lines) distributions of the PSF contribution for the MIR, X-rays, and SED AGNs.</figcaption></figure>

To assess the significance of the steep $f_{\text{merger}}$ increase shown in Fig. 15, we calculate the difference between $f_{\text{merger}}$ at $f_{\text{AGN}} > 0.8$, and $f_{\text{merger}}$ at $f_{\text{AGN}} \le 0.8$. The enhancement is statistically significant at $1.7\sigma$, $3.3\sigma$, and $2.9\sigma$ levels for MIR, X-ray, and SED AGNs, respectively. When considering the possible bias of

~0.05 at $f_{\text{AGN}} > 0.8$, the significance is lowered to $1.45\sigma$, $2.9\sigma$, and $2.7\sigma$, in the corresponding AGNs. These findings confirm that our main results are robust against the possible classification bias.

## 5. Summary and conclusions

In this paper, we carefully investigate the connection between galaxy interactions and AGN triggering at $0.1 \le z \le 0.8$, corresponding to the second half of the cosmic history. We used the excellent imaging quality offered by the HSC-SSP survey to identify mergers and non-mergers in the KiDS-N-W2 field. We exploited multi-wavelength data from the X-ray to the sub-mm, including photo-z from the KiDS-VIKING survey, and performed SED fitting to derive galaxy properties, such as stellar mass, AGN fraction ($f_{\text{AGN}}$), AGN bolometric luminosity, and BHAR. We selected three types of AGNs via MIR colours, X-ray detection, and SED fitting, with different levels of dust obscuration and AGN power. To classify HSC images into mergers and non-mergers, we implemented CNNs trained on mock HSC observations from two cosmological simulations and tested them on a small set of visually classified real galaxies. We built mass- and redshift-matched control samples to understand the role of mergers in triggering AGNs, for the three AGN types. We also extended the analysis of the merger-AGN connection by examining for the first time the continuous $f_{\text{AGN}}$ parameter. Our main results are summarised below:

(i) A large excess (a factor of ~2–3) of the MIR AGNs in mergers compared to non-mergers, and a lower excess (~1.4) of the SED AGNs in mergers, in every z-bin. For the X-ray AGNs, there is a weak excess of ~1.3 in mergers at $z \le 0.5$ and a slightly larger excess of 1.8 at $0.5 \le z \le 0.8$. This indicates that mergers could trigger all three AGN types, but are more connected with the MIR AGNs, which represent dust-obscured AGNs and contain more dominant and/or luminous AGNs compared to the other two types.

(ii) The merger fraction in the MIR AGN host galaxies is much higher than in the corresponding controls (45–55% vs 20–30%). The merger fraction in the MIR AGNs is also higher than in the X-ray and SED AGNs. Both the MIR and SED AGNs are more likely (by a factor of ~2) to be hosted by mergers than their respective controls. On the other hand, the excess of mergers in the X-ray AGNs compared to the corresponding non-AGNs is a factor of ~1.2 at $z \le 0.5$ and ~1.8 at $0.5 \le z \le 0.8$. We cannot yet conclude on the extent of mergers in triggering AGNs, but mergers could be the dominant mechanism in triggering the MIR AGNs.

(iii) The AGN fraction $f_{\text{AGN}}$ distributions of the merger population are statistically different from those of the non-merger controls, for all z-bins and AGN types, with a clear excess at high $f_{\text{AGN}}$ values in mergers. The strongest excess is found in the MIR AGNs at $z \ge 0.3$. The BHAR distributions show a similar trend. The incidence rate of SED AGNs with $f_{\text{AGN}} \ge 0.5$ or $\ge 0.7$ is a factor of ~2–5 larger in mergers than in non-mergers, which is much higher than the entire SED AGN sample and similar to the MIR AGNs. These results imply that mergers play an increasingly more important role in triggering more dominant/luminous AGNs.

(iv) We derived, for the first time, a relation between merger fraction $f_{\text{merger}}$ and AGN fraction $f_{\text{AGN}}$, which reveals two distinct regimes. At $f_{\text{AGN}} < 0.8$, we observe an almost flat $f_{\text{merger}}$ with increasing $f_{\text{AGN}}$, centred at $f_{\text{merger}} \sim 0.3–0.4$ for the SED and X-ray AGNs and at ~0.5 for the MIR AGNs. At $f_{\text{AGN}} \ge 0.8$, there is a very steep rise for all AGN types,
up to $f_{merger} \approx 80-100\%$. This could indicate that mergers are the dominant or even the sole fuelling mechanism for the most dominant/powerful AGNs and help explain why some studies found no dependence in $f_{merger}$ on AGN luminosity.

In conclusion, our results show clear evidence that mergers are strongly connected to the presence of dust-obscured AGNs, as well as to the most dominant and powerful AGNs. This could be because mergers can funnel gas to the central regions to enable rapid accretion onto the SMBH. This rapid accretion phase is generally considered to be dust-obscured (thus promoting the detection of the AGN in the MIR). The sheer dominance of mergers in the most luminous and powerful AGNs, regardless of AGN type, could be explained by the possibility that mergers are by far the most likely or even the only viable way to bring in the large amount of gas needed to assemble the SMBH very quickly. This also highlights the need to use large-area surveys (e.g. with *Euclid*, *Laureijs* et al. 2011) to study the most extreme AGNs. For the less dominant and powerful AGNs, secular processes could be more important than mergers, particularly for the less dust-obscured AGNs. Finally, we have publicly released the multi-wavelength galaxy catalogue constructed in this work, including our detailed SED fitting results and merger classifications.

## Data availability

The final sample of galaxies analysed in this work, including the merger classifications, is publicly released in two versions at https://antolamarca.com/#data. The catalogues are available at the CDS via anonymous ftp to cdsarc.cds.unistra.fr (130.79.128.5) or via https://cdsarc.cds.unistra.fr/viz-bin/cat/J/A+A/690/A326

Acknowledgements. This publication is part of the project 'Clash of the titans: deciphering the enigmatic role of cosmic collisions' (with project number VI.Vidi.193.113 of the research programme Vidi which is (partly) financed by the Dutch Research Council (NWO). 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 is based 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 NAOJ. Data analysis was in part carried out with the cooperation of Center for Computational Astrophysics (CfCA), NAOJ. We are honored and grateful for the opportunity of observing the Universe from Maunakea, which has the cultural, historical and natural significance in Hawaii. Based on data products from observations made with ESO Telescopes at the La Silla Paranal Observatory under programme IDs 177.A-3016, 177.A-3017 and 177.A-3018, and on data products produced by Target/OmegaCEN, INAF-OACN, INAF-OAPD and the KiDS production team, on behalf of the KiDS consortium. OmegaCEN and the KiDS production team acknowledge support by NOVA and NWO-M grants. Members of INAF-OAPD and INAF-OACN also acknowledge the support from the Department of Physics & Astronomy of the University of Padova, and of the Department of Physics of Univ. Federico II (Naples). This publication makes use of data products from the Wide-field Infrared Survey Explorer, which is a joint project of the University of California, Los Angeles, and the Jet Propulsion Laboratory/California Institute of Technology, funded by the National Aeronautics and Space Administration. This work is based on data from eROSITA, the soft X-ray instrument aboard SRG, a joint Russian-German science mission supported by the Russian Space Agency (Roskosmos), in the interests of the Russian Academy of Sciences represented by its Space Research Institute (IKI), and the Deutsches Zentrum für Luft- und Raumfahrt (DLR). Herschel is an ESA space observatory with science instru-

ments provided by European-led Principal Investigator consortia and with important participation from NASA. This work has made use of the Horizon cluster on which the Horizon-AGN simulation was post-processed, hosted by the Institut d' Astrophysique de Paris. We warmly thank S. Rouberol for running it smoothly. We thank the Center for Information Technology of the University of Groningen for their support and for providing access to the Hábrók high performance computing cluster. The SED fitting and modelling on such a large sample was possible thanks to the high-memory resources of the Dutch National Supercomputer (Snellius). We thank SURF (www.surf.nl) for the support in using the National Supercomputer Snellius.

## References

Abadi, M., Agarwal, A., Barham, P., et al. 2016, arXiv e-prints [arXiv:1603.04467]

Ackermann, S., Schawinski, K., Zhang, C., Weigel, A. K., & Turp, M. D. 2018, MNRAS, 479, 415

Aihara, H., Arimoto, N., Armstrong, R., et al. 2018a, PASJ, 70, S4

Aihara, H., Armstrong, R., Bickerton, S., et al. 2018b, PASJ, 70, S8

Aihara, H., AlSayyad, Y., Ando, M., et al. 2019, PASJ, 71, 114

Aihara, H., AlSayyad, Y., Ando, M., et al. 2022, PASJ, 74, 247

Aird, J., Coil, A. L., Georgakis, A., et al. 2015, MNRAS, 451, 1892

Alexander, D. M., & Hickox, R. C. 2012, New Astron. Rev., 56, 93

Barnes, J. E., & Hernquist, L. E. 1991, ApJ, 370, L65

Benítez, N. 2000, ApJ, 536, 571

Bhowmick, A. K., Blecha, L., & Thomas, J. 2020, ApJ, 904, 150

Bickley, R. W., Bottrell, C., Hani, M. H., et al. 2021, MNRAS, 504, 372

Bickley, R. W., Ellison, S. L., Patton, D. R., & Wilkinson, S. 2023, MNRAS, 519, 6149

Blecha, L., Snyder, G. F., Satyapal, S., & Ellison, S. L. 2018, MNRAS, 478, 3056

Blumenthal, K. A., & Barnes, J. E. 2018, MNRAS, 479, 3952

Boquien, M., Burgarella, D., Roehlly, Y., et al. 2019, A&A, 622, A103

Bosch, J., Armstrong, R., Bickerton, S., et al. 2018, PASJ, 70, S5

Bottrell, C., Hani, M. H., Teimoorinia, H., et al. 2019, MNRAS, 490, 5390

Bournaud, F., Dekel, A., Teyssier, R., et al. 2011, ApJ, 741, L33

Bourne, N., Dunne, L., Maddox, S. J., et al. 2016, MNRAS, 462, 1714

Brandt, W. N., & Alexander, D. M. 2015, A&ARv, 23, 1

Brunner, H., Liu, T., Lamer, G., et al. 2022, A&A, 661, A1

Bruzual, G., & Charlot, S. 2003, MNRAS, 344, 1000

Burgarella, D., Buat, V., & Iglesias-Páramo, J. 2005, MNRAS, 360, 1413

Byrne-Mamahit, S., Hani, M. H., Ellison, S. L., Quai, S., & Patton, D. R. 2022, MNRAS, 519, 4966

Calzetti, D., Armus, L., Bohlin, R. C., et al. 2000, ApJ, 533, 682

Chollet, F. 2023, Keras: Deep Learning for humans (Keras)

Cibinel, A., Daddi, E., Sargent, M. T., et al. 2019, MNRAS, 485, 5631

Ciotti, L., & Ostriker, J. P. 2007, ApJ, 665, 1038

Ciprijanović, A., Snyder, G. F., Nord, B., & Peek, J. E. G. 2020, Astron. Comput., 32, 100390

Ciprijanović, A., Kafkes, D., Downey, K., et al. 2021, MNRAS, 506, 677

Cisternas, M., Jahnke, K., Inskip, K. J., et al. 2011, ApJ, 726, 57

Conselice, C. J. 2014, ARA&A, 52, 291

Cutri, R. M., Wright, E. L., Conrow, T., et al. 2013, Explanatory Supplement to the AllWISE Data Release Products, Tech. rep.

Cutri, R. M., Wright, E. L., Conrow, T., et al. 2014, VizieR Online Data Catalog: II/328

Darg, D. W., Kaviraj, S., Lintott, C. J., et al. 2010, MNRAS, 401, 1552

Davies, L. J. M., Robotham, A. S. G., Driver, S. P., et al. 2015, MNRAS, 452, 616

de Jong, J. T. A., Kuijken, K., Applegate, D., et al. 2013, Messenger, 154, 44

de Jong, J. T. A., Kleijn, G. A. V., Erben, T., et al. 2017, A&A, 604, A134

Di Matteo, T., Croft, R. A. C., Springel, V., & Hernquist, L. 2003, ApJ, 593, 56

Di Matteo, T., Springel, V., & Hernquist, L. 2005, Nature, 433, 604

Draine, B. T., Aniano, G., Krause, O., et al. 2014, ApJ, 780, 172

Driver, S. P., Hill, D. T., Kelvin, L. S., et al. 2011, MNRAS, 413, 971

Dubois, Y., Pichon, C., Welker, C., et al. 2014, MNRAS, 444, 1453

Dubois, Y., Peirani, S., Pichon, C., et al. 2016, MNRAS, 463, 3948

Duncan, K., Conselice, C. J., Mundy, C., et al. 2019, ApJ, 876, 110

Edge, A., Sutherland, W., Kuijken, K., et al. 2013, Messenger, 154, 32

Ellison, S. L., Patton, D. R., Mendel, J. T., & Scudder, J. M. 2011, MNRAS, 418, 2043

Ellison, S. L., Mendel, J. T., Patton, D. R., & Scudder, J. M. 2013, MNRAS, 435, 3627

Ellison, S. L., Patton, D. R., & Hickox, R. C. 2015, MNRAS, 451, L35

Ellison, S. L., Viswanathan, A., Patton, D. R., et al. 2019, MNRAS, 487, 2491

Ferreira, L., Conselice, C. J., Duncan, K., et al. 2020, ApJ, 895, 115

Fritz, J., Franceschini, A., & Hatziminaoglou, E. 2006, MNRAS, 366, 767
Gao, F., Wang, L., Pearson, W. J., et al. 2020, A&A, 637, A94

Garland, I. L., Fahey, M. J., Simmons, B. D., et al. 2023, MNRAS, 522, 211

Glikman, E., Simmons, B., Mailly, M., et al. 2015, ApJ, 806, 218

Gordon, Y. A., French, K. D., Neeleman, M., et al. 2019, ApJ, 878, 88

Goulding, A. D., Greene, J. E., Bezanson, R., et al. 2018, PASJ, 70, S37

Grogin, N. A., Conselice, C. J., Chatzichristou, E., et al. 2005, ApJ, 627, L97

Heckman, T. M., & Best, P. N. 2014, ARA&A, 52, 589

Hewlett, T., Villforth, C., Wild, V., et al. 2017, MNRAS, 470, 755

Hinshaw, G., Larson, D., Komatsu, E., et al. 2013, ApJS, 208, 19

Hodges, J. L. 1958, Ark. Mat., 3, 469

Hopkins, P. F., Hernquist, L., Cox, T. J., et al. 2006, ApJS, 163, 1

Hopkins, P. F., Hernquist, L., Cox, T. J., & Kereš, D. 2008, ApJS, 175, 356

Huang, S., Leauthaud, A., Murata, R., et al. 2018, PASJ, 70, S6

Huertas-Company, M., Gravet, R., Cabrera-Vives, G., et al. 2015, ApJS, 221, 8

Huertas-Company, M., Rodriguez-Gomez, V., Nelson, D., et al. 2019, MNRAS, 489, 1859

Hwang, H. S., Park, C., Elbaz, D., & Choi, Y. Y. 2012, A&A, 538, A15

Ishibashi, W., & Fabian, A. C. 2016, MNRAS, 463, 1291

Ishino, T., Matsuoka, Y., Koyama, S., et al. 2020, PASJ, 72, 83

Jarrett, T. H., Cluver, M. E., Magoulas, C., et al. 2017, ApJ, 836, 182

Knapen, J. H., Cisternas, M., & Querejeta, M. 2015, MNRAS, 454, 1742

Kocevski, D. D., Faber, S. M., Mozena, M., et al. 2012, ApJ, 744, 148

Kocevski, D. D., Brightman, M., Nandra, K., et al. 2015, ApJ, 814, 104

Koss, M., Mushotzky, R., Veilleux, S., & Winter, L. 2010, ApJ, 716, L125

Kuijken, K., Heymans, C., Hildebrandt, H., et al. 2015, MNRAS, 454, 3500

Kuijken, K., Heymans, C., Dvornik, A., et al. 2019, A&A, 625, A2

Laureijs, R., Amiaux, J., Arduini, S., et al. 2011, arXiv e-prints
[arXiv:1110.3193]

Lecun, Y., Bottou, L., Bengio, Y., & Haffner, P. 1998, Proc. IEEE, 86, 2278

Liu, T., Buchner, J., Nandra, K., et al. 2022, A&A, 661, A5

Lotz, J. M., Primack, J., & Madau, P. 2004, AJ, 128, 163

Lutz, D., Maiolino, R., Spoon, H. W. W., & Moorwood, A. F. M. 2004, A&A, 418, 465

Lyke, B. W., Higley, A. N., McLane, J. N., et al. 2020, ApJS, 250, 8

Maas, A. L., Hannun, A. Y., & Ng, A. Y. 2013, Proc. icml, 30, 3

Maddox, S. J., & Dunne, L. 2020, MNRAS, 493, 2363

Mainzer, A., Grav, T., Bauer, J., et al. 2011, ApJ, 743, 156

Marconi, A., Risaliti, G., Gilli, R., et al. 2004, MNRAS, 351, 169

Margalef-Bentabol, B., Wang, L., La Marca, A., et al. 2024, A&A, 687, A24

Martin, G., Kaviraj, S., Devriendt, J. E. G., et al. 2017, MNRAS, 472, L50

Martin, G., Kaviraj, S., Volonteri, M., et al. 2018, MNRAS, 476, 2801

Martin, G., Jackson, R. A., Kaviraj, S., et al. 2021, MNRAS, 500, 4937

Mateos, S., Carrera, F. J., Alonso-Herrero, A., et al. 2015, MNRAS, 449, 1422

Mechtley, M., Jahnke, K., Windhorst, R. A., et al. 2016, ApJ, 830, 156

Moreno, J., Torrey, P., Ellison, S. L., et al. 2019, MNRAS, 485, 1320

Nair, V., & Hinton, G. E. 2010, Proceedings of the 27th International Conference on Machine Learning (ICML-10), 807

Nelson, D., Springel, V., Pillepich, A., et al. 2019, Comput. Astrophys. Cosmol., 6, 2

Nevin, R., Blecha, L., Comerford, J., & Greene, J. 2019, ApJ, 872, 76

Noll, S., Burgarella, D., Giovannoli, E., et al. 2009, A&A, 507, 1793

Pawlik, M. M., Wild, V., Walcher, C. J., et al. 2016, MNRAS, 456, 3032

Pearson, W. J., Wang, L., Alpaslan, M., et al. 2019, A&A, 631, A51

Pierce, J. C. S., Tadhunter, C. N., Gordon, Y., et al. 2022, MNRAS, 510, 1163

Pillepich, A., Springel, V., Nelson, D., et al. 2018, MNRAS, 473, 4077

Predehl, P., Andritschke, R., Arefiev, V., et al. 2021, A&A, 647, A1

Reichard, T. A., Heckman, T. M., Rudnick, G., et al. 2009, ApJ, 691, 1005

Riccio, G., Yang, G., Malek, K., et al. 2023, A&A, 678, A164

Rodriguez-Gomez, V., Genel, S., Vogelsberger, M., et al. 2015, MNRAS, 449, 49

Rodriguez-Gomez, V., Snyder, G. F., Lotz, J. M., et al. 2019, MNRAS, 483, 4140

Sabater, J., Best, P. N., & Heckman, T. M. 2015, MNRAS, 447, 110

Salvato, M., Wolf, J., Dwelly, T., et al. 2022, A&A, 661, A3

Satyapal, S., Ellison, S. L., McAlpine, W., et al. 2014, MNRAS, 441, 1297

Selvaraju, R. R., Cogswell, M., Das, A., et al. 2016, arXiv e-prints
[arXiv:1610.02391]

Shabala, S. S., Deller, A., Kaviraj, S., et al. 2017, MNRAS, 464, 4706

Smethurst, R. J., Simmons, B. D., Lintott, C. J., & Shanahan, J. 2019, MNRAS, 489, 4016

Smethurst, R. J., Beckmann, R. S., Simmons, B. D., et al. 2023, MNRAS, 527, 10855

Snyder, G. F., Rodriguez-Gomez, V., Lotz, J. M., et al. 2019, MNRAS, 486, 3702

Somerville, R. S., & Davé, R. 2015, ARA&A, 53, 51

Springel, V., White, S. D. M., Tormen, G., & Kauffmann, G. 2001, MNRAS, 328, 726

Stalevski, M., Fritz, J., Baes, M., Nakos, T., & Popović, L. C. 2012, MNRAS, 420, 2756

Stern, D., Assef, R. J., Benford, D. J., et al. 2012, ApJ, 753, 30

Tanaka, M., Koike, M., Naito, S., et al. 2023, PASJ, 75, 986

Tang, S., Silverman, J. D., Yesuf, H. M., et al. 2023, MNRAS, 521, 5272

Toba, Y., Nagao, T., Strauss, M. A., et al. 2015, PASJ, 67, 86

Toomre, A., & Toomre, J. 1972, ApJ, 178, 623

Treister, E., Schawinski, K., Urry, C. M., & Simmons, B. D. 2012, ApJ, 758, L39

Tweed, D., Devriendt, J., Blaizot, J., Colombi, S., & Slyz, A. 2009, A&A, 506, 647

Urrutia, T., Lacy, M., & Becker, R. H. 2008, ApJ, 674, 80

Valiante, E., Smith, M. W. L., Eales, S., et al. 2016, MNRAS, 462, 3146

Villforth, C., Hamann, F., Rosario, D. J., et al. 2014, MNRAS, 439, 3342

Villforth, C., Hamilton, T., Pawlik, M. M., et al. 2017, MNRAS, 466, 812

Wang, L., Pearson, W. J., & Rodriguez-Gomez, V. 2020, A&A, 644, A87

Weigel, A. K., Schawinski, K., Treister, E., Trakhtenbrot, B., & Sanders, D. B. 2018, MNRAS, 476, 2308

Whitney, A., Ferreira, L., Conselice, C. J., & Duncan, K. 2021, ApJ, 919, 139

Wright, E. L., Eisenhardt, P. R. M., Mainzer, A. K., et al. 2010, AJ, 140, 1868

Wright, A. H., Hildebrandt, H., Kuijken, K., et al. 2019, A&A, 632, A34

Yang, G., Brandt, W. N., Vito, F., et al. 2018, MNRAS, 475, 1887

Yang, G., Boquien, M., Buat, V., et al. 2020, MNRAS, 491, 740

Yang, G., Boquien, M., Brandt, W. N., et al. 2022, ApJ, 927, 192

Yang, G., Caputi, K. I., Papovich, C., et al. 2023, ApJ, 950, L5

York, D. G., Adelman, J., Anderson, J. E., Jr, et al. 2000, AJ, 120, 1579

Zhou, B., Khosla, A., Lapedriza, A., Oliva, A., & Torralba, A. 2016, Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, 2921
# Appendix A: Examples of the best-fit SEDs from CIGALE

To illustrate what the SEDs look like for galaxies with different AGN fractions, we show some examples of the best-fit SEDs from CIGALE for galaxies with increasing $f_{AGN}$ in Fig. A.1.

# Appendix B: Example of CNN activation maps

Activation maps help visualise which regions of the input data are important for a particular feature (Selvaraju et al. 2016; Zhou et al. 2016). Higher values in the activation map indicate areas where the feature is present and give a larger contribution to the model to make a decision. Activation maps serve as a way to picture how features are detected and represented in different layers of the network, contributing to the interpretability and effectiveness of deep learning models. We show example activation maps, generated through the Gradient-weighted Class Activation Mapping algorithm (Grad-CAM; Selvaraju et al. 2016), for mergers and non-mergers for the TNG-CNN in Fig. B.1. Alongside the maps, we also provide the HSC i-band images given as input to the CNN to help interpret them. These maps confirm our expectations. In the case of mergers, it is clear that the model is focussing on possible close companions and asymmetric features in the central galaxy. For non-mergers, the model gives less weight to the central galaxy and gives a more uniform weight to the surrounding area.

# Appendix C: Examples of galaxies in the visually inspected test set

In this section, we show some examples of galaxies in the visually classified test set and how our classification scheme labels them. In Fig. C.1 we show 36 galaxies randomly selected from the visually inspected merger sample, 12 for each redshift bin. Generally speaking, there is a good agreement between the combined classifier and the visual labels. The model is able to correctly identify the most obvious mergers with prominent disturbances and tidal features. The classifier has some problems in identifying pre-mergers that do not show obvious merging signs. In Fig. C.2 we display 36 galaxies randomly chosen from the visually classified non-mergers. For the non-mergers, the CNNs classify correctly relatively isolated galaxies, while making some misclassifications when a nearby object is present.

# Appendix D: Optically selected quasars

Unobscured luminous AGNs can considerably contaminate the optical emission of the host galaxy. To understand how our classification algorithm performs in the presence of a bright central point source, we analyse separately optically selected luminous quasars in our sample, as they represent the brightest optical AGNs (thus more likely to affect our merger classification). We selected quasars from the Sixteenth Data Release of the SDSS Quasar catalogue (Lyke et al. 2020), using the IS_QSO_FINAL flag. We matched the SDSS coordinates with the HSC coordinates of our sample using a 1" radius. In total, we found 112 quasars, of which 41 were classified as mergers, 26 as non-mergers, and 45 as unclassified by our algorithm. Among the 112 optically-selected quasars, there were 111 SED AGNs, 58 MIR AGNs, and 91 X-ray AGNs. When restricting to the classified objects, we found 67, 36, and 54 SED, MIR, and X-ray AGNs, respectively. These numbers also reflect the good quality of our SED fitting.

In Fig. D.1 we show HSC i-band cutouts of quasars classified as mergers and non-mergers. Based on a visual inspection of the quasars classified as mergers, it is clear that optical quasars do not particularly impact the host galaxy morphology. As Ishino et al. (2020) and Tang et al. (2023) showed, the angular resolution, superior seeing, and depth of HSC make it suitable for studying type-1 quasar host galaxies at $z < 1$. The bright nucleus radiation is usually limited to a small number of pixels at the galaxy centre and the low noise level allows the detection of faint merging features in galaxy outskirts.

To ensure the robustness of our analysis, we also visually inspected the quasars classified as mergers and rejected those without any clear merging signs. These objects are highlighted with red edges in Fig. D.1. Then, we performed the same analysis as for the entire sample in Sect. 4. We plot the merger fraction versus the AGN fraction for this sample in Fig. D.2. The relation reveals the same trend as presented in Fig. 15. For all three AGN types, there is a mildly increasing $f_{merger}$ with increasing $f_{AGN}$ at $f_{AGN} < 80\%$. At $f_{AGN} \ge 80\%$, $f_{merger}$ quickly rises to ~ 80 – 100%. The same relation holds when considering the BHAR or AGN bolometric luminosity. To further test our results, we also analysed our sample by excluding all 67 classified quasars (the dashed black line in Fig. D.2). Once again, the results qualitatively do not change. However, the sample size of the AGN-dominated galaxies is significantly reduced in this case.

# Appendix E: Examples of galaxies with injected PSF

In Fig. E.1, we show examples of the Illustris TNG and Horizon-AGN galaxies with different levels of injected PSF. For each simulation, we show examples of mergers and non-mergers for every redshift bin. The original images without PSF are also shown as a comparison.
<figure><img src="image_19.png" /><figcaption>**Fig. A.1.** Example CIGALE best SED fits for galaxies with different AGN fractions (with increasing $f_{AGN}$ from left to right, and from top to bottom). Within each panel, the title lists the galaxy ID, redshift, reduced chi-squared, and $f_{AGN}$. The legend indicates the various SED components. The HSC i-band image is also shown, on an arcsinh inverted grey scale.</figcaption></figure>

<figure><img src="image_20.png" /><figcaption>**Fig. B.1.** Examples of HSC i-band images and corresponding activation maps of the TNG-CNN. The top row shows examples of mergers (images 1 to 3) and non-mergers (images 4 to 6) ordered in increasing z-bin. The bottom row shows the activation maps. The redder the pixel colour the more the CNN pays attention to that region. The HSC images are cut and resized as detailed in Sect. 2.3.</figcaption></figure>
<figure><img src="image_21.png" /><figcaption>**Fig. C.1.** Example HSC *i*-band cutouts of the visually classified mergers (z-bin 1: the first two rows; z-bin 2: the third and fourth row; z-bin 3: the last two rows). At the bottom of each image, we report the predictions from the TNG-CNN and Horizon-CNN. At the top of each image, we list the predicted class according to our final classification (Comb-CNN with two thresholds). The blue 'M' indicates mergers, while the red 'NM' indicates non-mergers. The images have an approximate physical size of 160 kpc, resized to 160 × 160 pixels and displayed with an arcsinh greyscale.</figcaption></figure>
<figure><img src="image_22.png" /><figcaption>Fig. C.2. Similar to Fig. C.1, but for visually classified non-mergers.</figcaption></figure>
<figure><img src="image_23.png" /><figcaption>**Fig. D.1.** Optically selected quasars classified as mergers (Top) and as non-mergers (Bottom) by our algorithm. At the top of each cutout, we list the galaxy redshift and the AGN fraction measured by CIGALE. We show the HSC PSF as a red circle. The dotted white circle corresponds to the SDSS PSF (with width set to 1.6"). Additionally, the galaxy mergers classified as non-mergers by visual inspection are highlighted with red edges. The cutouts are HSC i-band images with a physical size of 160 kpc and a logarithmic scaling.</figcaption></figure>
<figure><img src="image_24.png" /><figcaption>**Fig. D.2.** Same as Fig. 15 but for the sample of galaxies where quasars have been visually inspected. The dashed black lines indicate the trends obtained after excluding all 67 classified optical quasars. Left: Merger fraction $f_{merger}$ as a function of $f_{AGN}$. Right: $f_{merger}$ as a function of BHAR or the equivalent AGN bolometric luminosity $L_{disc}$. These trends are similar to the ones presented for the main sample in Fig. 15. The overall trends hold even if we exclude all quasars from our sample.</figcaption></figure>

<figure><img src="image_25.png" /><figcaption>**Fig. E.1.** Examples of randomly chosen TNG (upper three rows) and Horizon-AGN (lower three rows) galaxies with injected point sources corresponding to different PSF contributions. The four left columns are examples of non-mergers, while the right four columns show examples of mergers. The cutouts have a logarithmic scaling and have a physical size of 96 × 96 kpc (to better illustrate the PSF contribution).</figcaption></figure>