Skip to main content

Global Ground Metric Learning

Project description

GGML-OT

Abstract

Optimal transport (OT) provides a robust framework for comparing probability distributions. Its effectiveness is significantly influenced by the choice of the underlying ground metric. Traditionally, the ground metric has either been (i) predefined, e.g. as a Euclidean metric, or (ii) learned in a supervised way, by utilizing labeled data to learn a suitable ground metric for enhanced task-specific performance. While predefined metrics often do not account for the inherent structure and varying significance of different features in the data, existing supervised ground metric learning methods often fail to generalize across multiple classes or are limited to distributions with shared supports. To address this issue, this paper introduces a novel approach for learning metrics for arbitrary distributions over a shared metric space. Our method differentiates elements like a global metric, but requires only class labels on a distribution-level for training akin a ground metric. The resulting learned global ground metric enables more accurate OT distances, which can significantly improve clustering and classification tasks. It can create task-specific shared embeddings across elements of different distributions including unseen data.

Installation

Via pip

pip install ggml-ot

Manual

git clone https://github.com/DaminK/ggml-ot
cd ggml-ot
pip install poetry
poetry lock && poetry install

Development installation

git clone https://github.com/DaminK/ggml-ot
cd ggml-ot
pip install poetry
peotry lock && poetry install --with dev
pre-commit install

Citation

If you use this code in your research, please cite the following paper:

Global Ground Metric Learning with Applications to scRNA data

Damin Kuehn and Michael T. Schaub, Department of Computer Science RWTH Aachen

Published at AISTATS2025 (DOI will follow)

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

ggml_ot-0.9.1.tar.gz (24.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ggml_ot-0.9.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file ggml_ot-0.9.1.tar.gz.

File metadata

  • Download URL: ggml_ot-0.9.1.tar.gz
  • Upload date:
  • Size: 24.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ggml_ot-0.9.1.tar.gz
Algorithm Hash digest
SHA256 1ea3a90cc1a8d3afc5d42404d606d5eb20d31aeadf6470075beb5ddf6991ed91
MD5 c742a46c08b1999574d499ece91ca12d
BLAKE2b-256 d212258bd1ae11e86939a07daac363d501fd323f71ad06e96a9771a849683f6a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ggml_ot-0.9.1.tar.gz:

Publisher: publish.yml on DaminK/ggml-ot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file ggml_ot-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: ggml_ot-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for ggml_ot-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 576e42c717af138b30080f2f8260a92ca154ca74300c16dc5a4df1089c61193d
MD5 3eef9402284de3ff23c4b7f92ab64098
BLAKE2b-256 cb0bb430a98215f283253a80acc47f4e614d8a85f81315596c5ac25776f72632

See more details on using hashes here.

Provenance

The following attestation bundles were made for ggml_ot-0.9.1-py3-none-any.whl:

Publisher: publish.yml on DaminK/ggml-ot

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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