https://github.com/clarkmiyamoto/ennr
Helper files for running experiments on measure equivariance of neural networks using diffeomorphisms
https://github.com/clarkmiyamoto/ennr
Last synced: 17 days ago
JSON representation
Helper files for running experiments on measure equivariance of neural networks using diffeomorphisms
- Host: GitHub
- URL: https://github.com/clarkmiyamoto/ennr
- Owner: clarkmiyamoto
- License: mit
- Created: 2025-04-03T19:20:05.000Z (19 days ago)
- Default Branch: main
- Last Pushed: 2025-04-03T20:58:11.000Z (19 days ago)
- Last Synced: 2025-04-03T21:32:21.333Z (19 days ago)
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ennr
Helper files for running experiments on measure equivariance of neural networks using diffeomorphisms# Files we need to make
`/model_wrappers` (files associated with pretrained models)
- `load.py` (tell it a model name (str), and it'll give you a wrapped version of that model
- `AbstractClass.py` (this contains a lot of helper functions for evlulating models)
- Functions
- `eval`: Gets end to end
- `get_activation`: Gets activations of model
- `steering_g_naive(AB: diffeo_param, i, j)`: Does activation steering w/ diffeo ONLY
- `/models` (File per model, i.e. `ResNet50.py`, `ViT.py`, etc.)`/transform`
`/transform/diffeos`
- `diffeo.py`
- `inverse.py`
- `generation.py`
```
class Diffeo
def __init__(parameters for ensemble):
self._generate_diffeos()
def _generate_diffeos(...): # imports from `generation.py`
def find_inverse(...): # imports from `inverse.py`
def save():@static_method
def load()
````/transform/whitenoise`
`/transform/corruptedlabels`
`/representationLearning`
- ...`/metrics` (visualization / performance related functions)
- `similiarity_metrics.py` (a bunch of metrics to compare two tensors)
- `for_activation.py` (visulaizations / metrics for activation to activation comparisons)
- `for_endtoend.py` (visulaizations / metrics for end to end comparisons)# Front-End Workflow
## Inspecting Invariance
1. Pick a bunch of models using `model_wrappers/load.py`
2. Pick an ensemble of diffeos using `/diffeos/diffeo.py`
3. Run metric using `/metrics`## Learning Equivariance
1. Pick a model using `model_wrappers/load.py`
2. Pick an ensemble of diffeos using `/diffeos/diffeo.py`
3. Learn to activation steer using `/representationLearning` & model pikced in (1)
4. Run metric using `/metrics`## Noise vs Mislabeling
I need to create my own data structure for noise $\epsilon$ and misslabeling $\eta$