{"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/on-the-affinity-rationality-and-diversity-of","title":"On the Affinity, Rationality, and Diversity of Hierarchical Topic Modeling","arxiv_id":"2401.14113","date":"2024-01-25","proceeding":null,"authors":["Xiaobao Wu","Fengjun Pan","Thong Nguyen","Yichao Feng","Chaoqun Liu","Cong-Duy Nguyen","Anh Tuan Luu"],"abstract":"Hierarchical topic modeling aims to discover latent topics from a corpus and organize them into a hierarchy to understand documents with desirable semantic granularity. However, existing work struggles with producing topic hierarchies of low affinity, rationality, and diversity, which hampers document understanding. To overcome these challenges, we in this paper propose Transport Plan and Context-aware Hierarchical Topic Model (TraCo). Instead of early simple topic dependencies, we propose a transport plan dependency method. It constrains dependencies to ensure their sparsity and balance, and also regularizes topic hierarchy building with them. This improves affinity and diversity of hierarchies. We further propose a context-aware disentangled decoder. Rather than previously entangled decoding, it distributes different semantic granularity to topics at different levels by disentangled decoding. This facilitates the rationality of hierarchies. Experiments on benchmark datasets demonstrate that our method surpasses state-of-the-art baselines, effectively improving the affinity, rationality, and diversity of hierarchical topic modeling with better performance on downstream tasks.","url_abs":"https://arxiv.org/abs/2401.14113v2","url_pdf":"https://arxiv.org/pdf/2401.14113v2.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":"on-the-affinity-rationality-and-diversity-of","repo_url":"https://github.com/bobxwu/traco","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"on-the-affinity-rationality-and-diversity-of","repo_url":"https://github.com/bobxwu/topmost","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"diversity","task_name":"Diversity"},{"task_slug":"document-understanding","task_name":"document understanding"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.14113","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.14113"}},"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/bobxwu/topmost","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bobxwu/traco","reach":null}],"summary":{"ran":5,"ran_draft_wrong":1,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":6,"ran":4,"repositories":1},"listed":{"samples":4,"ran":3,"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":6,"samples":[{"code_sha256_prefix":"9e70565457da2ef9","entry":"CDDecoder","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9e70565457da2ef9"}},{"code_sha256_prefix":"716e6ea5aa2e5043","entry":"CDDecoder","repo":"bobxwu/topmost","repo_kind":"listed","path":"topmost/models/hierarchical/TraCo/TraCo.py","file_url":"https://github.com/bobxwu/topmost/blob/HEAD/topmost/models/hierarchical/TraCo/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"716e6ea5aa2e5043"}},{"code_sha256_prefix":"d3a87665bc06777c","entry":"Encoder","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d3a87665bc06777c"}},{"code_sha256_prefix":"c72f23962bed8ecd","entry":"MLPEncoder","repo":"bobxwu/topmost","repo_kind":"listed","path":"topmost/models/hierarchical/TraCo/TraCo.py","file_url":"https://github.com/bobxwu/topmost/blob/HEAD/topmost/models/hierarchical/TraCo/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c72f23962bed8ecd"}},{"code_sha256_prefix":"e5cdd9b2e3fb9ab5","entry":"TPD","repo":"bobxwu/topmost","repo_kind":"listed","path":"topmost/models/hierarchical/TraCo/TraCo.py","file_url":"https://github.com/bobxwu/topmost/blob/HEAD/topmost/models/hierarchical/TraCo/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e5cdd9b2e3fb9ab5"}},{"code_sha256_prefix":"e0c605268af07ab4","entry":"get_topk_tensor","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e0c605268af07ab4"}},{"code_sha256_prefix":"c242951c54b4aa3e","entry":"pairwise_euclidean_distance","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"c242951c54b4aa3e"}},{"code_sha256_prefix":"55495a17a86bbfb4","entry":"TPD","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.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":"55495a17a86bbfb4"}},{"code_sha256_prefix":"ac0b74f7db21b2fb","entry":"TraCo","repo":"bobxwu/traco","repo_kind":"official","path":"TraCo/models/TraCo.py","file_url":"https://github.com/bobxwu/traco/blob/HEAD/TraCo/models/TraCo.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":"ac0b74f7db21b2fb"}},{"code_sha256_prefix":"ccd803d7ff830522","entry":"TraCo","repo":"bobxwu/topmost","repo_kind":"listed","path":"topmost/models/hierarchical/TraCo/TraCo.py","file_url":"https://github.com/bobxwu/topmost/blob/HEAD/topmost/models/hierarchical/TraCo/TraCo.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"ccd803d7ff830522"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}