{"id":19321906,"url":"https://github.com/abductivelearning/abl-hed","last_synced_at":"2025-07-05T00:33:39.092Z","repository":{"id":55462420,"uuid":"187691993","full_name":"AbductiveLearning/ABL-HED","owner":"AbductiveLearning","description":"Handwritten Equations Decipherment with Abductive Learning","archived":false,"fork":false,"pushed_at":"2024-01-31T05:41:45.000Z","size":18979,"stargazers_count":98,"open_issues_count":0,"forks_count":21,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-04-02T02:46:28.124Z","etag":null,"topics":["deep-learning","logical-programming","machine-learning","symbolic-ai"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AbductiveLearning.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-05-20T18:18:39.000Z","updated_at":"2025-03-25T10:39:32.000Z","dependencies_parsed_at":"2022-08-15T00:50:43.243Z","dependency_job_id":null,"html_url":"https://github.com/AbductiveLearning/ABL-HED","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABL-HED","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABL-HED/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABL-HED/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AbductiveLearning%2FABL-HED/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AbductiveLearning","download_url":"https://codeload.github.com/AbductiveLearning/ABL-HED/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250308300,"owners_count":21409243,"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":["deep-learning","logical-programming","machine-learning","symbolic-ai"],"created_at":"2024-11-10T01:39:29.936Z","updated_at":"2025-04-22T19:31:09.384Z","avatar_url":"https://github.com/AbductiveLearning.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"🌟 **New!** [ABLkit](https://github.com/AbductiveLearning/ABLkit) released: A toolkit for Abductive Learning with high flexibility, user-friendly interface, and optimized performance. Welcome to try it out!🚀\n\nUpdate: This repository is NO longer actively developed. It has been (mostly) superseded by [ABLkit](https://github.com/AbductiveLearning/ABLkit). The code for ABL-HED with ABLkit is in this [link](https://github.com/AbductiveLearning/ABLkit/tree/main/examples/hed). For the latest advancements and updates, we encourage you to visit the new repository.\n\n# Abductive Learning for Handwritten Equation Decipherment\n\nThis is the code repository of the abductive learning framework for handwritten\nequation decipherment experiments in _Bridging Machine Learning and Logical\nReasoning by Abductive Learning_ in NeurIPS 2019.\n\n## Environment dependency\n\n**This code is only tested in Linux environment.**\n\n1. Swi-Prolog\n2. Python3 with Numpy, Tensorflow and Keras\n3. ZOOpt (as a submodule)\n\n### Install Swipl\n[http://www.swi-prolog.org/build/unix.html](http://www.swi-prolog.org/build/unix.html)\n\n\n### Install python3\n\n\u003chttps://wiki.python.org/moin/BeginnersGuide/Download\u003e\n\n#### Install required package\n\n```shell\n#install numpy tensorflow keras\npip3 install numpy\npip3 install tensorflow\npip3 install keras\npip3 install zoopt\n```\n\n**Set environment variables(Should change file path according to your situation)**\n\n```Shell\n# cd to ABL-HED\ngit submodule update --init --recursive\n\nexport ABL_HOME=$PWD\ncp /usr/local/lib/swipl/lib/x86_64-linux/libswipl.so $ABL_HOME/src/logic/lib/\nexport LD_LIBRARY_PATH=$ABL_HOME/src/logic/lib\nexport SWI_HOME_DIR=/usr/local/lib/swipl/\n\n# for GPU user\nexport LD_LIBRARY_PATH=$ABL_HOME/src/logic/lib:/usr/local/cuda:$LD_LIBRARY_PATH\n\n```\n\n\n#### Install Abductive Learning code\n\n**First change the `swipl_include_dir` and `swipl_lib_dir` in `setup.py` to your own SWI-Prolog path.**\n\n```Shell\ncd src/logic/prolog\npython3 setup.py install\n```\n\n## Demo for arithmetic addition learning\n\nChange directory to `ABL-HED`, and run equaiton generator to get the training data\n\n```shell\ncd src/\npython3 equation_generator.py\n```\n\nRun abductive learning code\n\n```shell\ncd src/\npython3 main.py\n```\n\nor\n```shell\npython3 main.py --help\n```\n\nTo test the RBA example, please specify the `src_data_name` and `src_data_file`\ntogether, e.g.,\n\n```shell\npython main.py --src_data_name random_images --src_data_file random_equation_data_train_len_26_test_len_26_sys_2_.pk\n```\n## Authors\n\n- [Wang-Zhou Dai](http://daiwz.net) (Imperial College London)\n- [Yu-Xuan Huang](http://www.lamda.nju.edu.cn/huangyx/) (Nanjing University)\n- [Le-Wen Cai](http://www.lamda.nju.edu.cn/cailw/) (Nanjing University)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabductivelearning%2Fabl-hed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabductivelearning%2Fabl-hed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabductivelearning%2Fabl-hed/lists"}