File size: 7,091 Bytes
f4bff27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# LDData: Low-Discrepancy Generating Vectors and Matrices

A curated collection of **low-discrepancy point set parameters** including **lattice rules**, **digital nets**, **polynomial lattice rules**, **Sobol' nets**, and **RQMC randomizations**.  This dataset enables reproducible research and high-performance Quasi–Monte Carlo (QMC) and Randomized QMC (RQMC) simulation.

The [LDData repository](https://github.com/QMCSoftware/LDData) provides **standard text-based formats** for specifying structures used in QMC point generation across arbitrarily high dimensions.

---

## Dataset Summary

LDData is a dataset of structured parameter files defining:

- Rank-1 **lattice rules**
- Base-$b$ **digital nets**
- **Polynomial lattice rules**
- **Sobol' and Sobol–Joe-Kuo sequences**
- Various **randomizations** (shift modulo 1, digital shifts, nested uniform
  scrambles, left matrix scrambles)

Each file type follows a simple textual standard to ensure:
- Human readability  
- Language-agnostic parsing  
- Long-term reproducibility  
- Extensibility to thousands of dimensions  

The dataset is motivated by the need for **standardized, compact, transparent formats** in [our QMC research and software](https://github.com/QMCSoftware).

---

## Motivation

Many QMC constructions appear across scattered software packages, papers, or custom formats. LDData brings these formats together into a **consistent, unified, machine-readable** repository for:

- Researchers developing new QMC methods  
- Practitioners needing high-dimensional low-discrepancy point sets  
- Developers of simulation libraries such as SSJ, QMCPy, and LatNet Builder  

This dataset is linked to the research works described in the Citation section below. **For detailed technical specifications and implementation details**, see
[LD_DATA.md](LD_DATA.md)

---

## Supported Tasks and Applications

### ✔️ Quasi-Monte Carlo (QMC)
Generate deterministic point sets with excellent equidistribution.

### ✔️ Randomized QMC (RQMC)
Use the included randomizations for variance estimation:
- Digital shifts  
- Nested uniform scrambles  
- Left-matrix scrambles  

### ✔️ High-dimensional Integration and Simulation

Used in:
- Bayesian computation  
- Option pricing
- High-dimensional PDE solvers  
- Uncertainty quantification  
- Graphics and rendering research  
- Machine learning sampling methods  

### ✔️ Benchmarking
Standard formats help evaluate new constructions against established ones.

---

## Features

- Simple `.txt` formats with **one line per dimension**
- Optional human-readable comments starting with `#`
- No binary encoding or word-size assumptions
- Supports extremely high dimensions (10,000+)
- Extensible constructions (e.g., Sobol or embedded nets)
- All formats interoperable with QMC software (SSJ, QMCPy, LatNet Builder)

---

## How to Use the Dataset

### Load files directly from Hugging Face

```python
from datasets import load_dataset

ds = load_dataset("QMCSoftware/LDData")
```

All data files are preserved in their directory structure and can be accessed
using:

```python
ds["train"]  # or ds['default']
```

### Typical workflow

1. Read a parameter file (e.g. `lattice_8d.txt`)
2. Parse header (`# lattice`, dimensions, n, etc.)
3. Parse one line per dimension for the generating vector or matrices
4. Construct QMC point generator in your preferred library

---

## Dataset Structure

The dataset includes multiple categories of files:

### 🔹 `lattice`  
Rank-1 lattice generating vectors:  
- Header: `# lattice`  
- Parameters:  
  - Number of dimensions `s`  
  - Number of points `n`  
  - `s` lines of generating vector coefficients  

---

### 🔹 `dnet`  
General digital nets in base `b`:  
- Header: `# dnet`  
- Parameters:  
  - Base `b`  
  - Dimensions `s`  
  - Columns `k`  
  - Rows `r`  
- Then `s` lines representing generating matrices

Efficient for high-dimensional digital nets.

---

### 🔹 `plattice`  
Polynomial lattice rules:  
- Compact format using integer-encoded polynomials  
- Base `b`, dimension `s`, polynomial degree `k`, and generating polynomials

---

### 🔹 `sobol` and `soboljk`  
Parameters for Sobol' sequences:  
- `soboljk`: Joe & Kuo format with primitive polynomials and direction numbers  
- `sobol`: Simplified direction-number only format  

Used widely in QMC applications.

---

### 🔹 Randomization formats

Includes:

- `shiftmod1`: Shift modulo 1  
- `dshift`: Digital shift in base `b`  
- `nuscramble`: Nested uniform scramble  
- `lmscramble`: Left matrix scramble  

All formats are text-based and reproducible.

---

## Example: Parsing a Lattice Rule File

Example file:

```
# lattice
8
65536
1 
19463
17213
5895
14865
31925
30921
26671
```

Python pseudo-code:

```python
with open("lattice_8d.txt") as f:
    lines = [l for l in f.readlines() if not l.startswith("#")]

s = int(lines[0])
n = int(lines[1])
a = [int(x) for x in lines[2:2+s]]
```

---

## File Naming Recommendations

To support discoverability and consistent tooling:

- All files begin with their keyword (`lattice_`, `dnet_`, `sobol_`, etc.)
- Headers contain:
  - Construction method  
  - Figure of merit (FOM)  
  - Weights  
  - Embedded range (if applicable)  
- Comments allowed in headers only  

---

## References

This dataset incorporates formats and ideas from foundational work in QMC:

- Bratley & Fox (1988)  
- Joe & Kuo (2008)  
- L’Ecuyer (2016)  
- Goda & Dick (2015)  
- Nuyens (2020)  
- And others listed in the detailed specification [LD_DATA.md](LD_DATA.md).

---

## Citation

If you use LDData in academic work, please cite:

```
@article{sorokin.2025.ld_randomizations_ho_nets_fast_kernel_mats,
  title               = {{QMCPy}: a {P}ython software for randomized low-discrepancy sequences, quasi-{M}onte {C}arlo, and fast kernel methods},
  author              = {Aleksei G. Sorokin},
  year                = {2025},
  journal             = {ArXiv preprint},
  volume              = {abs/2502.14256},
  url                 = {https://arxiv.org/abs/2502.14256},
}


@inproceedings{choi.QMC_software,
  title               = {Quasi-{M}onte {C}arlo software},
  author              = {Choi, Sou-Cheng T. and Hickernell, Fred J. and Rathinavel, Jagadeeswaran and McCourt, Michael J. and Sorokin, Aleksei G.},
  year                = {2022},
  booktitle           = {{M}onte {C}arlo and Quasi-{M}onte {C}arlo Methods 2020},
  publisher           = {Springer International Publishing},
  address             = {Cham},
  pages               = {23--47},
  isbn                = {978-3-030-98319-2},
  editor              = {Keller, Alexander},
}
```

---

## License

Apache 2 License.  
See [`LICENSE`](LICENSE.txt) file for details.

---

## Acknowledgements

This dataset is developed and maintained by:

- **QMCSoftware team**  
- Contributors to QMCPy, SSJ, and LatNet Builder  
- Community contributions from QMC & RQMC researchers

Special thanks to researchers providing widely used generating vectors and direction numbers used throughout the scientific computing community.