Revisiting the cosmic distance duality relation with machine learning reconstruction methods: the combination of HII galaxies and ultra-compact radio quasars

In this paper, we carry out an assessment of cosmic distance duality relation (CDDR) based on the latest observations of HII galaxies acting as standard candles and ultra-compact structure in radio quasars acting as standard rulers. Particularly, two machine learning reconstruction methods [Gaussian Process (GP) and Artificial Neural Network (ANN)] are applied to reconstruct the Hubble diagrams from observational data. We show that both approaches are capable of reconstructing the current constraints on possible deviations from the CDDR in the redshift range z∼2.3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$z\sim 2.3$$\end{document}. Considering four different parametric methods of CDDR, which quantify deviations from the CDDR and the standard cosmological model, we compare the results of the two different machine learning approaches. It is observed that the validity of CDDR is in well agreement with the current observational data within 1σ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$1\sigma $$\end{document} based on the reconstructed distances through GP in the overlapping redshift domain. Moreover, we find that ultra-compact radio quasars could provide 10-3\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$10^{-3}$$\end{document}-level constraints on the violation parameter at high redshifts, when combined with the observations of HII galaxies. In the framework of ANN, one could derive robust constraints on the violation parameter at a precision of 10-2\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$10^{-2}$$\end{document}, with the validity of such distance duality relation within 2σ\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$2\sigma $$\end{document} confidence level.


Introduction
The cosmic distance duality relation (CDDR) is a fundamental relation in modern cosmology, which relates two cosmologiccal distances in cosmology (i.e. the luminosity distance D L (z) and angular diameter distance D A (z)).More specifically, the CDDR indicates that D L (z) and D A (z) satisfy the relation of D L (z) = D A (z)(1 + z) 2 at the same redshift [1,2].Theoretically, the validity of the CDDR depends on three basic assumptions: i)the spacetime is described by a metric theory; ii)the light travels along the null geodesics between the source and the observer; iii)the photon number is conserved.Moreover, one of the basic assumptions of general relativity is that photons travel along null geodesics.In other word, the validity of the CDDR can be a support of general relativity in some extents.As a fundamental relation, the CDDR has been widely used in varieties of research fields in astronomy, such as the large-scale distribution of galaxies and the near-uniformity of the CMB temperature [3], as well as the gas mass density profile and temperature profile of galaxy clusters [4,5].Various astrophysical mechanisms, such as gravitational lensing, and dust extinction, may cause the deviation of the CDDR from the view of obser-vation.More specifically, photons emitted from the source are affected in the process of propagation due to gravitational lensing effects and dust extinctions.Consequently, the necessary conditions for maintaining the CDDR are violated.Therefore, it is necessary to test the reliability of the CDDR accurately before applying to various astronomical theories.
Traditionally, testing CDDR needs two types of observational data sets, i.e., the luminosity distance derived from the luminous sources with known (or standardizable) intrinsic luminosity in the Universe like type-Ia supernova (SN Ia), and the angular diameter distance observed from Baryon Acoustic Oscillations (BAO) [6], Sunyaev-Zeldovich (SZ) effect in clusters with X-ray surface luminosity measurements [7,8,9], or strong gravitational lensing (SGL) [10,11], etc.However, it is necessary to point out that the luminosity distance inferred from SN Ia only covers the relatively lower redshift range z ≤ 1.4.The socalled "nuisance" parameter of SN Ia usually optimizes along with model parameters in the chosen cosmological model [12].Meanwhile, the angular diameter distance derived from BAO or SZ effect is strongly model-dependent, thus will bring systematic uncertainties which are hard to quantify and affect the validity of testing CDDR.In addi-tion, other works [13,14,15] attempted to apply the BAO observations to CDDR test, which also suffers from the limited sample size and low redshift range 0.35 ≤ z ≤ 0.74.Therefore, in order to perform the validity of testing CDDR, one needs to reduce the statistical uncertainty by increasing the depth and quality of the observed data set.Meanwhile, the redshift ranges of the two samples that inferred the angular diameter distance and the luminosity distance should be roughly consistent.Such issue has been recently discussed in Ref. [16], focusing on a new idea of testing CDDR through the multiple measurements of high-redshift quasars.
Although many efforts have been made to perform robust tests of CDDR, the lack of adequate observational samples and model-independent methods should be taken into account.Specially, it is difficult to obtain samples that satisfy both the luminosity distance and the angular diameter distance in roughly the same redshift range.This redshift-matching problem problem was recognized a long time ago [8], with a heuristic suggestion that the choice of redshfit difference ∆z could play an important role in model-independent tests of such relation.More recently, many authors presented a new way to constrain the CDDR with different machine learning algorithms [17,18,19], with the luminosity distance and angular diameter distance reconstructed from complementary external probes (Type Ia supernovae and gravitational wave (GW) standard sirens) [20].Their results demonstrated the effectiveness of machine learning approaches in the high-precision test of the electromagnetic and gravitational distance duality relations.More importantly, considering the fact that the purpose of modern cosmology is to establish consistent and robust theories, all alternative methods of testing the fundamental principles of cosmology are necessary.In this paper, we will use two non-parameterized methods, Gaussian Process (GP) and Artificial Neural Network (ANN) algorithm, to reconstruct the newest observations of HII galaxy Hubble diagram and ultra-compact structure of radio quasars, respectively.These two approaches are data-driven and have no assumptions about the data, suggesting that they are completely model-independent.The luminosity distance is inferred from reconstructed HII galaxy Hubble diagram and the angular diameter distance is obtained from the angular-size relation of compact radio quasar.The advantage of using these two data is that the redshift ranges of the two samples are roughly consistent, and can reach a relatively high redshift range z ∼ 2.33.Since no models were assumed in our analysis, our method produced a clear measurement on the CDDR.This paper is organized as follows: in Section 2 we briefly introduce methodology of deriving two different cosmological distances from the HII galaxies (including extragalactic HII regions) and ultra-compact structure of radio quasar sources, respectively.The two nonparameterized methods, GP and ANN reconstructing the two data sets are described in Section 3. In Section 4, we show the methodology of measuring CDDR and show our results.Finally, we summarize our conclusions in Section 5.

Data and Methodology
2.1 Luminosity distances from HII galaxies and extragalactic HII regions In order to measure luminosity distances in the Universe, we always turn to sources that have known (or standardised) intrinsic luminosity, such as type-Ia supernova (SN Ia) [12], more distant quasars [21,22,23,24], and gammaray bursts (GRB) [25], etc.In addition, the HII galaxies and extragalactic HII regions [26,27,28] constitute a large fraction of population that can be observed up to very high redshifts, beyond the feasible limits of supernova studies.It is well known that the luminosity L(Hβ) in Hβ and the ionized gas velocity dispersion σ of HII galaxies and extragalactic HII regions may have a quantitative relation (be known as "L-σ" relation).The physics behind this relation is based only on a simple idea, i.e., as the mass of the starburst component increases, the number of ionized photons and the turbulent velocity of the gas may both increase as well.Melnick et al. first found that the scatter of "L-σ" relation is very small and have the capability to determine the cosmological distance independent of redshift [29].More specifically, based on the measured flux density (or luminosity) and the turbulent velocity of the gas, one can infer the luminosity distance directly.Whereafter, the validity of the "L-σ" relation acting as the standard candle and its possible cosmological applications have been extensively discussed in the literatures [30,31,32].
The "L-σ" relation between the luminosity L(Hβ) in Hβ of a source and its ionized gas velocity dispersion can be expressed as [27] log L(Hβ) = α log σ(Hβ) + κ, where α is the slope and κ is the intercept.The L(Hβ) is obtained from the reddening corrected flux density F (Hβ) which only bases on a general equation L(Hβ) = 4πD 2 L F (Hβ).Thus, the equation above can be written as a relation of the observed flux density log D L,HII (z) = 0.5[α log σ(Hβ) − log F (Hβ) + κ] − 25.04.
(2) Analogous to SN Ia applied in cosmology, the α and κ parameters should also be optimized with the assumed cosmological model parameters.Fortunately, Wu et al. used the measurements of Hubble parameters from cosmic clocks (model-independent) to calibrate α and κ, and demonstrated that the calibrated values α = 5.12 ± 0.08 and κ = 33.08 ± 0.13 are reliable for cosmological applications [32].In this work, we will adopt these values with their corresponding uncertainties to get the luminosity distance.
The catalog of spectral and astrometric data from HII galaxies and extragalactic HII regions contain more than 100 sources by far, and its statistical properties can be preliminarily considered in cosmology.In this work, we will use the current observations of 156 HII objects compiled by Terlevich et al. [27] which contain 25 high redshift HII galaxies sources, 107 local HII galaxies sources, and 24 extragalactic HII regions sources covering redshift range 0 < z < 2.33.This dataset is larger than the source samples used by Plionis et al. [30] and is more complete than the high redshift data used by Melnick et al. [29].Full information (including name of the source, redshift, flux density, and turbulent velocity with corresponding observational uncertainties) about the sample of 156 HII regions can be found in Table 1 of the work [28].

Angular diameter distances measured from compact structure of radio quasars
Quasars, among the most distant objects in the universe, have great potential as distance indicators.From an observational point of view, there are currently two types of quasar data that can be served as cosmological probes, i.e., the non-linear relation between the ultraviolet and X-ray fluxes of the quasar to construct the Hubble diagram [21,22,23], and the angular size-distance relation of ultra-compact structures object in radio quasars (QSO) as the standard ruler of cosmology from the very-longbaseline interferometry (VLBI) observations [24].The first type of quasar data provides the luminosity distance, but not the angular diameter distance, directly.Moreover, although the sample collected by [21] contained 1598 suitable quasars and redshift reaches to z ∼ 5.5, the sample itself exhibits a large intrinsic dispersion.Take these factors into consideration, we will use the radio quasar sample to obtain the angular diameter distance information.
The angular size-distance relation in compact radio quasar for cosmological inference was first proposed by Kellermann et al. [33], in which he tried to obtain the deceleration parameter with 79 compact radio sources from VLBI at 5 GHz.Whereafter, Gurvits [34] extended this method and attempted to investigate the dependence of characteristic size on luminosity and redshift based on 337 Active Galactic Nucleuses (AGNs) observed at 2.29 GHz [35].In the subsequent analysis, the literature [34] adopted the modulus of visibility Γ = S c /S t to redefine angular size of radio sources θ, which can be expressed by θ(z) = 2 √ − ln Γ ln 2/πB θ , where B θ is interferometer baseline measured in wavelengths, S c and S t are correlated flux density and total flux density, respectively.Based on a simple relation between the angle and distance with the intrinsic linear size l m of the compact structure in radio quasars, the angular size θ(z) can be written as where l m = lL β (1+z) n describes the apparent distribution of radio brightness within the core, l is the linear size scaling factor, L is the intrinsic luminosity of the source, and β and n represent the possible dependence of the intrinsic linear size of the source on luminosity and redshift, respectively.With the gradually refined selection technique and observations, as well as the elimination of systematic errors caused by various aspects, Cao et al. [24] compiled milliarcsecond compact radio sample of 120 intermediateluminosity (10 27 W/Hz < L < 10 28 W/Hz) quasars with reliable measurements of the angular size of the compact structure covering the redshift range 0.46 < z < 2.76 from VLBI survey at 2.29 GHz.They showed that l m is independent of redshift and luminosity (|β| ≈ 10 −4 , |n| ≈ 10 −3 ), which suggests that it can be used to cosmological studies.However, the current problem is how to determine the value of l m .In the subsequent analysis, the linear size, without pre-assuming a cosmological model, was determined to be l m = 11.03 ± 0.25 pc by Cao et al.
based on the D A (z) reconstruction from H(z) data obtained from cosmic chronometers [24].The calibrated intrinsic length and cosmological application of this sample had obtained stringent constraints on both the matter density parameter Ω m and the Hubble constant H 0 , which are consist with Planck 2018 observation [3].The ultracompact structures in radio quasars for exploring other cosmological models has been investigated in many literatures [36,37,38,39,40,41].Therefore, it is reasonable to ask whether the derived angular size depends on the intrinsic luminosity of the radio quasar, and consequently affecting testing the validity of CDDR.In fact, the derived angular size is obtained by a ratio of correlated and total flux densities, i.e., the modulus of visibility Γ = S c /S t .Therefore, from the perspective of observation, the intrinsic luminosity of the radio quasar does not affect the effectiveness of CDDR testing.

Reconstructions based on Gaussian Process and Artificial Neural Network
From a theoretical perspective, one can directly achieve CDDR testing by combining the L-σ relation in HII regions with the angular size-distance relation of compact radio sources.From the observational point of view, however, there is currently a lack of data samples.Not only of the HII region, but also samples of quasars.Although their redshifts cover each other well, there are very few of them meeting the same redshift at the same time.In order to achieve the CDDR testing and obtain convincing results, we consider two non-parameterized technologies, Gaussian Process (GP) and Artificial Neural Network (ANN), to reconstruct the HII galaxy Hubble diagram and ultra-compact structure of radio quasar sources data, respectively.There is no reason to favor one technology over another, but mutually consistent results for different parameterized technique would strengthen the robustness of the conclusion.Gaussian Process.-TheGaussian Process (GP) is a random process defined in the continuous domain, which can be regarded as a set of all random variables in the continuous domain, and any single or multiple random variables satisfy one-dimensional Gaussian distribution or multi-dimensional Gaussian distribution [42].The GP can be determined by a mean function m(x) and a covariance function k(x, x * ) (also called kernel function).The GP defines a priori function, one can assume that for a given x, y there follows a distribution p(y|x) = N (y|m, K), which K = k(x, x * ).The purpose of GP is to learn a mapping function f from x to y through x, y.Then, for the given new x * , one can predict y * = f (x * ).According to priori distribution of GP, the joint distribution p(y, y * |x, x * ) of observed data y and forecast data y * are given by [43] where According to the joint distribution of y and y * , one can get the conditional distribution where y K * are the expectation vectors and covariance matrices of the posterior prediction distribution, respectively.
The kernel function has many choices, such as square exponential function.We take the Matérn (ν = 9/2) covariance function here, because it can provide more reliable results when using GP to reconstruct function [44] where ℓ denotes the characteristic length scale in xdirection and σ f is the signal variance in y-direction.One can see that, except for the hyper parameters in kernel function, there is no parameter estimation that was involved in the final prediction of the y * = f (x * ).It should be emphasized here that whenever one performs the GP regression, the hyperparameters should be optimized by GP with the observed data set, along with other parameters of interest (cosmological parameters or not).Therefore, the proper way of performing such GP analysis is to treat the GP hyperparameters on the same footing as the cosmological parameters, i.e. varying all relevant parameters together and sampling the joint posterior.Such procedure, which guarantees that the reconstructed function is independent of the initial hyperparameter settings, has been extensively applied in different cosmological studies [45,46,47,48], especially high-fidelity constraints on the spatial curvature parameter and Hubble constant [49,50].
In this analysis, we use Gaussian Processes in Python (GaPP) 1 to realize the reconstruction of different functions.For the HII regions sample, the reconstructed logarithmic luminosity distance log D L,HII (z), as a function of logarithmic redshift log z, with the estimation of their 1σ confidence regions are shown in the top panel of Fig. 1.
1 http://www.acgc.uct.ac.za/seikel/GAPP/index.htmlMeanwhile, we also reconstruct function θ(z) from compact radio sources observations, and final results with their corresponding 1σ uncertainties are shown in the bottom panel of Fig. 1.We reconstruct 1000 points for HII regions and compact radio sources, respectively.From this figure, one can see that the 1σ uncertainty from GP reconstruction is smaller than that of individual data points.Such issue has been extensively discussed in the recent works [51,52].More specifically, the final reconstructed confidence region depends on three factors, i.e., the observed errors of data, the optimization of hyper parameters of the GP method, and the product of the covariance matrixes K * K y −1 K T * between the predicted and current observed points.It should be noted that, if , the uncertainty of the predicted point will be less than uncertainties of observed points when there is a large correlation between the data.One can clearly see from Eq. ( 6) that the correlation between z and z will be large when z − z less than ℓ.Such condition, which is satisfied by most of the HII galaxy and quasar data points in our study, will result in smaller 1σ confidence region from GP.We refer the reader to Ref. [42] for further details on this issue.
Artificial Neural Network.-For the second nonparametric approach, we turn to Artificial Neural Network (ANN) and show the reconstructed function from observational data.With the development of computer hardware in the recent ten years, machine learning technology has been gradually applied to many research fields in astronomy, and shown excellent potential for solving cosmological problems, such as analyzing gravitational waves [53,54] and constraining cosmological parameters [55,56,57,58,59,60].
The main purpose of an ANN is to construct an approximate function or map that correlates the input data with the output data.The ANN has been shown to be "universal approximator" that can represent a wide variety of functions [61,62].The ANN is made up of neurons, which are very simple elements that receive digital input.Generally speaking, the artificial neural network consists of an input layer, one or more hidden layers and an output layer.Each layer takes a vector from the previous layer as input, applies a linear transformation and a nonlinear activation function to the input, and propagates the current result to the next layer.Formally, in a vectorized way [63] where x i is the input vector at the ith layer, W i+1 and b i+1 are linear weights matrix and the offset vector which need to be optimized, z i+1 is the output vector after linear transformation, and f is the activation function.Here, the Exponential Linear Unit (ELU) is acted as the activation function [64], which is given by where α denotes the hyper-parameter that controls the value to which an ELU saturates for negative net inputs.Compared to other activation functions (such as the rectified linear and the leaky rectified linear), when the network exceeds five layers, ELU can not only improve the learning speed, but also have better generalization performance [64].
The ANN equals to a function f W,b (x).The goal of ANN is to make its output to be as close as possible to the target value y.Then, according to the difference between the predicted value f W,b (x) of the current network and the target value y, the weight matrix of each layer needs to be constantly updated for minimize the difference, which is defined by a loss function L. The method used is gradient descent, that is, by constantly moving the loss value to the opposite direction of the current corresponding gradient to reduce the loss value.Formally, in a vectorized way [65] where the operator ∂ denotes partial derivatives, and f ′ is the derivative for the nonlinear function f .According to the publicly released code by the work [63], which explicitly describe the ANN method, we use the module called Reconstruct Functions with ANN (Re-FANN) 2 to perform the reconstruction of the HII regions and radio quasars data-sets.Similarly, we show the reconstructed function log D L,HII (z) by using ANN method as a function of logarithmic redshift log z with the estimation of 1σ confidence region in the top panel of Fig. 2. For compact radio sources, the reconstructed function θ(z) with corresponding 1σ uncertainties by using ANN is given in the bottom panel of Fig. 2. Similarly, we also reconstruct 1000 points for HII regions and compact radio sources, respectively.Compared to GP technology, the ANN method does not assume random variables that satisfy the Gaussian distribution, which is a completely data driven approach.It is interestingly to note that the uncertainties of the data reconstructed by ANN are almost equal to that of the observations.Therefore, the 1σ confidence region reconstructed by ANN can be considered as the average level of observational error.We refer the reader to Ref. [59] for further details on this issue.

Testing the validity of CDDR
In order to test the validity of CDDR, we use the reconstructed data to directly perform a model-independent test of CDDR, i.e., we do not adopt any parameterized form to quantify the CDDR, which is given by the following form [66,67] Note that any statistically significant deviation from η(z) = 1 could indicate possible violation of the three basic CDDR assumptions.Furthermore, we turn to four parameterized forms of CDDR, which have been extensively discussed in the quoted papers [8] η th (z, 2 https://github.com/Guo-Jian-Wang/refannNote that the first parameterized form is independent of redshift, therefore we can compare it to other parameterized forms to check its possible dependency on the redshift.In general, η(z) can be treated as parameterized functions of the redshift.In this work, we also use other general parametric representations for a possible redshift dependence of CDDR including two one-parameter expressions and a two-parameter parametrization.The consistency of the results under different parameterized forms will enhance the robustness of the conclusion.
From the observational perspective, we obtain the luminosity distance D L (z) through the "L-σ" of HII galaxies and extragalactic HII regions, and the diameter distance D A (z) can be derived from compact structure in radio quasars.For a given D L,HII data point, the angular diameter distance D A,QSO should be observed at the same redshift.To avoid introducing additional systematic errors, a cosmological model-independent selection criterion is considered.We take |z HII − z QSO | < 0.005 in our anal-ysis [9,10].If one only consider the actual observational sample, it is difficult to achieve a rigorous CDDR test and get convincing results.That is the reason why we used two non-parameterized techniques mentioned above to reconstruct the data.Using the reconstructed samples, we are able to have a one-to-one matching between HII regions and compact structure in radio quasars .After executing the redshift selection criterion by using reconstructed data samples, 892 data are remained.Subsequently, the observed η obs (z) can be represented by following form = θ l m (1 + z) 2 10 0.5[α log σ(Hβ)−log F (Hβ)+κ]−25.04 .
Uncertainties have been assessed from the standard uncertainty propagation formula, based on (uncorrelated) uncertainties of observable quantities.The total uncertainty budget includes the ionized gas velocity dispersion σ log σ(Hβ) , flux density σ log F (Hβ) and additional systematic errors introduced from the calibrations of α and κ in HII regions data, the angular size σ θ , and additional systematic errors introduced in the calibrations of linear size l m in radio quasars.So the total uncertainty of η obs (z) can be expressed as In order to determine the best fitting CDDR parameters and corresponding uncertainties, we use the Bayesian statistical methods to obtain the posterior probability density function of the CDDR parameters η j (j = 0, .., 4) corresponding to four parametrization forms of Eq. ( 12).The posterior probability density function is given by p(η|obs data) ∝ L(η, obs data) × p(η), where L is the likelihood function, and has a following form of and p(η) is the prior, and assumed the following uniform distribution: . We use the Python module emcee [68] to perform the Markove Chain Monte Carlo (MCMC) analysis.

Results and Discussion
Let's start with the reconstruction of HII galaxy and radio quasar sample using GP.In Fig. 3 we show a particular realization of the reconstructed CDDR, along with the case of η(z) = 1 (dashed green line) and the corresponding best-fit (solid colored line) for the GP.Our results indicate that there is no obvious deviation from η(z) = 1 at 1σ confidence level.In the higher redshift Table 1.Constraints on the CDDR parameters for four types of parameterized forms, in the framework of GP and ANN technologies.region, due to the lack of observational data the errors of reconstruction become larger and the statistical significance of CDDR reconstruction is affected.Such finding is well consistent with that obtained in the recent works [17,18,20,19].Focusing on the different parameterized form of η obs (z), the numerical results by using GP reconstructed technology for three parameterized forms η j (j = 0, 1, 2) are summarized in Table 1, and the posterior probability density functions are shown in Fig. 4. For the first parameterized form, the best fitting value with 1σ error is η 0 = 0.001 ± 0.0031, which demonstrates that there is no evidence for the dependence relation between the CDDR parameter and redshift.Working on the second parameterized form, we obtain η 1 = −0.003± 0.003, which contains zero value within ∼ 1.2σ confidence level.Considering the redshift coverage of our CDDR test (z ∼ 2.3), the third parametrization may effectively avoid the possible divergence at high redshift.In this case, the best fitting value η 2 with 1σ confidence level is η 2 = 0.001 ± 0.005.Meanwhile, for the two-parameter form, the graphic representation and numerical results of the constraints on the CDDR parameters (η 3 , η 4 ) are shown in Fig. 5 and Table 1.One can clearly see that the CDDR seems to be violated at 1σ confidence level, η 3 = −0.033± 0.006 and η 4 = 0.029 ± 0.003.However, one should be noted that the degeneracy between η 3 and η 4 is strong, and they are in negative correlation.If η 3 increases to zero, then η 4 will go back to zero, which means that the strong degeneracy between them affects our test of CDDR validity.Such result, which is similar with the findings of previous works [11], highlights the importance of choosing a reliable parametrization to describe η(z) in the early universe.Benefit from the GP technology, the HII/QSO pairs satisfying the redshift selection criteria have a massive growth, therefore, a considerable amount of high-redshift samples (z > 1.4) have been included in our analysis.Actually, such a combination of HII regions and radio quasars enables us to get more precise measurements at the level of ∆η ∼ 10 −3 by using GP reconstructed technology.Our method provided constraints for testing validity of CDDR more stringent than other currently available results based on real observational data.
We also consider the added benefit on the reconstruction brought by other machine learning methods.Working on the reconstructed luminosity and angular diameter distances with ANN, we obtain the reconstruction of the distance duality relation η(z) in Fig. 6, when the full data combination of HII galaxies and compact radio quasar is considered.Similarly, the reconstructed η(z) function is compatible with the validity of CDDR at the 1σ confidence level, hence there is no clear deviation from such fundamental relation in modern cosmology.Furthermore, for both ML approaches we find that the reconstructed errors are inconsistent with each other, since the GP and the ANN are in principle rather different reconstruction methods.Next, in Table 1 we show the numerical result for CDDR parameters in the framework of four parameterized forms.The posterior probability density functions of CDDR parameters η j (j = 0, 1, 2) from reconstructed HII galaxy and radio quasar samples are shown in Fig. 7.We find that there is some deviation from CDDR at 1σ confidence level.The best fitting values η 0 and η 1 are 0.031±0.016and 0.028±0.014for first and second parameterized forms, but the results are still consistent with zero CDDR parameters within 2σ confidence level.Meanwhile, for the third parameterized form, we get η 2 = 0.031±0.033with 1σ uncertainty.Considering the forth form, the results are η 3 = 0.033 ± 0.043 and η 4 = 0.027 ± 0.025 with 1σ errors and shown in Fig. 8.Although considering more parameters would make the constrained precision of the CDDR parameters worse, our findings also demonstrate the robustness of CDDR validity in two-parameter form.In general, whatever parameterized forms are considered here, our results indicate that there is no large extent violation of the CDDR validity at the current observational data level, and this is one of unambiguity conclusions in our work.
In order to highlight the potential of our method, it is necessary to compare our results with those obtained in the previous works.Traditionally, the angular diameter distances are derived from SZ effect of galaxy clusters [7,9], BAOs [6], GRBs [69], and SGLs [10,11].One can combine the luminosity distance obtained from SN Ia observations to test the validity of CDDR.Our results are consistent with the findings of their previous works, which confirm the validity of the CDDR at early Universe.However, the angular diameter distances inferred from SZ effect and BAOs are model dependent, SGLs need to the assumption of a flat Universe, and GRBs requires additional external calibrators to calibrate it at low redshifts.We remark here that, without any assumptions, the angular diameter distances estimated from compact structure in radio quasars provides a new possibility to test the fundamental relations in the early universe model independently.More importantly, in work of [67], they simulated gravitational wave (GW) observations based on third-generation GW detectors Einstein Telescope and simulated radio quasars from VLBI to test the CDDR.Their results shown that the CDDR parameter ∆η 0 ∼ 0.0029, ∆η 1 ∼ 0.0018, and ∆η 2 ∼ 0.0051 (at 68.3% confidence level) corresponding to first, second and third parameterized forms in our work.However, we should seek other methods and technologies until the observed GW events based on the thirdgeneration GW detectors will be sufficient to get statistical results in the future.

Conclusion
The   two machine learning reconstruction methods, i.e., Gaussian Process (GP) and Artificial Neural Network (ANN), are respectively applied to reconstruct the Hubble diagrams from the observed HII galaxy and radio quasar samples.In order to enhance the robustness of the final results, we use four commonly used parameterized forms η = 1 + η 0 , η = 1 + η 1 z, η = 1 + η 2 z/(1 + z), and η = 1 + η 3 z + η 4 z 2 to describe the possible violation of CDDR.Meanwhile, we also exploit a fully agnostic reconstruction of CDDR based on two machine learning methods, which allows us to obtain constraints without any assumption on the redshift trend of possible deviations from CDDR.
First of all, we focus on the reconstruction of HII regions and compact radio quasar samples through the GP method.Based on the reconstructed standard candle and standard ruler data, we obtain the best-fit values of the CDDR parameters η 0 = 0.001 ± 0.0031, η 1 = −0.0031± 0.0027, and η 2 = 0.0014 ± 0.0054 for the three one-parameter forms, which are well consistent with no violation of the cosmic distance duality relation.The results suggest that the tests of cosmic opacity are not significantly sensitive to the parametrization for η.For the two-parameter parameterization, we obtain η 3 = −0.033± 0.006 and η 4 = 0.029 ± 0.003 at 68.3% confidence level.A strong degeneracy between the two redshift-dependent CDDR parameters is also revealed in this analysis.Note that although such negative correlation could potentially affect our test of CDDR, the validity of such fundamental relation is still supported within 2.8σ.Therefore, our results indicate that there is no obvious violation of the CDDR at the current observational data level, based on Gaussian Process for the overlapping redshift domain (z ∼ 2.3).Moreover, we find that ultracompact radio quasars provide an alternative to the use of HII galaxies to confirm the validity of the CDDR, reaching 10 −3 constraints on the violation parameter.
It is still interesting to see whether those conclusions may be changed with a different machine learning reconstruction method.Working on the reconstructed HII regions and compact radio quasar samples with ANN, one could derive robust constraints on the violation parameter at the precision of 10 −2 , with the validity of such distance duality relation within 2σ.Although not all of the parameterized forms support the validity of CDDR within 1σ in the framework of GP, more convincing results are obtained in the ANN method.Although the GP and ANN methods have their own advantages and disadvantages [63], they both show great potential in the studies of precision cosmology.In the case of non-parameterized reconstruction of CDDR, our results based on the two machine learning methods both support that there is no obvious deviation from η(z) = 1 within 1σ confidence level.However, the statistical significance of our CDDR reconstruction is still significantly affected by the lack of observational data, especially at higher redshifts.Looking to the future, an increase in the number of high-redshift standard probes would improve the precision of our approach even further.This strengthens our interest in observational search for more HII galaxies and compact radio quasars with smaller statistical and systematic uncertainties.
As a final remark, any possible deviation the CDDR might have profound implications for the understanding of fundamental physics and natural laws.Therefore, our results highlight the importance of machine learning in accurately testing the current pillars of modern cosmology and probing new physics beyond the standard cosmological model.Summarizing, considering the wealth of available data and various machine learning technologies in the future, we may be optimistic to expect detecting possible deviation from the CDDR at much higher precision.

Figure 1 .
Figure 1.Top panel: The reconstructed function log DL,HII (z) with corresponding 1σ errors by using GP (red line), and the gray dots dots with error bars represent measurements of HII regions; Bottom panel: The GP-reconstructed function θ(z) from compact radio sources observations.

Figure 2 .
Figure 2. Top panel: The reconstructed function log DL,HII (z) with 1σ errors by using ANN (red line), and the gray dots dots with error bars represent measurements of HII regions; Bottom panel: The reconstructed function θ(z) by using ANN from compact radio sources observations.

Figure 3 .Figure 4 .
Figure 3. Cosmic distance duality relation η(z) for the GP reconstruction from the HII galaxy and compact radio quasar sample.The dashed line at unity is η(z) = 1, the solid line is the ANN fit, and the shaded region is the 1σ GP errors.

Figure 5 .
Figure 5.The 1D and 2D marginalized probability distributions for the fourth CDDR parameters η3 and η4 by using GP reconstructed HII galaxy and compact radio quasar samples.

Figure 6 .
Figure 6.Cosmic distance duality relation η(z) for the ANN reconstruction from the HII galaxy and compact radio quasar sample.The dashed line at unity is η(z) = 1, the solid line is the ANN fit, and the shaded region is the 1σ ANN errors.

Figure 7 .
Figure 7.The posterior probability density function with three parameterized forms ηj (j = 0, 1, 2) by using ANN reconstructed HII galaxy and compact radio quasar samples.

Figure 8 .
Figure 8.The 1D and 2D marginalized probability distributions for the fourth CDDR parameters η3 and η4 by using ANN reconstructed HII galaxy and compact radio quasar samples.