Papers › Stochastic diagonal estimation: probabilistic bounds and an improved algorithm
Stochastic diagonal estimation: probabilistic bounds and an improved algorithm
Robert A. Baston, Yuji Nakatsukasa
The archive published only this paper's code-link row. Authors, date and abstract are from arXiv's metadata (CC0), read from the Kaggle arXiv metadata snapshot of 2026-09-12 where its title matched the archive's; the title is the archive's.
We study the problem of estimating the diagonal of an implicitly given matrix A. For such a matrix we have access to an oracle that allows us to evaluate the matrix vector product Av. For random variable v drawn from an appropriate distribution, this may be used to return an estimate of the diagonal of the matrix A. Whilst results exist for probabilistic guarantees relating to the error of estimates of the trace of A, no such results have yet been derived for the diagonal. We analyse the number of queries s required to guarantee that with probability at least 1-δ the estimates of the relative error of the diagonal entries is at most ε. We extend this analysis to the 2-norm of the difference between the estimate and the diagonal of A. We prove, discuss and experiment with bounds on the number of queries s required to guarantee a probabilistic bound on the estimates of the diagonal by employing Rademacher and Gaussian random variables. Two sufficient upper bounds on the minimum number of query vectors are proved, extending the work of Avron and Toledo [JACM 58(2)8, 2011], and later work of Roosta-Khorasani and Ascher [FoCM 15, 1187-1212, 2015]. We find that, generally, there is little difference between the two, with convergence going as O(log(1/δ)/ε²) for individual diagonal elements. However for small s, we find that the Rademacher estimator is superior. These results allow us to then extend the ideas of Meyer, Musco, Musco and Woodruff [SOSA, 142-155, 2021], suggesting algorithm Diag++, to speed up the convergence of diagonal estimation from O(1/ε²) to O(1/ε) and make it robust to the spectrum of any positive semi-definite matrix A.
In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.
For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2201.10684")
Code
Syntology Ran 0 of 15 code samples harvested from 1 repository linked to this paper; 15 have no recorded run.
By repository: community (archive-listed): 15 samples from 1 repository, 0 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.
Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.
Code Syntology ran Syntology
15 samples harvested; 0 ran; 0 honoured the contract we drafted; 15 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.
Licence: 0 of the 15 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.
Harvested from andres-fr/skerch. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.
Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.
Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.
1b9532cc04663359 · report
ed20abf7f0d9f8f7 · report
4b71c8968a732451 · report
f74434c1dcb81ddf · report
0c71ace8aabdd02d · report
2cb0bccb01db3dc0 · report
ae4235b7df011bb9 · report
9831cbfe72c39211 · report
2ae8bf0ccf7d84b9 · report
b0ba66f9d1d83759 · report
7c97bb07765ad728 · report
5431cf556198aeba · report
070e2cfc1ecc2862 · report
7cdc1606d55215f6 · report
b2fd7969a5c3c735 · report
Results from the paper archive 2025-07-28
No leaderboard rows for this paper in the archive.
Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections