Repository navigation
Bound RankIC activations with checkpointed column blocks - #84
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Large stock cross-sections currently retain an N × N sigmoid activation in soft RankIC training.
RankICLossnow splits pairwise columns into blocks (256 by default) and checkpoints training blocks, reducing each matrix temporary to N × chunk_size while backward recomputes activations. Every stock still participates in every soft-rank comparison;chunk_size=Noneretains the dense reference.Losses and both-input gradients agree with the dense reference within tested tolerances. Constant-batch behavior is preserved. The new tests cover noncontiguous inputs, ties, dtype/temperature combinations, first/second derivative checks, and saved-tensor storage plus backward recomputation. Invalid chunk sizes and multidimensional cross-sections are rejected.
This changes memory behavior, not the quadratic arithmetic complexity. Recomputing can increase runtime, and reduction order can change floating-point rounding. No RSS, GPU speedup, market-data, alpha, or investment-performance claim is made. Pending PRs #80 and #81 are excluded.
Validation at
86f618fd203b4b74349c5afa8a88474160c3b62a:/tmp/projects-push-20261028-venv/bin/python -m pytest: 258 passed./tmp/projects-push-20261028-venv/bin/python -m ruff check src tests: passed.git diff --check: passed.GitHub CI passed on the exact head above: Python 3.9, 3.10, and 3.11, each with lint, tests, and CLI smoke checks.
Merge follows the maintainer's existing instruction to merge quant changes directly after passing checks. The administrator override is used for the required independent-review rule; branch protection settings are unchanged, and no independent review is claimed.