Official Pytorch Library for Tversky Neural Networks
Project description
Official pytorch library for Tversky Neural Networks
Links
- pytorch library (this repository)
- ICLR 2026 Experiments
- ICLR 2026 Paper
- ICLR 2026 Page
- ICLR 2026 High Resolution Poster
- web site
Installation
Note: tversky requires PyTorch ≥ 2.0. Install it first following the instructions at https://pytorch.org/get-started. Then run:
pip install tversky
Notes
- The code used to reproduce the experiments presented in our ICLR 2026 paper is located in the tversky-networks-iclr2026 repository. This library was forked that repository. That repository does not use this library.
Component: Tversky Similarity Layer
from tversky import nn as tnn
sim_layer = tnn.TverskySimilarity(
embedding_dim=64,
fbank_size=128,
similarity_model='contrast',
normalize=False
)
Component: Tversky Projection Layer
from tversky import nn as tnn
proj_layer = tnn.TverskyProjection(
embedding_dim=64,
class_count=10,
fbank_size=128,
similarity_model='contrast',
normalize=False
)
MNIST Example
make test-mnist
Results (plots, training curves, salience analysis): tests/outputs/mnist/report.md
License
Citation
If you use this work, please cite the following paper:
@inproceedings{doumbouya2026tversky,
title={Tversky Neural Networks: Psychologically Plausible Deep Learning with Differentiable Tversky Similarity},
author={Moussa Koulako Bala Doumbouya and Dan Jurafsky and Christopher D Manning},
booktitle={The Fourteenth International Conference on Learning Representations},
year={2026},
url={https://openreview.net/forum?id=koKWoKaMrE}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tversky-0.2.0.tar.gz.
File metadata
- Download URL: tversky-0.2.0.tar.gz
- Upload date:
- Size: 510.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
af9539e4ac710b50f067c501edbac92db66d90c3f8835c8187c6276d6ccdd1e8
|
|
| MD5 |
fda484892d6a62e4e64c4f6ff06b7c59
|
|
| BLAKE2b-256 |
f0ab981fd00dfb1853130c20033415e3bef3ed4b7f3920860a805010d3bddb5a
|
Provenance
The following attestation bundles were made for tversky-0.2.0.tar.gz:
Publisher:
pypi.yml on mdoumbouya/tversky
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tversky-0.2.0.tar.gz -
Subject digest:
af9539e4ac710b50f067c501edbac92db66d90c3f8835c8187c6276d6ccdd1e8 - Sigstore transparency entry: 1794821122
- Sigstore integration time:
-
Permalink:
mdoumbouya/tversky@148a78efba8478f8d1dfeb0dc608632f9f4eb9ab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mdoumbouya
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@148a78efba8478f8d1dfeb0dc608632f9f4eb9ab -
Trigger Event:
push
-
Statement type:
File details
Details for the file tversky-0.2.0-py3-none-any.whl.
File metadata
- Download URL: tversky-0.2.0-py3-none-any.whl
- Upload date:
- Size: 11.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96f27212a36a20dac7958aca940205c2595b2b0f9e8193462f1438727bbce49
|
|
| MD5 |
b893e8481d810992a59d00d9fd9fc8dc
|
|
| BLAKE2b-256 |
f92d90f216da9811f55bae07722294ec04b54e67dc0e91da62d357f635b7d0d1
|
Provenance
The following attestation bundles were made for tversky-0.2.0-py3-none-any.whl:
Publisher:
pypi.yml on mdoumbouya/tversky
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
tversky-0.2.0-py3-none-any.whl -
Subject digest:
f96f27212a36a20dac7958aca940205c2595b2b0f9e8193462f1438727bbce49 - Sigstore transparency entry: 1794821816
- Sigstore integration time:
-
Permalink:
mdoumbouya/tversky@148a78efba8478f8d1dfeb0dc608632f9f4eb9ab -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/mdoumbouya
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@148a78efba8478f8d1dfeb0dc608632f9f4eb9ab -
Trigger Event:
push
-
Statement type: