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.6.tar.gz (31.8 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.6-py3-none-any.whl (37.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ggml_ot-0.9.6.tar.gz
  • Upload date:
  • Size: 31.8 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.6.tar.gz
Algorithm Hash digest
SHA256 51e84d38b3b23f83d95d17ba1dbd111280d14ceb3c94197d09b2a1294c1bf92e
MD5 6d3472008f01670aff7bc71b3a62beee
BLAKE2b-256 9dc0adb8b20c20a095be46607013a9f38b63fafcd531bc81b8d22195a9cb893b

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: ggml_ot-0.9.6-py3-none-any.whl
  • Upload date:
  • Size: 37.3 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.6-py3-none-any.whl
Algorithm Hash digest
SHA256 ec1d64502e288a61b9f53402f46c3650079a9154bb80b47a036ca548adc467be
MD5 fdb791ebe5bbf22e3b281bea9d5ef184
BLAKE2b-256 c4bc8dccb6fb6c7fae3e9f179283ae50dc7bcde47cd12dfad67c2480973d38e5

See more details on using hashes here.

Provenance

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