{"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/the-dynamic-embedded-topic-model","title":"The Dynamic Embedded Topic Model","arxiv_id":"1907.05545","date":"2019-07-12","proceeding":null,"authors":["Adji B. Dieng","Francisco J. R. Ruiz","David M. Blei"],"abstract":"Topic modeling analyzes documents to learn meaningful patterns of words. For documents collected in sequence, dynamic topic models capture how these patterns vary over time. We develop the dynamic embedded topic model (D-ETM), a generative model of documents that combines dynamic latent Dirichlet allocation (D-LDA) and word embeddings. The D-ETM models each word with a categorical distribution parameterized by the inner product between the word embedding and a per-time-step embedding representation of its assigned topic. The D-ETM learns smooth topic trajectories by defining a random walk prior over the embedding representations of the topics. We fit the D-ETM using structured amortized variational inference with a recurrent neural network. On three different corpora---a collection of United Nations debates, a set of ACL abstracts, and a dataset of Science Magazine articles---we found that the D-ETM outperforms D-LDA on a document completion task. We further found that the D-ETM learns more diverse and coherent topics than D-LDA while requiring significantly less time to fit.","url_abs":"https://arxiv.org/abs/1907.05545v2","url_pdf":"https://arxiv.org/pdf/1907.05545v2.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":"the-dynamic-embedded-topic-model","repo_url":"https://github.com/adjidieng/DETM","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"articles","task_name":"Articles"},{"task_slug":"topic-models","task_name":"Topic Models"},{"task_slug":"variational-inference","task_name":"Variational Inference"},{"task_slug":"word-embeddings","task_name":"Word Embeddings"},{"task_slug":"model","task_name":"model"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1907.05545","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1907.05545"}},"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/adjidieng/DETM","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"unverified":6},"by_repo_kind":{"official":{"samples":6,"ran":0,"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":0,"samples":[{"code_sha256_prefix":"d1863ef9eb725187","entry":"get_batch","repo":"adjidieng/DETM","repo_kind":"official","path":"data.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d1863ef9eb725187"}},{"code_sha256_prefix":"6afee90839f98e6f","entry":"get_data","repo":"adjidieng/DETM","repo_kind":"official","path":"data.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6afee90839f98e6f"}},{"code_sha256_prefix":"bf0882a49ad15968","entry":"get_document_frequency","repo":"adjidieng/DETM","repo_kind":"official","path":"utils.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"bf0882a49ad15968"}},{"code_sha256_prefix":"6ba841db0c681c1e","entry":"get_rnn_input","repo":"adjidieng/DETM","repo_kind":"official","path":"data.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/data.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6ba841db0c681c1e"}},{"code_sha256_prefix":"35d03c1f837283ae","entry":"get_topic_coherence","repo":"adjidieng/DETM","repo_kind":"official","path":"utils.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35d03c1f837283ae"}},{"code_sha256_prefix":"9c2bb7c80d3605e9","entry":"log_gaussian","repo":"adjidieng/DETM","repo_kind":"official","path":"utils.py","file_url":"https://github.com/adjidieng/DETM/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9c2bb7c80d3605e9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}