{"id":332128,"date":"2022-04-19T21:00:11","date_gmt":"2022-04-19T21:00:11","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=332128"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=332128","title":{"rendered":"<span>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 PyTorch Geometric<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/56b\/a31\/4f2\/56ba314f2e102d594341ff95e070e889.gif\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/56b\/a31\/4f2\/56ba314f2e102d594341ff95e070e889.gif\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a \u0441\u0442\u0430\u0440\u0442\u0443 \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u0433\u043e <a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_190422&amp;utm_term=lead\"><u>\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/u><\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0438 \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e t-SNE \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<hr\/>\n<p>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u0412 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 <em>\u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445<\/em> \u0441\u0435\u0442\u044f\u0445 \u0443 \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/72e\/b67\/adf\/72eb67adfe01caf2c9443754a888239e.png\" alt=\"\u0423\u0437\u0435\u043b 4 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 3, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 2\" title=\"\u0423\u0437\u0435\u043b 4 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 3, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 2\" width=\"1400\" height=\"644\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/72e\/b67\/adf\/72eb67adfe01caf2c9443754a888239e.png\"\/><figcaption>\u0423\u0437\u0435\u043b 4 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 3, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 2<\/figcaption><\/figure>\n<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0443\u0447\u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442.<\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 PyTorch Geometric \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1B0vLpH_gSfrOLgsc2UZVyXrcofzA-t0L?usp=sharing\">\u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 <\/a>Google Colab.<\/p>\n<h2>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/e70\/5e5\/9a2\/e705e59a2c71fa29aa0aae0ede057d38.png\" alt=\"\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 CiteSeer, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 yEd Live\" title=\"\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 CiteSeer, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 yEd Live\" width=\"1002\" height=\"939\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/e70\/5e5\/9a2\/e705e59a2c71fa29aa0aae0ede057d38.png\"\/><figcaption>\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 CiteSeer, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 yEd Live<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0441\u0435\u0442\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 \u2014 \u0446\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<ul>\n<li>\n<p><a href=\"http:\/\/www.kamalnigam.com\/papers\/cora-jnl.pdf\">Cora<\/a>. \u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2708 \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0435\u043c\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 (1) \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 (0) \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 1433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u043b\u043e\u0432. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c <a href=\"https:\/\/blog.skillfactory.ru\/glossary\/nlp\/\">\u00ab\u043c\u0435\u0448\u043a\u0435 \u0441\u043b\u043e\u0432\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/clgiles.ist.psu.edu\/papers\/DL-1998-citeseer.pdf\">CiteSeer<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 3312 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 (1) \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 (0) \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u0437 3703 \u0441\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/eliassi.org\/papers\/ai-mag-tr08.pdf\">PubMed<\/a>. \u042d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 19 717 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043e \u0434\u0438\u0430\u0431\u0435\u0442\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PubMed \u0438\u0437 \u0442\u0440\u0451\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tf%E2%80%93idf\">\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0435 <\/a>\u043f\u043e TF-IDF \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u043b\u043e\u0432 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043d\u0430 500 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0432 \u043d\u0430\u0443\u0447\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u044b (MLP), \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (GCN) \u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (GAT), \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043d\u0430\u0448\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 <a href=\"https:\/\/arxiv.org\/pdf\/1710.10903.pdf\">\u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435<\/a>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/afb\/35b\/a77\/afb35ba778aa8a282f582ac2e7303789.png\" width=\"1070\" height=\"291\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/afb\/35b\/a77\/afb35ba778aa8a282f582ac2e7303789.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 PubMed \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0451\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043f\u0440\u043e\u0434\u043b\u044f\u0442\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435. Cora \u2014 \u0441\u0430\u043c\u044b\u0439 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u044c\u043c\u0451\u043c CiteSeer \u043a\u0430\u043a \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/pytorch-geometric.readthedocs.io\/en\/latest\/modules\/datasets.html#torch_geometric.datasets.Planetoid\">Planetoid<\/a> \u0432 PyTorch Geometric \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">from torch_geometric.datasets import Planetoid  # Import dataset from PyTorch Geometric dataset = Planetoid(root=\".\", name=\"CiteSeer\")  # Print information about the dataset print(f'Number of graphs: {len(dataset)}') print(f'Number of nodes: {dataset[0].x.shape[0]}') print(f'Number of features: {dataset.num_features}') print(f'Number of classes: {dataset.num_classes}') print(f'Has isolated nodes: {dataset[0].has_isolated_nodes()}')<\/code><\/pre>\n<pre><code>Number of graphs: 1 Number of nodes: 3327 Number of features: 3703 Number of classes: 6 Has isolated nodes: True<\/code><\/pre>\n<p>\u0423 \u043d\u0430\u0441 3327 \u0443\u0437\u043b\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 3312. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432 PyTorch Geometric \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f CiteSeer \u0438\u0437 <a href=\"https:\/\/arxiv.org\/pdf\/1603.08861.pdf\">\u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/a>, \u0433\u0434\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b 3327 \u0443\u0437\u043b\u043e\u0432. \u041d\u043e \u0447\u0430\u0441\u0442\u044c \u0443\u0437\u043b\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e 48, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430! \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0431\u0435\u0437 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043b\u0435\u0433\u043a\u043e. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e degree:<\/p>\n<pre><code class=\"python\">from torch_geometric.utils import degree from collections import Counter  # Get list of degrees for each node degrees = degree(data.edge_index[0]).numpy()  # Count the number of nodes for each degree numbers = Counter(degrees)  # Bar plot fig, ax = plt.subplots(figsize=(18, 7)) ax.set_xlabel('Node degree') ax.set_ylabel('Number of nodes') plt.bar(numbers.keys(),         numbers.values(),         color='#0A047A')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/1d8\/768\/bdb\/1d8768bdbbda2cbdb3594d156fa60673.png\" width=\"1400\" height=\"568\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/1d8\/768\/bdb\/1d8768bdbbda2cbdb3594d156fa60673.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0443\u0437\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0438\u043b\u0438 2 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445. \u042d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 CiteSeer, \u0447\u0435\u043c \u0443 \u0434\u0432\u0443\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>2. \u0421\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d \u00ab\u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u00bb \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u0445 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 2017 \u0433\u043e\u0434\u0443 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/arxiv.org\/abs\/1710.10903\">Veli\u010dkovi\u0107 et al.<\/a>, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u0437\u044f\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0434\u0435\u044e: \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c. \u0418 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0430 \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u0437\u0434\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/559\/7a6\/94d\/5597a694db5360d8b55be468371fed60.png\" width=\"1400\" height=\"644\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/559\/7a6\/94d\/5597a694db5360d8b55be468371fed60.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 (\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f). \u041f\u0443\u0441\u0442\u044c \u03b1\u1d62\u2c7c \u2014 \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 <em>i<\/em> \u0438 <em>j<\/em>. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 1, \u0433\u0434\u0435 ?\u2014 \u044d\u0442\u043e \u043e\u0431\u0449\u0430\u044f \u0432\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/fbf\/8d7\/ebd\/fbf8d7ebd6b8296980e0f5e548f393e6.png\" width=\"1400\" height=\"185\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/fbf\/8d7\/ebd\/fbf8d7ebd6b8296980e0f5e548f393e6.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f? \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443, \u043d\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u044d\u0442\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Softmax.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u044b \u043f\u0430\u0440\u044b \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 ?\u2090\u209c\u209c:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cee\/fcb\/bd7\/ceefcbbd7f6b55567139db184f9a8cd8.png\" width=\"1400\" height=\"90\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cee\/fcb\/bd7\/ceefcbbd7f6b55567139db184f9a8cd8.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/415\/c76\/5b7\/415c765b7018a828b7b549ca0994e3ab.png\" width=\"1400\" height=\"839\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/415\/c76\/5b7\/415c765b7018a828b7b549ca0994e3ab.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/h2>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430\u043f \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>LeakyReLU<\/em>:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/de9\/75e\/4b2\/de975e4b2f64636be7af69241d2d893f.png\" width=\"1400\" height=\"82\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/de9\/75e\/4b2\/de975e4b2f64636be7af69241d2d893f.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/049\/9fb\/f82\/0499fbf82cf115e9fb4020d3a44af1f4.png\" width=\"1400\" height=\"839\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/049\/9fb\/f82\/0499fbf82cf115e9fb4020d3a44af1f4.png\"\/><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Softmax<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0418, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0443\u0437\u0435\u043b: 2 \u0438\u043b\u0438 3 (<em>\u03b1<\/em>\u2081\u2082 > <em>\u03b1<\/em>\u2081\u2083), \u0432\u0430\u0436\u043d\u0435\u0435 \u0434\u043b\u044f \u0443\u0437\u043b\u0430 1, \u0443\u0437\u043b\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431. \u0412 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e softmax. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c\u0443 \u0443\u0437\u043b\u0443:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/43e\/1a7\/d3f\/43e1a7d3fb34f7c5500b4189205c1cde.png\" width=\"1400\" height=\"198\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/43e\/1a7\/d3f\/43e1a7d3fb34f7c5500b4189205c1cde.png\"\/><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/26b\/be2\/177\/26bbe21777fef436fcb3ece097c3864b.png\" width=\"1400\" height=\"839\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/26b\/be2\/177\/26bbe21777fef436fcb3ece097c3864b.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 <em>\u03b1<\/em>\u1d62\u2c7c. \u041d\u043e \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/arxiv.org\/abs\/1706.03762\">Vaswani et al.<\/a> \u0432\u0432\u0435\u043b\u0438 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Transformer \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u00bb.<\/p>\n<h2>\u0411\u043e\u043d\u0443\u0441: \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0438, \u0445\u043e\u0442\u044f Transformer \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u2014 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u0438\u0434\u0435\u0438 \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430:<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/79c\/8e0\/60e\/79c8e060ea93067ba3986d87e25cfb04.png\" alt=\"\u041c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\" title=\"\u041c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\" width=\"1400\" height=\"839\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79c\/8e0\/60e\/79c8e060ea93067ba3986d87e25cfb04.png\"\/><figcaption>\u041c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/figcaption><\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0442\u0440\u0451\u0445 \u044d\u0442\u0430\u043f\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0438\u0442\u044c \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.\u00a0<\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e <em>h\u2081<\/em> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 h\u2081\u1d4f \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0445\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 <em>h\u1d62\u1d4f<\/em> \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u043b\u043e\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f n \u2014 \u044d\u0442\u043e \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/644\/179\/b01\/644179b013196dd06115b9bd6ec6b01f.png\" width=\"1400\" height=\"218\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/644\/179\/b01\/644179b013196dd06115b9bd6ec6b01f.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 <em>h\u1d62\u1d4f <\/em>\u2014 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a2\/0de\/87d\/8a20de87d2676464de78299f5c9182be.png\" width=\"1400\" height=\"90\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a2\/0de\/87d\/8a20de87d2676464de78299f5c9182be.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435 \u0441\u0435\u0442\u0438, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u043e\u043c \u0441\u043b\u043e\u0435.<\/p>\n<p>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432 PyTorch Geometric. \u0412 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u044f \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f: GATConv \u0438 GATv2Conv. \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0440\u0435\u0447\u044c \u0448\u043b\u0430 \u043e \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0437 \u043d\u0438\u0445, \u043d\u043e \u0432 2021 \u0433\u043e\u0434\u0443 <a href=\"https:\/\/arxiv.org\/abs\/2105.14491\">Brody et al.<\/a> \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0412\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 ? \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438, \u0430 \u0432\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f ?\u2090\u209c\u209c \u2014 \u043f\u043e\u0441\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 LeakyReLU. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0438\u043c\u0435\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>GatConv:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/b4c\/6c3\/2a0\/b4c6c32a08587560981bbb88140ab6cb.png\" width=\"1400\" height=\"90\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b4c\/6c3\/2a0\/b4c6c32a08587560981bbb88140ab6cb.png\"\/><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>Gatv2Conv:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/573\/d43\/945\/573d43945b811249f784a669a4f3a221.png\" width=\"1400\" height=\"90\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/573\/d43\/945\/573d43945b811249f784a669a4f3a221.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0441\u043b\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 Brody et al. \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e Gatv2Conv \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 GatConv.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 CiteSeer. \u042f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430, \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044f \u0438\u0445. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/PetarV-\/GAT\">\u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0421\u043b\u043e\u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u043e\u0435 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u043e\u0441\u0435\u043c\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u2014 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u043b\u043e\u0432\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430, \u0432 \u043d\u0435\u0439 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0443\u0447\u0438\u043c \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c:<\/p>\n<pre><code class=\"python\">import torch.nn.functional as F from torch.nn import Linear, Dropout from torch_geometric.nn import GCNConv, GATv2Conv   class GCN(torch.nn.Module):   \"\"\"Graph Convolutional Network\"\"\"   def __init__(self, dim_in, dim_h, dim_out):     super().__init__()     self.gcn1 = GCNConv(dim_in, dim_h)     self.gcn2 = GCNConv(dim_h, dim_out)     self.optimizer = torch.optim.Adam(self.parameters(),                                       lr=0.01,                                       weight_decay=5e-4)    def forward(self, x, edge_index):     h = F.dropout(x, p=0.5, training=self.training)     h = self.gcn1(h, edge_index)     h = torch.relu(h)     h = F.dropout(h, p=0.5, training=self.training)     h = self.gcn2(h, edge_index)     return h, F.log_softmax(h, dim=1)   class GAT(torch.nn.Module):   \"\"\"Graph Attention Network\"\"\"   def __init__(self, dim_in, dim_h, dim_out, heads=8):     super().__init__()     self.gat1 = GATv2Conv(dim_in, dim_h, heads=heads)     self.gat2 = GATv2Conv(dim_h*heads, dim_out, heads=1)     self.optimizer = torch.optim.Adam(self.parameters(),                                       lr=0.005,                                       weight_decay=5e-4)    def forward(self, x, edge_index):     h = F.dropout(x, p=0.6, training=self.training)     h = self.gat1(x, edge_index)     h = F.elu(h)     h = F.dropout(h, p=0.6, training=self.training)     h = self.gat2(h, edge_index)     return h, F.log_softmax(h, dim=1)  def accuracy(pred_y, y):     \"\"\"Calculate accuracy.\"\"\"     return ((pred_y == y).sum() \/ len(y)).item()  def train(model, data):     \"\"\"Train a GNN model and return the trained model.\"\"\"     criterion = torch.nn.CrossEntropyLoss()     optimizer = model.optimizer     epochs = 200      model.train()     for epoch in range(epochs+1):         # Training         optimizer.zero_grad()         _, out = model(data.x, data.edge_index)         loss = criterion(out[data.train_mask], data.y[data.train_mask])         acc = accuracy(out[data.train_mask].argmax(dim=1), data.y[data.train_mask])         loss.backward()         optimizer.step()          # Validation         val_loss = criterion(out[data.val_mask], data.y[data.val_mask])         val_acc = accuracy(out[data.val_mask].argmax(dim=1), data.y[data.val_mask])          # Print metrics every 10 epochs         if(epoch % 10 == 0):             print(f'Epoch {epoch:>3} | Train Loss: {loss:.3f} | Train Acc: '                   f'{acc*100:>6.2f}% | Val Loss: {val_loss:.2f} | '                   f'Val Acc: {val_acc*100:.2f}%')                return model  def test(model, data):     \"\"\"Evaluate the model on test set and print the accuracy score.\"\"\"     model.eval()     _, out = model(data.x, data.edge_index)     acc = accuracy(out.argmax(dim=1)[data.test_mask], data.y[data.test_mask])     return acc<\/code><\/pre>\n<pre><code class=\"python\">%%time  # Create GCN gcn = GCN(dataset.num_features, 16, dataset.num_classes) print(gcn)  # Train train(gcn, data)  # Test acc = test(gcn, data) print(f'GCN test accuracy: {acc*100:.2f}%\\n')<\/code><\/pre>\n<pre><code class=\"python\">GCN(   (gcn1): GCNConv(3703, 16)   (gcn2): GCNConv(16, 6) ) Epoch   0 | Train Loss: 1.782 | Train Acc:  20.83% | Val Loss: 1.79  Epoch  20 | Train Loss: 0.165 | Train Acc:  95.00% | Val Loss: 1.30  Epoch  40 | Train Loss: 0.069 | Train Acc:  99.17% | Val Loss: 1.66  Epoch  60 | Train Loss: 0.053 | Train Acc:  99.17% | Val Loss: 1.50  Epoch  80 | Train Loss: 0.054 | Train Acc: 100.00% | Val Loss: 1.67  Epoch 100 | Train Loss: 0.062 | Train Acc:  99.17% | Val Loss: 1.62  Epoch 120 | Train Loss: 0.043 | Train Acc: 100.00% | Val Loss: 1.66  Epoch 140 | Train Loss: 0.058 | Train Acc:  98.33% | Val Loss: 1.68  Epoch 160 | Train Loss: 0.037 | Train Acc: 100.00% | Val Loss: 1.44  Epoch 180 | Train Loss: 0.036 | Train Acc:  99.17% | Val Loss: 1.65  Epoch 200 | Train Loss: 0.093 | Train Acc:  95.83% | Val Loss: 1.73   GCN test accuracy: 67.70%  CPU times: user 25.1 s, sys: 847 ms, total: 25.9 s Wall time: 32.4 s<\/code><\/pre>\n<pre><code class=\"python\">%%time  # Create GAT gat = GAT(dataset.num_features, 8, dataset.num_classes) print(gat)  # Train train(gat, data)  # Test acc = test(gat, data) print(f'GAT test accuracy: {acc*100:.2f}%\\n')<\/code><\/pre>\n<pre><code class=\"python\">GAT(   (gat1): GATv2Conv(3703, 8, heads=8)   (gat2): GATv2Conv(64, 6, heads=1) ) Epoch   0 | Train Loss: 1.790 | Val Loss: 1.81 | Val Acc: 12.80% Epoch  20 | Train Loss: 0.040 | Val Loss: 1.21 | Val Acc: 64.80% Epoch  40 | Train Loss: 0.027 | Val Loss: 1.20 | Val Acc: 67.20% Epoch  60 | Train Loss: 0.009 | Val Loss: 1.11 | Val Acc: 67.00% Epoch  80 | Train Loss: 0.013 | Val Loss: 1.16 | Val Acc: 66.80% Epoch 100 | Train Loss: 0.013 | Val Loss: 1.07 | Val Acc: 67.20% Epoch 120 | Train Loss: 0.014 | Val Loss: 1.12 | Val Acc: 66.40% Epoch 140 | Train Loss: 0.007 | Val Loss: 1.19 | Val Acc: 65.40% Epoch 160 | Train Loss: 0.007 | Val Loss: 1.16 | Val Acc: 68.40% Epoch 180 | Train Loss: 0.006 | Val Loss: 1.13 | Val Acc: 68.60% Epoch 200 | Train Loss: 0.007 | Val Loss: 1.13 | Val Acc: 68.40%  GAT test accuracy: 70.00%  CPU times: user 53.4 s, sys: 2.68 s, total: 56.1 s Wall time: 55.9 s<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442 \u043d\u0435 \u0441\u0442\u0440\u043e\u0433\u0438\u0439: \u0435\u0433\u043e \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0442\u044c n \u0440\u0430\u0437 \u0438 \u0437\u0430 \u043a\u043e\u043d\u0435\u0447\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043f\u0440\u0438\u043d\u044f\u0442\u044c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0441\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u043c \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435\u043c.<\/p>\n<p>\u0412 \u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0443\u044e \u043f\u043e \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 (70,00% \u043f\u0440\u043e\u0442\u0438\u0432 67,70), \u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0442\u043e \u0435\u0441\u0442\u044c 55,9 \u0441\u0435\u043a\u0443\u043d\u0434 \u043f\u0440\u043e\u0442\u0438\u0432 32,4, \u0447\u0442\u043e \u043c\u043e\u0436\u0435\u0442 \u0432\u044b\u0437\u0432\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u0441 \u043c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c\u044e \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c\u0438 \u0433\u0440\u0430\u0444\u0430\u043c\u0438.<\/p>\n<p>\u0410\u0432\u0442\u043e\u0440\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 72,5% \u043d\u0430 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 70,3% \u0434\u043b\u044f \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u043e\u0439 \u0441\u0435\u0442\u0438, \u0447\u0442\u043e \u044f\u0432\u043d\u043e \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432. \u0420\u0430\u0437\u043d\u0438\u0446\u0443 \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0432 \u043c\u043e\u0434\u0435\u043b\u044f\u0445, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430\u043c\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, patience 100 \u0432\u043c\u0435\u0441\u0442\u043e \u0444\u0438\u043a\u0441\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u044d\u043f\u043e\u0445.<\/p>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0435\u043c\u0443 \u043d\u0430\u0443\u0447\u0438\u043b\u0430\u0441\u044c \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f? \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 <a href=\"https:\/\/neerc.ifmo.ru\/wiki\/index.php?title=%D0%A1%D1%82%D0%BE%D1%85%D0%B0%D1%81%D1%82%D0%B8%D1%87%D0%B5%D1%81%D0%BA%D0%BE%D0%B5_%D0%B2%D0%BB%D0%BE%D0%B6%D0%B5%D0%BD%D0%B8%D0%B5_%D1%81%D0%BE%D1%81%D0%B5%D0%B4%D0%B5%D0%B9_%D1%81_t-%D1%80%D0%B0%D1%81%D0%BF%D1%80%D0%B5%D0%B4%D0%B5%D0%BB%D0%B5%D0%BD%D0%B8%D0%B5%D0%BC\">t-SNE<\/a> \u0434\u043b\u044f \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 2D \u0438\u043b\u0438 3D. \u0421\u043d\u0430\u0447\u0430\u043b\u0430 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u043b\u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u0434\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f: \u043a\u0430\u043a \u0441\u043e\u0437\u0434\u0430\u044e\u0449\u0438\u0435\u0441\u044f \u0438\u0437 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u0441\u043e\u0432\u044b\u0445 \u043c\u0430\u0442\u0440\u0438\u0446 \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u043c\u0438:<\/p>\n<pre><code class=\"python\">untrained_gat = GAT(dataset.num_features, 8, dataset.num_classes)  # Get embeddings h, _ = untrained_gat(data.x, data.edge_index)  # Train TSNE tsne = TSNE(n_components=2, learning_rate='auto',          init='pca').fit_transform(h.detach())  # Plot TSNE plt.figure(figsize=(10, 10)) plt.axis('off') plt.scatter(tsne[:, 0], tsne[:, 1], s=50, c=data.y) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/05e\/04c\/587\/05e04c5879fa9e55edaa08024f26a0e1.png\" width=\"1400\" height=\"1364\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/05e\/04c\/587\/05e04c5879fa9e55edaa08024f26a0e1.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043d\u0438\u043a\u0430\u043a\u043e\u0439 \u044f\u0432\u043d\u043e\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u0442. \u041d\u043e \u043b\u0443\u0447\u0448\u0435 \u043b\u0438 \u0432\u044b\u0433\u043b\u044f\u0434\u044f\u0442 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438?<\/p>\n<pre><code class=\"python\">h, _ = gat(data.x, data.edge_index)  # Train TSNE tsne = TSNE(n_components=2, learning_rate='auto',          init='pca').fit_transform(h.detach())  # Plot TSNE plt.figure(figsize=(10, 10)) plt.axis('off') plt.scatter(tsne[:, 0], tsne[:, 1], s=50, c=data.y) plt.show()<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/ec0\/266\/77a\/ec026677a62eef9e375072ac93b8dbdd.png\" alt=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0440\u0430\u0431\u043e\u0442\" title=\"\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0440\u0430\u0431\u043e\u0442\" width=\"1400\" height=\"1364\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/ec0\/266\/77a\/ec026677a62eef9e375072ac93b8dbdd.png\"\/><figcaption>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u043f\u043e \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0440\u0430\u0431\u043e\u0442<\/figcaption><\/figure>\n<p>\u0420\u0430\u0437\u043d\u0438\u0446\u0430 \u0437\u0430\u043c\u0435\u0442\u043d\u0430: \u0443\u0437\u043b\u044b \u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 \u0441\u043e\u0431\u0440\u0430\u043d\u044b \u0432\u043c\u0435\u0441\u0442\u0435. \u0412\u0438\u0434\u043d\u044b \u0448\u0435\u0441\u0442\u044c \u043a\u043b\u0430\u0441\u0442\u0435\u0440\u043e\u0432, \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0448\u0435\u0441\u0442\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c \u0440\u0430\u0431\u043e\u0442. \u0415\u0441\u0442\u044c \u043e\u0442\u043a\u043b\u043e\u043d\u044f\u044e\u0449\u0438\u0435\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043d\u043e \u044d\u0442\u043e\u0433\u043e \u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043b\u043e \u043e\u0436\u0438\u0434\u0430\u0442\u044c: \u043d\u0430\u0448 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0434\u0430\u043b\u0451\u043a \u043e\u0442 \u0438\u0434\u0435\u0430\u043b\u0430.<\/p>\n<p>\u0420\u0430\u043d\u0435\u0435 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043b, \u0447\u0442\u043e \u0443\u0437\u043b\u044b \u0441 \u043f\u043b\u043e\u0445\u0438\u043c\u0438 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f\u043c\u0438 \u043c\u043e\u0433\u0443\u0442 \u043d\u0435\u0433\u0430\u0442\u0438\u0432\u043d\u043e \u0432\u043b\u0438\u044f\u0442\u044c \u043d\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c CiteSeer. \u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u0443\u0437\u043b\u043e\u0432:<\/p>\n<pre><code class=\"python\">from torch_geometric.utils import degree  # Get model's classifications _, out = gat(data.x, data.edge_index)  # Calculate the degree of each node degrees = degree(data.edge_index[0]).numpy()  # Store accuracy scores and sample sizes accuracies = [] sizes = []  # Accuracy for degrees between 0 and 5 for i in range(0, 6):   mask = np.where(degrees == i)[0]   accuracies.append(accuracy(out.argmax(dim=1)[mask], data.y[mask]))   sizes.append(len(mask))  # Accuracy for degrees > 5 mask = np.where(degrees > 5)[0] accuracies.append(accuracy(out.argmax(dim=1)[mask], data.y[mask])) sizes.append(len(mask))  # Bar plot fig, ax = plt.subplots(figsize=(18, 9)) ax.set_xlabel('Node degree') ax.set_ylabel('Accuracy score') ax.set_facecolor('#EFEEEA') plt.bar(['0','1','2','3','4','5','>5'],         accuracies,         color='#0A047A') for i in range(0, 7):     plt.text(i, accuracies[i], f'{accuracies[i]*100:.2f}%',              ha='center', color='#0A047A') for i in range(0, 7):     plt.text(i, accuracies[i]\/\/2, sizes[i],              ha='center', color='white')<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/3b2\/218\/456\/3b22184568a3d260e01b4dabefdbb5ed.png\" alt=\"\u0421\u0442\u0435\u043f\u0435\u043d\u0438 \u0443\u0437\u043b\u043e\u0432 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438\" title=\"\u0421\u0442\u0435\u043f\u0435\u043d\u0438 \u0443\u0437\u043b\u043e\u0432 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438\" width=\"1400\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/3b2\/218\/456\/3b22184568a3d260e01b4dabefdbb5ed.png\"\/><figcaption>\u0421\u0442\u0435\u043f\u0435\u043d\u0438 \u0443\u0437\u043b\u043e\u0432 \u0438 \u043e\u0446\u0435\u043d\u043a\u0430 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438<\/figcaption><\/figure>\n<p>\u0418 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u043f\u043e\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0430\u044e\u0442 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u0435: \u0443\u0437\u043b\u044b, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u0430\u043b\u043e \u0441\u043e\u0441\u0435\u0434\u0435\u0439, \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u043e\u0436\u043d\u0435\u0435. \u0422\u0430\u043a\u043e\u0432\u044b \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439: \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u043b\u0435\u0432\u0430\u043d\u0442\u043d\u044b\u0445 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438.<\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<p>\u0425\u043e\u0442\u044f \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043e\u0431\u0443\u0447\u0430\u044e\u0442\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435, \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u044c \u0443 \u043d\u0438\u0445 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0432\u044b\u0448\u0435, \u0447\u0435\u043c \u0443 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445 \u0441\u0435\u0442\u0435\u0439. \u041c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432\u043c\u0435\u0441\u0442\u043e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0438 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f \u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u0442\u043e\u0447\u043d\u0435\u0435.<\/p>\n<p>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u2014 \u0434\u0435-\u0444\u0430\u043a\u0442\u043e \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442 \u0432\u043e \u043c\u043d\u043e\u0433\u0438\u0445 \u0437\u0430\u0434\u0430\u0447\u0430\u0445 \u0441 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u0432\u0440\u0435\u043c\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u043e\u0439 \u043f\u0440\u0438 \u0440\u0430\u0431\u043e\u0442\u0435 \u0441 \u043a\u0440\u0443\u043f\u043d\u044b\u043c\u0438 \u043d\u0430\u0431\u043e\u0440\u0430\u043c\u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.\u00a0\u041c\u0430\u0441\u0448\u0442\u0430\u0431\u0438\u0440\u0443\u0435\u043c\u043e\u0441\u0442\u044c \u0432 \u0433\u043b\u0443\u0431\u043e\u043a\u043e\u043c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0438 \u0432\u0430\u0436\u043d\u044b\u0439 \u0444\u0430\u043a\u0442\u043e\u0440: \u043e\u0431\u044b\u0447\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u043e\u0431\u044a\u0451\u043c \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u043e\u0436\u0435\u0442 \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043a \u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438.<\/p>\n<p>\u0410 \u043c\u044b \u043f\u043e\u043c\u043e\u0436\u0435\u043c \u0432\u0430\u043c \u043f\u0440\u043e\u043a\u0430\u0447\u0430\u0442\u044c \u043d\u0430\u0432\u044b\u043a\u0438 \u0438\u043b\u0438 \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0441\u0432\u043e\u0438\u0442\u044c \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044e, \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u0443\u044e \u0432 \u043b\u044e\u0431\u043e\u0435 \u0432\u0440\u0435\u043c\u044f:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_190422&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_190422&amp;utm_term=conc\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0412\u044b\u0431\u0440\u0430\u0442\u044c \u0434\u0440\u0443\u0433\u0443\u044e <a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_190422&amp;utm_term=conc\">\u0432\u043e\u0441\u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u043d\u0443\u044e \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044e<\/a>.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/efa\/127\/537\/efa12753732259228454d446d84efc79.png\" width=\"1000\" height=\"200\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/efa\/127\/537\/efa12753732259228454d446d84efc79.png\"\/><figcaption><\/figcaption><\/figure>\n<details class=\"spoiler\">\n<summary>\u041a\u0440\u0430\u0442\u043a\u0438\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u043a\u0443\u0440\u0441\u043e\u0432 \u0438 \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u0439<\/summary>\n<div class=\"spoiler__content\">\n<p><strong>Data Science \u0438 Machine Learning<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Scientist<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-analyst-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=analytics_dapr_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Data Analyst<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/matematika-dlya-data-science#syllabus?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mat_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/matematika-i-machine-learning-dlya-data-science?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_matml_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u041c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u043a\u0430 \u0438 Machine Learning \u0434\u043b\u044f Data Science\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/data-engineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dea_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e Data Engineering<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/machine-learning-i-deep-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_mldl_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abMachine Learning \u0438 Deep Learning\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/machine-learning?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_ml_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e Machine Learning<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>Python, \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-fullstack-web-developer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fpw_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Fullstack-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u043d\u0430 Python<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/python-for-web-developers?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_pws_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00abPython \u0434\u043b\u044f \u0432\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0438\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/frontend-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_fr_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Frontend-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/webdev?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_webdev_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0412\u0435\u0431-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041c\u043e\u0431\u0438\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/ios-razrabotchik-s-nulya?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_ios_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f iOS-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/android-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_andr_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Android-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>Java \u0438 C#<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_java_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f Java-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/java-qa-engineer-testirovshik-po?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_qaja_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f QA-\u0438\u043d\u0436\u0435\u043d\u0435\u0440 \u043d\u0430 JAVA<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/c-sharp-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cdev_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C#-\u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/game-razrabotchik-na-unity-i-c-sharp?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_gamedev_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0438\u0433\u0440 \u043d\u0430 Unity<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u041e\u0442 \u043e\u0441\u043d\u043e\u0432 \u2014 \u0432 \u0433\u043b\u0443\u0431\u0438\u043d\u0443<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/algoritmy-i-struktury-dannyh?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_algo_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u00ab\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445\u00bb<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/c-plus-plus-razrabotchik?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_cplus_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f C++ \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/cyber-security-etichnij-haker?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_hacker_190422&amp;utm_term=cat\">\u041f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u044f \u042d\u0442\u0438\u0447\u043d\u044b\u0439 \u0445\u0430\u043a\u0435\u0440<\/a><\/p>\n<\/li>\n<\/ul>\n<p><strong>\u0410 \u0442\u0430\u043a\u0436\u0435<\/strong><\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/devops-ingineer?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=coding_devops_190422&amp;utm_term=cat\">\u041a\u0443\u0440\u0441 \u043f\u043e DevOps<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/skillfactory.ru\/catalogue?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=sf_allcourses_190422&amp;utm_term=cat\">\u0412\u0441\u0435 \u043a\u0443\u0440\u0441\u044b<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/661933\/\"> https:\/\/habr.com\/ru\/company\/skillfactory\/blog\/661933\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a \u0441\u0442\u0430\u0440\u0442\u0443 \u0444\u043b\u0430\u0433\u043c\u0430\u043d\u0441\u043a\u043e\u0433\u043e <a href=\"https:\/\/skillfactory.ru\/data-scientist-pro?utm_source=habr&amp;utm_medium=habr&amp;utm_campaign=article&amp;utm_content=data-science_dspr_190422&amp;utm_term=lead\"><u>\u043a\u0443\u0440\u0441\u0430 \u043f\u043e Data Science<\/u><\/a> \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c \u0438 \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e t-SNE \u043f\u043e\u043a\u0430\u0436\u0435\u043c, \u0447\u0442\u043e \u0438 \u043a\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0417\u0430 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0441\u0442\u044f\u043c\u0438 \u043f\u0440\u0438\u0433\u043b\u0430\u0448\u0430\u0435\u043c \u043f\u043e\u0434 \u043a\u0430\u0442.<\/p>\n<hr\/>\n<p>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043f\u043e \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u043d\u044f\u0442\u043d\u044b\u043c \u043f\u0440\u0438\u0447\u0438\u043d\u0430\u043c \u2014 \u043e\u0434\u0438\u043d \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u0412 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 <em>\u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0445<\/em> \u0441\u0435\u0442\u044f\u0445 \u0443 \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f. \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0442\u0430\u043a \u0431\u044b\u0442\u044c \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e.<\/p>\n<figure class=\"full-width\"><figcaption>\u0423\u0437\u0435\u043b 4 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 3, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0430\u0436\u043d\u0435\u0435 \u0443\u0437\u043b\u0430 2<\/figcaption><\/figure>\n<p>\u042d\u0442\u0430 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430 \u0440\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0427\u0442\u043e\u0431\u044b \u0443\u0447\u0435\u0441\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u0433\u043e \u0443\u0437\u043b\u0430, \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442.<\/p>\n<p>\u0420\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0432\u0435\u0441\u043e\u0432\u044b\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0432 PyTorch Geometric \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u0443\u044e \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0417\u0430\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043a\u043e\u0434 \u044d\u0442\u043e\u0433\u043e \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u043e\u0436\u043d\u043e \u0432 <a href=\"https:\/\/colab.research.google.com\/drive\/1B0vLpH_gSfrOLgsc2UZVyXrcofzA-t0L?usp=sharing\">\u0431\u043b\u043e\u043a\u043d\u043e\u0442\u0435 <\/a>Google Colab.<\/p>\n<h2>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435<\/h2>\n<figure class=\"full-width\"><figcaption>\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 CiteSeer, \u0441\u043e\u0437\u0434\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 yEd Live<\/figcaption><\/figure>\n<p>\u0414\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0446\u0435\u043b\u0435\u0439 \u0435\u0441\u0442\u044c \u0442\u0440\u0438 \u043a\u043b\u0430\u0441\u0441\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u0430 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u042d\u0442\u043e \u0441\u0435\u0442\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442, \u0433\u0434\u0435 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0443\u0437\u043b\u043e\u0432 \u2014 \u0446\u0438\u0442\u0430\u0442\u0430 \u0438\u0437 \u043d\u0430\u0443\u0447\u043d\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b.<\/p>\n<ul>\n<li>\n<p><a href=\"http:\/\/www.kamalnigam.com\/papers\/cora-jnl.pdf\">Cora<\/a>. \u0421\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 2708 \u0440\u0430\u0431\u043e\u0442 \u043f\u043e \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u0432 \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0435\u043c\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 (1) \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 (0) \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 1433 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0441\u043b\u043e\u0432. \u0418\u043d\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0440\u0435\u0447\u044c \u0438\u0434\u0451\u0442 \u043e \u0431\u0438\u043d\u0430\u0440\u043d\u043e\u043c <a href=\"https:\/\/blog.skillfactory.ru\/glossary\/nlp\/\">\u00ab\u043c\u0435\u0448\u043a\u0435 \u0441\u043b\u043e\u0432\u00bb<\/a>.<\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/clgiles.ist.psu.edu\/papers\/DL-1998-citeseer.pdf\">CiteSeer<\/a>. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u044b\u0439 \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 3312 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442 \u0434\u043b\u044f \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u0438 \u0432 \u043e\u0434\u043d\u0443 \u0438\u0437 \u0448\u0435\u0441\u0442\u0438 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 (1) \u0438\u043b\u0438 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 (0) \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u0437 3703 \u0441\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p><a href=\"http:\/\/eliassi.org\/papers\/ai-mag-tr08.pdf\">PubMed<\/a>. \u042d\u0442\u043e \u043d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 19 717 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439 \u043e \u0434\u0438\u0430\u0431\u0435\u0442\u0435 \u0438\u0437 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 PubMed \u0438\u0437 \u0442\u0440\u0451\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0439. \u041f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0443\u0437\u043b\u0430 \u2014 <a href=\"https:\/\/en.wikipedia.org\/wiki\/Tf%E2%80%93idf\">\u0432\u0437\u0432\u0435\u0448\u0435\u043d\u043d\u044b\u0435 <\/a>\u043f\u043e TF-IDF \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0441\u043b\u043e\u0432 \u0438\u0437 \u0441\u043b\u043e\u0432\u0430\u0440\u044f \u043d\u0430 500 \u0443\u043d\u0438\u043a\u0430\u043b\u044c\u043d\u044b\u0445 \u0441\u043b\u043e\u0432.<\/p>\n<\/li>\n<\/ul>\n<p>\u042d\u0442\u0438 \u043d\u0430\u0431\u043e\u0440\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0448\u0438\u0440\u043e\u043a\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0438\u0441\u044c \u0432 \u043d\u0430\u0443\u0447\u043d\u043e\u043c \u0441\u043e\u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043c\u043d\u043e\u0433\u043e\u0441\u043b\u043e\u0439\u043d\u044b\u0435 \u043f\u0435\u0440\u0441\u0435\u043f\u0442\u0440\u043e\u043d\u044b (MLP), \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u044b\u0435 \u0441\u0435\u0442\u0438 (GCN) \u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f (GAT), \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u043d\u0430\u0448\u0438 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 \u0441 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u043c\u0438 \u0432 <a href=\"https:\/\/arxiv.org\/pdf\/1710.10903.pdf\">\u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435<\/a>:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0431\u043e\u0440 \u0434\u0430\u043d\u043d\u044b\u0445 PubMed \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0439, \u0435\u0433\u043e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 \u043d\u0451\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043f\u0440\u043e\u0434\u043b\u044f\u0442\u0441\u044f \u0434\u043e\u043b\u044c\u0448\u0435. Cora \u2014 \u0441\u0430\u043c\u044b\u0439 \u0438\u0437\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432 \u043b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u044c\u043c\u0451\u043c CiteSeer \u043a\u0430\u043a \u0443\u0441\u0440\u0435\u0434\u043d\u0451\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442. <\/p>\n<p>\u0421 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043b\u0430\u0441\u0441\u0430 <a href=\"https:\/\/pytorch-geometric.readthedocs.io\/en\/latest\/modules\/datasets.html#torch_geometric.datasets.Planetoid\">Planetoid<\/a> \u0432 PyTorch Geometric \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0440\u044f\u043c\u0443\u044e \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0438\u0437 \u044d\u0442\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445:<\/p>\n<pre><code class=\"python\">from torch_geometric.datasets import Planetoid  # Import dataset from PyTorch Geometric dataset = Planetoid(root=\".\", name=\"CiteSeer\")  # Print information about the dataset print(f'Number of graphs: {len(dataset)}') print(f'Number of nodes: {dataset[0].x.shape[0]}') print(f'Number of features: {dataset.num_features}') print(f'Number of classes: {dataset.num_classes}') print(f'Has isolated nodes: {dataset[0].has_isolated_nodes()}')<\/code><\/pre>\n<pre><code>Number of graphs: 1 Number of nodes: 3327 Number of features: 3703 Number of classes: 6 Has isolated nodes: True<\/code><\/pre>\n<p>\u0423 \u043d\u0430\u0441 3327 \u0443\u0437\u043b\u043e\u0432 \u0432\u043c\u0435\u0441\u0442\u043e 3312. \u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0432 PyTorch Geometric \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f CiteSeer \u0438\u0437 <a href=\"https:\/\/arxiv.org\/pdf\/1603.08861.pdf\">\u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u044b<\/a>, \u0433\u0434\u0435 \u0442\u043e\u0436\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b 3327 \u0443\u0437\u043b\u043e\u0432. \u041d\u043e \u0447\u0430\u0441\u0442\u044c \u0443\u0437\u043b\u043e\u0432, \u0430 \u0438\u043c\u0435\u043d\u043d\u043e 48, \u0438\u0437\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0430! \u041a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0431\u0435\u0437 \u0430\u0433\u0440\u0435\u0433\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043d\u0435\u043b\u0435\u0433\u043a\u043e. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0447\u0438\u0441\u043b\u0430 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0439 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0443\u0437\u043b\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e degree:<\/p>\n<pre><code class=\"python\">from torch_geometric.utils import degree from collections import Counter  # Get list of degrees for each node degrees = degree(data.edge_index[0]).numpy()  # Count the number of nodes for each degree numbers = Counter(degrees)  # Bar plot fig, ax = plt.subplots(figsize=(18, 7)) ax.set_xlabel('Node degree') ax.set_ylabel('Number of nodes') plt.bar(numbers.keys(),         numbers.values(),         color='#0A047A')<\/code><\/pre>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0423 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u0430 \u0443\u0437\u043b\u043e\u0432 \u0435\u0441\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0438\u043b\u0438 2 \u0441\u043e\u0441\u0435\u0434\u043d\u0438\u0445. \u042d\u0442\u0438\u043c \u043c\u043e\u0436\u043d\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u0438\u0442\u044c \u043c\u0435\u043d\u044c\u0448\u0438\u0435 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438 CiteSeer, \u0447\u0435\u043c \u0443 \u0434\u0432\u0443\u0445 \u0434\u0440\u0443\u0433\u0438\u0445 \u043d\u0430\u0431\u043e\u0440\u043e\u0432 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<h2>2. \u0421\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0422\u0435\u0440\u043c\u0438\u043d \u00ab\u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u00bb \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u0445 \u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u043e\u044f\u0432\u0438\u043b\u0441\u044f \u0432 2017 \u0433\u043e\u0434\u0443 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435 <a href=\"https:\/\/arxiv.org\/abs\/1710.10903\">Veli\u010dkovi\u0107 et al.<\/a>, \u043a\u043e\u0433\u0434\u0430 \u0437\u0430 \u043e\u0441\u043d\u043e\u0432\u0443 \u0432\u0437\u044f\u043b\u0438 \u043f\u0440\u043e\u0441\u0442\u0443\u044e \u0438\u0434\u0435\u044e: \u043d\u0435 \u0443 \u0432\u0441\u0435\u0445 \u0443\u0437\u043b\u043e\u0432 \u0434\u043e\u043b\u0436\u043d\u0430 \u0431\u044b\u0442\u044c \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u0430\u044f \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c. \u0418 \u044d\u0442\u043e \u043d\u0435 \u043f\u0440\u043e\u0441\u0442\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435, \u0430 \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u2014 \u0437\u0434\u0435\u0441\u044c \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0434\u0440\u0443\u0433 \u0441 \u0434\u0440\u0443\u0433\u043e\u043c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u0438\u043c \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044e \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 (\u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f). \u041f\u0443\u0441\u0442\u044c \u03b1\u1d62\u2c7c \u2014 \u044d\u0442\u043e \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 <em>i<\/em> \u0438 <em>j<\/em>. \u0412\u043e\u0442 \u043a\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u0435 \u0443\u0437\u043b\u0430 1, \u0433\u0434\u0435 ?\u2014 \u044d\u0442\u043e \u043e\u0431\u0449\u0430\u044f \u0432\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u043e \u043a\u0430\u043a \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f? \u041c\u043e\u0436\u043d\u043e \u043d\u0430\u043f\u0438\u0441\u0430\u0442\u044c \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0443\u044e \u0444\u043e\u0440\u043c\u0443\u043b\u0443, \u043d\u043e \u0440\u0430\u0437\u0443\u043c\u043d\u0435\u0435 \u0443\u0437\u043d\u0430\u0442\u044c \u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u044d\u0442\u0438\u0445 \u044d\u0442\u0430\u043f\u043e\u0432:<\/p>\n<ol>\n<li>\n<p>\u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435.<\/p>\n<\/li>\n<li>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438.<\/p>\n<\/li>\n<li>\n<p>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Softmax.<\/p>\n<\/li>\n<\/ol>\n<h2>\u041b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043e\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u044f, \u043d\u0443\u0436\u043d\u044b \u043f\u0430\u0440\u044b \u0441\u043a\u0440\u044b\u0442\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432. \u041f\u0440\u043e\u0449\u0435 \u0432\u0441\u0435\u0433\u043e \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u044d\u0442\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u0438\u0437 \u043e\u0431\u043e\u0438\u0445 \u0443\u0437\u043b\u043e\u0432. \u0422\u043e\u043b\u044c\u043a\u043e \u0442\u043e\u0433\u0434\u0430 \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u043e\u0432\u043e\u0435 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u0432\u0435\u0441\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u0435\u0439 ?\u2090\u209c\u209c:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438<\/h2>\n<p>\u041c\u044b \u0441\u043e\u0437\u0434\u0430\u0451\u043c \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u0430\u043f \u2014 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0430\u043a\u0442\u0438\u0432\u0430\u0446\u0438\u0438. \u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0440\u0430\u0431\u043e\u0442\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0444\u0443\u043d\u043a\u0446\u0438\u044e <em>LeakyReLU<\/em>:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<h2>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f Softmax<\/h2>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438, \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u043d\u0443\u0436\u043d\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c. \u0418, \u0447\u0442\u043e\u0431\u044b \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0442\u044c, \u043a\u0430\u043a\u043e\u0439 \u0443\u0437\u0435\u043b: 2 \u0438\u043b\u0438 3 (<em>\u03b1<\/em>\u2081\u2082 > <em>\u03b1<\/em>\u2081\u2083), \u0432\u0430\u0436\u043d\u0435\u0435 \u0434\u043b\u044f \u0443\u0437\u043b\u0430 1, \u0443\u0437\u043b\u0430\u043c \u043d\u0443\u0436\u0435\u043d \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0439 \u043c\u0430\u0441\u0448\u0442\u0430\u0431. \u0412 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044f\u0445 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e softmax. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u043c \u0435\u0451 \u043a \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u043e\u0441\u0435\u0434\u043d\u0435\u043c\u0443 \u0443\u0437\u043b\u0443:<\/p>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0422\u0430\u043a \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u0430\u0436\u0434\u044b\u0439 <em>\u03b1<\/em>\u1d62\u2c7c. \u041d\u043e \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0441\u0442\u0430\u0431\u0438\u043b\u044c\u043d\u043e. \u0427\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c, \u0430\u0432\u0442\u043e\u0440\u044b <a href=\"https:\/\/arxiv.org\/abs\/1706.03762\">Vaswani et al.<\/a> \u0432\u0432\u0435\u043b\u0438 \u0432 \u0430\u0440\u0445\u0438\u0442\u0435\u043a\u0442\u0443\u0440\u0435 Transformer \u043f\u043e\u043d\u044f\u0442\u0438\u0435 \u00ab\u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435\u00bb.<\/p>\n<h2>\u0411\u043e\u043d\u0443\u0441: \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/h2>\n<p>\u0423\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u043a\u0430\u043a \u043c\u043d\u043e\u0433\u043e \u0431\u044b\u043b\u043e \u0441\u043a\u0430\u0437\u0430\u043d\u043e \u043e \u0441\u0430\u043c\u043e\u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0438, \u0445\u043e\u0442\u044f Transformer \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u2014 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0437\u0434\u0435\u0441\u044c \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u044b \u0438\u0434\u0435\u0438 \u0438\u0437 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430:<\/p>\n<figure class=\"full-width\"><figcaption>\u041c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/figcaption><\/figure>\n<p>\u0422\u043e \u0435\u0441\u0442\u044c \u0432 \u0433\u0440\u0430\u0444\u043e\u0432\u044b\u0445 \u0441\u0435\u0442\u044f\u0445 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0432 \u043c\u043d\u043e\u0433\u043e\u043a\u0440\u0430\u0442\u043d\u043e\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u0435\u043d\u0438\u0438 \u0442\u0435\u0445 \u0436\u0435 \u0442\u0440\u0451\u0445 \u044d\u0442\u0430\u043f\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0443\u0441\u0440\u0435\u0434\u043d\u0438\u0442\u044c \u0438\u043b\u0438 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.\u00a0<\/p>\n<p>\u0412\u043e\u0442 \u0438 \u0432\u0441\u0451. \u0412\u043c\u0435\u0441\u0442\u043e \u043e\u0434\u043d\u043e\u0433\u043e <em>h\u2081<\/em> \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u043e\u0434\u0438\u043d \u0441\u043a\u0440\u044b\u0442\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440 h\u2081\u1d4f \u043d\u0430 \u043a\u0430\u0436\u0434\u0443\u044e \u0433\u043e\u043b\u043e\u0432\u0443 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f. \u0414\u0430\u043b\u044c\u0448\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u0430 \u0438\u0437 \u0434\u0432\u0443\u0445 \u0441\u0445\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>\u0420\u0430\u0437\u043d\u044b\u0435 <em>h\u1d62\u1d4f<\/em> \u0441\u0443\u043c\u043c\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0438 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0433\u043e\u043b\u043e\u0432 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f n \u2014 \u044d\u0442\u043e \u0443\u0441\u0440\u0435\u0434\u043d\u0435\u043d\u0438\u0435.<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>\u041e\u0431\u044a\u0435\u0434\u0438\u043d\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u044b\u0445 <em>h\u1d62\u1d4f <\/em>\u2014 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u044f:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u043f\u0435\u0440\u0432\u0430\u044f \u0441\u0445\u0435\u043c\u0430 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u043d\u043e\u043c \u0441\u043b\u043e\u0435 \u0441\u0435\u0442\u0438, \u0432\u0442\u043e\u0440\u0430\u044f \u2014 \u043d\u0430 \u0441\u043a\u0440\u044b\u0442\u043e\u043c \u0441\u043b\u043e\u0435.<\/p>\n<p>\u0413\u0440\u0430\u0444\u043e\u0432\u044b\u0435 \u0441\u0435\u0442\u0438 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f<\/p>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0435\u0442\u044c \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0432 PyTorch Geometric. \u0412 \u044d\u0442\u043e\u0439 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 \u0435\u0441\u0442\u044c \u0434\u0432\u0430 \u0441\u043b\u043e\u044f \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f: GATConv \u0438 GATv2Conv. \u0414\u043e \u0441\u0438\u0445 \u043f\u043e\u0440 \u0440\u0435\u0447\u044c \u0448\u043b\u0430 \u043e \u043f\u0435\u0440\u0432\u043e\u043c \u0438\u0437 \u043d\u0438\u0445, \u043d\u043e \u0432 2021 \u0433\u043e\u0434\u0443 <a href=\"https:\/\/arxiv.org\/abs\/2105.14491\">Brody et al.<\/a> \u0434\u043e\u0431\u0438\u043b\u0438\u0441\u044c \u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f, \u043f\u043e\u043c\u0435\u043d\u044f\u0432 \u043f\u043e\u0440\u044f\u0434\u043e\u043a \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u0439.\u00a0<\/p>\n<p>\u0412\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 ? \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0430\u0446\u0438\u0438, \u0430 \u0432\u0435\u0441\u043e\u0432\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f ?\u2090\u209c\u209c \u2014 \u043f\u043e\u0441\u043b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 LeakyReLU. \u0412 \u0438\u0442\u043e\u0433\u0435 \u0438\u043c\u0435\u0435\u043c:<\/p>\n<ul>\n<li>\n<p>GatConv:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<ul>\n<li>\n<p>Gatv2Conv:<\/p>\n<\/li>\n<\/ul>\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u041a\u0430\u043a\u043e\u0439 \u0441\u043b\u043e\u0439 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? \u0412 \u0440\u0430\u0431\u043e\u0442\u0435 Brody et al. \u0441\u043a\u0430\u0437\u0430\u043d\u043e, \u0447\u0442\u043e Gatv2Conv \u043d\u0435\u0438\u0437\u043c\u0435\u043d\u043d\u043e \u043f\u0440\u0435\u0432\u043e\u0441\u0445\u043e\u0434\u0438\u0442 GatConv.<\/p>\n<p>\u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u043a\u043b\u0430\u0441\u0441\u0438\u0444\u0438\u0446\u0438\u0440\u0443\u0435\u043c \u0440\u0430\u0431\u043e\u0442\u044b \u0438\u0437 CiteSeer. \u042f \u043f\u043e\u043f\u044b\u0442\u0430\u043b\u0441\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u044b \u0430\u0432\u0442\u043e\u0440\u043e\u0432 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b\u0430, \u0438\u0437\u043b\u0438\u0448\u043d\u0435 \u043d\u0435 \u0443\u0441\u043b\u043e\u0436\u043d\u044f\u044f \u0438\u0445. \u041e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0439 \u0441\u0435\u0442\u0438 \u0441 \u043c\u0435\u0445\u0430\u043d\u0438\u0437\u043c\u043e\u043c \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0441\u0442\u044c <a href=\"https:\/\/github.com\/PetarV-\/GAT\">\u043d\u0430 GitHub<\/a>.<\/p>\n<p>\u0421\u043b\u043e\u0438 \u0433\u0440\u0430\u0444\u043e\u0432\u043e\u0433\u043e \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u044b \u0432 \u0434\u0432\u0443\u0445 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044f\u0445:<\/p>\n<ul>\n<li>\n<p>\u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u0441\u043b\u043e\u0435 \u043a\u043e\u043d\u043a\u0430\u0442\u0435\u043d\u0438\u0440\u0443\u044e\u0442\u0441\u044f \u0432\u043e\u0441\u0435\u043c\u044c \u0432\u044b\u0445\u043e\u0434\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u043d\u043e\u0432 \u2014 \u044d\u0442\u043e \u043c\u043d\u043e\u0433\u043e\u0433\u043e\u043b\u043e\u0432\u043e\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435;<\/p>\n<\/li>\n<li>\n<p>\u0432\u043e \u0432\u0442\u043e\u0440\u043e\u043c \u0433\u043e\u043b\u043e\u0432\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0434\u043d\u0430, \u0432 \u043d\u0435\u0439 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u0442\u043e\u0447\u043d\u043e\u0441\u0442\u0438, \u043e\u0431\u0443\u0447\u0438\u043c \u0438 \u043f\u0440\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u0443\u0435\u043c \u0433\u0440\u0430\u0444\u043e\u0432\u0443\u044e \u0441\u0432\u0451\u0440\u0442\u043e\u0447\u043d\u0443\u044e \u0441\u0435\u0442\u044c:<\/p>\n<pre><code class=\"python\">import torch.nn.functional as F from torch.nn import Linear, Dropout from torch_geometric.nn import GCNConv, GATv2Conv   class GCN(torch.nn.Module):   \"\"\"Graph Convolutional Network\"\"\"   def __init__(self, dim_in, dim_h, dim_out):     super().__init__()     self.gcn1 = GCNConv(dim_in, dim_h)     self.gcn2 = GCNConv(dim_h, dim_out)     self.optimizer = torch.optim.Adam(self.parameters(),                                       lr=0.01,                                       weight_decay=5e-4)    def forward(self, x, edge_index):     h = F.dropout(x, p=0.5, training=self.training)     h = self.gcn1(h, edge_index)     h = torch.relu(h)     h = F.dropout(h, p=0.5, training=self.training)     h = self.gcn2(h, edge_index)     return h, F.log_softmax(h, dim=1)   class GAT(torch.nn.Module):   \"\"\"Graph Attention Network\"\"\"   def __init__(self, dim_in, dim_h, dim_out, heads=8):     super().__init__()     self.gat1 = GATv2Conv(dim_in, dim_h, heads=heads)     self.gat2 = GATv2Conv(dim_h*heads, dim_out, heads=1)     self.optimizer = torch.optim.Adam(self.parameters(),                                       lr=0.005,                                       weight_decay=5e-4)    def forward(self, x, edge_index):     h = F.dropout(x, p=0.6, training=self.training)     h = self.gat1(x, edge_index)     h = F.elu(h)     h = F.dropout(h, p=0.6, training=self.training)     h = self.gat2(h, edge_index)     return h, F.log_softmax(h, dim=1)  def accuracy(pred_y, y):     \"\"\"Calculate accuracy.\"\"\"     return ((pred_y == y).sum() \/ len(y)).item()  def train(model, data):     \"\"\"Train a GNN model and return the trained model.\"\"\"     criterion = torch.nn.CrossEntropyLoss()     optimizer = model.optimizer     epochs = 200      model.train()     for epoch in range(epochs+1):         # Training         optimizer.zero_grad()         _, out = model(data.x, data.edge_index)         loss = criterion(out[data.train_mask], data.y[data.train_mask])         acc = accuracy(out[data.train_mask].argmax(dim=1), data.y[data.train_mask])         loss.backward()         optimizer.step()          # Validation         val_loss = criterion(out[data.val_mask], data.y[data.val_mask])         val_acc = accuracy(out[data.val_mask].argmax(dim=1), data.y[data.val_mask])          # Print metrics every 10 epochs         if(epoch % 10 == 0):             print(f'Epoch {epoch:>3} | Train Loss: {loss:.3f} | Train Acc: '                   f'{acc*100:>6.2f}% | Val Loss: {val_loss:.2f} | '                   f'Val Acc: {val_acc*100:.2f}%')                return model  def test(model, data):     \"\"\"Evaluate the model on test set and print the accuracy score.\"\"\"     model.eval()     _, out = model(data.x, data.edge_index)     acc = accuracy(out.argmax(dim=1)[data.test_mask], data.y[data.test_mask])     return acc<\/code><\/pre>\n<pre><code class=\"python\">%%time  # Create GCN gcn = GCN(dataset.num_features, 16, dataset.num_classes) print(gcn)  # Train train(gcn, data)  # Test acc = test(gcn, data) print(f'GCN test accuracy: {acc*100:.2f}%\\n')<\/code><\/pre>\n<pre><code class=\"python\">GCN(   (gcn1): GCNConv(3703, 16)   (gcn2): GCNConv(16, 6) ) Epoch   0 |<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-332128","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332128","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=332128"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/332128\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=332128"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=332128"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=332128"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}