Unsupervised truth detection in vision-language models using Contrast Consistent Search (CCS).
Changes to this README and project organization were made after the project deadline for ease of use in terms of reproducibility. No changes have been made to the actual code, implementation, or methodology. Only organizational improvements and documentation were added.
If ease of use is part of the evaluation rubric, please refer to the project state at the deadline on the martin branch(which was later merged to the main for visibility) via the commit history. The core implementation and results were completed on that branch by the deadline.
cd /path/to/vision_ccs
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Before running, modify the hardcoded paths in the shell scripts to match your setup.
From the project root directory, run either:
For supervised approach:
sbatch run_supervised_vision.sh
For unsupervised CCS approach:
sbatch run_vision_ccs.sh
Edit CONFIG in the respective script:
n_samples_*: Number of samples per category (auto-loaded from dataset)batch_size: Processing batch size (default: 40)use_cache: Whether to use cached hidden statesvqa_json: Path to VQA datasetimage_dirs: List of COCO image directoriescache_dir: Directory for cached hidden statescategories: Question categories to evaluatechosen_model: Model selection ('llava', 'qwen2', or 'qwen2_5')train_split: Train/test split ratioccs_epochs: Training epochs (unsupervised only)ccs_ntries: Random restarts (unsupervised only)ccs_lr: Learning rateccs_weight_decay: Weight decay for regularizationJupyter Notebook
87.6%
Python
11.9%
Unsupervised truth detection in vision-language models using Contrast Consistent Search (CCS).
Changes to this README and project organization were made after the project deadline for ease of use in terms of reproducibility. No changes have been made to the actual code, implementation, or methodology. Only organizational improvements and documentation were added.
If ease of use is part of the evaluation rubric, please refer to the project state at the deadline on the martin branch(which was later merged to the main for visibility) via the commit history. The core implementation and results were completed on that branch by the deadline.
cd /path/to/vision_ccs
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Before running, modify the hardcoded paths in the shell scripts to match your setup.
From the project root directory, run either:
For supervised approach:
sbatch run_supervised_vision.sh
For unsupervised CCS approach:
sbatch run_vision_ccs.sh
Edit CONFIG in the respective script:
n_samples_*: Number of samples per category (auto-loaded from dataset)batch_size: Processing batch size (default: 40)use_cache: Whether to use cached hidden statesvqa_json: Path to VQA datasetimage_dirs: List of COCO image directoriescache_dir: Directory for cached hidden statescategories: Question categories to evaluatechosen_model: Model selection ('llava', 'qwen2', or 'qwen2_5')train_split: Train/test split ratioccs_epochs: Training epochs (unsupervised only)ccs_ntries: Random restarts (unsupervised only)ccs_lr: Learning rateccs_weight_decay: Weight decay for regularizationJupyter Notebook
87.6%
Python
11.9%