Nature versus Nurture: Revisiting the Environmental Impact on Star Formation Activities of Galaxies

We present a systematic study of the environmental impact on star formation activities of galaxies using a mass-complete sample of ∼170k galaxies at z < 4 from the latest COSMOS2020 catalog. At z < 1, we find that the mean star formation rate (SFR) of all galaxies decreases with increasing density of the environment. However, when we only consider star-forming galaxies, the mean SFR becomes independent of the environment at z < 1. At z > 2, we observe a clear positive correlation between the SFR and the density of the environment for all the galaxies. On the other hand, the stellar mass of the galaxies increases significantly with the environment at all redshifts except for star-forming galaxies at z < 1. The fraction of quiescent galaxies increases with increasing density of the environment at z < 2, and the morphology–density relation is confirmed to be present up to z ∼ 1. We also find that environmental quenching is negligible at z > 1, whereas mass quenching is the dominant quenching mechanism for massive galaxies at all redshifts. Based on these results, we argue that stellar mass-regulated physical processes might be the major driving force for star formation activities of galaxies. At low redshift (z < 1) massive galaxies are quenched primarily due to their high mass, resulting in a normal SFR–density relation. At high redshift (z > 2) most of the galaxies are star-forming ones tightly following the star-forming main sequence, and the difference in their stellar mass in different environments naturally leads to a reversal of the SFR–density relation.


INTRODUCTION
It is well known that galaxy formation and evolution is strongly affected by the local environments in which galaxies reside.In the local universe, cluster galaxies are often found to be ellipticals while late type galaxies such as spirals are mostly located in the low-density field.This is the so-called "morphology-density" relation which has been reported extensively in the literature (e.g., Dressler 1980;Dressler et al. 1997;Goto et al.Corresponding author: Ke Shi shike.astroph@gmail.com2003; Kauffmann et al. 2004).As early type galaxies are usually quiescent and late type galaxies are more actively forming stars, a "SFR-density" relation can be seen as a consequence.However, it is not clear whether the "SFR-density" relation found in the local Universe still holds in the distant Universe.
Observational evidence suggest that cluster galaxies formed most of their stars at early evolutionary stages and quenched rapidly afterwards (Stanford et al. 1998;Thomas et al. 2005;Snyder et al. 2012;Martín-Navarro et al. 2018), implying that the "SFR-density" relation may be reversed at high redshift (e.g., z > 1), such that starformation activities are elevated in denser environ- Shi et al. ments.While many studies have observed this reversal (e.g., Cucciati et al. 2006;Elbaz et al. 2007;Cooper et al. 2008;Tran et al. 2010;Koyama et al. 2013;Alberts et al. 2014;Shimakawa et al. 2018;Shi et al. 2020;Lemaux et al. 2022), there are also many cases where no obvious reversal were identified (e.g., Grützbauch et al. 2011;Scoville et al. 2013;Darvish et al. 2016;Malavasi et al. 2017).Others even found the same relation as in the local Universe (Patel et al. 2009;Muzzin et al. 2012;Chartab et al. 2020).The discrepancy in different studies highlights the importance of a systematic study of environmental dependence on galaxy properties, especially at high redshift.
In addtion to local environment, stellar mass can also have a huge impact on star-formation activities of galaxies, such as the presence of the star-forming 'main sequence' where more massive galaxies tend to have higher SFRs (e.g., Daddi et al. 2007;Elbaz et al. 2007;Noeske et al. 2007;Rodighiero et al. 2011;Reddy et al. 2012;Speagle et al. 2014;Salmon et al. 2015;Santini et al. 2017).Meanwhile, more massive galaxies are more likely to be quiescent as they consumed a significant portion of their available gas reservoirs for forming stars earlier in their history.Hence it is also important to study the effects of mass when considering the environmental effects.
While it is still under intense debate how galaxies cease their star-formation, almost all of the proposed quenching mechanisms can be categorized into two types generally known as "environmental quenching" and "mass quenching" (Peng et al. 2010).The former refers to external processes occur in dense environments such as ram pressure striping (e.g.Gunn & Gott 1972), strangulation (e.g., Larson et al. 1980;Balogh et al. 2000) and galaxy harassment (e.g., Moore et al. 1996).The latter is attributed to internal processes such as AGN and stellar feedback (e.g., Croton et al. 2006;Ceverino & Klypin 2009;Fabian 2012;Cicone et al. 2014) which usually correlate with stellar mass of galaxies.Although both mechanisms play crucial roles in quenching of galaxies, it seems that the relative importance of these mechanisms depends on the cosmic epoch and the mass range of galaxies considered (Darvish et al. 2016;Kawinwanichakij et al. 2017;Chartab et al. 2020).Studying how mass and environmental quenching evolve across cosmic time can provide us with invaluable information on the quenching processes and help us better understand the mechanisms driving galaxy formation and evolution ("nature" vs "nurture").
The Cosmic Evolution Survey (COSMOS) is currently one of the deepest multiwavelength survey (Scoville et al. 2007) that covers 2 deg 2 of the sky.Its large contiguous area and data depth makes it a perfect laboratory to study how galaxy properties are affected by environments.Darvish et al. (2016) first made use of the COSMOS UltraVISTA catalog (McCracken et al. 2012;Ilbert et al. 2013) to investigate possible environmental trends in the COSMOS field.Using a mass complete sample of ∼70k galaxies, they explored in detail the role of local environment of galaxies and their stellar mass on galaxy properties out to z ∼ 3. A decade has passed since the release of the COSMOS UltraV-ISTA catalog, and the latest COSMOS photometric catalog, COSMOS2020 (Weaver et al. 2022), marks a major improvement over the previous versions.Previous work that systematically investigated environmental effects on galaxies mostly limit their studies to z 3 (e.g., Darvish et al. 2016;Kawinwanichakij et al. 2017;Chartab et al. 2020), owing to the small sample size at higher redshifts.COSMOS2020 catalog includes ∼1,000k galaxies, among which > 30k galaxies are at z > 3, making it suitable to study enviromental trends at even higher redshifts than previous studies.On that account, it is meaningful to revisit the environmental impact on galaxy properties utilizing the COSMOS2020 catalog, which has much wider and deeper coverage along with larger data volumes than previous studies probed.
In this paper, we explore the environmental trends of galaxy properties using a mass-complete sample of galaxies at z < 4 from the COSMOS2020 catalog.This paper is organized as follows.In Section 2 we describe the data selected from the COSMOS2020 catalog, as well as the method used to define the local environments of galaxies.In Section 3 we present the results of environmental effects on galaxy properties at different redshifts.In Section 4 we discuss in detail the quenching efficiency driven by stellar mass and environment.We also discuss the possible quenching mechanisms, as well as the implication of the reversal of "SFR-density" relation found in our study.We summarize our results in Section 5. Throughout this paper we use the Planck cosmology from Planck Collaboration et al. (2016).All magnitudes are given in the AB system (Oke & Gunn 1983).Distance scales are given in comoving units unless noted otherwise.

DATA AND METHODS
In this section, we describe the data and sample selection in this work, as well as our methods of defining the environments of galaxies.

Data
This work is based on the COSMOS2020 photometric catalog (Weaver et al. 2022).Comparing with the previous version (Laigle et al. 2016), the new catalog includes ultra-deep optical data from Hyper Suprime-Cam (HSC) Subaru Strategic Program (SSP) PDR2 (SSP; Aihara et al. 2019), the deeper u * and new u band imaging from the Canada France-Hawaii Telescope (CFHT) program CLAUDS (Sawicki et al. 2019), the fourth Ul-traVISTA data release (Moneti et al. 2023) reaching one magnitude deeper in K S band over the entire area, and the inclusion of all Spitzer IRAC data in the COSMOS (Euclid Collaboration et al. 2022).
COSMOS2020 includes roughly 966,000 sources, yielding accurate measurements of photometric redshift as well as physical properties of galaxies.The catalogs are generated using two independent photometric methods for extracting sources.The CLASSIC catalog performs standard aperture photometry using SExtractor (Bertin & Arnouts 1996) on PSF-homogenized images for optical/near-infrared bands and utilizes IRA-CLEAN software (Hsieh et al. 2012) to perform photometry on Spitzer/IRAC images.The FARMER catalog, on the other hand, is produced using a new profile fitting method based on the source modelling code The Tractor (Lang et al. 2016).Although the two methods perform equivalently well and are in high agreement with each other, The FARMER is able to detect fainter and higher density of high-z sources which may be due to its ability to de-blend sources at fainter magnitudes (Weaver et al. 2022).In this work, we utilize The FARMER catalog since it provides more high-z sources which would benefit our study of environmental effects at high redshifts.
The FARMER catalog contains a total number of 964,506 sources.In order to have a deep and clean catalog, we use the flags that mask out bright stars and edges of the HSC and Suprime-Cam images, and also require to be in the UltraVISTA regions (i.e., FLAG COMBINED=0 in the The FARMER catalog).To separate galaxies from stars/AGNs, we also use the classification in the catalog (lp type=0) which is derived from the SED-fitting code LePhare (Arnouts et al. 1999;Ilbert et al. 2006) by combining morphological and SED criteria.This leaves us with a total number of 711,290 galaxies in the catalog.
We limit our study to galaxies at z phot < 4.This is because on one hand, the number of galaxies is too small for us to give a proper definition of the environment (for example, < 10k galaxies are at 4 < z < 5 and < 5k galaxies are at z > 5), considering the large field coverage of the COSMOS survey.On the other hand, the larger redshift uncertainties at higher redshifts also brings some difficulties in interpreting the results.Since the COSMOS2020 catalog used spectral energy distribution (SED) fitting method to derive the photometric redshifts with only optical-MIR data, the lack of FIRradio information would make it challenging to capture the full spectral range of the source accurately.It is possible that a lot of low redshift galaxies could be misidentified as high redshift sources due to confusion between Balmer break at lower redshift and Lyman break at higher redshift, which has already been noticed in some studies (e.g., Dunlop et al. 2007;Shi et al. 2019;Zavala et al. 2023).
We further test the robustness of the photometric redshift in the COSMOS2020 catalog using the COSMOS Super-deblended catalog (Jin et al. 2018) as ancillary data.This catalog includes 194,428 galaxies in the COS-MOS field with far-infrared to radio information.We cross match their catalog with ours using 1 ′′ radius, finding 118,128 matches.Among them, 1205 galaxies are at 4 < z < 5 in our catalog, in which we find 871 (72%) actually have IR-radio derived photometric redshift at z < 4.This means that majority of galaxies at 4 < z < 5 (derived from optical-MIR data) could actually be dusty galaxies at lower redshift.In contrast, for galaxies at 3 < z < 4 in the COSMOS2020 catalog, only ∼36% objects are at z < 3 in the Super-deblended catalog; for galaxies at 2 < z < 3 in the COSMOS2020 catalog, only ∼21% sources have IR-radio photometric redshift at z < 2. Thus to eliminate low-z contaminations as much as possible, we confine our study to galaxies at z < 4 in the COSMOS2020 catalog.
Lastly, recent observations have revealed a population of massive galaxies at z > 3, which are too faint to be detected in rest-frame UV-optical (Wang et al. 2019) or NIR (Yamaguchi et al. 2019).These massive galaxies are proved to be heavily dust-obscured starforming galaxies that are detected in the Atacama Large Millimeter/submillimeter Array (ALMA), as well as in the JWST NIRCam imaging (e.g., Barrufet et al. 2023;Nelson et al. 2023).In this sense, the COSMOS2020 catalog (based on UV-NIR data) could be highly incomplete at high-mass end beyond z > 3, therefore we caution the study of environmental effects on z > 3 galaxies although we still present their results in the following sections for a general comparison.COSMOS2020 catalog also classifies galaxies into two different types: star-forming and quiescent.Following Ilbert et al. (2013), quiescent galaxies are defined to have rest-frame colors M NUV − M r > 3(M r − M J ) + 1 and M NUV − M r > 3.1 in the NUV−r vs. r − J diagram.The stellar-mass completeness of the COS-MOS2020 sample is calculated in Weaver et al. (2022) with masses reported by LePhare considering magnitude limits of IRAC channel 1, based on the method described in Pozzetti et al. (2010).The mass completeness is determined for both star-forming galaxies and quiescent galaxies shown in Figure 20 in Weaver et al. (2022).Since the mass completeness limit increases with increasing redshift due to the selection effect, higher redshift samples would be strongly biased towards more massive galaxies compared to those at lower redshifts.The goal of this paper is to compare the environmental dependence of galaxy properties at different redshifts, accordingly it is important that we select galaxies in an unbiased way to further define the environments and to study galaxy properties.To this end, we adopt the mass completeness of the highest redshift bin studied in this work, which is 10 9.26 M ⊙ for star-forming galaxies and 10 9.64 M ⊙ for quiescent galaxies at z ≈ 4.This represents the low-mass limit of our sample.
Our final sample includes 173,339 galaxies, among which 17,045 are quiescent.We divide the whole sample into six redshift bins, and each bin contains at least ∼20k galaxies to ensure our results are not biased by small number statistics.The sample size of each bin is summarized in Table 1.The physical properties such as stellar masses, SFRs are derived via SED-fitting technique (optical-MIR) using LePhare in the COSMOS2020 catalog.We refer the readers to Weaver et al. (2022) for a detailed description of the methods.Last but not least, since the SFR estimates used here is based purely on optical-MIR data, it may not be that accurate in lack of FIR-submm information.In fact, many studies have revealed the prevalence of dusty star-forming galaxies at high redshift, especially in high-density environments (e.g., Casey 2016;Kato et al. 2016;Umehata et al. 2017;Harikane et al. 2019;Zhang et al. 2022).These massive dusty galaxies usually have extremely high SFRs and are generally invisible in rest-frame UV-NIR due to heavily dust obscuration.Thus for these galaxies the SFRs in this work might be significantly underestimated.Future work using FIR-submm data could give a more accurate estimate of the SFRs of these dusty star-forming galaxies (Jin et al. in preparation).Bearing that in mind, in the following sections, we explore the environmental impact on the physical properties of galaxies in detail.

Galaxy Environment Measurement
Galaxy environment is defined as the local density field in which that galaxy resides.In order to construct the density field of galaxies, one needs accurate redshift measurements first.Thanks to the state-of-art COS-MOS2020 catalog, we now have highly accurate photometric redshifts (photo-z) for several hundred thousands of galaxies that are selected in a consistent way.The photometric redshifts are derived using Lephare.The photo-z uncertainty is ∼ 0.01 − 0.02 at z < 1, increasing to ∼ 0.1 up to z ∼ 4 in The FARMER catalog.Taking the uncertainties of photo-z into account, we construct a series of narrow redshift slices and regard each slice as a 2D structure.The width of each slice is defined to be the median value of photo-z uncertainty ∆z = z max − z min at that redshift, where z max (z min ) is the upper (lower) limit (68% confidence level) of the best-fit photometric redshift.In the end, 81 slices are selected spanning from z = 0.1 to z = 4.We also note that the results of this paper are insensitive to the redshift slice we choose.In fact we have tried to set the redshift slice to a constant comoving size of 40 Mpc (e.g., ∆z ∼ 0.01 at z = 0.1 and ∆z ∼ 0.05 at z ∼ 4), and our main results in the following sections remain unchanged.
After deviding the whole redshift space into a number of redshift slices, we now have obtained a series of two-dimensional planes where we can perform density estimate for the galaxies in those planes.There are many ways to measure galaxy densities, such as using a fixed kernel (e.g., Hayashino et al. 2004;Lee et al. 2014;Malavasi et al. 2016;Harikane et al. 2019;Shi et al. 2019) or weighted adaptive kernels (e.g., Yang et al. 2010;Darvish et al. 2015;Chartab et al. 2020), or certain scale independent methods such as Voronoi tessellation (e.g., Darvish et al. 2015;Dey et al. 2016;Shi et al. 2021) or Delaunay tessellation (e.g., Marinoni et al. 2002;Darvish et al. 2015;Malavasi et al. 2021).Darvish et al. (2015) tested the performance of different density estimators in the COS-MOS field and found that the Voronoi tessellation and adaptive kernel smoothing outperform other methods.In this work, we use Voronoi tessellation to estimate the 2D density of galaxies.Voronoi tessellation is a non-parametric density estimator that has been widely used in astronomy field to detect both clusters (e.g., Ramella et al. 2001;Soares-Santos et al. 2011;Euclid Collaboration et al. 2019) and protoclusters (e.g., Dey et al. 2016;Shi et al. 2021;Brinch et al. 2023), which we briefly describe below.
A Voronoi tessellation is a unique way of dividing a 2D distribution of galaxies into convex cells, with each cell containing only one galaxy.The vertices of each cell are closer to that enclosed galaxy than any other in the entire plane.Based on this definition, the denser the regions, the smaller the cell area.As a consequence, the local density (f i ) of each cell can be measured as the inverse of the cell area (A i ): (1) To determine the relative density contrast of each cell, we calculate the average density ( fi ) of all the cells in the entire plane, and the density contrast (Σ) of each cell is then Σ = f i / fi .Note that some cells in the boarder area might be open, hence we exclude these cells in our calculation of the density values.
Figure 1 shows the evolution of density contrast Σ as a function of redshift.We see that Σ is almost independent of redshift, thus we are confident that our study of environmental effects in the following sections is not biased by the redshift evolution of density measurements.It is also noted that the median density contrast is smaller than 1.This is probably due to the fact that very high-density regions such as clusters strongly elevate the average density values.Since most galaxies are located in lower-density regions such as groups rather than clusters, their density values turn out to be smaller than the average.

RESULTS
Using the Voronoi tessellation technique described in the above section, we obtained the density field in each redshift slice.In this section, we study the environmental effects on galaxy properties as a function of redshift.

The Role of Environments on SFR, Stellar mass, and sSFR
The left panel of Figure 2 shows the mean SFR of all the galaxies in our sample as a function of the environments at different redshift bins.It is clear that in our lowest redshift bin 0.1 < z < 1, the mean SFR decreases with increasing density of the environments.This trend disappears as we go into higher redshift to 1 < z < 1.5.While at z > 2, there appears to be a positive correlation between the SFRs and the environments.To show possible correlation in a clearer way, we resort to Kendall's tau coefficient (KENDALL 1938), a non-parametric way to measure the strength of association between two variables1 .Table 2 shows Kendall's tau values for SFR and density contrast in each redshift bin.At z < 1, a significant negative correlation can be seen (p-value=0.002).There are no obvious correlations at 1 < z < 1.5 and 1.5 < z < 2 (p-value>0.05),but strong positive correlations are identified at higher redshift z > 2 (p-values<0.05).It is without doubt that we witness a reversal of 'SFR-density' relation at high redshift (z > 2).
Since our sample includes both quiescent and starforming galaxies, and it has been shown that different galaxy types could lead to different 'SFR-density' correlation at different redshifts (Darvish et al. 2016).Therefore on the right panel of Figure 2 we show the mean SFR as a function of the environment for starforming galaxies only.Most notably, at z < 1, the SFR tends to be independent of the environment for starforming galaxies (p-value=0.1).At 1 < z < 1.5 the SFR begins to increase with the density of environment (p-value=0.005).While at z > 1.5 there is no obvious difference in the 'SFR-density' relation between all galaxies and star-forming galaxies.As we see in Table 1, the fraction of quiescent galaxies drops dramatically beyond z > 1, therefore our sample at high redshift is dominated by star-forming galaxy population, whose SFRs increase with increasing density of the environments.On the other hand, the anti-correlation at z < 1 for all the galaxies is attributed to the enhancement of quiescent fraction at low redshift, which increases with increasing density of the environment.We will return to this topic in Section 3.2.
In hierarchical structure formation, dense environments provide favorable conditions for the growth of massive galaxies via various physical processes such as galaxy mergers and accretions (e.g., Kauffmann et al. 1993Kauffmann et al. , 2004;;Weinmann et al. 2006;Etherington et al. 2017).Therefore in principle stellar mass is also correlated with the density of the environment.We investigate the environmental dependence of stellar mass in Figure 3.The left panel shows the relation for all the galaxies while the right panel shows star-forming galaxies only.In both cases, we see a nearly monotonic increase in stellar mass with density contrast (see also Table 2).The only exception is star-forming galaxies at z < 1, where there appears to be no obvious trend (p-value=0.86).This discrepancy suggests that denser environments usually host more massive galaxies, which tend to be quiescent at z < 1.On the other hand, at z > 1, most of the galaxies are star-forming ones while they still follow the same positive trend, suggesting that they do not suffer much from the quenching mechanisms as those at z < 1.
The SFRs of galaxies are also known to be tightly correlated with their stellar masses, resulting in a star-forming 'main sequence' reported previously in the literature (e.g., Daddi et al. 2007;Elbaz et al. 2007;Noeske et al. 2007;Rodighiero et al. 2011;Reddy et al. 2012;Speagle et al. 2014;Salmon et al. 2015;Santini et al. 2017).As a consequence, the trends of SFRs we see in Figure 2 could actually be due to the change of stellar mass in different environments.We further consider the environmental dependence of specific star-formation rate sSFR (i.e., SFR/M ). Figure 4 shows the mean sSFR as a function of density contrast.For all the galaxies (left panel), a clear anti-correlation can be seen at z < 1, which is further confirmed by Kendall's tau test in Table 2.The trend is modest at 1 < z < 1.5 (p-value=0.05).At z > 1.5 sSFRs become independent of the environment, indicating a tight 'main-sequence' at high redshift regardless of the environment (Peng et al. 2010;Koyama et al. 2013;Darvish et al. 2014).As for star-forming galaxies (right panel), there is still a mild anti-correlation between the sSFR and the density contrast at z < 1 (p-value=0.03)but not as significant as all the galaxies in the left panel.While at z > 1 the trend for star-forming galaxies is almost identical to all the galaxies.These results indicate that quiescent galaxies are primarily responsible for the anti-correlation between sSFR and density of the environment at z < 1, that denser environments tend to host more passive galaxies at low redshift.On the other hand, at z > 1.5 galaxies are dominated by star-forming populations that follow the star-forming 'main sequence' independent of the environment.
To further separate the effects of mass on star formation activities of galaxies, in Figure 5 (left panel) we investigate the environmental trends of SFRs at fixed mass bins.Interestingly, we find that at different redshifts, the trends of SFRs are quite different for different mass bins.At 0.1 < z < 1, galaxies in the two highest mass bins (M > 10 10.7 M ⊙ and 10 10.2 M ⊙ < M < 10 10.7 M ⊙ ) tend to have lower SFRs than those in lower mass bins, contrary to the star-forming 'main sequence' seen in numerous studies.At M < 10 10.2 M ⊙ , the normal 'main sequence' reappears where more massive galaxies have higher SFRs.These clearly indicate that galaxies with high stellar mass (e.g., M > 10 10.2 M ⊙ ) are more quenched due to their internal processes (i.e., mass) even in the same environments, compared to their low mass counterparts.In addition, there are clear trends that the mean SFR decreases with increasing density of the environments for the two highest mass bins, implying the role of the environment in quenching massive galaxies.At 1 < z < 1.5 and 1.5 < z < 2, only galaxies in the highest mass bin have suppressed star-formation activities compared to lower mass ones.As we go for higher redshifts (z > 2), the 'main sequence' is seen once again, and the SFRs tend to be independent of the environments at fixed stellar mass.If we consider only star-forming galaxies (right panel), only galaxies in the highest mass bin (M > 10 10.7 M ⊙ ) are quenched up to z ∼ 2, though their level of quenching is much smaller than that in the left panel.
Combining the results from Figure 2-5, some insights can be gained regarding the environmental and mass dependence of star-formation activities.At z > 2 our sample is mainly composed of star-forming galaxies, for these galaxies, the higher stellar mass in denser environment (Figure 3) leads to an average higher SFR seen in Figure 5, which is reflected as the reversal of 'SFR-density' relation observed in Figure 2, possibly due to larger gas reservoirs or higher star-forming efficiency they have (e.g., Scoville et al. 2016;Wang et al. 2018;Scoville et al. 2023).Meanwhile at fixed stellar mass, SFRs are independent of the environments (Figure 5), leading to a flat sSFR-density relation in Figure 4.These results indicate that environmental quenching is negligible at z > 2. However, at z < 1, it is noted in Figure 5 that massive galaxies (M > 10 10.2 M ⊙ ) have already truncated their star formation compared to less massive ones even in the same environment, a clear signal of mass quenching.Again, as these massive galaxies tend to be located in high-density regions, we see the normal 'SFR-density' relation in Figure 2, which further leads to a clear anti-correlation between sSFR and environment in Figure 4. Meanwhile the SFRs of these massive galaxies decrease with increasing density of the environments, showcasing the effect of environmental quenching.At moderate redshifts (1 < z < 2), only the most massive galaxies (M > 10 10.7 M ⊙ ) have truncated their star formation (Figure 5), thus it may mark the transition epoch when the reversal of 'SFRdensity' is happening, as we see in Figure 2 where no clear trends are observed.
Based on the above arguments, we infer that stellar mass might be the major driving force for star-formation activities of galaxies while environments may merely act as a secondary role.We will further discuss in detail both mass and environmental quenching in Section 4.

The Role of Environments on Quiescent Fraction and Morphology of Galaxies
To further investigate the role of environments on galaxy quenching, in this section we study the quiescent fraction of galaxies as a function of the environment, as well as the environmental impact on the morphologies of galaxies.
Figure 6 (left) shows the fraction of quiescent galaxies (defined in Section 2.1) as a function of the environment.It is clear that the quiescent fraction is higher in denser environment, up until z < 2. This is most significant at lower redshift, for example, we see that quiescent fraction increases dramatically with the environment from ∼ 0.18 to ∼ 0.38 at z < 1.At higher redshift (e.g., z > 2) however, no obvious environmental dependence of quiescent fraction can be spotted (see also Table 2).This is consistent with the results from Section 3, where we observe a strong decline of starformation activities at z < 1 and a flat sSFR-density relation at z > 2. Our results are fully consistent with Kawinwanichakij et al. (2017) who investigated environ-mental and stellar mass effects in the FourStar Galaxy Evolution (ZFOURGE) survey at 0.5 < z < 2, finding a higher quiescent fraction in denser environments in the redshift range they probed.Similar results have been obtained by Darvish et al. (2016) where they found a clear positive correlation between quiescent fraction and environment at z < 2 but no trend was spotted at 2 < z < 3.
It is also noted that galaxies at lower redshifts tend to have a larger fraction of quiescent galaxies than those at higher redshifts.This is consistent with the "downsizing" scenerio (Cowie et al. 1996;Bundy et al. 2006;Fontanot et al. 2009), in which higher mass galaxies cease their star-formation earlier than lower mass systems.Since structures form in a hierarchical way, galaxies at higher redshifts are usually less massive and the overall star-formation rate density is also higher (Madau & Dickinson 2014), resulting in a lower quiescent fraction at high redshifts.
While "morphology-density" relation is well established in the local Universe and at low redshift (z < 1), Left: SFR as a function of density contrast at different redshift bins.In each density bin, the mean value of SFRs (after 3-σ clipping) is shown with errorbar denoting the standard deviation of the mean.Right: Same as the left, but for star-forming galaxies only.it is still an open question whether it holds at high redshift (z > 1).To this end, we take a further step to study the environmental dependence on morphology of the galaxies in the COSMOS field.We make use of Tasca Morphology Catalog (v1.1) (Tasca et al. 2009) which contains morphological information of 237,192 sources in the COSMOS field that have Hubble Space Telescope (HST) Advanced Camera for Surveys (ACS) observations (Leauthaud et al. 2007).The morphological parameters are estimated using the Morpheus code (Abraham et al. 2007).To transform morphological parameters into morphological classes, they first eyeballed a training set of ∼500 galaxies into early, spiral and irregular types, and performed machine learning technique to derive the types of remaining galaxies with the accociated morphological parameters.We cross-match Tasca catalog with our catalog using 1 ′′ radius, finding 83,779 counterparts.
Figure 6 (right) shows the fraction of early type galaxies (ETG) as a function of the environment.We see a significant positive correlation between the ETG fraction and the density of the environment at z < 1.On the other hand, no obvious environmental trend can be seen beyond z > 1 (see also Table 2).Our work suggests that the "morphology-density" relation holds at least till z 1, which is in agreement with many studies in the literature (Dressler et al. 1997;Goto et al. 2003;Kauffmann et al. 2004;Postman et al. 2005;Smith et al. 2005;Tasca et al. 2009).At low redshift (z < 1), the evolution of ETG fraction is generally consistent with that of the quiescent fraction.This is expected since early type galaxies usually have much lower SFRs than late type galaxies at low redshift, thus more likely to be quiescent.However, we note that in dense environments (log Σ > 0), the quiescent fraction seems to be larger than ETG fraction at z < 1, probably indicating that galaxies quenched their star-formation before the transformation of their morphologies.Although we do not find clear environmental effects on galaxy morphology at high redshift (z > 1) in this work, it should be noted that there have been many studies in recent years confirming the "morphologydensity" relation at high redshift in cluster envi-ronments (Newman et al. 2014;Sazonova et al. 2020;Mei et al. 2023;Strazzullo et al. 2023).For example, Sazonova et al. (2020) studied the morphology of galaxies in four clusters at 1.2 < z < 1.8 with HST imaging, finding two of them have enhanced fraction of bulgedominated galaxies.Mei et al. (2023) further studied 16 clusters at 1.3 < z < 2.8 with HST observations, revealing a strong correlation between local environment and ETG fraction.These studies imply that the "morphology-density" relation may already be in place in some dense cluster environments at higher redshift, showcasing the early environmental impact on galaxy morphology.The absence of "morphology-density" relation at z > 1 in our work could be due to the fact that COSMOS field does not host a large population of clusters, and our photometrically defined environment could dilute possible signals as discovered in the above spectroscopically confirmed clusters.In Section 3 we showed that the quenching of galaxies could be due to either environment or stellar mass, and it appears that stellar mass might be the dominant mechanism for galaxy quenching (Figure 4).In order to further quantify the efficiency of environment and stellar mass on quenching the star-forming activities in galaxies, we adopt the method introduced in Peng et al. ( 2010) (see also in Darvish et al. (2016), Kawinwanichakij et al. (2017) and Chartab et al. (2020)) to disentangle the effects of environment and stellar mass.
We define the environmental quenching efficiency, ε env , as the fraction of galaxies at a given stellar mass M that would be forming stars in low dense regions, but instead are quenched in high dense regions due to enviromental effects: where f q is the quiescent fraction of galaxies with stellar mass M and density contrast Σ at a given redshift z.Σ 0 is the density contrast of the low density environment, which we choose to be the lowest 25 percentage of the Σ distribution (Σ 25 ) as reference following Kawinwanichakij et al. (2017).We calculate environmental quenching efficiency for galaxies that are located in regions with Σ greater than the 75 percentile of the Σ distribution.
Similarly, mass quenching efficiency ε mass can be defined as: where M 0 is the lowest stellar mass at that redshift, which we choose to be in the range of 10 9.64 M ⊙ ∼ 10 9.84 M ⊙ (i.e., larger than 0.2 dex of the mass limit of quiescent galaxies).Following Kawinwanichakij et al. (2017), we calculate the mass quenching efficiency for galaxies with Σ smaller than 75 percentile of its distribution.We note our following results do not change if we tweak the values of M 0 or Σ.
Figure 7 (left panel) shows the environmental quenching efficiency as a function of stellar mass.We find that the environmental quenching efficiency is most prominent at low redshift (e.g., z < 1), where it increases dramatically with mass from ∼ 0.1 (10 9.9 M ⊙ ) to ∼ 0.4 (10 11.4 M ⊙ ).At z > 1, the environmental quenching efficiency is almost negligible (< 0.1).This result is in alignment with that in Section 3.1, where we see in Figure 4 that at z > 1 the SFRs are almost independent of the environments.
The right panel of Figure 7 shows the mass quenching efficiency as a function of stellar mass.Overall, mass quenching efficiency increases with cosmic time, in line with structure formation model.Unlike environmental quenching efficiency which is only relevant at z < 1, mass quenching efficiency increases significantly with stellar mass at all redshifts.At low redshifts (z < 1), mass quenching is smaller than environmental quenching for low-mass galaxies (e.g., M < 10 10 M ⊙ ).For instance, environmental quenching is ∼ 0.08 while mass quenching is ∼ 0.06 for galaxies of M = 10 9.9 M ⊙ .While for massive galaxies (M 10 10 M ⊙ ) mass quenching begin to dominate over environmental quenching.For example, at z < 1, environmental quenching efficiency is ∼ 0.3 while mass quenching efficiency is ∼ 0.4 at 10 11 M ⊙ .On the other hand, at z > 1 environmental quenching is 0.1 for all galaxies while mass quenching is already > 0.1 for galaxies with mass > 10 10.5 M ⊙ even in the highest redshift bin.
Our results suggest that mass quenching is the dominant quenching mechanism for massive galaxies (M 10 10 M ⊙ ) at all redshifts, whereas environmental quenching only takes effect at low redshift (z < 1) and only exceeds mass quenching for less massive galaxies (e.g., M 10 10 M ⊙ ).The results in this section reinforce our arguments in Section 3.1, that massive galaxies are primarily quenched by their mass rather than the environments at low redshifts.In this sense, the different "SFR-density" relations we observed at different redshifts could largely be attributed to the stellar mass.
Our result is in good agreement with Darvish et al. (2016), who also studied environmental effects in the COSMOS field using an early version of the COSMOS catalog.Due to the limited depth of their data, they only considered galaxies with z < 3 (73,481 in total), finding that environmental quenching is only prominant at low redshift (z < 1) for massive galaxies whereas mass quenching is the dominant quenching mechanism at z > 1.Similar results have been obtained by Kawinwanichakij et al. (2017) who showed that environmental quenching efficiency is minimal for low mass (M 10 10 M ⊙ ) galaxies at high redshift (z > 1.5), but increases rapidly with decreasing redshift, till it dominates over mass quenching for those less massive galaxies at z < 1.
Lastly, as shown in Figure 7 (left), environmental quenching does depend on stellar mass for massive galaxies at low redshift, which was also noticed in Darvish et al. (2016); Kawinwanichakij et al. (2017); Chartab et al. (2020).The two processes (internal and external) may actually be dependent on each other, thus it would be difficult to completely disentangle mass and environmental quenching.

The Possible Mechanisms of Galaxy Quenching
The physical processes that are responsible for galaxy quenching are still not well understood and in hot debate.Here we discuss several scenerios that may in part explain the cause of quenching we observed in this work.
In Figure 7 we see that at high redshift (z > 1), environmental quenching is almost negligible while mass quenching becomes prominent with increasing mass.McGee et al. (2014) proposed that internal outflows may play a major role in removing the gas from satellite galaxies in host halos.In this "over-consumption" model, satellite galaxies cease their growth by outflows produced from vigorous star-formation or AGN feedback, which rapidly exhaust the remaining gas reservoir ("starvation").The gas depletion time τ dep is proportional to the ratio of gas mass to star-formation rate (τ dep ∝ M gas /SF R).Since more massive galaxies usually have higher star-formation rate, given the same amount of gas, τ dep becomes shorter for more massive galaxies.In addition, this model also suggests that the quenching timescale is shorter (< 200 Myrs) at high redshift (z > 1.5) because of higher star formation rates (McGee et al. 2014;Balogh et al. 2016).
Therefore this "over-consumption" model could partly explain the quenching of massive galaxies at high redshift (z > 1).However, this mechanism cannot fully account for the quenching of satellites at very low redshift (z ≪ 1).At these redshifts, as star formation rates and associated outflow rates decline, McGee et al. (2014) predicted that the quenching time will reach ∼10 Gyrs, which is much longer than the dynamical time (Balogh et al. 2016).Therefore other internal processes such as AGN or stellar feedback may be responsible for quenching of low redshift galaxies.
As for environmental quenching, it is often thought that hydrodynamic process like ram pressure stripping is one likely candidate mechanism for the cause of quenching in dense environments such as galaxy clusters (e.g., Vollmer et al. 2001;Boselli & Gavazzi 2006;Boselli et al. 2022).What is more, many studies have found that ram pressure stripping becomes increasingly effective for low-mass satellite galaxies (M 10 8 M ⊙ ) (e.g., Slater & Bell 2014;Fillingham et al. 2016;Simpson et al. 2018;Boselli et al. 2022).Athough we can only probe galaxies with M 10 10 M ⊙ , the general trend in Figure 7 implies that environmental quenching would be more effective than mass quenching for low-mass galaxies (M 10 10 M ⊙ ).Therefore ram pressure striping might play a major role in quenching of low-mass galaxies.Aside from ram pressure striping, major mergers are also considered to be an important quenching mechanism (e.g., Springel et al. 2005;Gabor et al. 2010;Treister et al. 2012;Pontzen et al. 2017).As two gas-rich galaxies merge (which are expected to be more frequent in dense environments), the inflow of cold gas often trigers a starburst or an AGN, which can rapidly exhaust or heat the gas, and in turn quench the remnant galaxy.We conclude that "over-consumption" model is likely an effective internal quenching mechanism for massive galaxies at high redshift observed in this work.At low redshift however, external processes such as ram pressure stripping and galaxy mergers might become more efficient in halting the star formation of less massive galaxies.

Reversal of SFR-density Relation at High
Redshift?
In Section 3.1, we find clear evidence that the "SFRdensity" relation observed in local Universe is reversed at high redshift (z > 2), in a way that galaxies in denser environments tend to have higher star-formation rates.However, this reversal of "SFR-density" relation at high redshift is still controversial and different studies often yield different results.In this section we give a tentative comparison between different studies and discuss possible causes for the reversal discovered in this work.
Using an earlier version of the COSMOS catalog, Darvish et al. (2016) found that SFR and sSFR decrease with increaing density of the environment at z 1, but become almost independent of the environment at z 1.They argued that denser environments increase the fraction of quiescent galaxies at low redshift, leading to the "SFR-density" relation observed at z 1.The major difference between their work and ours is the "SFR-density" relation at high redshift, where we find a significant positive correlation at z 2. We argue that since denser environments generally host more massive galaxies, the higher SFRs of these massive galaxies can naturally result in the reversal of "SFR-density" relation at high redshifts.On the other hand, at low redshift (z 1) due to some mass quenching mechanisms, SFRs decline dramatically for those massive galaxies, leading to the observed "SFR-density" relation in the local Universe.
It should be noted that due to the limited depth of their data, the highest redshift sample (2 < z < 3) in Darvish et al. (2016) only reached a mass completeness of ∼ 10 10 M ⊙ .In comparison, our sample reaches ∼ 10 9.3 M ⊙ at that redshift.Thus the lack of low-mass galaxies in their sample could introduce a selection bias which affects the study of environmental trend.In Figure 7 we see that mass quenching is non-negligible for massive high redshift galaxies (from ∼ 0.1 at 10 10.3 M ⊙ to ∼ 0.2 at 10 10.8 M ⊙ ), as a result the massive galaxies in the highest redshift bin of Darvish et al. (2016) could severely suffer from mass quenching.Since they only used these massive galaxies to define the local environments, and more massive galaxies (more likely to be quiescent) prefer higher density regions, therefore they observed a flat "SFR-density" relation at high redshift.Alternatively, the larger photometric errors in their catalog could also dilute the possible signal.For instance, as we noted in Section 2.1, many high redshift galaxies selected in the COSMOS2020 catalog are actually found to be at low redshift with far-infrared to sub-mm data (Jin et al. 2018).The data Darvish et al. (2016) could suffer even more from this contamination due to larger photometric redshift uncertainties in the early version of COSMOS catalog (McCracken et al. 2012;Ilbert et al. 2013).As a consequence, these low redshift galaxies can possibly bias the the environmental trend by their lower SFRs, leading to a flat "SFRdensity" relation in their highest redshift bin.Chartab et al. (2020) explored the environmental effects of a mass-complete sample of ∼ 20k galaxies in the CANDELS field out to z ∼ 3.5, finding that the average SFR and sSFR both decrease with increasing density of the environments at all redshifts.Same issues as in Darvish et al. (2016), we note their sample only reached a mass completeness of 10 10.3 M ⊙ at 2.2 < z < 3.5.Therefore their sample could suffer even more from mass quenching than Darvish et al. (2016), leading to a normal "SFR-density" relation as in the local Universe.
The reversal of "SFR-density" relation at high redshift observed in our study is fully consistent with the work done by Lemaux et al. (2022), who found clear evidence of a monotonic increase in the SFR with increasing galaxy overdensity at 2 < z < 5 using spectroscopic observations from the VIMOS Ultra-Deep Survey (VUDS).They also found that stellar mass increases with increasing galaxy overdensity, in agreement with our study.They argued that the reversal of "SFRdensity" relation observed at high redshift is primarily driven by the fractional increase of massive galaxies in dense environments.Similar conclusion has been drawn from Momose et al. (2022), who noted that stellar mass might play a major role in the star-formation activities of galaxies in their reconstructed 3D density fields from galaxy and Lyα forest spectroscopy at 2 < z < 2.5 in the COSMOS survey.
Last but not least, the controversy in the "SFRdensity" relation in the literature could be due to selection effects, such as the dynamical state of the environment in the study.This is particularly the case in cluster or protocluster study, such that cluster environments automatically bias towards a normal "SFR-density" relation observed in the local Universe, while the reversal of SFR-density relation is often found in protocluster environments (e.g., Tran et al. 2010;Shimakawa et al. 2018;Shi et al. 2020) due to enhanced star-formation activities therein.
To conclude, although it is still an open question about the reversal of "SFR-density" relation at high redshift, we argue that the discrepancies of different studies could be due to selection bias as well as the different dynamical states of the environments probed.Future widefield surveys such as LSST (Ivezić et al. 2019) and Euclid (Amendola et al. 2018) could shed light on this topic and improve our understanding of the environmental impacts on galaxy formation.

SUMMARY AND CONCLUSION
In this paper, we probe the environmental effects on galaxy formation by utilizing the latest COSMOS2020 photometric catalog.After defining the environments by the Voronoi tessellation method, a mass-complete sample of 173,339 galaxies at 0.1 < z < 4 is selected to study the role of environments in the star-formation activities of galaxies.Our major results are summarized below.
1.At z < 1, galaxies exhibit decreasing SFR at increasing density of the environments in a statistic manner, consistent with the normal "SFR-density" relation observed in the local Universe.When consider only starforming galaxies, their mean SFRs become independent of the environment, indicating that dense environments increase the fraction of quiescent galaxies within.At 1 < z < 2 the mean SFRs become independent of the environments for all the galaxies.However at z > 2, there is a clear positive correlation between SFRs and environments.At almost all redshifts, the mean stellar mass of all the galaxies increases monotonically with the environments.The only exception is star-forming galaxies at z < 1, where no obvious correlation has been found, suggesting that denser environments tend to host massive quiescent galaxies at low redshift.
2. At z < 2, we find that the fraction of quiescent galaxies increases with increasing density of the environments, indicating that galaxies quench more rapidly in denser environments.Meanwhile, we show that the fraction of early type galaxies increases with increasing density of the environments at z < 1, confirming the presence of "morphology-density" relation at least up to z ∼ 1.
3. We find that environmental quenching is only relevant at low redshift (z < 1) but negligible at high redshift (z > 1).On the other hand, mass quenching is prominent for galaxies at all redshifts, which increases significantly with stellar mass.At low redshift (z < 1), mass quenching dominates over environmental quenching for massive galaxies (> 10 10 M ⊙ ).
4. The quenching of massive galaxies at high redshift could be partly explained by the "overconsumption" model, in which the gas reservoir is rapidly consumed by vigorous star formation.At low redshift however, dynamical processes such as ram pressure striping or mergers could partly be responsible for the quenching of less massive galaxies.
5. We argue that stellar mass might be the major driving force for star formation activities of galaxies.In general, galaxies in denser environments are more massive.At high redshift (z > 2), the sample is dominated by star-forming galaxies, among which more massive ones have higher SFRs, naturally resulting in a reversal of "SFR-density" relation.While at low redshift (z < 1), massive galaxies are drastically quenched due to some internal processes (i.e., mass quenching), which leads to declined SFRs with the environments.The discrepancy of the "SFR-density" relation observed in different studies might be attributed to sample bias or different dynamical states of the environments probed.

Figure 1 .
Figure 1.Density contrast as a function of redshift.The shaded areas show the distribution of galaxies.The median values of density contrast in each redshift bin are shown with errorbars denoting standard deviations.The histogram of density contrast is also shown where the red line denoting the median value of all galaxies.
Figure 2.Left: SFR as a function of density contrast at different redshift bins.In each density bin, the mean value of SFRs (after 3-σ clipping) is shown with errorbar denoting the standard deviation of the mean.Right: Same as the left, but for star-forming galaxies only.

Figure 3 .
Figure3.Left: Stellar mass as a function of density contrast at different redshift bins.In each density bin, the mean value of stellar mass (after 3-σ clipping) is shown with errorbar denoting the standard deviation of the mean.Right: Same as the left, but for star-forming galaxies only.

Figure 4 .Figure 5 .
Figure 4. Left: sSFR as a function of density contrast at different redshift bins.In each density bin, the mean value of sSFRs (after 3-σ clipping) is shown with errorbar denoting the standard deviation of the mean.Right: Same as the left, but for star-forming galaxies only.

Figure 6 .
Figure 6.Left: Quiescent fraction as a function of density contrast at different redshift bins.The errorbar denotes the Poisson error.Right: The fraction of early type galaxies as a function of density contrast at different redshift bins.The errorbar denotes the Poisson error.

Table 1 .
Properties of the mass complete sample

Table 2 .
Kendall's tau values for all the galaxies at different redshifts Note-Kendall's tau values are given for all the galaxies in each redshift bin for SFR, stellar mass, sSFR, Quiescent fraction and ETG fraction respectively, with corresponding p-values in parentheses.Values close to 1 indicate strong concordance (i.e., positive correlation) while values close to -1 indicate strong discordance (i.e., negative correlation).Small p-values (e.g., < 0.05) indicate significant association between two variables.
The environmental quenching efficiency as a function of stellar mass.The errorbar denotes the Poisson error.Right: Same as the left, but for mass quenching efficiency.