This repository contains the code, analysis, and collected outputs for the paper "A Compute-Matched Re-Evaluation of TroVE on MATH". The work was presented at The second AI for MATH Workshop at the 42nd International Conference on Machine Learning. It builds on the original TroVE implementation, which is available here.
data/: MATH subsets used in this re-evaluationtroves/: collected TroVE runs and evaluation outputsprimitives/: collected PRIMITIVE runs and evaluation outputsevaluate_primitive.py: evaluation for PRIMITIVE logsevaluate_trove.py: evaluation for TroVE logsevaluate_trove_corrected.py: evaluation with the corrected TroVE selection mechanismanalysis/: notebooks and helper scripts for the analysis
Set up the environment as in the original TroVE repository. Then place a checkout of
that codebase inside this repository, for example as trove_main/, so you can run
the original experiment scripts alongside the evaluation code here.
To reproduce the re-evaluation, run the original TroVE and baseline experiments for
different seeds. If you only want to inspect the reported outputs, the stored results
are already included in troves/ and primitives/.
For TroVE:
SEED=42
TASK_NAME="math/precalculus"
MODEL_NAME="codellama/CodeLlama-7b-Instruct-hf"
python run_trove.py \
--seed $SEED \
--task_name $TASK_NAME \
--model_name $MODEL_NAME \
--num_return_sequences 5For PRIMITIVE:
TASK_NAME="math/precalculus"
SEED=50
SUFFIX="primitive"
NUM_RETURN_SEQUENCES=15
MODEL_NAME="codellama/CodeLlama-7b-Instruct-hf"
python baseline.py \
--seed $SEED \
--task_name $TASK_NAME \
--suffix $SUFFIX \
--num_return_sequences $NUM_RETURN_SEQUENCES \
--model_name $MODEL_NAMETo match the number of return sequences, PRIMITIVE needs 3x the number used for TroVE.
PRIMITIVE and TroVE can also be evaluated assuming a perfect oracle selection
mechanism. For each .md log file from a run, use:
python evaluate_primitive.py path/to/Primitive_n.mdpython evaluate_trove.py path/to/Trove_n.mdTo re-evaluate TroVE with the corrected selection mechanism, changing the original two-stage agreement-based selection into a one-stage selection, run:
python evaluate_trove_corrected.py path/to/Trove_n.mdRun the notebook in analysis/ to reproduce the reported analysis and figures.
Before doing so, update the primitive_path and trove_path variables to point to
the PRIMITIVE and TroVE result folders you want to analyze.
If you use this repository, please cite:
@article{sesterhenn2025compute,
title={A Compute-Matched Re-Evaluation of TroVE on MATH},
author={Sesterhenn, Tobias and Berlot-Attwell, Ian and Zenkner, Janis and Bartelt, Christian},
journal={arXiv preprint arXiv:2507.22069},
note={Presented at The second AI for MATH Workshop at the 42nd International Conference on Machine Learning},
year={2025}
}