This project contains the code of my masters thesis.
Results of causally probing TCT-ColBERT
Retrieval performance on the
Setup Conda environment
conda create -n ma pyton=3.8
conda activate ma
pip install -r requirements
python -m spacy download en_core_wb_sm
trec evaluation
git clone https://github.com/usnistgov/trec_eval.git
cd trec_eval
make
ranking utils
git clone https://github.com/mrjleo/ranking-utils.git
cd ranking-utils
python -m pip install .
neuralcoref
git clone https://github.com/huggingface/neuralcoref.git
cd neuralcoref
pip install -r requirements.txt
pip install -e .
Example: Causally probe subject model for task BM25 with intervention at layer 12. The intervention eliminates a subspace of rank 1.
python apply_intervention.py --layer=12 --eliminated_subspace_rank=1 --task=bm25 --model=tct_colbert
Example: Sanity check experiment for task NER with intervention at layer 12. The intervention eliminates a subspace of rank 8.
python apply_intervention.py --layer=12 --eliminated_subspace_rank=8 --task=ner --model=tct_colbert --ablation=reconstruct_property
Example: Subspace experiment for task NER with intervention at layer 12.
python apply_intervention.py --layer=12 --task=ner --model=tct_colbert --ablation=subspace_rank