Skip to content

Fix RSKGES bug and LU-based range stabilization in sparse QRCP example#171

Merged
rileyjmurray merged 2 commits into
mainfrom
fix-sparseqrcp-range-stabilization
May 25, 2026
Merged

Fix RSKGES bug and LU-based range stabilization in sparse QRCP example#171
rileyjmurray merged 2 commits into
mainfrom
fix-sparseqrcp-range-stabilization

Conversation

@rileyjmurray

@rileyjmurray rileyjmurray commented May 25, 2026

Copy link
Copy Markdown
Contributor

Resolves #135. Along the way, fixes an apparently longstanding bug in RSKGES, where we missed an early-return statement.

Here's example output after making the changes in this PR. The build was in debug mode.

(base) Rileys-MacBook-Air:build-randblas-examples riley$  ./slra_qrcp 4 /tmp/N_reactome/N_reactome.mtx

Processing matrix in /tmp/N_reactome/N_reactome.mtx
n_rows  : 10204
n_cols  : 16559
density : 0.00025931532

Computing rank-4 truncated QRCP.
Internally use 2 steps of power iteration.
Consider four runs, each stabilizing power iteration in a different way.

Take Q from LQ
Row norms for Yf : [ 55.646701, 45.682935, 50.159852, 41.275255 ] 
Row norms for R  : [ 59.044092, 59.051427, 59.082688, 59.128318 ] 
Leading pivots   : [ 7914, 648, 962, 7588 ]
Runtime in μs    : 13962

Sketch-orthogonalize
Row norms for Yf : [ 23.080879, 48.230123, 37.339738, 27.324248 ] 
Row norms for R  : [ 59.044092, 59.051427, 59.082688, 59.128318 ] 
Leading pivots   : [ 7914, 648, 962, 7588 ]
Runtime in μs    : 32400

Do nothing. This is numerically dangerous unless power_iter_steps is extremely small.
Row norms for Yf : [ 314192.79, 246510.58, 406939.74, 476108.1 ] 
Row norms for R  : [ 59.044092, 59.075882, 59.105465, 59.149568 ] 
Leading pivots   : [ 7914, 649, 962, 7588 ]
Runtime in μs    : 8519

Take L^T P from row-pivoted LU of W^T.
Row norms for Yf : [ 74.624896, 81.881853, 63.740244, 51.477882 ] 
Row norms for R  : [ 59.044092, 59.051427, 59.082688, 59.128318 ] 
Leading pivots   : [ 648, 7914, 962, 7588 ]
Runtime in μs    : 8864

@rileyjmurray rileyjmurray merged commit 0c8ac18 into main May 25, 2026
16 checks passed
@rileyjmurray rileyjmurray deleted the fix-sparseqrcp-range-stabilization branch May 25, 2026 18: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.

sparse QRCP example: unusual LU-based co-range stabilization

1 participant