Skip to content

Bound RankIC activations with checkpointed column blocks - #84

Merged
initial-d merged 1 commit into
mainfrom
codex/chunked-rankic-20261030
Oct 30, 2026
Merged

initial-d merged 1 commit into
mainfrom
codex/chunked-rankic-20261030

Conversation

@initial-d

@initial-d initial-d commented Oct 30, 2026 •

Copy link
Copy Markdown
Owner

Large stock cross-sections currently retain an N × N sigmoid activation in soft RankIC training. RankICLoss now 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=None retains 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.
  • Environment: Python 3.12.14, PyTorch 2.14.1, macOS 26.6.2 arm64, Apple M5 CPU; no GPU run.
  • Evidence: deterministic synthetic correctness/storage fixtures only; no external market data. Transaction costs and slippage are not applicable to these loss-function tests.

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.

@initial-d
initial-d merged commit a544609 into main Oct 30, 2026
3 checks passed
@initial-d
initial-d deleted the codex/chunked-rankic-20261030 branch October 30, 2026 00:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant