Welcome to the official repository of "Surprising Success, Repeated Failure: Entropy-Guided Credit Assignment for Exploration in LLM Reasoning"!
EAPO (Entropic Advantage Policy Optimization) is an entropy-guided credit-assignment method for exploration in LLM reasoning. It redistributes each response's advantage across tokens, assigning stronger penalties to low-entropy tokens in negative-advantage responses to correct repeated failures and greater credit to high-entropy tokens in positive-advantage responses to reinforce exploration, while attenuating penalties at uncertain positions to preserve opportunities for recovery.
We recommend using uv to set up the environment. Dependencies are specified in pyproject.toml and pinned in uv.lock.
git clone https://github.com/wgcyeo/EAPO.git
cd EAPOAfter installing uv, run:
uv sync
source .venv/bin/activateCopy the environment template:
cp .env.example .envFor W&B logging, set WANDB_PROJECT in .env and run wandb login. To disable logging, set REPORT_TO=none in .env.
Train EAPO with:
bash scripts/run_train_eapo.sh <MODEL_NAME>Replace <MODEL_NAME> with a Hugging Face model ID or local model directory, such as Qwen/Qwen3-4B-Base.
To train the GRPO baseline:
bash scripts/run_train_grpo.sh <MODEL_NAME>Trained adapters and checkpoints are saved to outputs/<run_name>/.
--eapo-kappa <value> # EAPO weighting strength (default: log(4); 0 for uniform credit)
--learning-rate <lr> # Learning rate (default: 1e-5)
--max-steps <n> # Training steps (default: 200)For all options, run bash scripts/run_train_eapo.sh --help.
Evaluate a base model or local LoRA adapter on AIME, HMMT, AMC23, and MATH500 with:
bash scripts/eval.sh <MODEL_OR_PATH>Use a model ID or the trained adapter directory, such as outputs/<run_name>. Evaluation datasets are downloaded automatically.
--datasets <names> # Benchmarks to evaluate, e.g. AIME24,HMMT26
--max-new-tokens <n> # Maximum response length (default: 16384)Evaluation reports avg@32 and pass@32 from 32 responses per problem. Scores and responses are saved to results/<model_or_run_name>/.
If you find EAPO useful in your research, please cite our paper:
@article{yeo2026eapo,
title = {Surprising Success, Repeated Failure: Entropy-Guided Credit Assignment for Exploration in {LLM} Reasoning},
author = {Yeo, Woongyeong and Kang, Minki and Lee, Chanuk and Park, Sangwoo and Baek, Jinheon and Hwang, Sung Ju},
journal = {arXiv preprint arXiv:2609.33781},
year = {2026}
}