← Documentation / SQL Reference
View DOI 1.16 on Zenodo: https://doi.org/10.5281/zenodo.22029346
New DBBuilt on the current, join-free pipeline (build_notta_tta_comp_db.py), one independent database per model.
DOI 1.15 proved C=1 whenever
σgt=σnotta, for any shared
value, not just zero. This report completes that result: a
converse proof that C=1 is mathematically equivalent to that
condition (not merely correlated with it), then a direct search
for where it actually happens away from zero — and why.
Like DOI 1.15, every query is single-database, so all four
models are covered by one script that changes the
.open target between sections, in a single
continuous recording.
nonzero_sigma_gt_eq_notta_discovery.sqlWITH candidates AS (
SELECT sigma_gt
FROM blocks
WHERE sigma_gt > 1e-6 AND ssim_c_notta = 1.0
),
total AS (
SELECT COUNT(*) AS n_total_blocks FROM blocks WHERE sigma_gt > 1e-6
)
SELECT 'n_found' AS metric, CAST(COUNT(*) AS VARCHAR) AS value FROM candidates
UNION ALL SELECT 'pct_of_blocks', CAST(ROUND(100.0*COUNT(*)/(SELECT n_total_blocks FROM total),4) AS VARCHAR) FROM candidates
UNION ALL SELECT 'max_sigma_gt', CAST(MAX(sigma_gt) AS VARCHAR) FROM candidates
UNION ALL SELECT 'min_sigma_gt', CAST(MIN(sigma_gt) AS VARCHAR) FROM candidates;
-- Repeats identically for SwinIR, High-Fidelity, and Digital-Art.
This is only searchable at all because of DOI 1.15's converse
proof: substituting C=1 into its defining formula and
rearranging gives (σgt−σnotta)²=0,
a double root with no other solution — so C=1 isn't just
correlated with σgt=σnotta, it's
mathematically equivalent to it. That makes
ssim_c_notta = 1.0 a safe, exact search key even
though σnotta itself isn't a stored column.
Restricted to σgt>0 (away from the
already-proven masking regime), real ties turn up at a small
but non-negligible rate: 0.019%–0.342% of blocks depending
on the model, topping out at SwinIR.
nonzero_sigma_gt_eq_notta_discovery.sql (continued)WITH candidates AS (
SELECT (ssim_l_notta * ssim_c_notta * ssim_s_notta) AS ssim
FROM blocks
WHERE sigma_gt > 1e-6 AND ssim_c_notta = 1.0
)
SELECT 'pct_trivial_ssim_eq_1' AS metric, CAST(ROUND(100.0*SUM(CASE WHEN ssim=1.0 THEN 1 ELSE 0 END)/COUNT(*),4) AS VARCHAR) AS value FROM candidates
UNION ALL SELECT 'pct_different_content_ssim_lt_1', CAST(ROUND(100.0*SUM(CASE WHEN ssim<1.0 THEN 1 ELSE 0 END)/COUNT(*),4) AS VARCHAR) FROM candidates
UNION ALL SELECT 'min_ssim_different_content', CAST(MIN(CASE WHEN ssim<1.0 THEN ssim END) AS VARCHAR) FROM candidates;
Not every tie found in Part 1 is interesting on its own — some are pixel-identical blocks, for which scoring SSIM=1 follows trivially from SSIM's own formula (substitute identical values into L, C, and S and each becomes 1).
This query splits the population apart: the large majority, 83.13%–99.9984% of found ties depending on the model, involve genuinely different content that merely happens to share the same local variance (more precisely, local standard deviation, σgt) — not pixel-identical blocks at all, with the lowest observed SSIM among them as low as 0.0535.
Worth being explicit about why that floor is so low rather than close to 1: σgt=σnotta pins only the contrast term, C=1 (see DOI 1.15). It says nothing about L (whether the brightness matches) or S (whether the actual pixel pattern correlates) — both stay free to reflect how different the content really is. The coincidence doesn't fool SSIM as a whole; it only ties one of its three components — and only that much is mathematically guaranteed. L and S coincidentally aligning too, which would fool SSIM as a whole, isn't ruled out; it would just take a rarer three-way coincidence instead of a one-term one. That it didn't happen in this dataset (the 0.0535 floor) is an empirical result, not a proof. That's the opposite of the masking blind spot (σgt=0, DOI 1.11): there, S really is mathematically forced regardless of content, so SSIM really is guaranteed to be fooled. Here, only C is guaranteed — this dataset's own numbers, not a proof, are why SSIM wasn't.
sigma_gt_discreteness_check.sqlA quick primer first. An 8-bit image can only store 256 distinct brightness levels per pixel — the integers 0–255, never anything in between (see 8-bit pixel quantization in the Glossary). Because σgt (a block's pixel-value spread) is computed from a small, fixed handful of these integers, only a limited set of exact σgt results is mathematically possible — so two blocks with completely different brightness can still land on the exact same result, simply because both are built from the same restricted menu of 256 possible pixel values:
A worked example: two 4-pixel blocks, one bright and one dark, sharing no content in common — yet both compute to exactly the same σ, because both are built from the same 256-value menu. σ=1 is just a convenient round number for this example; the same effect happens at any σ value.
Real blocks are 8×8 or 11×11 (not four pixels), and this dataset has millions of them — but the same effect scales up: many unrelated blocks end up sharing an exact σgt value purely by this arithmetic, with nothing about their actual content in common. The query below measures exactly how often that happens here.
WITH pop AS (
SELECT sigma_gt FROM blocks WHERE sigma_gt > 1e-6
)
SELECT 'n_total_blocks' AS metric, CAST(COUNT(*) AS VARCHAR) AS value FROM pop
UNION ALL SELECT 'n_distinct_sigma_gt_values', CAST(COUNT(DISTINCT sigma_gt) AS VARCHAR) FROM pop
UNION ALL SELECT 'avg_blocks_per_distinct_value', CAST(ROUND(COUNT(*)*1.0/COUNT(DISTINCT sigma_gt),2) AS VARCHAR) FROM pop;
σgt depends only on the shared ground-truth
image, not the model, so this query runs once and the result is
identical across all four. Of 79,321,389 blocks, only 2,308,415
distinct σgt values exist — an average of
34.36 blocks sharing each exact value, confirming the mechanism
above at this dataset's actual scale. That's the mechanism
behind Parts 1–2: not a defect in
SSIM, the comp_* framework, or 8-bit imaging
itself, but a validated diagnostic method for checking whether
this kind of coincidental sub-term tie occurs in a given
dataset — not a claim about how prevalent it is
universally.
(Update, DOI 1.21: this 2,308,415 count uses exact bit-pattern equality, which turns out to slightly over-count due to floating-point arithmetic's non-associativity — the same true value can end up stored as two very slightly different bit patterns. A tolerance-based recount finds the true figure is closer to 1,184,640, about half as many. See Technical Report v1.21 for the full analysis. This doesn't change the conclusion above — the coincidental-tie mechanism is unaffected either way.)