A Quantum-Inspired Direct Learning Strategy for Positive and Unlabeled Data

Learning from only positive and unlabeled (PU) data has broad applications in fields such as web data mining, product recommendations and medical diagnosis, which aims to train a binary classifier in the absence of negative labeled data. However, due to the lack of negative label information, prevailing PU learning methods usually rely on prior knowledge of unknown class distributions heavily. In fact, without additional constraints imposed by the prior knowledge, a direct learning strategy to coordinate the underlying clustering information in unlabeled data with the label information from positive training data is often considered challenging. To tackle this challenge, we propose a direct PU learning strategy using quantum formalization. By employing neural networks as backends, the samples are mapped into two-qubit composite systems, which should be understood here as mathematical entities encapsulating various classical distributions of two classical bits. Subsequently, the two qubits within the systems are trained to be as independent as possible from each other, capturing patterns of different classes. At the same time, their measurement results serving as the model outputs are encouraged to be maximally dissimilar. These characteristics enable effective training of classifiers on PU data. After formulating an appropriate discriminant rule, we introduce a quantum-inspired PU method named qPU using the direct learning strategy. This method not only has the potential to alleviate parameter sensitivity issues caused by prior estimation in other methods but is also straightforward to implement. Finally, experiments conducted on 13 classical datasets validate the effectiveness of qPU.


Introduction
Viewed from a cognitive perspective, individuals, after learning from a substantial set of unlabeled samples (the U set) and gaining a comprehensive understanding of global class characteristics, can effectively identify samples with simi-lar patterns to the provided labeled positive data, even when there are no labeled negative samples available for reference.In this context, the set of labeled positive samples (the P set) serves more as a guiding reference rather than a strict supervisor.
The learning problems that exclusively involve the P set and the U set for training are commonly known as PU learning problems.Solving the PU problem is of great importance due to its widespread occurrence in various practical applications, such as web data mining, product recommendations and medical diagnosis, among others.However, traditional classification methods are ill-suited for handling PU problems because they typically assume the presence of explicit negative samples.To address this challenge, two main learning strategies have been proposed for PU problems: the likely negative examples-based strategy and the class-prior-based strategy.These strategies do not consistently adhere to the roles of the P set and U set outlined in the cognitive process mentioned earlier; but rather treat them equally.They typically examine the statistical divergence between the two datasets in a preprocessing step to obtain additional information such as class priors or likely negative samples, and then utilize the obtained knowledge to compensate for the absence of the set of labeled negative samples (the N set) in the second training step [1][2][3][4][5][6][7].However, when the labeling mechanism is unclear or there is a limited number of positively labeled samples, overreliance on the statistical information from the P set can lead to inaccurate prior estimation and render the model sensitive to even minor changes of the samples [2].In fact, in comparison to the P set, the statistical information provided by the U set tends to be more stable and comprehensive.
In contrast to the traditional methods that employ a two-step learning strategy, our approach utilizes a direct discriminant strategy for PU data, circumventing the possible issues caused by the initial estimation of, e.g., class priors.Here, we treat the U set as the primary source of global clustering information [8], while the P set acts as a guiding reference.However, in the absence of additional constraints imposed by prior knowledge, a direct learning strategy may encounter the issue of conflicting objectives between acquiring clustering information and obtaining label information.In fact, the strong coupling relationship between the bits in the label, for example, (1, 0) of the positive training samples, may be captured as a form of knowledge, which could be repeatedly reinforced during training and potentially overwrite the clustering information obtained from the U set, leading to a deviation in the classification plane and significant misjudgments.
The key to addressing this issue lies in ensuring independent representations for the positive and negative classes, respectively, thereby preventing the training on the P set from eroding the training on the U set.Simultaneously, it is also crucial to maintain a certain degree of separation between the representations of the two classes to satisfy the clustering requirement for differentiating samples from distinct classes.In fact, it has been theoretically demonstrated that by minimizing the overlap between the positive and negative classes, particularly by enhancing their mutual exclusivity when the representations are directly considered as the bits in labels (see Eq. ( 4)), one can obtain a reliable estimate of the negative class conditional probability density function (PDF) [9].
However, setting the mutual exclusivity of learning results, i.e., the bits in the estimated labels, as one of the learning goals will compromise the independence between the representations of different classes due to the fundamental fact that mutual exclusion generally implies correlation.Classical learning methods, including component analysis methods such as independent component analysis (ICA) [10] and linear discriminant analysis (LDA) [11], are not suitable for the learning setup in this paper.Fortunately, quantum theory provides concepts and principles like density operator, entanglement, and measurement to concurrently model multiple potential states of positive and negative classes to address this issue.In fact, for a two-qubit system in a product state, there is neither quantum correlation nor classical correlation between the qubits [12], yet their measurement results as output of learning method can be mutually exclusive.
Utilizing the neural networks such as fully connected neural networks and convolutional neural networks as backends, we establish a mapping from the samples in both the P and U sets to the quantum systems comprising two qubits: the positive qubit and the negative qubit.By setting the quantum product state as the learning objective and using fidelity as the overlap measure between positive and negative classes, we propose a direct learning strategy and develop a quantum-inspired PU learning method, named qPU (see Fig. 1).Compared to existing methods, qPU eliminates the need for the traditional two-step strategy in PU learning; additionally, qPU employs neural networks as backends, offering the advantages of easy implementation and theoretical training time equivalent to general neural networks.The experimental results on various datasets validate the superiority of qPU.Furthermore, we find that entanglement can be employed as an effective measure of separability between positive and negative classes; and reducing the entanglement between positive and negative qubits can enhance the separability.
The rest of this paper is organized as follows.Section 2 provides a comprehensive discussion on related work in the fields of PU learning and quantum machine learning.Section 3 reviews the necessary background knowledge on PU learning and basic quantum theory for better understanding of this paper.Section 4 presents the details of the proposed qPU method, including its theoretical motivation, model framework, and loss function.Section 5 verifies the superiority of qPU through experiments and explores the relationship between entanglement and separability.Finally, Sect.6 summarizes the findings and contributions of the research presented in this paper, and also discusses potential directions for future research and improvements.

Related Work
PU methods have numerous practical applications, such as radar false target recognition [13], disease recognition [14], product recommendation [15] and link prediction task in the biological domain [16].In these applications, false targets, recommended products and diseases, among others, can be considered as labeled positive instances, while the labeled negative instances are often missing owing to the lack of interest.Due to the scarcity of labeled positive instances, applications relying on positive class priors may be affected by the accuracy of prior estimation, which consequently impacts their practical effectiveness.
PU learning models can be categorized into two groups: the first group, including Self-training Expectation-Maximization (S-EM) [17], Positive-Example and Positive-Unlabeled Classification (PE-PUC) [18], and Positive-Example-Based Learning (PEBL) [19], adopt a two-step strategy.In this strategy, a reliable set of negative samples is initially determined from unlabeled data, and then (semi-) supervised learning methods are applied in the second step.Recently, graphs have been utilized to measure the similarity of samples [15,20], aiming to obtain reliable sets of positive and negative samples.For instance, Luo et al. introduced Positive-Unlabeled Learning via Neural Selection (PULNS) [21], which leveraged reinforcement learning to obtain effective negative sample selectors.The common drawback of methods in this category lies in the challenge of determining the appropriate size of the extracted negative set.This can potentially lead to overfitting or underfitting of the final classifier, especially when there is a significant overlap between the classes.
The second group of methods typically assumes that class priors are known and focuses on designing loss functions that fully utilize this prior information.A milestone method of this type is the unbiased risk estimator for PU learning problem, called Unbiased PU (uPU) [3], which employed a non-convex loss function.Later, they discovered that convex surrogate loss functions [4] can reduce computational costs with similar accuracy.In order to solve the problem that the empirical risk of training data may tend to be negative, Kiryo et al. proposed a PU method with non-negative risk estimator called non-negative PU (nnPU) [5], which had a relatively strong theoretical foundation.In addition, Chen et al. proposed that Self-PU conduct self-supervised learning on nnPU through auxiliary tasks [22]; Su developed a new balanced dataset by oversampling positive samples when the set of positive samples is small, expanding nnPU to unbalanced data by amplifying the weight of minorities [2]; Hsieh proposed Positive-unlabeled binary Classification using Neural networks (PUbN) [23], which used the nnPU preprocessing model to identify the impacts of the negative class, and then combines positive risk, negative risk, and unlabeled risk to learn the final classifier; Zhao proposed Distributional Positive-Unlabeled Learning (distPU), which utilizes label consistency between predicted and ground-truth label distributions [1].The above methods required known class priors, and thus, the estimation of class priors also garnered extensive attention [24][25][26][27].There are also some PU learning methods that do not need to estimate class priors.For example, Variational PU (vPU) [28] proposed the variational principle of mixed regularization PU learning and learned a classifier with the minimum KL divergence.
In recent years, the intersection of quantum technology and machine learning has sparked widespread interest among researchers.In the early stages, the main focus is on providing quantum acceleration for machine learning methods to address challenges related to large data volumes and slow training processes.Notable examples of such approaches include Shor's algorithm [29], Grover's algorithm [29], Harrow-Hassidim-Lloyd (HHL) algorithm [30], Quantum Principal Component Analysis [31], Quantum Linear Discriminant Analysis [32], and Quantum Support Vector Machine [33].More recently, the realms of quantum manybody physics and deep learning have begun to intertwine.For instance, Gao et al. rigorously demonstrated that the Restricted Boltzmann Machine can represent a wide range of quantum many-body states [34].Stoudenmire [35] and Liu [36] developed classification models based on matrix product states and multi-scale entangled renormalization group, respectively, and explored quantum characteristics of the models such as quantum entanglement and fidelity.Wang [37] introduced the quantum density matrix into the Recurrent Neural Network model, showcasing further integration of quantum effects into machine learning.

PU learning and Learning Strategy by
Minimizing Overlap PU learning.Let Y={+1, −1} be the set of possible labels, and X ={x 1 , x 2 , ..., x n } be the collective set of training samples.Without loss of generality, we suppose only the rest n L cases in X are labeled with the positive label +1, and the rest n U samples are unlabeled.Let P be the set of labeled positive samples, and U be the set of unlabeled samples.The Learning strategy by minimizing overlap.A PU learning method can be obtained by minimizing the overlap between the positive and negative classes when the positive class conditional PDF and the mixture PDF of both classes are given [9].Specifically, using Bhattacharyya coefficient θ)dx as the overlap measure between positive and negative conditional PDFs, the learning strategy can be formalized as min θ {B (θ )}, where θ is the vector of model parameters.However, estimating the PDFs from PU data remains a challenging problem.

Mathematical Formalization of Quantum States
Quantum theory is based on the complex Hilbert space [29].Quantum pure states are vectors in this space, which can alternatively be represented in matrix form or as Bloch representations.A product state specifically refers to a composite quantum state in which its constituent states are statistically independent.
Pure states.For a single-qubit system, when given a set Density operator.The density operator, typically denoted by the symbol ρ, is a matrix representation of quantum state.For a pure state, its density operator can be obtained by the outer product of its own state vector, namely, ρ = |ψ ψ|.
Bloch representation.Given the Pauli basis {σ i |i = 0, 1, 2, 3} = {1, σ x , σ y , σ z }, the density operator ρ of any single-qubit can be uniquely expressed as ρ = 1 2 σ 0 + 3 i=1 u i σ i , where u i = tr(ρσ i ) represents the measurement result obtained by observing ρ using the observable σ i .The vector u = (u 1 , u 2 , u 3 ) is known as the Bloch vector of ρ.Similarly, the density operator ρ of any two-qubit state can be uniquely decomposed into a linear combination of Dirac matrices that are tensor products of Pauli matrices: is the Frobenius norm.Consequently, we can conclude that R 2 F ≥ 1, and R 2 F can reach its minimum value of 1 if and only if the system is in the product state due to the fact that u 2  2 ≤ 1 and v 2 2 ≤ 1.Finally, it is important to highlight that one of the main learning objectives of our strategy is to map samples to product states of the individual qubits u and v.In this context, (u, v), functioning akin to classical bits, serves as quantum representations of samples for class labels.
Then, after measuring ρ to obtain the Bloch representations (u, v, R) of samples, a classification method is established based on the Bloch representations, where (u, v, R) is often abbreviated as (u, v) if the system is in the product state.
In order to coordinate the training on the P and U sets, T is demanded to be trained to output quantum product states, where due to the independence between the positive and negative qubits, the clustering information conveyed from samples to the quantum system is maximized, and learning on the P set, which mainly influence the positive qubit, will not compromise the acquisition of clustering information on the U set.As a result, it can be assumed roughly that the two-qubit system has preserved sufficient information about the positive class and the mixture of positive and negative classes.In this case, minimizing the overlap between positive and negative qubits is expected to differentiate the representations of samples according to their underlying classes, based on which a suitable discriminant rule can be specified.Concretely, T is expected to possess the following properties: Property 1 The mapping T should be trained to encourage the evolution of quantum state ρ towards a product state, which can be achieved by minimizing R 2 F as introduced in preliminaries.This loss term associated with this objective is denoted as I P∪U , since it applies to the P ∪ U set: ( Property 2 Labeled positive samples should be mapped to similar quantum states to ensure a high level of intra-class cohesion.In this regard, we introduce B = (u, v) as the outcome of mapping data by T and B + = (u + , v + ) as the learning objective for positive labeled samples, which can, to some extent, be considered a quantum analogue of positive label in classical scenarios.However, unlike the classical label, B + might contain multiple values, where u + is fixed as (1, 0, 0), while v + is determined not by its label but rather by the v part in the quantum representations B = (u, v) of the samples: The multi-value mechanism of v + makes the training on the P set predominantly affect the positive qubit rather than the negative qubit, analogous to the effect of local unitary transformations on the 2-qubit quantum system.The loss term meeting this property is defined as the mean value of the cross-entropy between B + and B: Correspondingly, B − can be introduced for the negative samples.However, due to the absence of negative training samples, B − is not explicitly used in this paper.

Property 3
The mapping T should be trained to minimize the overlap between classes to differentiate the representations of samples, where the overlap is measured by the Bhattacharyya coefficient [9].Specifically, by the Bhattacharyya coefficient in the data space can be converted to that in the label space.As fidelity is a natural extension of Bhattacharyya coefficient in the quantum field, using it as the overlap measure, the corresponding loss term is defined by F P∪U (T ) = E x (F(u, v| x; T )), where y = 1 and y = −1 are substituted with the positive and negative qubits, respectively; and F(u, v | x; T ) represents the fidelity between the qubits.
Nonetheless, fidelity is typically defined in terms of the density operator rather than the Bloch representation.Here, we propose a simplified computational method based on the Bloch representation.Given ρ 1 and ρ 2 as the density operators of the positive and negative qubits, respectively, and with λ 1 and λ 2 as the eigenvalues of ρ 1 , the fidelity of the two-qubit [38] is given and upper bounded by 123 Replace the density operators with its Bloch representations, then the first term on the right-hand side of the inequality can be rewritten as follows: where other wise .
For the remaining two terms, it holds that det ρ 1 = By taking the upper bound of F(u, v) and ignoring the constant term and coefficients, F P∪U (T ) is simplified as Property 4 Just like other discriminant methods, the mapping T should be trained to minimize the discriminant loss under a specified discriminant rule.According to the setting of B + and B − , a simple discriminant rule can be specified as follows: where y * (x) is the predicted label of x.
Then the discriminant loss can be defined correspondingly as where y(x) = 1, x ∈ P 0, x ∈ U , and C(•) is the cross-entropy.
However, it is worth emphasizing that different from the discriminant loss in other PU learning methods significantly, this loss term is expected to play a minor role, rather than serving as the primary learning objective.In this sense, we not only restrict its weight to a relatively small value but also slow down its learning speed.Specifically, in each iteration of the training process, only one random sample is taken from the P ∪U set, and the discriminant loss of this sample is used to replace the expectation in Eq. (10).Hence, the loss term is finally defined as

Model Framework and Loss Function
Based on the theoretical motivation, the qPU model framework is designed to include five components: input layer, network layer, conversion layer, measurement layer, and discriminant layer, as illustrated in Fig. 2. First, the training samples are fed into the input layer and subsequently processed by the network layer to extract their abstract features.Generally, networks with stronger expressive power are more preferred.However, in order to analyze the strengths and weaknesses of the qPU method itself more effectively and to avoid potential advantages that may arise from complex network structures, this paper only employs the simple network structures such as dense neural networks and convolutional neural networks as backends.
Following the network layer is the conversion layer, which utilizes the real numbers output by the network layer to combine the complex coefficients and construct the corresponding quantum pure states in a given basis set.For instance, in the context of a 2-qubit composite system, given a set of basis |00 , |01 , |10 and |11 , the eight real numbers (r 1 , r 2 , r 3 , r 4 , m 1 , m 2 , m 3 , m 4 ) output by the network layer uniquely determine four complex numbers (α 1 , α 2 , α 3 , α 4 ), and thus a single corresponding quantum pure state |ψ = Note that the regular quantum pure states always demand the normalization of coefficients, hence the regularizer is added to the final loss function.
The fourth component is the measurement layer, which measures the obtained quantum state |ψ to yield its Bloch representation (u, v, R).On one hand, R is related to the operations that preserve global classification information.The related calculation only involves the squares of its elements, independent of their signs.On the other hand, (u, v) Fig. 2 The model framework of qPU.After the sample is input, the quantum pure state |ψ is obtained through the network layer and the conversion layer, and we can get its Bloch representation (u, v, R) by measurement layer.Finally, the predicted label of the sample is obtained through the discrimination layer is considered to be related to the discriminant rule which can typically be adapted based on the range of output values without affecting the discriminant results.For example, if the value range [0, 1] is expanded to [−1, 1], a discriminant rule greater than 0.5 can be changed to a discriminant rule greater than 0. Based on these two points, this paper does not distinguish between the signs of the elements in (u, v, R).Therefore, if the numerical values are the same, even if the signs of the elements differ, they are considered to represent the same quantum state.
The final component is the discrimination layer, which predicts the labels of samples using the discriminant rule specified by Eq. ( 9).Finally, by combining the four loss terms presented in the previous subsection, and along with the regularization term Eq. ( 12), the loss function can be defined as where γ i (1 ≤ i ≤ 5) are constant coefficients.Notice that the five terms on the right-hand side of Eq.( 13) can be roughly divided into two parts.The first part consists of I P∪U (T ), F P∪U (T ) and the regularization term reg(T ).They are all unsupervised terms acting on the quantum representations of samples.The second part includes M P (T ) and D P∪U (T ), reflecting the relationship between the samples and their labels.By assigning identical coefficients to the loss terms in the same part, i.e., γ 1 = γ 3 = γ 5 and γ 2 = γ 4 , the loss function can be further simplified as

Experiment
In this section, we provide a detailed description of the experiments, including the datasets used, experimental settings, the methods compared, evaluation metrics and result analysis.

Datasets
Image datasets.The image datasets used in this paper includes CIFAR-10 [39], MNIST [40] and F-MNIST [41].These datasets originally consist of 10 classes.To ensure a fair cross-comparison, we followed a similar approach to nnPU [5] in constructing the positive and negative classes.Specifically, for MNIST as well as F-MNIST, we preprocessed the dataset in a way that digits '0', '2', '4', '6', and '8' formed the positive class, while digits '1', '3', '5', '7', and '9' formed the negative class.For CIFAR-10, the positive class consisted of the categories 'airplane', 'automobile', 'ship', and 'truck', while the negative class consisted of the categories 'bird', 'cat', 'deer', 'dog', 'frog', and 'horse'.Benchmark datasets.In addition to the image datasets, the experiments were also conducted on 10 benchmark datasets obtained from the UCI machine learning repository [42]. 2 For the multiclass datasets, the samples of two classes were selected from each dataset to form a new dataset, with the first class as the positive class and the second class as the negative class.For the datasets with only two categories, we assigned the category with fewer samples as the positive class and the other category as the negative class.Each new dataset was then divided into an 8:2 ratio, with 80% of the samples used for training and the remaining 20% used for testing.
For each image dataset and benchmark dataset, 25% of the positive training samples were randomly selected to form the P set, while the remaining samples formed the U set.It is important to note that no special preprocessing techniques were applied to any of the datasets, except for the normalization of pixel values in the case of image datasets.

Experimental Settings
qPU.This paper implements two specific qPU methods, with the backend network layer consisting of convolutional neural networks and dense neural networks, respectively.Specifically, the model architecture for CIFAR-10 is set as follows: input-C(3*3,32)-C(3*3,64)-P(2*2,2)-D(128)-N-M-1, where the input is a 32*32 RGB image, C(3*3,32) refers to 32 channels of size 3*3 convolutions followed by ReLU activation, C(3*3,64) indicates a similar convolution operation but with double channels, P(2*2, 2) represents a 2x2 max pooling operation with a stride of 2, and D(128) denotes a dense layer followed by ReLU activation with 128 neurons; following the network layer are the conversion layer N, the measurement layer M and the discriminant layer with 1 neuron, as described in the previous section on the model framework.For the remaining datasets, the model is structured as follows: input-D(300)-D(300)-D(300)-D(300)-N-M-1, where the convolutional/pooling layers in the previous model are replaced by dense layers D(300).Please refer to Table 1 for the correspondence between the datasets and the model architectures.
In subsequent experiments, if no further specifications are given, the two hyperparameters (γ 1 , γ 2 ) of qPU are fixed at (0.1, 0.5) (see Eq. ( 14)).The learning rate is set to 1e-3.The models were trained using Adam [43] as the optimizer until the number of iterations reached 1000.
Compared Methods.The performance of qPU was compared to that of uPU [3], nnPU [5], distPU [1] and vPU [28]. 32023) 16:194 Page 9 of 15 194 The best and second-best values are both highlighted, with the best values marked by the symbol '*'.And distPU-means that distPU was performed using the estimated prior For the compared methods, to achieve their best possible performance, the hyperparameters in these methods were set to their optimal values as indicated in the papers that introduced them.The exception was the hyperparameters of vPU on the MNIST dataset, which were fine-tuned to establish its two specific hyperparameters α = 0.3 and λ = 0.1 through multiple experiments.Moreover, since uPU, nnPU and distPU are class-priorbased methods, the true class prior is provided as an additional input for them.It is crucial to emphasize that providing true class priors as a "God's oracle" renders the comparison between these methods and our approach unfair.However, conducting a comparison with these methods under an idealized state, which might not be practically achievable, can either highlight the strengths of our method or, conversely, help identify potential margin for improvement.

Evaluation Metrics
For each PU learning method, we report five metrics on the training and test sets for a more comprehensive comparison, including G-mean (Gm), F1-score (F1), Precision (Pre), Accuracy (Acc), and Recall (Rec).Every experiment was repeated six times with random sampling, and the experimental results were represented as the mean and standard deviation of the metrics.

Image Datasets
We analyzed the performance of all the methods on the image datasets firstly.The average performances as well as the standard deviations of metrics obtained by different methods on the image datasets are reported in Table 2 and Fig. 3.As seen from Table 2 and Fig. 3, qPU provides the best performance regarding the G-mean, F1-score and accuracy on almost all datasets, except the CIFAR-10 dataset, where distPU performs better than qPU.Nonetheless, it is worth noting that the impressive performance of methods such as distPU relies on the utilization of accurate class prior values as additional input.In fact, accurately estimating the class prior in practical applications remains a research challenge.For instance, when estimating the class prior using the KM2 method [26], distPU based on the estimated value (referred to as distPU-) may show a significant performance decline compared to the method using the true value of the class prior, as reported in Table 2.This decline is likely due to estimation biases in the class prior.In addition, except for qPU, vPU is another method that does not require the class prior.However, qPU outperforms vPU by more than 2 points in almost all metrics.
We also discussed the changes of each method in the loss function and accuracy during the training process, which are reported in Fig. 4. From Fig. 4, we can see that all the methods tend to stabilize after approximately 250 epochs, exhibiting rapid learning speed.Furthermore, qPU, nnPU and disPU demonstrate consistent changes in accuracy on both the training and test sets, while the accuracy of uPU shows a slight decrease on the test set, despite its increase on the training set.This is a typical overfitting phenomenon [5].The possible reason for this phenomenon may be that the loss function values for uPU can be negative, which leads to a continuous optimization of the loss function towards negative infinity erroneously.

Benchmark datasets
Similarly, we evaluated all the methods on the ten benchmark datasets, and the experimental results are summarized in Table 3. From Table 3, it is evident that qPU emerges as the optimal or suboptimal learning method across all datasets.Even in cases where qPU is not the optimal method, the performance gap between qPU and the optimal method is almost negligible.To provide a comprehensive assessment of the overall performance, we report the average metrics of each method on the ten datasets in Table 4 and Fig. 5. Remarkably, qPU outperforms other methods significantly in almost all metrics, particularly excelling in the overall performance metrics, G-mean and F1-score, surpassing other methods by more than 3 points.This robustly indicates the superiority of qPU in the context of PU learning.
In addition, it is worth reiterating that nnPU, distPU, and uPU necessitate prior knowledge of the class priors.However, in this study, instead of using estimated class priors, the true class priors were provided for these methods, which allows them to benefit in terms of performance [28].

Hyperparameter Analysis
The hyperparameters γ 1 and γ 2 of qPU were fixed at 0.1 and 0.5 in the previous experiments.To take a further step to analyze the influence of these hyperparameters, additional experiments were conducted on the datasets CIFAR-10 and MNIST to explore the grids of hyperparameters, where both The average performance across benchmark datasets of various methods based on comprehensive metrics γ 1 and γ 2 were set to be in the range [0.1, 1] with step 0.1, resulting in a 10x10 grid.For each combination of γ 1 and γ 2 in the grid, six experiments were performed under the same setting as the above experiments.The average results were then reported in Fig. 6.
The experimental results show that the hyperparameters have a certain impact on the performance of qPU.For instance, on the MNIST dataset, when γ 2 is much smaller than γ 1 , the learning performance of qPU degrades.However, a common trend is observed when comparing the experimental results on both datasets: as the hyperparameters vary from the bottom right corner to the top left corner in the grid, the performance of qPU becomes stable and improves to a high level.This suggests that good performance can consistently be obtained by qPU when γ 1 < γ 2 .Based on this observation, we simply fixed γ 1 and γ 2 of qPU at 0.1 and 0.5, respectively.

Entanglement and Separability
We experimentally tested whether the training process of qPU can reduce the entanglement between the positive and negative qubits.To measure entanglement, we used the value of |det(R)|, since the eigenvalues of R can directly reflect the global entanglement situation [12].The experiments were conducted on the datasets CIFAR-10 and MNIST.Every experiment was repeated 6 times.Their average results are presented in Fig. 7.As shown in the figure, on both the datasets, the entanglement decreases as the number of epochs increases, indicating that qPU can encourage the reduction of entanglement during the training process.
Further, it is hypothesized that the reduction of entanglement is associated with the preservation of clustering information.To investigate this, we examined the relationship between entanglement and the separability of sample features.The separability is quantified as the ratio of intraqubit correlation to inter-qubit correlation, with the positive and negative qubits treated as two distinct perspectives of samples, akin to the principles of Fisher discriminant analysis [11], namely J = √ cov( u i , u i )cov( v j , v j ) and cov(• , •) denotes the sample covariance, u i = u i −u i represents the deviation of u i from its expected value u i , v i follows the same definition.
To facilitate the comparison with the entanglement, the changes in separability, represented on the right y-axis, were also included in Fig. 7.As observed, in the initial stages, as entanglement rapidly decreases, separability also experiences a rapid decline.However, after a certain number of iterations, as the changes in entanglement become more gradual, the alterations in separability similarly decelerate.This indicates a clear and consistent correlation between the entanglement and the separability, implying that reducing entanglement helps retain the underlying clustering information in the training data.

Conclusion
This paper proposes a direct PU learning strategy.This strategy eliminates the initial estimation step and addresses the challenge of reconciling the conflicts of acquiring clustering information from unlabeled data and obtaining label information from positive data through introducing quantum formalization.By mapping samples into two-qubit composite systems and formulating an appropriate discriminant rule after measurement, our learning strategy yields a PU classifier that can be trained directly on PU data.Experimental results on 13 datasets demonstrate its superior performance, even when true class priors are provided for other PU methods.Moreover, the implementation of our method is straightforward since from a technical perspective, our method simply replaces classical bits with quantum bits in the output of traditional networks.Finally, this paper identifies that entanglement can serve as an effective measure of separability between positive and negative classes.
Considering the potential scarcity of positively labeled samples in many application scenarios, estimating the prior probability of positive instances becomes challenging.This feature enables the method based on our strategy to have a broader range of application scenarios compared to other PU methods.In future research endeavors, the focus will be on enhancing qPU by utilizing neural networks with enhanced expressive capabilities as the backend model.

Fig. 1
Fig.1An illustration of the proposed qPU.Classical bits are replaced by quantum bits, and the mapping from samples to quantum states is denoted by T , where u and v represent two quantum bits, and R represents the relationship between the two quantum bits

Table 1
Summary of used datasets and corresponding models for them

Table 2
Performance comparison of methods on the image datasets

Table 3
Performance comparison of methods on the benchmark datasets