Skip to content

Add SLIM/fsSLIM scorer#896

Merged
mdekstrand merged 36 commits intolenskit:mainfrom
mdekstrand:feature/slim
Apr 1, 2026
Merged

Add SLIM/fsSLIM scorer#896
mdekstrand merged 36 commits intolenskit:mainfrom
mdekstrand:feature/slim

Conversation

@mdekstrand
Copy link
Copy Markdown
Member

@mdekstrand mdekstrand commented Oct 17, 2025

This PR adds the SLIM and fsSLIM models for scoring. Closes #894.

The implementation has a similar structure to the original by the Karypis lab's, but stores residuals instead of estimates for driving the coordinate descent updates. This makes the inner optimization step a little simpler.

It is very different from the RecBole implementation, which uses SciKit-Learn's elastic net implementation to learn item columns.

The Regularization Paths paper specifies that the predictors are standardized, but the Karypis code does not seem to center the predictors, only scale them (implicitly by scaling the updates). The RP paper says it is “obvious” how to extend their method to sparse data like this, but do not provide or explain the relevant derivations. However, if Karypis didn't center, I think we can get away with not centering.

The way scaling is implemented does raise some questions about numerical stability, but I'm not sure that adjusting how the scaling works would fix that concern, or even if it's really a problem.

References:

@mdekstrand mdekstrand added the components LensKit recommendation components label Oct 17, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 17, 2025

Codecov Report

❌ Patch coverage is 97.89916% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.52%. Comparing base (c47d140) to head (6ba6aa4).
⚠️ Report is 37 commits behind head on main.

Files with missing lines Patch % Lines
src/accel/slim/mod.rs 97.07% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #896      +/-   ##
==========================================
+ Coverage   89.38%   89.52%   +0.13%     
==========================================
  Files         226      228       +2     
  Lines       15607    15845     +238     
==========================================
+ Hits        13951    14185     +234     
- Misses       1656     1660       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@mdekstrand mdekstrand force-pushed the feature/slim branch 3 times, most recently from 6b5e0a4 to 6ee8d50 Compare March 29, 2026 14:50
@mdekstrand mdekstrand changed the title Add SLIM scorer Add SLIM/fsSLIM scorer Mar 30, 2026
@mdekstrand mdekstrand self-assigned this Mar 30, 2026
@mdekstrand mdekstrand marked this pull request as ready for review March 30, 2026 21:11
@mdekstrand mdekstrand added this to the 2026.1 milestone Mar 30, 2026
@mdekstrand mdekstrand merged commit 910766a into lenskit:main Apr 1, 2026
3 checks passed
@mdekstrand mdekstrand deleted the feature/slim branch April 1, 2026 14:30
mdekstrand added a commit to mdekstrand/lkpy that referenced this pull request Apr 1, 2026
mdekstrand added a commit to mdekstrand/lkpy that referenced this pull request Apr 1, 2026
mdekstrand added a commit that referenced this pull request Apr 1, 2026
Backport pull request #896 to 2025 release series
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

components LensKit recommendation components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add SLIM

1 participant