<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.1 20151215//EN" "http://jats.nlm.nih.gov/publishing/1.1/JATS-journalpublishing1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:mml="http://www.w3.org/1998/Math/MathML" xml:lang="en" article-type="research-article" dtd-version="1.1">
<front>
<journal-meta>
<journal-id journal-id-type="pmc">CMC</journal-id>
<journal-id journal-id-type="nlm-ta">CMC</journal-id>
<journal-id journal-id-type="publisher-id">CMC</journal-id>
<journal-title-group>
<journal-title>Computers, Materials &#x0026; Continua</journal-title>
</journal-title-group>
<issn pub-type="epub">1546-2226</issn>
<issn pub-type="ppub">1546-2218</issn>
<publisher>
<publisher-name>Tech Science Press</publisher-name>
<publisher-loc>USA</publisher-loc>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">56434</article-id>
<article-id pub-id-type="doi">10.32604/cmc.2024.056434</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Article</subject>
</subj-group>
</article-categories>
<title-group>
<article-title>Position-Aware and Subgraph Enhanced Dynamic Graph Contrastive Learning on Discrete-Time Dynamic Graph</article-title>
<alt-title alt-title-type="left-running-head">Position-Aware and Subgraph Enhanced Dynamic Graph Contrastive Learning on Discrete-Time Dynamic Graph</alt-title>
<alt-title alt-title-type="right-running-head">Position-Aware and Subgraph Enhanced Dynamic Graph Contrastive Learning on Discrete-Time Dynamic Graph</alt-title>
</title-group>
<contrib-group>
<contrib id="author-1" contrib-type="author" corresp="yes">
<name name-style="western"><surname>Feng</surname><given-names>Jian</given-names></name><email>fengjian@xust.edu.cn</email></contrib>
<contrib id="author-2" contrib-type="author">
<name name-style="western"><surname>Liu</surname><given-names>Tian</given-names></name></contrib>
<contrib id="author-3" contrib-type="author">
<name name-style="western"><surname>Du</surname><given-names>Cailing</given-names></name></contrib>
<aff><institution>College of Computer Science &#x0026; Technology, Xi&#x2019;an University of Science and Technology</institution>, <addr-line>Xi&#x2019;an, 710054</addr-line>, <country>China</country></aff>
</contrib-group>
<author-notes>
<corresp id="cor1"><label>&#x002A;</label>Corresponding Author: Jian Feng. Email: <email>fengjian@xust.edu.cn</email></corresp>
</author-notes>
<pub-date date-type="collection" publication-format="electronic">
<year>2024</year>
</pub-date>
<pub-date date-type="pub" publication-format="electronic">
<day>18</day><month>11</month><year>2024</year>
</pub-date>
<volume>81</volume>
<issue>2</issue>
<fpage>2895</fpage>
<lpage>2909</lpage>
<history>
<date date-type="received">
<day>23</day>
<month>7</month>
<year>2024</year>
</date>
<date date-type="accepted">
<day>10</day>
<month>10</month>
<year>2024</year>
</date>
</history>
<permissions>
<copyright-statement>&#x00A9; 2024 The Authors.</copyright-statement>
<copyright-year>2024</copyright-year>
<copyright-holder>Published by Tech Science Press.</copyright-holder>
<license xlink:href="https://creativecommons.org/licenses/by/4.0/">
<license-p>This work is licensed under a <ext-link ext-link-type="uri" xlink:type="simple" xlink:href="https://creativecommons.org/licenses/by/4.0/">Creative Commons Attribution 4.0 International License</ext-link>, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
</license>
</permissions>
<self-uri content-type="pdf" xlink:href="TSP_CMC_56434.pdf"></self-uri>
<abstract>
<p>Unsupervised learning methods such as graph contrastive learning have been used for dynamic graph representation learning to eliminate the dependence of labels. However, existing studies neglect positional information when learning discrete snapshots, resulting in insufficient network topology learning. At the same time, due to the lack of appropriate data augmentation methods, it is difficult to capture the evolving patterns of the network effectively. To address the above problems, a position-aware and subgraph enhanced dynamic graph contrastive learning method is proposed for discrete-time dynamic graphs. Firstly, the global snapshot is built based on the historical snapshots to express the stable pattern of the dynamic graph, and the random walk is used to obtain the position representation by learning the positional information of the nodes. Secondly, a new data augmentation method is carried out from the perspectives of short-term changes and long-term stable structures of dynamic graphs. Specifically, subgraph sampling based on snapshots and global snapshots is used to obtain two structural augmentation views, and node structures and evolving patterns are learned by combining graph neural network, gated recurrent unit, and attention mechanism. Finally, the quality of node representation is improved by combining the contrastive learning between different structural augmentation views and between the two representations of structure and position. Experimental results on four real datasets show that the performance of the proposed method is better than the existing unsupervised methods, and it is more competitive than the supervised learning method under a semi-supervised setting.</p>
</abstract>
<kwd-group kwd-group-type="author">
<kwd>Dynamic graph representation learning</kwd>
<kwd>graph contrastive learning</kwd>
<kwd>structure representation</kwd>
<kwd>position representation</kwd>
<kwd>evolving pattern</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec id="s1">
<label>1</label>
<title>Introduction</title>
<p>Graphs are popular tools for representing relationships between entities and are widely used in various application fields, such as recommender systems [<xref ref-type="bibr" rid="ref-1">1</xref>] and intelligent transport systems [<xref ref-type="bibr" rid="ref-2">2</xref>]. To analyze graph data, high-dimensional graph structures are often mapped to low-dimensional representation vectors through graph representation learning to learn the structural and attribute features and use them for downstream tasks. However, graphs often exhibit dynamics over time in the real world, and how to learn the representation of dynamic graphs has become a significant research problem.</p>
<p>Based on the temporal granularity, the dynamic graphs can be categorized into continuous-time and discrete-time. Fine-grained temporal information required for continuous time dynamic graphs is often impractical due to privacy, noise, etc. Therefore, this paper studies Discrete-time Dynamic Graph Representation Learning (DDGRL) based on a series of snapshots.</p>
<p>DDGRL often employs structural models represented by Graph Neural Networks (GNN) to learn the topology of each snapshot and temporal models such as Recurrent Neural Networks (RNN) to capture the evolving pattern of the structure over time. However, due to the difficulty in obtaining labels, current studies often yield suboptimal performance via unsupervised learning. Recent studies have applied Graph Contrastive Learning (GCL) to dynamic graphs [<xref ref-type="bibr" rid="ref-3">3</xref>&#x2013;<xref ref-type="bibr" rid="ref-5">5</xref>], and the contrast between views obtained through data augmentation shows comparable competitiveness to supervised methods, but these methods rely on fine-grained temporal information. Therefore, the challenges of using GCL for DDGRL still exist.</p>
<p>The challenges manifest in learning the topology of snapshots and their evolving patterns. Firstly, when learning from snapshots, existing studies have tended to focus only on structural information and ignore positional information. For example, Node 3 and Node C will learn the same representation through GNN due to the same structure, which is shown in <xref ref-type="fig" rid="fig-1">Fig. 1a</xref> after dimensionality reduction. However, in terms of positions, Node 3 should be more like nodes belonging to the same component, such as Node 2, as shown in <xref ref-type="fig" rid="fig-1">Fig. 1b</xref>. Next, GCL tends to consider different nodes as negative examples, which will further push the representation of Node 3 and Node 2 farther away from each other, making the learned features overly concerned with structural information and ignoring positional information. Secondly, current studies lack effective data augmentation, making it challenging to capture the evolving patterns of snapshots. For example, snapshots can be treated as static graphs, and data augmentation can be achieved through subgraph sampling. However, subgraphs sampled independently from a series of snapshots have the potential to disrupt the evolving pattern of snapshots over time.</p>
<fig id="fig-1">
<label>Figure 1</label>
<caption>
<title>Comparison of structure and position</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-1.tif"/>
</fig>
<p>To address the above challenges, a Position-aware and Subgraph enhanced Dynamic Graph Contrastive Learning method (PSDGCL) is proposed. First, a global snapshot is generated for each time slice based on the historical snapshot. Second, on the one hand, the positions of nodes are captured from global snapshots by combining random walk and Multilayer Perceptron (MLP); on the other hand, based on snapshots and global snapshots, the evolving patterns are expressed as short-term changes and long-term stable structures, and after data augmentation by subgraph sampling from them, the structures of nodes in different views are learned by combining GNN, Gated Recurrent Unit (GRU) and attention mechanism. Finally, structure representations are learned through inter-view contrastive learning, and complementary information is learned from structure and position representation to generate node representations. The main contributions of this paper are as follows:
<list list-type="bullet">
<list-item>
<p>A dynamic graph contrastive learning method PSDGCL was proposed, which utilizes GNN to learn node structures and captures node positions through random walk, thereby improving the quality of node representation.</p></list-item>
<list-item>
<p>A data augmentation method based on subgraph sampling was designed, which comprehensively considers the short-term changes and long-term stable structures of dynamic graphs to help learn evolving patterns.</p></list-item>
<list-item>
<p>The experimental results on four real datasets show that the proposed method outperforms representative unsupervised methods and exhibits comparable or even better competitiveness compared to supervised methods.</p></list-item>
</list></p>
<p>The remaining sections of this paper are organized as follows. <xref ref-type="sec" rid="s2">Section 2</xref> reviews relevant studies. In <xref ref-type="sec" rid="s3">Section 3</xref>, we provides a detailed explanation of the proposed method. <xref ref-type="sec" rid="s4">Section 4</xref> presents our experimental results on four datasets. Finally, <xref ref-type="sec" rid="s5">Section 5</xref> concludes the paper.</p>
</sec>
<sec id="s2">
<label>2</label>
<title>Related Works</title>
<p>This paper explores GCL for DDGRL. Therefore, this section discusses the relevant methods of DDGRL and representative works of GCL.</p>
<sec id="s2_1">
<label>2.1</label>
<title>Discrete-Time Dynamic Graph Representation Learning</title>
<p>DDGRL tends to generalize static graph representation learning methods to dynamic graphs by adding designs that capture temporal features, usually categorized into three types: matrix decomposition, random walk, and GNN.</p>
<p>The matrix decomposition methods can either perform matrix decomposition on each snapshot and ensure the stability of the embedding through the time smoothing term in the loss function [<xref ref-type="bibr" rid="ref-6">6</xref>], or perform tensor decomposition by increasing the time dimension [<xref ref-type="bibr" rid="ref-7">7</xref>]. Similarly, the random walk methods perform random walks on each snapshot and concatenated them to obtain the final node representation [<xref ref-type="bibr" rid="ref-8">8</xref>], or incrementally update the node representations by performing randoms walk only for nodes affected by structural evolution [<xref ref-type="bibr" rid="ref-9">9</xref>]. However, these two methods are difficult to learn high-order nonlinear relations as shallow encoders.</p>
<p>With the development of GNN, the current typical paradigm is to learn the topology of each snapshot through GNN, and then learn the evolving patterns between snapshots through RNN [<xref ref-type="bibr" rid="ref-10">10</xref>]. On this basis, HTGN [<xref ref-type="bibr" rid="ref-11">11</xref>] has introduced hyperbolic spaces to learn the hierarchical characteristics, and HGWaveNet [<xref ref-type="bibr" rid="ref-12">12</xref>] aggregates a wider range of neighbor information through diffusion convolution and models temporal order using causal convolution. TTGCN [<xref ref-type="bibr" rid="ref-13">13</xref>] combines the K-Truss method to learn structural and temporal information from subgraphs of different scales. However, most of the above methods use graph reconstruction as the pretext task for unsupervised learning, and the model&#x2019;s good performance in graph reconstruction tasks is often difficult to transfer to downstream tasks such as node classification. In contrast, some methods using labels often achieve better performance. For example, SpikeNet [<xref ref-type="bibr" rid="ref-14">14</xref>] adoptes spiking neural networks (SNN) to replace RNN to reduce the computational cost, and Dy-SIGN [<xref ref-type="bibr" rid="ref-15">15</xref>] compensates the information through the original features for the discrete features obtained by SNN. SEIGN [<xref ref-type="bibr" rid="ref-16">16</xref>] makes it applicable to large-scale graphs through parameter free message passing. DyGNNExplainer [<xref ref-type="bibr" rid="ref-17">17</xref>] uses structural causal model to improve the interpretability of model. However, labels are often expensive or difficult to obtain. Encouraged by the success of contrastive learning, we hope to achieve performance comparable to or even better than supervised methods through GCL.</p>
</sec>
<sec id="s2_2">
<label>2.2</label>
<title>Graph Contrastive Learning</title>
<p>GCL requires carefully designed augmentation [<xref ref-type="bibr" rid="ref-18">18</xref>], but existing methods are not suitable for dynamic graphs due to ignoring temporal information. Therefore, Dynamic GCL (DGCL) often performs data augmentation from the perspective of topology and temporal evolution. For example, TGAC [<xref ref-type="bibr" rid="ref-3">3</xref>] prunes the original graph based on node centrality and edge existence time to generate different views. DyTSCL [<xref ref-type="bibr" rid="ref-4">4</xref>] constructs contrastive pairs through sampled structural or temporal related subgraphs. DyGCL [<xref ref-type="bibr" rid="ref-5">5</xref>] considers nodes with short time intervals as positive examples and nodes with long time intervals as negative examples based on the time span. However, these methods rely on fine-grained timestamps, so data augmentation needs to be designed for discrete snapshots. Meanwhile, studies often learn node representations through GNN, where the message passing paradigm combined with contrastive learning processes overly emphasizes structural information while neglecting node positional information.</p>
<p>To address the above problems, this paper introduces GCL to DDGRL to avoid the use of expensive labels. On the one hand, learning precise positional information is complex and difficult, especially for large-scale graphs. Inspired by random walk, utilizing its ability to learn similar representations for adjacent nodes, it is possible to approximately capture node positional information without being limited by the size of the graph. On the other hand, based on the characteristics of snapshots and the temporal information contained between snapshots, we consider strengthening the temporal information between snapshots and fully utilizing the existing achievements of GCL to help capture dynamic graph evolving patterns.</p>
</sec>
</sec>
<sec id="s3">
<label>3</label>
<title>Method</title>
<p>In this section, the relevant definitions are first introduced, then the overall framework of the PSDGCL is provided, and the modules are explained separately.</p>
<sec id="s3_1">
<label>3.1</label>
<title>Problem Definition</title>
<p>The discrete-time dynamic graph <inline-formula id="ieqn-1"><mml:math id="mml-ieqn-1"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow></mml:math></inline-formula> consists of a series of snapshots <inline-formula id="ieqn-2"><mml:math id="mml-ieqn-2"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, and <inline-formula id="ieqn-3"><mml:math id="mml-ieqn-3"><mml:mi>T</mml:mi></mml:math></inline-formula> is the number of snapshots. For the snapshot <inline-formula id="ieqn-4"><mml:math id="mml-ieqn-4"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:mo stretchy="false">(</mml:mo><mml:mi>V</mml:mi><mml:mo>,</mml:mo><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> corresponding to time slice <inline-formula id="ieqn-5"><mml:math id="mml-ieqn-5"><mml:mi>t</mml:mi></mml:math></inline-formula>, where <inline-formula id="ieqn-6"><mml:math id="mml-ieqn-6"><mml:mi>V</mml:mi><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mi>V</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> is the node set, <inline-formula id="ieqn-7"><mml:math id="mml-ieqn-7"><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the adjacency matrix of snapshot <inline-formula id="ieqn-8"><mml:math id="mml-ieqn-8"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-9"><mml:math id="mml-ieqn-9"><mml:msub><mml:mi>X</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is the node feature. The goal is to find a mapping function <inline-formula id="ieqn-10"><mml:math id="mml-ieqn-10"><mml:mi>f</mml:mi></mml:math></inline-formula> that learns node representation <inline-formula id="ieqn-11"><mml:math id="mml-ieqn-11"><mml:mi>Z</mml:mi></mml:math></inline-formula> for all nodes in the dynamic graph <inline-formula id="ieqn-12"><mml:math id="mml-ieqn-12"><mml:mrow><mml:mi>&#x1D4A2;</mml:mi></mml:mrow></mml:math></inline-formula> for downstream tasks, as shown in <xref ref-type="disp-formula" rid="eqn-1">Eq. (1)</xref>:
<disp-formula id="eqn-1"><label>(1)</label><mml:math id="mml-eqn-1" display="block"><mml:mi>Z</mml:mi><mml:mo>=</mml:mo><mml:mi>f</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:math></disp-formula></p>
</sec>
<sec id="s3_2">
<label>3.2</label>
<title>The Framework of PSDGCL</title>
<p>The framework of PSDGCL is shown in <xref ref-type="fig" rid="fig-2">Fig. 2</xref>. It consists of four main modules: global snapshot generation module, position learning module, structure learning module, and contrastive learning module. Firstly, global snapshots are generated based on a series of snapshots, which are used as inputs for the position learning module and structure learning module. Then, the position learning module learns node representations from a position perspective. The structure learning module captures the structure and evolving patterns. Finally, structure representation is learned through contrastive learning between views, while complementary information is learned through contrastive learning between structure and position representation.</p>
<fig id="fig-2">
<label>Figure 2</label>
<caption>
<title>The framework of PSDGCL</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-2.tif"/>
</fig>
<sec id="s3_2_1">
<label>3.2.1</label>
<title>Global Snapshot Generation Module</title>
<p>The global snapshot generation module aims to enhance the temporal information between snapshots and generate global snapshots as inputs to subsequent modules. Because each snapshot only records the interactions that occurred in the corresponding time slice, it is susceptible to random interference during data augmentation. To this end, a corresponding global snapshot is generated for each time slice based on the historical snapshot. Specifically, for time slice <inline-formula id="ieqn-13"><mml:math id="mml-ieqn-13"><mml:mi>t</mml:mi></mml:math></inline-formula>, all node interactions up to time step <inline-formula id="ieqn-14"><mml:math id="mml-ieqn-14"><mml:mi>t</mml:mi></mml:math></inline-formula> are obtained from the historical snapshots and recorded through the global snapshot <inline-formula id="ieqn-15"><mml:math id="mml-ieqn-15"><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, which is computed as shown in <xref ref-type="disp-formula" rid="eqn-2">Eq. (2)</xref>:
<disp-formula id="eqn-2"><label>(2)</label><mml:math id="mml-eqn-2" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>=</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>n</mml:mi><mml:mo>=</mml:mo><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:munderover><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-16"><mml:math id="mml-ieqn-16"><mml:mi>n</mml:mi></mml:math></inline-formula> denotes a time slice, <inline-formula id="ieqn-17"><mml:math id="mml-ieqn-17"><mml:msub><mml:mi>A</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-18"><mml:math id="mml-ieqn-18"><mml:msub><mml:mrow><mml:mover><mml:mi>A</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are the adjacency matrices of <inline-formula id="ieqn-19"><mml:math id="mml-ieqn-19"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>n</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-20"><mml:math id="mml-ieqn-20"><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, respectively.</p>
<p>In contrast, <inline-formula id="ieqn-21"><mml:math id="mml-ieqn-21"><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> contains the edges established within time slice <inline-formula id="ieqn-22"><mml:math id="mml-ieqn-22"><mml:mi>t</mml:mi></mml:math></inline-formula>, while <inline-formula id="ieqn-23"><mml:math id="mml-ieqn-23"><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> records all edges established up to time slice <inline-formula id="ieqn-24"><mml:math id="mml-ieqn-24"><mml:mi>t</mml:mi></mml:math></inline-formula>. That is, <inline-formula id="ieqn-25"><mml:math id="mml-ieqn-25"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>G</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> expresses the short-term changes of the dynamic graph, while <inline-formula id="ieqn-26"><mml:math id="mml-ieqn-26"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> expresses the long-term stable structure.</p>
</sec>
<sec id="s3_2_2">
<label>3.2.2</label>
<title>Position Learning Module</title>
<p>The position learning module aims to learn position-aware node features. Based on message passing, GNN makes it difficult to learn the positional information. As shown in <xref ref-type="fig" rid="fig-3">Fig. 3</xref>, GNN performs message passing and aggregation based on the computational graph of each node. In this process, the same structure between Node 3 and Node C will result in the same representation. Meanwhile, although Nodes 2 and 3 are adjacent, different representations will be obtained due to different computational graphs, and they will be pushed away in the contrastive learning process. Therefore, node positions should be captured to learn the topology of the snapshot fully.</p>
<fig id="fig-3">
<label>Figure 3</label>
<caption>
<title>Message passing mechanism</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-3.tif"/>
</fig>
<p>Inspired by the characteristic of learning similar representations for adjacent nodes through random walks, we adopt random walks to capture approximate positional information. Specifically, random walks are first executed for each global snapshot, because the differences between global snapshots are small compared to snapshots. Then, the representations obtained from each global snapshot are added together, and the position representation <inline-formula id="ieqn-27"><mml:math id="mml-ieqn-27"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is generated through MLP. The complete calculation process is shown in <xref ref-type="disp-formula" rid="eqn-3">Eq. (3)</xref>.
<disp-formula id="eqn-3"><label>(3)</label><mml:math id="mml-eqn-3" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>M</mml:mi><mml:mi>L</mml:mi><mml:mi>P</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:munderover><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:munderover><mml:mi>R</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>d</mml:mi><mml:mi>o</mml:mi><mml:mi>m</mml:mi><mml:mi>W</mml:mi><mml:mi>a</mml:mi><mml:mi>l</mml:mi><mml:mi>k</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>G</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>It is worth mentioning that we used all global snapshots instead of directly using the final global snapshot, in order to learn temporal information while capturing the positional information between nodes. For example, adjacent nodes in the final global snapshot may establish edges in different snapshots, the summation operation can make the learned representation more discriminative. Meanwhile, through MLP, the expressive power is enhanced without affecting the learned positional information, thus facilitating subsequent contrastive learning.</p>
</sec>
<sec id="s3_2_3">
<label>3.2.3</label>
<title>Structure Learning Module</title>
<p>The structure learning module aims to learn node representation from a structural perspective. First, the data augmentation method based on subgraph sampling is designed to generate two views. In order to better capture the evolving patterns of dynamic graphs, subgraphs are sampled from snapshots and global snapshots to capture short-term changes and long-term stable structures. Meanwhile, a hyperparameter <inline-formula id="ieqn-28"><mml:math id="mml-ieqn-28"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> is added to control the sampling ratio. Assuming that the overall size of the subgraphs is <inline-formula id="ieqn-29"><mml:math id="mml-ieqn-29"><mml:mi>M</mml:mi></mml:math></inline-formula> nodes, the sizes of subgraph sampled from snapshots and global snapshots are <inline-formula id="ieqn-30"><mml:math id="mml-ieqn-30"><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03B1;</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mi>M</mml:mi></mml:math></inline-formula> and <inline-formula id="ieqn-31"><mml:math id="mml-ieqn-31"><mml:mi>&#x03B1;</mml:mi><mml:mi>M</mml:mi></mml:math></inline-formula> nodes, respectively.</p>
<p>Secondly, combining GNN and GRU to learn corresponding node representations for each time slice. For a series of subgraphs sampled by node <inline-formula id="ieqn-32"><mml:math id="mml-ieqn-32"><mml:mi>v</mml:mi></mml:math></inline-formula> in each view, taking time slice <inline-formula id="ieqn-33"><mml:math id="mml-ieqn-33"><mml:mi>t</mml:mi></mml:math></inline-formula> as an example, the process of GNN aggregating messages of neighbor nodes to update the representation of central nodes is shown in <xref ref-type="disp-formula" rid="eqn-4">Eqs. (4)</xref> and <xref ref-type="disp-formula" rid="eqn-5">(5)</xref>:
<disp-formula id="eqn-4"><label>(4)</label><mml:math id="mml-eqn-4" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mi>C</mml:mi><mml:mi>O</mml:mi><mml:mi>M</mml:mi><mml:mi>B</mml:mi><mml:mi>I</mml:mi><mml:mi>N</mml:mi><mml:msup><mml:mi>E</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-5"><label>(5)</label><mml:math id="mml-eqn-5" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>n</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>A</mml:mi><mml:mi>G</mml:mi><mml:mi>G</mml:mi><mml:mi>R</mml:mi><mml:mi>E</mml:mi><mml:mi>G</mml:mi><mml:mi>A</mml:mi><mml:mi>T</mml:mi><mml:mi>I</mml:mi><mml:mi>O</mml:mi><mml:msup><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>&#x003A;</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>,</mml:mo><mml:mrow><mml:mo>{</mml:mo><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>i</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>&#x003A;</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>i</mml:mi><mml:mo>&#x2208;</mml:mo><mml:msub><mml:mrow><mml:mover><mml:mi>N</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo>}</mml:mo></mml:mrow><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-34"><mml:math id="mml-ieqn-34"><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> is the <inline-formula id="ieqn-35"><mml:math id="mml-ieqn-35"><mml:mi>k</mml:mi></mml:math></inline-formula>-th layer representation of the node <inline-formula id="ieqn-36"><mml:math id="mml-ieqn-36"><mml:mi>v</mml:mi></mml:math></inline-formula> in the time slice <inline-formula id="ieqn-37"><mml:math id="mml-ieqn-37"><mml:mi>t</mml:mi></mml:math></inline-formula>, especially <inline-formula id="ieqn-38"><mml:math id="mml-ieqn-38"><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mn>0</mml:mn><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:msub><mml:mi>x</mml:mi><mml:mrow><mml:mi>v</mml:mi><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>. <inline-formula id="ieqn-39"><mml:math id="mml-ieqn-39"><mml:msub><mml:mi>N</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and <inline-formula id="ieqn-40"><mml:math id="mml-ieqn-40"><mml:msub><mml:mrow><mml:mover><mml:mi>N</mml:mi><mml:mo stretchy="false">&#x005E;</mml:mo></mml:mover></mml:mrow><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> denote the neighbor of node <inline-formula id="ieqn-41"><mml:math id="mml-ieqn-41"><mml:mi>v</mml:mi></mml:math></inline-formula> in subgraph sampled from snapshot and global snapshot. In this paper, <inline-formula id="ieqn-42"><mml:math id="mml-ieqn-42"><mml:mi>C</mml:mi><mml:mi>O</mml:mi><mml:mi>M</mml:mi><mml:mi>B</mml:mi><mml:mi>I</mml:mi><mml:mi>N</mml:mi><mml:msup><mml:mi>E</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> and <inline-formula id="ieqn-43"><mml:math id="mml-ieqn-43"><mml:mi>A</mml:mi><mml:mi>G</mml:mi><mml:mi>G</mml:mi><mml:mi>R</mml:mi><mml:mi>E</mml:mi><mml:mi>G</mml:mi><mml:mi>A</mml:mi><mml:mi>T</mml:mi><mml:mi>I</mml:mi><mml:mi>O</mml:mi><mml:msup><mml:mi>N</mml:mi><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>k</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msup></mml:math></inline-formula> are selected to sum and mean, respectively. After the <inline-formula id="ieqn-44"><mml:math id="mml-ieqn-44"><mml:mi>L</mml:mi></mml:math></inline-formula>-layer calculation, the output of the GNN is denoted by <inline-formula id="ieqn-45"><mml:math id="mml-ieqn-45"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, where <inline-formula id="ieqn-46"><mml:math id="mml-ieqn-46"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msubsup><mml:mi>h</mml:mi><mml:mrow><mml:msub><mml:mi>v</mml:mi><mml:mrow><mml:mrow><mml:mo>|</mml:mo><mml:mi>V</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> is the representation of all nodes of the time slice <inline-formula id="ieqn-47"><mml:math id="mml-ieqn-47"><mml:mi>t</mml:mi></mml:math></inline-formula> corresponding to the snapshot.</p>
<p>GRU is used to learn the temporal features between snapshots. Taking <inline-formula id="ieqn-48"><mml:math id="mml-ieqn-48"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup></mml:math></inline-formula> as an example, the calculation process is shown in <xref ref-type="disp-formula" rid="eqn-6">Eqs. (6)</xref>&#x2013;<xref ref-type="disp-formula" rid="eqn-6">(9)</xref>:
<disp-formula id="eqn-6"><label>(6)</label><mml:math id="mml-eqn-6" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-7"><label>(7)</label><mml:math id="mml-eqn-7" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>z</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>&#x03C3;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>z</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>z</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-8"><label>(8)</label><mml:math id="mml-eqn-8" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>h</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>h</mml:mi></mml:mrow></mml:msub><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:mi>L</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:msubsup><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>r</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2A00;</mml:mo><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>h</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-9"><label>(9)</label><mml:math id="mml-eqn-9" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mi>z</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>&#x2A00;</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:msub><mml:mi>z</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mo>&#x2A00;</mml:mo><mml:msub><mml:mi>n</mml:mi><mml:mrow><mml:mi>t</mml:mi></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-49"><mml:math id="mml-ieqn-49"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-50"><mml:math id="mml-ieqn-50"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>r</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-51"><mml:math id="mml-ieqn-51"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>z</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-52"><mml:math id="mml-ieqn-52"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>z</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-53"><mml:math id="mml-ieqn-53"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-54"><mml:math id="mml-ieqn-54"><mml:msub><mml:mi>U</mml:mi><mml:mrow><mml:mi>h</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are the weights of reset gate, update gate and <inline-formula id="ieqn-55"><mml:math id="mml-ieqn-55"><mml:mi>t</mml:mi><mml:mi>a</mml:mi><mml:mi>n</mml:mi><mml:mi>h</mml:mi></mml:math></inline-formula> function, respectively, <inline-formula id="ieqn-56"><mml:math id="mml-ieqn-56"><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>t</mml:mi><mml:mo>&#x2212;</mml:mo><mml:mn>1</mml:mn></mml:mrow></mml:msub></mml:math></inline-formula> is the hidden state of the previous moment, and <inline-formula id="ieqn-57"><mml:math id="mml-ieqn-57"><mml:mo>&#x2A00;</mml:mo></mml:math></inline-formula> denotes the Hadamard product. The hidden state <inline-formula id="ieqn-58"><mml:math id="mml-ieqn-58"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula> of each time slice in GRU is used as the node representation after learning the temporal information.</p>
<p>Finally, based on <inline-formula id="ieqn-59"><mml:math id="mml-ieqn-59"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, the structure representation <inline-formula id="ieqn-60"><mml:math id="mml-ieqn-60"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is obtained through the attention mechanism for contrastive learning. The calculation process is as follows:
<disp-formula id="eqn-10"><label>(10)</label><mml:math id="mml-eqn-10" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:mi>&#x03B8;</mml:mi><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>s</mml:mi><mml:mi>o</mml:mi><mml:mi>f</mml:mi><mml:mi>t</mml:mi><mml:mi>m</mml:mi><mml:mi>a</mml:mi><mml:mi>x</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mfrac><mml:mrow><mml:mrow><mml:mo>(</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup></mml:mrow><mml:msqrt><mml:mi>d</mml:mi></mml:msqrt></mml:mfrac><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>
<disp-formula id="eqn-11"><label>(11)</label><mml:math id="mml-eqn-11" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>&#x03B8;</mml:mi><mml:mrow><mml:mo>(</mml:mo><mml:mi>H</mml:mi><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>v</mml:mi></mml:mrow></mml:msub><mml:mo>)</mml:mo></mml:mrow></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-61"><mml:math id="mml-ieqn-61"><mml:mi>H</mml:mi><mml:mo>=</mml:mo><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mo>&#x2026;</mml:mo><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:mrow><mml:mo stretchy="false">|</mml:mo></mml:mrow><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>, <inline-formula id="ieqn-62"><mml:math id="mml-ieqn-62"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>q</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-63"><mml:math id="mml-ieqn-63"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>k</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula>, <inline-formula id="ieqn-64"><mml:math id="mml-ieqn-64"><mml:msub><mml:mi>W</mml:mi><mml:mrow><mml:mi>v</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are trainable parameters, and <inline-formula id="ieqn-65"><mml:math id="mml-ieqn-65"><mml:mi>d</mml:mi></mml:math></inline-formula> is the dimension of vector <inline-formula id="ieqn-66"><mml:math id="mml-ieqn-66"><mml:mo fence="false" stretchy="false">{</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:mo>&#x2026;</mml:mo><mml:mo>,</mml:mo><mml:msub><mml:mi>h</mml:mi><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msub><mml:mo fence="false" stretchy="false">}</mml:mo></mml:math></inline-formula>. For the two different views generated, the results are recorded as <inline-formula id="ieqn-67"><mml:math id="mml-ieqn-67"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> and <inline-formula id="ieqn-68"><mml:math id="mml-ieqn-68"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula>.</p>
</sec>
<sec id="s3_2_4">
<label>3.2.4</label>
<title>Contrastive Learning Module</title>
<p>The contrastive learning module contrasts the representations learned by the above modules and optimizes the model while obtaining the final node representation. Specifically, firstly, for the representations <inline-formula id="ieqn-69"><mml:math id="mml-ieqn-69"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> and <inline-formula id="ieqn-70"><mml:math id="mml-ieqn-70"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> under the two views of the structure learning module, the representations from the same node are pulled closer, and the representations from different nodes are pushed away to learn the distinguishable structure representation. Taking the corresponding representation <inline-formula id="ieqn-71"><mml:math id="mml-ieqn-71"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and <inline-formula id="ieqn-72"><mml:math id="mml-ieqn-72"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> of node <inline-formula id="ieqn-73"><mml:math id="mml-ieqn-73"><mml:mi>v</mml:mi></mml:math></inline-formula> as an example, the following loss is adopted [<xref ref-type="bibr" rid="ref-19">19</xref>]:
<disp-formula id="eqn-12"><label>(12)</label><mml:math id="mml-eqn-12" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo>|</mml:mo><mml:mi>V</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mfrac><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>V</mml:mi></mml:mrow></mml:munder><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>u</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>v</mml:mi></mml:mrow></mml:msub><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-74"><mml:math id="mml-ieqn-74"><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is the projection function of MLP, and <inline-formula id="ieqn-75"><mml:math id="mml-ieqn-75"><mml:mi>&#x03C4;</mml:mi></mml:math></inline-formula> is the temperature parameter.</p>
<p>Secondly, there should be a complementary relationship between the position representation and structure representation for the same node, so <inline-formula id="ieqn-76"><mml:math id="mml-ieqn-76"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> is contrasted with the <inline-formula id="ieqn-77"><mml:math id="mml-ieqn-77"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> or <inline-formula id="ieqn-78"><mml:math id="mml-ieqn-78"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula>. Taking <inline-formula id="ieqn-79"><mml:math id="mml-ieqn-79"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> as an example, the contrastive learning of <inline-formula id="ieqn-80"><mml:math id="mml-ieqn-80"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> and <inline-formula id="ieqn-81"><mml:math id="mml-ieqn-81"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mo stretchy="false">(</mml:mo><mml:mi>v</mml:mi><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> for node <inline-formula id="ieqn-82"><mml:math id="mml-ieqn-82"><mml:mi>v</mml:mi></mml:math></inline-formula> is as follows:
<disp-formula id="eqn-13"><label>(13)</label><mml:math id="mml-eqn-13" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mo>&#x2212;</mml:mo><mml:mfrac><mml:mn>1</mml:mn><mml:mrow><mml:mo>|</mml:mo><mml:mi>V</mml:mi><mml:mo>|</mml:mo></mml:mrow></mml:mfrac><mml:munder><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>v</mml:mi><mml:mo>&#x2208;</mml:mo><mml:mi>V</mml:mi></mml:mrow></mml:munder><mml:mi>log</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mfrac><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>q</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow><mml:mrow><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>q</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:msub><mml:mo movablelimits="false">&#x2211;</mml:mo><mml:mrow><mml:mi>u</mml:mi><mml:mo>&#x2260;</mml:mo><mml:mi>v</mml:mi></mml:mrow></mml:msub><mml:mi>exp</mml:mi><mml:mo>&#x2061;</mml:mo><mml:mrow><mml:mo>(</mml:mo><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup><mml:mrow><mml:mo>(</mml:mo><mml:mi>v</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msup><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mi>T</mml:mi></mml:mrow></mml:msup><mml:mi>q</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mrow><mml:mo>(</mml:mo><mml:mi>u</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:mo stretchy="false">)</mml:mo><mml:mrow><mml:mo>/</mml:mo></mml:mrow><mml:mi>&#x03C4;</mml:mi><mml:mo>)</mml:mo></mml:mrow></mml:mrow></mml:mfrac></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula>where <inline-formula id="ieqn-83"><mml:math id="mml-ieqn-83"><mml:mi>q</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula> is a different projection function from <inline-formula id="ieqn-84"><mml:math id="mml-ieqn-84"><mml:mi>p</mml:mi><mml:mo stretchy="false">(</mml:mo><mml:mo>&#x22C5;</mml:mo><mml:mo stretchy="false">)</mml:mo></mml:math></inline-formula>, because <inline-formula id="ieqn-85"><mml:math id="mml-ieqn-85"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-86"><mml:math id="mml-ieqn-86"><mml:msubsup><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msubsup></mml:math></inline-formula> are in different representation spaces. The total loss function is:
<disp-formula id="eqn-14"><label>(14)</label><mml:math id="mml-eqn-14" display="block"><mml:mtable rowspacing="4pt" columnspacing="1em"><mml:mtr><mml:mtd><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mspace width="thinmathspace" /><mml:mo>=</mml:mo><mml:mspace width="thinmathspace" /><mml:mi>&#x03B2;</mml:mi><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mn>1</mml:mn></mml:mrow></mml:msub><mml:mspace width="thinmathspace" /><mml:mo>+</mml:mo><mml:mspace width="thinmathspace" /><mml:mrow><mml:mo>(</mml:mo><mml:mn>1</mml:mn><mml:mo>&#x2212;</mml:mo><mml:mi>&#x03B2;</mml:mi><mml:mo>)</mml:mo></mml:mrow><mml:msub><mml:mrow><mml:mi>&#x02112;</mml:mi></mml:mrow><mml:mrow><mml:mn>2</mml:mn></mml:mrow></mml:msub></mml:mtd></mml:mtr></mml:mtable></mml:math></disp-formula></p>
<p>Finally, <inline-formula id="ieqn-87"><mml:math id="mml-ieqn-87"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> and <inline-formula id="ieqn-88"><mml:math id="mml-ieqn-88"><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub></mml:math></inline-formula> are concatenated to obtain the final node representation <inline-formula id="ieqn-89"><mml:math id="mml-ieqn-89"><mml:mi>Z</mml:mi><mml:mo>=</mml:mo><mml:mo stretchy="false">[</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>s</mml:mi></mml:mrow></mml:msub><mml:mo>,</mml:mo><mml:msub><mml:mi>H</mml:mi><mml:mrow><mml:mi>p</mml:mi></mml:mrow></mml:msub><mml:mo stretchy="false">]</mml:mo></mml:math></inline-formula>.</p>
</sec>
</sec>
</sec>
<sec id="s4">
<label>4</label>
<title>Experiments</title>
<p>In order to verify the effectiveness of the model PSDGCL, experiments are designed to answer the following questions:</p>
<p>Question 1: Does PSDGCL outperform competing baselines?</p>
<p>Question 2: Are the critical components of PSDGCL helpful for improving the quality of learned representations?</p>
<p>Question 3: What are the impacts of hyperparameters on PSDGCL?</p>
<p>Question 4: How about the time complexity and space complexity of PSDGCL?</p>
<sec id="s4_1">
<label>4.1</label>
<title>Datasets and Experiment Settings</title>
<sec id="s4_1_1">
<label>4.1.1</label>
<title>Datasets</title>
<p><xref ref-type="table" rid="table-1">Table 1</xref> shows the dataset used in the experiment, including bitcoin trading dataset Bitcoinotc, movie rating dataset ML1M, citation dataset DBLP, and tax transaction dataset TAX51.</p>
<table-wrap id="table-1">
<label>Table 1</label>
<caption>
<title>Datasets</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Dataset</th>
<th># nodes</th>
<th># edges</th>
<th># snapshots</th>
<th># classes</th>
</tr>
</thead>
<tbody>
<tr>
<td>Bitcoinotc</td>
<td>5881</td>
<td>35,592</td>
<td>15</td>
<td>3</td>
</tr>
<tr>
<td>ML1M</td>
<td>9062</td>
<td>800,261</td>
<td>22</td>
<td>5</td>
</tr>
<tr>
<td>DBLP</td>
<td>28,085</td>
<td>236,894</td>
<td>27</td>
<td>10</td>
</tr>
<tr>
<td>TAX51</td>
<td>132,524</td>
<td>467,279</td>
<td>19</td>
<td>51</td>
</tr>
</tbody>
</table>
</table-wrap>
</sec>
<sec id="s4_1_2">
<label>4.1.2</label>
<title>Baselines</title>
<p>Six dynamic graph representation learning methods were selected as the baseline, including one supervised method and five unsupervised methods, in order:
<list list-type="order">
<list-item>
<p>SpikeNet [<xref ref-type="bibr" rid="ref-14">14</xref>]: The supervised method combines GNN and SNN to learn the structural features and temporal features in the dynamic graph.</p></list-item>
<list-item>
<p>MNCI [<xref ref-type="bibr" rid="ref-20">20</xref>]: Mining the influence of neighborhood and community, and updating the node embeddings after interaction through GRU.</p></list-item>
<list-item>
<p>TGAT [<xref ref-type="bibr" rid="ref-21">21</xref>]: On the basis of a graph attention network, time information is incorporated through a time embedding function.</p></list-item>
<list-item>
<p>EvolveGCN [<xref ref-type="bibr" rid="ref-10">10</xref>]: Modeling the evolution of GNN parameters through GRU to capture dynamics from the evolving parameters.</p></list-item>
<list-item>
<p>HTGN [<xref ref-type="bibr" rid="ref-11">11</xref>]: Following the classic frameworks of GNN and GRU, hyperbolic space is introduced to capture the hierarchical structure of the network.</p></list-item>
<list-item>
<p>HGWaveNet [<xref ref-type="bibr" rid="ref-12">12</xref>]: Diffusion convolution is used to increase the receptive field, and causal convolution is used to ensure that the temporal modeling order is not violated.</p></list-item>
</list></p>
</sec>
<sec id="s4_1_3">
<label>4.1.3</label>
<title>Implementation Details</title>
<p>The node classification task is used to verify the validity of the model. For the unsupervised method, after using graph reconstruction as a pretext task to obtain the node representation, a classifier is trained with 20% labels. For supervised methods, end-to-end models are trained using different proportions of labels under semi-supervised settings. For multi-classification tasks, the evaluation index selects Micro-F1 to consider the number of samples of different classes and adapt to the uneven distribution of classes.</p>
</sec>
</sec>
<sec id="s4_2">
<label>4.2</label>
<title>Experiment 1: Comparative Experiment</title>
<p>For Question 1, Experiment 1 compares the performance of PSDGCL with each baseline. <xref ref-type="table" rid="table-2">Table 2</xref> shows the comparison results on the four datasets. It is worth noting that the supervised method SpikeNet uses different proportions of labels for training. The bolded results in the table are the optimal results, and the underlined results are sub-optimal results.</p>
<table-wrap id="table-2">
<label>Table 2</label>
<caption>
<title>Performance comparison</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th>Method</th>
<th>Bitcoinotc</th>
<th>ML1M</th>
<th>DBLP</th>
<th>TAX51</th>
</tr>
</thead>
<tbody>
<tr>
<td>SpikeNet (20%)</td>
<td>0.5675</td>
<td>0.6119</td>
<td>0.6750</td>
<td>0.3896</td>
</tr>
<tr>
<td>SpikeNet (25%)</td>
<td>0.5770</td>
<td>0.6240</td>
<td>0.6891</td>
<td>0.3946</td>
</tr>
<tr>
<td>SpikeNet (30%)</td>
<td>0.5839</td>
<td><underline>0.6388</underline></td>
<td><underline>0.6981</underline></td>
<td><underline>0.3964</underline></td>
</tr>
<tr>
<td>MNCI</td>
<td>0.5577</td>
<td>0.5914</td>
<td>0.6608</td>
<td>0.3819</td>
</tr>
<tr>
<td>TGAT</td>
<td><underline>0.5896</underline></td>
<td>0.6246</td>
<td>0.6681</td>
<td>0.3812</td>
</tr>
<tr>
<td>EvolveGCN</td>
<td>0.5486</td>
<td>0.6027</td>
<td>0.6593</td>
<td>0.3878</td>
</tr>
<tr>
<td>HTGN</td>
<td>0.5683</td>
<td>0.6184</td>
<td>0.6432</td>
<td>0.3853</td>
</tr>
<tr>
<td>HGWaveNet</td>
<td>0.5409</td>
<td>0.5808</td>
<td>0.6287</td>
<td>0.3246</td>
</tr>
<tr>
<td>PSDGCL</td>
<td><bold>0.6017</bold></td>
<td><bold>0.6392</bold></td>
<td><bold>0.7734</bold></td>
<td><bold>0.4738</bold></td>
</tr>
</tbody>
</table>
</table-wrap>
<p>From <xref ref-type="table" rid="table-2">Table 2</xref>, we can see that PSDGCL outperforms all baselines. In unsupervised methods, MNCI uses GRU to capture neighbor interactions, which performs worse than other GNN based methods. EvolveGCN uses GRU to model GNN parameter changes, which is more flexible but not as effective as directly learning temporal features. The HTGN based on hyperbolic space fully learns the hierarchical structure of nodes, which helps with node classification to some extent, while HGWaveNet perform poorly due to its focus on modeling edges. Although TGAT performs well, it uses graph reconstruction as the pretext task like the above methods, and the good performance in the graph reconstruction task is difficult to migrate to the node classification task. In contrast, PSDGCL takes into account the node structure and position through GCL, and achieves the best results in unsupervised methods. The supervised method SpikeNet benefits from the use of labels, outperforming most unsupervised methods when using 20% labels, and can continuously gain benefits as the proportion of label usage increases. When using the same number of labels, PSDGCL outperforms SpikeNet because all samples can be used for training based on GCL, while SpikeNet uses a much smaller number of labeled samples in a semi-supervised setting, which is particularly evident on large-scale datasets. In addition, PSDGCL has limited improvement on the ML1M dataset, possibly due to its smaller time scale and more frequent interactions between nodes.</p>

</sec>
<sec id="s4_3">
<label>4.3</label>
<title>Experiment 2: Ablation Experiment</title>
<p>For Question 2, Experiment 2 verifies the impact of different modules in PSDGCL on the results. To this end, two model variants, PSDGCL-RW and PSDGCL-AUG, are designed, which represent the removal of the position learning module and the removal of the global snapshot in the subgraph sampling. <xref ref-type="fig" rid="fig-4">Fig. 4</xref> shows the experimental results on different datasets.</p>
<fig id="fig-4">
<label>Figure 4</label>
<caption>
<title>Ablation experiments</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-4.tif"/>
</fig>
<p>It can be seen from <xref ref-type="fig" rid="fig-4">Fig. 4</xref> that PSDGCL has the best performance because it comprehensively considers the structural information and positional information of nodes, and helps to capture the evolving pattern of dynamic graphs through global snapshots. Due to the differences in the characteristics of datasets, different modules have different effects on different datasets. Only by comprehensively considering all factors can a robust node representation be learned.</p>

</sec>
<sec id="s4_4">
<label>4.4</label>
<title>Experiment 3: Hyperparameter Experiment</title>
<p>For Question 3, Experiment 3 studies the performance of the model under different hyperparameters, including the sampling <italic>K</italic>-hop subgraphs, the sampling ratio <inline-formula id="ieqn-90"><mml:math id="mml-ieqn-90"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula>, and the loss weight <inline-formula id="ieqn-91"><mml:math id="mml-ieqn-91"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula>.</p>
<p><bold><italic>K</italic>-hop subgraph.</bold> The larger the sampled subgraph is, the more information is learned, but at the same time, more noise is introduced. Therefore, different subgraph sizes are sampled for experiments with different datasets. Considering the problem of space occupation and efficiency, we set <italic>K</italic> to {1, 2, 3}, and the experimental results are shown in <xref ref-type="fig" rid="fig-5">Fig. 5</xref>.</p>
<fig id="fig-5">
<label>Figure 5</label>
<caption>
<title>Analysis of subgraph size</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-5.tif"/>
</fig>
<p>From <xref ref-type="fig" rid="fig-5">Fig. 5</xref>, it can be seen that subgraph size has a certain impact on performance, but it is not necessarily better to have a larger subgraph. Even a one-hop subgraph can often guarantee performance, which indicates that the node is closely related to its one-hop neighbors, and as the size of the subgraph increases, the risk of introducing noise also increases.</p>

<p><bold>Sampling ratio</bold> <inline-formula id="ieqn-92"><mml:math id="mml-ieqn-92"><mml:mi mathvariant="bold-italic">&#x03B1;</mml:mi></mml:math></inline-formula><bold>.</bold> The views generated by <inline-formula id="ieqn-93"><mml:math id="mml-ieqn-93"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> control tend to learn more structural changes or more stable patterns to adapt to the characteristics of different types of data. The experimental results of the four datasets are shown in <xref ref-type="fig" rid="fig-6">Fig. 6</xref>.</p>
<fig id="fig-6">
<label>Figure 6</label>
<caption>
<title>Analysis of sampling ratio</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-6.tif"/>
</fig>
<p>It can be seen that as <inline-formula id="ieqn-94"><mml:math id="mml-ieqn-94"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> increases, the proportion of neighbors sampled from the global snapshot increases, and the performance often increases, which indicates that the global snapshot helps to learn the evolving pattern of the dynamic graph, thereby improving the quality of the learned representation. At the same time, <inline-formula id="ieqn-95"><mml:math id="mml-ieqn-95"><mml:mi>&#x03B1;</mml:mi></mml:math></inline-formula> should not be too large, considering the short-term changes and long-term stable structure of the dynamic graph can better learn the evolving pattern.</p>
<p><bold>Loss weight</bold> <inline-formula id="ieqn-96"><mml:math id="mml-ieqn-96"><mml:mi mathvariant="bold-italic">&#x03B2;</mml:mi></mml:math></inline-formula><bold>.</bold> The hyperparameter <inline-formula id="ieqn-97"><mml:math id="mml-ieqn-97"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> reflects the weights of two terms in the loss function. The larger the <inline-formula id="ieqn-98"><mml:math id="mml-ieqn-98"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> is, the greater the impact of the contrast between the structural views on the model performance. On the contrary, it is necessary to contrast the structure representation and the position representation to learn the complementary information. The specific experimental results are shown in <xref ref-type="fig" rid="fig-7">Fig. 7</xref>.</p>
<fig id="fig-7">
<label>Figure 7</label>
<caption>
<title>Analysis of loss weight</title>
</caption>
<graphic mimetype="image" mime-subtype="tif" xlink:href="CMC_56434-fig-7.tif"/>
</fig>
<p>It can be seen that both terms in the loss function can help the model learn a better representation. The performance is often optimal when <inline-formula id="ieqn-99"><mml:math id="mml-ieqn-99"><mml:mi>&#x03B2;</mml:mi></mml:math></inline-formula> reaches a small value, which indicates that the contrastive learning of structure representation and position representation can help learn complementary information to improve the quality of node representation.</p>
</sec>
<sec id="s4_5">
<label>4.5</label>
<title>Experiment 4: Complexity Experiment</title>
<p>For Question 4, Experiment 4 compares the time and space complexity of PSDGCL with baselines. In <xref ref-type="table" rid="table-3">Table 3</xref>, we measure the time and space complexity by the model training time for each epoch (T) and the number of parameters (N), measured in seconds (s) and millions (M), respectively.</p>
<table-wrap id="table-3">
<label>Table 3</label>
<caption>
<title>Complexity comparison</title>
</caption>
<table frame="hsides">
<colgroup>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
<col align="left"/>
</colgroup>
<thead>
<tr>
<th rowspan="2">Method</th>
<th colspan="2">Bitcoinotc</th>
<th colspan="2">ML1M</th>
<th colspan="2">DBLP</th>
<th colspan="2">TAX51</th>
</tr>
<tr>
<th>T (s)</th>
<th>N (M)</th>
<th>T (s)</th>
<th>N (M)</th>
<th>T (s)</th>
<th>N (M)</th>
<th>T (s)</th>
<th>N (M)</th>
</tr>
</thead>
<tbody>
<tr>
<td>SpikeNet</td>
<td>0.237</td>
<td>0.04</td>
<td>0.187</td>
<td>0.04</td>
<td>2.533</td>
<td>0.04</td>
<td>2.406</td>
<td>0.05</td>
</tr>
<tr>
<td>MNCI</td>
<td>36.759</td>
<td>3.22</td>
<td>241.523</td>
<td>4.85</td>
<td>94.484</td>
<td>14.63</td>
<td>557.680</td>
<td>68.31</td>
</tr>
<tr>
<td>TGAT</td>
<td>12.962</td>
<td>12.05</td>
<td>423.910</td>
<td>208.62</td>
<td>107.736</td>
<td>69.26</td>
<td>214.268</td>
<td>154.98</td>
</tr>
<tr>
<td>EvolveGCN</td>
<td>0.224</td>
<td>1.64</td>
<td>1.046</td>
<td>2.05</td>
<td>0.978</td>
<td>4.48</td>
<td>10.926</td>
<td>17.85</td>
</tr>
<tr>
<td>HTGN</td>
<td>0.798</td>
<td>0.98</td>
<td>2.801</td>
<td>1.39</td>
<td>5.652</td>
<td>3.83</td>
<td>18.345</td>
<td>17.20</td>
</tr>
<tr>
<td>HGWaveNet</td>
<td>1.397</td>
<td>0.76</td>
<td>77.571</td>
<td>1.17</td>
<td>4.396</td>
<td>3.61</td>
<td>16.232</td>
<td>16.97</td>
</tr>
<tr>
<td>PSDGCL</td>
<td>1.283</td>
<td>0.34</td>
<td>12.142</td>
<td>0.45</td>
<td>8.434</td>
<td>0.37</td>
<td>29.485</td>
<td>0.46</td>
</tr>
</tbody>
</table>
</table-wrap>
<p><xref ref-type="table" rid="table-3">Table 3</xref> shows that SpikeNet has the lowest complexity, which is due to the fact that semi-supervised learning only requires a few samples and the lightweight design of the model based on SNN. For unsupervised methods, the negative sampling process of contrastive learning makes PSDGCL have a higher time complexity, but this is acceptable compared to the performance improvement. Moreover, PSDGCL does not depend on complex model design and has space complexity second only to SpikeNet.</p>

</sec>
</sec>
<sec id="s5">
<label>5</label>
<title>Conclusion</title>
<p>This paper proposes a new DGCL method PSDGCL, which is characterized by learning the structure and position of nodes at the same time to improve the quality of the learned node representation. Specifically, on the one hand, PSDGCL combines random walk and MLP to learn position-aware node representations. On the other hand, on the basis of using snapshots and global snapshots to express evolution patterns, PSDGCL uses subgraph sampling for data augmentation and combines GNN, GRU, and attention mechanisms to learn node structure. Finally, the model is optimized by GCL. Experimental results show that PSDGCL achieves comparable or even better performance than supervised learning methods without using labels.</p>
<p>In fact, PSDGCL still has limitations. Firstly, random walks can only capture fuzzy positional information. Secondly, how the time scale of dynamic graph affects the performance of the model is not clear. In the future, we will focus on finding more accurate position encoding methods and studying dynamic graphs at different time scales.</p>
</sec>
</body>
<back>
<ack>
<p>The authors are grateful to all the editors and anonymous reviewers for their comments and suggestions and thank all the members who have contributed to this work with us.</p>
</ack>
<sec><title>Funding Statement</title>
<p>The authors received no specific funding for this study.</p>
</sec>
<sec><title>Author Contributions</title>
<p>The authors confirm contribution to the paper as follows: study conception and design: Tian Liu; data collection: Tian Liu; analysis and interpretation of results: Tian Liu; draft manuscript preparation: Jian Feng, Tian Liu and Cailing Du. All authors reviewed the results and approved the final version of the manuscript.</p>
</sec>
<sec sec-type="data-availability"><title>Availability of Data and Materials</title>
<p>The data that support the findings of this study are available at <ext-link ext-link-type="uri" xlink:href="https://github.com/LTIAN133/PSDGCL">https://github.com/LTIAN133/PSDGCL</ext-link> (accessed on 22 June 2024).</p>
</sec>
<sec><title>Ethics Approval</title>
<p>Not applicable.</p>
</sec>
<sec sec-type="COI-statement"><title>Conflicts of Interest</title>
<p>The authors declare that they have no conflicts of interest to report regarding the present study.</p>
</sec>
<ref-list content-type="authoryear">
<title>References</title>
<ref id="ref-1"><label>[1]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>Q.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>F.</given-names> <surname>Jiang</surname></string-name>, <string-name><given-names>X.</given-names> <surname>Guo</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>K.</given-names> <surname>Sha</surname></string-name> and <string-name><given-names>Y.</given-names> <surname>Wang</surname></string-name></person-group>, &#x201C;<article-title>Combine temporal information in session-based recommendation with graph neural networks</article-title>,&#x201D; <source>Expert. Syst. Appl.</source>, vol. <volume>238</volume>, <year>Mar. 2024</year>, Art. no. 121969. doi: <pub-id pub-id-type="doi">10.1016/j.eswa.2023.121969</pub-id>.</mixed-citation></ref>
<ref id="ref-2"><label>[2]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>W.</given-names> <surname>Kong</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Guo</surname></string-name>, and <string-name><given-names>Y.</given-names> <surname>Liu</surname></string-name></person-group>, &#x201C;<chapter-title>Spatio-temporal pivotal graph neural networks for traffic flow forecasting</chapter-title>,&#x201D; presented at <article-title>the 38th AAAI Conf. Artif. Intell. (AAAI)</article-title>, <publisher-name>Vancouver, BC, Canada</publisher-name>, <year>Feb. 20&#x2013;27, 2024</year>, pp. <fpage>8627</fpage>&#x2013;<lpage>8635</lpage>. doi: <pub-id pub-id-type="doi">10.1609/aaai.v38i8.28707</pub-id>.</mixed-citation></ref>
<ref id="ref-3"><label>[3]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Jiao</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Tang</surname></string-name>, and <string-name><given-names>H.</given-names> <surname>Wu</surname></string-name></person-group>, &#x201C;<chapter-title>Temporal graph representation learning with adaptive augmentation contrastive</chapter-title>,&#x201D; presented at the <article-title>Joint Eur. Conf. Mach. Learn. Knowl. Discov. Databases (ECML PKDD)</article-title>, <publisher-loc>Turin, Italy</publisher-loc>, <year>Sep. 18&#x2013;22, 2023</year>, pp. <fpage>683</fpage>&#x2013;<lpage>699</lpage>. doi: <pub-id pub-id-type="doi">10.1007/978-3-031-43415-0_40</pub-id>.</mixed-citation></ref>
<ref id="ref-4"><label>[4]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>P.</given-names> <surname>Bao</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Yan</surname></string-name>, and <string-name><given-names>H.</given-names> <surname>Shen</surname></string-name></person-group>, &#x201C;<article-title>DyTSCL: Dynamic graph representation via tempo-structural contrastive learning</article-title>,&#x201D; <source>Neurocomputing</source>, vol. <volume>556</volume>, <year>Nov. 2023</year>, Art. no. 126660. doi: <pub-id pub-id-type="doi">10.1016/j.neucom.2023.126660</pub-id>.</mixed-citation></ref>
<ref id="ref-5"><label>[5]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>P.</given-names> <surname>Bao</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>R.</given-names> <surname>Yan</surname></string-name>, and <string-name><given-names>Z.</given-names> <surname>Liu</surname></string-name></person-group>, &#x201C;<article-title>Dynamic graph contrastive learning via maximize temporal consistency</article-title>,&#x201D; <source>Pattern Recogn.</source>, vol. <volume>148</volume>, <year>Apr. 2024</year>, Art. no. 110144. doi: <pub-id pub-id-type="doi">10.1016/j.patcog.2023.110144</pub-id>.</mixed-citation></ref>
<ref id="ref-6"><label>[6]</label><mixed-citation publication-type="journal"><person-group person-group-type="author"><string-name><given-names>L.</given-names> <surname>Zhu</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Guo</surname></string-name>, <string-name><given-names>J.</given-names> <surname>Yin</surname></string-name>, <string-name><given-names>G. V.</given-names> <surname>Steeg</surname></string-name>, and <string-name><given-names>A.</given-names> <surname>Galstyan</surname></string-name></person-group>, &#x201C;<article-title>Scalable temporal latent space inference for link prediction in dynamic social networks</article-title>,&#x201D; <source>IEEE Trans. Know. Data. En.</source>, vol. <volume>28</volume>, no. <issue>10</issue>, pp. <fpage>2765</fpage>&#x2013;<lpage>2777</lpage>, <year>Jul. 2016</year>. doi: <pub-id pub-id-type="doi">10.1109/TKDE.2016.2591009</pub-id>.</mixed-citation></ref>
<ref id="ref-7"><label>[7]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Rafailidis</surname></string-name> and <string-name><given-names>A.</given-names> <surname>Nanopoulos</surname></string-name></person-group>, &#x201C;<chapter-title>Modeling the dynamics of user preferences in coupled tensor factorization</chapter-title>,&#x201D; presented at the <article-title>ACM Conf. Recomm. Syst. (RecSys)</article-title>, <publisher-loc>Silicon Valley, CA, USA</publisher-loc>, <year>Oct. 6&#x2013;10, 2014</year>, pp. <fpage>321</fpage>&#x2013;<lpage>324</lpage>. doi: <pub-id pub-id-type="doi">10.1145/2645710.2645758</pub-id>.</mixed-citation></ref>
<ref id="ref-8"><label>[8]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S. D.</given-names> <surname>Winter</surname></string-name>, <string-name><given-names>T.</given-names> <surname>Decuypere</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Mitrovi&#x0107;</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Baesens</surname></string-name>, and <string-name><given-names>J. D.</given-names> <surname>Weerdt</surname></string-name></person-group>, &#x201C;<chapter-title>Combining temporal aspects of dynamic networks with Node2Vec for a more efficient dynamic link prediction</chapter-title>,&#x201D; presented at the <article-title>IEEE/ACM Int. Conf. Adv. Soc. Netw. Anal. Min. (ASONAM)</article-title>, <publisher-loc>Barcelona, Spain</publisher-loc>, <year>Aug. 28&#x2013;31, 2018</year>, pp. <fpage>1234</fpage>&#x2013;<lpage>1241</lpage>. doi: <pub-id pub-id-type="doi">10.1109/asonam.2018.8508272</pub-id>.</mixed-citation></ref>
<ref id="ref-9"><label>[9]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>S.</given-names> <surname>Mahdavi</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Khoshraftar</surname></string-name>, and <string-name><given-names>A.</given-names> <surname>An</surname></string-name></person-group>, &#x201C;<chapter-title>dynnode2vec: Scalable dynamic network embeddingScalable dynamic network embedding</chapter-title>,&#x201D; presented at the <article-title>IEEE Int. Conf. Big Data (Big Data)</article-title>, <publisher-loc>Seattle, WA, USA</publisher-loc>, <year>Dec. 10&#x2013;13, 2018</year>, pp. <fpage>3762</fpage>&#x2013;<lpage>3765</lpage>. doi: <pub-id pub-id-type="doi">10.1109/bigdata.2018.8621910</pub-id>.</mixed-citation></ref>
<ref id="ref-10"><label>[10]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>A.</given-names> <surname>Pareja</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<chapter-title>EvolveGCN: Evolving graph convolutional networks for dynamic graphs</chapter-title>,&#x201D; presented at the <article-title>AAAI Conf. Artif. Intell. (AAAI)</article-title>, <publisher-loc>New York, NY, USA</publisher-loc>, <year>Feb. 7&#x2013;12, 2020</year>, pp. <fpage>5363</fpage>&#x2013;<lpage>5370</lpage>. doi: <pub-id pub-id-type="doi">10.1609/aaai.v34i04.5984</pub-id>.</mixed-citation></ref>
<ref id="ref-11"><label>[11]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Yang</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Zhou</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Kalander</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Huang</surname></string-name>, and <string-name><given-names>I.</given-names> <surname>King</surname></string-name></person-group>, &#x201C;<chapter-title>Discrete-time temporal network embedding via implicit hierarchical learning in hyperbolic space</chapter-title>,&#x201D; presented at the <article-title>27th ACM SIGKDD Conf. Knowl. Discov. Data Min. (KDD)</article-title>, <publisher-loc>Singapore</publisher-loc>, <year>Aug. 14&#x2013;18, 2021</year>, pp. <fpage>1975</fpage>&#x2013;<lpage>1985</lpage>. doi: <pub-id pub-id-type="doi">10.1145/3447548.3467422</pub-id>.</mixed-citation></ref>
<ref id="ref-12"><label>[12]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>Q.</given-names> <surname>Bai</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Nie</surname></string-name>, <string-name><given-names>H.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Zhao</surname></string-name>, and <string-name><given-names>X.</given-names> <surname>Yuan</surname></string-name></person-group>, &#x201C;<chapter-title>HGWaveNet: A hyperbolic graph neural network for temporal link prediction</chapter-title>,&#x201D; presented at the <article-title>ACM Web Conf. 2023 (WWW)</article-title>, <publisher-loc>Austin, TX, USA</publisher-loc>, <year>Apr. 30&#x2013;May 4, 2023</year>, pp. <fpage>523</fpage>&#x2013;<lpage>532</lpage>. doi: <pub-id pub-id-type="doi">10.1145/3543507.3583455</pub-id>.</mixed-citation></ref>
<ref id="ref-13"><label>[13]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>H.</given-names> <surname>Li</surname></string-name>, <string-name><given-names>Z.</given-names> <surname>Zhang</surname></string-name>, <string-name><given-names>D.</given-names> <surname>Liang</surname></string-name>, and <string-name><given-names>Y.</given-names> <surname>Jiang</surname></string-name></person-group>, &#x201C;<chapter-title>K-Truss based temporal graph convolutional network for dynamic graphs</chapter-title>,&#x201D; presented at the <article-title>Asian Conf. Mach. Learn. (ACML)</article-title>, <publisher-loc>Hanoi, Vietnam</publisher-loc>, <year>Dec. 5&#x2013;8, 2024</year>, pp. <fpage>739</fpage>&#x2013;<lpage>754</lpage>.</mixed-citation></ref>
<ref id="ref-14"><label>[14]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Li</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<chapter-title>Scaling up dynamic graph representation learning via spiking neural networks</chapter-title>,&#x201D; presented at the <article-title>37th AAAI Conf. Artif. Intell. (AAAI)</article-title>, <publisher-loc>Washington, DC, USA</publisher-loc>, <year>Feb. 7&#x2013;13, 2023</year>, pp. <fpage>8588</fpage>&#x2013;<lpage>8596</lpage>. doi: <pub-id pub-id-type="doi">10.1609/aaai.v37i7.26034</pub-id>.</mixed-citation></ref>
<ref id="ref-15"><label>[15]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>N.</given-names> <surname>Yin</surname></string-name> <etal>et al.</etal></person-group>, &#x201C;<chapter-title>Dynamic spiking graph neural networks</chapter-title>,&#x201D; presented at the <article-title>38th AAAI Conf. Artif. Intell. (AAAI)</article-title>, <publisher-loc>Vancouver, BC, Canada</publisher-loc>, <year>Feb. 20&#x2013;27, 2024</year>, pp. <fpage>16495</fpage>&#x2013;<lpage>16503</lpage>. doi: <pub-id pub-id-type="doi">10.1609/aaai.v38i15.29587</pub-id>.</mixed-citation></ref>
<ref id="ref-16"><label>[16]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>X.</given-names> <surname>Qin</surname></string-name>, <string-name><given-names>N.</given-names> <surname>Sheikh</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Lei</surname></string-name>, <string-name><given-names>B.</given-names> <surname>Reinwald</surname></string-name>, and <string-name><given-names>G.</given-names> <surname>Domeniconi</surname></string-name></person-group>, &#x201C;<chapter-title>SEIGN: A simple and efficient graph neural network for large dynamic graphs</chapter-title>,&#x201D; presented at the <article-title>39th Int. Conf. Data Eng. (ICDE)</article-title>, <publisher-loc>Anaheim, CA, USA</publisher-loc>, <year>Apr. 3&#x2013;7, 2023</year>, pp. <fpage>2850</fpage>&#x2013;<lpage>2863</lpage>. doi: <pub-id pub-id-type="doi">10.1109/icde55515.2023.00218</pub-id>.</mixed-citation></ref>
<ref id="ref-17"><label>[17]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>K.</given-names> <surname>Zhao</surname></string-name> and <string-name><given-names>L.</given-names> <surname>Zhang</surname></string-name></person-group>, &#x201C;<chapter-title>Causality-inspired spatial-temporal explanations for dynamic graph neural networks</chapter-title>,&#x201D; presented at the <article-title>12th Int. Conf. Learn. Represent. (ICLR)</article-title>, <publisher-loc>Vienna, Austria</publisher-loc>, <year>May. 7&#x2013;11, 2024</year>.</mixed-citation></ref>
<ref id="ref-18"><label>[18]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>J.</given-names> <surname>Chen</surname></string-name> and <string-name><given-names>G.</given-names> <surname>Kou</surname></string-name></person-group>, &#x201C;<chapter-title>Attribute and structure preserving graph contrastive learning</chapter-title>,&#x201D; presented at the <article-title>37th AAAI Conf. Artif. Intell. (AAAI)</article-title>, <publisher-loc>Washington, DC, USA</publisher-loc>, <year>Feb. 7&#x2013;13, 2023</year>, pp. <fpage>7024</fpage>&#x2013;<lpage>7032</lpage>. doi: <pub-id pub-id-type="doi">10.1609/aaai.v37i6.25858</pub-id>.</mixed-citation></ref>
<ref id="ref-19"><label>[19]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>T.</given-names> <surname>Chen</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Kornblith</surname></string-name>, <string-name><given-names>M.</given-names> <surname>Norouzi</surname></string-name>, and <string-name><given-names>G.</given-names> <surname>Hinton</surname></string-name></person-group>, &#x201C;<chapter-title>A simple framework for contrastive learning of visual representations</chapter-title>,&#x201D; presented at the <article-title>37th Int. Conf. Mach. Learn. (ICML)</article-title>, <publisher-loc>Vienna, Austria</publisher-loc>, <year>Jul. 13&#x2013;18, 2020</year>, pp. <fpage>1597</fpage>&#x2013;<lpage>1607</lpage>. doi: <pub-id pub-id-type="doi">10.48550/arXiv.2002.05709</pub-id>.</mixed-citation></ref>
<ref id="ref-20"><label>[20]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>M.</given-names> <surname>Liu</surname></string-name> and <string-name><given-names>Y.</given-names> <surname>Liu</surname></string-name></person-group>, &#x201C;<chapter-title>Inductive representation learning in temporal networks via mining neighborhood and community influences</chapter-title>,&#x201D; presented at the <article-title>Int. ACM SIGIR Conf. Res. Dev. Inf. Retr. (SIGIR)</article-title>, <publisher-loc>Canada</publisher-loc>, <year>Jul. 11&#x2013;15, 2021</year>, pp. <fpage>2202</fpage>&#x2013;<lpage>2206</lpage>. doi: <pub-id pub-id-type="doi">10.1145/3404835.3463052</pub-id>.</mixed-citation></ref>
<ref id="ref-21"><label>[21]</label><mixed-citation publication-type="conf-proc"><person-group person-group-type="author"><string-name><given-names>D.</given-names> <surname>Xu</surname></string-name>, <string-name><given-names>C.</given-names> <surname>Ruan</surname></string-name>, <string-name><given-names>E.</given-names> <surname>Korpeoglu</surname></string-name>, <string-name><given-names>S.</given-names> <surname>Kumar</surname></string-name>, and <string-name><given-names>K.</given-names> <surname>Achan</surname></string-name></person-group>, &#x201C;<chapter-title>Inductive representation learning on temporal graphs</chapter-title>,&#x201D; presented at the <article-title>8th Int. Conf. Learn. Represent. (ICLR), Addis Ababa, Ethiopia</article-title>, <year>Apr. 26&#x2013;30, 2020</year>. doi: <pub-id pub-id-type="doi">10.48550/arXiv.2002.07962</pub-id>.</mixed-citation></ref>
</ref-list>
</back></article>