Abstract
As LLMs become increasingly prevalent, it is interesting to consider how "creative" these models can be. From cognitive science, creativity consists of at least two key characteristics: convergent thinking (purposefulness to achieve a given goal) and divergent thinking (adaptability to explore new environments or constraints). In this work, we introduce a framework for quantifying LLM creativity that incorporates two design ingredients: (1) Denial Prompting, which pushes LLMs to develop more creative solutions by incrementally imposing new constraints, and (2) NeoGauge, a metric that quantifies both convergent and divergent thinking. We test this framework on Codeforces problems and find that even the most creative model, GPT-4, still falls short of human-like creativity. We also experiment with advanced reasoning strategies (MCTS, self-correction, etc.) and observe no significant improvement in creativity. As a by-product of our analysis, we release the NeoCoder dataset for reproducing our results on future models.
Introduction
While Large Language Models (LLMs) excel at generating code, they often rely on "regurgitation"—repeating common patterns from their training data. This raises the question: are these models truly creative, or simply sophisticated search engines? In cognitive science, creativity is defined by two pillars: Convergent Thinking (the ability to follow rules to reach a correct solution) and Divergent Thinking (the ability to explore unconventional paths). Existing benchmarks often focus on subjective tasks like storytelling; this work addresses the challenge of measuring creativity in objective problem-solving through code generation.
Methodology
The study introduces a two-part framework to evaluate creativity:
Denial Prompting
This iterative strategy forces models to explore their "knowledge toolbox." Initially, a model solves a problem without constraints (State 0). An augmentation model then identifies the techniques used (e.g., for-loops). In subsequent rounds (States 1-5), the model must solve the same problem while being "denied" those specific techniques, forcing it to adopt new strategies.
NeoGauge Metric
NeoGauge quantifies creativity by multiplying a model’s correctness (functional success and constraint adherence) by its novelty. Novelty is determined by comparing the model's chosen techniques against a baseline of approximately 5,900 human solutions from the NeoCoder dataset, which comprises 199 recent Codeforces problems. If a model uses a valid technique that humans rarely used for that specific problem, its novelty score increases.
Results and Insights
The experimental results reveal several key findings regarding the creative capabilities of current LLMs:
- The Creativity Trade-off: A clear inverse relationship exists between novelty and correctness. As models are forced toward higher divergent thinking (using unconventional techniques), their convergent thinking (correctness) drops significantly.
- Model Performance: GPT-4 emerged as the leader, consistently achieving the highest NeoGauge scores. However, as constraints increased from 0 to 5, even GPT-4's constraint-following ratio plummeted, eventually resulting in a NeoGauge score of zero at the highest levels.
- The "Human Gap": LLMs generally default to the most common human solutions. When denied these standard paths, they struggle to maintain correctness compared to human baselines, suggesting their creativity is more fragile than human innovation.
- Reasoning Strategies Stifle Exploration: Advanced techniques like Monte Carlo Tree Search (MCTS) were found to improve correctness by ~10% but often reduced divergent thinking by steering models toward "safe," standard solutions rather than exploring creative fringes.
Discussion and Limitations
The study highlights that intelligence does not necessarily equate to creativity. While larger models are generally more creative, their ability to innovate is fragile under heavy constraints.
Limitations include the focus on Python and competitive programming, which may not generalize to all software engineering domains. Additionally, the human solution space was limited to 30 solutions per problem. Future research should focus on developing reasoning strategies that explicitly reward novelty alongside accuracy to bridge the gap between machine and human creativity.
Summary updated