Extragalactic Test of General Relativity from Strong Gravitational
  Lensing by using Artificial Neural Networks
This study aims to test the validity of general relativity (GR) on kiloparsec
scales by employing a newly compiled galaxy-scale strong gravitational lensing
(SGL) sample. We utilize the distance sum rule within the
Friedmann-Lema\^{\i}tre-Robertson-Walker metric to obtain cosmology-independent
constraints on both the parameterized post-Newtonian parameter $\gamma_{\rm
PPN}$ and the spatial curvature $\Omega_{k}$, which overcomes the circularity
problem induced by the presumption of a cosmological model grounded in GR. To
calibrate the distances in the SGL systems, we introduce a novel nonparametric
approach, Artificial Neural Network (ANN), to reconstruct a smooth
distance--redshift relation from the Pantheon+ sample of type Ia supernovae.
Our results show that $\gamma_{\rm PPN}=1.16_{-0.12}^{+0.15}$ and
$\Omega_k=0.89_{-1.00}^{+1.97}$, indicating a spatially flat universe with the
conservation of GR (i.e., $\Omega_k=0$ and $\gamma_{\rm PPN}=1$) is basically
supported within $1\sigma$ confidence level. Assuming a zero spatial curvature,
we find $\gamma_{\rm PPN}=1.09_{-0.10}^{+0.11}$, representing an agreement with
the prediction of 1 from GR to a 9.6\% precision. If we instead assume GR holds
(i.e., $\gamma_{\rm PPN}=1$), the curvature parameter constraint can be further
improved to be $\Omega_k=0.11_{-0.47}^{+0.78}$. These resulting constraints
demonstrate the effectiveness of our method in testing GR on galactic scales by
combining observations of strong lensing and the distance--redshift relation
reconstructed by ANN.
Jing-Yu Ran, Jun-Jie Wei
Extragalactic Test of General Relativity from Strong Gravitational Lensing by using Artificial Neural Networks

###### Abstract

This study aims to test the validity of general relativity (GR) on kiloparsec scales by employing a newly compiled galaxy-scale strong gravitational lensing (SGL) sample. We utilize the distance sum rule within the Friedmann-Lemaitre-Robertson-Walker metric to obtain cosmology-independent constraints on both the parameterized post-Newtonian parameter \(\gamma_{\rm PPN}\) and the spatial curvature \(\Omega_{\rm k}\), which overcomes the circularity problem induced by the presumption of a cosmological model grounded in GR. To calibrate the distances in the SGL systems, we introduce a novel nonparametric approach, Artificial Neural Network (ANN), to reconstruct a smooth distance-redshift relation from the Pantheon+ sample of type Ia supernovae. Our results show that \(\gamma_{\rm PPN}=1.16^{+0.13}_{-0.12}\) and \(\Omega_{\rm k}=0.89^{+1.97}_{-1.00}\), indicating a spatially flat universe with the conservation of GR (i.e., \(\Omega_{\rm k}=0\) and \(\gamma_{\rm PPN}=1.1\)) is basically supported within \(1\sigma\) confidence level. Assuming a zero spatial curvature, we find \(\gamma_{\rm PPN}=1.09^{+0.14}_{-0.10}\), representing an agreement with the prediction of 1 from GR to a 9.6% precision. If we instead assume GR holds (i.e., \(\gamma_{\rm PPN}=1\)), the curvature parameter constraint can be further improved to be \(\Omega_{\rm k}=0.11^{+0.78}_{-0.47}\). These resulting constraints demonstrate the effectiveness of our method in testing GR on galactic scales by combining observations of strong lensing and the distance-redshift relation reconstructed by ANN.

## I Introduction

As an important cornerstone of modern physics, Einstein's theory of general relativity (GR) has withstood very strict tests (e.g., [1; 2; 3; 4]). But testing GR at a much higher precision is still a vital task, because any possible violation of GR would have profound effects on our understanding of fundamental physics. Within the parameterized post-Newtonian (PPN) formalism, GR predicts that the PPN parameter \(\gamma_{\rm PPN}\) which describes the amount of space curvature produced per unit rest mass should be exactly [5]. Measuring \(\gamma_{\rm PPN}\) therefore serves as a test of the validity of GR on large scales. That is, any deviation from \(\gamma_{\rm PPN}=1\) implies a possible violation of GR.

On solar system scales, the GR prediction for \(\gamma_{\rm PPN}\) has been confirmed with high accuracy. By measuring the round-trip travel time of radar signals passing near the Sun, the Cassini spacecraft yielded \(\gamma_{\rm PPN}=1+(2.1\pm 2.3)\times 10^{-5}\)[6]. However, the extragalactic tests of GR are still insufficiency and much less precise. On galactic scales, strong gravitational lensing (SGL), combined with stellar kinematics in the lensing galaxy, provides an effective way to test the validity of GR by constraining the PPN parameter \(\gamma_{\rm PPN}\). The pioneering work by Ref. [7] first utilized this approach and reported a result of \(\gamma_{\rm PPN}=0.98\pm 0.07\) based on observations of 15 elliptical lensing galaxies from the Sloan Lens ACS Survey. Since then, numerous studies have been conducted to test GR using different SGL samples [8; 9; 10; 11; 12; 13; 14]. In this paper, we further explore the validity of GR by employing a newly compiled SGL sample [15], which consists of 161 galaxy-scale strong lensing systems. This larger SGL sample allows us to perform a more comprehensive analysis and obtain further insights into the behavior of gravity on galactic scales.

In practice, in order to constrain the PPN parameter \(\gamma_{\rm PPN}\) using SGL systems, one has to know a ratio of three angular diameter distances (i.e., the distances from the observer to the lens, \(D_{ls}\), the observer to the source, \(D_{s}\), and the lens to the source, \(D_{ls}\)). In most previous works, the required distance ratio is calculated within the context of the standard \(\Lambda\)CDM cosmological model. However, \(\Lambda\)CDM itself is established on the framework of GR, which leads to a circularity problem in testing GR [13; 14]. To circumvent this problem, we will introduce the distance sum rule (DSR) in the Friedmann-Lemaitre-Robertson-Walker (FLRW) metric. The two distances \(D_{l}\) and \(D_{s}\) can be directly determined from observations of type Ia supernovae (SNe Ia), but not the distance \(D_{ls}\). The DSR enables us to convert \(D_{ls}\) into a relationship with \(D_{l}\), \(D_{s}\), and the spatial curvature \(\Omega_{k}\). Based on the DSR in the FLRW metric, cosmology-independent constraints on both \(\gamma_{\rm PPN}\) and \(\Omega_{k}\) can thus be obtained by combing observations of strong lensing and SNe Ia [10; 14].

Very recently, by employing the Gaussian Process (GP) method, Liu et al. [13] reconstructed a smooth distance-redshift relation directly from SN Ia observation to calibrate the distances in the SGL sample. GP allows for the reconstruction of a function from a dataset without assuming a specific model or parameterization, and it has been widely used in cosmological researches [16; 17; 18; 19; 20; 21]. In the GP analysis, the errors in the observational data are assumed to follow a Gaussian distribution [22]. However, the actual observations might not follow Gaussian distributions. This may thus be a strong assumption for reconstructing a function from observational data. Moreover, due to the sparsity and scatter of data points at high redshifts, the GP reconstructed function from SN Ia data exhibits strange oscillations with large uncertainties. To address these concerns and ensure the reliability of the reconstructed function, we employ the Artificial Neural Network
(ANN) method, which is a machine learning technique and has been proven to be a "universal approximator" that can reconstruct a great variety of functions [23; 24]. Thanks to the powerful property of neural networks, methods based on ANNs have been widely used in regression and estimation tasks. In this work, we will reconstruct the distance-redshift relation from SN Ia data using the ANN method, utilizing a code developed in Ref [25].

This paper is organized as follows: in Section II, we introduce the methodology and observations used for testing GR on galactic scales. Cosmology-independent constraints on \(\gamma_{\rm PPN}\) and \(\Omega_{k}\) are shown in Section III. In Section IV, we make a summary and end with some discussions.

## II Methodology and data

In the weak-field limit, the metric of space-time can be characterized as

\[{\rm d}s^{2}=c^{2}{\rm d}t^{2}\left(1-\frac{2GM}{c^{2}r}\right)-{\rm d}r^{2} \left(1+\frac{2\gamma_{\rm PPN}GM}{c^{2}r}\right)-r^{2}{\rm d}\Omega^{2}\, \tag{1}\]

where \(\gamma_{\rm PPN}\) is the PPN parameter, \(M\) is the mass of the central object, and \(\Omega\) is the angle in the invariant orbital plane. In the framework of GR, \(\gamma_{\rm PPN}\) is equal to unity.

### Gravitational Lensing Theory

The main idea of testing the validity of GR via SGL systems is that the mass enclosed within the Einstein radius derived separately from the gravitational theory and the dynamical theory should be equivalent, i.e., \(M_{\rm E}^{\rm eff}=M_{\rm E}^{\rm dyn}\). From the theory of gravitational lensing [26], the Einstein angle \(\theta_{\rm E}\) reflecting the angular separations between multiple images is related to the gravitational mass \(M_{\rm E}^{\rm eff}\),

\[\theta_{\rm E}=\sqrt{\frac{1+\gamma_{\rm PPN}}{2}}\left(\frac{4GM_{\rm E}^{ \rm eff}}{c^{2}}\frac{D_{ls}}{D_{l}D_{s}}\right)^{1/2}\, \tag{2}\]

where \(D_{l}\), \(D_{s}\), and \(D_{ls}\) are, respectively, the angular diameter distances from the observer to the lens, the observer to the source, and the lens to the source. By introducing the Einstein radius \(R_{\rm E}=D_{l}\theta_{\rm E}\), Equation (2) can be rearranged as

\[\frac{GM_{\rm E}^{\rm eff}}{R_{\rm E}}=\frac{2}{1+\gamma_{\rm PPN}}\frac{c^{2} }{4}\frac{D_{s}}{D_{ls}}\theta_{\rm E}. \tag{3}\]

To estimate the dynamical mass \(M_{\rm E}^{\rm dyn}\) from the spectroscopic measurement of the lens velocity dispersion, one must first set a mass distribution model for the lensing galaxy. Here we use the common mass model with power-law density profiles [27; 15]:

\[\left\{\begin{array}{l}\rho(r)=\rho_{0}\left(\frac{r}{r_{0}}\right)^{-\alpha }\\ \nu(r)=\nu_{0}\left(\frac{r}{r_{0}}\right)^{-\delta}\\ \beta(r)=1-\sigma_{r}^{2}/\sigma_{r}^{2}\,\end{array}\right. \tag{4}\]

where \(r\) is defined as the spherical radial coordinate from the lens centre, \(\rho\left(r\right)\) is the total (including luminous and dark matter) mass density distribution, and \(\nu\left(r\right)\) represents the distribution of luminous density. The parameter \(\beta\left(r\right)\) describes the anisotropy of the stellar velocity dispersion, where \(\sigma_{r}\) and \(\sigma_{r}\) are the velocity dispersions in the tangential and radial directions, respectively. In the literature, \(\beta\) is always assumed to be independent of \(r\) (e.g., [28; 27]). Following previous studies [13; 14; 15; 9; 7; 10], we set a Gaussian prior \(\beta=0.18\pm 0.13\), informed by the constraint from a well-studied sample of elliptical galaxies [29]. That is, \(\beta\) will be marginalized using a Gaussian prior of \(\beta=0.18\pm 0.13\) over the \(2\sigma\) range of \([-0.08,\ 0.44]\). Also, \(\alpha\) and \(\delta\) are the power-law indices of the total mass density profile and the luminosity density profile, respectively. It has been confirmed in previous works [15; 30] that \(\alpha\) is significantly related with the lens redshift \(z_{l}\) and the surface mass density of the lensing galaxy. Therefore, we treat the parametrized model of \(\alpha\) as [15]

\[\alpha=\alpha_{0}+\alpha_{z}z_{l}+\alpha_{s}\log_{10}\tilde{\Sigma}\, \tag{5}\]

where \(\alpha_{0}\), \(\alpha_{z}\) and \(\alpha_{s}\) are arbitrary constants. Here \(\tilde{\Sigma}\) stands for the normalized surface mass density, and is expressed as \(\tilde{\Sigma}=\frac{\left(\sigma_{0}/100\ {\rm km\ s}^{-1}\right)^{2}}{R_{\rm E}/10 \ {\rm kpc}}\), where \(\sigma_{0}\) is the observed velocity dispersion, \(R_{\rm eff}\) is the lensing galaxy's half-light radius, and \(h=H_{0}/(100\ {\rm km\ s}^{-1}\ {\rm Mpc}^{-1})\) is the reduced Hubble constant.

Following the well-known radial Jeans equation in spherical coordinate [31], the radial velocity dispersion of the luminous matter \(\sigma_{r}\) in early-type lens galaxies takes the form

\[\sigma_{r}^{2}\left(r\right)=\frac{G\int_{r}^{\infty}{\rm d}r^{\prime}r^{ \prime 2\beta-2}\nu\left(r^{\prime}\right)M\left(r^{\prime}\right)}{r^{\prime 2 \beta}\nu\left(r\right)}\, \tag{6}\]

where \(M\left(r\right)\) is the total mass included within a sphere with radius \(r\),

\[M\left(r\right)=\int_{0}^{r}{\rm d}r^{\prime}4\pi r^{\prime 2}\rho\left(r^{ \prime}\right)=4\pi\frac{\rho_{0}}{r_{0}^{-\alpha}}\frac{r^{3-\alpha}}{3- \alpha}. \tag{7}\]

The dynamical mass \(M_{\rm E}^{\rm dyn}\) enclosed within a cylinder of radius equal to the Einstein radius \(R_{\rm E}\) can be written as [15]

\[M_{\rm E}^{\rm dyn}=2\pi^{3/2}\frac{R_{\rm E}^{3-\alpha}}{3-\alpha}\frac{ \Gamma\left(\frac{\alpha-1}{2}\right)}{\Gamma\left(\frac{\alpha}{2}\right)} \frac{\rho_{0}}{r_{0}^{-\alpha}}\, \tag{8}\]

where \(\Gamma(x)\) is Euler's Gamma function. By combining Equations (7) and (8), we get the relation between \(M\left(r\right)\) and \(M_{\rm E}^{\rm dyn}\):

\[M(r)=\frac{2}{\sqrt{\pi}}\frac{1}{\lambda(\alpha)}\left(\frac{r}{R_{\rm E}} \right)^{3-\alpha}M_{\rm E}^{\rm dyn}\, \tag{9}\]

where \(\lambda(\alpha)=\Gamma\left(\frac{\alpha-1}{2}\right)/\Gamma\left(\frac{\alpha} {2}\right)\). By substituting Equations (9) and (4) into Equation (6), we obtain

\[\sigma_{r}^{2}\left(r\right)=\frac{2}{\sqrt{\pi}}\frac{GM_{\rm E}^{\rm dyn}}{R_{ \rm E}}\frac{1}{\xi-2\beta}\frac{1}{\lambda(\alpha)}\left(\frac{r}{R_{\rm E}} \right)^{2-\alpha}\, \tag{10}\]

where \(\xi=\alpha+\delta-2\).
The actual velocity dispersion of the lensing galaxy is the component of luminosity-weighted average along the line of sight and measured over the effective spectroscopic aperture \(R_{\rm A}\), that can be expressed as (see Ref. [15] for more details)

\[\sigma_{0}^{2}\left(\leq R_{\rm A}\right)=\frac{c^{2}}{2\sqrt{\pi}}\frac{2}{1+ \gamma_{\rm PPN}}\frac{D_{s}}{D_{ls}}\theta_{\rm E}F\left(\alpha,\ \delta,\ \beta\right)\left(\frac{R_{\rm A}}{R_{\rm E}}\right)^{2-\alpha}\, \tag{11}\]

where

\[F\left(\alpha,\ \delta,\ \beta\right)=\frac{3-\delta}{\left(\xi-2\beta\right) \left(3-\xi\right)}\frac{\lambda\left(\xi\right)-\beta\lambda\left(\xi+2 \right)}{\lambda\left(\alpha\right)\lambda\left(\delta\right)}. \tag{12}\]

The theoretical value of the velocity dispersion inside the radius \(R_{\rm eff}/2\) can then be calculated by [27]

\[\sigma_{0}^{\rm th}=\sqrt{\frac{c^{2}}{2\sqrt{\pi}}\frac{2}{1+\gamma_{\rm PPN}} \frac{D_{s}}{D_{ls}}\theta_{\rm E}F\left(\alpha,\ \delta,\ \beta\right)\left(\frac{\theta_{\rm eff}}{2\theta_{\rm E}}\right)^{2-\alpha}}\, \tag{13}\]

where \(\theta_{\rm eff}=R_{\rm eff}/D_{l}\) denotes the effective angular radius of the lensing galaxy.

Based on the spectroscopic data, one can measure the luminosity-weighted average of the line-of-sight velocity dispersion \(\sigma_{\rm ap}\) within the circular aperture with the angular radius \(\theta_{\rm ap}\). In practice, \(\sigma_{\rm ap}\) should be normalized to the velocity dispersion within the typical physical aperture with a radius \(R_{\rm eff}/2\),

\[\sigma_{0}^{\rm obs}=\sigma_{\rm ap}\left[\theta_{\rm eff}/(2\theta_{\rm ap}) \right]^{\eta}\, \tag{14}\]

where the value of the correction factor is taken as \(\eta=-0.066\pm 0.035\)[32]. Then, the total uncertainty of \(\sigma_{0}^{\rm obs}\) can be obtained by

\[\left(\Delta\sigma_{0}^{\rm SGL}\right)^{2}=\left(\Delta\sigma_{0}^{\rm stat} \right)^{2}+\left(\Delta\sigma_{0}^{\rm AC}\right)^{2}+\left(\Delta\sigma_{0} ^{\rm sys}\right)^{2}\, \tag{15}\]

where \(\Delta\sigma_{0}^{\rm stat}\) is the statistical error propagated from the measurement error of \(\sigma_{\rm ap}\), and \(\Delta\sigma_{0}^{\rm AC}\) is the aperture-correction-induced error propagated from the uncertainty of \(\eta\). The systematic error due to the extra mass contribution from the outer matters of the lensing galaxy along the line of sight, \(\Delta\sigma_{0}^{\rm sys}\), is taken as an uncertainty of \(\sim 3\%\) to the velocity dispersion [33].

Once we know the ratio of the angular diameter distances \(D_{s}/D_{ls}\), the constraints on the PPN parameter \(\gamma_{\rm PPN}\) can be derived by comparing the observational and theoretical values of the velocity dispersions (see Equations (13) and (14)). Conventionally the distance ratio \(D_{s}/D_{ls}\) is calculated within the standard \(\Lambda\)CDM cosmological model [9; 10]. However, \(\Lambda\)CDM itself is built on the framework of GR and this leads to a circularity problem [13; 14]. To avoid this problem, we will use a cosmological-model-independent method which is based upon the sum rule of distances in the FLRW metric to constrain \(\gamma_{\rm PPN}\).

### Distance Sum Rule

In a homogeneous and isotropic space, the dimensionless comoving distance \(d\left(z_{l},\ z_{s}\right)\equiv\left(H_{0}/c\right)\left(1+z_{s}\right)D_{ A}\left(z_{l},\ z_{s}\right)\) can be written as

\[d(z_{l},z_{s})=\frac{1}{\sqrt{|\Omega_{k}|}}{\rm sinn}\left(\sqrt{|\Omega_{k}| }\int_{z_{l}}^{z_{s}}\frac{{\rm d}z^{\prime}}{E(z^{\prime})}\right)\, \tag{16}\]

where \(\Omega_{k}\) denotes the spatial curvature density parameter at the present time and \(E(z)=H(z)/H_{0}\) is the dimensionless expansion rate. Also, \({\rm sinn}(x)\) is \({\rm sinh}(x)\) when \(\Omega_{k}>0\), \(x\) when \(\Omega_{k}=0\), and \({\rm sin}(x)\) when \(\Omega_{k}<0\). By applying the notations \(d(z)\equiv d\left(0,\ z\right)\), \(d_{ls}\equiv d\left(z_{l},\ z_{s}\right)\), \(d_{l}\equiv d\left(0,\ z\right)\), and \(d_{s}\equiv d\left(0,\ z_{s}\right)\), one can derive a sum rule of distances along the null geodesics of the FLRW metric as [34; 35; 36]

\[\frac{d_{ls}}{d_{s}}=\sqrt{1+\Omega_{k}d_{l}^{2}}-\frac{d_{l}}{d_{s}}\sqrt{1+ \Omega_{k}d_{s}^{2}}. \tag{17}\]

This relation provides a cosmology-independent probe to test both the spatial curvature and the FLRW metric. The validity of the FLRW metric can be tested by comparing the derived \(\Omega_{k}\) from the three distances (\(d_{l}\), \(d_{s}\), and \(d_{ls}\)) for any two pairs of (\(z_{l}\), \(z_{s}\)).

With Equation (17), the distance ratio \(D_{s}/D_{ls}\)1 in Equation (13) is only related to the curvature parameter \(\Omega_{k}\) and the dimensionless distances \(d_{l}\) and \(d_{s}\). If independent measurements of \(d_{l}\) and \(d_{s}\) are given, we can put constraints on both \(\gamma_{\rm PPN}\) and \(\Omega_{k}\) from Equations (13) and (17) without assuming any specific cosmological model.

Footnote 1: Note that \(D_{s}/D_{ls}\) is actually equal to the dimensionless distance ratio \(d_{s}/d_{ls}\).

### Artificial Neural Network

To calibrate the distances \(d_{l}\) and \(d_{s}\) of the SGL systems (i.e., the distances \(d_{l}\) and \(d_{s}\) on the right side of Equation (17)), we use a new nonparametric approach, ANN, to reconstruct a smooth distance-redshift relation \(d(z)\) from SN Ia observation.

ANNs possess several desirable properties, including high-level abstraction of neural input-output transformation, the ability to generalize from learned instances to new unseen data, adaptability, self-learning, fault tolerance, and nonlinearity [37]. According to the universal approximation theorem [38; 23], ANNs can function as universal function approximations to simulate arbitrary input-output relationships using multilayer feedforward networks with a sufficient number of hidden units. Therefore, we can input the redshift \(z\) into the neural network, with the corresponding comoving distance \(d(z)\) and its associated error \(\sigma_{d(z)}\) as the desired outputs. Once the network has been trained using the Pantheon+ sample, we will obtain an approximate function capable of predicting both \(d(z)\) and its error \(\sigma_{d(z)}\) at any given redshift \(z\).

Ref. [25] has developed a Python code for the reconstruction of functions from observational data employing an ANN. They have substantiated the reliability of these reconstructed functions by estimating cosmological parameters through the
utilization of the reconstructed Hubble parameter \(H(z)\) and the luminosity distance \(D_{L}(z)\), in direct comparison with observational data. In our study, we will employ this code to reconstruct the distance-redshift relation.

The general structure of an ANN consists of an input layer, one or more hidden layers, and an output layer. The basic unit of these layers are referred to as neurons, which serve as both linear transformation units and nonlinear activation functions for the input vector. In accordance with Ref. [25], we employ the Exponential Linear Unit as our chosen activation function, as defined by its form in [39]:

\[f\left(x\right)=\left\{\begin{array}{cc}x&x>0\\ \alpha\left(e^{x}-1\right)&x\leq 0\end{array}\right., \tag{18}\]

where the hyperparameter \(\alpha\) is set to 1.

The network is trained by minimizing a loss function, which quantitatively measures the discrepancy between the ground truth and predicted values. In this analysis, we adopt the mean absolute error (MAE), also known as the L1 loss function, as our choice of loss function. The linear weights and biases within the network are optimized using the back-propagation algorithm. We employ the Adam optimizer [40], a gradient-based optimization technique, to iteratively update the network parameters during training. This choice of optimizer also contributes to faster convergence. After multiple iterations, the network parameters are adjusted to minimize the loss. We have determined that a sufficient number of iterations for training convergence is reached when the loss no longer decreases, which we set to be \(3\times 10^{5}\). Batch Normalization [41] is a technique designed to stabilize the distribution of inputs within each layer, allowing for higher learning rates and reduced sensitivity to initialization.

To determine the optimal network model, we train the network using 1701 SNe Ia from the Pantheon+ sample (more on this below) and assess the fitting effect through K-fold cross-validation [42]. In K-fold cross-validation, the training set is divided into k smaller sets, with k-1 folds used as training data for model training, and the remaining fold used for validation. This process is repeated k times, with each fold serving as the validation data once. The final performance of the model is determined by averaging the performance across these k iterations. This approach is particularly useful when the number of samples available for learning is insufficient to split into traditional train, validation, and test sets, as is the case in our analysis. Additionally, it helps mitigate issues arising from the randomness in data partitioning. As a general guideline, we have selected \(k=10\) for our cross-validation procedure and have utilized the mean squared error (MSE) as the metric for validating the performance of the model.

Through our experimentation, we have found that the network model with a single hidden layer comprising 4096 neurons and without batch normalization yields the best results. We conduct comparisons with models having varying numbers of hidden layers, and we observe diminished performance as the number of hidden layers increased, accompanied by increased computational resource consumption. Regarding the number of neurons in the hidden layer, we observe negligible impact on the results, as reflected by the final MSE values consistently hovering around 0.0042, regardless of whether the number of neurons was set to 1024, 2048, 4096, or 8192. Importantly, the final MSE value with 4096 neurons was slightly smaller compared to the other three configurations, and as a result, we select this configuration. The validation values for implementing batch normalization or not implementing it is 0.0049 or 0.0042, respectively.

Subsequently, we will employ the optimal network model, as described above, to reconstruct our distance-redshift curve.

### Supernova Data

In order to reconstruct the distance function \(d(z)\), we choose the latest combined sample of SNe Ia called Pantheon+ [43], which consists of 1701 light curves of 1550 SNe Ia, covering the redshift range \(0.001<z<2.3\). For each SN Ia, the distance modulus \(\mu\) is related to the luminosity distance \(D_{L}\) by

\[\mu(z)=5\log_{10}\left[\frac{D_{L}(z)}{\text{Mpc}}\right]+25\, \tag{19}\]

and the observed distance modulus is

\[\mu_{\text{obs}}(z)=m_{B}(z)+\kappa\cdot X_{1}-\omega\cdot\mathcal{C}-M_{B}\, \tag{20}\]

where \(m_{B}\) is the rest-frame \(B\) band peak magnitude, \(X_{1}\) and \(\mathcal{C}\), respectively, represent the time stretch of light curve and the SN color at maximum brightness, and \(M_{B}\) is the absolute \(B\)-band magnitude. Through the BEAMS with Bias Corrections method [44], the two nuisance parameters \(\kappa\) and \(\omega\) can be calibrated to zero. Then, the observed distance modulus can be simplified as

\[\mu_{\text{obs}}(z)=m_{\text{corr}}(z)-M_{B}\, \tag{21}\]

where \(m_{\text{corr}}\) is the corrected apparent magnitude. The absolute magnitude \(M_{B}\) is exactly degenerate with the Hubble constant \(H_{0}\). Once the value of \(M_{B}\) or \(H_{0}\) is known, the luminosity distances \(D_{L}(z)\) can be obtained from SNe Ia.

In this work, we adopt \(H_{0}=70\) km s\({}^{-1}\) Mpc\({}^{-1}\) to normalize the SN Ia \(D_{L}(z)\) data as the observational \(d(z)\). That is, \(d(z)=(H_{0}/c)D_{L}(z)/(1+z)\). Note that the choice of \(H_{0}\) has no impact on our results, since the required distance ratio \(D_{s}/D_{ls}\) (see Equation (13)) is completely independent of \(H_{0}\). Having obtained the dataset of \(d(z)\), we adopt ANN to reconstruct the distance function \(d(z)\), and the results are shown in Figure 1. The black line represents the reconstructed function of \(d(z)\), and the shaded region is the corresponding \(1\sigma\) confidence level.

### Strong-lensing Data

Recently, Ref. [15] compiled a galaxy-scale SGL sample including 161 systems with stellar velocity dispersion measurements, which is assembled with strict selection criteria to meet the assumption of spherical symmetry on the lens mass model. The observational information for each SGL system
are listed in Appendix of Ref. [15], including the lens redshift \(z_{l}\), the source redshift \(z_{s}\), the Einstein angle \(\theta_{E}\), the central velocity dispersion of the lensing galaxy \(\sigma_{\rm ap}\), the spectroscopic aperture angular radius \(\theta_{\rm ap}\), and the half-light angular radius of the lensing galaxy \(\theta_{\rm off}\).

By fitting the two-dimensional power-law luminosity profile convolved with the instrumental point spread function to the high-resolution Hubble Space Telescope imaging data over a circle of radius \(\theta_{\rm eff}/2\) centered on the lensing galaxies, Ref. [15] measured the slops of the luminosity density profile \(\delta\) for the 130 lensing galaxies in the full sample. They showed that \(\delta\) should be treated as as an observable for each lens in order to get an unbiased estimate of the cosmological parameter \(\Omega_{\rm m}\). Therefore, the SGL sample we adopt here is the truncated sample of 130 SGL systems with \(\delta\) measurements, for which the redshift ranges of lenses and sources are \(0.0624\leq z_{l}\leq 0.7224\) and \(0.1970\leq z_{s}\leq 2.8324\), respectively. In this work, we use the reconstructed distance function \(d(z)\) from Pantheon+ SNe Ia to calibrate the distances \(d_{l}\) and \(d_{s}\) of the SGL systems. However, the SN Ia catalog extends only to \(z=2.3\). As such, we shall employ only a sub-set of the SGL sample that overlaps with the SN Ia data for the calibration. Thus, only 120 SGL systems with \(z_{s}\leq 2.3\) are available in our analysis.

### The Likelihood Function

By using the Python Markov Chain Monte Carlo module EMCEE [45] to maximize the likelihood function \(\mathcal{L}\), we simultaneously place limits on the PPN parameter \(\gamma_{\rm PPN}\), the curvature parameter \(\Omega_{k}\), and the lens model parameters (\(\alpha_{0}\), \(\alpha_{z}\), and \(\alpha_{s}\)). The likelihood function is defined as

\[\mathcal{L}=\prod_{i=1}^{120}\frac{1}{\sqrt{2\pi}\Delta\sigma_{0,i}^{\rm tot}} \exp\left[-\frac{1}{2}\left(\frac{\sigma_{0,i}^{\rm th}-\sigma_{0,i}^{\rm obs} }{\Delta\sigma_{0,i}^{\rm tot}}\right)^{2}\right]\, \tag{22}\]

where the variance

\[\left(\Delta\sigma_{0}^{\rm tot}\right)^{2}=\left(\Delta\sigma_{0}^{\rm SGL} \right)^{2}+\left(\Delta\sigma_{0}^{\rm SN}\right)^{2} \tag{23}\]

is given in terms of the total uncertainty \(\Delta\sigma_{0}^{\rm SGL}\) derived from the SGL observation (Equation (15)) and the propagated uncertainty \(\Delta\sigma_{0}^{\rm SN}\) derived from the distance calibration by SNe Ia. With Equation (13), the propagated uncertainty \(\Delta\sigma_{0}^{\rm SN}\) can be estimated as

\[\Delta\sigma_{0}^{\rm SN}=\sigma_{0}^{\rm th}\frac{\Delta D_{r}}{2D_{r}}\, \tag{24}\]

where \(D_{r}\) is a convenient notation for the distance ratio in Equation (13), i.e., \(D_{r}\equiv D_{s}/D_{ls}=d_{s}/d_{ls}\), and its uncertainty is \(\Delta D_{r}\). With the reconstructed distance function \(d(z)\), as well as its \(1\sigma\) uncertainty \(\Delta d(z)\), from the SN Ia data, we can calibrate the distances (\(d_{l}\) and \(d_{s}\)) and their corresponding uncertainties (\(\Delta d_{l}\) and \(\Delta d_{s}\)) for each SGL system. Thus, the uncertainty \(\Delta D_{r}\) of the distance ratio can be easily derived from Equation (17), i.e.,

\[\begin{split}(\Delta D_{r})^{2}=& D_{r}^{4}\left( \frac{\Omega_{k}d_{l}}{\sqrt{1+\Omega_{k}d_{l}^{2}}}-\frac{\sqrt{1+\Omega_{k} d_{s}^{2}}}{d_{s}}\right)^{2}(\Delta d_{l})^{2}\\ &+D_{r}^{4}\left(\frac{d_{l}}{d_{s}^{2}\sqrt{1+\Omega_{k}d_{s}^{ 2}}}\right)^{2}(\Delta d_{s})^{2}\.\end{split} \tag{25}\]

## III Results

The 1D marginalized probability distributions and 2D plots of the \(1-2\sigma\) confidence regions for the PPN parameter \(\gamma_{\rm PPN}\), the cosmic curvature \(\Omega_{k}\), and the lens model parameters (\(\alpha_{0}\), \(\alpha_{z}\), and \(\alpha_{s}\)), constrained by 120 SGL systems, are presented in Figure 2, and the best-fitting results are listed in Table 1. These contours show that at the \(1\sigma\) confidence level, the inferred parameter values are \(\gamma_{\rm PPN}=1.16^{+0.15}_{-0.12}\), \(\Omega_{k}=0.89^{+1.97}_{-1.00}\), \(\alpha_{0}=1.2^{+0.15}_{-0.15}\), \(\alpha_{z}=-0.37^{+0.22}_{-0.26}\), and \(\alpha_{s}=0.70^{+0.10}_{-0.09}\). We find that the measured \(\gamma_{\rm PPN}\) is consistent with the prediction of \(\gamma_{\rm PPN}=1\) from GR, and its constraint accuracy is about 11.6%. While \(\Omega_{k}\) is weakly constrained, it is still compatible with zero spatial curvature within \(1\sigma\) confidence level. We also find that the inferred \(\alpha_{z}\) and \(\alpha_{s}\) separately deviate from zero at \(\sim 2\sigma\) and \(\sim 8\sigma\) levels, confirming previous finding that the total mass density slope \(\alpha\) strongly depends on both the lens redshift and the surface mass density [15].

We further explore the scenario of adopting a prior of flatness, i.e., \(\Omega_{k}=0\). For this scenario, as shown in Figure 3 and Table 1, the marginalized distribution gives \(\gamma_{\rm PPN}=1.09^{+0.11}_{-0.10}\), representing a precision of 9.6%, in good agreement with the prediction of GR. If instead we adopt a prior of \(\gamma_{\rm PPN}=1\) (i.e., assuming GR holds) and allow \(\Omega_{k}\) to be a free parameter, the resulting constraints on \(\Omega_{k}\) and the lens model parameters are displayed in Figure 4 and Table 1. The marginalized \(\Omega_{k}\) constraint is \(\Omega_{k}=0.12^{+0.78}_{-0.47}\), consistent with a spatially flat universe. The comparison among lines 1-3 of Table 1 suggests that different choices of priors have little effect on the lens model parameters (\(\alpha_{0}\), \(\alpha_{z}\), and \(\alpha_{s}\)).

Figure 1: Reconstruction of the dimensionless comoving distance \(d(z)\) from Pantheon+ SNe Ia using ANN. The shaded area is the \(1\sigma\) confidence level of the reconstruction. The blue dots with error bars represent the observational data.
## IV Conclusion and Discussions

Galaxy-scale SGL systems, combined with stellar velocity dispersion measurements of lensing galaxies, provide a powerful probe to test the validity of GR by constraining the PPN parameter \(\gamma_{\rm PPN}\) on kiloparsec scales. Testing GR in this manner, however, it is necessary to know the angular diameter distances between the observer, lens, and source. Conventionally, the required distances are calculated within the standard \(\Lambda\)CDM cosmological model. Such distance calculations would involve a circularity problem in testing GR, since \(\Lambda\)CDM itself is established on the framework of GR. In this paper, in order to address the circularity problem, we have employed the DSR in the FLRW metric to estimate not only \(\gamma_{\rm PPN}\) but also the spatial curvature \(\Omega_{k}\) independently of any specific cosmological model. To calibrate the distances of the SGL systems, we have introduced a new nonparametric approach for reconstructing the distance-redshift relation from the Pantheon+ SN Ia sample using an ANN, which has no assumptions about the observational data and is a completely

\begin{table}
\begin{tabular}{c c c c c} \hline \hline Priors & \(\gamma_{\rm PPN}\) & \(\Omega_{k}\) & \(\alpha_{0}\) & \(\alpha_{z}\) & \(\alpha_{s}\) \\ \hline None & \(1.16^{+0.15}_{-0.10}\) & \(0.89^{+1.57}_{-1.00}\) & \(1.20^{+0.15}_{-0.14}\) & \(-0.37^{+0.22}_{-0.17}\) & \(0.70^{+0.10}_{-0.09}\) \\ \(\Omega_{k}=0\) & \(1.09^{+0.11}_{-0.10}\) & & \(1.22^{+0.14}_{-0.14}\) & \(-0.20^{+0.11}_{-0.11}\) & \(0.67^{+0.09}_{-0.09}\) \\ \(\gamma_{\rm PPN}=1\) & & \(0.12^{+0.78}_{-0.47}\) & \(1.10^{+0.11}_{-0.12}\) & \(-0.20^{+0.15}_{-0.16}\) & \(0.74^{+0.08}_{-0.08}\) \\ \hline \end{tabular}
\end{table}
Table 1: Constraint results for All Parameters with Different Priors

Figure 2: 1D marginalized probability distributions and 2D \(1-2\sigma\) confidence contours for the PPN parameter \(\gamma_{\rm PPN}\), the cosmic curvature \(\Omega_{k}\), and the lens model parameters (\(\alpha_{0}\), \(\alpha_{z}\), and \(\alpha_{s}\)). The dashed lines represent \(\gamma_{\rm PPN}=1\) and \(\Omega_{k}=0\), corresponding to a flat universe with the validity of GR.
data-driven approach.

By combining 120 well-selected SGL systems with the reconstructed distance function from 1701 data points of SNe Ia, we have obtained simultaneous estimates of \(\gamma_{\rm PPN}\) and \(\Omega_{k}\) without any specific assumptions about the contents of the universe or the theory of gravity. Our results show that \(\gamma_{\rm PPN}=1.16^{+0.15}_{-0.12}\) and \(\Omega_{k}=0.89^{+1.97}_{-1.00}\). The measured \(\gamma_{\rm PPN}\) is in good agreement with the prediction of GR with 11.6% accuracy. If we use flatness as a prior (i.e., \(\Omega_{k}=0\)), we infer that \(\gamma_{\rm PPN}=1.09^{+0.11}_{-0.10}\), representing a precision of 9.6%. If we instead assume the conservation of GR (i.e., \(\gamma_{\rm PPN}=1\)) and allow \(\Omega_{k}\) to be a free parameter, we find \(\Omega_{k}=0.12^{+0.78}_{-0.47}\). The measured \(\Omega_{k}\) is consistent with zero spatial curvature, suggesting that there is no significant deviation from a flat universe.

In the literature, based on a sample of 80 SGL systems, Ref. [10] obtained the constraint accuracy of the PPN parameter \(\gamma_{\rm PPN}\) to be 25% under the assumption of a flat \(\Lambda\)CDM model with parameters taken from Planck observations. Within the same context of \(\Lambda\)CDM, Ref. [11] concluded that \(\gamma_{\rm PPN}=0.97\pm 0.09\) (representing a precision of 9.3%) by analyzing the nearby lens ESO 325-G004. Through the reanalysis of four time-delay lenses, Ref. [12] obtained simultaneous constraints of \(\gamma_{\rm PPN}\) and the Hubble constant \(H_{0}\) for flat \(\Lambda\)CDM, yielding \(\gamma_{\rm PPN}=0.87^{+0.19}_{-0.17}\) (representing a precision of 21%) and \(H_{0}=73.65^{+1.95}_{-2.26}\) km s\({}^{-1}\) Mpc\({}^{-1}\). Within a flat FLRW metric, Ref. [13] used 120 lenses to achieve a model-independent estimate of \(\gamma_{\rm PPN}=1.065^{+0.064}_{-0.074}\) (representing a precision of 6.5%) by employing the GP method to reconstruct the SN distances. As a further refinement, Ref. [14] removed the flatness assumption and implemented the DSR to obtain model-independent constraints of \(\gamma_{\rm PPN}=1.11^{+0.11}_{-0.09}\) (representing a precision of 9.0%) and \(\Omega_{k}=0.48^{+1.09}_{-0.71}\). Note that in Ref. [14] the distances of the SGL systems were determined by fitting a third-order polynomial to the SN Ia data. Unlike the polynomial fit that rely on the assumed parameterization, the ANN used in this work is a completely data-driven approach that could reconstruct a function from various data without assuming a parameterization of the function. Moreover, unlike the GP method that rely on the assumption of Gaussian distributions for the observational random variables, the ANN method has no assumptions about the data. More importantly, compared to previous results, our work yielded comparable resulting constraints on \(\gamma_{\rm PPN}\), which indicates the effectiveness of data-driven modeling based on the ANN.

Looking forward, the forthcoming Large Synoptic Survey Telescope (LSST) survey, with its excellent operation performance, holds great promise for detecting a large number of lenses, potentially reaching up to 120,000 in the most optimistic scenario [46]. By setting a prior on the curvature parameter \(-0.007<\Omega_{k}<0.006\), Ref. [10] showed that 53,000 simulated LSST strong lensing data would set a stringent constraint of \(\gamma_{\rm PPN}=1.000^{+0.009}_{-0.0011}\), reaching a precision of \(10^{-3}\sim 10^{-4}\). Similarly, Ref. [47] performed a robust extragalactic test of GR using a well-defined sample of 5,000

Figure 3: Same as Figure 2, except now for the scenario with a prior of \(\Omega_{k}=0\). The dashed line represents \(\gamma_{\rm PPN}=1\) predicted by GR.
simulated strong lenses from LSST, yielding an accuracy of 0.5%. In brief, much more severe constraints on both \(\gamma_{\rm PPN}\) and \(\Omega_{k}\), as discussed in this work, can be expected with the help of future lens surveys.

###### Acknowledgements.

 This work is partially supported by the National Natural Science Foundation of China (grant Nos. 12373053 and 12041306), the Key Research Program of Frontier Sciences (grant No. ZDBS-LY-7014) of Chinese Academy of Sciences, the Natural Science Foundation of Jiangsu Province (grant No. BK20221562), and the Young Elite Scientists Sponsorship Program of Jiangsu Association for Science and Technology.
