Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Skieriya/fMRI-key-generation-with-TRIBEv2/llms.txt
Use this file to discover all available pages before exploring further.
run_integrated_pipeline() executes all six benchmark stages — model training, few-shot evaluation, multi-method key generation, NeuralVault verification, AWGN noise sweep, and motion artifact sweep — and returns a single results dictionary. This dictionary is serialized to JSON and used as the source of truth for all downstream reports and visualizations.
Results Dictionary Schema
Theresults dict produced by run_integrated_pipeline() has the following top-level structure:
timestamp— ISO 8601 string recording when the pipeline was executed.baseline_metrics— Dict mapping each method name to itsd_primeandeervalues. TheNeuralVaultentry additionally carriesroc_auc(from cosine-distance ROC scoring) and the optimalthresholdfor the genuine/impostor decision boundary.neural_metrics— Aggregated few-shot classification performance:accuracy,f1_score, androc_aucaveraged over 40 evaluation episodes.noise_tests— ContainsSNR_LEVELS(the list[30, 20, 15, 10, 5, 0]) and one EER list per method, indexed positionally againstSNR_LEVELS.artifact_tests— ContainsARTIFACT_LEVELS(the list[0.0, 0.05, 0.10, 0.15, 0.20, 0.30]) and one EER list per method, indexed positionally.vault_scores— Raw cosine distance arrays for all genuine and impostor pairs evaluated by the NeuralVault verification path, plus the threshold value at the EER operating point (0.31643475697002743).vault_prototype_keys— List of 5 hex-encoded 256-bit keys, one per stimulus class, derived from the mean embedding of each class viaderive_key().
The
vault_scores genuine and impostor arrays contain the full set of per-sample cosine distances and are omitted from display here due to their size, but are available in full in benchmark/results/keygen_benchmark_results.json.Prototype Keys
Each class prototype key is derived by computing the mean embedding over all training samples for that class, quantizing toint16 with a scaling factor of 1000, and passing the result through HKDF-SHA256 with the info string b"neural-vault-few-shot-v1". The resulting 32-byte (256-bit) keys are:
| Class | Key (hex) |
|---|---|
| 0 | 1eaa2877f253315cecb77828e30f707d8fe381b07ba83851725c84a2e240c69b |
| 1 | 5f4da41c3524a593bd6a9cec804a75e2167b33aa324c1d73daa2479adbd2eef4 |
| 2 | b2948b9ff884a445721658e63c4c8540c3b025c06f7a6b4c12a26f62dc9db12a |
| 3 | f6cce4665919dd4d1598f41bb0bfd0ecb1de9b48672599509170e49bb123e1a0 |
| 4 | bef2c1b2013102138abf20696101f69ab1d6629d17e6935121ad0f7a2b4fe284 |
Output Files
run_integrated_pipeline(), generate_reports(), and generate_visualizations() collectively produce the following files:
| File | Description |
|---|---|
benchmark/results/keygen_benchmark_results.json | Complete results dictionary including all metrics, noise/artifact sweeps, raw vault scores, and prototype keys |
benchmark/reports/benchmark_summary.json | Condensed summary with neural model evaluation, NeuralVault evaluation, and the winners block identifying the best method by d-prime and EER |
benchmark/reports/BENCHMARK_REPORT.md | Human-readable markdown report with formatted tables for d-prime, EER, and per-method noise robustness profiles |
benchmark/visualizations/neuralvault_extended_dashboard.png | 6-panel matplotlib figure at 200 DPI (see below) |
neural_vault_benchmarks.png | Standalone dark-theme benchmark plot generated by model.py |
generate_reports(results)
generate_reports determines the winning method for each metric before writing output:
"highest_separability_method": "Neural" and "lowest_error_rate_method": "Neural".
generate_visualizations(results) — 6-Panel Dashboard
The neuralvault_extended_dashboard.png is a 3×2 grid figure (18×18 inches, 200 DPI):
| Panel | Title | Content |
|---|---|---|
| A | Key Generation Separability (d-prime) | Vertical bar chart comparing d-prime for SHA256, HMAC, BioHashing, and Neural |
| B | Key Generation Error Rate Comparison | Vertical bar chart comparing EER (%) for the same three methods |
| C | Noise Robustness for Key Generation Methods | Line chart of EER vs. SNR (dB, x-axis inverted) for all four methods |
| D | Model Performance Metrics | Horizontal bar chart showing Accuracy, Macro F1, and ROC-AUC for the NeuralVaultFewShot model |
| E | Training Loss Curve | Triplet loss over 100 training epochs |
| F | Embedding Space Class Mapping (PCA) | 2D PCA scatter of the learned embedding space, colored by class label |
neural_vault_benchmarks.png generated by model.py uses a dark background theme and includes six different panels: distribution histograms for genuine/impostor scores, the ROC curve, the DET curve, a 1D cosine similarity mapping, the training loss curve, and a d-prime Gaussian overlay illustrating score distribution separability.