 % This must be in the first 5 lines to tell arXiv to use pdfLaTeX, which is strongly recommended.
\pdfoutput=1
% In particular, the hyperref package requires pdfLaTeX in order to break URLs across lines.

\documentclass[11pt]{article}

% Remove the "review" option to generate the final version.
\usepackage[]{acl}

% Standard package includes
\usepackage{times}
\usepackage{latexsym}
\usepackage{listings}% http://ctan.org/pkg/listings
\lstset{
  basicstyle=\ttfamily,
  mathescape
}

% For proper rendering and hyphenation of words containing Latin characters (including in bib files)
\usepackage[T1]{fontenc}
% For Vietnamese characters
% \usepackage[T5]{fontenc}
% See https://www.latex-project.org/help/documentation/encguide.pdf for other character sets

% This assumes your files are encoded as UTF8
\usepackage[utf8]{inputenc}

% This is not strictly necessary, and may be commented out,
% but it will improve the layout of the manuscript,
% and will typically save some space.
\usepackage[subtle]{savetrees}
\usepackage{microtype}
\makeatletter
\MT@redefine@patch{eqnum}{%
  \MT@patch@patch\tagform@{(}{\leftprotrusion{(}}%
  \MT@patch@patch\tagform@{)}{\rightprotrusion{)}}%
  \MT@ifdefined@n@TF{eqref }
    {\MT@exp@cs\MT@patch@patch{eqref }}{\MT@patch@patch\eqref}
       {\tagform@}{\@nameuse{MT@patch@saved@\string\tagform@}}%
}{}
\makeatother

\usepackage{url}
\usepackage{times}
\usepackage{latexsym}
\renewcommand{\UrlFont}{\ttfamily\small}
\usepackage{multicol}
\usepackage{multirow}
\usepackage{graphicx}
\usepackage{verbatim}
\usepackage{makecell}
\usepackage{nicefrac, xfrac}
\usepackage{braket}
\usepackage{hhline}
\usepackage{amsmath,bm,amssymb}
\usepackage[linesnumbered,ruled]{algorithm2e}
\usepackage{xcolor}
\definecolor{Green}{rgb}{0.0, 0.5, 0.0}
\definecolor{Amethyst}{rgb}{0.6, 0.4, 0.8}
% If the title and author information does not fit in the area allocated, uncomment the following
%
%\setlength\titlebox{<dim>}
%
% and set <dim> to something 5cm or larger.

\title{GPT-4 \texttt{Chain of Density}: Learning the Right Level of Detail \\ by Iteratively Fusing Entities into a Fixed Length Summary}

\author{
  Griffin Adams$^{\spadesuit,\clubsuit}$ \\ griffin.adams@columbia.edu \And
  Alexander R. Fabbri$^{\diamondsuit}$ \\ afabbri@salesforce.com \\ \AND Faisal Ladhak $^{\spadesuit}$ \\ faisal@cs.columbia.edu \And Eric Lehman$^{\heartsuit}$ \\ lehmer16@mit.edu \\\And No\'emie Elhadad$^{\spadesuit,\clubsuit}$ \\ noemie.elhadad@columbia.edu \AND
 Salesforce Research$^{\diamondsuit}$ \quad MIT$^{\heartsuit}$ \quad Columbia University: CS$^{\spadesuit}$, Biomedical Informatics$^{\clubsuit}$
}

\begin{document}
\maketitle
\begin{abstract}

Selecting the ``right'' amount of information to include in a summary is a difficult task. A good summary should be detailed and entity-centric without being overly dense and hard to follow. To better understand this tradeoff, we solicit increasingly dense GPT-4 summaries with a "Chain of Density" (CoD) prompt. Specifically, GPT-4 generates an initial entity-sparse summary before iteratively incorporating missing salient entities without increasing the length. We conduct a human preference study on 100 CNN DailyMail articles and discover that humans prefer GPT-4 summaries which are more dense than those generated by a vanilla prompt and almost as dense as human written summaries. Based on these preferences, we compute an optimal dynamic number of entities to include in each summary--based on the number of entities in the source document--and generate distillation training data with GPT-4.

-length LLAMA2 summarization model.

\end{abstract}

\section{Introduction}

Automatic summarization has come along way in the past few years, largely due to a paradigm shift away from supervised fine-tuning on labeled datasets to zero-shot prompting with Large Language Models (LLMs), such as GPT-4 \citep{gpt4}. Without additional training, careful prompting can enable fine-grained control over summary characteristics, such as length \citep{goyal2022news}, topics \citep{bhaskar-etal-2023-prompted}, and style \citep{pu-demberg-2023-chatgpt}.

Yet, an overlooked aspect is the information density of an summary. In theory, as a compression of another text, a summary \emph{should} be denser and contain more entities per token than the source document. Given the high latency of decoding with LLMs \citep{kaddour2023challenges}, covering more information in fewer words is a worthy goal, especially for live, chat-bot style applications. Yet, how dense is an open question. A summary is uninformative if it contains insufficient detail. Yet, if it contains too much information, it can become difficult to follow without having to increase the overall length. Conveying more information subject to a fixed token budget requires a combination of abstraction, compression, and fusion. There is a limit to how much space can be made for additional entities before a text becomes illegible or even factually incorrect.

\begin{figure}[t]
\centering
\includegraphics[width=\linewidth]{images/Density-Plot.pdf}
\caption{\texttt{Chain of Density} (CoD) summaries grow increasingly entity dense, starting off closer to vanilla GPT-4 summaries and eventually surpassing that of human written summaries. We generate summaries with variable densities to determine an optimal level, from which we generate ideal density summaries for Llama-2 distillation.}
\label{fig:density}
\end{figure}

In this paper, we seek to identify this limit by soliciting human preferences on a set of increasingly dense summaries produced by GPT-4. Specifically, we start off by generating an entity-sparse summary. Then, we iteratively identify and fuse 1-3 missing entities from the previous summary without increasing the overall length of the summary ($4x$). Each summary has a higher ratio of entities to tokens than the previous. Based on human preference data, we determine that humans prefer summaries which are almost as dense as human-written summaries and more dense than those generated by a vanilla GPT-4 prompt.

Given a document to summarize and a fixed token budget, we compute the optimal number of entities to include and prompt GPT-4 to identify them before incorporating them into a summary. We then distill this entity-dense, chain-of-thought style prompt into an open source model (LLAMA-2) and show that it produces more relevant 

Our primary contributions are: X Y Z.


\begin{figure*}[t]
\centering
\includegraphics[width=\linewidth]{images/Dense_Prompt_Example.pdf}
\caption{Chain of Density (CoD) Prompt and example output. At each step, 1-3 additional details (entities) are added to the previous summary without increasing the length. To make room for new entities, existing content is re-written (e.g., compression, fusion). Half the annotators (2/4) prefer the second to last summary, with the others preferring the final one. }
\label{fig:prompt}
\end{figure*}

\begin{figure*}[t]
\centering
\includegraphics[width=\linewidth]{images/Density-Statistics.png}
\caption{Summaries produced with \texttt{Chain of Density} prompting grow increasingly abstractive while exhibiting more fusion and less of a lead bias.}
\label{fig:implicit-stats}
\end{figure*}

\section{Chain of Density Prompting} \label{sec:prompt}

\paragraph{Prompt.} Our goal is to generate a set of summaries with GPT-4 with varying levels of information density, while controlling for length, which has proven to be a strong confounder when evaluating summaries \citep{fabbri-etal-2021-summeval, liu-etal-2023-revisiting}. To do this, we formulate a single \texttt{Chain of Density} (\textbf{\texttt{CoD}}) prompt, whereby an initial summary is generated and made increasingly entity dense. Specifically, for a fixed number of turns, a set of unique salient entities from the source text are identified and fused into the previous summary without increasing the length. The first summary is entity-sparse as it focuses on only 1-3 initial entities. To maintain the same length while increasing the number of entities covered, abstraction, fusion, and compression is explicitly encouraged, rather than dropping meaningful content from previous summaries.

Figure \ref{fig:prompt} displays the prompt along with an example output. Rather than be prescriptive about the types of entities, we simply define a Missing Entity as:

\begin{itemize}
    \item \textbf{Relevant}: to the main story.
    \item \textbf{Specific}: descriptive yet concise (5 words or fewer).
    \item \textbf{Novel}: not in the previous summary.
    \item \textbf{Faithful}: present in the Article.
    \item \textbf{Anywhere}: located anywhere in the Article.
\end{itemize}

\begin{table*}[t]
\centering
\small
\begin{tabular}{cc|ccccc|c}
\textbf{CoD Step} & \textbf{Entity Density} & \textbf{Informative} & \textbf{Quality} & \textbf{Coherence} & \textbf{Attributable} & \textbf{Overall} & \textbf{GPT-4 Eval Average} \\ \hline
\textbf{1} & 0.089 & 2.77 & 2.48 & 2.81 & 4.03 & 2.51 & 2.92 \\
\textbf{2} & 0.129 & 3.71 & 3.77 & 3.89 & 4.60 & 3.57 & 3.91 \\
\textbf{3} & 0.148 & 4.30 & \textbf{4.26} & \textbf{4.42} & \textbf{4.86} & 4.13 & \textbf{4.39} \\
\textbf{4} & 0.158 & 4.52 & 4.06 & 4.14 & 4.64 & \textbf{4.19} & 4.31 \\
\textbf{5} & 0.167 & \textbf{4.69} & 3.36 & 3.58 & 4.51 & 2.88 & 3.80 \\
\hline
\end{tabular}
\caption{GPT-4 Likert-scale (1-5) assessments of Chain of Density Summaries by step. } \label{tab:gpt4-likert}
\end{table*}

\paragraph{Data.} We randomly sample 100 articles from the CNN/DailyMail summarization \citep{cnn} test set for which to generate CoD summaries.

\paragraph{Reference Points.}  We benchmark CoD summary statistics against human-written bullet-point style reference summaries as well as summaries generated by GPT-4 with a vanilla prompt:

\begin{verbatim}
Article: {{ARTICLE}}

Write a VERY short summary of
the Article.

Do not exceed 70 words.
\end{verbatim}

\noindent We set the desired token length to be 70 based on the average length of the CoD summaries (see Table \ref{tab:explicit}).

\section{Statistics} \label{sec:statistics}

We bifurcate statistics into explicit and implicit. Explicit statistics (tokens, entities, entity density) are ones directly controlled for by \texttt{CoD}, while implicit statistics are expected byproducts of densification.

\begin{table}[h]
\centering
\small
\begin{tabular}{c|cc|c}
\textbf{CoD Step} & \textbf{Tokens} & \textbf{Entities} & \textbf{Density (E/T)} \\ \hline
\textbf{1} & 72 & 6.4 & 0.089 \\
\textbf{2} & 67 & 8.7 & 0.129 \\
\textbf{3} & 67 & 9.9 & 0.148 \\
\textbf{4} & 69 & 10.8 & 0.158 \\
\textbf{5} & 72 & 12.1 & 0.167 \\ \hline \hline
\textbf{Human} & 60 & 8.8 & 0.151 \\
\textbf{Baseline} & 70 & 8.5 & 0.122 \\
\end{tabular}
\caption{Explicit (Density-based) statistics for summaries produced by Chain of Density (CoD) prompting. } \label{tab:explicit}
\end{table}

\paragraph{Explicit Statistics.} In Table \ref{tab:explicit}, we compute tokens with NLTK \citep{loper2002nltk}, measure unique entities with Spacy\footnote{\href{https://spacy.io}.}, and compute entity density as the ratio. The CoD prompt largely adheres to a fixed token budget. In fact, the second step leads to an average 5-token (72 to 67) reduction in length as unnecessary words are removed from the initially verbose summary. The entity density rises--starting at $0.089$, initially below Human and Baseline ($0.151$ and $0.122$)--to $0.167$ after 5 steps of densification.

\paragraph{Implicit Statistics.} \textbf{\emph{Abstractiveness}} should increase with each CoD step because summaries are iteratively re-written to make space for each additional entity. We measure abstractiveness with extractive density: the average squared length of extractive fragments (grusky todo). Similarly, the level of concept \textbf{\emph{Fusion}} should increase monotonically as entities are added to a fixed-length summary. We proxy fusion as average number of source sentences aligned to each summary sentence. For alignment, we use the relative ROUGE gain method \citep{zhou-etal-2018-neural-document}, which aligns source sentences to a target sentence until the relative ROUGE gain of an additional sentence is no longer positive. We also expect the \textbf{\emph{Content Distribution}}--the position in the Article from which summary content is sourced--to shift. Specifically, we expect that \texttt{CoD} summaries initially exhibit a strong Lead Bias yet gradually start to pull in entities from the middle and end of the article. To measure this, we use our alignments from fusion and measure the average sentence rank of all aligned source sentences. Figure \ref{fig:implicit-stats} confirms these hypotheses: abstractiveness increases with the number of re-writing steps (lower extractive density on the left), the rate of fusion rises (middle figure), and the summaries start to incorporate content from the middle and end of the article (right figure). Interestingly, all CoD summaries are more abstractive than both human written and baseline summaries.

\section{Results} \label{sec:results}

We compare CoD summaries by step with both automatic metrics (GPT-4 ratings), as well as preference-based human evaluation \citep{rlhf}.

\paragraph{Automatic Metrics.} As an evaluator, GPT-4 has been shown to adequately correlate to human judgments \citep{fu2023gptscore, liu2023gpteval}, even potentially outperforming crowd-sourced workers on some annotation tasks \citep{gilardi2023chatgpt}. As a complement to our human evaluation (below), we prompt GPT-4 to rate CoD summaries (1-5) along 5 dimensions: \textbf{Informative}, \textbf{Quality}, \textbf{Coherence}, \textbf{Attributable}, and \textbf{Overall}\footnote{These dimensions and definitions were inspired, and sometimes  from, previous summarization annotation efforts: \citep{fabbri-etal-2021-summeval, aharoni-etal-2023-multilingual}.}. Please see Appendix \ref{app:metrics} for the prompts used to solicit scores for each dimension.

Table \ref{tab:gpt4-likert} suggests that, across dimensions, a moderate degree of densification is favored: CoD Step 3 has the highest average GPT-4 ratings across dimensions. Yet after a certain point, the \textbf{Quality}, \textbf{Attributable} \textbf{Coherence} degrade (3.36, 3.58, 4.51 at CoD step 4) which pushes down the \textbf{Overall} score ($2.88$). 

\begin{table}[h]
\centering
\small
\begin{tabular}{c|ccccc}
\textbf{CoD} & \multicolumn{5}{c}{\textbf{\% Share of First Place Votes}} \\
\textbf{Step} & \multicolumn{4}{c}{\textbf{Individual Annotators}} & \textbf{Aggregate} \\ \hline
\textbf{1} & 3.0 & 2.0 & 13.0 & 17.4 & 8.3 \\
\textbf{2} & 25.0 & \textbf{28.0} & \textbf{43.0} & \textbf{31.4} & \textbf{30.8} \\
\textbf{3} & 22.0 & \textbf{28.0} & 21.0 & 24.4 & 23.0 \\
\textbf{4} & \textbf{29.0} & 25.0 & 13.0 & 26.7 & 22.5 \\
\textbf{5} & 21.0 & 17.0 & 10.0 & 16.3 & 15.5 \\
\hline
\end{tabular}
\caption{Human Preferences. Based on aggregate preferences, the modal CoD step is \textbf{2}, the median is \textbf{3}, and the expected is \textbf{3.06}. } \label{tab:human-preferences}
\end{table}

\paragraph{Human Preferences.}

Table \ref{tab:human-preferences}.

Average pairwise agreement is low ($31.5\%$), not much higher than a random expected agreement score of ($20\%$).


\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{images/SourceTargetEntities.png}
\caption{xxx.}
\label{fig:target-ents}
\end{figure}

\section{Straight Shot Distillation} \label{sec:straight}

Based on the preference data, we can estimate the human-optimal number of entities to include in a fixed-length summary (~70 tokens). To do this, we first bucket each example by the number of unique entities in the source text and then compute the average number of entities in a summary across the subset of summaries preferred by at least 1 annotator.

Figure \ref{fig:target-ents} shows the xx. Given optimal end goal entity targets, we tweak the \texttt{CoD} prompt to directly generate a summary with the optimal number of entities in \emph{one shot} rather than as part of an iterative prompt. Given an article to summarize, we compute the number of entities and select the average number of target entities by the appropriate source bucket\footnote{Fractional values are rounded to the nearest integer.}.

\section{Related Work} \label{sec:related}

\section{Conclusion} \label{sec:conclusion}

We study the impact of summary densification on human preferences of overall quality.

% Entries for the entire Anthology, followed by custom entries
\bibliography{anthology,custom}
\bibliographystyle{acl_natbib}

\appendix

\section{GPT-4 Metrics} \label{app:metrics}

For the GPT-4 Likert-style evaluation, we use the following prompt template.

\begin{verbatim}
Article: {{Article}}

Summary: {{Summary}}

Please rate the summary
(1=worst to 5=best) with 
respect to {{Dimension}}. 

{{Definition}}
\end{verbatim}

Below, we present the definitions provided for each quality metric.

\begin{itemize}
    \item \textbf{Informative}: An informative summary captures the important information in the article and presents it accurately and concisely.
    \item \textbf{Quality}: A high quality summary is comprehensible and understandable.
    \item \textbf{Coherence}: A coherent summary is well-structured and well-organized.
    \item \textbf{Attributable}: Is all the information in the summary fully attributable to the Article?
    \item \textbf{Overall Preference}: A good summary should convey the main ideas in the Article in a concise, logical, and coherent fashion.
\end{itemize}

The \textbf{Quality} and \textbf{Coherence} prompts do not include the Article in the prompt. These dimensions and definitions were largely borrowed from previous summarization annotation efforts papers: \citep{fabbri-etal-2021-summeval, aharoni-etal-2023-multilingual}.

\end{document}
