### Abstract

We trace the connectivity of the cosmic web as defined by haloes in the Planck-Millennium simulation using a persistence and Betti curve analysis. We normalize clustering up to the second-order correlation function and use our systematic topological analysis to correlate local information and properties of haloes with their multiscale geometrical environment of the cosmic web (elongated filamentary bridges and sheetlike walls). We capture the multiscale topology traced by the halo distribution through filtrations of the corresponding Delaunay tessellation. The resulting nested alpha shapes are sensitive to the local density, perfectly outline the local geometry, and contain the complete information on the multiscale topology. We find a remarkable linear relationship between halo masses and topology: haloes of different mass trace environments with different topological signature. This is a topological bias, an environmental structure bias independent of the halo clustering bias associated with the two-point correlation function. This mass-dependent linear scaling relation allows us to take clustering into account and determine the overall connectivity from a limited sample of galaxies. The presence of topological bias has major implications for the study of voids and filaments in the observed distribution of galaxies. The (infra)structure and shape of these key cosmic web components will strongly depend on the underlying galaxy sample. Their use as cosmological probes, with their properties influenced by cosmological parameters, will have to account for the subtleties of topological bias. This is of particular relevance with the large upcoming galaxy surveys such as DESI, Euclid, and the Vera Rubin telescope surveys.