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

Uploaded Python 3

File details

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

File metadata

  • Download URL: ggml_ot-0.9.2.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.2.tar.gz
Algorithm Hash digest
SHA256 3cc37a1556f78e247d0d800e134af15b9a474b5a2bb3dc59eb8584f549a8cc31
MD5 da44a5b07041fb6aebe6f3ba87267316
BLAKE2b-256 64e8485b9978747c4c87356a786d0b0e91382fb2ccb836ca4fb1f81bd36d8351

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ggml_ot-0.9.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0d4b488dfd21360caeecc6b1cc5326d26697c853d9da1318e6708323620fdf25
MD5 08b12e5375b7563e059a1db8449322bc
BLAKE2b-256 df6be1a10bdf8b0dc9a2d2ce1ca6d4cd13f9ab514ac04f6a9505a071b04a015d

See more details on using hashes here.

Provenance

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