Benchmarking Language Model Creativity:
A Case Study on Code Generation
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 new environments or constraints) [44].
In this work, we introduce a framework for quantifying LLM creativity that incorporates the two characteristics. This is achieved by (1) Denial Prompting pushes LLMs to come up with more creative solutions to a given problem by incrementally imposing new constraints on the previous solution, compelling LLMs to adopt new strategies, and (2) defining and computing the NeoGauge metric which examines both convergent and divergent thinking in the generated creative responses by LLMs.
We apply the proposed framework on Codeforces problems, a natural data source for collecting human coding solutions. We quantify NeoGauge for various proprietary and open-source models and find that even the most creative model, GPT-4, still falls short of demonstrating 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 NeoCoder dataset for reproducing our results on future models.111Our code and dataset are available at https://github.com/JHU-CLSP/NeoCoder
Creative achievement depended not only on the number of alternatives but also the generation of a single high-quality alternative.
Mark Runco, Critical Creative Process [44]
1 Introduction
LLMs have shown increasing performance across a wide variety of natural language tasks [13, 26, 33, 36, 39, 40, 42, 58]. However, the degree to which LLMs possess and utilize creativity in solving tasks remains unclear. An automatic method for evaluating LLMs creativity could help developers better understand the emergence of model behaviors, serve as a design objective and pave the path to solving complex real-world problems.
However, despite the importance of machine creativity in establishing artificial general intelligence [9], only a few works have touched upon it [5, 10, 11, 16, 23, 52, 63] because of two major challenges: (1) eliciting diverse and creative generations is difficult [8, 56, 60], and (2) there are no reliable and comprehensive quantitative measurements of LLM creativity. Below, we explicitly illustrate how we address these two challenges.
![Refer to caption](x1.png)
LLM generations are often repetitive and regurgitating training data [24, 31, 51, 56, 61], making it hard to elicit creative generations. However, we argue that an effective creativity evaluation should be based on the spectrum of maximal creative responses attained from LLMs. Therefore, we introduce Denial Prompting (§3.1), a prompting method that iteratively “denies” one of the basic tools, techniques, or strategies used in the previous solution (e.g., A: for loops and B: if-else in Fig.1), thereby pushing LLM to think out-of-the-box and elicit creative generations to its fullest extent.
Another challenge in creativity evaluation is to build a reliable and comprehensive quantitative measurement. We propose that such evaluation should be state-aware: adaptive to different contexts, and human-grounded: compares LLM solutions with historical human solutions. According to many cognitive studies, human creativity is viewed as taking place in the interaction with a person, environment, or another model [2, 14, 15, 18, 19, 25]. Similarly, the essence of LLM creativity is also captured from its interaction with the current state (state-aware) and past human knowledge background (human-grounded). This understanding reveals that creativity evaluation should be dynamic, with an individual’s creativity varying under different contexts. For example, in Fig.1, a solution at state probably not be judged at the same creative level as one at state , even if they solve the same problem. Because the latter solution is more likely to use novel techniques that humans hardly thought of, such as C: Recursion, to adapt to increasingly challenging constraints.
To address the second challenge, we propose NeoGauge score (§4) which involves (1) verifying the generated solution is correct and follows the given constraints from Denial Prompting (convergent thinking), and (2) checking whether the solution is novel enough that its techniques have never been previously used in human solutions (divergent thinking). This aligned well with the arguments made by Runco [44] that creative achievement depends on both the number of alternative solutions and the generation of high-quality alternatives. By considering both convergent [34, 46, 47, 48] and divergent [22, 25, 53] creative thinking, NeoGauge not only offers a state-aware evaluation at state T but grounds the evaluation in human knowledge through comparing the generated solutions with historical human solutions.
In our experiments, We apply Denial Prompting on Codeforcecs,222https://codeforces.com/problemset a challenging Text-to-Code task where model solutions can be automatically verified and numerous human solutions exist. Specifically, we retrieve 199 latest problems from Codeforces along with 30 human solutions per problem that have successfully passed unit tests. We then run these problems on Denial Prompting to obtain our dataset NeoCoder which consists of original questions with sequences of temporally relevant and increasingly difficult constriants. Examples of NeoCoder are provided in Table 6. We benchmark a broad range of LLMs on NeoCoder and calculate their NeoGauge scores. Additionally, we evaluate four reasoning strategies (MCTS [59], self-correction [45], planning [29], and sampling [12]) on our dataset to study the correlation between augmented machine intelligence and creativity. In summary, our contributions are twofold:
-
•
We introduce Denial Prompting to elicit creative generations from LLMs and NeoGauge metric to evaluate LLM creativity that follows the two proposed protocols.
-
•
We release a creativity benchmark NeoCoder and provide a thorough analysis of creativity on SOTA language models and reasoning strategies.
2 Background and Related Works
We discuss the existing works on machine creativity evaluation. Then, we explain the concepts of divergent and convergent creativity in cognitive science which our evaluation incorporates.
Machine Creativity Evaluation.
While the extensive studies on human creativity from psychological and cognitive science [3, 20, 22, 35, 44, 50, 53], LLM creativity has received little attention. Existing works in studying LLM creativity [16, 52, 64], however, hardly tackle the above two challenges: (1) incentivizing creative generations, and (2) metrics of evaluation are unreliable and incomprehensive.
Tian et al. [52] release a challenging real-world problem dataset to push LLM to think out-of-the-box, but they do not provide an automatic creativity evaluation method built upon their dataset. Additionally, their problems are constructed from a single constraint. In contrast, our Denial Prompting is formulated for multiple iterations of constraint detection and problem refinement, making the generations more creative and providing more states for creativity evaluation. Zhu et al. [64] and Xu et al. [56] design protocols to dynamically generate challenging problems with controllable constraints. However, they mainly focus on accuracy evaluation rather than creativity.
Chakrabarty et al. [10], DeLorenzo et al. [16], and Zhao et al. [63] introduce automatic evaluation pipelines to quantify the four subcomponents of creativity proposed in the Torrance Tests of Creative Thinking [53]: fluency, flexibility, originality, and elaboration. However, the test is originally designed to study human divergent creative thinking (§2) and is unclear whether it applies to machine creativity. Additionally, their evaluation methods hardly meet the above two proposed protocols.
Divergent Creative Thinking.
Divergent thinking is a cognitive process that involves exploring a multitude of potential applications for a given set of tools [25]. It typically occurs spontaneously and randomly, leading to numerous possible solutions. Extensive research [3, 22] has been conducted to study divergent creativity, including popular psychometric approaches such as the Unusual Uses Test [22] and Torrance Tests of Creative Thinking [53]. These are designed to let examinees think of as many uses for a (common or unusual) object as possible. The underlying idea of stimulating creative solutions from constrained and unusual settings is also adopted in our Denial Prompting.
Divergent thinking can also be viewed through the lens of -creativity (Psychological) and -creativity (Historical) defined by Boden et al. [7]. A valuable idea is -creative if the person in whose mind it arises could not have come up with it before. Furthermore, a valuable idea is -creative if it is -creative and no one else in human history has ever had it before. -creativity measurement is already pivoted to the nature of Denial Prompting that at each state, we ask LLM to come up with a brand new solution that it has never thought of before by imposing a new constraint. Therefore, we mainly consider -creativity measurement in our NeoGauge score, where we compare the model-generated solution with a set of collected human solutions to examine if it has ever been proposed in human history (i.e., the ratio of the region out of human solution space in Fig.1).333In our experiment, we collect 30 human-annotated solutions for each problem to approximate the historical human solution space, which we consider sufficient given the high overlapping rate among human solutions. This makes our NeoGauge human-grounded and reflects the novelty from history.
Convergent Creative Thinking.
Since the twenty-first century, more researchers have begun to accept the proposition that creative thought involves not merely the generation of many alternative solutions (divergent thinking) but also the identification of new feasible solutions [6, 44]. They frame this problem-solving process as convergent creative thinking and begin to examine how understanding human cognition and convergent thinking might be used to account for creative thought [20, 35, 50]. Several famous cognitive approaches that study the mental representation and process underlying convergent creative thinking [34] involve asking examinees to predict future states from past states using incomplete information [46, 47], or solving the problems as though the counterfactual premises are true [48, 49]. All these tests share certain characteristics, such as always having a single best answer and asking examinees to think in unconventional ways. In our work, besides computing -creativity for evaluating divergent thinking, we also measure convergent creativity by verifying the feasibility of the generated solution: whether they are correct and following the given constraints. Our NeoGauge metric delivers a more comprehensive evaluation of machine creativity.
3 Constructing the NeoCoder Dataset
We present Denial Prompting to stimulate creative responses from LLMs.
3.1 Denial Prompting: Eliciting Creative Generations from LLMs
![Refer to caption](x2.png)
Input: Input problem , augmentation model , max iterations
Output: Constraint list
Our purpose is to construct a pipeline that iteratively imposes constraints on previous solutions (e.g., disallowing the use of hashmaps) to force more creative solutions. The setup is as follows: we use a highly capable augmentation model (e.g. GPT-4) to generate solutions and scrutinize “technique(s)” used in the generated solution, then update problem by imposing the detected technique as a constraint. We repeat this process times to obtain consecutive problems with increasingly hard constraints. Fig.2 shows an example with . As shown in Algorithm 1, given a reasoning problem and an initial empty constraint list , we first let the augmentation model to generate an initial solution via a default problem-solving prompt and conversation history. We then use the same augmentation model to detect atomic techniques (e.g., recursion, for loop, hashmaps, etc.), , used in to solve with a technique detection prompt. Then, one technique is randomly sampled to ensure it has never been used before as a constraint. Finally, we update the problem to by imposing it not to use the detected technique and update constraint list to . This is the first iteration of Denial Prompting. We repeat the process to progressively obtain the overall constraint list . The prompts for Denial Prompting (including technique detection; used across all experiments) are in Appendix C.
During Denial Prompting, we use a single conversation thread of to infer . Namely, we put (line 2 in Algorithm 1) over in one single thread, such that the model can utilize the trace of previous interactions (including problem statements, constraints, and LLM solutions from each iteration). In practice, we observed incorporating prior interactions in the context improved model generations. Conversely, when detecting solution techniques (line 4 in Algorithm 1) we disregard the context from previous conversation rounds to focus the responses solely on the most recent round.
3.2 NeoCoder Dataset to Support Benchmarking LLM Creativity
Challenge problems.
To construct our creativity benchmark, we compile latest Codeforces problems. We chose problems with a difficulty of 800 (easiest level) since in our preliminary experiments we observed near-random performance on more challenging problems when using well-known open-source models. Furthermore, we selected the recent data to prevent any memorization during pre-training [27].
Human solutions.
For each problem, we extract correct human solutions per problem (total of K human solutions). We use human solutions to measure -creativity of LLM responses.
Human annotated test examples.
We also retrieve all test examples provided with each problem (4.5 test examples per problem on average, total of 2.2K test examples). We then perform manual fixes to address any parsing or formatting issues in the collected test examples and ensure that they follow a standardized input-output format. We use these test examples to measure -creativity or the functional correctness of LLM responses.
State (# of constraints) | 0 | 1 | 2 | 3 | 4 | 5 |
# of problems | 199 | 199 | 198 | 194 | 176 | 97 |
![[Uncaptioned image]](x3.png)
Augmentation with Denial Prompting.
We use GPT-4 [37] as the augmentation model .444We use gpt-4-1106-preview across all experiments, accessed on Dec 2023 through April 2024. We feed retrieved problems to Denial Prompting with maximum to get our dataset NeoCoder. Our dataset consists of pairs , where represents a problem (programming challenge), and represents the constraints that must be adhered to when solving the problem. This implies that a single programming problem may be associated with various sets of constraints, forming different pairs accordingly.
Statistics for NeoCoder.
Table 2 shows the number of problems and the number of the associated constraints . Note that the number of problems decreases for larger number of constraints. This occurs because Denial Prompting may reach a point where it fails to generate any new constraints after a certain number of iterations (i.e., in Algorithm 1). In such a case, we let and jump to the next iteration without updating the constraint list .
We also compare the distribution of the top 5 most common techniques that are discovered from Denial Prompting with the human distribution (Fig.2). It is evident that, without any constraints, models tend to use easy and common techniques (e.g., for-loops) as humans do. However, as more constraints are imposed, the less common but more sophisticated techniques are being employed.
4 State-Aware and Human-Grounded Evaluation of Machine Creativity
Given NeoCoder dataset, we introduce our metric of creativity NeoGauge for a given model . Our NeoCoder at state () is: , where is the problem index. To evaluate the creativity of the testing model 555We use distinct notations for the testing language model, , and the augmentation language model, , to highlight their different roles. at state , we feed to to obtain its predictions:
(1) |
where denotes the cardinality of constraints set. It ensures that at any given state , the questions we evaluated always have distinct constraints. Below, we present how we compute convergent and divergent creativity and introduce NeoGauge metric that unifies them.
![Refer to caption](x4.png)
Convergent creativity involves problem-solving and constraint following.
To evaluate ’s convergent thinking ability, we examine two characteristics of generated solutions: whether they are correct and follow the given constraints. Therefore, given from Eq.1, we define its convergent creativity as follows:
(2) |
is a measure of program correctness, set to 1 if the generated solution passes all test examples, otherwise it is 0. We use the augmentation model to detect all atomic techniques used in solution , and compare them with the given constraint list to check if the solution follows the given constraints. In Fig.3 examples, only the solution generated at (which does not involve any constraint) exhibits convergent creativity.
Divergent creativity requires comparison to historical human solutions.
As discussed earlier in §2, the primary focus of our evaluation is on -creativity, which requires a juxtaposition of model solutions with historical human solutions. Let’s consider a finite set of correct human written solutions with size , denoted as , for problem . Rather than directly comparing solutions using certain sentence-level similarity scores, as done by few prior works such as DeLorenzo et al. [16], we break down the comparison to the atomic technique level, which is more interpretable and generalizable across varying solutions. Our divergent creativity score is defined as:
(3) |
Here we first find all atomic techniques used by human solutions and atomic techniques used in the model solution at state . We then compute the -creativity as the ratio of techniques used by that have never been used in the human solution set. For example, as shown in Fig.3 at state , among the three techniques identified within the generated solution, only the recursion has never been used by humans, thereby resulting in a ratio of . Finally, we average ratios across different problems to obtain the final -creativity at state .
NeoGauge unifies convergent and divergent creativity.
Given the above definitions, NeoGauge of at state t can be formalized as:
(4) |
Metric | Description | Definition | Place of Use |
Convergent creativity of at state | Eq.2 | Tbl.4, Fig.6, 8 | |
Divergent creativity of at state | Eq.3 | Tbl.4, Fig.6, 8 | |
NeoGauge@t | Creativity evaluation of at state | Eq.4 | Tbl.4, Fig.4 |
\hdashlinepass@1 [12] | Probability of the first sample passes the unit tests | Tbl.4 | |
constraint following | Average ratio of following the constraints at state | Tbl.4 | |
convergent(human, t) | convergent creativity of human at state | Eq.5 | Fig.6 |
divergent(human) | divergent creativity of human at state | Eq.6 | Fig.6 |
5 Experiments and Results
5.1 Experimental Setup
Models.
We use GPT-4 as the augmentation model . We benchmark the creativity performance of the following testing models : GPT-4 [37], GPT-3.5 [38], Claude 3 Sonnet (Claude-3) [4], Llama3-70B [1], Llama2-70B [54], CodeLlama-34B-Python (CodeLlama-34B) [43], CodeGemma-7B [21], and Mistral-7B [28]. We access all non-proprietary models through Huggingface Transformers [55].
Metrics.
Beyond the three proposed metrics for evaluating convergent, divergent and overall creativity, we also compute pass@1 [12] and constraint following ratio for further comparison in Table 4. NeoGauge@T actually is a joint probability of being both convergent and divergent creative at state . Therefore, we also report the cumulative NeoGauge across states in Fig.4, which indicates the model’s maximum creativity performance boundary. Additionally, we compute human convergent and divergent creativity in Fig.6 to compare LLM with human creativity performance (details in Appendix A). We summarize all used metrics in Table 3.
5.2 Benchmarking Language Model Creativity
A number of psychological investigators have studied the link between creativity and intelligence [25], agreeing on two key points: (1) creative individuals tend to have higher intelligence [41], and (2) people with extremely high intelligence not necessarily to be extremely creative [17]. We re-examine the two findings on LLMs and answer: Are larger LLMs more creative? Do extremely large models of equal size exhibit comparable creativity? Our investigation is based on the widely accepted hypothesis that language model size correlates positively with intelligence [30, 32, 62].
![Refer to caption](x5.png)
GPT-4 is the most creative LLM thus far.
We visualize NeoGauge and cumulative NeoGauge in Fig.4. GPT-4 consistently has the highest NeoGauge almost at every state . While others (e.g., Claude-3 and Llama3-70B) have a close NeoGauge@0 score to GPT-4, their NeoGauge quickly decreases to 0 within the next 2 states. According to cumulative NeoGauge, GPT-4 also has the highest creativity performance boundary, followed by Claude-3 and Llama3-70B, greatly outperforming smaller models such as GPT-3.5 and Llama2-70B. These observations could potentially answer the above two questions: larger LLMs are generally more creaitive, but extremely large LLM is not necessarily exhibiting extremely creative performance. In Fig.5, we provide example outputs from each model to show their different creativity abilities.
![Refer to caption](x6.png)
![Refer to caption](x7.png)
LLM creativity is still far behind humans.
Fig.6 displays the comparison between LLM and human creativity evaluation. LLM shows slightly better performance in divergent creativity compared to humans. However, human divergent creativity, as computed from Eq.6, is a constant and only reflects the initial divergent creativity at state . The performance gap between them in higher states remains undetermined. Additionally, Both human and LLM convergent creativity declines drastically over the increase in state , which follows our expectation that there is a trade-off between solution quality and novelty. When stress-testing humans or LLMs to look for more creative solutions, they are very likely to make mistakes and may copy previous solutions during the process. However, LLM convergent creative performance is much worse than humans. Future works should focus on how to narrow the gap (//// area) between human and LLM convergent creativity.
State | pass@1 | Constraint Following | Convergent Creative | Divergent Creative | NeoGauge |
---|---|---|---|---|---|
0 | 16.1 | 100.0 | 16.2 | 4.5 | 1.0 |
1 | 11.6 | 75.4 | 8.1 | 11.9 | 1.4 |
2 | 7.1 | 46.0 | 3.6 | 11.5 | 0.9 |
3 | 5.2 | 33.0 | 1.6 | 12.4 | 0.5 |
4 | 2.3 | 26.1 | 0.0 | 13.2 | 0.0 |
5 | 2.1 | 14.4 | 0.0 | 15.3 | 0.0 |
In-depth analysis of creativity evaluation.
We provide evaluation results for GPT-4 in Table 4. It is evident that as the state increases (more hard constraints are imposed), the quality of solutions declines both in terms of correctness and constraint following. Even if the model may still generate new alternative solutions at state 5 (divergent(GPT-4, ) ), they fail at convergent evaluation (convergent(GPT-4, ) ). Therefore, at state 5, GPT-4 shows 0 creativity (NeoGauge@5 ). Additionally, unlike the convergent score, which typically decreases as increases, the divergent score of GPT-4 continually rises. This observation empirically proves the key assumption of Denial Prompting that LLMs tend to seek more creative solutions when facing an unconventional environment characterized by unusual hard constraints.
5.3 Evaluating Reasoning Strategies for Creativity
We evaluate four reasoning strategies on our NeoCoder dataset to further study the correlation between augmented machine intelligence and creativity: Whether such intelligence-enhancing techniques also improve creative thinking? We implement the following four works that are specifically designed for programming tasks with different reasoning strategies:
-
•
MCTS: Zhang et al. [59] propose a novel decoding method that uses Monte-Carlo tree search (MCTS) to generate better programs using the pass rate as reward.
-
•
Self-Correction: Shinn et al. [45] use verbal feedback from a reflection agent to reinforce the performance of an actor agent in code generation.
-
•
Planning: Jiang et al. [29] design a planning module to let LLM plan out concise solution steps from the intent, followed by an implementation module to generate code step by step.
-
•
Sampling: Chen et al. [12] generate samples and compute the probability that at least one of the -generated code samples for a problem passes the unit tests. For creativity evaluation, we generate samples for each problem and report the NeoGauge from samples that have the highest convergent and divergent creativity, in Eq.4, among samples.
Note that these methods are originally applicable to different kinds of models. Considering the computation complexity and the cost, we re-evaluate MCTS on the open-source language model (CodeGemma-7B [21]) and re-evaluate others on the proprietary model (GPT-3.5 [38]).
![Refer to caption](x8.png)
![Refer to caption](x9.png)
![Refer to caption](x10.png)
![Refer to caption](x11.png)
Most reasoning strategies fail to improve divergent thinking.
According to Fig.7, all reasoning strategies except sampling help to improve the model’s convergent creativity thinking ability on multiple states, as they are fundamentally designed to improve the accuracy. Conversely, only MCTS successfully enhances divergent creativity, due to it rolling out numerous paths during the expansion. Strategies like self-correction, planning, and sampling, which operate on a single trial or path, fail to explore divergent solutions.
There is a tradeoff between divergent and convergent creativity.
Noticeably, while MCTS consistently enhances divergent creative thinking in all 5 states, its improvement on NeoGauge is minimal and becomes 0 after . This suggests that divergent solutions generated by MCTS may not truly augment creativity, potentially due to incorrectness or failure to follow the given constraints. This also implies that MCTS might prioritize divergent thinking over convergent thinking. On the other hand, self-correction and planning sacrifice their divergent thinking ability in improving their convergent thinking because the divergent creativity difference even goes to negative at certain states (e.g., Divergent Diff at on sampling). None of the four reasoning strategies have been able to simultaneously improve both convergent and divergent creativity, resulting in limited improvement of NeoGauge. Thus, our findings indicate that these intelligence-augmenting methods do not provide much benefit to LLM creativity. We leave for future works to discover specialized strategies for better enhancing LLM’s creative performance and NeoGauge.
6 Conclusion
We propose two key protocols for evaluating language model creativity and introduce the Denial Prompting framework and NeoGauge metric to provide a one-stop creativity evaluation that follows the protocols. Our NeoGauge stands out for its comprehensive evaluation of both convergent and divergent creativity, aligning with concepts from human creativity studies. To facilitate future research, we release our NeoCoder dataset and shed light on the limitations of current reasoning strategies in improving LLM creativity.
Limitations
Application scope.
While NeoGauge offers a general-purpose framework for evaluation of LLM creativity, our study is restricted to Text-to-Code, as it requires a historical human solution set. For most tasks in the literature, collecting a comprehensive set of distinct human responses is nontrivial.
Data leakage concern.
Our proposed dataset NeoCoder is built using latest Codeforces problems. Despite their recency, future LLMs might get exposure to these problems during their pre-training. To alleviate such risks, future works can focus on more difficult problems or evaluate NeoGauge for higher states, besides incorporating a newer batch of problems.
Acknowledgements
This work is in part supported by ONR grant N00014-241-2089, and generous gifts from Amazon and the Allen Institute for AI. We also greatly appreciate the help of the students at CLSP.
References
- AI@Meta [2024] AI@Meta. Llama 3 model card, 2024. URL https://github.com/meta-llama/llama3/blob/main/MODEL_CARD.md.
- Amabile [1996] T. Amabile. Creativity In Context: Update To The Social Psychology Of Creativity. Avalon Publishing, 1996. ISBN 9780813345499. URL https://books.google.com/books?id=hioVn_nl_OsC.
- Amabile [1982] T. M. Amabile. Social psychology of creativity: A consensual assessment technique. Journal of personality and social psychology, 43(5):997, 1982. URL https://psycnet.apa.org/doiLanding?doi=10.1037%2F0022-3514.43.5.997.
- Anthropic [2024] Anthropic. The claude 3 model family: Opus, sonnet, haiku, 2024. URL https://www-cdn.anthropic.com/de8ba9b01c9ab7cbabf5c33b80b7bbc618857627/Model_Card_Claude_3.pdf.
- Astolfi et al. [2024] P. Astolfi, M. Careil, M. Hall, O. Mañas, M. Muckley, J. Verbeek, A. R. Soriano, and M. Drozdzal. Consistency-diversity-realism pareto fronts of conditional image generative models, 2024. URL https://arxiv.org/abs/2406.10429.
- Baer [1994] J. Baer. Divergent thinking is not a general trait: A multidomain training experiment. Creativity Research Journal, 7(1):35–46, 1994. doi: 10.1080/10400419409534507. URL https://doi.org/10.1080/10400419409534507.
- Boden et al. [1994] M. A. Boden et al. Dimensions of creativity, 1994. URL https://direct.mit.edu/books/edited-volume/1841/chapter-abstract/4417508/Front-Matter.
- Bronnec et al. [2024] F. L. Bronnec, A. Verine, B. Negrevergne, Y. Chevaleyre, and A. Allauzen. Exploring precision and recall to assess the quality and diversity of llms, 2024. URL https://arxiv.org/abs/2402.10693.
- Bubeck et al. [2023] S. Bubeck, V. Chandrasekaran, R. Eldan, J. Gehrke, E. Horvitz, E. Kamar, P. Lee, Y. T. Lee, Y. Li, S. Lundberg, H. Nori, H. Palangi, M. T. Ribeiro, and Y. Zhang. Sparks of artificial general intelligence: Early experiments with gpt-4, 2023. URL https://arxiv.org/abs/2303.12712.
- Chakrabarty et al. [2024a] T. Chakrabarty, P. Laban, D. Agarwal, S. Muresan, and C.-S. Wu. Art or artifice? large language models and the false promise of creativity. In Proceedings of the CHI Conference on Human Factors in Computing Systems, CHI ’24, New York, NY, USA, 2024a. Association for Computing Machinery. ISBN 9798400703300. doi: 10.1145/3613904.3642731. URL https://doi.org/10.1145/3613904.3642731.
- Chakrabarty et al. [2024b] T. Chakrabarty, V. Padmakumar, F. Brahman, and S. Muresan. Creativity support in the age of large language models: An empirical study involving emerging writers, 2024b. URL https://arxiv.org/abs/2309.12570.
- Chen et al. [2021] M. Chen, J. Tworek, H. Jun, Q. Yuan, H. P. de Oliveira Pinto, J. Kaplan, H. Edwards, Y. Burda, N. Joseph, G. Brockman, A. Ray, R. Puri, G. Krueger, and M. P. et al. Evaluating large language models trained on code, 2021. URL https://arxiv.org/abs/2107.03374.
- Cobbe et al. [2021] K. Cobbe, V. Kosaraju, M. Bavarian, M. Chen, H. Jun, L. Kaiser, M. Plappert, J. Tworek, J. Hilton, R. Nakano, C. Hesse, and J. Schulman. Training verifiers to solve math word problems. arXiv preprint arXiv:2110.14168, 2021. URL https://arxiv.org/pdf/2110.14168.
- Csikszentmihalyi [1996] M. Csikszentmihalyi. Creativity: Flow and the Psychology of Discovery and Invention. Harper Perennial Modern Classics. HarperCollinsPublishers, 1996. ISBN 9780060171339. URL https://books.google.com/books?id=K0buAAAAMAAJ.
- Csikszentmihalyi [1998] M. Csikszentmihalyi. Implications of a Systems Perspective for the Study of Creativity, page 313–336. Cambridge University Press, 1998. URL https://psycnet.apa.org/record/1998-08125-016.
- DeLorenzo et al. [2024] M. DeLorenzo, V. Gohil, and J. Rajendran. Creativeval: Evaluating creativity of llm-based hardware code generation, 2024. URL https://arxiv.org/abs/2404.08806.
- Faris et al. [1962] R. E. L. Faris, J. W. Getzels, and P. W. Jackson. Creativity and intelligence: Explorations with gifted students. American Sociological Review, 27:558, 1962. URL https://api.semanticscholar.org/CorpusID:147301791.
- Feldman [1998] D. H. Feldman. The Development of Creativity, page 169–186. Cambridge University Press, 1998. URL https://psycnet.apa.org/record/1998-08125-009.
- Feldman et al. [1994] D. H. Feldman, M. Csikszentmihalyi, and H. Gardner. Changing the world: A framework for the study of creativity. Praeger Publishers/Greenwood Publishing Group, 1994. URL https://www.jstor.org/stable/43853671.
- Finke et al. [1996] R. A. Finke, T. B. Ward, and S. M. Smith. Creative Cognition: Theory, Research, and Applications. The MIT Press, 01 1996. ISBN 9780262272650. doi: 10.7551/mitpress/7722.001.0001. URL https://doi.org/10.7551/mitpress/7722.001.0001.
- Google [2024] Google. Codegemma: Open code models based on gemma, 2024. URL https://storage.googleapis.com/deepmind-media/gemma/codegemma_report.pdf.
- Guilford [1950] J. P. Guilford. Creativity. American Psychologist, 5(9):444–454, 1950. doi: https://doi.org/10.1037/h0063487. URL https://psycnet.apa.org/doiLanding?doi=10.1037%2Fh0063487.
- Gómez-Rodríguez and Williams [2023] C. Gómez-Rodríguez and P. Williams. A confederacy of models: a comprehensive evaluation of llms on creative writing, 2023. URL https://arxiv.org/abs/2310.08433.
- Holtzman et al. [2019] A. Holtzman, J. Buys, L. Du, M. Forbes, and Y. Choi. The curious case of neural text degeneration. In International Conference on Learning Representations (ICLR), 2019. URL https://openreview.net/forum?id=rygGQyrFvH.
- Holyoak and Morrison [2005] K. Holyoak and R. Morrison. The Cambridge Handbook of Thinking and Reasoning. Cambridge Handbooks in Psychology. Cambridge University Press, 2005. ISBN 9780521824170. URL https://books.google.com/books?id=znbkHaC8QeMC.
- Huang et al. [2019] L. Huang, R. Le Bras, C. Bhagavatula, and Y. Choi. Cosmos qa: Machine reading comprehension with contextual commonsense reasoning. In Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 2391–2401, 2019. URL https://arxiv.org/abs/1909.00277.
- Huang et al. [2023] Y. Huang, Z. Lin, X. Liu, Y. Gong, S. Lu, F. Lei, Y. Liang, Y. Shen, C. Lin, N. Duan, et al. Competition-level problems are effective llm evaluators. arXiv preprint arXiv:2312.02143, 2023.
- Jiang et al. [2023a] A. Q. Jiang, A. Sablayrolles, A. Mensch, C. Bamford, D. S. Chaplot, D. de Las Casas, F. Bressand, G. Lengyel, G. Lample, L. Saulnier, L. R. Lavaud, M.-A. Lachaux, P. Stock, T. L. Scao, T. Lavril, T. Wang, T. Lacroix, and W. E. Sayed. Mistral 7b, 2023a. URL https://arxiv.org/abs/2310.06825.
- Jiang et al. [2023b] X. Jiang, Y. Dong, L. Wang, Z. Fang, Q. Shang, G. Li, Z. Jin, and W. Jiao. Self-planning code generation with large language models, 2023b. URL https://arxiv.org/pdf/2303.06689.
- Kaplan et al. [2020] J. Kaplan, S. McCandlish, T. Henighan, T. B. Brown, B. Chess, R. Child, S. Gray, A. Radford, J. Wu, and D. Amodei. Scaling laws for neural language models. ArXiv, abs/2001.08361, 2020. URL https://api.semanticscholar.org/CorpusID:210861095.
- Kirk et al. [2024] R. Kirk, I. Mediratta, C. Nalmpantis, J. Luketina, E. Hambro, E. Grefenstette, and R. Raileanu. Understanding the effects of RLHF on LLM generalisation and diversity. In The Twelfth International Conference on Learning Representations, 2024. URL https://openreview.net/forum?id=PXD3FAVHJT.
- Liu et al. [2023] P. Liu, W. Yuan, J. Fu, Z. Jiang, H. Hayashi, and G. Neubig. Pre-train, prompt, and predict: A systematic survey of prompting methods in natural language processing. ACM Comput. Surv., 55(9), jan 2023. ISSN 0360-0300. doi: 10.1145/3560815. URL https://doi.org/10.1145/3560815.
- Lu et al. [2023] Y. Lu, H. Yu, and D. Khashabi. GEAR: augmenting language models with generalizable and efficient tool resolution. arXiv preprint arXiv:2307.08775, 2023. URL https://arxiv.org/abs/2307.08775.
- Lubart [2001] T. I. Lubart. Models of the creative process: Past, present and future. Creativity Research Journal, 13(3-4):295–308, 2001. doi: 10.1207/S15326934CRJ1334\_07. URL https://www.tandfonline.com/doi/abs/10.1207/S15326934CRJ1334_07.
- Mumford et al. [1991] M. D. Mumford, M. I. Mobley, R. Reiter-Palmon, C. E. Uhlman, and L. M. Doares. Process analytic models of creative capacities. Creativity Research Journal, 4(2):91–122, 1991. doi: 10.1080/10400419109534380. URL https://doi.org/10.1080/10400419109534380.
- Onoe et al. [2021] Y. Onoe, M. J. Zhang, E. Choi, and G. Durrett. Creak: A dataset for commonsense reasoning over entity knowledge. arXiv preprint arXiv:2109.01653, 2021. URL https://arxiv.org/abs/2109.01653.
- OpenAI [2024] OpenAI. Gpt-4 technical report, 2024. URL https://arxiv.org/abs/2303.08774.
- Ouyang et al. [2022] L. Ouyang, J. Wu, X. Jiang, D. Almeida, C. L. Wainwright, P. Mishkin, C. Zhang, S. Agarwal, K. Slama, A. Ray, et al. Training Language Models to Follow Instructions with Human Feedback. In Advances in Neural Information Processing Systems (NeurIPS), 2022. URL https://arxiv.org/abs/2203.02155.
- Patel et al. [2021] A. Patel, S. Bhattamishra, and N. Goyal. Are NLP models really able to solve simple math word problems? In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 2080–2094, Online, June 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.naacl-main.168. URL https://aclanthology.org/2021.naacl-main.168.
- Rajpurkar et al. [2016] P. Rajpurkar, J. Zhang, K. Lopyrev, and P. Liang. SQuAD: 100,000+ questions for machine comprehension of text. In Conference on Empirical Methods in Natural Language Processing (EMNLP), 2016. URL https://aclanthology.org/D16-1264/.
- Renzulli [2005] J. S. Renzulli. The Three-Ring Conception of Giftedness: A Developmental Model for Promoting Creative Productivity, page 246–279. Cambridge University Press, 2005. URL https://psycnet.apa.org/record/2005-11244-014.
- Roemmele et al. [2011] M. Roemmele, C. A. Bejan, and A. S. Gordon. Choice of plausible alternatives: An evaluation of commonsense causal reasoning. In AAAI spring symposium: logical formalizations of commonsense reasoning, 2011. URL http://commonsensereasoning.org/2011/papers/Roemmele.pdf.
- Rozière et al. [2024] B. Rozière, J. Gehring, F. Gloeckle, S. Sootla, I. Gat, X. E. Tan, Y. Adi, J. Liu, R. Sauvestre, T. Remez, J. Rapin, A. Kozhevnikov, I. Evtimov, J. Bitton, M. Bhatt, C. C. Ferrer, A. Grattafiori, W. Xiong, A. Défossez, J. Copet, F. Azhar, H. Touvron, L. Martin, N. Usunier, T. Scialom, and G. Synnaeve. Code llama: Open foundation models for code, 2024. URL https://arxiv.org/abs/2308.12950.
- Runco [2003] M. A. Runco. Critical creative processes. Perspectives on creativity. Hampton Press, Cresskill, N.J, 2003. ISBN 1572731346. URL https://api.semanticscholar.org/CorpusID:143085609.
- Shinn et al. [2023] N. Shinn, F. Cassano, E. Berman, A. Gopinath, K. Narasimhan, and S. Yao. Reflexion: Language agents with verbal reinforcement learning, 2023. URL https://arxiv.org/abs/2303.11366.
- Sternberg [1981] R. J. Sternberg. Intelligence and nonentrenchment. In Journal of Educational Psychology, 1981. URL https://api.semanticscholar.org/CorpusID:144193389.
- Sternberg [1982] R. J. Sternberg. Natural, unnatural, and supernatural concepts. Cognitive Psychology, 14(4):451–488, 1982. ISSN 0010-0285. doi: https://doi.org/10.1016/0010-0285(82)90016-0. URL https://www.sciencedirect.com/science/article/pii/0010028582900160.
- Sternberg and Gastel [1989a] R. J. Sternberg and J. Gastel. Coping with novelty in human intelligence: An empirical investigation. Intelligence, 13(2):187–197, 1989a. ISSN 0160-2896. doi: https://doi.org/10.1016/0160-2896(89)90016-0. URL https://www.sciencedirect.com/science/article/pii/0160289689900160.
- Sternberg and Gastel [1989b] R. J. Sternberg and J. Gastel. If dancers ate their shoes: Inductive reasoning with factual and counterfactual premises. Memory & Cognition, 17:1–10, 1989b. URL https://link.springer.com/article/10.3758/BF03199551.
- Sternberg and Lubart [1991] R. J. Sternberg and T. I. Lubart. An investment theory of creativity and its development. Human Development, 34(1):1–31, 1991. ISSN 0018716X, 14230054. URL http://www.jstor.org/stable/26767348.
- Tevet and Berant [2021] G. Tevet and J. Berant. Evaluating the evaluation of diversity in natural language generation. In P. Merlo, J. Tiedemann, and R. Tsarfaty, editors, Proceedings of the 16th Conference of the European Chapter of the Association for Computational Linguistics: Main Volume, pages 326–346, Online, Apr. 2021. Association for Computational Linguistics. doi: 10.18653/v1/2021.eacl-main.25. URL https://aclanthology.org/2021.eacl-main.25.
- Tian et al. [2024] Y. Tian, A. Ravichander, L. Qin, R. L. Bras, R. Marjieh, N. Peng, Y. Choi, T. L. Griffiths, and F. Brahman. Macgyver: Are large language models creative problem solvers?, 2024. URL https://arxiv.org/abs/2311.09682.
- Torrance [1966] E. P. Torrance. Torrance tests of creative thinking. Educational and Psychological Measurement, 1966. URL https://psycnet.apa.org/doiLanding?doi=10.1037%2Ft05532-000.
- Touvron et al. [2023] H. Touvron, T. Lavril, G. Izacard, X. Martinet, M.-A. Lachaux, T. Lacroix, B. Rozière, N. Goyal, E. Hambro, F. Azhar, et al. LLaMA: Open and efficient foundation language models. arXiv preprint arXiv:2302.13971, 2023. URL https://arxiv.org/abs/2302.13971.
- Wolf et al. [2019] T. Wolf, L. Debut, V. Sanh, J. Chaumond, C. Delangue, A. Moi, P. Cistac, T. Rault, R. Louf, M. Funtowicz, and J. Brew. Huggingface’s transformers: State-of-the-art natural language processing, 2019. URL https://arxiv.org/abs/1910.03771.
- Xu et al. [2024a] C. Xu, Q. Sun, K. Zheng, X. Geng, P. Zhao, J. Feng, C. Tao, Q. Lin, and D. Jiang. WizardLM: Empowering large pre-trained language models to follow complex instructions. In The Twelfth International Conference on Learning Representations, 2024a. URL https://openreview.net/forum?id=CfXh93NDgH.
- Xu et al. [2024b] Z. Xu, S. Jain, and M. Kankanhalli. Hallucination is inevitable: An innate limitation of large language models, 2024b. URL https://arxiv.org/abs/2401.11817.
- Ye et al. [2024] X. Ye, A. Wang, J. Choi, Y. Lu, S. Sharma, L. Shen, V. Tiyyala, N. Andrews, and D. Khashabi. Analobench: Benchmarking the identification of abstract and long-context analogies, 2024. URL https://arxiv.org/abs/2402.12370.
- Zhang et al. [2023] S. Zhang, Z. Chen, Y. Shen, M. Ding, J. B. Tenenbaum, and C. Gan. Planning with large language models for code generation. In International Conference on Learning Representations (ICLR), 2023. URL https://arxiv.org/abs/2303.05510.
- Zhang et al. [2024a] T. Zhang, B. Peng, and D. Bollegala. Improving diversity of commonsense generation by large language models via in-context learning, 2024a. URL https://arxiv.org/abs/2404.16807.
- Zhang et al. [2024b] Y. Zhang, A. Schwarzschild, N. Carlini, Z. Kolter, and D. Ippolito. Forcing diffuse distributions out of language models, 2024b. URL https://arxiv.org/abs/2404.10859.
- Zhao et al. [2023] W. X. Zhao, K. Zhou, J. Li, T. Tang, X. Wang, Y. Hou, Y. Min, B. Zhang, J. Zhang, Z. Dong, Y. Du, C. Yang, Y. Chen, Z. Chen, J. Jiang, R. Ren, Y. Li, X. Tang, Z. Liu, P. Liu, J.-Y. Nie, and J.-R. Wen. A survey of large language models, 2023. URL https://arxiv.org/abs/2303.18223.
- Zhao et al. [2024] Y. Zhao, R. Zhang, W. Li, D. Huang, J. Guo, S. Peng, Y. Hao, Y. Wen, X. Hu, Z. Du, Q. Guo, L. Li, and Y. Chen. Assessing and understanding creativity in large language models, 2024. URL https://arxiv.org/abs/2401.12491.
- Zhu et al. [2024] K. Zhu, J. Chen, J. Wang, N. Z. Gong, D. Yang, and X. Xie. Dyval: Dynamic evaluation of large language models for reasoning tasks. In International Conference on Learning Representations (ICLR), 2024. URL https://arxiv.org/abs/2309.17167.
Supplemental Material
Appendix | Contents |
---|---|
Appendix A | Additional Details of Experimental Setup |
Appendix B | Additional Details of Experimental Results |
Appendix C | Prompts for Denial Prompting and Benchmarking |
Appendix A Experiment Setup
A.1 Human Creativity Evaluation
We compute human convergent creativity as follows:
(5) |
Because the collected historical human solutions are always correct, for human convergent creativity evaluation, we focus on constraint following ratio by examining whether the atomic techniques used by each human solution follow the given constraints at state . We use the same idea as Eq.3 to compute human divergent creativity.
(6) |
Given total problems, where each problem has human solutions, we compute the average ratio of new techniques used by a single human solution ( human solution for problem) that the remaining human solutions have never used. The only difference to Eq.3 is that because it is not practical to ask human coding experts to perform Denial Prompting on hundreds of programming problems, human divergent creativity in Eq.6 is thus state insensitive and is equivalent to divergent(human, ).
Appendix B Experiment Results
![Refer to caption](x12.png)
Strategy | State | Convergent | Divergent | NeoGauge |
---|---|---|---|---|
MCTS | 0 | 10.60(1.52→12.12) | 7.79(5.18→12.97) | 0.82(0.00→0.82) |
1 | 3.03(0.00→3.03) | 8.62(6.31→14.93) | 0.08(0.00→0.08) | |
2 | 1.02(0.00→1.02) | 8.61(5.55→14.16) | 0.10(0.00→0.10) | |
3 | 0.52(0.00→0.52) | 9.11(5.35→14.46) | 0.00(0.00→0.00) | |
4 | 0.00(0.00→0.00) | 8.93(4.82→13.75) | 0.00(0.00→0.00) | |
5 | 0.00(0.00→0.00) | 9.69(4.23→13.92) | 0.00(0.00→0.00) | |
Self-Correction | 0 | 12.12(2.53→14.65) | -0.37(5.41→5.04) | 0.29(0.25→0.54) |
1 | 2.53(0.51→3.03) | 0.26(4.56→4.82) | 0.29(0.00→0.29) | |
2 | 1.02(0.00→1.02) | 0.24(3.79→4.03) | 0.00(0.00→0.00) | |
3 | 0.00(0.00→0.00) | -1.62(6.04→4.42) | 0.00(0.00→0.00) | |
4 | 0.00(0.00→0.00) | 1.77(3.70→5.47) | 0.00(0.00→0.00) | |
5 | 0.00(0.00→0.00) | 0.05(4.93→4.98) | 0.00(0.00→0.00) | |
Planning | 0 | 7.07(2.53→9.60) | -1.16(5.41→4.25) | 0.25(0.25→0.50) |
1 | 2.53(0.50→3.03) | 1.28(4.56→5.84) | 0.25(0.00→0.25) | |
2 | 1.02(0.00→1.02) | 2.07(3.78→5.85) | 0.00(0.00→0.00) | |
3 | 0.52(0.00→0.52) | -1.24(6.04→4.80) | 0.00(0.00→0.00) | |
4 | 0.57(0.00→0.57) | 2.67(3.70→6.37) | 0.00(0.00→0.00) | |
5 | 0.00(0.00→0.00) | 1.94(4.93→6.87) | 0.00(0.00→0.00) | |
Sampling | 0 | -0.50(2.52→2.02) | -0.38(5.41→5.03) | 0.00(0.25→0.25) |
1 | -0.51(0.51→0.00) | -0.10(4.56→4.46) | 0.00(0.00→0.00) | |
2 | 0.00(0.00→0.00) | 1.05(3.78→4.83) | 0.00(0.00→0.00) | |
3 | 0.52(0.00→0.52) | -1.69(6.04→4.35) | 0.00(0.00→0.00) | |
4 | 0.00(0.00→0.00) | 0.76(3.70→4.46) | 0.00(0.00→0.00) | |
5 | 0.00(0.00→0.00) | -1.86(4.93→3.07) | 0.00(0.00→0.00) |
It is crucial to consider both convergent and divergent thinking in creativity evaluation.
We plot the stacked convergent and divergent creativity evaluation results in Fig.8. Among all models, GPT-4 generally exhibits the best performance on both convergent and divergent creative thinking across all states, followed by Claude-3 and Llama3-70B. It is noticeable that Llama3-70B even outperforms GPT-4 on convergent creative thinking when (convergent(GPT-4, ) < convergent(Llama3-70B, ) ). We hypothesize that the latest Llama3 models are pre-trained on Codeforces problems and human solutions, so they have superior performance when there is no external constraint . However, as increases, its convergent performance drops drastically. Moreover, divergent creative thinking never goes to 0 across all states and is sometimes even equally distributed on those less small models (e.g., CodeGemma-7B and Mistral-7B). Together with independent findings from Xu et al. [57], this observation indicates that LLMs with insufficient reasoning capabilities tend to make up new solutions regardless of the quality when facing unusual problems. Which, in turn, demonstrates the importance of the claim we made in section 1 that creative thinking involves not merely the generation of many diverse alternatives but also the verification of new valid alternatives.
Appendix C Prompts for Denial Prompting and Benchmarking
We apply the same problem-solving prompt in both Denial Prompting and the benchmarking process.
State | Constraint | Problem Statement |
---|---|---|
0 | N/A | B. Points and Minimum Distance You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |
\cdashline1-3 1 | for loop | B. Points and Minimum Distance Programming constraints: DO NOT use the following techniques - for loop You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |
\cdashline1-3 2 | for loop if statement | B. Points and Minimum Distance Programming constraints: DO NOT use the following techniques - if statement - for loop You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |
\cdashline1-3 3 | for loop if statement while loop | B. Points and Minimum Distance Programming constraints: DO NOT use the following techniques - while loop - if statement - for loop You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |
\cdashline1-3 4 | for loop if statement while loop sorting | B. Points and Minimum Distance Programming constraints: DO NOT use the following techniques - sorting - while loop - if statement - for loop You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |
\cdashline1-3 5 | for loop if statement while loop sorting tuple | B. Points and Minimum Distance Programming constraints: DO NOT use the following techniques - tuple - sorting - while loop - if statement - for loop You are given a sequence of integers a of length 2n. You have to split these 2n integers into n pairs; each pair will represent the coordinates of a point on a plane. Each number from the sequence a should become the x or y coordinate of exactly one point. Note that some points can be equal. |