Graph theory in machine learning for the smallest

The complexity of presenting data for deep learning is growing every day. Graph Neural Networks ( GNNs ) have become one of the breakthroughs of recent years. But why exactly graphs are gaining more and more popularity in machine learning?


The ultimate goal of my narrative is a general presentation of graphs in machine learning techniques. The article does not pretend to be a scientific work that fully describes the full power of graphs, but only introduces the reader to this amazing and complex world. The publication is perfect, both for battle-hardened professionals who are not yet familiar with the presentation of graphs in deep learning, and for beginners in this field.


Introduction


Automatically highlighting important features needed to solve a problem is one of the main reasons for the successful use of machine learning. But traditionally, when working with graphs, machine learning approaches have relied on user-defined heuristics to extract the coding features of structural graph information. Nevertheless, the trend of recent years has changed: approaches are increasingly emerging in which they automatically learn to code the graph structure in low-dimensional investments using methods of deep learning and non-linear dimension reduction.


In machine learning on graphs, two central problems can be distinguished: the inclusion of information about the structure of the graph in the model (i.e., a simple way of encoding this information in the feature vector) and the reduction in the dimension of the feature vector.


To extract structural information from graphs, traditional machine approaches are often based on summary statistics of graphs (e.g., clustering coefficients), kernel functions, or carefully designed functions for measuring local neighborhood structures. However, these approaches are limited, because these engineering solutions cannot be adapted in the learning process, and their development is a laborious and expensive process.


Why graphs?


Speaking of graphs as structural units of data representation, you can ask yourself a simple question: why graphs?


β€” . , , ( ) [1], [2], ( [3], [4] [5]), [6] [7].


CV/ML , , . , , [8].


, . . , , , .



, (embeddings), . , , , , (), Rd. , , . , .


, . , , . , , , .


, (direct encoding), . . , , -. , , , .


DeepWalk node2vec . , . , .


( ). (DNGR SDNE), , [9].



G=(V,E), V, , Eβ€” ( ) , .


(.1). : V=1,2,3,4,5,6E=1,2,1,5,2,3,2,5,3,4,4,5,4,6


image


, , , ( , ). .


, G=(V,E)A. , X∈Rmβˆ—|V|( , ). , , AX, z∈Rd, d<<|V|.


, AX, . , , . (, )


- , vizi, / . ; vi( ) , vi( ). , .


image



, , , . , (, ) . 2 , , .


image


, β€” , , zi∈Rd( zivi∈V):


 textbfENC:Vβ†’Rd


β€” , :


 textbfDEC:Rdβˆ—Rdβ†’R+


. , , . , (zi,zj), vivj. , :


DEC(ENC(vi),ENC(vj))=DEC(zi,zj)β‰ˆsG(vi,vj) textbf(1)


sGβ€” , G. , sG(zi,zi)β‰œAi,j, 1, 0. sGvivjG. ( 1) LD:


L= sum(vi,vj)∈Dβ„“(DEC(zi,zj),sG(vi,vj))


β„“=Rβˆ—Rβ†’Rβ€” , (.. ) DEC(zi,zj)sG(vi,vj).


, -, , . , , , , , .


seq2seq , , . , seq2seq, GNN [10].



, :


  1. sG: Vβˆ—Vβ†’R+, G.
  2. ENC, . , .
  3. DEC, .
  4. β„“, , .

image


. , . pG(vj|vi)vj, vi.


, , . , , (.3). , , , .


image


DeepWalk node2vec, , , . , , . , , :


DEC(z i,z j)β‰œ dfracez iTz j sumvk∈VeziTzkβ‰ˆpG,T(v j|v i) textbf(2)


pG,T(vj|vi)β€” vjT, vi, TT∈2,...,10. , pG,T(vj|vi). , :


β„“= sum(vi,vj)∈Dβˆ’log(DEC(zi,zj)) textbf(3)


D, (.. Nvi(vi,vj) simpG,T(vj|vj). β€” O(|D||V|)( (2) O(|V|)). , DeepWalk node2vec (3). DeepWalk softmax , . , node2vec (3), : , , " ".


, node2vec DeepWalk , , . , node2vec : pq, (.4). p, q. , node2vec , .


image


A: , node2vec , p q. , v sv βˆ—, (Ξ±) , .


B: , (BFS) (DFS). , BFS, , , . , , DFS, .



, . , :


  1. (.. ). , , .
  2. . (, ), .
  3. . , , ( , ). , , , , .

/ . -, , , .


(DNGR) (SDNE) , : , . , β€” , (.5). DNGR SDNE , .


image


visi∈R|V|, viS( Sβ€” Si,j=sG(vi,vj)). sivivi. DNGR SDNE , si, si:


DEC(ENC(si))=DEC(zi)β‰ˆsi


, :


β„“= sumvi∈V||DEC(zi)βˆ’si||22


, zi, |V|( ), , . SDNE, DNGR, : , (.5).


SDNE DNGR , si, , . DNGR si, , DeepWalk node2vec. SDNE siβ‰œAi, vi.


, SDNE DNGR , ( ), - . |V|, .


, . . , , , [9], . , .



. , , , , , , .


, , , .


. (. O(|E|)), ( ). . , , , , , , β€” , , , . , , , .


. , , - , , . , , , , .


. , , , . , , , . , .


. , , . , , . , , , . , , , , .


, β€” . , , .



[1] β€” W. L. Hamilton, Z. Ying, and J. Leskovec, "Inductive representation learning on large graphs," NIPS 2017, pp. 1024–1034, 2017.
[2] β€” T. N. Kipf and M. Welling, "Semi-supervised classification with graph convolutional networks," ICLR 2017, 2017.
[3] β€” A. Sanchez-Gonzalez, N. Heess, J. T. Springenberg, J. Merel, M. Riedmiller, R. Hadsell, and P. Battaglia, "Graph networks as learnable physics engines for inference and control," arXiv
preprint arXiv:1806.01242, 2018.
[4] β€” P. Battaglia, R. Pascanu, M. Lai, D. J. Rezende et al., "Interaction networks for learning about objects, relations and physics," in NIPS 2016, 2016, pp. 4502–4510.
[5] β€” A. Fout, J. Byrd, B. Shariat, and A. Ben-Hur, "Protein interface prediction using graph convolutional networks," in NIPS 2017, 2017, pp. 6530–6539.
[6] β€” T. Hamaguchi, H. Oiwa, M. Shimbo, and Y. Matsumoto, "Knowledge transfer for out-of-knowledge-base entities: A graph neural network approach," in IJCAI 2017, 2017, pp. 1802–1808.
[7] β€” H. Dai, E. B. Khalil, Y. Zhang, B. Dilkina, and L. Song, "Learning combinatorial optimization algorithms over graphs," arXiv preprint arXiv:1704.01665, 2017.
[8] β€” X. Liang, X. Shen, J. Feng, F. Lin, S. Yan, "Semantic Object Parsing with Graph LSTM", arXiv:1603.07063v1 [cs.CV] 23 Mar 2016.
[9] β€” Z. Wu, S. Pan, F. Chen, G. Long, C. Zhang, Philip S. Yu, "A Comprehensive Survey on Graph Neural Networks", arXiv:1901.00596v4 [cs.LG] 4 Dec 2019.
[10] - P. VeličkoviΔ‡, G. Cucurull, A. Casanova, A. Romero, P. LiΓ², Y. Bengio, β€œGraph Attention Networks”, arXiv: 1710.10903v3 [stat.ML] Feb 4, 2018.


References


Graph Neural Networks: A Review of Methods and Applications
Representation Learning on Graphs: Methods and Applications

Source: https://habr.com/ru/post/undefined/


All Articles