Research codebase for budgeted counter-evidence auditing in black-box time-series models.
Repository scope: two companion studies.
- Part 1: component localization (counter-evidence shortlisting, low budget).
- Part 2: risk auditing with adaptive budget (early stopping) and edge-server feasibility.
- Code and scripts are reproducible for published tables.
- Final submission-oriented tag:
v12-final(see tags). - Datasets are not bundled (download/preprocess locally into
data/).
Adaptive shortlist (adaptive_v2) improves localization over uniform occlusion in the confirmed PAMAP2 setup.
| Method | loc@1 | hit@3 |
|---|---|---|
| Uniform (interp) | 0.1211 | 0.2109 |
| BEACON adaptive_v2 | 0.2969 | 0.4609 |
Early stopping reduces average additional checks from Q=64 to about ~11 (roughly 5–6x budget reduction), but equal-budget quality gains over uniform are not supported in the current protocol.
| Dataset | q_mean | ΔAUROC vs equal-budget uniform | p-value |
|---|---|---|---|
| UCI HAR | 10.69 | -0.0528 | 0.252 |
| PAMAP2 | 11.10 | -0.0736 | 0.200 |
| WISDM | 10.59 | -0.0481 | 0.420 |
Interpretation: strong engineering gain (latency/budget), cautious quality claim.
Measured on HAR + ExtraTrees (Ryzen 7 7840HS):
inference_only p50: 7.30 msBEACON core Q64 p50: 436.07 msearly-stop estimate: 81.8–93.3 ms (~5x faster than core Q64)
Raspberry Pi 4 in this repo is estimate-only (not direct measurement): about 0.7–1.0 s per audited sample under current assumptions.
beaconxai/— core library (audit logic, features, utilities)scripts/— experiment runners and aggregatorsconfigs/— experiment configs (cross-dataset, v10/v11)artifacts/— manuscript insert packs and summariessupplementary/— export-ready tables used in appendix/supp
Local-only (gitignored): data/, outputs_composite/, build caches/logs.
conda env create -f environment.yml
conda activate beaconxaipython -m venv .venv
.venv/bin/pip install -r requirements.txt
.venv/bin/pip install -r requirements-extra.txt
.venv/bin/pip install -e .make reproduce-quick.venv/bin/python scripts/run_cross_dataset_benchmark.py \
--config configs/experiments_v11_cross_dataset.json \
--out-root outputs_composite/v11_cross_datasetThen aggregate:
.venv/bin/python scripts/aggregate_v11_results.py
.venv/bin/python scripts/make_v11_summary_table.py.venv/bin/python scripts/benchmark_beacon_vs_uniform.py \
--datasets har,pamap2,wisdm \
--budgets 16,32,64 \
--n-boot 2000 \
--adaptive-v2 \
--out-root outputs_composite/v12_beacon_vs_uniform_full./scripts/run_early_stop_v12_full.shProduces:
outputs_composite/early_stop_v12_full_summary.csvartifacts/early_stop_v12_full_summary.md
artifacts/part2_earlystop_insert_pack_ru_en_v12.mdartifacts/handoff_science_analysis_v12_draft_ru.mdartifacts/v11_full_summary.mdoutputs_composite/edge_portability_profile_v12.csvoutputs_composite/edge_resource_budget_table_v12.csvoutputs_composite/edge_portability_earlystop_estimate_v12.csvoutputs_composite/early_stop_v12_full_summary.csv
logit-panelis the practical baseline.TANshows local improvements on specific WISDM settings only.Fuzzy(current fixed-rule setup) does not support a stable positive quality claim.
Detailed comparisons are kept in supplementary artifacts.
If you use this code, cite the associated BEACON-XAI papers and link this repository tag.