The Boundary of Cosmic Filaments

For decades, the boundary of cosmic filaments has been a subject of debate. In this work, we determine the physically motivated radii of filaments by constructing stacked galaxy number density profiles around the filament spines. We find that the slope of the profile changes with distance to the filament spine, reaching its minimum at approximately 1Mpc at z = 0 in both state-of-the-art hydrodynamical simulations and observational data. This can be taken as the average value of the filament radius. Furthermore, we note that the average filament radius rapidly decreases from z = 4 to z = 1, and then slightly increases. Moreover, we find that the radius of the filament depends on the length of the filament, the distance from the connected clusters, and the masses of the clusters. These results suggest a two-phase formation scenario of cosmic filaments. The filaments experienced rapid contraction before z = 1, but their density distribution has remained roughly stable since then. The subsequent mass transport along the filaments to the connected clusters is likely to have contributed to the formation of the clusters themselves.


INTRODUCTION
The origin and evolution of cosmic structures are central issues in the ΛCDM cosmological model.According to standard structure formation theory, the structures we observe today began as minor fluctuations in the early universe that were subsequently amplified by gravitational instability.Observations (de Lapparent et al. 1986;York et al. 2000;Colless et al. 2001) and simulations (Springel et al. 2005;Vogelsberger et al. 2020;Nelson et al. 2015;Springel et al. 2018;Nelson et al. 2019) have revealed the presence of a web-like arrangement of matter in the current universe, known as the cosmic web (Bond et al. 1996).This web can be thought of as being composed of four components: clusters, filaments, walls, and voids.
A significant portion of cosmic matter is found in the filaments (Aragón-Calvo et al. 2010b,a;Cautun et al. 2014), and there is a growing consensus that they play a major role in the formation and evolution of galaxies.This influence is evident in various properties ⋆ E-mail: pwang@shao.ac.cn † E-mail: guohong@shao.ac.cn of galaxy, including their mass, shape (Kuutma et al. 2017), star formation rate (Kuutma et al. 2017), spatial alignment (van Haarlem & van de Weygaert 1993;Aragón-Calvo et al. 2007;Hahn et al. 2007;Zhang et al. 2009;Forero-Romero et al. 2014), abundance of satellite galaxies (Guo et al. 2015b), and correlation of angular momentum (Aragón-Calvo et al. 2007;Hahn et al. 2007;Codis et al. 2012;Trowland et al. 2013;Dubois et al. 2014;Zhang et al. 2015;Wang & Kang 2017;Wang et al. 2018a,b).Several different algorithms have been developed to identify filaments based on the distribution of galaxies.However, most algorithms have limitations in extracting spatial information and describing filaments as one-dimensional structures without considering their radial extent (Libeskind et al. 2018).Without a clear understanding of the boundary of filaments, it is difficult to quantify how filaments affect the properties of the galaxy (Malavasi et al. 2017;Laigle et al. 2018;Kraljic et al. 2018;Sarron et al. 2019).
The density profiles of mass or galaxy number around the spines of filaments have been investigated in both observations and simulations (Colberg et al. 2005;Dolag et al. 2006;Aragón-Calvo et al. 2010b,a;González & Padilla 2010;Bond et al. 2010;Cautun et al. 2014;Bonjean et al. 2020;Galárraga-Espinosa et al. 2020;Tanimura et al. 2020).These density profiles can be fitted with various functional forms, such as power or exponential laws, to determine the scale radii that describe the typical sizes of filaments.However, the resulting radii can range from 0.1 Mpc to 10 Mpc, depending on the fitting functions used.On the other hand, observations (Wang et al. 2021) and simulations (Xia et al. 2021) have also observed the spin of filaments, with the rotation curves peaking approximately 1 Mpc from the filament spine and then decreasing to zero approximately 2 Mpc.This suggests that filaments may have a physical radius of around 1 Mpc to 2 Mpc, which is also commonly adopted as the typical size of filaments (Colberg et al. 2005).Having a well-defined physical radius for filaments would then greatly enhance our understanding of their formation and evolution.

DATA
This study is based on observed galaxy samples in the local universe, and these observations are compared to the results of advanced hydrodynamical simulations.The following sections will provide a summary of the data, the sample selection process, the algorithm used to identify filaments, the definition of the filament radius, and the estimation of errors.

Observational data
We adopted two galaxy catalogues obtained from the Sloan Digital Sky Survey (SDSS; York et al. 2000).One of the catalogues is derived from the New York University Value-Added Galaxy Catalogue (NYU-VAGC; Blanton et al. 2005) of SDSS Data Release 7 (Abazajian et al. 2009), while the other is obtained from the galaxy group catalogue (Tempel et al. 2017) constructed using SDSS Data Release 12 (Alam et al. 2015).The SDSS covers a large area that spans more than a quarter of the sky, providing comprehensive imaging, photometric, and spectroscopic data for a dense sample of galaxies.This allows for a statistically robust analysis of cosmic filaments.Both catalogues comprise approximately 600,000 galaxies with spectroscopic redshifts ranging from 0.01 to 0.2.In the NYU-VAGC catalogue, the galaxy redshifts are not corrected for redshift space distortion (RSD), whereas in the galaxy group catalogue, this correction is properly accounted for.For the RSD correction, each galaxy in the group catalogue is first assigned to a group identified with a modified Friends-of-Friends halo finder (FoF; Huchra & Geller 1982;Davis et al. 1985;Springel et al. 2001;Dolag et al. 2009), and then the galaxy positions along the line-of-sight are corrected using the radial velocity dispersion of the group and the group size on the sky plane (see details in Appendix C of Tempel et al. 2014).It is demonstrated in Tempel et al. (2017) that the RSD effect is reasonably removed with such a procedure.

Numerical simulations
For our numerical simulation sample, we used the galaxy catalogue of the MillenniumTNG project (MTNG; (Hernández-Aguayo et al. 2023;Kannan et al. 2023;Pakmor et al. 2023)).The cosmological parameters adopted by MTNG were taken from the Planck Collaboration (Planck Collaboration et al. 2016), which included Ω m = 0.3089, Ω Λ = 0.6911, Ω b = 0.0486, and h = 0.6774.We used the hydrodynamical run with the largest box size, MTNG740, which has a box size of (500 cMpc/h) 3 or ( 738.1cMpc) 3 , identical to the Millennium simulation (Springel et al. 2005), apart from differences in the cosmological parameters.The MTNG run contained 4320 3 dark matter particles and 4320 3 initial gas cells, with mass resolutions of 1.7 × 10 8 M ⊙ and 3.1 × 10 7 M ⊙ , respectively.The Friends-of-Friends algorithm (FoF; Huchra & Geller 1982;Davis et al. 1985;Springel et al. 2001;Dolag et al. 2009) was first applied to dark matter particles, and then the corresponding baryonic matter was assigned to the same groups as the closest dark matter particle, followed by an application of the SUBFIND-HBT (Springel et al. 2021) substructure finder.The galaxy positions were determined by the most bound particle of each subhalo.

Sample selection
Taking into account the flux limits of SDSS galaxy samples (Brinchmann et al. 2004;Taylor et al. 2011) and the mass resolution of the MTNG simulation, we only selected galaxies with a stellar mass greater than 10 9 M ⊙ for this study.To investigate the effect of RSD, we selected the same set of galaxies in the two SDSS catalogues with and without RSD corrections.We focus only on galaxies more massive than 10 9 M ⊙ in the redshift range of 0.01 < z < 0.1.The final two SDSS catalogues, labelled as SDSS(non-RSD) and SDSS(RSD), contain 261,354 galaxies.To further account for the incompleteness of low-mass SDSS galaxies, we calculate the galaxy number density profile in SDSS by weighting each galaxy by 1/V max , where V max is the maximum accessible volume for each galaxy as determined in the NYU-VAGC catalogue (Blanton et al. 2005).
At redshift z = 0, the MTNG contains a total of 3,083,441 galaxies with a stellar mass greater than 10 9 M ⊙ .To account for the RSD effect, we used a plane-parallel approximation with the line of sight (LOS) along the ẑ direction.The positions of galaxies along the ẑ direction were further distorted by their corresponding peculiar velocity, v ẑ.The MTNG samples with and without the RSD effect are denoted as MTNG(non-RSD) and MTNG(RSD), respectively.To consider the effect of different mass thresholds , we adopt the mass range from 10 8.5 M ⊙ to 10 10 M ⊙ at z=0 and z=4 in MTNG and z=0 in SDSS.For details, we refer readers to the Figure 7 in Section 5.

Filament finder
We used the Discrete Persistent Structures Extractor (hereafter DisPerSE; Sousbie 2011; Sousbie et al. 2011) -one of the most widely used cosmic web finders -to identify cosmic filaments in this study.To extract the filaments using DisPerSE, we first estimate the underlying density field using the Delaunay tessellation field estimator (hereafter DTFE, Schaap & van de Weygaert 2000;van de Weygaert & Schaap 2009) by tracing the density field with a galaxy distribution instead of a matter distribution, due to the observationdriven approach.The DTFE densities are then smoothed once by the average density of the surrounding vertices of a given vertex by applying the netconv function to reduce the contamination of the shot noise.Lastly, filaments are identified using the mse function in the DTFE density field.The mse function identifies the critical points where the density gradient vanishes.Filaments are sets of segments connecting maximum-density critical points to saddles along the density field's ridges.The persistence significance level of filaments can be controlled by adjusting the ratio of the density of the two critical points in the pair (Sousbie 2011;Sousbie et al. 2011).
The effects of different DisPerSE parameters have been carefully investigated in literature (see e.g., Malavasi et al. 2020a,b;Galárraga-Espinosa et al. 2024).We follow the fiducial parameters suggested by Galárraga-Espinosa et al. (2024) to extract the filaments.In summary, we apply a one-time smoothing of the DTFE density field and set the persistence significance level at 2σ .For the sake of fair comparisons among all the data in this paper, we adopt the same parameters to identify filaments in both real and redshift spaces.The "filament" defined in DisPerSE connects the maximum point (density peak) or bifurcation point (the cross point of two filaments) and the saddle point of the density along the direction of the density gradient.We follow the strategy of Malavasi et al. (2020a) and treat the bifurcation points as nodes, since they can be considered as unresolved clusters.After the extraction, we apply a final smoothing for the extracted skeleton to eliminate the effect of shot noise (Malavasi et al. 2020a,b).We then combine two such filaments that share the same saddle point into a single one to ensure that the filaments connect the nodes.We refer the readers to Sousbie (2011) for more details.With the lower stellar mass threshold of 10 9 M ⊙ , we found 9,839 and 5,758 filaments in the SDSS(non-RSD) and SDSS(RSD) samples, respectively.Similarly, in the MTNG(non-RSD) and MTNG(RSD) samples, we found 138,737 and 80,384 filaments, respectively.

Definition of filament radius
Analogous to the definition of the splashback radius of a dark matter halo (Adhikari et al. 2014;Diemer & Kravtsov 2014, 2015;More et al. 2015), we can determine the physical filament radius from positions with the lowest logarithmic gradient in the galaxy number density profile around the filament spines.As in previous studies (Galárraga-Espinosa et al. 2020, 2024;Yang et al. 2022), we construct the number density profiles of galaxies around filament spines by counting galaxies in hollow cylindrical shells of increasing radii.The average galaxy number density profiles are then obtained by stacking the measurements for all filament segments.To ensure that the resulting galaxy number density profile is not influenced by nodes, we exclude filament segments that are within 2 Mpc of any nodes (i.e. the distance to the end point of filament) identified in DisPerSE.Although the galaxy density profiles around the filaments would be affected by the different choices of DisPerSE parameters and the stacking method, we verify that our derived filament radius is not significantly affected, which makes it robust to the adopted parameters.Detailed tests are presented in Appendix C.

Error estimation
Throughout this paper, we estimate the errors of the galaxy number density profiles using the jackknife resampling technique in both simulation and observational data (Guo et al. 2015a).In detail, we divide the SDSS galaxies into 32 subvolumes with the same sky area and divide the MTNG galaxies into 32 subboxes of equal volume.The error σ ρ on the galaxy density profile ρ can then be estimated as follows, where N = 32 is the number of jackknife subsamples and ρ i is the galaxy density profile measured for the i-th subsample.

ANALYSIS & RESULTS
This paper investigates cosmic filaments, which can be thought of as thin and elongated cylinders or curvilinear structures, identified from the galaxy distribution using the popular filament finder DisPerSE (Sousbie 2011;Sousbie et al. 2011).In essence, the DisPerSE approach identifies "critical points" (in the Morse theory sense) as locations where the gradient of the density field vanishes, and connects these to identify ridges or filaments.The framework allows the number of galaxies in each cylinder shell to be counted as a function of the distance from the filament spine, known as the galaxy number density profile (Galárraga-Espinosa et al. 2020, 2024;Yang et al. 2022).Since the absolute number of galaxies depends on the redshift and simulation resolution, the number density relative to the background number density provides a more meaningful representation of the local environment.The background number density is obtained simply by dividing the total number of galaxies by the volume.
This study focuses on two sets of galaxy catalogues, one obtained from observation and the other from simulation.The analysis of cosmic filaments begins with a publicly available galaxy group catalogue (Tempel et al. 2017) derived from the Sloan Digital Sky Survey (SDSS) Data Release 12 (Alam et al. 2015).It is worth mentioning that the redshift space distortion (RSD) effect in this catalogue has been reasonably corrected, enabling an easier comparison with the simulation results in real space.The theoretical predictions are then examined using the MTNG with a volume of approximately 740 3 Mpc 3 .The evolution of the filament radius is investigated in this simulation.All the filament radii in the following sections are in comoving units.

Filament Radius at z = 0
The upper panels of Figure 1 show the average radial profiles of the galaxy number density distribution around the filaments, ρ(d fil )/ρ 0 , for both SDSS (left panel, 0 < z < 0.1) and MTNG (right panel, z = 0) using galaxies with stellar masses of M * > 10 9 M ⊙ (see Figure 7 for the dependence on the stellar mass threshold).ρ 0 is the background galaxy number density above the stellar mass cutoff and d fil is the perpendicular distance from the filament spines.It is evident that the number density of galaxies close to filaments is much higher than the average cosmic density, with the central region of the filament having a density more than 50 times higher than the background.As one moves away from the spine of the filaments, the density gradually decreases, although the rate of decrease is not uniform at different distances, in agreement with previous studies also using the TNG set of simulations (Galárraga-Espinosa et al. 2020, 2024).
In principle, the logarithmic slope of the number density profile, γ ≡ d log ρ/d log d fil , depends on the concentration of matter within the filaments.The variation of γ with d fil indicates how fast the galaxy number density would decrease away from the filament spines.This is analogous to the slope of the matter density profile of dark matter haloes.The radius corresponding to the minimum of the dark matter radial density gradient is proposed to be a physically motivated halo boundary (Diemer & Kravtsov 2014, 2015;More et al. 2015), known as the splashback radius where dark matter particles reach the apocenters of their first orbits.Similarly, we can essentially use the slope γ to define the average filament radius, where the value of d fil with the minimum γ can be seen as the effective radius of the filaments.However, we caution that the structure of filament is not .Upper panels: the relative number density profile of galaxies around their host cosmic filaments, ρ/ρ 0 , as a function of the perpendicular distance to the filament spine, d fil , where ρ 0 is the background density of galaxies above a threshold mass of 10 9 M ⊙ in the sample.The colour symbols with error bars are measured from SDSS (left) at 0 < z < 0.1 and MTNG (right) at z = 0, respectively.The errors are measured from the Jackknife resampling method of 32 subsamples with equal volumes.Solid black lines show the best-fitting models using the MCMC method.Bottom panels: The logarithmic slope of the number density profile, γ ≡ d log ρ/d log d fil , derived directly from the best-fit profile shown in the upper panels.The mean values of the filament radius are represented by vertical dashed lines (0.81 Mpc for SDSS and 0.98 Mpc for MTNG), while the shaded area illustrates the 16th to 84th percentile range obtained from the MCMC chains.
fully virialized as in the case of dark matter halos.We will explore the physical meaning of such a definition in our future work.
To accurately determine the logarithmic slope γ, we fit a sixthorder polynomial function to log(ρ/ρ 0 ), which is represented by the solid black line in the upper panel of Figure 1.We find that the choice of sixth-order polynomials efficiently reduces the noise in the profile of ρ(d fil ) without affecting the actual values of γ (see detailed tests in Appendix A), similar to the method used in previous studies focusing on haloes (Diemer & Kravtsov 2014).We then apply the Markov Chain Monte Carlo (MCMC) method to explore the parameter space.The slope γ(d fil ) is then derived from the best-fitting function, as shown in the bottom panels of Figure 1.We observe that γ reaches its minimum at approximately d fil ∼ 1 Mpc, the scale that we define as the average radius of the filament (R fil ).The scatter of the filament radius is determined from the 16th and 84th percentile ranges of the MCMC chains.This value of R fil is similar to the com-mon rough estimate of filament sizes in the literature (Colberg et al. 2005;Aragón-Calvo et al. 2010b;Bond et al. 2010;González & Padilla 2010;Cautun et al. 2014), but here we derive it precisely from the number density distribution profiles.We emphasise that the minimal γ is around −1.7, which is not as steep as the halo density profile at the splashback radius (around −3).This implies that the edges of the filaments are not as sharp as those of haloes.

Effect of Redshift Space Distortion
The spatial distribution of galaxies can be influenced by RSDs, which alter the galaxy number density profile around filaments.To quantify this effect, we also measure R fil with the RSD-included ρ(d fil ) in MTNG.We assumed a plane-parallel model with the ẑ direction as the line of sight (LOS) and we changed the galaxy positions along the ẑ direction using the peculiar velocity of the LOS v ẑ.The results are shown in Figure 2. The galaxy density profiles and the corresponding slopes are shown in the Appendix B. Additionally, we determined the filament radius in the same manner for the observed galaxy samples of SDSS, but without applying the RSD correction.This allows us to compare the impact of RSD on the determination of the filament radius.
The measurements of R fil in real and redshift spaces in MTNG are consistent with the observations from SDSS, suggesting that the MTNG simulation accurately represents the distribution of galaxies around filaments.Inclusion of RSDs causes the radius of the filament to increase from 1 Mpc in the real space to approximately 2 Mpc in the redshift space.On smaller scales, the RSDs result in the elongation of galaxy distributions along the LOS, a phenomenon known as the Fingers-of-God effect.As a result, the observed filaments in redshift space also appear thicker.Additionally, the number of filaments identified in SDSS decreases significantly from 9,839 in the non-RSD sample to 5,758 in the RSD sample, representing a decrease of approximately 42%.Similarly, the corresponding numbers for MTNG are 138,737 (non-RSD) and 80,384 (RSD), respectively.This reduction in the number of filaments occurs primarily in short filaments with lengths of a few Mpc, as the identification of these filaments is strongly influenced by RSD.

Evolution of Filament Radius
Although we lack observational data in a broad redshift range to quantify the evolution of the filament boundary, we can investigate the trend of R fil with redshift using MTNG.Figure 3 displays the redshift evolution of ρ(d fil ), γ(d fil ) and R fil in MTNG from left to right, respectively.The number of galaxies and filaments in each redshift are listed in Table 1.It is evident that filament formation has gone through two stages: a rapid radial collapse before z = 1 and a slower growth along the radial direction afterward.The median filament radius R fil decreases from approximately 2.5 Mpc at z = 4 to 0.8 Mpc at z = 1, representing a 78% decrease in only 4.4 Gyrs.In the following 7.9 Gyrs from z = 1 to z = 0, the median R fil only increases from 0.8 to 1 Mpc.Furthermore, the slope γ at R fil decreases from z = 4 to z = 1, sharpening the edges of the filaments.
The development of filaments is accompanied by the accumulation of matter towards the filament spines, which is demonstrated by the considerable increase in the number density of galaxies within the filaments as the redshift decreases (left panel of Figure 3), in agreement with Galárraga-Espinosa et al. ( 2024).The galaxy number density profile becomes quite consistent since the formation of filaments around z = 1.This suggests that the structure of cosmic filaments was formed essentially around z = 1.

Dependence on Filament Length
The length of a filament is an important factor in addition to its radius.It has been demonstrated that shorter filaments tend to have a higher galaxy number density, are located in denser environments, and are connected to more massive objects (Galárraga-Espinosa et al. 2020, 2022).Therefore, it is crucial to understand how the radius of the filament varies with its length.We divide the filaments into three groups of equal size according to their lengths and present the evolution of their radii in Figure 4. We obtain consistent filament profiles in different lengths with Galárraga-Espinosa et al. ( 2020), i.e. the shorter filaments typically have higher amplitudes of density profiles than longer ones.The evolutionary patterns observed for filaments of different lengths are quite similar, but longer filaments generally have relatively larger R fil (that is, they are thicker) than shorter filaments before z = 1.Since z = 1, the radius of long filaments is roughly constant (right panel), while the median radii for short filaments are slightly increased (left panel) for z < 1.This means that the weak growth of the radius of the filament shown in Figure 3 is mainly driven by the shortest filaments.This phenomenon is likely attributed to the fact that short filaments are embedded in denser environments (Galárraga-Espinosa et al. 2020, 2022), facilitating easier matter accretion and growth.
This increase in the filament radii of the short filaments is probably due to the accretion of matter near the nodes (Bond et al. 1996;Libeskind et al. 2014;Kang & Wang 2015;Odekon et al. 2022).To investigate this, Figure 5 shows the dependence of the filament radius R fil on the distance to the nearest cluster D cluster (left panel) and the further dependence on the cluster mass by dividing the connecting clusters into high and low mass halves (right panel).The identification of clusters at the end points of the filaments is provided by DisPerSE.We only consider the effect of clusters on the filament radius starting from a distance of 1 Mpc from the cluster/node centres, which is approximately the halo virial radius of cluster galaxies.We calculate D cluster for each filament segment as the distance from the segment centre to the nearest node.The median radii of the filaments increase toward the clusters, with a growth of around 30% from a distance of 3 Mpc to 1 Mpc.The right panel of the figure reveals that the increase in R fil is even more pronounced for more massive clusters, although consistent within the error bars.
Based on Zel'dovich's theory (Zel'dovich 1970) and the dynamics of mass flow within the cosmic web (Icke 1991;Cautun et al. 2014), the cosmic web developed in a hierarchical manner.Initially, matter   collapses along the direction of the fastest compression to form extensive cosmic walls.Subsequently, matter flows along the second compression direction, which is within the plane of the wall, to create filaments.The mass flows along the filament direction leading to the final formation of massive clusters.It is crucial to understand that the collapse happens in all three directions at the same time, rather than one after the other, with different collapsing speeds.It is clear from our results that the filaments are basically formed around z = 1 and the formation of the clusters is supported by the flow of matter along the filaments since z = 1 (Cautun et al. 2014).
In Figure 6, we depict the development of a cluster and its neighboring filaments.At z = 3, the proto-cluster was connected by a few long filaments and many more short ones.We emphasize some fil-aments with blue (for long filaments) and red (for short filaments) dotted lines to indicate their boundaries.The two long filaments collapsed to form stable structures from z = 3 to z = 1, maintaining similar filament radii since z = 1.The formation of the central cluster accelerated significantly from z = 1 to z = 0 after the stable filaments formed, which supports our previous conclusions.The short filaments around the cluster evolved much more dramatically from z = 3 to z = 0. Their collapse is still evident from z = 3 to z = 2, and the subsequent expansion of their boundaries with the cluster formation is also visible in the figure.Some short filaments merged to become relatively longer filaments, while others merged into the central cluster.Thus, the short filaments at z = 0 do not exactly correspond to those at z = 3.

Dependence on Stellar Mass Threshold
In this paper, we adopt the stellar mass threshold of M * > 10 9 M ⊙ to extract the filaments, since SDSS galaxies are roughly complete above this mass threshold.In Figure 7, we investigate the relationship between the average radius of filaments and the threshold mass of galaxies for both MTNG(non-RSD) and SDSS(non-RSD).It is important to note that the threshold mass of galaxies is used to select the sample before conducting the filament search.This results in variations in the filament samples based on different mass thresholds.The average filament radius increases slightly with the threshold mass M th .At z = 0 for MTNG(non-RSD), the average filament radius ranges from approximately 0.91 Mpc for M * > 10 8.5 M ⊙ to 1.18Mpc for M * > 10 10 M ⊙ .SDSS(non-RSD) exhibits a similar increasing trend, with slightly lower average filament radii compared to MTNG(non-RSD), but still consistent within the large errors.The small offsets between SDSS and MTNG are primarily due to differences in the stellar mass functions of the two samples.We also ob-served similar trends for the MTNG galaxies at higher redshifts.This consistency aligns with the fact that more massive galaxies tend to inhabit denser environments and reside closer to clusters.Although the level of evolution of the filament radius may differ depending on the tracers used, the general trend remains the same.
On the other hand, as shown in Kraljic et al. (2018), massive galaxies tend to be residing close to filament spines.The filaments identified using these massive galaxies would be tighter, i.e. with smaller filament radii, which seems to be contrary to our conclusions above.However, such discrepancies are simply caused by the sample selection effect.For a given set of filament segments, the average R fil is indeed decreasing with the increasing stellar mass threshold.But in the results of Figure 7, we actually include much more filaments with a smaller M th .We display the sample sizes of different M th in Table 2.The additional filaments introduced in the lower M th samples are typically in lower density environments, leading to a smaller average R fil as suggested by Figure 5. MTNG non-RSD z=4 Figure 7. Dependence of the average filament radius on the stellar mass threshold.Left Panel: We measured the average filament radius for the galaxy samples with the lower stellar mass thresholds of 10 8.5 M ⊙ , 10 9.0 M ⊙ , 10 9.5 M ⊙ and 10 10 M ⊙ , for both SDSS(non-RSD) (blue symbols) and MTNG(non-RSD) at z = 0 (red symbols).Right Panel: The equivalent dependence on the lower stellar mass threshold for MTNG(non-RSD) at z = 4.A weak increasing trend of filament radius with the stellar mass threshold is found for both observation and simulation at z = 0, while the dependence at z = 4 in MTNG is stronger.

SUMMARY & DISCUSSION
In this paper, we have developed a physically-motivated definition of the radius of filaments in terms of the minimum slope of the galaxy number density distribution around the filament spines.This approach with a precise value of the radius allows us to quantify the formation and evolution of filamentary structures.Our analysis reveals that the average radius of cosmic filaments in the MTNG simulation at z = 0 is approximately 1 Mpc, which agrees with the filament radius derived from SDSS galaxies after correcting for redshift space distortions (RSD) (Alam et al. 2015;Tempel et al. 2017).
The presence of RSDs causes a distortion in the spatial distribution of galaxies, leading to an increase in the filament radius in redshift space to around 2 Mpc, a result that is also supported by the observed SDSS galaxy sample without the RSD correction.Furthermore, we observe a decreasing trend in the slope (γ) at the radius of the filament from approximately −1.2 at z = 4 to approximately −1.6 at z = 0, indicating sharper filament edges.However, these slopes are still higher than the typical slope at the splashback radius of dark matter halos, suggesting that the boundaries of filaments are less sharp compared to those of halos.
We can observe that filament formation occurs in two distinct phases.Before z = 1, the filaments undergo rapid collapse, resulting in a significant decrease in their radius from z = 4 to z = 1.By z = 1, the filaments are more collapsed in the radial direction, and the galaxy number density profile remains relatively stable.Subsequently, the continued weak growth of the filament radius is driven by the presence of short filaments that connect to the node structures.Additionally, at z = 0, filaments that are closer to clusters exhibit larger radii, and this effect seems to be more pronounced for clusters of higher mass.We anticipate that the outcome of this study will not depend on the specific hydrodynamical simulation employed to explore the filament radius.The filament characteristics (especially the galaxy number density profiles around the filaments) constructed for the TNG simulation suite, which is very similar to the advanced MTNG simulation used here, were found to be in line with those in other hydrodynamical simulations (Galárraga-Espinosa et al. 2020).In essence, filament formation is mainly driven by the influence of the gravity of the density field (Galárraga-Espinosa et al. 2020, 2024;Yang et al. 2022;Sunseri et al. 2023), which is unlikely to be significantly altered by different implementations of baryonic physics in different simulation models.Although we use the galaxy number density as the tracer of the filament structure in both SDSS and MTNG, it has been shown in the simulations that the dark matter, gas and stellar distribution profiles are very consistent with each other around the scales of filament radius (Galárraga-Espinosa et al. 2022).With ongoing high-redshift galaxy surveys, we will soon be able to further constrain the evolution of the filament radius using high-redshift observational galaxy samples, which will lend itself to an interesting test of the ΛCDM simulation models.

APPENDIX A: THE CHOICE OF ORDER OF POLYNOMIAL
In this paper, we adopted a sixth-order polynomial function to fit the galaxy number density profiles, which is to minimize the noise in the measurements.In the top panel of Figure A1, we show the fittings to the galaxy number density profile of the MTNG (non-RSD) sample using different orders of polynomials, ranging from the fourthorder to the seventh-order.The percentage residuals of the fittings are shown in the bottom panel.It is clear that polynomials with more than six orders can fit the profile with sufficient accuracy (better than 1%).

APPENDIX B: THE PROFILE AND SLOPE IN REDSHIFT SPACE
Similar to Figure 1, we present the profiles and slopes for the MTNG(RSD) (left panel) and SDSS(RSD) (right panel) samples in Figure B1.The results of the filament radii are presented in Figure 2.

APPENDIX C: EFFECTS OF DIFFERENT DISPERSE PARAMETERS AND PROFILE STACKING METHODS
For fair comparisons of filament radii in different samples, we adopt the same DisPerSE parameters to extract the filaments in this paper for different redshifts, stellar mass thresholds, RSD and non-RSD samples.However, it is still important to investigate the effects of different DisPerSE parameters on our results.The main parameter is the persistence significance level, which we adopted the fiducial value of 2σ .In Figure C1, we show the results of the profiles and slopes with filaments extracted with significance levels of 1σ (red lines), 2σ (blue lines) and 3σ (green lines).We investigate the cases for the RSD sample at z = 0 with M th = 10 9 M ⊙ (left panels), non-RSD sample at z = 0 with M th = 10 9.5 M ⊙ (middle panel) and non-RSD sample at z = 4 with M th = 10 9 M ⊙ (right panel), respectively.The galaxy number density profiles apparently depend on the choice of the DisPerSE parameters with higher amplitudes and steeper slopes for filaments extracted with higher significance levels.It is therefore essential to compare the profiles of the filaments extracted with the same DisPerSE parameters in different studies.However, the positions of the slope minimum (i.e. the filament radius) are not significantly affected by the different parameter choices.
Another issue that will affect our results is the method to stack the filaments.We adopt the same stacking method as in Galárraga-Espinosa et al. (2020) and Galárraga-Espinosa et al. (2024) by directly averaging galaxy number density profiles for filaments of different lengths.The other potential way to stack the galaxy distributions around the filaments is to calculate the average profiles weighted by the segment lengths.We implement both methods for the MTNG (non-RSD) sample at z = 0 shown in Figure C2.The results with and without weighting by the length are shown as the red and blue lines, respectively.Our fiducial stacking method without the weight of segment length results in a higher number density profile, as the average profile is contributed more by the shorter filament segments.But the resulting filament radii in the two methods are still consistent with each other, further confirming that our results are not affected by the adopted stacking method.
Figure1.Upper panels: the relative number density profile of galaxies around their host cosmic filaments, ρ/ρ 0 , as a function of the perpendicular distance to the filament spine, d fil , where ρ 0 is the background density of galaxies above a threshold mass of 10 9 M ⊙ in the sample.The colour symbols with error bars are measured from SDSS (left) at 0 < z < 0.1 and MTNG (right) at z = 0, respectively.The errors are measured from the Jackknife resampling method of 32 subsamples with equal volumes.Solid black lines show the best-fitting models using the MCMC method.Bottom panels: The logarithmic slope of the number density profile, γ ≡ d log ρ/d log d fil , derived directly from the best-fit profile shown in the upper panels.The mean values of the filament radius are represented by vertical dashed lines (0.81 Mpc for SDSS and 0.98 Mpc for MTNG), while the shaded area illustrates the 16th to 84th percentile range obtained from the MCMC chains.

Figure 2 .
Figure2.Comparison of the radius of the filament in several different sets of observed and simulated data.Observational data is represented by red symbols, while data from the MTNG simulation is represented by blue symbols.Both the observational and simulation data take into account the effect of Redshift Space Distortions (RSD).The filament radius in SDSS is indicated by two red vertical lines, and the red bars (which are the same as the error bars) represent the 1σ scatter.The scatter was estimated from the MCMC chains of the fittings to the galaxy number density profiles.In the MTNG simulation, the RSD effect was accounted for by assuming a planeparallel model with the line of sight (LOS) along the ẑ direction.The galaxy positions were changed along the ẑ direction using the peculiar velocity of the LOS, v ẑ.

Figure 3 .
Figure 3. Evolution of the galaxy number density profile around filament spines, its slope, and the corresponding filament radius.Similar to Figure 1, but we consider the redshift dependence of the filament radius.Measurements at different redshifts are shown in different colours, as indicated by the colour bar on the right.Left panel: the density profiles of the galaxy number around filaments as a function of the distance to the filament spine d fil at the corresponding redshifts.Middle panel: the variation of the best-fitting slope γ with d fil at different redshifts.Right panel: the best-fitting radius of filaments as a function of redshift.The dashed lines indicate the filament radius of 1 Mpc and 2 Mpc, respectively.The average filament radius has undergone a rapid decrease from z = 4 to z = 1 and a slow growth afterwards.The slope γ at R fil also becomes steeper with time.

Figure 4 .
Figure4.Evolution of filament radius with redshift by considering the filament length.We categorize the entire sample into three sub-samples of equal size based on the length distribution of the filaments.These subsamples are labelled as short, middle, and long filaments, arranged from left to right.At redshift z = 0, the median filament lengths for the short, middle and long subsamples are 7.56, 14.61, and 25.05 Mpc, respectively.The longer filaments have larger R dfil at z > 1, and the shorter filaments show a stronger growth of the filament radius.

Figure 5 .
Figure5.The relationship between the filament radius and its distance from the nearest clusters.Left panel: the filament radius, R fil , as a function of the distance, D cluster , to the nearest connected cluster.We stacked all filament segments with distances larger than a given threshold of D cluster .Right panel: Similar to the left panel, but filaments are subdivided into two subsamples according to the mass of the nearest connected clusters.The blue and green symbols are for the higher-mass and lower-mass halves, respectively.

Figure 6 .
Figure 6.Illustration of the evolution of some selected cosmic filaments around a cluster.The blue and red dashed lines indicate the boundaries of the highlighted long and short filaments, respectively.

Figure A1 .
Figure A1.Upper panel: the fittings to the galaxy number density profile of the MTNG (non-RSD) sample using different orders of polynomials, ranging from the fourth-order to the seventh-order.Bottom panel: the percentage residuals between fitting profiles and the data points.

Table 1 .
The number of galaxies and filaments in given redshifts in Figure3.
is supported by the National SKA Program of China (grant No. 2020SKA0110100).PW is sponsored by Shanghai Pujiang Program(No.22PJ1415100).HG is supported by the CAS Project for Young Scientists in Basic Research (No. YSBR-092) and the science research grants from the China Manned Space Project with NO.CMS-CSST-2021-A02.H.R.Y. is supported by National Science Foundation of China grant No. 12173030.SB is supported by the UK Research and Innovation (UKRI) Future Leaders Fellowship [grant number MR/V023381/1].CH-A acknowledges support from the Excellence Cluster ORIGINS which is funded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) under Germany's Excellence Strategy -EXC-2094 -390783311.We acknowledge the use of the High Performance Computing Resource in the Core Facility for Advanced Research Computing at the Shanghai Astronomical Observatory.