{"id":13564242,"url":"https://github.com/adjidieng/DETM","last_synced_at":"2025-04-03T21:30:33.347Z","repository":{"id":41513612,"uuid":"210378070","full_name":"adjidieng/DETM","owner":"adjidieng","description":null,"archived":false,"fork":false,"pushed_at":"2021-02-02T23:47:33.000Z","size":240,"stargazers_count":131,"open_issues_count":13,"forks_count":39,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-11-04T17:47:15.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adjidieng.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-23T14:36:06.000Z","updated_at":"2024-10-12T03:19:47.000Z","dependencies_parsed_at":"2022-09-11T14:12:17.071Z","dependency_job_id":null,"html_url":"https://github.com/adjidieng/DETM","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjidieng%2FDETM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjidieng%2FDETM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjidieng%2FDETM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adjidieng%2FDETM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adjidieng","download_url":"https://codeload.github.com/adjidieng/DETM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247082848,"owners_count":20880729,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T13:01:28.511Z","updated_at":"2025-04-03T21:30:32.862Z","avatar_url":"https://github.com/adjidieng.png","language":"Python","funding_links":[],"categories":["Python","Models"],"sub_categories":["Embedding based Topic Models"],"readme":"# DETM\n\nThis is code that accompanies the paper titled \"The Dynamic Embedded Topic Model\" by Adji B. Dieng, Francisco J. R. Ruiz, and David M. Blei. (Arxiv link: https://arxiv.org/abs/1907.05545).\n\nThe DETM is an extension of the Embedded Topic Model (https://arxiv.org/abs/1907.04907) to corpora with temporal dependencies. The DETM models each word with a categorical distribution whose parameter is given by the inner product between the word embedding and an embedding representation of its assigned topic at a particular time step. The word embeddings allow the DETM to generalize to rare words. The DETM learns smooth topic trajectories by defining a random walk prior over the embeddings of the topics. The DETM is fit using structured amortized variational inference with LSTMs.\n\n## Dependencies\n\n+ python 3.6.7\n+ pytorch 1.1.0\n\n## Datasets\n\nThe pre-processed UN and ACL datasets can be found below:\n\n+ https://bitbucket.org/franrruiz/data_acl_largev/src/master/\n+ https://bitbucket.org/franrruiz/data_undebates_largev/src/master/\n\nThe pre-fitted embeddings can be found below:\n\n+ https://bitbucket.org/diengadji/embeddings/src\n\nAll the scripts to pre-process a dataset can be found in the folder 'scripts'. \n\n## Example\n\nTo run the DETM on the ACL dataset you can run the command below. You can specify different values for other arguments, peek at the arguments list in main.py.\n\n```\npython main.py --dataset acl --data_path PATH_TO_DATA --emb_path PATH_TO_EMBEDDINGS --min_df 10 --num_topics 50 --lr 0.0001 --epochs 1000 --mode train\n```\n\n\n## Citation\n```\n@article{dieng2019dynamic,\n  title={The Dynamic Embedded Topic Model},\n  author={Dieng, Adji B and Ruiz, Francisco JR and Blei, David M},\n  journal={arXiv preprint arXiv:1907.05545},\n  year={2019}\n}\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjidieng%2FDETM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadjidieng%2FDETM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadjidieng%2FDETM/lists"}