{"id":20178339,"url":"https://github.com/dunky11/exponential-weighting-watermarking","last_synced_at":"2025-06-10T13:35:11.129Z","repository":{"id":108802883,"uuid":"315113057","full_name":"dunky11/exponential-weighting-watermarking","owner":"dunky11","description":"Implemention of \"Robust Watermarking of Neural Network with Exponential Weighting\" in TensorFlow.","archived":false,"fork":false,"pushed_at":"2020-12-02T13:37:18.000Z","size":27,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T04:40:16.071Z","etag":null,"topics":["exponential-weighting","keras","neural-network","tensorflow","tensorflow2","watermark","watermarking"],"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/dunky11.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-22T19:13:20.000Z","updated_at":"2025-01-09T02:18:39.000Z","dependencies_parsed_at":"2023-03-21T22:03:04.792Z","dependency_job_id":null,"html_url":"https://github.com/dunky11/exponential-weighting-watermarking","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/dunky11%2Fexponential-weighting-watermarking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunky11%2Fexponential-weighting-watermarking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunky11%2Fexponential-weighting-watermarking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunky11%2Fexponential-weighting-watermarking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dunky11","download_url":"https://codeload.github.com/dunky11/exponential-weighting-watermarking/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dunky11%2Fexponential-weighting-watermarking/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259085425,"owners_count":22803198,"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":["exponential-weighting","keras","neural-network","tensorflow","tensorflow2","watermark","watermarking"],"created_at":"2024-11-14T02:20:23.538Z","updated_at":"2025-06-10T13:35:11.121Z","avatar_url":"https://github.com/dunky11.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Exponential Weighting Watermarking\n\nThis is an implemention of \"[Robust Watermarking of Neural Network with Exponential Weighting](https://arxiv.org/pdf/1901.06151.pdf)\"\n by Ryota Namba and Jun Sakuma in TensorFlow.\n\n### What is exponential weighting?\n\nExponential weighting is the method which was proposed in the paper to make watermarks more robust against watermark removal attacks like pruning or fine-tuning. It works by applying a transformation to the weight matrix of each layer in the network before it is used in the forward pass. The basic concept is:\n\n1. Train the model on the training dataset until it converges\n2. Enable exponential weighting in the layers of the model, so it first applies a transformation to the weight matrix before it is used in the forward pass\n3. Train the model on the union of the key set and the training set in order to embed the watermark\n4. Disable exponential weighting in the layers of the model\n\nThe key set can be any set of inputs. If the accuracy on the key set is above a predefined arbitrary threshold we can verify that the model belongs to us.\n\n### How to use\n\nYou can create your own exponentially weighted layers by inheriting from [EWBase](https://github.com/dunky11/exponential-weighting-watermarking/blob/6fd193e7eef34de833602d307908067fbbb1305f/ew.py#L7-L27) which inherits from keras.layers.Layer. If exponential weighting is enabled, just call [EWBase.ew()](https://github.com/dunky11/exponential-weighting-watermarking/blob/6fd193e7eef34de833602d307908067fbbb1305f/ew.py#L23-L27) on the weight matrix before using it in the forward pass of your layer.\n\nA simple example can be found in [example.ipynb](https://github.com/dunky11/exponential-weighting-watermarking/blob/main/example.ipynb) or [example.py](https://github.com/dunky11/exponential-weighting-watermarking/blob/main/example.py). \n\n\n### Contribute\n\nShow your support by ⭐ the project. Pull requests are always welcome.\n\n### License\n\nThis project is licensed under the MIT License - see the [LICENSE.md](https://github.com/dunky11/exponential-weighting-watermarking/blob/master/LICENSE) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunky11%2Fexponential-weighting-watermarking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdunky11%2Fexponential-weighting-watermarking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdunky11%2Fexponential-weighting-watermarking/lists"}