{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/go-back-in-time-generating-flashbacks-in","title":"Go Back in Time: Generating Flashbacks in Stories with Event Temporal Prompts","arxiv_id":"2205.01898","date":"2022-05-04","proceeding":"NAACL 2022 7","authors":["Rujun Han","Hong Chen","Yufei Tian","Nanyun Peng"],"abstract":"Stories or narratives are comprised of a sequence of events. To compose interesting stories, professional writers often leverage a creative writing technique called flashback that inserts past events into current storylines as we commonly observe in novels and plays. However, it is challenging for machines to generate flashback as it requires a solid understanding of event temporal order (e.g. \"feeling hungry\" before \"eat,\" not vice versa), and the creativity to arrange storylines so that earlier events do not always appear first in narrative order. Two major issues in existing systems that exacerbate the challenges: 1) temporal bias in pertaining and story datasets that leads to monotonic event temporal orders; 2) lack of explicit guidance that helps machines decide where to insert flashbacks. We propose to address these issues using structured storylines to encode events and their pair-wise temporal relations (before, after and vague) as temporal prompts that guide how stories should unfold temporally. We leverage a Plan-and-Write framework enhanced by reinforcement learning to generate storylines and stories end-to-end. Evaluation results show that the proposed method can generate more interesting stories with flashbacks while maintaining textual diversity, fluency, and temporal coherence.","url_abs":"https://arxiv.org/abs/2205.01898v1","url_pdf":"https://arxiv.org/pdf/2205.01898v1.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"go-back-in-time-generating-flashbacks-in","repo_url":"https://github.com/pluslabnlp/flashback_gen","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"diversity","task_name":"Diversity"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2205.01898","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2205.01898"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/pluslabnlp/flashback_gen","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/PlusLabNLP/flashback_gen","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":3,"samples":[{"code_sha256_prefix":"ad1c8b504941d0bd","entry":"cnt","repo":"PlusLabNLP/flashback_gen","repo_kind":"official","path":"code/run_story_generation_pipeline_rl.py","file_url":"https://github.com/PlusLabNLP/flashback_gen/blob/HEAD/code/run_story_generation_pipeline_rl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ad1c8b504941d0bd"}},{"code_sha256_prefix":"8f74136a6faca115","entry":"shift_tokens_right","repo":"PlusLabNLP/flashback_gen","repo_kind":"official","path":"code/run_story_generation_pipeline_rl.py","file_url":"https://github.com/PlusLabNLP/flashback_gen/blob/HEAD/code/run_story_generation_pipeline_rl.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"8f74136a6faca115"}},{"code_sha256_prefix":"e6d898c238ea88fe","entry":"main","repo":"PlusLabNLP/flashback_gen","repo_kind":"official","path":"code/run_story_generation_pipeline_rl.py","file_url":"https://github.com/PlusLabNLP/flashback_gen/blob/HEAD/code/run_story_generation_pipeline_rl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e6d898c238ea88fe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}