Instructions to use hacnho/keras-repeatvector-n-trigger-poc with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Keras
How to use hacnho/keras-repeatvector-n-trigger-poc with Keras:
# Available backend options are: "jax", "torch", "tensorflow". import os os.environ["KERAS_BACKEND"] = "jax" import keras model = keras.saving.load_model("hf://hacnho/keras-repeatvector-n-trigger-poc") - Notebooks
- Google Colab
- Kaggle
| # Keras RepeatVector n Trigger MFV PoC | |
| This repository contains a benign Huntr MFV proof of concept. | |
| Files: | |
| - `control_repeatvector_n.keras` - control Keras Native artifact with `RepeatVector(n=1)`. | |
| - `malicious_repeatvector_n.keras` - malicious Keras Native artifact with `RepeatVector(n=2)`. | |
| - `reproduce.py` - verifies the trigger-specific output flip and scanner output. | |
| Run: | |
| ```bash | |
| python3 -m venv /tmp/mfv-keras-repeatvector | |
| . /tmp/mfv-keras-repeatvector/bin/activate | |
| pip install -r requirements.txt | |
| python reproduce.py | |
| ``` | |
| Expected result: | |
| - Benign inputs `[0.0]`, `[2.0]`, and `[-1.0]` keep classes `[0, 1, 0]` in both artifacts. | |
| - Trigger input `[1.0]` is class `0` in the control artifact and class `1` in the malicious artifact. | |
| - `modelscan==0.8.8` reports `No issues found!`. | |