mlsanityData to 7 Oct 2026

Rethinking Code Similarity for Automated Algorithm Design with LLMs

arXiv 2603.02787 ↗First posted 3 Mar 2026cs.AIcited by 1

On the map: LLM reasoning → Reasoning for agents, planning and code

Abstract (arXiv)

The rise of Large Language Model-based Automated Algorithm Design (LLM-AAD) has transformed algorithm development by autonomously generating code implementations of expert-level algorithms. Unlike traditional expert-driven algorithm development, in the LLM-AAD paradigm, the main design principle behind an algorithm is often implicitly embedded in the generated code. Therefore, assessing algorithmic similarity directly from code, distinguishing genuine algorithmic innovation from mere syntactic variation, becomes essential. While various code similarity metrics exist, they fail to capture algorithmic similarity, as they focus on surface-level syntax or output equivalence rather than the underlying algorithmic logic. We propose BehaveSim, a novel method to measure algorithmic similarity through the lens of problem-solving behavior as a sequence of intermediate solutions produced during execution, dubbed as problem-solving trajectories (PSTrajs). By quantifying the alignment between PSTrajs using dynamic time warping (DTW), BehaveSim distinguishes algorithms with divergent logic despite syntactic or output-level similarities. We demonstrate its utility in two key applications: (i) Enhancing LLM-AAD: Integrating BehaveSim into existing LLM-AAD frameworks (e.g., FunSearch, EoH) promotes behavioral diversity, significantly improving performance on three AAD tasks. (ii) Algorithm analysis: BehaveSim clusters generated algorithms by behavior, enabling systematic analysis of problem-solving strategies--a crucial tool for the growing ecosystem of AI-generated algorithms. Data and code of this work are open-sourced at https://github.com/RayZhhh/behavesim.

Key facts. Cited by 1 paper in the map (data through 7 Oct 2026). Placed in Reasoning for agents, planning and code, one of 17 directions in LLM reasoning. Builds on 23 of its 38 references that are in the map. First posted on arXiv 3 Mar 2026.

Builds on

23 of 38 references.

Closest ancestors · 1

Same direction, newest first

  1. 2024NExT: Teaching Large Language Models to Reason about Code Execution23 Apr

Other references · 22

  1. 2019BERTScore: Evaluating Text Generation with BERTcited by 5,462
  2. 2020CodeBERT: A Pre-Trained Model for Programming and Natural Languagescited by 1,286
  3. 2025Qwen3 Embedding: Advancing Text Embedding and Reranking Through Foundation Modelscited by 1,175
  4. 2025AlphaEvolve: A coding agent for scientific and algorithmic discoverycited by 763
  5. 2020CodeBLEU: a Method for Automatic Evaluation of Code Synthesiscited by 468
  6. 2015Illuminating search spaces by mapping elitescited by 406
  7. 2024ReEvo: Large Language Models as Hyper-Heuristics with Reflective Evolutioncited by 266
  8. 2020Unsupervised Translation of Programming Languagescited by 262
  9. 2024Evolution of Heuristics: Towards Efficient Automatic Algorithm Design Using Large Language Modelcited by 258
  10. 2024LLM-SR: Scientific Equation Discovery via Programming with Large Language Modelscited by 117
  11. 2023Jina Embeddings 2: 8192-Token General-Purpose Text Embeddings for Long Documentscited by 103
  12. 2023CodeBERTScore: Evaluating Code Generation with Pretrained Models of Codecited by 101
10 more
  1. 2024LLaMEA: A Large Language Model Evolutionary Algorithm for Automatically Generating Metaheuristicscited by 92
  2. 2024Planning In Natural Language Improves LLM Search For Code Generationcited by 79
  3. 2023CodeScore: Evaluating Code Generation by Learning Code Executioncited by 66
  4. 2024A Systematic Survey on Large Language Models for Algorithm Designcited by 65
  5. 2024Multi-objective Evolution of Heuristic Using Large Language Modelcited by 52
  6. 2020Trex: Learning Execution Semantics from Micro-Traces for Binary Similaritycited by 34
  7. 2024Understanding the Importance of Evolutionary Search in Automated Heuristic Design with Large Language Modelscited by 22
  8. 2024Evolve Cost-aware Acquisition Functions Using Large Language Modelscited by 17
  9. 2024What can Large Language Models Capture about Code Functional Equivalence?cited by 13
  10. 2024Identify Critical Nodes in Complex Network with Large Language Modelscited by 4

Built on by

Cited by year (2026 to 7 Oct)

Citing papers per year: 2026: 1.

1 paper.

Similar, not cited

Close in wording, no citation either way

  1. 2026Are you Synthesizing or Recalling? Evaluating LLMs on Algorithmic Code Retrieval
  2. 2025Beyond Code Generation: LLM-supported Exploration of the Program Design Space
  3. 2025AlgoSimBench: Identifying Algorithmically Similar Problems for Competitive Programming
  4. 2025code_transformed: The Influence of Large Language Models on Code
  5. 2025On Code-Induced Reasoning in LLMs
  6. 2026Not All Code Is Equal: A Data-Centric Study of Code Complexity and LLM Reasoning
  7. 2025PACIFIC: a framework for generating benchmarks to check Precise Automatically Checked Instruction Following In Code
  8. 2025Leveraging LLMs, IDEs, and Semantic Embeddings for Automated Move Method Refactoring