Probing the “Creativity” of Large Language Models: Can models produce divergent semantic association? (2023)

Abstract: Large language models possess remarkable capacity for processing language, but it remains unclear whether these models can further generate creative content. The present study aims to investigate the creative thinking of large language models through a cognitive perspective. We utilize the divergent association task (DAT), an objective measurement of creativity that asks models to generate unrelated words and calculates the semantic distance between them. We compare the results across different models and decoding strategies. Our findings indicate that: (1) When using the greedy search strategy, GPT-4 outperforms 96% of humans, while GPT-3.5-turbo exceeds the average human level. (2) Stochastic sampling and temperature scaling are effective to obtain higher DAT scores for models except GPT-4, but face a trade-off between creativity and stability. These results imply that advanced large language models have divergent semantic associations, which is a fundamental process underlying creativity.

## introduction large language models (llms) have exhibited unparalleled mastery of natural language @xcite . the primary capacity of producing the most probable next word is broadly generalizable to many language tasks, suggesting underlying cognitive abilities beyond specialized linguistic rules and patterns. there is observation that llms may possess reasoning abilities which is a core aspect of intelligence, including decision-making @xcite and theory of mind @xcite . meanwhile, there is also increasing interest in exploring llms' creativity, which is closely related to intelligence @xcite . creative use of language, such as metaphor and figure 1 : creativity from the perspective of language distribution. creative thoughts need to be novel and valuable, which need cognitive control to inhibit common tokens and remote association to find valuable tokens. a general definition of creativity is the ability to create something both novel and valuable @xcite . according to the dual-process theory of creativity @xcite , creative thinking relies on remote association while inhibiting common ideas (figure 1 ). because of the intrinsic complexity, creativity is universally accepted to be unique to human beings, while models are regarded as great predictors to master the existing distribution but not qualified creators to generate new distribution. however, there have been evidences of models possessing creativity in different domains. for artistic creation, deep generative models reveals exquisite painting skills @xcite . for algorithms, models are able to generate original and superhuman strategies in board game @xcite . as for language models, creativity is an emerging concern. since gpt-2 @xcite , language models are able to naturally produce answers given a prompt, even for open-ended and creative generation tasks @xcite . however, when generating texts from these probabilistic models, decoding strategy has a prominent effect on the quality of result. decoding strategies that search for the highest-probability words tend to produce texts that is dull and repetitive @xcite , while stochastic strategies, which randomly sample from models, generate texts with better human preference @xcite . these texts have human-like information distribution, which are viewed as informative and interesting @xcite . despite this, stochastic strategies are distinct from human. the decoding process is probabilistic and independent, while humans produce language under elaborated cognitive control, especially for creative generation. creative and nonsense contents are both infrequent during next word prediction that cannot be simply distinguished via sampling strategies (figure 1 ). thus, it is unclear whether llms genuinely have creativity during modeling, and whether decoding strategies help. to answer both of these questions, we evaluate the creativity of llms. specifically, we use an objective semantic measurement, the divergent association task (dat), which asks models to generate unrelated nouns and compute the pairwise semantic distance between them @xcite . in summary, we make the following contributions: ## measuring creativity a direct measure of creativity is relying on experts to judge the creative quality of products. several studies assessed llms' creativity on artistic and scientific creation @xcite . however, two elements of creativity, novelty and value, are both relative and ambiguous during evaluation. human ratings are affected by subjective surprise and domain knowledge, and thus differ from each other. there are other methods based on domaingeneral cognitive process of creativity. foot_0 divergent thinking, i.e., generating a large variety of solutions from an open-ended point, is an indicator for creative thinking @xcite . one of the most widely used tasks on divergent thinking is the alternate use task (aut), which asks participants to generate unusual uses of objects (e.g., a brick) @xcite . previous studies used aut to measure the creativity of llms @xcite , but the evaluation is sample-dependent that the scores are various across the selected objects. aut also relies on humans to rate the creativity of generated uses. moreover, aut has the the risk of data leakage that the answers are confounded by the uses recorded in the training data. creativity has long been linked to the flexibility of semantic retrieval @xcite ). an alternative to probe creativity is through the structure of semantic memory, which can be automatically and reproducibly assessed @xcite . the dat, among these methods, is valid and reliable that closely correlates with other metrics of creativity @xcite . different from measuring semantic similarity as usual, the dat prompts participants to reject related associations and produce unrelated nouns (figure 2 ). formally, given n words and their word embed-dings {v 1 , . . . , v n }, the dat can be calculated as the average cosine distance as follows: in this study, we apply the dat to assess the creativity of llms, but before that it is necessary to evidence the applicability of this method. basically, the validity of dat for humans comes with the bias that humans retrieve semantics exploiting their semantic networks. the semantic networks of humans reveal the semantic representations about the world, which are also reflected in the language distribution of human corpus. thus, llms pre-trained on the corpus should exhibit the similar bias. the semantic networks are also needed for llms to accomplish general language tasks. empirically, previous studies showed that language models have similar patterns of semantic activations with humans (lake and murphy, 2020; digutsch and kosinski, 2023). additionally, considering these studies assessing the semantic activations differently from the present study, we provide another analysis to validate the dat for llms. it is noteworthy that possessing similar semantic networks is not equivalent to being equally creative. although the semantic networks of humans are roughly consistent, the ability to produce remote associations is challenging and largely varies among humans. ## result the dat results are shown in figure 3 . using greedy search, gpt-4 achieves the highest dat of 89.1, surpassing 96.1% of humans, and gpt-3.5-turbo attains a dat of 80.8 that is above the average human-level (figure 3c ). other models perform less well with lower dat, which are roughly proportional to the size of models. when using top-p sampling, models other than gpt-4 are capable of getting the dat much higher than greedy search, but they also become unstable that probably generate answers with low dat scores (figure 3b ). we also report the relation between the dat and surprisal in figure 4 . 6 theoretically, surprisal is corresponding to the novelty that is an element of creativity, and the original dat metric including word frequency effect is valid for human as well @xcite . but as mentioned in section 3.3, word frequency might be a confounding variable when calculating semantic distance. indeed, we find two variables highly relevant for human and random baselines (also see appendix b). for models, the results of top-p sampling have homogeneous slopes with two baselines, but their intercepts and surprisal distributions are different. gpt-4 and gpt-3.5-turbo exceed the average human dat under the same surprisal, while other models fall short. despite vicuna-13b 6 the dat and surprisal for more llms are shown in appendix c and chatglm-6b have similar distributions of surprisal, the former generates words more divergently. oasst-llama-30b defeats vicuna-13b on the dat, but this might be explained by the capacity or tendency to generate rarer words. to clarify this effect, we control the surprisal for dat in appendix d. the results are similar that gpt-4 and gpt-3.5-turbo outperform average human performance, but the superiority of gpt-4 is attenuated. we further investigate the effect of temperature (figure 5 ). temperature is a widely deployed parameter for creative or original generation in practice that high temperature skews the distribution shape towards low-probability tokens @xcite . we vary the temperature from 0.1 to 1 and found its positive effect for models except gpt-4. however, the effect is limited, and high temperature will also bring instability and produce invalid answers. as for gpt-4, high-probability tokens are well aligned with highquality answers. in the relationship between the dat and surprisal, we find a naive algorithm that samples nouns from wordnet can outperform the majority of humans and models (figure 4 ). it is because the algorithm has no constrains of the language distribution, which also means it can barely accomplish general language tasks. although llms have exhibited striking mastery of natural language, we wonder whether they process the semantics differently with humans and the dat test is accordingly invalid as well. thus, we compare the dat with base and random conditions (figure 6 ). we show that if not instructed, llms tend to produce more related words. when instructed with the prompts of random and the dat, llms can modulate the language distributions to be more divergent. these results indicate that llms have the potential to generate divergent content with instruction, but with the flaw of not inhibiting common words. stochastic decoding strategy is helpful for promoting remote association, but since the creative and nonsense content are both infrequent, it cannot accurately produce high-quality content. however, advanced llms show the implicit control of modulating the probability distribution and stably generating divergent answers. stochastic decoding strategy may even degrade performances for introduced randomness. ## conclusion in this work, we provide a creativity evaluation using a divergent semantic task. this task reveals distinguishable results across various llms and decoding strategies. we find gpt-4 demonstrates advanced human-level creativity stably, while gpt-3.5-turbo exceeds the average human level. for decoding methods, stochastic decoding strategy is effective but not enough for creative generation.