[ICML 2026] Code for "Do Activation Verbalization Methods Convey Privileged Information?"
1
stars
1
commits
Python
primary language
May 20, 2026
updated
This is the codebase for Do Activation Verbalization Methods Convey Privileged Information?.

This codebase is a minimal reproduction of parts of the paper, which we divide into two sections. Part 1 includes experiments related Section 3 (zero-shot prompting) and Section 4 (activation inversion). Part 2 includes experiments related to Section 5, which is PersonaQA.
LIT-based methods require a model trained with Latent Interpretation Tuning; refer to the LatentQA codebase for training details. Patchscopes uses off-the-shelf models and require no additional training.
Note that the Patchscopes run in this repository runs Patchscopes linearly as opposed to in parallel -- as mentioned in the appendix of the paper, this can change the results. In the main body of the paper, we run Patchscopes in parallel.
To set up the environment for this:
conda env create -f environment.yml
conda activate verb_faithfulness
pip install flash-attn==2.7.4.post1 --no-build-isolation
The feature extraction dataset can be found in the Patchscopes repository, specifically in the preprocessed_data directory, and we use the exact samples that are filtered from their code. For ease of access, we provide the dataset directly in the /datasets/feature_extraction.
The training dataset for PersonaQA can be downloaded from here. We include all three datasets: PersonaQA, PersonaQA-Shuffled, and PersonaQA-Fantasy.
In the PersonaQA folder, the original prompts used to generate the dataset are shown. In PersonaQA-Shuffled and PersonaQA-Fantasy, we include the text used to train the models and the associated attributes in the respective profiles.json folder.
For the Section 5.3 of the paper (extended PersonaQA-Fantasy), refer to the Appendix F.2 for the additional prompts.
We use the PersonaQA dataset for training the model to be inspected by the verbalizer; specifically, we use both bios.jsonl and interviews.jsonl for training; for evaluation (and the prompts used for evaluation), refer to Appendix F.2 for more information. For ease of directly evaluating the models, we also include the trained models directly on Huggingface at millicentli/Llama-3-8B-PersonaQA, millicentli/Llama-3-8B-PersonaQA-Shuffled, and millicentli/Llama-3-8B-PersonaQA-Fantasy, which can be used out of the box.
We also include the prompts used to evaluate the PersonaQA datasets in /datasets/personaqa. This is different from the training dataset, is downloaded from the link noted above.
Run scripts/exp1.sh to reproduce the zero-shot baseline, Patchscopes, and LIT results on the feature extraction tasks. Set the following variables at the top of the script:
LIT_CKPT — path to a trained LIT checkpoint (or pull it from the original LIT paper)TARGET_MODEL / DECODER_MODEL — model names for Patchscopes (default: Llama-3.1-8B-Instruct)To view the zero-shot prompting results, use the following notebook: view_prompt_baseline.ipynb
We try to invert the activations that are passed into the verbalizer to inspect the input information they might contain. Our inversion code is based on LatentQA and Vec2Text codebases.
The inversion/ directory contains a vendored copy of vec2text, originally authored by Morris et al. 2023, 2024. See inversion/NOTICE for attribution details and a summary of local modifications.
cd inversion
pip install -e inversion/
Two inversion models are used in Experiment 2, each with its own training script. Run these commands to train your own, or use the models uploaded on Huggingface (millicentli/llama3_inversion_llama3_multi for multiple activations and millicentli/llama3_inversion_t5-base_single for a single activation).
LIT inverter (Llama3 → Llama3, multi-token activations): trains text reconstruction using Llama-3.1-8B-Instruct.
sbatch scripts/train_full_acts_inverter.sh
T5 inverter (Llama3 → T5, single-token activation): trains text reconstruction using a T5-base vec2text model for Llama-3.1-8B-Instruct.
sbatch scripts/train_single_act_inverter.sh
Note that training both models manually can be very slow, and there was no optimization done to necessarily improve the speed. For instance, when training the LIT inverter, we opted to end training early because it had already converged early on -- use your own discretion here, as the main goal is to show that inversion of activations is inherently possible.
Run scripts/exp2.sh to run both inversion methods (LIT/Llama3 and Patchscopes/T5) followed by zero-shot prediction on the inversion outputs. Set the following variables at the top of the script:
LIT_INV_CKPT — path to a trained LIT inversion checkpoint (PEFT adapter)T5_INV_CKPT — path to a trained T5 vec2text checkpointTo view the inversion results, use the following notebook: view_inversion_results.ipynb
Using the same models from Part 1, we run the verbalization methods on PersonaQA and the derivative datasets. We provide a pipeline to initially run PersonaQA using the verbalization methods, though we leave additional analyses from the paper out for simplicity.
First, download the training PersonaQA datasets. Then, put it in the same directory as the feature_extraction dataset. Then, train a target LM on the PersonaQA datasets. We provide the models that we trained on Huggingface, which can be accessed at millicentli/Llama-3-8B-PersonaQA, millicentli/Llama-3-8B-PersonaQA-Shuffled, and millicentli/Llama-3-8B-PersonaQA-Fantasy. Note that the training is simple and can easily be done: we just include both the bios.jsonl and interviews.jsonl and their text field as input for training via next token prediction.
Run scripts/exp3.sh to reproduce the zero-shot baseline, Patchscopes, and LIT results across all three PersonaQA model variants (PersonaQA, PersonaQA-Fantasy, PersonaQA-Shuffled). Set the following variables at the top of the script:
BASE_DIR — path to this repositoryOUTPUT_DIR — path to scratch/output directoryLIT_CKPT — path to a trained LIT checkpoint (same checkpoint used in Experiment 1)MODEL_DIR — directory containing the three fine-tuned PersonaQA modelsThe eval prompts for all three variants are included in datasets/personaqa/. The zero-shot baseline uses meta-llama/Llama-3.1-8B-Instruct; Patchscopes and LIT read activations from the respective fine-tuned target model.
To view the PersonaQA results, use the following notebook: view_personaqa_results.ipynb
If you found our work helpful and/or used our PersonaQA dataset, please cite the following:
@inproceedings{li2026activationverbalizationmethodsconvey,
title={Do Activation Verbalization Methods Convey Privileged Information?},
author={Millicent Li and Alberto Mario Ceballos Arroyo and Giordano Rogers and Naomi Saphra and Byron C. Wallace},
booktitle={Forty-third International Conference on Machine Learning},
year={2026},
url={https://openreview.net/forum?id=IFGTKwHwK6},
}
1 commits
Python
91.1%
Jupyter Notebook
6.0%
Shell
2.9%
[ICML 2026] Code for "Do Activation Verbalization Methods Convey Privileged Information?"
1
stars
1
commits
Python
primary language
May 20, 2026
updated
This is the codebase for Do Activation Verbalization Methods Convey Privileged Information?.

This codebase is a minimal reproduction of parts of the paper, which we divide into two sections. Part 1 includes experiments related Section 3 (zero-shot prompting) and Section 4 (activation inversion). Part 2 includes experiments related to Section 5, which is PersonaQA.
LIT-based methods require a model trained with Latent Interpretation Tuning; refer to the LatentQA codebase for training details. Patchscopes uses off-the-shelf models and require no additional training.
Note that the Patchscopes run in this repository runs Patchscopes linearly as opposed to in parallel -- as mentioned in the appendix of the paper, this can change the results. In the main body of the paper, we run Patchscopes in parallel.
To set up the environment for this:
conda env create -f environment.yml
conda activate verb_faithfulness
pip install flash-attn==2.7.4.post1 --no-build-isolation
The feature extraction dataset can be found in the Patchscopes repository, specifically in the preprocessed_data directory, and we use the exact samples that are filtered from their code. For ease of access, we provide the dataset directly in the /datasets/feature_extraction.
The training dataset for PersonaQA can be downloaded from here. We include all three datasets: PersonaQA, PersonaQA-Shuffled, and PersonaQA-Fantasy.
In the PersonaQA folder, the original prompts used to generate the dataset are shown. In PersonaQA-Shuffled and PersonaQA-Fantasy, we include the text used to train the models and the associated attributes in the respective profiles.json folder.
For the Section 5.3 of the paper (extended PersonaQA-Fantasy), refer to the Appendix F.2 for the additional prompts.
We use the PersonaQA dataset for training the model to be inspected by the verbalizer; specifically, we use both bios.jsonl and interviews.jsonl for training; for evaluation (and the prompts used for evaluation), refer to Appendix F.2 for more information. For ease of directly evaluating the models, we also include the trained models directly on Huggingface at millicentli/Llama-3-8B-PersonaQA, millicentli/Llama-3-8B-PersonaQA-Shuffled, and millicentli/Llama-3-8B-PersonaQA-Fantasy, which can be used out of the box.
We also include the prompts used to evaluate the PersonaQA datasets in /datasets/personaqa. This is different from the training dataset, is downloaded from the link noted above.
Run scripts/exp1.sh to reproduce the zero-shot baseline, Patchscopes, and LIT results on the feature extraction tasks. Set the following variables at the top of the script:
LIT_CKPT — path to a trained LIT checkpoint (or pull it from the original LIT paper)TARGET_MODEL / DECODER_MODEL — model names for Patchscopes (default: Llama-3.1-8B-Instruct)To view the zero-shot prompting results, use the following notebook: view_prompt_baseline.ipynb
We try to invert the activations that are passed into the verbalizer to inspect the input information they might contain. Our inversion code is based on LatentQA and Vec2Text codebases.
The inversion/ directory contains a vendored copy of vec2text, originally authored by Morris et al. 2023, 2024. See inversion/NOTICE for attribution details and a summary of local modifications.
cd inversion
pip install -e inversion/
Two inversion models are used in Experiment 2, each with its own training script. Run these commands to train your own, or use the models uploaded on Huggingface (millicentli/llama3_inversion_llama3_multi for multiple activations and millicentli/llama3_inversion_t5-base_single for a single activation).
LIT inverter (Llama3 → Llama3, multi-token activations): trains text reconstruction using Llama-3.1-8B-Instruct.
sbatch scripts/train_full_acts_inverter.sh
T5 inverter (Llama3 → T5, single-token activation): trains text reconstruction using a T5-base vec2text model for Llama-3.1-8B-Instruct.
sbatch scripts/train_single_act_inverter.sh
Note that training both models manually can be very slow, and there was no optimization done to necessarily improve the speed. For instance, when training the LIT inverter, we opted to end training early because it had already converged early on -- use your own discretion here, as the main goal is to show that inversion of activations is inherently possible.
Run scripts/exp2.sh to run both inversion methods (LIT/Llama3 and Patchscopes/T5) followed by zero-shot prediction on the inversion outputs. Set the following variables at the top of the script:
LIT_INV_CKPT — path to a trained LIT inversion checkpoint (PEFT adapter)T5_INV_CKPT — path to a trained T5 vec2text checkpointTo view the inversion results, use the following notebook: view_inversion_results.ipynb
Using the same models from Part 1, we run the verbalization methods on PersonaQA and the derivative datasets. We provide a pipeline to initially run PersonaQA using the verbalization methods, though we leave additional analyses from the paper out for simplicity.
First, download the training PersonaQA datasets. Then, put it in the same directory as the feature_extraction dataset. Then, train a target LM on the PersonaQA datasets. We provide the models that we trained on Huggingface, which can be accessed at millicentli/Llama-3-8B-PersonaQA, millicentli/Llama-3-8B-PersonaQA-Shuffled, and millicentli/Llama-3-8B-PersonaQA-Fantasy. Note that the training is simple and can easily be done: we just include both the bios.jsonl and interviews.jsonl and their text field as input for training via next token prediction.
Run scripts/exp3.sh to reproduce the zero-shot baseline, Patchscopes, and LIT results across all three PersonaQA model variants (PersonaQA, PersonaQA-Fantasy, PersonaQA-Shuffled). Set the following variables at the top of the script:
BASE_DIR — path to this repositoryOUTPUT_DIR — path to scratch/output directoryLIT_CKPT — path to a trained LIT checkpoint (same checkpoint used in Experiment 1)MODEL_DIR — directory containing the three fine-tuned PersonaQA modelsThe eval prompts for all three variants are included in datasets/personaqa/. The zero-shot baseline uses meta-llama/Llama-3.1-8B-Instruct; Patchscopes and LIT read activations from the respective fine-tuned target model.
To view the PersonaQA results, use the following notebook: view_personaqa_results.ipynb
If you found our work helpful and/or used our PersonaQA dataset, please cite the following:
@inproceedings{li2026activationverbalizationmethodsconvey,
title={Do Activation Verbalization Methods Convey Privileged Information?},
author={Millicent Li and Alberto Mario Ceballos Arroyo and Giordano Rogers and Naomi Saphra and Byron C. Wallace},
booktitle={Forty-third International Conference on Machine Learning},
year={2026},
url={https://openreview.net/forum?id=IFGTKwHwK6},
}
1 commits
Python
91.1%
Jupyter Notebook
6.0%
Shell
2.9%