# How the analysis works This folder turns saved agent sessions into Leakage Scores. It answers one question: **can the probe page guess the user's secret just from what the agent did there?** There are three stages: find what each agent did, compute the scores, save a report. ``` events.db + results.db ──features.py──► one row per session │ ▼ channel_metrics.py ──► Leakage Score, 95% interval, recovered bits inference.py ──► the same, plus the refusal check │ ▼ export_report.py ──► results//results.json ``` The code stores scores as fractions from -1 to 1. The paper reports them in percentage points, so a code value of `0.595` is an LS of 59.5 in the paper. `scripts/export_ls_table.py` does this conversion. ## 1. What did the agent do? (`features.py`) `build_feature_table(scenario)` joins two SQLite databases and gives **one row per session**: - **Event log** (`events.db`, written by the probe website in `attacker/`): every click, hover, page change, scroll and form submit on the probe page. - **Results store** (`results.db`): one row per session, with the model, the condition, the variant and the true held value (`secret_label`). For each option on the page (the list comes from the scenario file), it computes: - `click_