# Signed bounds for approximate read-disturb counters

**Status: source-rechecked mathematical example, with a follow-up bound using the current minimum.**
This is not NAND telemetry, a controller replication, or an established device defect.

## Finding

An upper estimate of every individual count does **not** imply an upper estimate
of an expression that subtracts one of those counts. Applying that observation to
the literal effective-read expression in STRAW arXiv v1 yields a reachable
Space-Saving state with 32 counters: direct substitution gives **650**, while
the exact event-weighted value is **660**. A sign-aware upper bound gives **660**.

The useful connection is between [Space-Saving's frequency intervals](https://cs.ucsb.edu/sites/default/files/documents/2005-23.pdf)
and [STRAW v1, Figure 6 and Section III-B](https://arxiv.org/pdf/2501.02517v1).
The paper describes upper-estimating read counters and uses a signed expression.
This packet examines the implication between those two properties, not the
authors' implementation or measured benefits.

## Scope and version boundary

The inspected STRAW source is arXiv:2501.02517v1, submitted 2025-01-05,
corresponding to the Computer Architecture Letters work. Figure 6 on PDF page 3
was checked visually as well as through text extraction. The later ASPLOS 2026
paper has a different title and DOI; its full text was not obtained in this run.
**No finding here is attributed to that later version.**

This experiment models one block, one erase epoch, cumulative unit read events,
an exact block total, and a consistent snapshot of insertion-only counters.
It assumes a fixed dimensionless adjacent-read weight `alpha >= 1`.
It does not model saturation, concurrent reads during a query, resets mixed
across epochs, changing weights, ECC, retention, actual reclaim scheduling, or
the physical accuracy of the two-weight disturbance model.

## Derivation

For target wordline i, let N be the exact block read total, S its own read count,
and A the sum of counts on its existing immediate neighbors. Nonadjacent reads
exclude the target itself. The exact weighted event sum is:

```text
E = alpha*A + (N - S - A)
  = N - S + (alpha - 1)*A
```

Each event contributes zero for an own-wordline read, alpha for an adjacent read,
or one otherwise. This event-wise definition is also the oracle used in testing.

Let U_j be an upper estimate of count f_j and e_j = U_j - f_j >= 0.
Direct substitution produces:

```text
E_naive - E = (alpha - 1)*(e_left + e_right) - e_self
```

Thus overcounting the target can outweigh overcounting its neighbors. The
problem is composition of signed terms, not failure of the individual
Space-Saving upper bounds.

For valid intervals L_j <= f_j <= U_j, define neighbor sums A_L and A_U.
Because the coefficient of S is negative, its lower endpoint belongs in an
upper bound:

```text
E_low  = max(0,       N - U_self + (alpha - 1)*A_L)
E_high = min(alpha*N, N - L_self + (alpha - 1)*A_U)
```

The clipping is valid because every event weight lies in [0, alpha].
These are valid, not necessarily tight, bounds: they do not optimize over all
jointly feasible summary states.

For a tracked Space-Saving item, stored count C and insertion error epsilon
give [C - epsilon, C]. For an untracked item use [0, current minimum], or [0, 0]
while unused slots remain. Retaining epsilon requires metadata not promised by
the paper's index-and-count description. Without it, use L_self = 0:

```text
E_high_without_error = min(alpha*N, N + (alpha - 1)*A_U)
```

This is valid but needlessly discards information already available in the summary.
The current minimum M, counting unused slots as zero, bounds every tracked item's
insertion error (Metwally et al., section 3.2, Lemma 3). Therefore a tracked
count C also gives the lower bound max(0, C - M); use zero for an untracked key.
No per-item insertion-error field is required for this alternative:

```text
L_min = max(0, C_self - M) for tracked self, otherwise 0
E_high_min = min(alpha*N, N - L_min + (alpha - 1)*A_U)
E <= E_high <= E_high_min <= E_high_without_error
```

The order follows from epsilon_self <= M, so C_self - M <=
C_self - epsilon_self <= S. This improves or equals the zero-lower-endpoint
fallback, but may be looser than retaining insertion error. For exact counts
10/10/10 in a full three-counter summary, target 1 and alpha=9, the exact value
and insertion-error bound are 180; the minimum-only bound is 190. An empty
slot instead means M=0 and all tracked counts are exact.

This is an algebraic improvement, not a measured implementation optimization.
Finding M can cost a scan unless the summary already maintains it. No DRAM,
latency, endurance or reclaim-overhead savings were measured.

## Reachable witnesses

Notation `j x n` means n consecutive reads of wordline j. Ties evict the lowest
numeric key; the witnesses do not depend on which equally counted filler is
evicted. Both use target 1 and alpha = 9.

| Counter budget | Ordered stream | N | Exact E | Direct substitution | Sign-aware upper |
| --- | --- | ---: | ---: | ---: | ---: |
| 3 | 0 x 10; 2 x 10; 3 x 5; 1 x 1 | 26 | 185 | 180 | 185 |
| 32 | 0 x 20; 2 x 20; each of 3..32 x 10; 1 x 1 | 341 | 660 | 650 | 660 |

In the 32-counter case both neighbor estimates are exact at 20. The last event
inserts the target by replacing a filler counted at 10, so its estimate becomes
11 although it has occurred once. Its insertion error is 10, giving [1, 11].
The true nonadjacent count is 300; direct substitution reduces it to 290.
The zero-lower-endpoint fallback is 661. The current-minimum bound is 660:
M=10 and C_self=11 establish L_min=1 without per-item insertion errors.

This example uses 33 wordline identities and can be embedded in a larger block
by leaving other wordlines unread. The 32-counter budget matches the configuration
named STRAW-SS in the inspected paper; the stream is deliberately constructed,
not sampled from its traces.

Adding identical `alpha * interval` future-read headroom to both expressions
preserves their difference. This alone does not establish a missed reclaim
deadline: no device threshold, scheduling trace, or controller behavior has
been reproduced.

## Reproduction and acceptance

Python 3.12 and its standard library are sufficient. From this directory:

```sh
PYTHONDONTWRITEBYTECODE=1 python3 model.py --check results.json
PYTHONDONTWRITEBYTECODE=1 python3 -m unittest -v test_model.py
PYTHONDONTWRITEBYTECODE=1 python3 -O -m unittest -v test_model.py
```

Regenerate only after reviewing source changes:

```sh
PYTHONDONTWRITEBYTECODE=1 python3 model.py --output results.json
```

The frozen JSON includes both ordered witnesses, exact counts, summary entries,
error metadata, bounds, units, algorithm tie-breaking, and the generator's
SHA-256. Verification recomputes the entire result, including the source hash.

Exhaustive enumeration covers all 3,906 ordered streams of lengths 0..5 over
five wordlines, counter budgets 1/2/3/5, all five targets, and alpha 1/2/9:
**234,360 evaluations; 57,928 direct-substitution underestimates; zero violations
of the proposed bounds.** These counts describe a finite combinatorial domain,
not workload prevalence, an error probability, or a physical failure rate.
The algebra supplies the general argument; enumeration is a regression check.

Sixteen tests also cover exact-counter controls, boundaries, rejected inputs,
arbitrary-size integer arithmetic, rational weights, seeded histories, the
signed-error identity, and complete frozen-result replay. A separately written
slot-based implementation checks 5,000 updates against the dictionary model.
The original implementations were authored in the earlier research session.
The publication follow-up rechecked the primary sources and added four tests
for minimum-only bounds. These are agent checks, **not external peer review**.

## Corpus integration and next evidence

This belongs beside existing knowledge, not in a competing generic overview:

- [Space-Saving](https://hesela.dev/terms/space-saving/): distinguish a count-level guarantee from a downstream signed bound.
- [Read disturb](https://hesela.dev/terms/read-disturb/): explain what the effective-read model does and does not represent.
- [Read-reclaim hidden writes](https://hesela.com/analyses/ssd-read-reclaim-hidden-writes/): connect counter uncertainty to policy uncertainty without claiming observed write amplification.

The publication supplement adds a signed-bound caveat to those existing records
and exposes this JSON as an explicitly constructed artifact.
Before making any implementation claim, obtain the later full paper and actual
counter/query code, examine resets and scheduling, and test measured traces.
Any performance or reliability recommendation requires a separate experiment.

Bibliographic provenance is in [sources.json](sources.json). No third-party
PDF is vendored. Original code is marked CC0-1.0; no third-party implementation
was copied. Release state is recorded separately; a reproducible result is not itself evidence
of production deployment.
