This repo contains the dataset and code for our ICML 2025 paper. If you use the code or dataset, please cite our paper.
Title: SPRI: Aligning Large Language Models with Context-Situated Principles
Authors: Hongli Zhan, Muneeza Azmat, Raya Horesh, Junyi Jessy Li, Mikhail Yurochkin
@inproceedings{zhan2025spri,
title={SPRI: Aligning Large Language Models with Context-Situated Principles},
author={Zhan, Hongli and Azmat, Muneeza and Horesh, Raya and Li, Junyi Jessy and Yurochkin, Mikhail},
booktitle={Proceedings of the 42nd International Conference on Machine Learning},
year={2025}
}$ conda create --name spri python==3.12.7
$ conda activate spri
$ pip install -r requirements.txtWe additionally release the SFT datasets generated by SPRI on Huggingface, and you can find them here: https://huggingface.co/papers/2502.03397.
I'm actively putting up the documentation of the code. If you have any questions, feel free to email me at [email protected].