| --- |
| license: mit |
| tags: |
| - hallucination |
| - vlm |
| - evaluation |
| - diagnostic |
| viewer: false |
| --- |
| |
| # Subspace Validity Suite (SVS) |
|
|
| **Diagnostic toolkit for validating "visual directions" in Vision-Language Models.** |
|
|
| Paper: "What PCA-Based Visual Directions in VLMs Actually Capture" (WACV 2027) |
|
|
| ## Installation |
|
|
| ```bash |
| git clone https://huggingface.co/datasets/Anonymousblind/svs-subspace-validity-suite |
| cd svs-subspace-validity-suite |
| pip install . |
| ``` |
|
|
| ## Quick Start |
|
|
| ```python |
| from svs import SubspaceValiditySuite |
| |
| svs = SubspaceValiditySuite() |
| report = svs.full_report( |
| directions=your_directions, # (k, d) numpy array |
| h_visual=visual_hidden_states, # list of (d,) arrays |
| h_gibberish=gibberish_states, # list of (d,) arrays |
| h_factual=factual_states, # optional |
| h_math=math_states, # optional |
| ) |
| svs.print_report(report) |
| ``` |
|
|
| ## Repository Contents |
|
|
| - `svs/` — Pip-installable toolkit (6 diagnostic tests) |
| - `experiments/` — All experiment scripts (Colab-ready) |
| - `checkpoints/` — Raw results for reviewer verification |
| - `directions/` — Extracted subspace directions |
|
|
| ## Checkpoints |
|
|
| Load any checkpoint to verify paper numbers: |
|
|
| ```python |
| import json |
| with open("checkpoints/gibberish_test/statistical_summary.json") as f: |
| stats = json.load(f) |
| for method, r in stats.items(): |
| print(f"{method}: Gib/Vis={r['gv_ratio']:.2f}, d={r['cohens_d']:.3f}") |
| ``` |
|
|