Time-aware Prompting for Text Generation
Paper · 2022 · Shuyang Cao and Lu Wang
Summary
A news story can say that something happened last year and leave its readers to work out which year that was. The publication date supplies part of the meaning. An encyclopedia biography presents a different problem. Its revision date identifies the version of a profile, while the events worth describing may have happened long before that revision. Shuyang Cao and Lu Wang ask what happens when a text generation system receives the document’s date alongside its usual input. They test whether the date helps the system choose relevant information, state dates accurately, and handle documents that come from a later period than the training material.
The authors fine-tune BART with either a textual or a linear prompt. The textual prompt gives the date as a short sentence. The linear prompt represents the year, month, and day as separate vectors, whose scale depends on the corresponding number. Either prompt can go on the encoder side, where the source is read, or the decoder side, where the output is written. The experiments cover Wikipedia biography writing from structured profiles, continuation of a Wikipedia passage using a cited news story, and summarization of BBC articles. For the biography task, the authors build TempWikiBio, a collection of 4,277,450 revisions from 2004 to 2021, and test on held-out people from both the training era and a later period.
Across the main automatic comparisons, prompted systems beat BART without a prompt in 49 of 56 cases. Linear encoder prompts give the strongest overall results on the biography task. Textual prompts are generally stronger on the two tasks whose inputs are already prose. The aggregate scores leave open an important question about what improved. Human judges on the future biography split and the passage continuation task assess whether gains in informativeness or factuality come from changes to dates. The gains from linear prompts tend to concern other content. On passage continuation, judges find date-related factual improvements with textual prompts and find none with the linear prompt they assess.
The authors also change the date in the prompt while keeping the document fixed. Generated text changes more readily with textual prompts, and some of those changes track dates discussed in the source. Others expose gaps in reasoning, such as which year a sporting competition can take place. Linear prompts are less sensitive to the date and hold up better in the authors’ comparison on later biography revisions. That resilience and the quality of the dates a system writes are distinct outcomes. A system can use a prompt to produce a better description while making little use of the calendar information the prompt supplies.
Deep dive: Time-aware Prompting for Text Generation
Time-aware prompting gives text generators document dates and tests when those dates improve content selection, factual accuracy, and temporal generalization. · about 38 minutes to read
The problem and its context
A document date can carry part of the meaning
A writer can rely on a reader to know when a document appeared. News reports routinely situate events relative to publication, for instance by describing what happened on a weekday or in a recently completed reporting period. A reader with the publication date can begin to connect those expressions to a calendar. A system given the words of the article alone has to look for an anchor elsewhere in the text or leave the timing unresolved. An article can contain many dates, each attached to a different event. The presence of those dates does not by itself tell the system which one anchors the expression it is trying to interpret.
The same metadata can serve another purpose in a collection of biographies. A profile can acquire a new award, change the way it identifies a person’s occupation, or record the end of a term in office. The revision timestamp associates the profile with a particular state of the article. A generator still has to choose which facts in that profile belong in the introduction. It might need to mention the dates of a term, a sporting career, or a person’s life. Those are facts described by the revision. The revision date has a separate role as information about the document that describes them.
Cao and Wang study whether a language model can benefit from being given that separate piece of information. Their starting point is the common practice of fine-tuning, in which a system that has already learned from a broad collection of text is trained further on examples of the task it will perform. The authors describe leading generators that follow this practice while leaving document dates out of the task input. The generator receives the material to summarize, continue, or turn into prose. The metadata available to a person reading the same material can be missing from that input.
The distinction matters even for an apparently simple output such as a single sentence. Suppose a continuation needs to explain when a show was renewed. The surrounding passage may give the date of its premiere, while the cited source discusses the renewal using language anchored to the day of publication. A fluent output can pair the right event with the wrong date. It can even copy a date that is correctly stated elsewhere in the input. The hard part in that case is deciding what the date refers to. Providing the source’s timestamp gives the generator a clue about that decision.
Document dates also matter to the way experiments are designed. A test drawn from the period covered by training asks whether a system handles unseen examples within a familiar historical range. A test drawn from later documents asks how well it handles a change of period alongside the usual move to unseen material. The two designs can yield different answers. An improved score on a later set might come from handling later dates, from having a better general way to turn input into prose, or from being less affected by what date was supplied. The paper is designed to put those explanations in contact with different kinds of evidence.
What earlier work had established
The paper describes earlier research on temporal change as beginning with shifts in language itself. Researchers tracked how often an n-gram, a sequence of neighboring linguistic units, occurred in different periods. Other work examined how word meanings changed. Those studies treated time as an organizing variable for observing language. They made it natural to ask what happens when a system trained on material from one period works on text from another.
A related line of research examined performance on downstream tasks, meaning the applications for which a pretrained system is subsequently used. The paper points to work where a training and testing mismatch in time reduces performance. Its account includes research on temporal effects in classification and on the ability of pretrained systems to handle later data as their stored knowledge ages. Cao and Wang take that observation as motivation for a different experiment. A temporal split can reveal a problem even when the system sees no timestamps at all. Their intervention makes the date available during generation and asks what the system does with it.
The proposed intervention comes from work on prompts. The paper reviews prompts as a means of controlling what a system writes and as a way of telling a general-purpose system what task it is expected to perform. In some of the work it discusses, an instruction allows a system to attempt a task it did not encounter in training. In other work, a prompt is written by hand or learned, and its effects are studied with few-shot learning, where only a small number of task examples are available. Cao and Wang use a different source for the content of the prompt. Its value varies with each document, and their systems learn the task with the prompt already in place.
The paper identifies a close precedent for the textual form. Earlier time-aware work used year-level prompts. Cao and Wang include the month and day so that the input can support finer distinctions, such as the ones involved in news written around a reporting period. Their study also compares that readable expression of a date with a vector representation in which the numerical components of the date determine the scale of the input. Their stated precedent for using changes in scale as a control is research on output length. In that earlier application, scaling part of the generator’s internal representation helped condition how much text it wrote. Here the scale carries parts of a date. Time-Aware Language Models as Temporal Knowledge Bases and Controlling Output Length in Neural Encoder-Decoders supply these two points of departure.
Why the paper uses different kinds of generation
The tasks differ in where a useful fact can be found. In a Wikipedia biography, many dates are already presented as field values. The challenge is to choose and verbalize the right attributes. In content transfer, a system has to extend an existing passage by drawing on a separate source. It has to keep track of what has already been said and what the cited article adds. In XSum, the system condenses a single BBC story into a short account. The relevant information can be spread through the article, and the summary can require understanding how the article situates events in time.
This variety gives the date prompt several opportunities to matter. It can accompany the structured record when the system decides which facts to include. It can help connect a relative statement in a cited article to a point on the calendar. It can supply context for choosing a news summary’s formulation. The distinction between these opportunities shapes the experiment. A date used in selecting content can improve a description even if no new date appears in the output. A date used to resolve an event’s timing can improve factuality even if the rest of the sentence changes very little.
The paper also distinguishes these successes from temporal extrapolation. A source date can help with an article from the period already represented in training. Extrapolation asks whether the same way of supplying dates remains effective on later material. Biography revisions give the authors a dataset with a history of changes and enough examples to define separate test periods, while keeping the people in the test material out of training and development. That setup makes it possible to compare prompt behavior in different temporal conditions without asking the system to reproduce a held-out revision of a person it has already seen during task training.
The method, step by step
From the source to the output
The starting point is a sequence-to-sequence generator. Its encoder reads the source sequence and produces representations of its contents. Its decoder uses those representations as it generates the output sequence. In the biography task, the source sequence is a serialized infobox. In the text-to-text tasks, it contains prose. The distinction between encoder and decoder lets the authors vary where the date is supplied. A date added on the encoder side is available as part of reading the source. A date added on the decoder side is supplied as part of the context for writing the target. In both cases the date accompanies the same underlying task input.
The authors prepare each example by identifying the relevant document and obtaining its timestamp. They then encode that timestamp as a sentence or as a sequence of continuous vectors. A continuous vector is an ordered collection of numerical values. Here each vector is the same width as the generator’s ordinary token embeddings, which are the numerical representations it uses in place of bare words or pieces of words. The prompt can therefore occupy positions within either side of the generator. The authors fine-tune a version for each prompt type and placement, and compare those versions with a generator fine-tuned without the date prompt.
Adding a document date to text generation
The steps in order.
The intervention belongs to both training and inference. During training, the system sees examples of how the task source and its date relate to the reference output. During testing, a new source and its date are put into the same kind of input. This distinction is important when comparing the results with other uses of prompts. Asking a system trained without date metadata to interpret an unexpected date instruction at test time would be a different experiment.
Giving the date as a sentence
For the textual prompt, the authors express the day and year with digits and spell out the month between them. They use a style familiar from the BBC material in XSum. This takes the raw timestamp and turns it into a calendar expression that can be handled as ordinary text. The selected template puts that expression after the words “Today is” and ends the sentence with a period. In this setting, “today” designates the date associated with the example, even when the source describes events that happened earlier or anticipates events that will occur later.
The authors compare several ways of introducing the same date. A compact version labels it as a date. Another uses the simple sentence about today. A longer version describes when the accompanying text was written. The trial uses encoder prompts and the XSum development set. A development set is the part of the data reserved for making choices such as which template or learning rate to use before reporting results on held-out test material. The authors choose the simple sentence because it has the highest average ROUGE score in that trial. They carry that formulation into the main experiments with both prompt placements.
A textual prompt presents the year, month, and day in forms already familiar from prose. A news report can mention a month by name, while the prompt uses the same sort of expression to establish the document date. The paper uses this compatibility as a possible explanation for the performance of textual prompts when the rest of the input is also written language. The experiment varies the representation as a whole, so that explanation is a reading of the results. The setup does not independently vary such features as whether a month is spelled out or whether the date appears in a full sentence.
The textual prompt itself supplies a date without specifying how to apply it. It contains no instruction for subtracting time from the publication date, deciding which weekday an article refers to, or determining the schedule of a recurring competition. Those are inferences the generator would have to make from what it has learned and what the source says. This open-endedness is part of what the authors investigate when they change the timestamp and inspect the resulting text.
Giving the date as scaled vectors
The linear prompt starts with a different representation. It takes the year, month, and day as separate scalars, meaning individual numerical values. Each component is projected into a vector with the same dimension as the normal embeddings on the relevant side of the generator. The paper describes this projection both as a mapping from a scalar and as scaling the vector for that component. This is the operation shown in its architecture diagram, written as a single symbolic expression.
p(c) = t(c) · v(c)
Here c identifies a calendar component, either year, month, or day. The function t gives the numerical value of that component for the document. The function v identifies the vector associated with the component before it is scaled. The dot denotes multiplication of that vector by the scalar, so every coordinate is multiplied by the same component value. The function p gives the resulting prompt vector. Parentheses indicate evaluation at c, and the equality states how the prompt vector is obtained.
For two dates in the same month and year, a change in day changes the scale of the day vector while the other component values stay fixed. A change of month changes the scale used for the month vector. The values are ordered within each component, which is the sense in which the authors say the scale reflects time’s order. The design represents the calendar through its components. It does not supply a single count of elapsed days, give the duration between two dates, or explicitly implement the transition from the end of one month to the start of the next. How the generator uses the resulting numerical context is learned as part of the task.
The distinction from the textual representation extends beyond whether a user can read the prompt. A month written in a sentence has a name and appears among ordinary text units. In the linear prompt, a month is supplied as the size of a projected vector associated with that component. A textual date gives the generator access to its learned associations with the words and numerals in a date expression. The vector form makes the scalar vary smoothly within a component. Neither design dictates what a change in the output must be when the document date moves. With the scaling operation in particular, regularity in the prefix is a property of the input representation.
The design can be used in front of either the encoder or the decoder. Holding the form of the date constant while changing its placement produces one comparison. Holding placement constant while switching between a sentence and vectors produces another. The no-prompt condition provides a reference for judging whether either kind of added input helps. Since the date is metadata, the systems without prompts can still use any dates that appear in the article or the infobox itself.
Preparing the Wikipedia biographies
TempWikiBio extends WikiBio, an earlier resource that used the latest available revision of each included article by 2015. The authors use WikiBio’s titles and article identifiers to locate biographies within an English Wikipedia dump processed on February 1, 2022. The histories of those biographies allow the authors to extract multiple versions of the profile and lead. The resulting collection spans 2004 to 2021 and covers 695,929 biography articles.
A usable revision supplies a complete infobox, a timestamp, and the article’s opening paragraph. The authors discard revisions whose infoboxes are incomplete. Because early drafts are likely to say less about the person, they also skip each article’s first five revisions. From the eligible material they extract the infobox fields and opening prose. At training or test time, the infobox is linearized, meaning its structured fields are laid out as a sequence that the encoder can read. The lead from the same revision is the reference paragraph to be generated.
The collection is sampled across each article’s history. The authors select the latest revision at intervals whose lengths vary, drawing the next interval after selecting a revision. This avoids taking every intermediate edit and gives the selected examples a range of dates. The paper describes the sampling rule as follows.
X ∼ Uniform([270, 450])
X is the number of days in the sampling interval. The symbol ∼ means the interval is drawn from the distribution on the right. Uniform names the sampling distribution. The brackets mark the allowed interval, with 270 and 450 as its endpoints, measured in days. The variable interval concerns when the collection procedure looks for the latest revision. The timestamp used in the prompt is associated with the revision itself.
The pairing of infobox and lead makes the task concrete. A system sees attributes of the person as recorded in a particular version and produces an introductory paragraph. There are, on average, 15.3 attributes per infobox and 43.2 words per reference lead. That setup gives the generator a selection problem. A list of fields can contain information that is useful for understanding a career but that would make a short opening paragraph unwieldy if every field were written out. The reference lead is one example of what can be selected and how it can be expressed.
The two test sets serve different purposes. Test-Same Time draws revisions from the period also covered by training and development, with entries in the paper’s split counts through 2018. Test-Future contains revisions from 2019, 2020, and 2021. The biography subjects in the test sets are absent from training and development. At the test stage, the authors also downsample the number of articles to 10% of the original number created in the test period to keep decoding time manageable. The dataset’s total revision count therefore describes the collection rather than the number of passages used in each evaluation.
Obtaining the dates for the two prose tasks
The content transfer input has two pieces. One is the context within a Wikipedia article. It consists of the three sentences immediately before a sentence that cites a news source. The other is the cited article itself. The cited sentence is the reference target. The generator has to write a continuation that draws on the outside article and fits with the passage already in progress. The timestamp belongs to the cited article. This is the document whose relative expressions or reporting context may need to be carried into the continuation.
Because the news sources come from different outlets, the authors use the Wayback Machine to obtain the date on which the article was first archived. They use that date as the source timestamp. This gives them a common procedure across outlets, whose webpages might otherwise need different extraction rules. The first archived date and the date of publication may differ. The dataset statistics also retain an unknown category for sources without an identified date. These details matter when interpreting the prompt as an anchor for the published article’s wording.
In XSum, the input and reference come from the same BBC article. The reference is the first sentence, and the remaining content is the material given for generation. The timestamp comes from the article’s HTML. This pairing gives a short reference even when the underlying article discusses several items or gives substantial background. The task asks the system to pick out the story the opening sentence expresses, and an explicit date can help place the rest of the article in context. XSum supplies the dataset and its lead-sentence setup.
These sources of timestamps are part of the method. For the biography task, the revision history records when a version was made. For content transfer, the available date is a record of archival activity used to approximate publication. For XSum, the authors extract the date from an existing field in the article’s HTML. The procedure presents each date to the generator in the same chosen representation, but the evidence behind the date differs by dataset.
Fine-tuning and decoding
The main experiments use bart.large. For the implementation, the authors use fairseq for both training and decoding. They start with the settings of BART’s XSum training script. For TempWikiBio they set training to 30,000 updates and use an accumulated batch of 65,536 tokens. For content transfer they set training to 35,000 updates. The learning rate controls the scale of each update in training. The authors search among the paper’s candidate rates using BART without a prompt and choose the setting for each of those tasks by development-set BLEU-4. They use the resulting settings when evaluating the prompted conditions. Each configuration is trained once with a single random seed because of the cost of fine-tuning.
To generate the test outputs, the authors use beam search. It keeps a limited number of candidate continuations as generation proceeds, giving the decoder some alternatives to pursue before selecting a final output. The beam size is 4 for TempWikiBio, 4 for content transfer, and 6 for XSum. The maximum decoding lengths are 100 for TempWikiBio, 100 for content transfer, and 60 for XSum. The first two limits apply to tasks whose targets are respectively a biographical lead and a continuation. The XSum limit accompanies a short news summary task.
The authors also repeat selected comparisons with T5-base, following the default settings they identify for T5 and decoding through the HuggingFace Transformers implementation. The supplementary experiment changes the pretrained system while retaining the distinction between text and vectors, so it can show whether the direction of a comparison survives that change. Its reported comparisons use the two encoder prompts and an unprompted baseline on TempWikiBio and content transfer. The authors make the experimental code and the collected TempWikiBio data available together.
Experiments and results
What the scores measure
The central automatic comparison is between the unprompted BART system and the four combinations of prompt form and placement. The source and target task stay the same within a dataset. On TempWikiBio, both chronological test conditions are scored. This gives a view of improvement within each period and a separate basis for comparing behavior across periods. Content transfer and XSum each supply the text-to-text comparison for their own held-out test set.
TempWikiBio uses several measures of how the generated paragraph compares with the reference. BLEU rewards matches between sequences of words, and the paper reports BLEU-4. METEOR also rewards correspondence between generated and reference wording. Translation Edit Rate, or TER, measures the editing needed to bring an output into line with the reference, so lower is better. BERTScore compares contextual representations of the generated and reference text. The supplementary evaluation includes PARENT, a measure developed for table-to-text generation that takes the input table into account. The authors also count date mentions, a descriptive measure of what appears in the paragraph. METEOR and the paper introducing PARENT describe the associated metrics.
Content transfer is scored with ROUGE-L, METEOR, and BERTScore in the main table. XSum is scored with ROUGE-1, ROUGE-2, and QuestEval. ROUGE-1 concerns overlap in individual words, ROUGE-2 concerns overlap in adjacent word pairs, and ROUGE-L is based on a shared subsequence. QuestEval uses question answering to examine faithfulness. It asks whether questions derived from the summary can be answered from the source and also makes the comparison in the other direction. The appendix reports BLEU-4 for content transfer and ROUGE-L for XSum. ROUGE and QuestEval describe the evaluation approaches.
These measures respond to different changes in the output. A biography that adds the right playing position may move closer to its reference on a wording-based score. A continuation that chooses the correct month may do so as well. Each contribution is folded into a score for the whole output. Across the main comparisons on the reported metrics and test sets, prompts come out ahead of BART without a prompt in 49 of 56 cases, reported as 87.5%. That figure counts favorable score comparisons. The paper separately marks improvements significant by approximate randomization at p < 0.001. It also asks human judges to distinguish changes involving dates from other changes.
TempWikiBio rewards the linear encoder prompt
On Test-Future, putting the linear prompt on the encoder yields the highest BLEU-4. The textual prompt on the decoder is the next strongest setting by that measure. The other prompted configurations also score above the unprompted baseline on this split’s BLEU-4. The published table marks each of those increases as significant under its approximate randomization test.
BART configurations on TempWikiBio Test-Future by BLEU-4
The linear encoder prompt leads, and every prompted setting scores above the unprompted baseline.
The numbers
| System or setting | BLEU-4 |
|---|---|
| BART without a prompt | 30.48 |
| Textual encoder prompt | 30.76 |
| Linear encoder prompt (this paper) | 31.22 |
| Textual decoder prompt | 31.05 |
| Linear decoder prompt | 30.69 |
The relative order changes with the metric. On Test-Future, the best METEOR is 50.46 with the textual decoder prompt, compared with 49.88 without a prompt. The linear encoder prompt has the lowest TER, 68.66 against 69.66 without a prompt, and the highest BERTScore, 55.79 against 55.34. The textual decoder prompt’s TER is 69.98, above the baseline where a lower number is preferred. In other words, a setting that leads on one measure of correspondence can require more reference edits under another.
On Test-Same Time, the linear encoder prompt again gives the best BLEU-4, with 31.50 against 30.81 without a prompt. It also produces the lowest TER, 69.33 against 70.26 for the baseline, and the highest BERTScore, 56.00 against 55.51. The textual decoder prompt again leads on METEOR, scoring 50.73 against 50.15 without a prompt. Its TER on that split is 70.51. Looking across the splits explains the authors’ characterization of the linear encoder prompt as the best overall configuration for structured input, while the metric-level results show where the textual decoder prompt has an advantage.
The supplementary PARENT scores add another comparison. On Test-Future, the linear encoder prompt leads with 56.57, and the unprompted BART result is 56.30. On Test-Same Time, the textual decoder prompt leads with 57.88, against a baseline of 57.57. The systems also produce fairly similar numbers of dates in biography outputs. On Test-Future the linear encoder setting and the baseline both average 1.33 dates per output, while the textual decoder setting averages 1.35. A system can obtain more credit for the biography as a whole while giving the same average number of dates. The count leaves open which dates are present and whether each date belongs to the correct event.
The authors characterize the extrapolation pattern as a smaller deterioration for the linear prompts than for the textual prompts. The strength of that pattern depends on the comparison being made. In particular, the scores come from different examples across the periods and different measures of quality within each period. The authors return to this issue in the sensitivity analysis, where they change the timestamp for the same document. That second design makes it possible to investigate whether robustness to later material goes together with a strong response to the date itself.
Content transfer favors a textual decoder prompt
On the content transfer test set, the textual decoder prompt leads the main ROUGE-L comparison. The textual encoder and linear encoder settings also beat the baseline by that measure. The linear decoder prompt is the closest of the prompted systems to the baseline. This placement comparison is useful because the least and most effective prefixes by ROUGE-L are both supplied to the decoder. How the date is represented matters alongside where it is supplied.
BART configurations on the content transfer test set by ROUGE-L
The textual decoder prompt leads, with the textual encoder prompt next.
The numbers
| System or setting | ROUGE-L |
|---|---|
| BART without a prompt | 27.55 |
| Textual encoder prompt | 28.40 |
| Linear encoder prompt | 27.99 |
| Textual decoder prompt (this paper) | 28.84 |
| Linear decoder prompt | 27.68 |
The textual decoder prompt also achieves the best METEOR on content transfer, 30.90 against 29.86 for the unprompted system. The textual encoder setting records 30.59, ahead of both linear settings on that metric. The appendix’s test BLEU-4 comparison has the same leading setting. Its score is 11.66, compared with 11.05 without prompting. The textual encoder prompt scores 11.52 and the linear encoder prompt scores 11.27. Together these comparisons establish that the lead is visible with several ways of measuring similarity to the target sentence.
One example concerns a report that MTV renewed Faking It. The context passage already gives the date on which the following season premiered. The continuation is about the earlier renewal. BART without a prompt and the linear encoder version associate the renewal with the premiere date in the surrounding passage. The textual decoder version gives June, 2014, matching the renewal month and year in the reference. The cited article’s timestamp is 2014-06-17. The output gives the timing at the granularity of the reference and stops after reporting the renewal. The reference also mentions that the planned run was later extended, so the example shows a more accurate date alongside incomplete coverage of the full target.
The human evaluation gives this kind of example a broader context. Judges compare each prompted output directly against a paragraph or sentence from unprompted BART, using informativeness for coverage of salient source material and factuality for correctness. For any win or loss, they can indicate that the reason involves a date mention. On content transfer, none of the assessed outputs from the linear prompt wins on factuality because it adds a date or changes one. The textual prompt more often receives credit for better dates on that task. These judgments support the authors’ interpretation of how the textual system improves, beyond the agreement of several aggregate metrics.
XSum shows a qualified textual advantage
On the XSum test set, the textual encoder prompt gives the highest ROUGE-1, at 45.63 compared with 45.23 for unprompted BART. The textual decoder prompt scores 45.59. ROUGE-2 favors the textual decoder condition, while the linear decoder condition falls below the unprompted result. The appendix reports both textual placements at 37.34 on ROUGE-L, against 37.04 without a prompt.
BART configurations on the XSum test set by ROUGE-2
The textual decoder prompt leads, while the linear decoder prompt scores below the baseline.
The numbers
| System or setting | ROUGE-2 |
|---|---|
| BART without a prompt | 22.11 |
| Textual encoder prompt | 22.38 |
| Linear encoder prompt | 22.22 |
| Textual decoder prompt (this paper) | 22.45 |
| Linear decoder prompt | 21.91 |
The QuestEval results are closer together. The textual and linear encoder settings both score 47.76 on the XSum test set, compared with 47.73 without prompting. The textual decoder setting scores 47.70. The strongest XSum claim therefore concerns reference overlap. The question-based measure of overall faithfulness provides little separation between the stronger settings, and the human evaluation in the paper covers the other two datasets. The qualitative XSum examples and the perturbation experiment supply the more direct evidence about particular date statements in news summaries.
One example summarizes reporting on News Corp’s losses. The unprompted system and the linear-prompt version place the losses in the opening months of the year. The textual version, with the article’s original publication date of 2017-02-09, describes a period ending in December. The paper uses this case to illustrate what becomes possible with an explicit association between the publication date and the period being discussed. The perturbation experiment revisits the same story, showing how readily that interpretation changes when the date supplied to the textual prompt changes.
What carries over to T5
The supplementary T5-base experiment provides a check on whether the main patterns require BART. On TempWikiBio Test-Future, the linear encoder prompt performs slightly better than the other conditions on each reported metric. BLEU-4 is 25.25 with that prompt and 25.24 without a prompt. On Test-Same Time, the textual encoder prompt leads the tested configurations. Its BLEU-4 is 24.38 against 24.33 for unprompted T5. The size of the differences matters. The future result points in the same direction as BART, with very little separation between prompted and unprompted T5 by that measure.
Content transfer gives a clearer preference for the textual prompt. On the test set, ROUGE-L is 23.17 with the textual encoder prompt, 22.71 without a prompt, and 22.68 with the linear encoder prompt. The textual prompt also leads in BLEU-4, METEOR, and BERTScore, and the paper marks each of its gains over the baseline as significant. The authors suggest that T5’s use of natural-language prefixes in pretraining could make it more receptive to a textual prefix. They report no T5 experiment on XSum, so the supplementary comparison reaches one structured task and one prose task. T5 provides the alternative pretrained system.
What the ablations show
Wording and placement explain different parts of the result
The textual-template pilot holds placement fixed on the encoder and changes the wording on the XSum development set. The chosen formulation gives ROUGE-1 of 45.71 and ROUGE-L of 37.49. The short date label gives 45.70 and 37.47 on those measures, respectively. On ROUGE-2 the short label actually leads, with 22.57 compared with 22.55 for the selected formulation. The longer version gives 45.61 on ROUGE-1, 22.54 on ROUGE-2, and 37.32 on ROUGE-L. The authors pick the version that leads on average across the reported ROUGE measures. The pilot gives little reason to assign the later behavior to the particular wording of the winning template. Closely related ways of presenting the date performed similarly in this development comparison.
The main comparisons address placement alongside representation. On biography generation, the linear encoder configuration tends to outperform the linear decoder configuration, and the two placements can give different outcomes with the textual prefix as well. On content transfer, both textual placements work, with the decoder setting ahead on the headline reference-overlap measures. On XSum, the textual placements exchange the lead across measures. The results constrain any account in which an encoder prefix always makes the date easier to use or a decoder prefix always makes it easier to write. The preferred placement is specific to the form of the prefix, the task, and the measure used to compare outputs.
The controlled settings also help explain what the authors mean by compatibility between the modality of the prompt and that of the source. The systems that read a news story or a passage plus a news story generally respond well to a date expressed in prose. The biography system more consistently benefits from linear vectors presented alongside its field-based source. This is an interpretation of the comparison across tasks. The authors have changed both the type of input and the kind of output being requested in moving from biographies to news. The experiment does not recast the same source as structured fields and prose to isolate compatibility itself.
Human judgments distinguish the choice of facts from the choice of dates
The human evaluation addresses a question that the aggregate scores cannot answer directly. The authors take 80 sets of paragraphs from the future biography test and 80 sets of sentences from the content transfer test. Each set includes output from the baseline and from the two time-aware systems being judged. Three fluent English speakers participate. They are shown which output is the baseline, and the other outputs are presented in random order. In the study materials, a biography output is accompanied by the infobox and the reference. For content transfer, the judges also see the contextual passage and the cited news article.
For each comparison the judges can report that the prompted system wins, ties, or loses relative to the baseline. They give separate judgments for informativeness and factuality. This separation matters because an output can mention a further relevant event and still introduce an inaccurate claim about it. The instructions allow a date-related judgment when a change in a date explains the win or loss. As an example of the distinction, adding a supported death date can make a biographical lead more informative, while removing a separate unsupported career claim can improve factuality for a reason unrelated to the date.
The paper reports Krippendorff’s α of 0.85 for informativeness and 0.64 for factuality. This statistic describes agreement among judges. The lower agreement on factuality gives context for interpreting it, especially when a generated sentence combines something supported by the source with a detail that requires closer checking. The comparison measures which of two outputs the judges prefer on each dimension. The date tag records why a particular change matters to them, rather than assigning every date in each sentence a separate correctness judgment.
On the future biographies, both kinds of prompt can win against the baseline in informativeness and factuality. The gains from the linear version are relatively seldom attributed to date changes. Some examples show how this is possible. In the example about the footballer Jan Hellström, the prompted paragraph retains the same broad biographical identification and adds his playing position, striker. The fact comes from the infobox, and the linear-prompt paragraph makes room for it without requiring a new assertion about time. In another example, about Robert A. King, the linear version covers the coaching role, the 1890 season, and the record reported in the infobox. The unprompted and textual versions include additional assertions and a trailing fragment. This comparison illustrates the joint effects of selecting useful fields and avoiding unsupported elaboration.
A different biography example shows that the distinction is a tendency. The profile of J. Melville Broughton Jr. includes dates connected with his career. The linear-prompt output mentions his Senate service and relates it to the end of his life. This adds a relevant dated fact. The fact was present in the structured source, so the example is consistent with the idea that a prompt can change which input facts are selected. It does not isolate a process that reads the date of the Wikipedia revision and uses it to reason about the date of his service.
On content transfer, the human judgments put more weight on changes of date for the textual condition. The example about Robin Roberts and Omarosa Manigault Newman shows the type of change at issue. An output from the textual condition situates Roberts’s use of the phrase under discussion in December 2017, whereas the comparable linear version gives January 2017. The cited article’s date is 2017-12-15, and the reference dates the event to December 14, 2017. The prompt helps the textual system place the event in the right month, while the reference is more precise. The example is evidence about the relevant level of temporal grounding, rather than about whether every detail in the continuation has been verified.
Perturbation tests what happens when the date changes
The perturbation analysis keeps the input text or infobox fixed and changes the date given to an already trained system. The authors choose 2000 test examples at random from each dataset. They supply shifted versions of the timestamps and generate outputs again. These shifts cover changes on scales from days to years. An edit distance measures how much the resulting string differs from the string produced with the original timestamp. The authors also examine changes in automatic quality scores. The first comparison asks how much the system responds, and the second asks how the changed output compares with the original human reference.
This pairing matters because a system can change its output for many reasons. It might add an unrelated detail, alter the wording of a phrase, remove information, or change a date. Large edit distances can arise from any of these behaviors. Conversely, replacing a single month’s name can have a small effect on string distance and a large effect on the truth of a sentence. The authors combine the aggregate perturbation curves with inspection of examples so they can see whether altered dates are among the things the shifts cause.
The textual systems’ outputs generally change more than the linear systems’ outputs when the timestamp is perturbed. The authors inspect changes from the linear setting and find that the altered content is frequently unrelated to the time information. That observation fits the judgments on original timestamps. The linear prefix is capable of improving a paragraph, and the system using it can still be relatively insensitive to changes in the date. The paper connects this modest sensitivity to the favorable performance of linear prompts on later biographies. A system whose generated content varies little with the time input may also change less when exposed to unfamiliar values of that input.
The content transfer ROUGE-L curves show a stronger dependence on the supplied date than the corresponding biography analysis suggests. This fits a structural difference between the tasks. On content transfer, the continuation frequently needs to relate a claim in a cited story to the time of publication. Changing the article’s time anchor can therefore change a part of the answer that matters to the reference. On a biography, the date of the revision can move while the birth, career, or death dates in the infobox stay fixed. Many good leads should preserve those event dates. The perturbation measures both prompt sensitivity and the opportunity the task gives that sensitivity to affect useful content.
The XSum appendix reports a pattern at a finer temporal scale. Supplying dates 6 months earlier or later produces larger drops in ROUGE-2 than moving the date back or forward by a year. The authors interpret this as evidence that month and day relations matter for that dataset. For a prompt that supplies a date as text, moving to another part of the calendar can affect how a reporting period is described. The result concerns aggregate output changes under those shifts. It does not tell which month or day relations were resolved correctly in every original summary.
Responsive outputs can still violate event constraints
In the News Corp example, changing the prompt date from 2017-02-09 to 2017-08-09 causes the textual system to describe the second quarter. Changing it instead to 2017-03-09 causes the system to describe the first three months of the year. The article’s words stay the same across these interventions. The authors call attention to the fact that the latter date falls within the period the output treats as reportable. Resolving the prompt and source together requires some understanding of when results for a completed period can be reported. A system can respond to the changed month without having learned that constraint.
The example about England’s European football qualifiers makes a related point. With the original article date of 2016-04-05, the textual output identifies Euro 2017. When the supplied date becomes 2020-04-05, the generated summary names Euro 2020. The paper explains that the women’s competition follows a recurring schedule that makes that inferred edition incorrect. The output is responsive to the year in the prompt, but it can choose an event year incompatible with the schedule. This behavior separates learning to associate a source date with a generated date from learning the facts needed to make the association valid.
A further XSum example shows why the reference cannot always settle date correctness. In the story about Dolly the sheep, the unprompted output gives 1997 as her birth year. The prompted versions describe the story as appearing 20 years after her birth. The paper gives the actual birth date as July 5, 1996. The reference lead emphasizes the scientific importance of her birth without giving that birth date. A useful date-related distinction between the outputs can thus be visible on inspection while the reference gives little direct credit for expressing it correctly.
Together the analyses show why the paper considers sensitivity, content quality, and temporal factuality separately. The original-date comparison asks whether the output improves with time metadata in place. The human judgments address what changed relative to the baseline. Perturbation establishes that the output can respond to the metadata when the source is held fixed. The examples then show whether the direction of particular changes is consistent with the source and with what is known about the event. The textual and linear prompts look different because these comparisons measure different aspects of the same generation behavior.
Limitations
Limits the authors identify
The authors identify world knowledge as a limit on the gains from textual prompting. Document dates can be relevant, and a generator can learn a connection between those dates and the times it mentions. Some connections require additional facts or rules. A story about a scheduled tournament calls for knowledge of the timetable. A story about earnings calls for some understanding of how reports relate to the accounting period they cover. The perturbation examples show that a shift in the supplied date can produce a plausible-sounding statement outside those constraints. The paper leaves methods for incorporating the additional knowledge unexplored.
Measurement is another stated limit. The authors use human comparisons to assess temporal information in samples from the future biography test and content transfer. They give the scale as 160 outputs from each prompted system and 320 in total across the two systems. These judgments give the study direct evidence of date-related changes, but they cover a much smaller body of generation than the automatic metrics do. They also provide relative comparisons against the baseline. The authors want an automatic measure that can verify whether temporal statements in a generated output are correct across a larger evaluation.
The paper describes an attempted approach to such a measure. An event extraction system would identify what happened, and a temporal-expression system would locate the dates or other time expressions. A metric could then use those pieces to examine whether an output puts the depicted event at the right time. The authors report that the extraction performance they obtained was insufficient. The difficulty is illustrated by the experiment itself. Recognizing a month in a sentence leaves the metric with the separate job of deciding which event it dates. A useful verification measure would also have to cope with relative expressions and with differences in precision between the source and the output.
Access to reliable metadata is a further limit. The paper points out that an automatic web archive can help only where there is a suitable web source, and that less frequently archived outlets may be harder to date. The content transfer procedure uses the date when a source was first archived, a proxy whose quality depends on when an archive captured it. The authors also flag a related problem for material first issued on paper and digitized later. A timestamp attached during digitization may give a misleading anchor for the way the original text refers to time. Their ethical discussion connects inaccurate metadata to a concrete consequence. A fact generated under the wrong date can be accepted and repeated by readers.
Limits apparent from the experimental design
The split design supports a specific reading of extrapolation. The future biography test contains later revisions and holds the people out of the task’s training and development data. This makes it a meaningful test of generation for new subjects in a later period under the supplied input conditions. The infobox still gives the generator facts about each subject, including many facts with event dates. The design cannot establish that a system knows newly occurring events without seeing evidence about them. It also cannot establish which knowledge was already present from broad pretraining. The subject separation concerns the task data used for fine-tuning and evaluation.
The later-period comparison changes several things together. The system receives profiles of different people, revisions made in a different period, and a different set of reference leads. A gap between test scores can therefore reflect properties of the examples or the editing recorded in those versions as well as the treatment of timestamps. The date perturbation experiment isolates a change to the metadata in a way the chronological split cannot. Its resulting inputs can be internally inconsistent, because the unchanged document was written in a different context from the shifted date. A large score drop in that experiment shows that the intervention affects the output’s agreement with the original reference. It cannot by itself verify what the article would have said had it really been published at the shifted time.
The linear system’s robustness has an associated ambiguity. A low response to changed timestamps is compatible with useful processing of the structured profile, and the human judgments show improvements of that sort. To attribute those gains specifically to the correct date value would require a comparison that preserves the presence and format of the prefix while disrupting which dates are paired with documents during training. The paper’s perturbations change dates at test time. That answers a different question about an already fine-tuned generator. The data therefore support improved generation with a linear prefix and weaker evidence that its numerical date is doing substantial temporal work.
The representation comparison also leaves some questions about the level of date detail. All of the main date prompts carry the year, month, and day. The textual pilot varies sentence form while keeping the calendar information available. The perturbation study can expose sensitivity at different time scales, but removing a component at training and test time would be a different experiment. It would answer whether a system needs that component to obtain the observed gains, or can reach similar scores using the rest of the calendar information and the document. The paper’s evidence supports the use of fine-grained timestamps as a design, with the strongest task-specific clues about importance coming from the types of shifts the authors examine.
There is also a distinction between significance under a given run and repeatability across training runs. The reported approximate randomization tests compare outputs from the trained systems. The implementation uses one run per configuration. Small gaps between prompt settings could be affected by variation from a different random seed, and this study does not estimate that variation. The broader patterns across datasets, metrics, and the alternative backbone offer more context for judging the result than a narrow lead in a single score. The T5 results also make clear that the size of an improvement with a linear prefix can depend on the pretrained system.
Finally, the strength of the factuality evidence varies by task. The biography and content transfer comparisons include direct human judgments, with a separate date-related designation. XSum supplies reference scores, QuestEval, examples, and responses to timestamp perturbations. Those are informative about news summarization, but the XSum experiments do not provide the same sample-based human estimate of date-related wins. An increase in ROUGE and even sensitivity to the right kind of calendar shift cannot be read as a rate of correct temporal reasoning.
What came after
An Overview Of Temporal Commonsense Reasoning and Acquisition cites Cao and Wang in a work whose stated subject is how temporal commonsense is acquired and used in reasoning. The connection is visible in the distinction the prompting experiments draw between having a time anchor and knowing how to use it. A source timestamp can resolve some ambiguity in a document, while schedules and conventions about the order of events can still be necessary to generate a valid statement. The later work is an overview. Its citation establishes a connection to that broader research topic, with no documented replication or extension of the prompt experiments.
LegalLens cites the paper from work on identifying legal violations in unstructured text. Its named task is identification, while Cao and Wang study generation from sources that can be paired with dates. The citation documents attention to the paper from a different application. It does not establish that LegalLens used document timestamps, tested either kind of prefix, or evaluated date-related errors with Cao and Wang’s procedure.
Dynamic Model Switching to Mitigate Outdated Knowledge in Large Language Models cites the paper in work on responding to outdated knowledge through dynamic switching. The shared question is how a system should handle information whose relevance or truth depends on time. Cao and Wang change the input of a fine-tuned generator by supplying a document date. The later title identifies switching as the intervention it studies. The citation establishes that relationship in topic, while leaving the role of the earlier prompting method in the later system unspecified.
Cite
Cite as Shuyang Cao and Lu Wang. 2022. Time-aware Prompting for Text Generation. Findings of the Association for Computational Linguistics: EMNLP 2022.
@inproceedings{cao2022time,
title = {{Time-aware Prompting for Text Generation}},
author = {Shuyang Cao and Lu Wang},
booktitle = {Findings of the Association for Computational Linguistics: EMNLP 2022},
year = {2022},
doi = {10.18653/v1/2022.findings-emnlp.535},
url = {https://doi.org/10.18653/v1/2022.findings-emnlp.535}
}This page in Markdown https://md.research.elamur.ai/free/en/papers/cao-2022-time-aware-prompting-text-generation/