QKI Analytics — manual leaf-value editing experiment
Recorded on 3 November 2026

OUTCOME

One baseline fit, one manually selected six-leaf patch, one held-out test.
Test accuracy: 95.130641% -> 95.368171% (41 -> 39 errors out of 842).
Test log loss: 0.1406377932 -> 0.1417644143 (worse).
Exact two-sided McNemar p = 0.50. These results do not establish a repeatable
improvement. The assistant used labelled validation examples to choose edits.

INSPECT THE RECORDED RUN WITHOUT EXECUTION

recorded/results.json: metrics, paired uncertainty estimates and executed checks.
manual_patch.json: the six literal replacements and selection notes.
protocol.json: experiment design fixed before baseline training.
recorded/first_tree_inspection.json: train/validation evidence used for edits.
recorded/baseline_trees.json and patched_trees.json: complete trees, readable
without deserializing Python model objects.
recorded/test_edit_effects.json: the two changed test decisions and leaf counts.
recorded/*_predictions.npz: target labels, predictions, groups and input row IDs.
recorded/train.npz, validation.npz, test.npz: the original feature/label splits.
recorded/baseline_summary.json: environment, input/split hashes and baseline.
recorded/frozen_patch.json and test_opened.json: patch freeze and test-open markers.

The original pickle model checkpoints, virtual environment and caches are not
distributed. Their hashes remain in the recorded provenance manifests. All tree
parameters are supplied in JSON instead. The recorded JSON/NPZ files are copied
from the actual run without changing their contents.

REPLAY IN A FRESHLY EXTRACTED DIRECTORY

Install uv, then run from this bundle's root:

    uv sync --python 3.13
    uv run python train_once.py
    uv run python apply_and_evaluate.py

The original environment was Python 3.13.3 on Apple Silicon macOS,
scikit-learn 1.7.2, NumPy 2.3.4 and SciPy 1.16.3. pyproject.toml and uv.lock
pin the scientific dependencies. The scripts assert the exact leaf values;
platform or library changes can change fitting details and stop a replay.

Replaying performs a NEW baseline fit and applies the ALREADY CHOSEN patch.
It does not test whether an assistant independently chooses the same edits.
Generated files are written alongside the scripts; recorded/ preserves the
original run. Refitting or reopening the test in the same run directory is
blocked deliberately. Use another fresh extraction for another replay.

The experiment had no fitting after the baseline. apply_and_evaluate.py disables
the estimator's fit method, verifies the six changed values and unchanged tree
structure, reconstructs predictions by tree traversal, and checks log loss from
raw scores. No optimizer or automatic search chooses the replacement values.

DATA CREDIT AND TRANSFORMATIONS

Hopkins, M., Reeber, E., Forman, G., & Suermondt, J. (1999).
Spambase [Dataset]. UCI Machine Learning Repository.
https://doi.org/10.24432/C53G6X
https://archive.ics.uci.edu/dataset/94/spambase
License: Creative Commons Attribution 4.0 International
https://creativecommons.org/licenses/by/4.0/

spambase.zip is the original UCI archive downloaded for the experiment.
391 repeated feature-and-label rows were removed. Identical feature vectors,
including conflicting labels, were kept together with StratifiedGroupKFold
(5 folds, shuffle=True, random_state=42). Fold 0 is test, fold 1 validation,
and folds 2–4 training. No missing numeric values were found in this archive.

INSPIRATION

Rikiya Takehi, Sparks of Weight-Space Programming:
https://rikiyat.github.io/blog/weight-space-programming/

This experiment edits a tree ensemble, not a neural network. The saved files
identify the runtime and libraries but do not identify the exact LLM version.
