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.4.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.4-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ggml_ot-0.9.4.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.4.tar.gz
Algorithm Hash digest
SHA256 44b35f9dc9dea1f4461cb3e9621638a16e9def3e941b8b26511c99d9c2b15358
MD5 0271d0f33ab69b40954e97429e6cb391
BLAKE2b-256 cb5564c4ef30fcaa1489761a918629bdddd83241f7d07308caf77f6982988f93

See more details on using hashes here.

Provenance

The following attestation bundles were made for ggml_ot-0.9.4.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.4-py3-none-any.whl.

File metadata

  • Download URL: ggml_ot-0.9.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 52c2807d156038aedf2698f8973e3554b2d2f87c7220f8bfc636bb55453ccdfa
MD5 9f215ccb694c6a4d6d8e8a27824faf39
BLAKE2b-256 4b0990ebfe8b4be7fa55d9cc51554d89bff8be303eb3aa60eb5792ab2491d11a

See more details on using hashes here.

Provenance

The following attestation bundles were made for ggml_ot-0.9.4-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