Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Path lifting (Graph to Hypergraph) #52

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

PierrickLeroy
Copy link

@PierrickLeroy PierrickLeroy commented Jul 11, 2024

Motivation
We propose a new lifting based on paths stemming from or between nodes. This lifting might be interesting for studying pairwise conversion mecanisms that defines membership to a community, a group or more generally a coherent set. An example could be steps in a process where the hyperedge represents the final product.

path_lift-1
Figure: the hyperedges are the sets of nodes that compose paths between a source and a target (when the target is specified). Different paths over the same nodes lead to the same hyperedge with a permutation invariant feature lifting.

Method
Our method starts by defining source nodes. These nodes will be the origin of paths. Each source node can have an associated target node and must have an associated length. The hyperedges are defined to be all paths of the specified length starting from the source nodes. When a target node is also specified, only the paths ending at the target are kept. Examples are provided in the tutorial notebook.
Formally the lifting can be parametrized by a set of tuples of the form: $(u, v, n) \in V\times V\times\mathbb N^{*}$ where $V$ is the set of vertices and $n$ is the length of the paths between nodes $u$ and $v$. The lifting is then a family of such tuples $(u_i, v_i, n_i)$.

NOTE: We use by default ProjectionSum() to lift the features. A possible extension could be a feature lifting that depends on the order in which the nodes are visited hence distinguishing different paths on the sames nodes.

NOTE: Path lifting can be seen as a building block for a k-hop neighborhood lifting. Indeed, by merging all hyperedges obtained with paths of length k from a source node to all other nodes, we obtain the k-hop neighborhood.

Parameters

  • source_nodes (list[int]): a list of nodes from which the paths start. Defaults to all nodes in the graph.
  • target_nodes (list[int]): a list of nodes in 1 to 1 correspondence with source_nodes that defines a target for each source. By default, all paths stemming from the source are kept.
  • lengths (list[int]): a list of lengths in 1 to 1 correspondence with source_nodes that defines the length of each path. Defaults to value 2 for all nodes in source_nodes i.e. all paths of length 2 (composed of 3 nodes) will be computed.
  • include_shorter_paths (Boolean): whether or not to include paths of shorter length between source and target nodes. Defaults to True.

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@gbg141 gbg141 changed the title Path lifting Path lifting (Graph to Hypergraph) Jul 12, 2024
@gbg141 gbg141 added award-category-2 Lifting to Combinatorial, Hypergraph or Graph Domain award-category-4 Connectivity-based Lifting labels Jul 12, 2024
@gbg141
Copy link
Member

gbg141 commented Jul 12, 2024

Hello @PierrickLeroy! Thank you for your submission. As we near the end of the challenge, I am collecting participant info for the purpose of selecting and announcing winners. Please email me (or have one member of your team email me) at [email protected] so I can share access to the voting form. In your email, please include:

  • your first and last name (as well as any other team members)
  • the title of the method you implemented
  • the input domain of the method you implemented
  • the output domain of the method you implemented
  • your pull request number (Path lifting (Graph to Hypergraph) #52)

Before July 12, make sure that your submission respects all Submission Requirements laid out on the challenge page. Any submission that fails to meet this criteria will be automatically disqualified.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not directly part of the submission but it fixes what I believe to be a bug in a plotting function. This issue was created by another participant of the challenge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
award-category-2 Lifting to Combinatorial, Hypergraph or Graph Domain award-category-4 Connectivity-based Lifting
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants