Submission Number: 12762
Title: Perturbation bounds for low-rank inverse approximations under noise

We provide eight Python scripts that reproduce every empirical result in Section~4, Appendix G, and Appendix I.

--------------------------------
Dependencies: 
- Python 3.8+
- NumPy 1.26.4
- SciPy 1.13.0
- Matplotlib 3.9.0

--------------------------------
Execution Instructions:

1. Section 4.1: Assumption of Theorem 2.1 on real-world matrices

(*) Files:
--  "Maximal_allowable_variance_USCensus.py" 
--  "Maximal_allowable_variance_BCSSTK.py"

(*) Datasets:
-- The US Census dataset can be downloaded from the UCI repository at https://archive.ics.uci.edu/ml/datasets/US+Census+Data+(1990)

-- The stiff matrix BCSSTK09 can be downloaded from the SuiteSparse Matrix Collection at https://sparse.tamu.edu/HB/bcsstk09

The US Census dataset yields a covariance matrix (A = Census, n = 69), and the stiff matrix BCSSTK09 gives a sparse (A= BCSSTK09, n = 1083).

(*) Overview (A = US Census) -- same procedure for A = BCSSTK09

We evaluate the maximal allowable variance (as described in Section 4.1). Specifically, the script computes:
 (i) the least singular value \(\lambda_n\);  
(ii) the smallest rank \(p\) with spectral tail \(<0.05\) (\(p=17\) for Census, \(p=8\) for BCSSTK09);  
(iii) all eigengaps \(\delta_{n-p'}\) for \(1\le p'\le p\); and  
(iv) the corresponding variance thresholds \(\Delta^{\max}_{p'}=\min\{\lambda_n,\delta_{n-p'}\}/(8\sqrt n)\). 

(*) Outputs:

-- The file "Maximal_allowable_variance_USCensus.py" produces the empirical Census results mentioned in Section 4.1 and Table (1a) in Appendix G. 
-- The file "Maximal_allowable_variance_BCSSTK.py" produces the empirical BCSSTK09 results mentioned in Section 4.1 and Table (1b) in Appendix G. 

2. Section 4.2 - Sharpness of Theorem 2.1
 We evaluate the sharpness of Theorem 2.1 by comparing its bound with the actual error and the Eckart-Young-Neumann bound (Section 4.2).

(a) Real-world matrices perturbed by Gaussian and Rademacher noises

(*)Files:
-- "Perturbation_bounds_Census_Gaussian.py"
-- "Perturbation_bounds_Census_Rad.py"
-- "Perturbation_bounds_BCS_Gaussian.py"
-- "Perturbation_bounds_BCS_Rad.py"

(*) Datasets:
-- The US Census dataset can be downloaded from the UCI repository at https://archive.ics.uci.edu/ml/datasets/US+Census+Data+(1990)

-- The stiff matrix BCSSTK09 can be downloaded from the SuiteSparse Matrix Collection at https://sparse.tamu.edu/HB/bcsstk09
 
The US Census dataset yields a covariance matrix (A = Census, n = 69), and the stiff matrix BCSSTK09 gives a sparse (A= BCSSTK09, n = 1083).

(*) Overview of "Perturbation_bounds_Census_Gaussian.py" - same procedure for other files. 

(i) Fix the covariance matrix (A = Census, n = 69). 
(ii) Compute smallest rank \(p\) with spectral tail \(<0.05\). It yields p =17.
(iii) Generate a standard Gaussian noise E, and then scale it by ten values uniformly spaced in [1.5,6]. 
(iv) By this scaled E, A = Census, p =17, compute:  
 - the actual error of the rank-p approximations of the inverses, 
 - the right‑hand side of Theorem 2.1, 
 - the Eckart-Young-Neumann bound.
(v) Report the ratio "actual error/our bound". 
(vi) Plot the means of outputs with error bars, and print all the numerical results (as mean +/- standard deviation). 

(*) Outputs: 
-- The file "Perturbation_bounds_Census_Gaussian.py" produces the first panel in Figure 1 and Table 2 in Section I. 
-- The file "Perturbation_bounds_Census_Rad.py" produces the second panel in Figure 1 and Table 3 in Section I. 
-- The file "Perturbation_bounds_BCS_Gaussian.py" produces the third panel in Figure 1 and Table 4 in Section I.
-- The file "Perturbation_bounds_BCS_Rad.py"  produces the fourth panel in Figure 1 and Table 5 in Section I.

(b) Synthetic Hamiltonian perturbed by Gaussian and Rademacher noises
(*) Files:
-- "Perturbation_bounds_Hal_Gaussian.py"
-- "Perturbation_bounds_Hal_Rad.py"

(*) Overview of "Perturbation_bounds_Hal_Gaussian.py" - same procedure for "Perturbation_bounds_Hal_Rad.py"

(i) Generate the discretized Hamiltonian matrix A of size n, whose construction is described in Section H.
(ii) Set p = 10 so that the rank-p approximation of inverses has the spectral tail less than 0.05. 
(iii) Generate a standard Gaussian noise E, and then scale it by ten logarithmically spaced values in [10^{-4}, 10^{-1}]. 
(iv) By this scaled  E, set n in {500, 1000}, and compute:
 - the actual error of the rank-p approximations of the inverses, 
 - the right‑hand side of Theorem 2.1, 
 - the Eckart-Young-Neumann bound.
(v) Report the ratio "actual error/our bound". 
(vi) Plot the means of outputs with error bars, and print all the numerical results (as mean +/- standard deviation). 

(*) Outputs: 
-- The file "Perturbation_bounds_Hal_Gaussian.py" produces the first and third panels in Figure 2 and Tables 6, 8 in Section I. 
-- The file "Perturbation_bounds_Hal_Rad.py" produces the second and fourth panels in Figure 2 and Tables 7, 9 in Section I.

--------------------------
Summary of outputs
| #  | Output                   | Script                                        |Datasets       |Approx. run‑time|          
|----|--------------------------|-----------------------------------------------|---------------|----------------|
| 1  | Fig.1: Panel 1; Table 2  | Perturbation_bounds_Census_Gaussian.py        | 1990 US Census| ~ 9 mins       |
| 2  | Fig.1: Panel 2; Table 3  | Perturbation_bounds_Census_Rad.py             | 1990 US Census| ~ 9 mins       |
| 3  | Fig.1: Panel 3; Table 4  | Perturbation_bounds_BCS_Gaussian.py           | BCSSTK09      | ~ 73 mins      |
| 4  | Fig.1: Panel 4; Table 5  | Perturbation_bounds_BCS_Rad.py                | BCSSTK09      | ~ 73 mins      |
| 5  | Fig.2: Panel 1; Table 6  | Perturbation_bounds_Hal_Gaussian.py , n=500   | N/A           | ~ 14 mins      |
| 6  | Fig.2: Panel 2; Table 7  | Perturbation_bounds_Hal_Rad.py , n=500        | N/A           | ~ 14 mins      |
| 7  | Fig.2: Panel 3; Table 8  | Perturbation_bounds_Hal_Gaussian.py , n=1000  | N/A           | ~ 51 mins      |
| 8  | Fig.2: Panel 4; Table 9  | Perturbation_bounds_Hal_Rad.py , n=1000       | N/A           | ~ 51 mins      |
| 9  | Table 1a                 | Maximal_allowable_variance_USCensus.py        | 1990 US Census| ~ 6 mins       |
| 10 | Table 1b                 | Maximal_allowable_variance_BCSSTK.py          | BCSSTK09      | ~ 8s           |
--------------------------------

Final remarks:

-- All scripts produce plots with error bars as shown in the paper.

-- For each experiment, low-rank approximations are computed via SVD using NumPy.

-- Random seeds are not fixed; results may vary slightly across runs.

-- The experiments are lightweight and run on standard CPU machines.

-- All datasets are in the public domain or released under open academic licenses.
