DivAlgo: A systematic evaluation of algorithmic diversity for code generation models

Anubhav Jangra, Smaranda Muresan
10/13/2026
cs.SEcs.CL

No confident code implementation found for this paper.

Abstract

Code generation models are actively being used in professional and educational settings. However, the competence of large language models (LLMs) to generate algorithmically diverse code remains largely unknown. We propose the DivAlgo benchmark, a large-scale dataset constituting algorithmically diverse solutions to programming problems. We also introduce a lightweight similarity metric to enable large-scale evaluation. Our experiments across 24 modern code generation models found that uncontrolled model-generated code is significantly less diverse than human solutions (capturing ~31% of human diversity), and even the best diverse code generation strategy could achieve only ~70% of human diversity. Moreover, while it was possible to steer the models to generate solutions based on human strategies, they were unable to reproduce the diversity of the human solutions. These findings indicate the limitations of code generation models in capturing the algorithmic diversity humans exhibit, and that overexposure to model-generated code can narrow programmers' algorithmic vocabulary.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{jangra2026divalgo,
  title  = {DivAlgo: A systematic evaluation of algorithmic diversity for code generation models},
  author = {Anubhav Jangra and Smaranda Muresan},
  year   = {2026},
  eprint = {2610.19157},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2610.19157v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2610.19157.svg)](https://codeofpaper.com/paper/2610.19157)

Discussion