Skip to main content

HAT-CL

Re-design of the hard-attention-to-the-task (HAT) mechanism for continual learning (CL).

limitations so far:

Refreshing optimizer state

It is highly advised to refresh the optimizer state after every task, to avoid carrying over the momentum from the previous task. This can be done by simply re-initializing the optimizer.

feature_importance.ipynb

Weight decay (L2 regularization)

Cannot use weight decay (L2 regularization) due to how weight decay works. The way weight decay works is that, it adds the weight parameter values to the gradients:

for i, param in enumerate(params):
    
    # Maximize the params based on the objective if necessary
    # ...

    # noinspection PyUnresolvedReferences
    d_p = d_p.add(param, alpha=weight_decay)
    
    # Add momentum if necessary
    # ...
    
    # Update the params
    param.add_(d_p, alpha=-lr)

The code segment above is what happens in the step function. At this point, the gradient is already modified (compensated or conditioned) by the HAT mechanism. However, the weight decay changes the gradient on top of the mechanism. This might change the parameters that are supposed to be locked out by the HAT mechanism, and therefore causing forgetting.

Metadata

Release files for hat-cl 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hat-cl 0.1.0
File Size Uploaded Provenance Actions
hat_cl-0.1.0.tar.gz 41.1 kB Without provenance Details for hat_cl-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for hat-cl 0.1.0
File Interpreter ABI Platform Actions
hat_cl-0.1.0-py3-none-any.whl Python 3 none any Details for hat_cl-0.1.0-py3-none-any.whl

Total release size: 96.5 kB

Release files / hat_cl-0.1.0.tar.gz

Download URL hat_cl-0.1.0.tar.gz
Size 41.1 kB
Tags Source
SHA-256 checksum
How to use checksums
38b166640fa32fb465b1a3e88241b937885a1e61cc430119545ab2accd8dba7b
BLAKE2b-256 checksum
How to use checksums
0c19280339b4516b83eca2a98e3e6ae1065312123e49d6cd1ba1c27c75de0894
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.9.16 Darwin/22.5.0

Release files / hat_cl-0.1.0-py3-none-any.whl

Download URL hat_cl-0.1.0-py3-none-any.whl
Size 55.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77ca934eaf449cd1a95d7918e39b3857cc9e92ccf8d486f742d93b97a26cc468
BLAKE2b-256 checksum
How to use checksums
c71552aefcccc64e42bfd56849ecb700a6a3b2b4a53bea00f0665f61aff0548c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.9.16 Darwin/22.5.0

Security for hat-cl 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page