{"id":23024994,"url":"https://github.com/sshanu/relation-classification-using-bidirectional-lstm-tree","last_synced_at":"2025-08-14T12:32:27.552Z","repository":{"id":67114506,"uuid":"94929398","full_name":"Sshanu/Relation-Classification-using-Bidirectional-LSTM-Tree","owner":"Sshanu","description":"TensorFlow Implementation of the paper \"End-to-End Relation Extraction using LSTMs on Sequences and Tree Structures\" and \"Classifying Relations via Long Short Term Memory Networks along Shortest Dependency Paths\" for classifying relations","archived":false,"fork":false,"pushed_at":"2019-04-15T08:42:33.000Z","size":17030,"stargazers_count":182,"open_issues_count":7,"forks_count":42,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-01-29T22:59:28.417Z","etag":null,"topics":["bidirectional-lstm","deep-learning","dependency-tree","entities","lca","lstm","lstm-networks","lstm-tree","neural-network","relation-classification","relation-extraction","semeval","tensorflow","tree","tree-structure","word-embedding"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","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/Sshanu.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,"governance":null}},"created_at":"2017-06-20T19:50:58.000Z","updated_at":"2024-01-04T16:15:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ff4ccc9-dc83-466d-beac-3b81539e6c44","html_url":"https://github.com/Sshanu/Relation-Classification-using-Bidirectional-LSTM-Tree","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":"0.013698630136986356","last_synced_commit":"c779d9ae2caab28f55ff66b54ee194c30ad4b2ff"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sshanu%2FRelation-Classification-using-Bidirectional-LSTM-Tree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sshanu%2FRelation-Classification-using-Bidirectional-LSTM-Tree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sshanu%2FRelation-Classification-using-Bidirectional-LSTM-Tree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sshanu%2FRelation-Classification-using-Bidirectional-LSTM-Tree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sshanu","download_url":"https://codeload.github.com/Sshanu/Relation-Classification-using-Bidirectional-LSTM-Tree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":229824788,"owners_count":18129925,"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":["bidirectional-lstm","deep-learning","dependency-tree","entities","lca","lstm","lstm-networks","lstm-tree","neural-network","relation-classification","relation-extraction","semeval","tensorflow","tree","tree-structure","word-embedding"],"created_at":"2024-12-15T13:34:00.401Z","updated_at":"2024-12-15T13:34:00.890Z","avatar_url":"https://github.com/Sshanu.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Relation Classification \n\n[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://opensource.org/licenses/MIT) \n\nRelation classification aims to categorize into predefined classes the relations btw pairs of given entities in texts. There are two ways to represent relations between entities using deep neural networks: recurrent neural networks (RNNs) and convolutional neural networks (CNNs). We have implemented three LSTM-RNN architectures for solving the task of relation classification:\n* [Relation classification using LSTM Networks along Shortest Dependency Paths.](https://github.com/Sshanu/Relation-Classification/tree/master/LCA%20Shortest%20Path)\n* [Relation classification using bidirectional LSTM Networks on LCA Sub Tree.](https://github.com/Sshanu/Relation-Classification/tree/master/LCA%20SubTree)\n* [Relation classification using LSTMS on Sequences and Tree Structures.](https://github.com/Sshanu/Relation-Classification/tree/master/LSTM%20Seq%20and%20Tree)\n\nWe achieve better performance for solving this task using the last approach \"[Relation classification using LSTMS on Sequences and Tree Structures.](https://github.com/Sshanu/Relation-Classification/tree/master/LSTM%20Seq%20and%20Tree)\".\n\n\n### References:\n\n\u003e **End-to-End Relation Extraction using LSTMs on Sequences and Tree Structures**\u003cbr\u003e\n\u003e Makoto Miwa, Mohit Bansal\u003cbr\u003e\n\u003e [http://www.aclweb.org/anthology/P/P16/P16-1105.pdf](http://www.aclweb.org/anthology/P/P16/P16-1105.pdf)\n\u003e \n\u003e **Abstract:** *We present a novel end-to-end neural\nmodel to extract entities and relations between them. Our recurrent neural network based model captures both word sequence and dependency tree substructure\ninformation by stacking bidirectional treestructured LSTM-RNNs on bidirectional\nsequential LSTM-RNNs. This allows our\nmodel to jointly represent both entities and\nrelations with shared parameters in a single model. We further encourage detection of entities during training and use of\nentity information in relation extraction\nvia entity pretraining and scheduled sampling. Our model improves over the stateof-the-art feature-based model on end-toend relation extraction, achieving 12.1%\nand 5.7% relative error reductions in F1-\nscore on ACE2005 and ACE2004, respectively. We also show that our LSTMRNN based model compares favorably to\nthe state-of-the-art CNN based model (in\nF1-score) on nominal relation classification (SemEval-2010 Task 8). Finally, we\npresent an extensive ablation analysis of\nseveral model components*\n\n\u003e **Classifying Relations via Long Short Term Memory Networks along Shortest Dependency Paths**\u003cbr\u003e\n\u003e Yan Xu, Lili Mou, Ge Li, Yunchuan Chen, Hao Peng, Zhi Jin\u003cbr\u003e\n\u003e [http://www.emnlp2015.org/proceedings/EMNLP/pdf/EMNLP206.pdf](http://www.emnlp2015.org/proceedings/EMNLP/pdf/EMNLP206.pdf)\n\u003e \n\u003e **Abstract:** *Relation classification is an important research arena in the field of natural language processing (NLP). In this paper, we\npresent SDP-LSTM, a novel neural network to classify the relation of two entities in a sentence. Our neural architecture\nleverages the shortest dependency path\n(SDP) between two entities; multichannel recurrent neural networks, with long\nshort term memory (LSTM) units, pick\nup heterogeneous information along the\nSDP. Our proposed model has several distinct features: (1) The shortest dependency\npaths retain most relevant information (to\nrelation classification), while eliminating\nirrelevant words in the sentence. (2) The\nmultichannel LSTM networks allow effective information integration from heterogeneous sources over the dependency\npaths. (3) A customized dropout strategy\nregularizes the neural network to alleviate overfitting. We test our model on the\nSemEval 2010 relation classification task,\nand achieve an F1-score of 83.7%, higher\nthan competing methods in the literature.*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshanu%2Frelation-classification-using-bidirectional-lstm-tree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsshanu%2Frelation-classification-using-bidirectional-lstm-tree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsshanu%2Frelation-classification-using-bidirectional-lstm-tree/lists"}