← Documentation / SQL Reference

DOI 1.7 — Axis5 collapse intensity and Tier3 state distribution by Axis1 polarity

Old DBBuilt on the earlier, JOIN-based pipeline. Not every model was affected by its data-integrity bug — Standard and High-Fidelity needed correction, SwinIR and Digital-Art were confirmed unaffected. See Superseded Files.

axis5_weights_query.md

Confirms the published Axis5 feature-weight table matches what's actually persisted in each model's database, by reading back the stored config_json record (run once per model).

Screen recording: meltan_integrated_viewer_upscayl_digital-art.mp4 (Digital-Art, one of the two models confirmed unaffected by the JOIN-based pipeline's data-integrity bug) — shown as representative evidence covering both of this DOI's queries. Per-model recordings for all four models (including Standard and High-Fidelity, both since corrected elsewhere) are part of the full Zenodo archive.

.mode line

SELECT
  json_extract_string(config_json, '$.feature_weights.noise_processed_block')::DOUBLE AS noise,
  json_extract_string(config_json, '$.feature_weights.d1_ssim')::DOUBLE AS d1,
  -- ...one column per remaining feature weight...
  json_extract_string(config_json, '$.thresholds.p50')::DOUBLE AS P50,
  json_extract_string(config_json, '$.thresholds.t1')::DOUBLE AS T1,
  json_extract_string(config_json, '$.thresholds.t2')::DOUBLE AS T2
FROM axis5_history
ORDER BY created_at DESC
LIMIT 1;

.mode duckbox

.mode line switches the DuckDB CLI's display so each column prints on its own line instead of side by side in a table — needed here because this query returns 14 columns, more than fits a terminal-width table. json_extract_string(config_json, '$.path.to.field') pulls one named value out of a JSON blob stored in a single column; ::DOUBLE converts the extracted text into a number. ORDER BY created_at DESC LIMIT 1 takes the most recent record from axis5_history (a table with one row per time the feature-weight fitting procedure was run) — so this reads back whatever the last real fitting run actually persisted, rather than re-deriving the weights from scratch. .mode duckbox at the end restores the normal table display for any query run afterward.

tier3_axis1_crosstab_query.md

Tier3 state distribution restricted to the positive-Axis1 region (Axis1 > +0.1), run once per model.

.mode duckbox

SELECT tier3_state, COUNT(*) AS n,
       100.0 * COUNT(*) / SUM(COUNT(*)) OVER () AS pct
FROM blocks WHERE axis1 > 0.1
GROUP BY tier3_state ORDER BY n DESC;

axis1 is another pre-computed column (a signed bias-direction score derived in the earlier DOI 1.3; see that report for how it's built). WHERE axis1 > 0.1 restricts to what this series calls the Axis1-positive region. The rest is the same tier3_state distribution + SUM(...) OVER () percentage pattern as DOI 1.6's first query (see DOI 1.6), just filtered down to this one region instead of the whole database.