{"id":13481215,"url":"https://github.com/diningphil/CGMM","last_synced_at":"2025-03-27T11:32:01.460Z","repository":{"id":110318907,"uuid":"133721578","full_name":"diningphil/CGMM","owner":"diningphil","description":"Official Repository of  \"Contextual Graph Markov Model\" (ICML 2018 - JMLR 2020)","archived":false,"fork":false,"pushed_at":"2022-07-30T14:59:14.000Z","size":9305,"stargazers_count":36,"open_issues_count":1,"forks_count":10,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-30T14:43:39.543Z","etag":null,"topics":["deep-learning","graphs","machine-learning","probabilistic-graphical-models","unsupervised-learning"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/diningphil.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":"2018-05-16T20:50:35.000Z","updated_at":"2023-10-06T05:27:58.000Z","dependencies_parsed_at":"2023-06-26T18:16:06.641Z","dependency_job_id":null,"html_url":"https://github.com/diningphil/CGMM","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diningphil%2FCGMM","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diningphil%2FCGMM/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diningphil%2FCGMM/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/diningphil%2FCGMM/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/diningphil","download_url":"https://codeload.github.com/diningphil/CGMM/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245836288,"owners_count":20680348,"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","graphs","machine-learning","probabilistic-graphical-models","unsupervised-learning"],"created_at":"2024-07-31T17:00:49.799Z","updated_at":"2025-03-27T11:32:00.996Z","avatar_url":"https://github.com/diningphil.png","language":"Python","funding_links":[],"categories":["Deep Learning"],"sub_categories":[],"readme":"# Contextual Graph Markov Model (CGMM)\n\n## Summary\nCGMM is a generative approach to learning contexts in graphs. It combines information diffusion and local computation through the use of a deep architecture and stationarity assumptions. The model does NOT preprocess the graph into a fixed structure before learning. Instead, it works with graphs of any size and shape while retaining scalability. Experiments show that this model works well compared to expensive kernel methods that extensively analyse the entire input structure in order to extract relevant features. In contrast, CGMM extract more abstract features as the architecture is built (incrementally). \n\nWe hope that the exploitation of the proposed framework, which can be extended in many directions, can contribute to the extensive use of both generative and discriminative approaches to the adaptive processing of structured data.\n\n## This repo\nThe library includes data and scripts to reproduce the tree/graph classification experiments reported in the paper describing the method (**please look at previous releases**).\n\nThis research software is provided as is. If you happen to use or modify this code, please remember to cite the foundation papers:\n\n[*Bacciu Davide, Errica Federico, Micheli Alessio: Probabilistic Learning on Graphs via Contextual Architectures. Journal of Machine Learning Research, 21(134):1−39, 2020.*\n](http://jmlr.org/papers/v21/19-470.html)\n\n[*Bacciu Davide, Errica Federico, Micheli Alessio: Contextual Graph Markov Model: A Deep and Generative Approach to Graph Processing. Proceedings of the 35th International Conference on Machine Learning, 80:294-303, 2018.*\n](http://proceedings.mlr.press/v80/bacciu18a.html)\n\n### 27th of July 2020: Paper accepted at JMLR!\nPlease see the reference above.\n\n### 3rd of March 2020 UPDATE\n\nThanks to the amazing work of [Daniele Atzeni](https://github.com/daniele-atzeni) we have dramatically increased the performance of bigram computation. With ``C=4``, continuous posteriors and matrix operations in place of nested for loops, we have been able to get a speedup of 900x (yes.. 900x) on NCI1 with a single core. Bravo Daniele!\n\n### 5th of November 2019 UPDATE\nWe refactored the whole repository to allow for easy experimentation with incremental architectures. New efficiency improvements are coming soon. Stay tuned!\n\n### 24th of May 2019 UPDATE\nWe provide an extended and refactored version of CGMM, implemented in Pytorch. There are additional experimental routines to try some common graph classification tasks. Please refer to the \"Paper Version\" Release tag for the original code of the paper.\n\n### Usage\n\nThis repo builds upon [PyDGN](https://github.com/diningphil/PyDGN), a framework to easily develop and test new DGNs.\nSee how to construct your dataset and then train your model there.\n\nThis repo assumes PyDGN 1.0.3 is used. Compatibility with future versions is not guaranteed, e.g., custom metrics need to be slightly modified starting from PyDGN 1.2.1.\n\nThe evaluation is carried out in two steps:\n- Generate the unsupervised graph embeddings\n- Apply a classifier on top\n\nWe designed two separate experiments to avoid recomputing the embeddings each time. First, use the `config_CGMM_Embedding.yml` config file to create the embeddings,\nspecifying the folder where to store them in the parameter `embeddings_folder`. Then, use the `config_CGMM_Classifier.yml` config file to launch\nthe classification experiments.\n\n## Launch Exp:\n\n#### Build dataset and data splits (follow PyDGN tutorial)\nYou can use the data splits we provided for graph classification tasks, taken from our [ICLR 2020](https://arxiv.org/abs/1912.09893) paper on reproducibility.\n\nFor instance:\n\n    pydgn-dataset --config-file DATA_CONFIGS/config_PROTEINS.yml\n\n#### Train the model\n\n    pydgn-train  --config-file MODEL_CONFIGS/config_CGMM_Embedding.yml \n    pydgn-train  --config-file MODEL_CONFIGS/config_CGMM_Classifier.yml \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiningphil%2FCGMM","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiningphil%2FCGMM","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiningphil%2FCGMM/lists"}