{"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/differentiable-tree-operations-promote","title":"Differentiable Tree Operations Promote Compositional Generalization","arxiv_id":"2306.00751","date":"2023-06-01","proceeding":null,"authors":["Paul Soulos","Edward Hu","Kate McCurdy","Yunmo Chen","Roland Fernandez","Paul Smolensky","Jianfeng Gao"],"abstract":"In the context of structure-to-structure transformation tasks, learning sequences of discrete symbolic operations poses significant challenges due to their non-differentiability. To facilitate the learning of these symbolic sequences, we introduce a differentiable tree interpreter that compiles high-level symbolic tree operations into subsymbolic matrix operations on tensors. We present a novel Differentiable Tree Machine (DTM) architecture that integrates our interpreter with an external memory and an agent that learns to sequentially select tree operations to execute the target transformation in an end-to-end manner. With respect to out-of-distribution compositional generalization on synthetic semantic parsing and language generation tasks, DTM achieves 100% while existing baselines such as Transformer, Tree Transformer, LSTM, and Tree2Tree LSTM achieve less than 30%. DTM remains highly interpretable in addition to its perfect performance.","url_abs":"https://arxiv.org/abs/2306.00751v1","url_pdf":"https://arxiv.org/pdf/2306.00751v1.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":"differentiable-tree-operations-promote","repo_url":"https://github.com/psoulos/dtm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"semantic-parsing","task_name":"Semantic Parsing"},{"task_slug":"text-generation","task_name":"Text Generation"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"lstm","method_name":"LSTM"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"sigmoid-activation","method_name":"Sigmoid Activation"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"tanh-activation","method_name":"Tanh Activation"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2306.00751","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2306.00751"}},"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/psoulos/dtm","reach":null}],"summary":{"ran":7,"ran_honours":2,"unverified":3},"by_repo_kind":{"official":{"samples":12,"ran":9,"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":12,"samples":[{"code_sha256_prefix":"b039209b1a8c2660","entry":"BBCarNet","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"b039209b1a8c2660"}},{"code_sha256_prefix":"192489c8e8692d8c","entry":"BBCdrNet","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"192489c8e8692d8c"}},{"code_sha256_prefix":"6802f02f924f6e3d","entry":"BatchSymbols2NodeTree","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6802f02f924f6e3d"}},{"code_sha256_prefix":"ca2959fd9246da35","entry":"DecodedTPR2Tree","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ca2959fd9246da35"}},{"code_sha256_prefix":"0232450cafc5f959","entry":"DiffTreeInterpreter","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"0232450cafc5f959"}},{"code_sha256_prefix":"ce1e9f964230cdd0","entry":"NeuralTreeAgent","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ce1e9f964230cdd0"}},{"code_sha256_prefix":"bfa49f4a9a85f695","entry":"Symbols2NodeTree","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bfa49f4a9a85f695"}},{"code_sha256_prefix":"af44f10e55a1575e","entry":"build_D","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af44f10e55a1575e"}},{"code_sha256_prefix":"9313a09d01bb2e66","entry":"build_E","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9313a09d01bb2e66"}},{"code_sha256_prefix":"17da5f7cb0498a5f","entry":"BBConsNet","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.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":"17da5f7cb0498a5f"}},{"code_sha256_prefix":"214862c7f14c8f4d","entry":"DiffTreeMachine","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.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":"214862c7f14c8f4d"}},{"code_sha256_prefix":"332cd0fb6cfc0dab","entry":"Node","repo":"psoulos/dtm","repo_kind":"official","path":"models.py","file_url":"https://github.com/psoulos/dtm/blob/HEAD/models.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":"332cd0fb6cfc0dab"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}