Skip to content

RayZhhh/behavesim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

behavesim

BehaveSim: Rethinking Code Similarity for
Automated Algorithm Design with LLMs

Code for the ICLR 2026 paper Rethinking Code Similarity for Automated Algorithm Design with LLMs

Stars Forks License Usage Tutorial Framework Guide DeepWiki

📝 Citation

@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}
}

✨ Highlights

  • Paper implementation of BehaveSim for LLM-driven automated algorithm design.
  • Includes a modular algodisco package layout with FunSearch and FunSearch + 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.

📌 Repository Scope

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.

🛠️ Requirements

  • Python >= 3.11
  • Python 3.12 is recommended

🚀 Installation

First, clone the repository:

git clone https://github.com/RayZhhh/behavesim.git
cd behavesim

Option 1: uv (recommended)

uv venv
source .venv/bin/activate
uv pip sync

Option 2: pip

pip install -e .

🚀 Quick Start

The shortest path is to run the provided Python example:

  1. Open run_search.py.
  2. Replace the Todo placeholders for your base_url, api_key, logger settings, and parallelism values.
  3. 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.yaml

Starter config templates are provided in:

  • algodisco/methods/funsearch_behavesim/configs/run_pickle_logger.yaml
  • algodisco/methods/funsearch_behavesim/configs/run_swanlab_logger.yaml

📖 Tutorial

For repository users, the recommended reading path is:

  1. Read AlgoDisco's quick start for the overall workflow.
  2. Read AlgoDisco's search-method documentation for the framework-level method design.
  3. Open this repository's runnable example for the minimum BehaveSim-specific setup.
  4. 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.

About

Code for ICLR 26 paper: "Rethinking Code Similarity for Automated Algorithm Design with LLMs"

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages