The Neural Vault benchmark evaluates five distinct key generation strategies applied to the same standardized fMRI feature matrix derived from 5 stimulus classes. Each method receives identical input — aDocumentation 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.
StandardScaler-normalized feature array — and produces a binary key representation that is then measured against class prototypes using Hamming distance. This controlled setup isolates the contribution of the key generation algorithm itself, independent of the input data.
Key Generation Methods
All five methods are evaluated byevaluate_keygen_method(X, y, keygen_fn), which computes per-class prototype keys and measures Hamming distances between each genuine sample’s key and its class prototype, and between each impostor sample’s key and all non-matching prototypes.
- SHA256 —
np.frombuffer(hashlib.sha256(f.tobytes()).digest(), dtype=np.uint8)applied per sample. Produces a 256-bit cryptographic hash directly from the raw float bytes, returned as auint8array. Sensitive to any bit-level change in the input. - HMAC —
np.frombuffer(hmac.new(b"secret_vault", f.tobytes(), hashlib.sha256).digest(), dtype=np.uint8). Keyed hash with a fixed secret, providing message authentication semantics. Like SHA256, it is not designed for biometric similarity. - BioHashing —
GaussianRandomProjection(n_components=128, random_state=42)applied to each sample, followed by binarization at threshold0.0. Projects the feature vector into a random 128-dimensional subspace and thresholds to produce a binary string. - Neural —
NeuralVaultFewShottransformer embeddings are quantized and binarized at the global median of the embedding matrix:binarize(X_emb[:, :128], threshold=np.median(X_emb[:, :128])). The embedding is learned via triplet loss, so genuine samples cluster tightly in latent space. - NeuralVault — Cosine similarity scoring against per-class prototype embeddings in the learned metric space, using
verify_similarity(X_emb, prototypes, y). This variant does not rely on Hamming distance but instead measures cosine distance, making it the most semantically aligned to the biometric verification task.
Evaluation Metrics
Three metrics characterize the separability and error rate of each method:- d-prime (d′) — A signal detection theory measure of separability between the genuine and impostor Hamming distance distributions. Higher is better; values above 2.0 indicate excellent separation. Computed as
|μ_impostor − μ_genuine| / √(0.5 × (σ²_genuine + σ²_impostor)). - EER (Equal Error Rate) — The operating point where the False Acceptance Rate (FAR) equals the False Rejection Rate (FRR). Lower is better. Computed via Brent’s root-finding method on the interpolated ROC curve.
- ROC-AUC — Area under the Receiver Operating Characteristic curve, reported for the NeuralVault cosine scoring path only. Values near 1.0 indicate near-perfect discrimination.
Benchmark Results
The table below summarizes baseline performance for each method on the unperturbed fMRI feature matrix.| Method | d-prime | EER (%) |
|---|---|---|
| Neural | 5.950 | 0.75% |
| NeuralVault | 4.835 | 0.94% |
| BioHashing | 2.208 | 15.09% |
| HMAC | 0.250 | 52.58% |
| SHA256 | 0.136 | 48.39% |
Neural Classification Metrics
The underlyingNeuralVaultFewShot transformer model is evaluated independently through 40 few-shot classification episodes, each sampling 4 support samples and 4 query samples per class. Aggregated across all episodes:
| Metric | Score |
|---|---|
| Accuracy | 98.12% |
| Macro F1-Score | 0.9810 |
| ROC-AUC | 0.9995 |
Noise Robustness
EER degradation curves under AWGN noise (0–30 dB SNR) and motion artifact simulation (0–30% dropout) for all five methods.
Results & Output Files
Full pipeline output structure, prototype key values, generated report files, and the 6-panel visualization dashboard.