Skip to main content
QUICK REVIEW

[Paper Review] Is Temperature the Creativity Parameter of Large Language Models?

Max Peeperkorn, Tom Kouwenhoven|arXiv (Cornell University)|May 1, 2024
Topic ModelingComputer Science40 citations
TL;DR

The paper empirically tests whether temperature truly governs creativity in LLM-generated narratives, finding only weak links to novelty and coherence and criticizing the claim that temperature is the primary creativity parameter.

ABSTRACT

Large language models (LLMs) are applied to all sorts of creative tasks, and their outputs vary from beautiful, to peculiar, to pastiche, into plain plagiarism. The temperature parameter of an LLM regulates the amount of randomness, leading to more diverse outputs; therefore, it is often claimed to be the creativity parameter. Here, we investigate this claim using a narrative generation task with a predetermined fixed context, model and prompt. Specifically, we present an empirical analysis of the LLM output for different temperature values using four necessary conditions for creativity in narrative generation: novelty, typicality, cohesion, and coherence. We find that temperature is weakly correlated with novelty, and unsurprisingly, moderately correlated with incoherence, but there is no relationship with either cohesion or typicality. However, the influence of temperature on creativity is far more nuanced and weak than suggested by the "creativity parameter" claim; overall results suggest that the LLM generates slightly more novel outputs as temperatures get higher. Finally, we discuss ideas to allow more controlled LLM creativity, rather than relying on chance via changing the temperature parameter.

Motivation & Objective

  • Define four necessary creativity conditions for narrative generation: novelty, typicality, cohesion, and coherence.
  • Fix model, prompt, and context to assess the isolated effect of temperature.
  • Evaluate how temperature influences creative attributes in Llama 2-Chat 70B stories.
  • Use computational and human evaluations to examine relationships between temperature and creativity.
  • Explore limitations and propose approaches for more controlled LLM creativity.

Proposed method

  • Fix the context by using a single model (Llama 2-Chat 70B) and a neutral prompt to generate stories.
  • Generate an exemplar (greedy sample) and 100 stories across seven temperature values for computational analysis.
  • Compute semantic (cosine similarity) and lexical (normalised edit distance) distances to the exemplar and analyze with PCA.
  • Conduct human evaluations with non-expert participants rating novelty, typicality, cohesion, and coherence using a fixed exemplar.
  • Analyze results with linear mixed-effects models to account for random effects of participants and estimate effects of temperature.
  • Discuss limitations and implications for controlled creativity beyond temperature manipulation.
(a) Perplexity of stories given the LLM per temperature value.
(a) Perplexity of stories given the LLM per temperature value.

Experimental results

Research questions

  • RQ1Does increasing temperature correlate with higher novelty in LLM-generated narratives?
  • RQ2How does temperature affect typicality, cohesion, and coherence relative to an exemplar story?
  • RQ3Do computational metrics (semantic/lexical distances) align with human judgments of creativity across temperatures?
  • RQ4Is there evidence that temperature enables access to different regions of the model's embedding/probability space?
  • RQ5What practical approaches could offer more controlled LLM creativity beyond adjusting temperature?

Key findings

  • Temperature shows a weak positive correlation with novelty and a negative correlation with coherence.
  • Temperature has no relationship with typicality or cohesion.
  • Perplexity is positively associated with novelty, indicating higher model uncertainty may relate to novelty.
  • Cosine similarity and normalised edit distance show limited diversification with higher temperatures; outputs largely overlap with the exemplar across temperatures.
  • Human evaluations reveal small effect sizes: novelty slightly increases with temperature, while coherence decreases, suggesting a trade-off.
  • Overall, the study finds weaker support for the claim that temperature is the primary creativity parameter for narrative generation.
(b) Cosine similarity of stories with the exemplar per temperature value.
(b) Cosine similarity of stories with the exemplar per temperature value.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.