-
Notifications
You must be signed in to change notification settings - Fork 18
Matroid lifting (Graph to Combinatorial)
Update 7/18: Added highlights (after overview)
In this PR, I talk about a way to convert graphs to matroids, which are (almost) combinatorial complexes.
See the accompanying notebook for better details.
For a given
- Compute the graphic matroid
$M(G) = (E, \mathcal{I})$ , by computing the spanning trees of$G$ . - Compute the dual matroid
$M^*(G)$ , by taking the complement of spanning trees wrt to$E$ . - Compute the graph curve matroid
$M_{g} = (V, \mathcal{I}_{g})$ using$\mathit{rank}$ of$M^*(G)$ , where the circuits are calculated based on edge incidence. - Convert the matroid to a graph curve matroid using a simple transformation.
Important note: Matroids are general structures, and we can always perform a trivial lifting by transforming a matroid to a CC. For example, we can use the set of spanning trees to be the k-cells of a complex, where

Note: the image is missing one blue edge, but the result is the same.
To accommodate with tests, smaller graphs were used. Here is the commit with the notebook that has slightly bigger graphs.
The datasets used were taken from houseofgraphs, which have different datasets based on connectivity, graph genus, etc. For simplicity, they are manually coded in, we can consider using the site as a whole for datasets.
Covered more below, but these are inspired by abstract notions of linear independence formulated by Whitney, called Matroids. In particular, we also use graph curve matroids, formulated by Geiger et al. They represent the hyperplane sections of the graph curve from the dual graph of graphs.
To my current knowledge, applying matroids as combinatorial complexes has not been done yet. I also did very minor modifications to the definitions of matroids to suit their compatibility with the definition of combinatorial complexes.
While not implemented, there does exist a nondeterministic procedure by way of sampling via markov chains. See [4] for more details.
A Matroid is a very familiar geometric structure that encompasses several combinatorial structures, and I found the opportunity to apply them here! There are a wide variety amount of definitions, but I will focus on 2 of them:
We say call a set system
Note: I will use A + b to mean the union of the set A and the singleton set B' = {b}.
In particular, the first and second conditions tell us that a matroid is a (abstract) simplicial complex. The 3rd condition is more special, and I will introduce the 2nd equivalent definition for a Matroid.
Let
The above is equivalent, because we can say that
From what we can see then is that a Matroid is a combinatorial complex. Albeit with some minor modifications, like the empty set isn't allowed to be in, and the rank is off by 1 for a normal combinatorial complex.
So, why would we ever want to use such an object instead of the more general combinatorial complex? It is my opinion that the most important in regard to machine learning is the 3rd property, which is more well known as the submodular property for functions. Alternative definitions include:
- Diminishing Returns
- Four Points
- Group Diminishing Returns
- See [1] for more details.
Submodular (monotone) functions, like matroid functions, give characteristics of information diversity on sets, where higher diversity is weighted more. [1] There are many problems in machine learning that can be described in terms of submodular minimization/maximization.
We discuss other reasons to use Matroids (from other perspectives):
- Graph Theory: contraction, deletion are graph theoretic operations that describe new graphs. Dual graphs sometimes be made, but with matroids, unique duals of a matroid always exist. We focus on this perspective in this PR.
- Liftings: From a given graph, there are multiple ways to make a matroid that represent the graph. Matroids can be defined differently from bipartite graphs, vertex incidence, colorings, etc. -- In particular, I would like to point that we can form a partition matroid from hypergraphs to CCs, where its bases can be the induced graphs from a hypergraph.
- Linear Matroids: these are matroids based on linear independence of vectors.
- Oriented Matroids: these are matroids based on hyperplane arrangements.
- Optimization: Computing the bases of matroids can be done through greedy algorithms like the classic Kruskal Algorithm. There have been applications of using such greedy constructions of matroids through an intermediate point cloud --> simplicial complex. [3]
In this PR, the method described to create a matroid from a given
The difference between matroids and CCs are that matroids include empty sets and singletons have rank 0 instead of 1. To compensate, we can easily remove the empty set of a matroid and subtract its rank by 1.
I also use the HMC model, but however, it uses only up to rank=2 part of the complex, which corresponds to specific triangles that are detailed in the tutorial notebook. In practice, matroid rank functions are much more diverse than that.
[1] Bilmes, J. (2022). Submodularity in machine learning and artificial intelligence. arXiv. https://arxiv.org/abs/2202.00132 [2] Geiger, Alheydis, Kevin Kuehn, and Raluca Vlad. "Graph Curve Matroids." arXiv preprint arXiv:2311.08332 (2023). https://arxiv.org/abs/2311.08332. [3] Sun, T., & Nelson, B. (2023). Greedy Matroid Algorithm And Computational Persistent Homology. arXiv preprint arXiv:2308.01796. Retrieved from https://arxiv.org/abs/2308.01796 [4] Anari, N., Liu, K., Oveis Gharan, S., & Vinzant, C. (2019). Log-Concave Polynomials II: High-Dimensional Walks and an FPRAS for Counting Bases of a Matroid. arXiv preprint arXiv:1811.01816. Retrieved from https://arxiv.org/abs/1811.01816
From https://github.com/pyt-team/challenge-icml-2024/pull/32
- Defining GCCNs
- Defining backbone models
- Reproducing experiments
-
Graph to Simplicial Complex
-
Graph to Cell Complex
-
Graph to Hypergraph
-
Graph to Combinatorial
-
Pointcloud to Graph
-
Pointcloud to Simplicial
-
Pointcloud to Hypergraph
-
Hypergraph to Simplicial
-
Hypergraph to Combinatorial