Suppose a collection contains a small set of confirmed matches and thousands of items nobody has checked. Treating every unchecked item as a non-match gives us a convenient training table—but some of its labels will be invented.
This is the starting point of positive–unlabelled learning. We know that certain examples are positive. For the others, we know only that their labels are missing. A useful model must preserve that distinction.
Research context
Angular Regularization for Positive-Unlabeled Learning on the Hypersphere, by Vasileios Sevetlidis, George Pavlidis and Antonios Gasteratos, is a TMLR 2025 paper; its arXiv version was first posted on 7 December 2025. AngularPU learns normalized embeddings and a positive prototype. Training combines positive alignment, an uncertainty-based loss for unlabelled samples, and a pairwise angular dispersion regularizer, with an additional soft-weighting formulation. The paper selects its classification threshold using held-out validation labels. Its directional interpretation has distributional assumptions; it is not a universal guarantee for arbitrary mixtures of unknown classes.
Below, I use fixed two-dimensional vectors to explain the geometry. This deliberately leaves out encoder training and the AngularPU loss. It is a teaching example, not an implementation or evaluation of AngularPU.
Why an unchecked item is not a negative
Imagine ten confirmed photographs of a particular object and a hundred unreviewed photographs. The unreviewed group might include other views of that object, images of similar objects, and entirely unrelated scenes. A classifier trained to reject the whole group receives contradictory supervision whenever it encounters an unreviewed true match.
The problem also has a sampling dimension. If the confirmed images were chosen because they were unusually clear, a model can learn “well-lit frontal photograph” rather than object identity. Keeping a separate record of how examples were selected is therefore as useful as keeping the labels themselves.
Turning similarity into an angle
For any nonzero feature vector, normalization removes its length:
In two dimensions, a unit vector is a point on a circle. Choose a unit reference direction μ. Its inner product with z is the cosine of the angle between them:
A threshold c ≥ 0.8 accepts directions within approximately 36.87 degrees of μ. This is a geometric acceptance region. It is not automatically a probability of belonging to the class.
import numpy as np
degrees = np.array([0., 15., 30., 45., 90., 180.])
z = np.column_stack([
np.cos(np.deg2rad(degrees)),
np.sin(np.deg2rad(degrees))
])
mu = np.array([1., 0.])
cosine = z @ mu
accepted = cosine >= .8
# True, True, True, False, False, False
Changing 0.8 to 0.9 narrows the accepted region. That may reject more unrelated items, but it can also lose valid matches whose representations lie further from the reference. A threshold is a decision with consequences, not a cosmetic hyperparameter.
What this picture cannot tell us
A circle plot cannot establish that the encoder preserves the right distinctions. It cannot show that one prototype represents a class with several disconnected modes. Nor can it recover the labels of the unreviewed collection merely by drawing a clean boundary.
A practical evaluation should separate three questions. Were the known positives representative? Was the threshold selected without using the final test labels? Does the final held-out set include the difficult examples encountered in deployment?
If a validation set has no reliable negative labels, maximizing a conventional validation F1 score is not directly available. We must state the evaluation assumption or collect an appropriate labelled evaluation sample. We should also report precision and recall for the decision being made, rather than relying solely on accuracy in a heavily imbalanced collection.
A sensible first experiment
Start with an auditable baseline: freeze a feature extractor, inspect the confirmed positives, and record cosine scores on a separately reviewed sample. Keep that baseline distinct from a learned PU method. If the baseline fails because positives occupy several different regions, that is useful evidence about the representation and the task—not a reason to silently relabel the unreviewed data.
Complete reproducible example
These files contain synthetic teaching data and calculations. They do not reproduce a trained model or a field deployment.
angular_geometry.py
"""Fixed-embedding geometry demo, NOT training or reproducing AngularPU."""
import json
import numpy as np
def run():
degrees = np.array([0., 15., 30., 45., 90., 180.])
z = np.column_stack([np.cos(np.deg2rad(degrees)), np.sin(np.deg2rad(degrees))])
mu = np.array([1., 0.])
cosine = z @ mu
accepted = cosine >= .8
assert np.allclose(np.linalg.norm(z, axis=1), 1.)
assert accepted.tolist() == [True, True, True, False, False, False]
return {'degrees':degrees.tolist(), 'cosine_scores':cosine.tolist(), 'threshold':.8,
'accepted':accepted.tolist(), 'maximum_angle_degrees':float(np.rad2deg(np.arccos(.8)))}
if __name__ == '__main__':
print(json.dumps(run(), indent=2))
