{"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/algorithms-for-weighted-pushdown-automata","title":"Algorithms for Weighted Pushdown Automata","arxiv_id":"2210.06884","date":"2022-10-13","proceeding":null,"authors":["Alexandra Butoi","Brian DuSell","Tim Vieira","Ryan Cotterell","David Chiang"],"abstract":"Weighted pushdown automata (WPDAs) are at the core of many natural language processing tasks, like syntax-based statistical machine translation and transition-based dependency parsing. As most existing dynamic programming algorithms are designed for context-free grammars (CFGs), algorithms for PDAs often resort to a PDA-to-CFG conversion. In this paper, we develop novel algorithms that operate directly on WPDAs. Our algorithms are inspired by Lang's algorithm, but use a more general definition of pushdown automaton and either reduce the space requirements by a factor of $|\\Gamma|$ (the size of the stack alphabet) or reduce the runtime by a factor of more than $|Q|$ (the number of states). When run on the same class of PDAs as Lang's algorithm, our algorithm is both more space-efficient by a factor of $|\\Gamma|$ and more time-efficient by a factor of $|Q| \\cdot |\\Gamma|$.","url_abs":"https://arxiv.org/abs/2210.06884v4","url_pdf":"https://arxiv.org/pdf/2210.06884v4.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":"algorithms-for-weighted-pushdown-automata","repo_url":"https://github.com/rycolab/wpda","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"none","reach":null}],"tasks":[{"task_slug":"dependency-parsing","task_name":"Dependency Parsing"},{"task_slug":"machine-translation","task_name":"Machine Translation"},{"task_slug":"transition-based-dependency-parsing","task_name":"Transition-Based Dependency Parsing"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2210.06884","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2210.06884"}},"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/rycolab/wpda","reach":null}],"summary":{"ran":2,"unverified":2},"by_repo_kind":{"official":{"samples":4,"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":4,"samples":[{"code_sha256_prefix":"71d738bbb1aa4e8b","entry":"Rational","repo":"rycolab/wpda","repo_kind":"official","path":"rayuela/pda/allsum.py","file_url":"https://github.com/rycolab/wpda/blob/HEAD/rayuela/pda/allsum.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":"71d738bbb1aa4e8b"}},{"code_sha256_prefix":"378c747ea2f9e2a7","entry":"Real","repo":"rycolab/wpda","repo_kind":"official","path":"rayuela/pda/allsum.py","file_url":"https://github.com/rycolab/wpda/blob/HEAD/rayuela/pda/allsum.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":"378c747ea2f9e2a7"}},{"code_sha256_prefix":"3ca1e419c740803f","entry":"Allsum","repo":"rycolab/wpda","repo_kind":"official","path":"rayuela/pda/allsum.py","file_url":"https://github.com/rycolab/wpda/blob/HEAD/rayuela/pda/allsum.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":"3ca1e419c740803f"}},{"code_sha256_prefix":"cdf65ec045c33ac3","entry":"Semiring","repo":"rycolab/wpda","repo_kind":"official","path":"rayuela/pda/allsum.py","file_url":"https://github.com/rycolab/wpda/blob/HEAD/rayuela/pda/allsum.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":"cdf65ec045c33ac3"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}