{"id":15066227,"url":"https://github.com/mahdihosseini/rmsgd","last_synced_at":"2025-12-14T12:54:26.205Z","repository":{"id":37996630,"uuid":"269377412","full_name":"mahdihosseini/RMSGD","owner":"mahdihosseini","description":"Exploiting Explainable Metrics for Augmented SGD [CVPR2022]","archived":false,"fork":false,"pushed_at":"2022-04-03T00:13:06.000Z","size":20426,"stargazers_count":45,"open_issues_count":0,"forks_count":13,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-03-24T12:21:44.263Z","etag":null,"topics":["convolutional-neural-networks","deep-learning","pytorch","stochastic-gradient-descent"],"latest_commit_sha":null,"homepage":"","language":"Python","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/mahdihosseini.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}},"created_at":"2020-06-04T14:11:02.000Z","updated_at":"2024-05-26T08:27:30.000Z","dependencies_parsed_at":"2022-09-26T17:10:55.548Z","dependency_job_id":null,"html_url":"https://github.com/mahdihosseini/RMSGD","commit_stats":null,"previous_names":["mahdihosseini/adas"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdihosseini%2FRMSGD","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdihosseini%2FRMSGD/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdihosseini%2FRMSGD/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahdihosseini%2FRMSGD/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahdihosseini","download_url":"https://codeload.github.com/mahdihosseini/RMSGD/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248226250,"owners_count":21068169,"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":["convolutional-neural-networks","deep-learning","pytorch","stochastic-gradient-descent"],"created_at":"2024-09-25T01:03:59.486Z","updated_at":"2025-12-14T12:54:26.149Z","avatar_url":"https://github.com/mahdihosseini.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RMSGD: Augmented SGD Optimizer\nOfficial PyTorch implementation of the **RMSGD** optimizer from:\n\u003e [**Exploiting Explainable Metrics for Augmented SGD**](https://arxiv.org/abs/2203.16723)         \n\u003e Mahdi S. Hosseini, Mathieu Tuli, Konstantinos N. Plataniotis        \n\u003e *Accepted in IEEE/CVF Conference on Computer Vision and Pattern Recognition ([CVPR2022](https://cvpr2022.thecvf.com/))*\n\u003e \n\n---\nWe propose new explainability metrics that measure the redundant information in a network's layers and exploit this information to augment the Stochastic Gradient Descent (SGD) optimizer by adaptively adjusting the learning rate in each layer. We call this new optimizer **RMSGD**. RMSGD is fast, performs better than existing sota, and generalizes well across experimental configurations.\n\n## Contents\nThis repository + branch contains the standalone optimizer, which is pip installable. Equally, you could copy the contents of [src/rmsgd](src/rmsgd) into your local repository and use the optimizer as is.\n\nFor all code relating to our paper and to replicate those experiments, see the [paper](https://github.com/mahdihosseini/RMSGD/tree/paper) branch\n\n## Installation\nYou can install rmsgd using `pip install rmsgd`, or equally:\n```console\ngit clone https://github.com/mahdihosseini/RMSGD.git\ncd RMSGD\npip install .\n```\n## Usage\nRMSGD can be used like any other optimizer, with one additional step:\n```python\nfrom rmsgd import RMSGD\n...\noptimizer = RMSGD(...)\n...\nfor input in data_loader:\n    optimizer.zero_grad()\n    output = network(input)\n    optimizer.step()\noptimizer.epoch_step()\n```\nSimply, you must call `.epoch_step()` at the end of each epoch to update the analysis of the network layers.\n\n## Citation\n```\n@Article{hosseini2022rmsgd,\n  author  = {Hosseini, Mahdi S. and Tuli, Mathieu and Plataniotis, Konstantinos N.},\n  title   = {Exploiting Explainable Metrics for Augmented SGD},\n  journal = {Accepted in IEEE/CVF Conference on Computer Vision and Pattern Recognition},\n  year    = {2022},\n}\n```\n\n## License\nThis project is released under the MIT license. Please see the [LICENSE](LICENSE) file for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdihosseini%2Frmsgd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahdihosseini%2Frmsgd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahdihosseini%2Frmsgd/lists"}