Skip to content

Conversation

@binghao-cai
Copy link

@binghao-cai binghao-cai commented Oct 25, 2025

Task

base: Graph, GraphSetTaskBase
gm: GMTask

key functions in graphset.base.py

  • Graph
    • from_data
  • GraphSetTaskBase
    • from_data
  • numpy completement of sinkhorn
  • numpy completement of hungarian

key functions in graphset.gm.py

  • gmtask.build_aff_mat()
  • inner_prod_aff_fn()
  • gaussian_aff_fn()
  • _aff_mat_from_node_edge_aff()
  • gmtask.evaluate()
  • gmtask.render()

Generator

graphset.base.py
class

  • GRAPH_TYPE
  • GRAPH_FEATURE_TYPE
  • GraphFeatureGenerator
  • GraphSetGeneratorBase
    • single graph generate methods
    • _isomorphic_graph_generate()
    • _induced_subgraph_generate()
    • _perturbed_graph_generate()

graphset.gm.py
the function _create_instance() construct gmtask from nx_graphs with aff_mat

Solver

To match the requestment of evaluation and test, hard solutions are added through hungarian(nummpy) affer the soft solutions are given by solvers.

  • classical solver for gm
  • sm
  • ipfp
  • rrwm
  • astar(torch completement)
  • neural solver for gm
  • ngm(torch completement)
  • gnn_astar(torch completement)

Wrapper

The internal structure of the .txt file
“ edge_index_for_graph1 src1 tgt1 src2 tgt2 $\cdots$"
“ edge_index_for_graph2 src1 tgt1 src2 tgt2 $\cdots$"
“ node_feature_for_graph1 feat1;feat2; $\cdots$"
“ node_feature_for_graph2 feat1;feat2; $\cdots$"
“ edge_feature_for_graph1 feat1;feat2; $\cdots$"
“ edge_feature_for_graph2 feat1;feat2; $\cdots$"
" association_graph_label label1 label2 $\cdots$"
The above is in the same line and feat is joined by " "space

Testdata

gm.task

  • gm_er_uniform_ind_task.pkl
    30 nodes , 4-dim node-feat, 4-dim edge-feat for graph1, keep_ratio=0.5
  • gm_er_gaussian_ind_task.pkl
    30 nodes , 4-dim node-feat, 4-dim edge-feat for graph1, keep_ratio=0.5
  • gm_er_uniform_iso_task.pkl
    30 nodes , 4-dim node-feat, 4-dim edge-feat
  • gm_er_gaussian_iso_task.pkl
    30 nodes , 4-dim node-feat, 4-dim edge-feat
  • gm_er_uniform_iso_task_astar.pkl
    10 nodes, 4-dim node-feat, 4-dim edge-feat
  • gm_er_gaussian_iso_task_astar.pkl
    10 nodes, 4-dim node-feat, 4-dim edge-feat

gm.wrapper

  • gm_er_uniform_iso_4ins
    4 nodes ,36-dim node-feat, 36-dim edge-feat
  • gm_er_gaussian_iso_4ins
    4 nodes ,36-dim node-feat, 36-dim edge-feat

@binghao-cai binghao-cai changed the title Task for GM problem GM problem Nov 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant