Glossary

Spherical score

The spherical score is a bounded, honesty-rewarding way to grade probability forecasts, so one confident miss cannot wreck the total as it can with the log score.

Swiss-hosted inference. Nothing you send is ever stored.Swiss data residency

What Spherical score means

The spherical score is a strictly proper scoring rule defined as the probability assigned to the true outcome, divided by the Euclidean (L2) norm of the whole forecast vector:

S(p, y) = p_y / ||p||_2

It lies between 0 and 1. A one-hot forecast on the right answer scores 1; spreading mass evenly across k options scores 1/√k if the answer is among them. Unlike the log score, it is bounded: a zero on the true outcome scores 0, not negative infinity. That makes it more forgiving of occasional label noise while still rewarding honest reporting, because the true distribution is its unique expected-score maximiser.

Geometrically, it measures the cosine between the forecast vector and the one-hot vector of the outcome, which is where the name comes from.

Where it appears in Laya

Laya's RLCD reward adds the spherical score to the log score with a weight of 0.5 (w_sph = 0.5 in the package's proper_reward function). The combination is still strictly proper, because a positive weighted sum of strictly proper rules keeps the property. The practical motivation for mixing them is stability: the log term strongly punishes confident errors, while the bounded spherical term keeps gradients sane when the policy's sampled distribution is noisy after Gaussian exploration noise is added to the logits.

For score questions, a third term, the ranked probability score, is subtracted to respect the order of levels.

You never see the spherical score in an API response; it shapes training only. See proper scoring rules and RLCD.

How Spherical score connects to the rest of the vocabulary.