{"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-tree-based-neural-sentence-modeling","title":"On Tree-Based Neural Sentence Modeling","arxiv_id":"1808.09644","date":"2018-08-29","proceeding":"EMNLP 2018 10","authors":["Haoyue Shi","Hao Zhou","Jiaze Chen","Lei LI"],"abstract":"Neural networks with tree-based sentence encoders have shown better results\non many downstream tasks. Most of existing tree-based encoders adopt syntactic\nparsing trees as the explicit structure prior. To study the effectiveness of\ndifferent tree structures, we replace the parsing trees with trivial trees\n(i.e., binary balanced tree, left-branching tree and right-branching tree) in\nthe encoders. Though trivial trees contain no syntactic information, those\nencoders get competitive or even better results on all of the ten downstream\ntasks we investigated. This surprising result indicates that explicit syntax\nguidance may not be the main contributor to the superior performances of\ntree-based neural sentence modeling. Further analysis show that tree modeling\ngives better results when crucial words are closer to the final representation.\nAdditional experiments give more clues on how to design an effective tree-based\nencoder. Our code is open-source and available at\nhttps://github.com/ExplorerFreda/TreeEnc.","url_abs":"http://arxiv.org/abs/1808.09644v1","url_pdf":"http://arxiv.org/pdf/1808.09644v1.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-tree-based-neural-sentence-modeling","repo_url":"https://github.com/ExplorerFreda/TreeEnc","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"sentence","task_name":"Sentence"},{"task_slug":"sentiment-analysis","task_name":"Sentiment Analysis"},{"task_slug":"text-classification","task_name":"Text Classification"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/sentiment-analysis-on-amazon-review-full","task":"Sentiment Analysis","dataset":"Amazon Review Full","model":"Gumbel+bi-leaf-RNN","rank_in_archive_order":9,"of":9,"metrics":{"Accuracy":"49.7"},"uses_additional_data":false},{"leaderboard":"/sota/sentiment-analysis-on-amazon-review-polarity","task":"Sentiment Analysis","dataset":"Amazon Review Polarity","model":"Gumbel+bi-leaf-RNN","rank_in_archive_order":9,"of":9,"metrics":{"Accuracy":"88.1"},"uses_additional_data":false},{"leaderboard":"/sota/text-classification-on-ag-news","task":"Text Classification","dataset":"AG News","model":"Balanced+bi-leaf-RNN","rank_in_archive_order":16,"of":24,"metrics":{"Error":"7.9"},"uses_additional_data":false},{"leaderboard":"/sota/text-classification-on-dbpedia","task":"Text Classification","dataset":"DBpedia","model":"Balanced+bi-leaf-RNN","rank_in_archive_order":15,"of":21,"metrics":{"Error":"1.2"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=1808.09644","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1808.09644"}},"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/ExplorerFreda/TreeEnc","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":"294b6bf4f0eed877","entry":"affine_nd","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/basic.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/basic.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":"294b6bf4f0eed877"}},{"code_sha256_prefix":"34ea2dd604f6413f","entry":"apply_nd","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/basic.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/basic.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":"34ea2dd604f6413f"}},{"code_sha256_prefix":"678e6d5f0dc54710","entry":"bleu","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/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":"678e6d5f0dc54710"}},{"code_sha256_prefix":"e871765a9a867a13","entry":"dot_nd","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/basic.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/basic.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":"e871765a9a867a13"}},{"code_sha256_prefix":"7661f48ffa99520c","entry":"unwrap_scalar_variable","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/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":"7661f48ffa99520c"}},{"code_sha256_prefix":"e7550697a78e5299","entry":"wrap_with_variable","repo":"ExplorerFreda/TreeEnc","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/ExplorerFreda/TreeEnc/blob/HEAD/src/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":"e7550697a78e5299"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}