Numerically robust news recommendation under item-cold-start using Cholesky-based LinUCB.
In the news domain, the content catalog is extremely dynamic. Unlike e-commerce or video streaming, news articles have a very short half-life (TTL < 48h).
Classical collaborative filtering algorithms collapse in this environment. The time required to gather sufficient interaction data for neural models often exceeds the relevance lifespan of the news itself.
Traditional LinUCB relies on Sherman-Morrison inversion which accumulates floating-point errors. Kairos uses Cholesky rank-1 updates to mathematically guarantee positive definiteness. Watch the covariance ellipsoid deform and collapse under noise with the classical method, while Kairos remains stable.
Understanding the Condition Number (κ) & Collapse:
The Condition Number κ measures how numerically sensitive the covariance matrix is. A value of κ = 1.0 means perfect isotropic confidence (a perfect circle). As κ grows, the matrix becomes ill-conditioned (elongated ellipse).
Why does Sherman-Morrison (Classic) fail irreversibly?
The classical method directly updates the inverse covariance matrix. Due to floating-point rounding errors, symmetry is lost over time. Once the matrix loses positive definiteness (i.e., eigenvalues become negative or zero), the algorithm suffers a singular collapse (κ → ∞). Mathematically, it cannot recover from this state, leading to garbage recommendations.
Why is Cholesky (Kairos) stable?
Instead of updating the inverse directly, Kairos updates the Cholesky factor L (where A = LLT). Because any matrix of the form LLT is mathematically guaranteed to be positive definite, the Kairos algorithm cannot collapse, ensuring robust long-term operation even under severe numerical noise.
What does this mean? The green circle (Kairos) shrinks symmetrically: The algorithm learns and confidence increases (lower variance). The red ellipsoid deforms and jumps erratically: The classical Sherman-Morrison update loses symmetry due to floating-point rounding errors. Eventually, the math breaks down entirely, leading to irrational behavior and algorithmic collapse (κ → ∞).
To achieve sub-millisecond real-time inference, Kairos leverages MRL. The high-dimensional embedding space is adaptively truncated. Adjust the slider to see the trade-off between Semantic Variance and Inference Latency.
Click through the pipeline steps to explore the corresponding Julia implementation.
# src/BanditCore.jl
function update_factor!(profile::UserProfile, x::Vector{Float32}, reward::Float32)
# Apply forgetting factor
profile.L .*= sqrt(profile.γ)
profile.b .*= profile.γ
x_norm = x ./ (norm(x) + 1.0f-6)
if reward > 0.05f0
update_vec = sqrt(reward * 1.5f0) .* x_norm
# Mathematically guaranteed positive definite
C = Cholesky(profile.L, 'L', 0)
lowrankupdate!(C, update_vec)
profile.b .+= reward .* x_norm
end
end