https://github.com/ai4co/trajevo
[ICML'25 WM WS] TrajEvo: Designing Trajectory Prediction Heuristics via LLM-driven Evolution
Science Score: 36.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.6%) to scientific vocabulary
Repository
[ICML'25 WM WS] TrajEvo: Designing Trajectory Prediction Heuristics via LLM-driven Evolution
Basic Info
- Host: GitHub
- Owner: ai4co
- License: mit
- Language: Jupyter Notebook
- Default Branch: main
- Homepage: https://arxiv.org/abs/2505.04480
- Size: 4.31 MB
Statistics
- Stars: 8
- Watchers: 2
- Forks: 0
- Open Issues: 0
- Releases: 1
Metadata Files
README.md
TrajEvo
Evolving SOTA Trajectory Prediction Heuristics with LLMs
| Approach | Explainability | Speed | Performance | | :--- | :---: | :---: | :---: | | Manual Heuristic Design | ✅ | ✅ | ❌ | | Deep Learning | ❌ | ❌ | ✅ | | TrajEvo | ✅ | ✅ | ✅ |
TrajEvo takes the best of both worlds: it is fast and explainable like manual heuristic design, but also performs well like deep learning.
(more discussions in the paper)
Install
With uv:
bash
uv venv --python 3.12
source .venv/bin/activate
uv sync --all-extras
You may check the available LLM clients in utils/llm_client. Remember to set the environment variables for the LLM client you want to use. For example, to run the exp with VertexAI, remember to run export GOOGLE_APPLICATION_CREDENTIALS="..." with the json file.
Usage
From the root directory, you may run:
bash
python main.py problem=trajectory_prediction init_pop_size=8 max_fe=50 timeout=20 llm_client=vertexai problem.dataset=eth
Change problem.dataset to eth, hotel, univ, or zara1 for different datasets. This means training on all datasets except ETH (i.e., it will generate the "ETH" results).
Note that the main problem files repo for trajectory prediction is here: trajectory_prediction
Train TrajEvo (run multiple experiments)
bash
python main.py -m problem=trajectory_prediction init_pop_size=8 max_fe=50 timeout=20 llm_client=vertexai problem.dataset=eth,zara1,zara2,hotel,univ seed=0,1,2 wandb_name="trajevo_v1"
The above will run multiple (with -m) experiments, across all datasets, with different seeds.
Evaluate TrajEvo
ETH-UCY
```bash
ETH
python trajectoryprediction/eval.py --codepath trajectoryprediction/trajevo/eth.py --codefunction predict_trajectory --test --dataset eth
Hotel
python trajectoryprediction/eval.py --codepath trajectoryprediction/trajevo/hotel.py --codefunction predict_trajectory --test --dataset hotel
Univ
python trajectoryprediction/eval.py --codepath trajectoryprediction/trajevo/univ.py --codefunction predict_trajectory --test --dataset univ
Zara1
python trajectoryprediction/eval.py --codepath trajectoryprediction/trajevo/zara1.py --codefunction predict_trajectory --test --dataset zara1
Zara2
python trajectoryprediction/eval.py --codepath trajectoryprediction/trajevo/zara2.py --codefunction predict_trajectory --test --dataset zara2 ```
This will evaluate TrajEvo held-out on each specific dataset.
SDD generalization
To evaluate the best heuristic found for the ETH split --> SDD generalization:
bash
python trajectory_prediction/eval.py --code_path trajectory_prediction/trajevo/eth.py --code_function predict_trajectory --test --dataset sdd
You can substitute the eth.py with other heuristics found in the trajectory_prediction/trajevo folder to obtain other results. Note that this specific value should be multiplied by 100 to convert to original scale.
Evaluate Heuristic Baselines
For CVM-S:
bash
python trajectory_prediction/eval.py --code_path trajectory_prediction/baselines/cvm/model.py --code_args "{'sample':True}" --test --code_function predict_trajectory --dataset eth
You may just change the code_path and the sampling attribute to obtain other baselines:
- CVM: --code_path trajectory_prediction/baselines/cvm/model.py --code_args "{'sample':False}"
- CVM-S: --code_path trajectory_prediction/baselines/cvm/model.py --code_args "{'sample':True}"
- ConstantAcc: --code_path trajectory_prediction/baselines/constant_accel/model.py
- CTRV: --code_path trajectory_prediction/baselines/ctrv/model.py
- CSCRCTR: --code_path trajectory_prediction/baselines/cscrctr/model.py
- SocialForce: --code_path trajectory_prediction/baselines/socialforce/model.py
As well as the dataset argument to evaluate on other datasets.
(Note: these results might be slightly different from what reported in the paper due to different random seed used at the time of writing)
Citation
If you find our work helpful (or if you are so kind as to offer us some encouragement), please consider giving us a star, and citing our paper:
bibtex
@article{zhao2025trajevo,
title={{TrajEvo}: Designing Trajectory Prediction Heuristics via LLM-driven Evolution},
author={Zhikai Zhao and Chuanbo Hua and Federico Berto and Kanghoon Lee and Zihan Ma and Jiachen Li and Jinkyoo Park},
journal={arXiv preprint arXiv:2505.04480},
url={https://github.com/ai4co/trajevo},
year={2025}
}
Acknowledgements
Our work is built on top of the ReEvo repo! Please check it out: https://github.com/ai4co/reevo
Owner
- Name: ai4co
- Login: ai4co
- Kind: organization
- Repositories: 1
- Profile: https://github.com/ai4co
GitHub Events
Total
- Issues event: 1
- Watch event: 10
- Push event: 4
- Public event: 1
- Pull request review event: 1
- Pull request event: 3
- Create event: 4
Last Year
- Issues event: 1
- Watch event: 10
- Push event: 4
- Public event: 1
- Pull request review event: 1
- Pull request event: 3
- Create event: 4
Dependencies
- PyYAML >=6.0.1
- annotated-types >=0.6.0
- antlr4-python3-runtime >=4.9.3
- anyio >=4.2.0
- certifi >=2024.7.4
- distro >=1.9.0
- h11 >=0.14.0
- httpcore >=1.0.2
- httpx >=0.26.0
- hydra-colorlog >=1.2.0
- hydra-core >=1.3.2
- idna >=3.7
- ipykernel >=6.29.5
- matplotlib >=3.10.1
- numpy >=1.26.3
- omegaconf >=2.3.0
- openai >=1.8.0
- packaging >=23.2
- pip >=24.0.1
- pydantic >=2.5.3
- pydantic_core >=2.14.6
- scipy >=1.11.4
- sniffio >=1.3.0
- tqdm >=4.66.3
- typing_extensions >=4.9.0
- 147 dependencies