  This study investigates the first-order phase transition within neutron
stars, leveraging the deep neural network (DNN) framework alongside
contemporary astronomical measurements. The equation of state (EOS) for neutron
stars is delineated in a piecewise polytropic form, with the speed of sound
($c_s$) serving as a pivotal determinant. In the phase transition region, $c_s$
is presumed to be zero, while in other intervals, it is optimized utilizing the
DNN. Various onset energy densities of phase transition ($\varepsilon_{pt}$),
spanning from $2\varepsilon_0$ to $3\varepsilon_0$ (where $\varepsilon_0$
denotes the energy density at nuclear saturation density), as well as phase
transition widths ($\Delta\varepsilon$) ranging from $0.5\varepsilon_0$ to
$\varepsilon_0$, are examined. Our findings underscore that smaller values of
$\varepsilon_{pt}$ lead to a more substantial impact of $\Delta\varepsilon$ on
neutron star properties, encompassing maximum mass, corresponding radius, tidal
deformability, phase transition mass, and trace anomaly. Conversely, when
$\varepsilon_{pt}$ exceeds $2.5\varepsilon_0$, the influence of
$\Delta\varepsilon$ diminishes, resulting in a stiffer EOS compared to
scenarios lacking a phase transition. Furthermore, the trace anomaly at high
density shifts to negative values upon the commencement of the phase
transition. It is noteworthy that the correlations between the average speed of
sound at different energy density segments demonstrate a notably weak
connection. The discernment of whether a phase transition has occurred with the
present observables of neutron stars poses a challenging task.
