Is Temperature the Creativity Parameter of Large Language Models?

Max Peeperkorn, Tom Kouwenhoven, Dan Brown, Anna Jordanous
5/1/2024
cs.CLcs.AI

No official code found. Best implementation: maxpeeperkorn/creativity-parameter (2 stars, BSD-3-Clause, last commit 2024-08-29).

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.

View on arXivView PDF

Code Implementations(1)

BSD-3-Clause

This repository contains the supplementary material / appendix to go with the paper “Is Temperature the Creativity for Large Language Models” by Max Peeperkorn, Tom Kouwenhoven, Dan Brown, and Anna Jordanous.

20TeX, PythonMar 15, 20242 years agoBSD-3-Clause
creativitylarge-language-modelsllama-2narrative-generationrandomness+2 more

Similar Papers

Cite this paper

@article{peeperkorn2024temperature,
  title  = {Is Temperature the Creativity Parameter of Large Language Models?},
  author = {Max Peeperkorn and Tom Kouwenhoven and Dan Brown and Anna Jordanous},
  year   = {2024},
  eprint = {2405.00492},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2405.00492v1}
}

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/2405.00492.svg)](https://codeofpaper.com/paper/2405.00492)

Discussion