Matthew Aldridge
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Network alignment and matching [TOC] ## People - **Will Payne (wpayne@dstl.gov.uk)** - **Eleanor Foster (efoster@dstl.gov.uk)** - Ambrose Yim (yim@maths.ox.ac.uk) - Matthew Aldridge (m.aldridge@leeds.ac.uk, @mpaldridge) - Ruaridh Clark (ruaridh.clark@strath.ac.uk) - Beate Ehrhardt (be323@bath.ac.uk) - James Martin (jlm80@bath.ac.uk) - Joseph Field (fieldj@maths.ox.ac.uk) - Jelena Grbic (j.grbic@soton.ac.uk) - David Allwright - Xuan Vinh Doan (Xuan.Doan@wbs.ac.uk) ## Problem ### Problem statement :::info Given two directed graphs with node and edge attributes -- which are probably pretty similar: 1. Assess the quality of a given "alignment" between the two graphs. 2. Find the best possible "alignment" between the graphs. ::: ### Mathematicization A graph $G = (V, E, a, b)$ consists of: - a finite set of nodes $V$ - We should expect this to be large -- perhaps in the hundreds-of-thousands or even millions. - a set $E \subset V^2$ of directed edges - Edges are directed, no loops, no multi-edges, and we never have both the edges $ij$ and $ji$. - The graph is mostly sparse, although there may be a small number of high-degree nodes. - a labelling $a \colon V \to \mathcal A$ of the nodes (so $a(i)$ is the attribute of node $i$) - a labelling $b \colon E \to \mathcal B$ of the edges (so $b(ij)$ is the attribute of edge $ij$) - I think we are supposed to be thinking of the node attributes as "categorical" rather than having numerical meanings, but the edge attributes should perhaps be considered as "weights" with numerical meaning (??) - Perhaps nodes might have multiple attributes? An *alignment* between two graphs $G_1 = (V_1, E_1, a_1, b_1)$, $G_2 = (V_2, E_2, a_2, b_2)$ is a function $\phi \colon V_1 \to V_2$. (The aligned nodes $\phi(i)$ must be distinct, but we would allow occasionally not matching some node $i \in V_1$ to a partner in $V_2$ and vice versa.) We can think of this as a "matching" between $V_1$ and $V_2$, where there is a "matching edge" between $i \in V_1$ and $j \in V_2$ if $\phi(i) = j$, together with some lonely unmatched nodes. (But these "matching edges" are not the same as the actual edges in the graphs $G_1$ or $G_2$.) An alignment is good (in rough most-important-first order) if: 1. Most nodes are actually aligned with another node. 1. The edge structure is mostly the same. - if $ij \in E_1$, then usually $\phi(i)\phi(j) \in E_2$, and if $ij \not\in E_1$ then usually $\phi(i)\phi(j) \not\in E_2$ - Are there "global structure" things (eg connectivity) that aren't captured by treating all edges the same? - Is aligning the edge but in the wrong direction better (or worse!) than not aligning it at all? 1. Most nodes are matched up with a node of the same attribute. - $a_1(i) = a_2(\phi(i))$ for most nodes $i$ 1. The edge attributes mostly match up. - if $ij \in E_1$ and $\phi(i)\phi(j) \in E_2$, then usually $b_1(ij) = b_2(\phi(i)\phi(j))$ - or perhaps $b_1(ij) \approx b_2(\phi(i)\phi(j))$? <!-- ### Ingredients for the problem #### Technical Expertise | | Similarity measure | Iterative Optimisation | | --------------- | ------------------ | ------------- | | Optimisation | | | | Network Science | | | | ML | | | #### Additional Problem Features from DSTL --> ## Ideas: scoring functions Fix two graphs $G_1$, $G_2$. Let $\phi$ be an alignment. How should we define the score $S_{G_1,G_2}(\phi)$ of this alignment? ### A "toy" score - For each $i \in V_1$: - score $\lambda$ if the node attributes match; that is, if $a_1(i) = a_2(\phi(i))$ - For each $ij \in V_1^2$: - score $\mu$ if they are both edges; that is, if $ij \in E_1$ and $\phi(i)\phi(j) \in E_2$ - score $\nu$ if the are both non-edges; that is, if $ij \not\in E_1$ and $\phi(i)\phi(j) \not\in E_2$ - (Is having both of these redundant?) This "toy score" doesn't pay any attention to the edge attributes. So: \begin{align} S_{G_1,G_2}(\phi) &= \lambda \sum_i \mathbb I\big[a_1(i) = a_2(\phi(i))\big] \\ &\qquad {}+ \mu \sum_{i,j} \mathbb I\big[ij \in E_1 \big]\mathbb I\big[ \phi(i)\phi(j) \in E_2\big] \\ &\qquad {}+ \nu \sum_{i,j} \mathbb I\big[ij \not\in E_1 \big]\mathbb I\big[ \phi(i)\phi(j) \not\in E_2\big] \end{align} Can we pick values of $\lambda, \mu, \nu$ that help line this toy score up somewhat with the priorities we have? Setting $\lambda = 0, \mu = \nu = 1$ gives the "add up the difference of the two adjacency matrices" that someone mentioned on Wednesday. ## Ideas: algorithms for alignment ### Iterative Optimisation #### Improvement heuristic with 'Guided' search - We try to match $G_1$, $G_2$ by an iterative optimisation. #### Genetic algorithm - We try to converge to a match between $G_{1}, G_{2}$ using a sequence of graph 'populations' $F_{k} := \{\tilde{G}^{k}_{1},\ldots,\tilde{G}^{k}_{n}\}$ at iteration $k$. At each iteration $k$ we: 1. Determine fitness of each member of the population 1. Until convergence repeat at iteration $k+1$: a. Select a subset of 'parents' $\Omega_{k}\subset F_{k}$ b. Crossover and generate new 'child' population using paired parents $\omega_{i},\omega_{j} \in \Omega_{k}$ c. Perform mutation on new population d. Determine fitness for new population $F_{k+1}$ #### Simulated annealing It can be good to ocassionally accept a worse alignment, if it allows one to avoid getting stuck in a "locally optimal" alignment. #### From Xuan Vinh Doan **Note from Xuan Vinh Doan (University of Warwick):** > Perhaps others will continue discussing the heuristic approach. > > I’ve had a quick search for network alignment problem and come up with the following review paper: https://dl.acm.org/doi/pdf/10.1145/3340531.3412168. The optimisation approach I believe is discussed in [1] and as mentioned [on Wednesday], we will be able to develop similar formulations once the dissimilarity function is established. The solution approach can be a first-order method for the relaxed problem or the community-based approach (as discussed today when one constructs communities graphs first and apply the alignment algorithm before aligning nodes in each pair of matched communities). ### Similarity heuristics - Optimal Transport + Laplacian covariance approach: [Wasserstein-based Graph Alignment](https://arxiv.org/pdf/2003.06048.pdf) - Isorank - Graph edit distance (need to tailor relative 'cost' of edit operations (e.g. vertex/edge insertion/deletion, flipping edge direction... )) ### Clustering (To do) ### Graph isomorphism algorithms How do `nauty`, `trace` etc work if you give them only "nearly-isomorphic" graphs. Graph isomorphism algorithms (as I understand it...) work by producing a "canonical labelling" of the vertices of a graph. Once we have two graphs canonically labelled, it's trivial to check if they are the same graph. Does a canonical labelling of our "almost-isomorphic" graphs help at all? #### Weisfeiler-Lehman/Graph Neural Network (GNN) 🤖 frameworks GNNs and WL procedures Using local label message passing scheme to generate additional vertex features $\varphi(v)$ that take native vertex/edge attributes into account to summarise local graph structure near the vertex. If $\varphi(v) \approx \varphi(u)$ for $u \in G_1$ and $v\in G_2$, then $u$ and $v$ may be likely to be matched. In WL tests, if the set of vertex wise features generated by two graphs using these procedures are identical, then they may isomorphic ![Illustration of WL-test from (https://resources.experfy.com/ai-ml/expressive-power-graph-neural-networks-weisfeiler-lehman/)](https://i.imgur.com/CGzqlnn.png) * **Pros:** Algorithms naturally incorporate vertex and edge labels into account * **Cons:** Potentially unstable w.r.t. edge direction/label 'errors' **References:** - Explicit architectures for undirected graph: [Graph Alignment Kernels using Weisfeiler and Leman Hierarchies](https://www.lix.polytechnique.fr/Labo/Ioannis.Nikolentzos/files/gawl_aistats23.pdf) - Graph alignment using GNNs in a semi-supervised framework [GANN: Graph Alignment Neural Network for Semi-Supervised Learning](https://arxiv.org/pdf/2303.07778.pdf). - Article linking WL with GNN [Weisfeiler and Leman Go Neural: Higher-order Graph Neural Networks](https://arxiv.org/pdf/1810.02244.pdf) - An example research article on comparing the expressiveness of WL methods to spectral methods [Weisfeiler–Leman and Graph Spectra](https://arxiv.org/pdf/2103.02972.pdf) - Links between other alignment methods, such as Isorank, with GNN approaches [Deep graph alignment network](https://www.sciencedirect.com/science/article/pii/S0925231221013461?ref=cra_js_challenge&fr=RR-1) - Training free approach [TRAINING FREE GRAPH NEURAL NETWORKS FOR GRAPH MATCHING](https://arxiv.org/pdf/2201.05349.pdf) ### Spectral things 👻 Can use one or two eigenvectors to embed a graph in 1D or 2D space The directedness of the graph is a problem here. Potential solution: [a Hermitian Laplacian for directed graphs](https://link.springer.com/article/10.1007/s00026-005-0237-z). Also problematic: spectral decomposition for large networks very expensive $O(n^3)$ if all eigenvalues, eigenvectors needed for method. (Is it $O(n^2)$ for sparse graphs?) Hard to incorporate labels on vertices/edges. If the directed graph is strongly connected, there is a unique largest eigenvalue with a real positive eigenvector -- but we don't expect our graph to be strongly connected. (But the PageRank trick -- adding a very low weight complete graph -- could work.) ### Expressing as a binary integer program Introduce binary variables $x_{ij}$, for $i \in V_1, j \in V_2$. The idea is that $x_{ij} = 1$ denotes "$i \in V_1$ is aligned with $j \in V_2$" and $x_{ij} = 0$ denotes they are not aligned. The constraints $$\sum_i x_{ij} \leq 1 \qquad \sum_j x_{ij} \leq 1 $$ ensure no node in one graph is matched with multiple nodes in the other graph. The less-than-or-equal allows us to not match up a node, if that node doesn't have a good sibling in the other graph. ## Notes from 22 March meeting

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully