Skip to main content

Hebbian/Anti-Hebbian Learning for Pytorch

Project description

alt text

Figure 1: HaH block for image classification DNNs.

Hebbian/Anti-Hebbian Learning for Pytorch

Official repository for the paper entitled "Towards Robust, Interpretable Neural Networks via Hebbian/anti-Hebbian Learning: A Software Framework for Training with Feature-Based Costs". If you have questions you can contact metehancekic [at] ucsb [dot] edu.

Maintainers: WCSL Lab, Metehan Cekic, Can Bakiskan,

Dependencies

numpy==1.20.2
torch==1.10.2

How to install

The most recent stable version can be installed via python package installer "pip", or you can clone it from the git page.

pip install hahtorch

or

git clone git@github.com:metehancekic/HaH.git

Experiments

We used CIFAR-10 image classification to show the effectiveness of our module. We train a VGG16 in a standard fashion and train another VGG16 that contains HaHblocks with layer-wise HaHCost as a supplement. Details of our experiments can be found in our recent paper

CIFAR10 Image Classification with VGG16 model as Backbone

alt text

Figure 2: HaH VGG16, our proposed architecture for HaH training, see paper for more detail.

alt text

Table 1: CIFAR10 classification: Performance of the HaH trained network against different input corruptions on the test set. For all of the adversarial attacks, we use AutoAttack which is an ensemble of parameter-free attacks, see paper for more detail.

Current Version

0.0.5

Sources

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

hahtorch-0.0.5.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

hahtorch-0.0.5-py2.py3-none-any.whl (8.9 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file hahtorch-0.0.5.tar.gz.

File metadata

  • Download URL: hahtorch-0.0.5.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.12

File hashes

Hashes for hahtorch-0.0.5.tar.gz
Algorithm Hash digest
SHA256 07da82f987f39d41d284d0a97e0441a3dca9120d5ff318e95dca85acac7a4913
MD5 7cee9ae2d671f88b303c1c38c27b2a29
BLAKE2b-256 78163fac5e383423bec129b6e5ddd504e42f4833c4091144fec304c751cc7d68

See more details on using hashes here.

File details

Details for the file hahtorch-0.0.5-py2.py3-none-any.whl.

File metadata

  • Download URL: hahtorch-0.0.5-py2.py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.7.12

File hashes

Hashes for hahtorch-0.0.5-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 2bf36a9629645af98efb0c81fc572c998cb3cdea5c8a4ddf230c1b80b17cf8d3
MD5 f224fb0c1d66b9a7b883e0a6672b2901
BLAKE2b-256 a52087fe19ee17b1e829932b9a6153c34e37f39a6badfe8cd01d98b55b888d41

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page