Correlation-pattern-based Continuous-variable Entanglement Detection
  through Neural Networks
Entanglement in continuous-variable non-Gaussian states provides
irreplaceable advantages in many quantum information tasks. However, the sheer
amount of information in such states grows exponentially and makes a full
characterization impossible. Here, we develop a neural network that allows us
to use correlation patterns to effectively detect continuous-variable
entanglement through homodyne detection. Using a recently defined stellar
hierarchy to rank the states used for training, our algorithm works not only on
any kind of Gaussian state but also on a whole class of experimentally
achievable non-Gaussian states, including photon-subtracted states. With the
same limited amount of data, our method provides higher accuracy than usual
methods to detect entanglement based on maximum-likelihood tomography.
Moreover, in order to visualize the effect of the neural network, we employ a
dimension reduction algorithm on the patterns. This shows that a clear boundary
appears between the entangled states and others after the neural network
processing. In addition, these techniques allow us to compare different
entanglement witnesses and understand their working. Our findings provide a new
approach for experimental detection of continuous-variable quantum correlations
without resorting to a full tomography of the state and confirm the exciting
potential of neural networks in quantum information processing.
Xiaoting Gao, Mathieu Isoard, Fengxiao Sun, Carlos E. Lopetegui, Yu Xiang, Valentina Parigi, Qiongyi He, Mattia Walschaers
# Correlation-pattern-based Continuous-variable Entanglement Detection through Neural Networks

###### Abstract

Entanglement in continuous-variable non-Gaussian states provides irreplaceable advantages in many quantum information tasks. However, the sheer amount of information in such states grows exponentially and makes a full characterization impossible. Here, we develop a neural network that allows us to use correlation patterns to effectively detect continuous-variable entanglement through homodyne detection. Using a recently defined stellar hierarchy to rank the states used for training, our algorithm works not only on any kind of Gaussian state but also on a whole class of experimentally achievable non-Gaussian states, including photon-subtracted states. With the same limited amount of data, our method provides higher accuracy than usual methods to detect entanglement based on maximum-likelihood tomography. Moreover, in order to visualize the effect of the neural network, we employ a dimension reduction algorithm on the patterns. This shows that a clear boundary appears between the entangled states and others after the neural network processing. In addition, these techniques allow us to compare different entanglement witnesses and understand their working. Our findings provide a new approach for experimental detection of continuous-variable quantum correlations without resorting to a full tomography of the state and confirm the exciting potential of neural networks in quantum information processing.

_Introduction.--_The study of quantum entanglement is experiencing a thorough theoretical development and an impressive experimental progress [1; 2], leading to important applications in quantum cryptography [3], quantum metrology [4] and quantum computation [5]. It is, therefore, crucial to find reliable and practical methods to detect entanglement. Especially in the continuous variable (CV) regime, significant breakthroughs have recently been achieved in the experimental preparation of non-Gaussian entanglement [6; 7]. Such entangled states have been proven to be essential resource for entanglement distillation [8; 9; 10], quantum-enhanced imaging [11; 12] and sensing [13; 14], and to reach a quantum computational advantage [15]. However, entanglement detection in such complex systems turns out to be a challenging problem.

The conventional entanglement criteria which rely on the knowledge of reconstructed density matrix, such as the positive partial transpose (PPT) criterion [16] or the quantum Fisher information (QFI) criterion proposed in Ref. [17], are experimentally infeasible for general non-Gaussian states. A common thought is to avoid the time-consuming process of two-mode tomography [18], which requires performing joint measurements on many quadrature combinations [19]. Only for some states with specific analytic structures [20], this demanding procedure can be simplified to a series of single-mode homodyne tomography [21]. An innovative approach to overcome this issue is provided by deep neural networks [22], which can work with limited amounts of data from actual measurements. Recently, neural networks have found extensive applications in quantum physics and quantum information science [23; 24], including detecting quantum features [25; 26; 27; 28], characterizing quantum states and quantum channels [29; 30; 31; 32; 33; 34; 35], and solving many-body problems [36; 37; 38]. A key step thus lies in selecting an appropriate training data set to ensure that the networks can effectively and universally learn the features of the quantum system. Keeping our focus on the homodyne measurements which are feasible in CV experiments, we seek to answer the following question in this paper: Can neural networks be used to detect entanglement for general non-Gaussian states?

In this work, we develop a deep learning algorithm to detect entanglement for arbitrary two-mode CV states, including experimentally relevant photon subtracted states [7]. Instead of extracting entanglement properties from the density matrices, our neural network is only based on four correlation patterns, which can be easily measured via homodyne measurements. It can be found that our algorithm achieves much higher accuracy than PPT and QFI criteria based on the maximum likelihood (MaxLik) algorithm with the same homodyne data. Our network also shows strong robustness for single-photon subtracted states. Furthermore, with a visualization tool, namely a t-SNE algorithm, we show that elusive entanglement information is hidden in the correlation patterns, hence in the joint probability distributions. It can be seen that the neural network is indeed able to correctly sort out data: clusters of entangled states clearly emerge after neural network processing. Therefore, our findings
provide an approach for detecting CV entanglement in experimentally-accessible ways and confirm the deep neural network approach as a powerful tool in quantum information processing.

_Generation and selection of CV states._--We start by generally characterizing two-mode CV quantum states in order to generate an abundant training data set. To do so, we rely on the recently developed stellar formalism [39, 40, 41]. In this formalism, we analyse a pure state \(|\psi\rangle\) in terms of its stellar function \(F_{\phi}^{*}(\mathbf{z})\). To define this function, we start by considering the state's decomposition in the Fock basis, i.e., \(|\psi\rangle=\sum\limits_{\mathbf{n}\geq 0}\psi_{\mathbf{n}}|\mathbf{n}\rangle\in\mathcal{H}^{ \otimes 2}\) with \(\mathbf{n}=(n_{1},n_{2})\), such that the stellar function can be written as

\[F_{\phi}^{*}(\mathbf{z})\equiv e^{\frac{1}{2}|\mathbf{n}|^{2}}\,\langle\mathbf{z}^{*}| \psi\rangle=\sum\limits_{n_{1},n_{2}}\frac{\psi_{\mathbf{n}}}{\sqrt{n_{1}!n_{2}!}} z_{1}^{n_{1}}z_{2}^{n_{2}},\ \ \forall\ \mathbf{z}=(z_{1},z_{2})\in\mathbb{C}^{2} \tag{1}\]

where \(|\mathbf{z}\rangle=\mathrm{e}^{-\frac{1}{2}|\mathbf{n}|^{2}}\sum\limits_{n_{1},n_{2}} \frac{z_{1}^{n_{1}}z_{2}^{n_{2}}}{|n_{1},n_{2}\rangle}|n_{1},n_{2}\rangle\) is a coherent state of complex amplitude \(\mathbf{z}\). The stellar rank \(r\) of \(|\psi\rangle\) is defined as the number of zeros of its stellar function, representing a minimal non-Gaussian operational cost. For instance, \(r=0\) means that the state is Gaussian, while \(r=1\) corresponds to a class of non-Gaussian states that contains, both, single-photon added and subtracted states [41]. Any multimode pure state \(|\psi\rangle\) with finite stellar rank \(r\) can be decomposed into \(|\psi\rangle=\hat{G}|C\rangle\), where \(\hat{G}\) is a given Gaussian operator acting onto the state \(|C\rangle\), which is called core state; it is a normalized pure quantum state with multivariate polynomial stellar function of degree \(r\), equal to the stellar rank of the state. It then follows immediately that Gaussian operations \(\hat{G}\) must preserve the stellar rank [40].

We generate states \(\hat{\rho}\) in our data set by first creating a core state \(|C\rangle\) with a given stellar rank \(r\leq 2\) and random complex coefficients for the superposition in the Fock basis. Then, according to the Bloch-Messiah decomposition, any multimode Gaussian unitary operation \(\hat{G}\) can be decomposed as \(\hat{G}=\hat{\mathcal{U}}(\varphi)\hat{\mathcal{S}}(\xi)\hat{\mathcal{D}}( \alpha)\hat{\mathcal{V}}(\phi)\), where \(\hat{\mathcal{U}}\) and \(\hat{\mathcal{V}}\) are beam-splitter operators, \(\hat{\mathcal{S}}\) is a squeezing operator and \(\hat{\mathcal{D}}\) is a displacement operator. We choose random values for the parameters \(\varphi\), \(\xi\), \(\alpha\) and \(\phi\) of the different operators and apply the corresponding operation \(\hat{G}\) to the core state \(|C\rangle\) to produce the random state \(|\psi\rangle=\hat{G}|C\rangle\). Finally, by adding optical losses to simulate an experimental loss channel, a lossy two-mode state \(\hat{\rho}\) is generated. More details can be found in A.

_Homodyne data._--The aim of our work is to feed our neural network with data that are directly accessible in experiments. To this goal, we focus on quadrature statistics, which in quantum optics experiments can be directly obtained through homodyne detection. The quadrature observables \(\hat{x}_{k}\) and \(\hat{p}_{k}\) in the modes \(k=1,2\) can be defined as the real and imaginary parts of the photon annihilation operator \(\hat{a}_{k}\) such that \(\hat{x}_{k}\equiv(\hat{a}_{k}+\hat{a}_{k}^{\dagger})\) and \(\hat{p}_{k}\equiv i(\hat{a}_{k}^{\dagger}-\hat{a}_{k})\). Homodyne detection then corresponds to a projective measurement on eigenstates of these quadrature operators. Hence, we define these eigenstates as \(\hat{x}_{k}|X_{k}\rangle=X_{k}|X_{k}\rangle\) and \(\hat{p}_{k}|P_{k}\rangle=P_{k}|P_{k}\rangle\), where \(X_{k}\) and \(P_{k}\) describe the continuum of real measurement outcomes for the quadrature measurements in the mode \(k\).

For any given state \(\hat{\rho}\), we can obtain the joint quadrature statistics \(\mathcal{P}(X_{1},X_{2})\equiv\langle X_{1};X_{2}|\hat{\rho}|X_{1};X_{2}\rangle\) (other joint statistics are defined analogously). The density matrix is known in its Fock basis decomposition, we can explicitly calculate the joint quadrature statistics as

\[\mathcal{P}(X_{1},X_{2})=\sum\limits_{\begin{subarray}{c}n_{1},n_{2}\\ n_{1},n_{2}\end{subarray};n_{1}^{\prime},n_{2}^{\prime}}\langle X_{1}|n_{1} \rangle\langle X_{2}|n_{2}\rangle\langle X_{1}|n_{1}^{\prime}\rangle^{*} \langle X_{2}|n_{2}^{\prime}\rangle^{*}. \tag{2}\]

These quantities can be evaluated directly using the wave functions of Fock states which are given by \(\langle X_{k}|n_{k}\rangle=H(n_{k},X_{k}/\sqrt{2})e^{-\frac{\pi^{2}}{4}}/[(2\pi )^{1/4}\sqrt{2^{n_{k}}n_{k}!}]\), where \(H(n_{k},X_{k}/\sqrt{2})\) denotes a Hermite polynomial. Other joint quadrature distributions can be calculated analogously, using \(\langle P_{k}|n_{k}\rangle=i^{n_{k}}H(n_{k},P_{k}/\sqrt{2})e^{-\frac{\pi^{2}}{4 }}/[(2\pi)^{1/4}\sqrt{2^{n_{k}}n_{k}!}]\).

_Training process._--The method described above to generate random states is repeated \(15,000\) times to obtain a set \(\varrho\) with a wide variety of density matrices. To evaluate the performance of the model on an independent data set, we use a cross-validation method to tune the hyperparameters of the model and split the entire data set into two parts: 70% for training and 30% for validation. For each density matrix \(\hat{\rho}\), four joint quadrature statistics \(\mathcal{P}(X_{1},X_{2})\), \(\mathcal{P}(X_{1},P_{2})\), \(\mathcal{P}(P_{1},X_{2})\), \(\mathcal{P}(P_{1},P_{2})\), see Eq. (2), and the corresponding output entanglement label \(\mathcal{E}_{\hat{p}}^{\text{True}}\) are calculated, see Fig. 1 for a scheme of the training data processing. Since the joint probability distributions are continuous over the whole phase space, they need to be discretized before we can feed the neural network with them. To that end, we restrict the region of phase space with values going from -6 to 6 and bin each distribution into a \(24\times 24\) correlation pattern. Every pixel is given by the median value of the joint probability distribution in the corresponding grid. For each state \(\hat{\rho}\), we thus obtain a \(24\times 24\times 4\)-dimensional tensor \(\mathcal{M}_{\hat{\rho}}\). Then for the full set of density matrices, \(\mathcal{M}_{\varrho}\) together with the entanglement labels \(\mathcal{E}_{\varrho}^{\text{True}}\) are used for training the neural network with Adam optimization algorithm. As shown in Fig. 1, each node of

Figure 1: Scheme of the training data processing. The generation of the training data set begins with a series of random density matrices \(\varrho\). Then for each density matrix one generates 24\(\times\)24\(\times\)4-dimensional correlation patterns \(\mathcal{M}_{\varrho}\) as input data of the neural network. At the output, 3 entanglement labels \(\mathcal{E}^{\text{Phot}}\) are computed from \(\varrho\) and fed into the neural network for training. The loss function is evaluated between the true entanglement labels \(\mathcal{E}_{\varrho}^{\text{True}}\) and the predicted labels \(\mathcal{E}^{\text{Phot}}\) output from the neural network.
the three hidden fully connected layers performs a unique linear transformation on the input vector from its previous layer, followed by a nonlinear ReLU activation function. The loss function is evaluated between the true entanglement labels \(\mathcal{E}_{\varrho}^{\text{True}}\) and the predicted labels \(\mathcal{E}^{\text{Pred}}\) output from the neural network with the binary cross-entropy. The backward processes are iterated until the loss function converges.

The binary entanglement labels \(\mathcal{E}_{\varrho}^{\text{True}}=\{E_{\text{PPT}},E_{\text{QPI}}^{(1)},E_{ \text{QPI}}^{(2)}\}_{\varrho}\) are obtained for the classification task to detect whether the state in set \(\varrho\) is entangled or not via PPT [16] and QFI [17] criteria. In PPT criterion, the two-mode state is entangled if the partial transpose over one of its modes has negative eigenvalues, which leads to \(\|\hat{\varrho}^{\text{T}_{\text{R}}}\|_{1}>1\). Here, we label the states that satisfy this inequality as \(E_{\text{PPT}}=1\) and the rest as \(E_{\text{PPT}}=0\). The metrological-entanglement-based QFI criterion, is based on estimating a parameter \(\theta\) which is implemented through \(\hat{\rho}_{\theta}=e^{-i\theta\hat{A}}\hat{\rho}e^{i\theta\hat{A}}\), where \(\hat{A}=\sum_{i=1}^{2}\hat{A}_{i}\) is a sum of arbitrary local observable \(\hat{A}_{i}\) for the \(i\)th mode. The intuitive idea behind the QFI criterion is to detect entanglement by showing \(\hat{\rho}\) allows us to estimate \(\theta\) with a precision that is higher than what could have been achieved with a separable state with the same variances fr the generators. More rigorously, the criterion is given by \(E[\hat{\rho},\hat{A}]=F_{Q}(\hat{\rho},\hat{A})-4\sum_{i=1}^{2}\text{Var}[\hat {\rho},\hat{A}_{i}]\), where \(F_{Q}\) is the quantum Fisher information of state \(\hat{\rho}\), and \(\text{Var}[\cdot]\) denotes the variance. The entanglement witness depends on the choice of the observable \(\hat{A}_{i}\), which can be constructed by optimizing over an arbitrary linear combination of operators (namely, \(\hat{A}_{i}=\mathbf{n}\cdot\mathbf{H}=\sum_{k=1}n_{k}\hat{H}_{k}\)) [17]. At the first order, \(\mathbf{H}\) takes the form of \(\mathbf{H}^{(1)}=(\hat{x}_{i},\hat{p}_{i})\) with \(i=1,2\). To capture more correlations of non-Gaussian states, we can extend the set of operators by adding three second-order nonlinear operators: \(\mathbf{H}^{(2)}=(\hat{x}_{i},\hat{p}_{i},\hat{x}_{i}^{2},\hat{p}_{i}^{2},(\hat {x}_{i}\hat{p}_{i}+\hat{p}_{i}\hat{x}_{i})/2)\). If \(E[\hat{\rho},\hat{A}]>0\), the state is identified as QFI-type entangled and labeled as \(E_{\text{QFI}}^{(n)}=1\), otherwise it is labeled as \(E_{\text{QPI}}^{(n)}=0\), where \(n\) refers to the set \(\mathbf{H}^{(n)}\) which is used to compute \(E[\hat{\rho},\hat{A}]\).

After \(3,000\) epochs of training the loss function has converged and the network has captured the features mapping the correlation patterns to the entanglement labels, without providing the full density matrices \(\varrho\). This is a crucial element since experiments generally do not have access to the full density matrix of a produced state, and what can be acquired is partial correlation information from measurements.

_Testing process.--_To test the network with experimental-like data, we simulate the homodyne measurement outcomes via a Monte Carlo sampling method. The test data are obtained from previously unseen quantum states, denoted as \(\varrho_{\text{test}}\). For each pattern of the state in \(\varrho_{\text{test}}\), we perform \(N\) repetitions of sampling to simulate the joint measurement events for each mode, forming a \(2\times N\)-dimensional outcomes and used to recover the joint probability distributions. However, directly feeding the raw sampling results into the neural network is infeasible, as the input layer of our trained network requires \(24\times 24\times 4\)-dimensional data. Thus, we also bin each \(2\times N\) sampling points into a \(24\times 24\)-dimensional matrix. Figure 2(a) shows the discretized correlation patterns with different numbers of sampling points \(N\). The plot with \(N=\infty\) is directly obtained from discretizing the theoretical joint probability distributions. As the number of samples \(N\) increases from \(10\) to \(100,000\), the Monte Carlo sampling result converges towards the \(N=\infty\) case.

We compare the performance of the neural network with PPT and QFI entanglement predictions estimated from the MaxLik algorithm by quantifying the ratio of states the different algorithms correctly classified within the set \(\varrho_{\text{test}}\). The MaxLik algorithm is a statistical method and can process the same Monte Carlo sampling outcomes to conduct the state tomography and reconstruct corresponding density matrices \(\varrho_{\text{MaxLik}}\)[18]. After \(20\) iterations of the algorithm, the entanglement labels \(\mathcal{E}^{\text{MaxLik}}\) can be derived using PPT and QFI criteria. A significant difference between deep learning and MaxLik is that the former excels at extracting features and insights from a large data set, enabling the neural network to extrapolate and make accurate predictions for unseen data, while the latter reconstructs each state separately without relying on prior experience.

In Figs. 2(b) and (c), the orange and blue lines show the accuracy of \(\mathcal{E}^{\text{Pred}}\) predicted by our neural network. The gray lines show the accuracy of \(\mathcal{E}^{\text{MaxLik}}\) based on MaxLik. For PPT-type entanglement \(E_{\text{PPT}}\), the accuracy of the neural network achieves \(0.993\) when the number of Monte Carlo sampling points is \(N=100,000\). On the contrary, even though the average fidelity between \(\varrho_{\text{test}}\) and the reconstructed density matrix \(\varrho_{\text{MaxLik}}\) increases from \(0.734\) to \(0.945\), the accuracy of MaxLik remains unchanged when the number of samples increases. For QFI-type entanglement \(E_{\text{QPI}}^{(n)}\), the accuracy of the neural network achieves \(0.913\) and \(0.923\) for the first and second order when \(N=100,000\), respectively. With the same amount of joint homodyne measurement data, the

Figure 2: (a) Binned correlation patterns of a state \(\hat{\rho}\in\varrho_{\text{test}}\) when the number of Monte Carlo sampling points \(N=10,100,1000,10,000\) and \(100,000\). The plot with \(N=\infty\) shows the correlation patterns directly discretized from the theoretical joint probability distributions. (b) Accuracy of PPT-type entanglement prediction from the neural network (orange line) and MaxLik algorithm (gray line) against the same value of \(N\) in (a). (c) Accuracy of QFI-type entanglement prediction from the neural network (blue lines) and MaxLik (gray lines) algorithm against \(N\). Solid and dashed lines represent the first and second-order QFI, respectively.
neural network shows better performance than the standard state reconstruction process through the MaxLik algorithm.

Furthermore, we test our network on lossy single-photon subtracted states [42]. This class of states is included in our training data set since it can be decomposed as

\[\ket{\psi}_{\text{sub}} \propto(\text{cos}\gamma\hat{a}_{1}+\text{sin}\gamma\hat{a}_{2}) \hat{S}_{1}(\xi_{1})\hat{S}_{2}(\xi_{2})\ket{00} \tag{3}\] \[=\hat{S}_{1}(\xi_{1})\hat{S}_{2}(\xi_{2})(\text{cos}\gamma\text{ sinh}r_{1}\text{e}^{i\omega_{1}}\ket{10}+\text{sin}\gamma\text{sinh}r_{2} \text{e}^{i\omega_{2}}\ket{01}).\]

where \(\hat{S}_{i}(\xi_{i})\) is the single-mode squeezing on mode \(i\) with squeezing parameter \(\xi_{i}=r_{i}\text{e}^{i\omega}\), and \(\gamma\) is the angle controlling the probability in which mode the single photon is subtracted. Hence we can also test how our network performs for this kind of state. The accuracy to predict PPT-type entanglement achieves \(0.985\) when the number of sampling points is \(N=100,000\). We compare the robustness of our network with another existing experiment-friendly criterion based on Fisher information reported in Ref. [43] for a state \(\ket{\psi}_{\text{sub}}\) with squeezing parameters \(r_{1}=2\text{dB}\) and \(r_{2}=-3\text{dB}\), and \(\omega_{1}=\omega_{2}=0\). While the other criterion cannot detect the entanglement when the loss coefficient \(\eta\) is larger than \(0.06\), our neural network performs with a much stronger robustness leading to a loss threshold \(\eta=0.33\) for the first-order QFI, and beyond \(\eta=0.5\) for PPT and second order QFI (see Fig. 6 of the Appendix).

_Clustering process._--To visualise how our neural network processes input correlation patterns, we use t-Distributed Stochastic Neighbor Embedding (t-SNE) [44] as a dimension reduction technique to compare our data before and after the processing by the neural network. Different from the supervised classifier neural networks, the t-SNE algorithm is an unsupervised learning approach dealing with unlabeled data. This visualization tool has been widely used in many biology and marketing problems, like cell population identification [45; 46] and customer segmentation [47]. It can be seen that clusters of entangled states clearly emerge after neural network processing.

Figure 3(a) shows two \(24\times 24\times 4\)-dimensional correlation patterns of a state with non-entangled labels \(\{0,0,0\}\) and a state with entangled labels \(\{1,1,1\}\), marked with red and yellow triangles, respectively. These high-dimensional data can be mapped into a two-dimensional plane through the t-SNE algorithm and the results are shown in Figs. 3(b)(c)(d). The left plot of Fig. 3(b) exhibits clusters formed from the discretized correlation patterns of the whole training data set (\(n=15,000\)). Each point represents a quantum state, colored by its PPT-type entanglement label \(E_{\text{PPT}}=0\) (dark green) or \(E_{\text{PPT}}=1\) (light green). The right plot of Fig. 3(b) reveals clusters formed from output vectors of the last hidden layer of the neural network with 64 neurons. After the neural network processing, the two overlapped dark green and light green clouds have largely detached from each other, forming disjoint clusters. We can clearly see that the two triangles significantly separate and now belong to their respective cluster.

Similarly, clusters in Figs. 3(c) and (d) are of the same shape as in (b), but colored with the first-order and second-order QFI-type entanglement labels \(E_{\text{QPI}}^{(1)}\) and \(E_{\text{QFI}}^{(2)}\). Again, the two clouds are better separated after the neural network processing [right plots of (c) and (d)]. Comparing (c) with (d), we can see that the light green cluster in (d) covers more area than in (c), which intuitively shows that, as expected, second-order QFI-type criterion finds more entangled states than first-order. These results clearly show how different clusters of states have different metrological capabilities.

Even though there is no explicit boundary between the two classes (entangled or not) in the left cluster of Fig. 3(b), where the neural network has not been applied yet, the two classes of states already tend to cluster together. This implies that the correlation patterns inherently contain entanglement-related regularities for the studied states, which makes it more feasible for the deep learning algorithm to learn from the training data. Therefore, this visualization method provides us with a technique to select appropriate input data when detecting a specific quantum feature through the deep learning algorithm.

In conclusion, we develop a neural network to detect

Figure 3: Two-dimensional clusters of two-mode CV states. (a) Examples of \(24\times 24\times 4\)-dimensional correlation patterns for two input states. (b) Left: The 2-dimensional clustering of states before being fed into the network, where t-SNE preserves the pairwise similarities between data points. Right: The same dimension reduction process is conducted on the 64-dimensional array from the last hidden layer of the neural network. Points representing PPT-type entangled (\(E_{\text{PPT}}=1\)) are colored in light green, while others are colored in deep green, (c) and (d) use the same method as (b) but are colored according to the first-order and second-order QFI-type entanglement labels \(E_{\text{QFI}}^{(2)}\) and \(E_{\text{QFI}}^{(2)}\), respectively.
CV entanglement for general two-mode states with finite stellar rank, only using correlation patterns obtained through homodyne detection. We test the performance of the network on patterns generated by Monte Carlo with different numbers of sampling points. With the same limited patterns, our method provides higher accuracy compared to the entanglement that can be extracted through a full state tomography. Meanwhile, the neural network shows strong robustness to losses, which we illustrate for the specific case of single-photon-subtracted states. Finally, we use the t-SNE algorithm to visualize the clusters formed from abundant correlation patterns before and after they are fed into the network. This helps us validate the suitability of the input for detecting target quantum features. This can be further used to identify and detect more refined kinds of quantum correlations, like not passive separability, i.e., the fact that the entanglement cannot be undone with optical passive transformations (beamsplitters, phase shifters), a strong feature of non-Gaussian states necessary to reach quantum advantage [48].

###### Acknowledgements.

 We acknowledge enlightening discussions with Nicolas Treps. This work is supported by the National Natural Science Foundation of China (Grants No. 11975026, No. 12125402, No. 12004011, and No. 12147148), Beijing Natural Science Foundation (Grant No. Z190005), and the Innovation Program for Quantum Science and Technology (Grant No. 2021ZD0301500). M.I., C.E.L., and M.W. received funding through the ANR JCJC project NoRdiC (ANR-21-CE47-0005). V.P. and M.W. acknowledge financial support from the European Research Council under the Consolidator Grant COQCOoN (Grant No. 820079).
