<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>data.log</title>
        <link>https://velog.io/</link>
        <description>The brightest star in the night sky</description>
        <lastBuildDate>Sun, 17 Dec 2023 12:22:29 GMT</lastBuildDate>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
        <generator>https://github.com/jpmonette/feed</generator>
        <image>
            <title>data.log</title>
            <url>https://velog.velcdn.com/images/kimminsu-ds/profile/bb651819-a955-4e90-a860-9859167499e8/image.jpeg</url>
            <link>https://velog.io/</link>
        </image>
        <copyright>Copyright (C) 2019. data.log. All rights reserved.</copyright>
        <atom:link href="https://v2.velog.io/rss/kimminsu-ds" rel="self" type="application/rss+xml"/>
        <item>
            <title><![CDATA[PinSage : Graph Convolutional Neural Networks for Web-Scale Recommender Systems (2018)]]></title>
            <link>https://velog.io/@kimminsu-ds/PinSage-GCN-Networks-for-Web-Scale-Recommender-Systems</link>
            <guid>https://velog.io/@kimminsu-ds/PinSage-GCN-Networks-for-Web-Scale-Recommender-Systems</guid>
            <pubDate>Sun, 17 Dec 2023 12:22:29 GMT</pubDate>
            <description><![CDATA[<p>dddd</p>
]]></description>
        </item>
        <item>
            <title><![CDATA[KGCN : Knowledge Graph Convolutional Networks for Recommender Systems (2019)]]></title>
            <link>https://velog.io/@kimminsu-ds/KGCN-Knowledge-Graph-Convolutional-Networks-for-Recommender-System</link>
            <guid>https://velog.io/@kimminsu-ds/KGCN-Knowledge-Graph-Convolutional-Networks-for-Recommender-System</guid>
            <pubDate>Sun, 17 Dec 2023 12:12:30 GMT</pubDate>
            <description><![CDATA[<p><a href="https://arxiv.org/abs/1904.12575">KGCN 논문</a>
<a href="https://github.com/hwwang55/KGCN">KGCN Github</a></p>
<hr>
<h2 id="0-abstract">0. Abstract</h2>
<hr>
<h2 id="1-introduction">1. Introduction</h2>
<hr>
<h2 id="2-related-work">2. Related Work</h2>
<ul>
<li>KGCN은 개념적으로 GCN에 영향을 받았으며, 일반적으로 GCN은 2가지 유형(Spectral Vs. Non-spectral)으로 구분할 수 있음<ul>
<li>KGCN은 지식그래프(KG)에 Non-spectral 방법론을 적용한 것</li>
</ul>
</li>
<li>KGCN은 PinSage와 GAT 방법론과도 연관되어 있음<ul>
<li>PinSage와 GAT는 homogeneous graph에 적용한 방법론</li>
<li>KGCN은 hetrogeneous graph에 적용하여 추천시스템을 위한 새로운 관점을 제시</li>
</ul>
</li>
</ul>
<hr>
<h2 id="3-kgcn">3. KGCN</h2>
<h3 id="31-problem-formulation">3.1. Problem Formulation</h3>
<h3 id="32-kgcn-layer">3.2. KGCN Layer</h3>
<h3 id="33-learning-algorithm">3.3. Learning Algorithm</h3>
<hr>
<h2 id="4-experiments">4. Experiments</h2>
<h3 id="41-datasets">4.1. Datasets</h3>
<h3 id="42-baselines">4.2. Baselines</h3>
<ul>
<li>KGCN을 다른 방법론들과 비교<ul>
<li>KG-free methods<ul>
<li><strong>SVD</strong> is a classic CF-based model using inner product to model user-item interactions.</li>
<li><strong>LibFM</strong> is a feature-based factorization model in CTR scenarios. We concatenate user ID and item ID as input for LibFM.</li>
</ul>
</li>
<li>KG-aware methods<ul>
<li><strong>LibFM + TransE</strong> extends LibFM by attaching an entity representation learned by TransE to each user-item pair.</li>
<li><strong>PER</strong> treats the KG as heterogeneous information networks and extracts meta-path based features to represent the connectivity between users and items.</li>
<li><strong>CKE</strong> combines CF with structural, textual, and visual knowledge in a unified framework for recommendation. We implement CKE as CF plus a structural knowledge module in this paper.</li>
<li><strong>RippleNet</strong> is a memory-network-like approach that propagates users’ preferences on the KG for recommendation.</li>
</ul>
</li>
</ul>
</li>
</ul>
<h3 id="43-experiments-setup">4.3. Experiments Setup</h3>
<h3 id="44-results">4.4. Results</h3>
<h4 id="441-impact-of-neighbor-sampling-size">4.4.1. Impact of neighbor sampling size</h4>
<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/51437905-bfee-4f37-96c9-e041e550d4f8/image.png" alt=""></p>
<ul>
<li>K = 2, 4, 8, 16, 32, 64에 대해서 실험한 결과, <strong><code>K=4 or K=8</code></strong>일 때의 결과가 가장 좋았음</li>
<li>K가 너무 작으면 이웃들의 정보를 잘 반영할 수 없고, 너무 크면 오히려 noise를 발생시키기 때문</li>
</ul>
<h4 id="442-impact-of-depth-or-receptive-field">4.4.2. Impact of depth or receptive field</h4>
<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/1fcca5c8-4140-4702-9d0c-ce6431cad8fd/image.png" alt=""></p>
<ul>
<li>H = 1, 2, 3, 4에 대해서 실험 진행. KGCN은 K(neighbor sampling size)보다 H(depth)에 더 영향을 많이 받음</li>
<li>H가 커질수록 noise가 많이 발생. <strong><code>H=1 or H=2</code></strong> 정도가 적당     </li>
</ul>
<h4 id="443-impact-of-dimension-of-embedding">4.4.3. Impact of dimension of embedding</h4>
<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/d73faa6e-b00d-4bd6-9e06-bc44445325cb/image.png" alt=""></p>
<ul>
<li>embedding 차원 d가 커지면 커질수록 성능이 좋아지는 경향을 보이다가, 일정 수준이 지나면 over-fitting이 발생</li>
</ul>
<hr>
<h2 id="5-conclusions-and-future-work">5. Conclusions And Future Work</h2>
<hr>
<p>[참고]
<a href="https://velog.io/@lse7530/GNN-Knowledge-Graph-Convolutional-Networks-for-RecommenderSystems">https://velog.io/@lse7530/GNN-Knowledge-Graph-Convolutional-Networks-for-RecommenderSystems</a>
<a href="https://themore-dont-know.tistory.com/5">https://themore-dont-know.tistory.com/5</a></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[Graph Representation Learning]]></title>
            <link>https://velog.io/@kimminsu-ds/Node-Embeddings</link>
            <guid>https://velog.io/@kimminsu-ds/Node-Embeddings</guid>
            <pubDate>Sun, 17 Sep 2023 00:10:25 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p><strong>3.1 Node Embeddings</strong></p>
</blockquote>
<ul>
<li><p>Recap: Traditional ML for graphs</p>
<ul>
<li>Given an input graph, extract node, link and graph-level features, learn a model that maps features to labels</li>
<li>Input graph &rarr; Structured features &rarr; Learning algorithm &rarr; Prediction</li>
</ul>
</li>
<li><p>Graph tepresentation learning</p>
<ul>
<li><span style="background-color: rgba(242,179,188,0.5)"> <strong>Graph representation learning alleviates the need to do feature engineering every single time &rarr; Automatically learn the features</strong> </span></li>
<li>Learn how to map node in a d-dimensional space and represent it as a vector of d numbers</li>
<li>Call it this vector of d numbers as feature representation or embedding<ul>
<li>This vector captures the structure of the underlying network that we are interested in analyzing or making predictions over <img src="https://velog.velcdn.com/images/kimminsu-ds/post/b5893e5e-dc78-4427-972f-aa4353d8af21/image.png" alt=""></li>
</ul>
</li>
</ul>
</li>
<li><p>Why embedding?</p>
<ul>
<li>Task: Map node into an embedding space</li>
<li>Similarity of embeddings b/t nodes indicates their similarity in the network<ul>
<li>For example: Both nodes are close to each other (connected by an edge)</li>
</ul>
</li>
<li>Encode network structure information</li>
<li>Potentially used for many downstream predictions<ul>
<li>Node classification, Link prediction, Graph classification, Anomalus node detection, Clustering and so on</li>
</ul>
</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Encoder and Decoder</strong></p>
</blockquote>
<ul>
<li>Assume we have a graph $G$:<ul>
<li>$V$ is the vertex set</li>
<li>$A$ is the adjacency matrix (assume binary)</li>
<li>For simplicity: no node features or extra information is used</li>
</ul>
</li>
</ul>
<ul>
<li><p>Embedding nodes</p>
<ul>
<li>Encode nodes so that similarity in the embedding space (e.g, dot-product) approximates similarity in the graph</li>
<li>To learn encoder that encodes the original networks as a set of node embeddings
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/f076dd81-f1c4-48d8-aa30-4de08261efff/image.png" alt=""></li>
</ul>
</li>
<li><p>Learning node embeddings</p>
<ol>
<li>Encoder maps from nodes to embeddings</li>
<li>Define a node similarity function (i.e, a measure of similarity in the original network)</li>
<li>Decode maps from embeddings to the similairty score</li>
<li>Optimize the parameters of the encoder</li>
</ol>
</li>
<li><p>Two key components</p>
<ul>
<li>Encoder: maps each node to a low-dimensional vector</li>
<li>Similarity function: specifies how the relationships in vector space map to the relationships in the original network</li>
</ul>
</li>
<li><p>Shallow eEncoding</p>
<ul>
<li>Simplest encoding approach: Encoder is just an embedding-lookup</li>
<li>Each node is assigned a unique embedding vector (i.e, we directly optimize the embedding of each node): DeepWalk, Node2Vec
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/ee83fdc4-f2f4-4c8b-8c86-1f09782abf9a/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/c1be42d7-c4ef-4d57-90f4-deb031a35c7e/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/eee333b7-4730-490a-83e5-10702f03c51c/image.png" alt=""></li>
</ul>
</li>
<li><p>Encoder + Decoder framework</p>
<ul>
<li>Shallow encoder: embedding lookup</li>
<li>Parameters to optimize: $Z$ which contains node embeddings $z_u$ for al nodes $u \in V$</li>
<li>Decoder: based on node similarity</li>
<li>Objective: maximize ${z_v}^Tz_u$ for node pairs $(u, v)$ that are similar according to our node similairty function</li>
</ul>
</li>
<li><p>How to define node similarity?</p>
<ul>
<li>Should two nodes have a similar embedding if they<ul>
<li>are linked?</li>
<li>share neighbors?</li>
<li>have similar &quot;structural roles&quot;?</li>
</ul>
</li>
<li>Similarity definition that uses <strong>random walks</strong>, and how to optimize embeddings for such a similarity measure</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/a9bfcae1-e161-4ee2-91b9-018ba5117579/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p><strong>3.2 Random walk approaches for node embddings</strong></p>
</blockquote>
<ul>
<li><p>Notation</p>
<ul>
<li><strong>Vector $z_u$</strong>: The embedding of node $u$ (what we aim to find)</li>
<li><strong>Probability $P(v|z_u)$</strong>: The (predicted) probability of visiting node $v$ on random walks starting from node $u$. (Our model prediction based on $z_u$</li>
</ul>
</li>
<li><p>Non-linear functions used to produce predicted probabilities $P(v|z_u)$</p>
<ul>
<li><strong>Softmax function</strong>: Turns vector of $K$ real values (model predictions) into $K$ probabilities that sum to 1</li>
<li><strong>Sigmoid function</strong>: S-shaped function that turns real values into the range of (0, 1)</li>
</ul>
</li>
</ul>
<ul>
<li>Random walk<ul>
<li>Given a graph and a starting point(node), we select a neighbor of it at random, and move to this neighbor</li>
<li>Then we select a neighbor of this point at random, and move to it</li>
<li>The (random) sequence of points visited this way is <strong>random walk on the graph</strong></li>
</ul>
</li>
</ul>
<ul>
<li><span style="background-color: rgba(242,179,188,0.5)"> <strong>Random walk embeddings:</strong></span>  ${z_u}^Tz_v \approx$ probability that $u$ and $v$ co-occur on a random walk over the graph<ol>
<li>Estimate probability of visiting node $v$ on a random walk starting from node $u$ using some random walk strategy $R$</li>
<li>Optimize embeddings to encode these random walk statistics<ul>
<li>Similarity in embdding space(Here: dot product = $cos(\theta)$) encodes random walk &quot;similarity&quot;</li>
</ul>
</li>
</ol>
</li>
</ul>
<ul>
<li>Why random walks?<ul>
<li>Expressitivity: Flexible stochastic definition of node similarity that incorporates both local and higher-order neighborhood information<ul>
<li><span style="background-color: rgba(242,179,188,0.5)"><strong>IDEA:</strong></span> if random walk starting from node $u$ visits $v$ with high probability, $u$ and $v$ are similar (high-order multi-hop information)</li>
</ul>
</li>
<li>Efficiency: Do not need to consider all node pairs when training;  <span style="background-color: rgba(242,179,188,0.5)"><strong>only need to consider pairs that co-occur on random walks</strong></span></li>
</ul>
</li>
</ul>
<ul>
<li>Un-supervised feature learning<ul>
<li>Intuition: Find embedding of nodes in $d$-dimensional space that preserves similarity</li>
<li>IDEA: Learn node embedding such that near by nodes are close together in the network</li>
<li>Given a node $u$, how do we define neraby nodes?<ul>
<li>$N_R(u)$ ... neighborhood of $u$ obtained by some random walk strategy $R$</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>Feature learning as Optimization<ul>
<li>Given $G=(V, E)$</li>
<li>Our goal is to learn a mapping $f: u-&gt; \R^d:f(u)=z_u$</li>
<li>Log-likelihood objective $\max_{f} \displaystyle\sum_{u\in V}logP(N_R(u)|z_u)$  <ul>
<li>$N_R(u)$ is the neighborhood of node $u$ by strategy $R$</li>
</ul>
</li>
</ul>
</li>
<li>Given node $u$, we want to learn feature representations that are predictive of the nodes in its random walk neighborhood $N_R(u)$</li>
</ul>
<ul>
<li><p><strong>Random walk optimization</strong></p>
<ol>
<li>Run short-fixed length random walks starting from each node $u$ in the graph using some random walk strategy $R$</li>
<li>For each node $u$ collect $N_R(u)$, the multiset of nodes visited on random walks starting from $u$<ul>
<li>$N_R(u)$ can have repeat elements since nodes can be visited multiple times on random walks</li>
</ul>
</li>
<li>Optimize embeddings according to: Given node $u$, predicts its neighbors $N_R(u)$<ul>
<li>$\max_{f} \displaystyle\sum_{u\in V}logP(N_R(u)|z_u)$   &rarr; maximum likelihood objective</li>
</ul>
</li>
<li>Equivalently,
$$
L = \displaystyle\sum_{u \in V}\sum_{v \in N_R(u)}-log(P(v|z_u))
$$<ul>
<li>Intuition: Optimize embeddings $z_u$ to maximize the likelihood of random walk co-occurrences</li>
<li>Parameterize $P(v|z_u)$ using softmax:
$$
P(v|z_u) = {exp({z_u}^Tz_v) \over \sum_{n \in V} exp({z_u}^Tz_n)}
$$
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/d02106be-be65-4391-ac09-1c44bc3b04f8/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/9fbefa3f-9cef-4c59-8c28-22601f74a4cf/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/c157e602-e991-468a-ae0d-d418c3b89d26/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/eb22b4f7-a326-4d2c-96b8-6d1015623f35/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/eac94efe-07a7-4662-b9b8-31839124dbe5/image.png" alt=""></li>
</ul>
</li>
</ol>
</li>
<li><p>Stochastic Gradient Descent</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/5816700e-259f-423f-a46a-7b6a837bb16a/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/9fce8cfd-cc95-46d8-8468-b8179d9ef299/image.png" alt=""></li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Random walks summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/fc942bab-c81d-43f7-9c6e-d8f871b32cfb/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p><strong>Node2Vec</strong></p>
</blockquote>
<ul>
<li>How sould we randomly walk?<ul>
<li>So far, we have described how to optimize embeddings given a random walk strategy $R$</li>
<li>What strategies should we use to run these random walks?<ul>
<li>Simplest idea: Just run fixed-length, unbiased random walks strating from each node (<a href="https://arxiv.org/abs/1403.6652">DeepWalk</a>)<ul>
<li>The issue is that such notion of similarity is too constrained</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>Overview of Node2Vec<ul>
<li>Goal: Embed nodes with similar network neighborhoods close in the feature space</li>
<li>We frame this goal as a maximum likelihood optimization problem, independent to the downstream prediction task</li>
<li>Key observation: Flexible notion of network neighborhood $N_R(u)$ of node $u$ leads to rich node embeddings</li>
<li>Develop biased $2nd$ order random walk $R$ to generate network neighborhood $N_R(u)$ of node $u$</li>
</ul>
</li>
</ul>
<ul>
<li><strong><a href="https://cs.stanford.edu/~jure/pubs/node2vec-kdd16.pdf">Node2Vec : Biased walks</a></strong><ul>
<li>IDEA: use flexible, biased random walks that can trade-off b/t local and global vies of the network<img src="https://velog.velcdn.com/images/kimminsu-ds/post/e4639aa3-6e62-4c7f-9d18-de62b572c4fb/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/456688e9-41bc-430f-ac61-47d35f6318b4/image.png" alt=""></li>
</ul>
</li>
</ul>
<ul>
<li><p>Interpolating BFS and DFS</p>
<ul>
<li>Biased fixed-length random walk $R$ that given a node $u$ generates neighborhood $N_R(u)$<ul>
<li>Two parameters<ul>
<li><strong>Return parameter $p$</strong>: Return back to the previous node</li>
<li><strong>In-out parameter $q$</strong>: Moving outwards(DFS) vs. Inwards(BFS)</li>
<li>Intuitively, $q$ is the &quot;ratio&quot; of DFS vs. BFS</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p>Biased random walks</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/34fba378-f8c7-414a-a794-f6fb91d428b2/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/64ec8eb0-ecdf-4545-983d-82f51ca07b79/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/4ae1b3ff-81e6-4c90-80f5-df5b4423472e/image.png" alt=""></li>
</ul>
</li>
</ul>
<ul>
<li><p>Node2Vec algorihthm</p>
<ol>
<li>Compute random walk probabilities</li>
<li>Simulate $r$ random walks of length $l$ starting from each node $u$</li>
<li>Optimize the Node2Vec objective using Stochastic Gradient Descent</li>
</ol>
<ul>
<li>Linear-time complexity</li>
<li>All 3 steps are individually parallelizable</li>
</ul>
</li>
<li><p>Other random walk ideas</p>
<ul>
<li><p>Different kinds of biased random walks</p>
<ul>
<li><a href="https://ericdongyx.github.io/papers/KDD17-dong-chawla-swami-metapath2vec.pdf">Based on node attributes</a></li>
<li><a href="https://arxiv.org/abs/1710.09599">Based on learned weights</a></li>
</ul>
</li>
<li><p>Alternative optimization schemes</p>
<ul>
<li><a href="https://arxiv.org/abs/1503.03578">Directly optimize based on 1-hop and 2-hop random walk probabilities</a></li>
</ul>
</li>
<li><p>Network pre-processing techniques</p>
<ul>
<li><a href="https://arxiv.org/abs/1706.07845">Run random walks on modified versions of the original network</a></li>
</ul>
</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/7b39f08c-8373-4db7-a440-84f945ee4963/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/24753481-a0a6-402e-86a8-737242198650/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p><strong>3.3 Embedding entire graphs</strong></p>
</blockquote>
<ul>
<li>Graph embedding $z_G$: Want to embed a subgraph or an entire graph $G$</li>
<li>Tasks<ul>
<li>Classifying toxic vs. non-toxic molecules</li>
<li>Identifying anomalous graphs</li>
</ul>
</li>
</ul>
<ul>
<li><p>Approach 1</p>
<ul>
<li>Run a standard node embedding technique on the (sub) graph $G$</li>
<li>Then just sum (or average) the node embeddings in the (sub) graph $G$
$$
z_G = \sum_{v \in G} z_v
$$</li>
</ul>
</li>
<li><p>Approach 2</p>
<ul>
<li>Introduce a &quot;virtual node&quot; to represent the (sub) grpah and run a standard node embedding technique
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/1b41e208-8b6a-437b-83c4-9e15270f978a/image.png" alt=""></li>
</ul>
</li>
</ul>
<ul>
<li><p>Approach 3 : Anonymous walk embeddings</p>
<ul>
<li>States in anonymous walks correspond to the index of the first time we visited the node in a random walk
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/6b59c978-04bf-4901-b352-9d550fe7e9c0/image.png" alt="">
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/ff125407-287e-4b1c-8947-3350eaf2654c/image.png" alt="">
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/2db28b89-54ec-44af-afb0-e6c99395a927/image.png" alt="">
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/5810eca0-97ad-4724-86ca-dec1f7f0792b/image.png" alt="">
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/cd39b277-458b-4bf0-bdca-406b8a7d5b5b/image.png" alt=""></li>
</ul>
</li>
<li><p>New idea: Learn walk embeddings</p>
<ul>
<li>Rather than simply represent each walk by the fraction of times it occurs, we learn embedding $z_i$ of anonymous walk $w_i$</li>
<li>Learn a graph embedding $Z_G$ together with all the anonymous walk embeddings $z_i$. $Z={z_i:i=1, ..., \eta}$, where $\eta$ is the number of sampled anonymous walks</li>
<li>How to embed walks? Embed walks s.t. the next walk can be predicted<img src="https://velog.velcdn.com/images/kimminsu-ds/post/a9114476-3ca9-4ee6-b750-90185ca85cf9/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/f84502cf-ea73-4c8f-ba83-b15b0d49a123/image.png" alt=""></li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/447ebd51-d643-4287-add0-b7f5825693f5/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/3110e252-53e8-44c9-8ca3-823a71772a23/image.png" alt=""></p>
</blockquote>
<hr>
<ul>
<li>How to use embeddings<ul>
<li>Clustering/community detection: cluster points $z_i$</li>
<li>Node classification: Predict label of node $i$ based on $z_i$</li>
<li>Link prediction: Predict edge $(i, j)$ based on $(z_i, z_j)$<ul>
<li>Where we can: concatenate, avg, product, or take a difference b/t the embeddings</li>
</ul>
</li>
<li>Graph classification: graph embedding $z_G$ via aggregating node embeddings or anonymous random walks &rarr; Predict label based on graph embdding $z_G$</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/7488474a-e7b3-432d-80e9-007b9e5c7660/image.png" alt=""></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[Traditional Methods for ML in Graphs]]></title>
            <link>https://velog.io/@kimminsu-ds/Traditional-Methods-for-ML-in-Graphs</link>
            <guid>https://velog.io/@kimminsu-ds/Traditional-Methods-for-ML-in-Graphs</guid>
            <pubDate>Sun, 10 Sep 2023 02:44:02 GMT</pubDate>
            <description><![CDATA[<blockquote>
<p><strong>Traditional methods for machine learning in graphs</strong></p>
</blockquote>
<ul>
<li><p>The goal of lecture: <span style="background-color: rgba(242,179,188,0.5)"> <strong>Creating additional features that will describe how this particular node is positioned in the rest of the network and what is its local network structure</strong> </span>  </p>
<ul>
<li>These additional features that describe the topology of the network of the graph will allow us to make more accurate predictions</li>
<li><span style="background-color: rgba(242,179,188,0.5)"> <strong>Using effective features over graphs is the key to achieving good test performance</strong> </span></li>
</ul>
</li>
<li><p>ML in Graphs</p>
<ul>
<li><p>Given
$$ G = (V, E)
$$</p>
</li>
<li><p>Learn a function
$$ 
  f: V -&gt; \R
$$ </p>
</li>
<li><p>The way we can think of this is that we are given a graph as a set of verticies, as a set of edges and we wanna learn a function </p>
</li>
</ul>
</li>
</ul>
<hr>
<blockquote>
<p>** 2.1 Node-level tasks and features **</p>
</blockquote>
<ul>
<li><p><strong>Node classification</strong>: Where we are given a network, we are given a couple of nodes that are labeld with different colors, and the goal is to predict the colors of uncolored nodes <img src="https://velog.velcdn.com/images/kimminsu-ds/post/9043efd6-3a68-46bc-b03e-b08447c2e96f/image.png" alt=""></p>
</li>
<li><p>Goal: Characterize the structure and position of a node in the network</p>
<ul>
<li>Node degree</li>
<li>Node centrality</li>
<li>Clustering coefficient</li>
<li>Graphlets</li>
</ul>
</li>
</ul>
<hr>
<p>** 1. Node degree ** </p>
<ul>
<li>The degree of $k_v$ of $node , v$ is the number of edges (neighboring nodes) the node has</li>
<li>Treats all neighboring nodes equally
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/a3c1d4dd-6c40-4ced-ac79-261f2d336c23/image.png" alt=""></li>
</ul>
<hr>
<p>** 2. Node centrality **</p>
<ul>
<li><p>Node degree counts the neighboring nodes without capturing their importance</p>
</li>
<li><p>Node centrality $c_v$ takes the node importance in a graph into account</p>
</li>
<li><p>Different ways to model importance</p>
<ul>
<li>Eigen-vector centrality</li>
<li>Betweenness centrality</li>
<li>Closeness centrality</li>
<li>and many others</li>
</ul>
</li>
<li><p>Eigen-vector centrality: A node $v$ is important if surrounded by important neighboring nodes $u \in N(v)$
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/77ec0b6d-e6d1-450e-ad19-0da14589f1ad/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/18305d6e-fbe2-4c1a-bd41-15acad25666c/image.png" alt=""></p>
</li>
<li><p>Betweenness centrality: A node $v$ is important if it lies on many shortest paths b/t other nodes <img src="https://velog.velcdn.com/images/kimminsu-ds/post/bdc99662-a5fc-48ad-b45c-23f231650836/image.png" alt=""></p>
</li>
<li><p>Closeness centrality: A node $v$ is important if it has small shortest path lengths to all other nodes
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/16211dbf-826d-48ad-b6de-753cb1b9e5db/image.png" alt=""></p>
</li>
</ul>
<hr>
<p>** 3. Clustering coefficient**</p>
<ul>
<li>Measures how connected $v&#39;s$ neighboring nodes
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/36abc195-8586-4bd3-9555-2de57f51d5b8/image.png" alt=""></li>
</ul>
<hr>
<p>** 4. Graphlets **</p>
<ul>
<li><p>Observation: Clustering coeffieicnt counts the #(triangles) in the ego-network</p>
<ul>
<li>We can generalize the by #(pre-specified subgraphs, i.e. graphlets)
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/f11c909c-a92c-4930-998c-e8db25ea947b/image.png" alt=""> </li>
<li>Graphlets: Rooted connected non-isomorphic subgraphs 
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/48ec543c-141f-4607-8a44-a3f06eff0df5/image.png" alt=""></li>
<li>GDV(Graphlet Degree Vector): Graphlet-base features for nodes<ul>
<li>Degree counts #(edges) that a node touches</li>
<li>Clustering coefficient counts #(triangles) that a node touches </li>
<li><strong>GDV counts #(graphlets) that a node touches</strong></li>
</ul>
</li>
</ul>
</li>
<li><p>GDV(Graphlet Degree Vector): A count vector of graphlets rooted at a given node <img src="https://velog.velcdn.com/images/kimminsu-ds/post/8f009bf1-d647-4baa-ab60-c3c831f565a4/image.png" alt=""></p>
<ul>
<li>Considering graphlets on 2 to 5 nodes we get:<ul>
<li>Vector of 73 coordinates is a signature of a node that describes the topology of node&#39;s neighborhood</li>
<li>Captures its inter-connectivities out to a distance of 4 hops</li>
</ul>
</li>
<li>Graphlet degree vector provides a measure of a node&#39;s local network topology:<ul>
<li>Comparing vectors of two nodes provides a more detailed measure of local topological similarity than node degrees or clustering coefficient</li>
</ul>
</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/cd388b67-388c-48c3-9462-2a00fb5cdc6a/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/1358ddef-de20-4fc3-b363-f38850f48499/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/ff925c76-d9b6-4c0e-9f9a-a1e79c35708a/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/70154da3-6c80-4c6e-b5df-79f2de52c24c/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p>** 2.2 Link prediction task and features **</p>
</blockquote>
<ul>
<li><p><strong>The link prediction task</strong> is to predict new links based on existing links</p>
</li>
<li><p>At test time, all node pairs(no existing links) are ranked, and top $$
k
$$ node pairs are predicted</p>
</li>
<li><p>The key is to <span style="background-color: rgba(242,179,188,0.5)"> <strong>design features for a pair of nodes</strong> </span></p>
</li>
<li><p>Two formulations of the link prediction task</p>
<ul>
<li>Links missing at random<ul>
<li>Remove a random set of links and then aim to predict them</li>
<li>More useful for static networks like protein-protein interaction networks</li>
</ul>
</li>
<li>Links over time</li>
<li>Given $G[t_0, t&#39;_0]$ a graph on edges up to time $t&#39;_0$, output a ranked list $L$ of links (not in $G[t_0, t&#39;_0]$) that are predicted to appear in $G[t_1, t&#39;_1]$</li>
<li>Evaluation<ul>
<li>$n=|E_{NEW}|$ : # new edges that appear during the test period $[t_1, t&#39;_1]$</li>
<li>Take top $n$ elements of $L$ and count correct edges</li>
<li>Useful or natural for networks that evolve over time like transaction networks, social networks</li>
</ul>
</li>
</ul>
</li>
<li><p>Methodology</p>
<ul>
<li>For each pair of nodes $(x, y)$ compute score $c(x, y)$</li>
<li>For example, $c(x, y)$ could be the # of common neighbors of $x$ and $y$</li>
<li>Sort pairs $(x, y)$ by the decreasing score $c(x, y)$</li>
<li>Predict top $n$ pairs as new links</li>
<li>See which of these links actually appear in $G[t_1, t&#39;_1]$</li>
</ul>
</li>
<li><p>Link-level features:</p>
<ul>
<li>How to featurize or create a descriptor of the relationship b/t two nodes in the network  </li>
<li>Distance-based feature</li>
<li>Local neighborhood overlap</li>
<li>Global neighborhood overlap</li>
</ul>
</li>
</ul>
<hr>
<p><strong>1. Distance-based features</strong></p>
<ul>
<li>Shortest path distance b/t two nodes</li>
<li>However, this does not capture the degree of neighborhood overlap(=strength of connection)
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/efeaba82-7f6c-4a94-acab-03625ea99246/image.png" alt=""></li>
</ul>
<hr>
<p><strong>2. Local neighborhood overlap</strong></p>
<ul>
<li>Try to capture the strength of connection b/t two nodes would be to ask how many neighbors do you have in common</li>
<li>What is the number of common friends b/t a pair of nodes</li>
<li>Captures # neighboring nodes shared b/t two nodes $v_1$ and $v_2$
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/a6fabfcd-78bd-42bf-abff-f2709281b6d5/image.png" alt=""></li>
<li>Limitation: Is always zero if the two nodes do not have any neighbors in common (However, the two nodes may still potentially be connected in the future)</li>
</ul>
<hr>
<p><strong>3. Global neighborhood overlap</strong></p>
<ul>
<li>Resolve the limitation of local neighborhood overlap by considering the entire graph</li>
<li>Katz index: count the number of paths of all lengths b/t a given pair of nodes<ul>
<li>How to compute # paths b/t two nodes?</li>
<li>Use adjacency matrix
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/58307d34-5c5b-4e57-82c4-edbee5aa1680/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/88edaed0-a3e9-40c8-a22b-fa1957205dac/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/1f792ff2-4835-49e9-8e4f-7dfbdc15c7f8/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/9d49d0d1-2210-45ab-b0ee-fb850db52b36/image.png" alt=""></li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Summary</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/d424d8ae-2f13-467d-84f1-96d242c35466/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p>** 2.3 Graph-level features and Graph kernels **</p>
</blockquote>
<ul>
<li><p><span style="background-color: rgba(242,179,188,0.5)"> <strong>Features that characterize the structure of an entire graph</strong> </span></p>
</li>
<li><p><strong>Kernel methods</strong> are widely-used for traditional ML for graph-level prediction</p>
<ul>
<li>IDEA: Design kernels instead of feature vectors</li>
<li>A quick introduction to Kernels<ul>
<li>Kernel $K(G, G&#39;) \in \R$ measures similarity b/t data</li>
<li>Kernel matrix $K=(K(G, G&#39;))_{G, G&#39;}$ must always be positive semi-definite (i.e., has positive eigenvalues)</li>
<li>There exists a feature representation $\phi(\cdot)$ such that $K=(G, G&#39;)=\phi(G)^T\phi(G&#39;)$<ul>
<li>And the value of the kernel is simply a dot product of this vector representation of the two graphs</li>
<li>Once the kernel is defined, off-the-shelf ML model, such as kernel SVM can be used to make predictions</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
<li><p><strong>Graph Kernels</strong>: Measure similarity b/t two graphs</p>
<ul>
<li>Goal: Design graph feature vector $\phi(G)$</li>
<li>Key IDEA: <span style="background-color: rgba(242,179,188,0.5)">  <strong>BoW(Bag-of-Words) for a graph</strong> </span><ul>
<li>BoW simply uses the word counts as features for documents (no ordering considered)</li>
</ul>
</li>
</ul>
<p>[1] Graphlet kernel
[2] WL(Weisfeiler-Lehman) kernel
[3] Other kernels are also proposed in the literature</p>
<ul>
<li>Random-walk kernel</li>
<li>Shortest-path graph kernel</li>
<li>And many more</li>
</ul>
</li>
<li><p>Both Graphlet kernel and WL kernel use Bag-of-* representation of graph, where * is more sophisticated than node degress <img src="https://velog.velcdn.com/images/kimminsu-ds/post/be496c68-01e5-48ef-8d09-13da5ee04c4e/image.png" alt=""></p>
</li>
</ul>
<hr>
<p><strong>1. Graphlet features</strong></p>
<ul>
<li><p>Count the number of different graphlets in a graph</p>
</li>
<li><p>Definition of graphlets here is slightly different from node-level features</p>
</li>
<li><p>Two two differences are</p>
<ul>
<li>Nodes in graphlets here do not need to be connected (allows for isolated nodes)</li>
<li>The graphlets here are not rooted</li>
</ul>
<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/9e39b3fe-d806-4f95-bb38-1be082e7ee49/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/468464a8-d1a3-47fe-8347-e008e7aa1d03/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/a4642f06-0295-45ee-b6b9-25e042c8ac12/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/26613dae-0ced-4f5c-bd11-21037876a158/image.png" alt=""></p>
</li>
<li><p>Limitations: Counting graphlet is expensive</p>
</li>
<li><p>Counting size-$k$ graphlets for a graph with size $n$ by enumeration takes $n^k$</p>
</li>
<li><p>This is unavoidable in the worst-case since subgraph isomorphism test (judding whether a graph is a subgraph of another graph) is NP-hard</p>
</li>
<li><p>If a graph&#39;s node degree is bounded by $d$, an $O(nd^{k-1})$ algorithm exists to count all the graphlets of size $k$</p>
</li>
</ul>
<hr>
<p><strong>2. WL(Weisfeiler-Lehman) Kernel</strong></p>
<ul>
<li><p>Goal: Design an efficient graph feature descriptor of $\phi(G)$</p>
</li>
<li><p>IDEA: <span style="background-color: rgba(242,179,188,0.5)"> <strong>Use neighborhood structure to iteratively enrich node vocabulary</strong> </span></p>
<ul>
<li>Generalized version of Bag-of-node degrees since node degrees are one-hop neighborhood information</li>
<li>Algorithm to achieve this: WL graph isomorphsim test(=Color refinement)</li>
</ul>
</li>
<li><p>Color refienment
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/3bd36796-d4cd-48f2-9e32-164f51af0aaa/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/8106accd-f6db-4d6a-8907-981cceed5623/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/e01b3be7-9a2b-4c7a-bcb4-1bd2b282f12e/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/d12ce38e-e783-46df-b4d7-820a17a44dda/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/f5f45aa9-4f38-47d5-b571-00f0f1a70064/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/ac6c8e30-7529-47fe-9968-597444f6e1f6/image.png" alt=""><img src="https://velog.velcdn.com/images/kimminsu-ds/post/fed61e52-f044-4b57-8a78-ed52c6a39038/image.png" alt=""></p>
</li>
<li><p>WL kernel is very popular/strong graph feature descriptor to gives strong performance and computationally efficient</p>
<ul>
<li>The time complexity for color refinement at each step is linear in #(edges), since it involves aggregating neighboring colors</li>
<li>When computing a kernel value, only colors appeared in the two graphs need to be tracked<ul>
<li>Thus, #(colors) is at most the total number of nodes</li>
<li>Counting colors takes linear-time w.r.t #(nodes)</li>
<li>In total, time complexity is linear in #(edges)</li>
</ul>
</li>
</ul>
</li>
</ul>
<blockquote>
<p><strong>Sumamry</strong>
<img src="https://velog.velcdn.com/images/kimminsu-ds/post/5eed3c3e-d99a-4bd1-82af-b4d718353a2f/image.png" alt=""></p>
</blockquote>
<hr>
<blockquote>
<p><strong>Lecture Summary</strong> <img src="https://velog.velcdn.com/images/kimminsu-ds/post/21ab0fbc-0676-4533-b2a9-d40caefe2ce8/image.png" alt=""></p>
</blockquote>
]]></description>
        </item>
        <item>
            <title><![CDATA[Introduction To DGL]]></title>
            <link>https://velog.io/@kimminsu-ds/DGL-Introduction-To-DGL</link>
            <guid>https://velog.io/@kimminsu-ds/DGL-Introduction-To-DGL</guid>
            <pubDate>Mon, 28 Aug 2023 05:24:14 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/d2c795d4-350f-4bd3-b5db-81bdc9a64321/image.png" alt=""></p>
]]></description>
        </item>
        <item>
            <title><![CDATA[ML with Graphs]]></title>
            <link>https://velog.io/@kimminsu-ds/CS224W-ML-for-Graphs</link>
            <guid>https://velog.io/@kimminsu-ds/CS224W-ML-for-Graphs</guid>
            <pubDate>Mon, 28 Aug 2023 02:48:53 GMT</pubDate>
            <description><![CDATA[<p><img src="https://velog.velcdn.com/images/kimminsu-ds/post/f4bd37b9-0658-492d-a307-00f87f0413c9/image.png" alt=""></p>
<hr>
<blockquote>
<p><strong>1.1 Why Graphs?</strong></p>
</blockquote>
<ul>
<li><p>Graphs are a general language for describing and analyzing entities with relations/interactions</p>
</li>
<li><p>Main Question: <span style="background-color: rgba(242,179,188,0.5)"> <strong>How do we take advantage of relational structure for better prediction?</strong> </span></p>
<ul>
<li>Comeplex domains have a rich relational structure, which can be represented as a relational graph</li>
<li>By explicitly modeling relationships we achieve better performance</li>
</ul>
</li>
<li><p>Modern deep learning toolbox is designed for simple sequences(text) &amp; grids(image)</p>
<ul>
<li>How can we develop neural networks that are much more broadly applicable?
&rarr; <span style="background-color: rgba(242,179,188,0.5)"> <strong>Graphs are the new frontier of deep learning</strong></span>
</li>
</ul>
</li>
</ul>
<hr>
<blockquote>
<p><strong>1.2 Applications of GraphML</strong></p>
</blockquote>
<p><a href="https://paperswithcode.com/area/graphs">PapersWithCode - Graphs</a></p>
<ul>
<li><p>In many Graph Machine Learning, we can formulate different types of tasks:</p>
<ul>
<li>At the level of <strong>individual nodes</strong><ul>
<li>The Protein Folding problem: Computationally predict a protein&#39;s 3D structure based solely on its amino acid sequence </li>
<li><a href="https://www.deepmind.com/research/highlighted-research/alphafold">DeepMind&#39;s AlphaFold</a></li>
</ul>
</li>
<li>At the level of <strong>edges which is pairs of nodes</strong><ul>
<li><a href="https://arxiv.org/pdf/2011.02260.pdf">RecSys - Graph Neural Networks in Recommender System: A survey (2022)</a> </li>
</ul>
</li>
<li>At the level of <strong>sub-graphs of nodes</strong><ul>
<li><a href="https://arxiv.org/pdf/2101.11174.pdf">Traffic Prediction - Graph Neural Network for Traffic Forecasting: A Survey (2022)</a></li>
</ul>
</li>
<li>At the level of <strong>entire graphs</strong><ul>
<li><a href="https://www.sciencedirect.com/science/article/pii/S0092867420301021">Drug Discovery - A Deep Learning Approach to Antibiotic Discovery (2020)</a></li>
</ul>
</li>
</ul>
</li>
<li><p>Classic GraphML Tasks</p>
<ul>
<li><a href="https://paperswithcode.com/task/node-classification">Node classification - Predict a property of a node</a></li>
<li><a href="https://paperswithcode.com/task/link-prediction">Link Prediction - Predict whether there are missing links b/t two nodes</a></li>
<li><a href="https://paperswithcode.com/task/graph-classification">Graph classification - Categorize different graphs</a></li>
<li><a href="https://paperswithcode.com/task/graph-clustering">Graph Clustering - Detect if nodes form a community</a></li>
<li><a href="https://paperswithcode.com/task/graph-generation">Graph generation</a></li>
</ul>
</li>
</ul>
<hr>
<blockquote>
<p><strong>1.3 Choice of Graph Representation</strong></p>
</blockquote>
<ul>
<li><p>How do you define a graph? (= How to build a graph?)</p>
<ul>
<li>What are nodes?</li>
<li>What are edges?</li>
<li><span style="background-color: rgba(242,179,188,0.5)"> <strong>Choice of the proper network representation of a given domain/problem determines our ability to use networks successfully</strong> </span></li>
</ul>
</li>
<li><p><span style="background-color: rgba(239,239,240,1)"> <strong>Directed Graphs</strong> </span> Vs. <span style="background-color: rgba(239,239,240,1)"> <strong>Un-directed Graphs</strong> </span></p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/c760b17e-b19f-4d7d-ac3f-7591f525a7b6/image.png" alt=""> </li>
</ul>
</li>
<li><p>Node degrees</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/fe535207-8d61-491f-abd9-d043f3d16330/image.png" alt=""></li>
</ul>
</li>
<li><p>Bi-partite graph</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/52e0a926-8486-41a2-b56d-460b9c0c9fa1/image.png" alt=""></li>
</ul>
</li>
<li><p>Representing graphs: Adjacency matrix</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/95972a52-e7df-4bc5-b980-1edc6b30d7be/image.png" alt=""></li>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/639ca47b-0ea7-486f-bd5a-91dcaf10bd4a/image.png" alt=""></li>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/cd356fe8-1eb1-4329-9224-1bf1f458268a/image.png" alt=""></li>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/e254a20f-d333-4dea-839c-4af744d9bfda/image.png" alt=""></li>
</ul>
</li>
<li><p>Representing graphs: Edge list</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/7875aac7-080a-4042-9b47-3f5f30637a50/image.png" alt=""></li>
<li>This is a representation that is quite popular in deep learning frameworks because we can simply represent it as a two-dimensional matrix</li>
<li>The problem of this representation is that it is very hard to do any kind of graph manipulation or any kind of analysis of the graph because even computing a degree of a given node is non-trivial in this case</li>
</ul>
</li>
<li><p>Representing graphs: Adjacency list</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/b4ae908f-b531-43f6-823b-c453de14159c/image.png" alt=""></li>
</ul>
</li>
<li><p>Node and Edge Attributes (Possible options)</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/c350d1a6-0742-43c7-9b77-af5a147efcdf/image.png" alt=""></li>
</ul>
</li>
<li><p>More Types of Graphs: <span style="background-color: rgba(239,239,240,1)"> <strong>Weighted Graphs</strong> </span> Vs. <span style="background-color: rgba(239,239,240,1)"> <strong>Un-Weighted Graphs</strong> </span></p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/7057d49d-3a4d-4b6f-9f21-7c9c55591312/image.png" alt=""></li>
</ul>
</li>
<li><p>More Types of Graphs: <span style="background-color: rgba(239,239,240,1)"> <strong>Self-edges (self-loops)</strong> </span> / <span style="background-color: rgba(239,239,240,1)"> <strong>Multi Graph</strong> </span>  </p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/fbd37fba-38cb-47a8-af5a-621122de98eb/image.png" alt=""></li>
</ul>
</li>
<li><p>Connectivity of Un-directed graphs</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/04177445-52d8-4404-abd9-593cb2f4fa66/image.png" alt=""></li>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/3bfaca67-38ed-4f4e-9294-6315f0801f40/image.png" alt=""></li>
</ul>
</li>
<li><p>Connectivity of Directed graphs</p>
<ul>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/d6b7eb12-ce31-4b6d-9b5c-e91c7536d6d9/image.png" alt=""></li>
<li><img src="https://velog.velcdn.com/images/kimminsu-ds/post/8d10fc36-0be1-450b-990a-b0c6d7a5454f/image.png" alt=""></li>
</ul>
</li>
</ul>
]]></description>
        </item>
    </channel>
</rss>