This is the impletementation for ACL26 main paper "BaseCal: Unsupervised Confidence Calibration via Base Model Signals"
conda create -n basecal python=3.10 -y && conda activate basecal
# Core dependencies
pip install torch==2.6.0
pip install "transformers>=4.45.0,<5.0.0" jsonlines netcal scikit-learn matplotlib regex openai filelock datasets "pyarrow>=14.0.0,<18.0.0" pandas accelerate
# vLLM (for LM Judge in Step 3, QA datasets only)
pip install "pyzmq>=23.0.0,<27.0.0" tiktoken
pip install "vllm==0.8"bash data/download_and_preprocess.shOutputs data/{triviaqa,nq,squad,webquestion,mmlu}/{train,dev,test}.json.
Generate model responses and obtain correctness labels (EM for MMLU, LM Judge for QA) to build the calibration dataset.
Edit paths in scripts/run_generation.sh, then:
bash scripts/run_generation.shRun for each (dataset, model, split) combination. The script auto-starts a vLLM Judge server for QA datasets.
Edit paths in scripts/run_basecal.sh, then:
bash scripts/run_basecal.shResults saved to output/basecal/<dataset>/<model>/result.json.
@article{tan2026basecal,
title={BaseCal: Unsupervised Confidence Calibration via Base Model Signals},
author={Tan, Hexiang and Yang, Wanli and Zhang, Junwei and Chen, Xin and Tang, Rui and Su, Du and Wang, Jingang and Wang, Yuanzhuo and Sun, Fei and Cheng, Xueqi},
journal={arXiv preprint arXiv:2601.03042},
year={2026}
}