Code for the ICLR 2026 paper Rethinking Code Similarity for Automated Algorithm Design with LLMs
@inproceedings{zhang2026rethinking,
title={Rethinking Code Similarity for Automated Algorithm Design with LLMs},
author={Zhang, Rui and Lu, Zhichao},
booktitle={The Fourteenth International Conference on Learning Representations},
url={https://openreview.net/pdf?id=HIUqeO9OOr},
year={2026}
}- Paper implementation of BehaveSim for LLM-driven automated algorithm design.
- Includes a modular
algodiscopackage layout withFunSearchandFunSearch + BehaveSim. - Supports configurable similarity calculators, multi-island search, and optional SwanLab logging.
- Provides a short Python entrypoint and YAML-based method configs for quick experimentation.
This repository is a focused, lightweight companion repo for the BehaveSim paper. It keeps the runnable method code and minimal usage entrypoints here, but intentionally does not duplicate the full framework tutorial, architecture walkthrough, or broader method documentation.
If you want to understand the overall search framework design, method abstractions, configuration philosophy, and end-to-end workflow, please use AlgoDisco as the primary reference.
- Python >= 3.11
- Python 3.12 is recommended
First, clone the repository:
git clone https://github.com/RayZhhh/behavesim.git
cd behavesimuv venv
source .venv/bin/activate
uv pip syncpip install -e .The shortest path is to run the provided Python example:
- Open
run_search.py. - Replace the
Todoplaceholders for yourbase_url,api_key, logger settings, and parallelism values. - Run one of the following commands:
uv run run_search.py
python run_search.py
nohup uv run run_search.py > log.out 2>&1 &
nohup python run_search.py > log.out 2>&1 &If you prefer the YAML entrypoint, run:
python -m algodisco.methods.funsearch_behavesim.main_funsearch_behavesim --config path/to/your_config.yamlStarter config templates are provided in:
algodisco/methods/funsearch_behavesim/configs/run_pickle_logger.yamlalgodisco/methods/funsearch_behavesim/configs/run_swanlab_logger.yaml
For repository users, the recommended reading path is:
- Read AlgoDisco's quick start for the overall workflow.
- Read AlgoDisco's search-method documentation for the framework-level method design.
- Open this repository's runnable example for the minimum BehaveSim-specific setup.
- Inspect this repository's BehaveSim YAML templates for the method-specific config fields.
In short: use this repository for the paper-specific code, and use AlgoDisco for the fuller tutorial and architecture context.
