그래프BLAS

GraphBLAS
GraphBLAS 사양
GraphBLAS logo.png
GraphBLAS API의 로고
상태방출된
초간출판2017년 5월 29일 (2017-05-29)
최신 버전2.0.0
2021년 11월 15일(2021-11-15)
도메인그래프 알고리즘
면허증Creative Commons Attribution(CC BY) 4.0
웹사이트graphblas.org

GraphBLAS(/ˈræfˌblɑz/ audio speaker icon(듣기))는 선형대수 언어로 그래프 알고리즘에 대한 표준 구성 블록을 정의하는 API 규격이다.[1][2]GraphBLAS는 희소성 행렬을 그래프를 인접 행렬 또는 입사 행렬로 나타내기 위해 사용할 수 있다는 개념에 기초한다.GraphBLAS 규격은 그래프 연산(예: 그래프 통과 및 변환)을 다른 의미에 걸쳐 선형 대수적 방법(예: 행렬 곱하기)을 통해 효율적으로 구현할 수 있는 방법을 설명한다.[3]

GraphBLAS의 개발과 그 다양한 구현은 산학관 및 정부 연구소의 대표자를 포함한 지속적인 지역사회 노력이다.[4][5]

배경

그래프 알고리즘은 오래 전부터 그래프를 행렬로 나타낼 수 있다는 생각을 이용했으며, 그래프 연산은 희박한 행렬에서 선형 변환 및 기타 선형 대수 연산으로 수행할 수 있다.[6]: xxv–xxvi 예를 들어, 매트릭스 벡터 곱셈을 사용하여 너비 우선 검색에서 한 단계를 수행할 수 있다.[6]: 32–33

GraphBLAS 규격(및 이를 구현하는 다양한 라이브러리)은 이러한 선형 대수 연산 계산을 위한 데이터 구조와 함수를 제공한다.특히, GraphBLAS는 정점이 상대적으로 적은 이웃에 연결되었을 가능성이 높은 그래프에 잘 매핑되는 희박한 행렬 객체를 지정한다(즉, 정점 정도는 그래프의 정점 총 개수보다 현저히 작다).또한 규격은 다양한 수학적 맥락에서 연산을 수행하기 위해 서로 다른 의미들을 사용할 수 있도록 한다.

원래 GraphBLAS 표준의 명칭인 BLAS와 유사하게 그래프 분석에서 표준화의 필요성에 의해 동기부여된 [7]GraphBLAS 표준은 또한 머신러닝과 [8]생물정보학 연구자를 포함한 그래프 커뮤니티 밖의 사람들에게 관심을 갖기 시작했다.[9]GraphBLAS 구현은 Redis와 같은 고성능 그래프 데이터베이스 애플리케이션에도 사용되었다.[10][11][12][13][14]

사양

GraphBLAS 사양은 2013년부터 개발 중에 있으며,[15] 2021년 11월 현재 버전 2.0.0에 도달했다.[16]정식으로 C 프로그래밍 언어에 대한 명세서를 작성하는 한편, C++,[17] 자바,[18] 엔비디아 CUDA 등 GraphBLAS의 정신으로 구현을 전개하기 위해 다양한 프로그래밍 언어가 사용되어 왔다.[19]

호환되는 구현 및 언어 바인딩

현재 GraphBLAS 사양의 두 가지 완전 호환 참조 구현이 있다.[20][21]Python,[22] MATLAB [23]및 Julia[24][25] 프로그래밍 언어에 대한 준수 규격이 존재한다고 가정하는 바인딩.

선형대수기초

그래프의 광범위한 첫 번째 검색에서 한 단계 계산.매트릭스 벡터 곱셈은 주어진 소스 꼭지점(빨간색으로 표시)의 아웃바운드 인접(수직 1과 3, 파란색으로 표시)을 계산하는 데 사용할 수 있다. A A}은는) 왼쪽에 표시된 그래프의 인접 행렬이며, 아웃바운드 에지(4,1) 및 (4,3)는 녹색으로 표시된다는 점에 유의하십시오.

GraphBLAS의 수학적 기초는 선형 대수학 및 행렬과 그래프 사이의 이중성에 기초한다.[26][27]

GraphBLAS의 각 그래프 연산은 다음과 같은 요소로 구성되는 세밀링에서 작동한다.

0 요소(즉, 그래프에 에지가 없음을 나타내는 요소)도 재해석할 수 있다는 점에 유의하십시오.[26]: "VII. 0-Element: No Graph Edge" 예를 들어 다음과 같은 알헤브라를 GraphBLAS에서 구현할 수 있다.

대수학 도메인 제로 원소
표준 산술 0
최대 플러스 대수
Min-plus 대수
최대-민 대수 0
최소-최대 대수 0
갈루아 밭 XOR AND 0

위의 모든 예는 각각의 영역에서 다음의 두 가지 조건을 만족한다.

  • 추가 ID,⊕ =
  • 다중 소멸, = 0 0

예를 들어, 사용자는 다음과 같은 두 개의 정밀 부동소수점 번호의 도메인에 min-plus 대수학을 지정할 수 있다.GrB_Semiring_new(&min_plus_semiring, GrB_MIN_FP64, GrB_PLUS_FP64).

기능

GraphBLAS 규격은 일반적으로 구현에서 상당한 유연성을 허용하지만, 일부 기능 및 구현 세부사항은 명시적으로 설명된다.

  • 행렬과 벡터를 포함한 graphBLAS 객체는 불투명한 데이터 구조다.[16]: 2.4 GraphBLAS Opaque Objects
  • 비차단 실행 모드. 특정 작업에 대해 게으름 또는 비동기 평가를 허용한다.[16]: 2.5.1 Execution modes
  • 마스크된 할당, ⟨ = B 로 표시되며 마스크 M M}이(가) 0이 아닌 위치에서만 B A의 요소를 A A}에 할당한다.[16]: 3.5.4 Masks

또한 GraphBLAS 규격은 라이브러리 구현이 스레드 안전하다고 규정한다.[16]: 2.5.2 Multi-threaded execution

예시 코드

다음은 C 프로그래밍 언어의 너비 우선 검색에 대한 GraphBLAS 2.0 호환 사례.[16]: 283

#include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> #include "그래프BLAS.h"  /* * 부울 n x 인접 행렬 A와 소스 꼭지점 s가 지정되면 BFS 횡단을 수행하십시오. * 그래프의 v[i]를 정점 i가 방문되는 수준으로 설정하십시오(v[s] == 1). * s에서 연결할 수 없는 경우 v[i] = 0에 저장된 요소가 없음 * 벡터 v는 입력 시 초기화되지 않아야 한다. */ GRB_Info BFS(GRB_벡터 *v, GrB_Matrix A, GrB_Index s) {   GrB_Index n;   GrB_Matrix_nrows(&n,A);                  // n = A 행 수    GrB_Vector_new(v,GrB_INT32,n);           // 벡터 <int32_t> v(n)    GRB_벡터 q;                            // 각 레벨에서 방문한 정점   GrB_Vector_new(&q, GRB_BOL, n);         // 벡터 q(n)   GrB_Vector_setElement(q, (바가지 긁다)진실의, s); // q[s] = 참, 다른 모든 곳에서 거짓    /* * BFS 통과 및 정점 레이블 지정 */   int32_t 수평을 이루다 = 0;                                       // 레벨 = BFS 통과 깊이   GrB_Index 엔벨스;   하다 {     ++수평을 이루다;                                               // 다음 레벨(1로 시작)     GRB_apply(*v, GrB_NULL, GrB_PLUS_INT32,               GrB_SECUT_INT32, q, 수평을 이루다, GrB_NULL);       // v[q] = 레벨     GrB_vxm(q, *v, GrB_NULL, GrB_LOR_LAND_SEMING_BOL,             q, A, GrB_DESC_RC);                            // q[!v] = q .&A; 모든 항목 찾기                                                            // 현재 q에서 방문하지 않은 후계자     GrB_Vector_nvals(&엔벨스, q);   } 하는 동안에 (엔벨스);                                         // q에 후계자가 없다면 우리는 끝이다.    GRB_free(&q);                                            // q 벡터는 더 이상 필요하지 않음    돌아오다 GrB_SUPTION; } 

참고 항목

참조

  1. ^ "GraphBLAS". graphblas.org. Retrieved 2021-12-04.
  2. ^ "GraphBLAS: A Programming Specification for Graph Analysis". www.sei.cmu.edu. Retrieved 2019-11-08.
  3. ^ Pereira, Juliana. "High-Performance Graph Algorithms Using Linear Algebra". Central European University, Department of Network and Data Science. Retrieved 13 February 2020.
  4. ^ "People of ACM - Tim Davis". acm.org. Association of Computing Machinery. Retrieved 8 November 2019.
  5. ^ Mattson, Tim; Gabb, Henry. "Graph Analytics: A Foundational Building Block for the Data Analytics World". Tech.Decoded. Intel. Retrieved 14 February 2020.
  6. ^ a b Kepner, Jeremy; Gilbert, John (2011). Graph Algorithms in the Language of Linear Algebra. Philadelphia, PA, USA: Society for Industrial and Applied Mathematics. ISBN 9780898719901. Retrieved 8 November 2019.
  7. ^ Vu, Linda. "GraphBLAS: Building Blocks for High Performance Graph Analytics". crd.lbl.gov. Retrieved 8 November 2019. In subsequent years, various research collaborations created a variety of BLAS libraries for different tasks. Realizing the benefits to users, vendors also worked with researchers to optimize these building blocks to run on their hardware. GraphBLAS is essentially a continuation of this BLAS heritage.
  8. ^ Kepner, Jeremy; Kumar, Manoj; Moreira, José; Pattnaik, Pratap; Serrano, Mauricio; Tufo, Henry (12–14 September 2017). "Enabling massive deep neural networks with the GraphBLAS". 2017 IEEE High Performance Extreme Computing Conference (HPEC): 1–10. arXiv:1708.02937. Bibcode:2017arXiv170802937K. doi:10.1109/HPEC.2017.8091098. ISBN 978-1-5386-3472-1. S2CID 3632940. In this paper we have shown that the key [deep neural network] computations can be represented in GraphBLAS, a library interface defined for sparse matrix algebra. Furthermore, we have shown that the key step of forward propagation, with ReLU as the nonlinearity, can be performed much more efficiently with GraphBLAS implementation as compared to BLAS implementation when the weight matrices are sparse.
  9. ^ Vu, Linda (12 March 2018). "A Game Changer: Metagenomic Clustering Powered by Supercomputers". Lawrence Berkeley National Laboratory News Center. Retrieved 10 November 2019.
  10. ^ "RedisGraph". Redis Labs. Retrieved 11 November 2019.
  11. ^ Anadiotis, George (24 October 2019). "Redis Labs goes Google Cloud, Graph, and other interesting places". ZDNet. Retrieved 8 November 2019.
  12. ^ "Redis Labs Introduces RedisGraph and Streams to Support a Zero Latency Future". DevOps.com. 16 November 2018. Retrieved 10 November 2019. Built on GraphBLAS, an open-source library that employs linear algebra including matrix multiplication, RedisGraph can complete calculations up to 600 times faster than any alternate graph solution according to benchmark results.
  13. ^ Woodie, Alex (28 September 2018). "Redis Speeds Towards a Multi-Model Future". Datanami. Retrieved 10 November 2019. One of the newest modules to emerge from Redis Labs turns the key value store into a graph database. The module, called RedisGraph, will be based on the GraphBLAS technology that emerged out of academia and industry.
  14. ^ Dsouza, Melisha (20 November 2018). "RedisGraph v1.0 released, benchmarking proves its 6-600 times faster than existing graph databases". Packt. Retrieved 10 November 2019. RedisGraph is a Redis module that adds a graph database functionality to Redis. RedisGraph delivers a fast and efficient way to store, manage and process graphs, around 6 to 600 times faster than existing graph databases. RedisGraph represents connected data as adjacency matrices and employs the power of GraphBLAS which is a highly optimized library for sparse matrix operations.
  15. ^ Mattson, Tim; Bader, David; Berry, Jon; Buluç, Aydin; Dongarra, Jack; Faloutsos, Christos; Feo, John; Gilbert, John; Gonzalez, Joseph; Hendrickson, Bruce; Kepner, Jeremy; Leiserson, Charles; Lumsdaine, Andrew; Padua, David; Poole, Stephen; Reinhardt, Steve; Stonebraker, Mike; Wallach, Steve; Yoo, Andrew (10–12 September 2013). "Standards for graph algorithm primitives". 2013 IEEE High Performance Extreme Computing: 1–2. arXiv:1408.0393. doi:10.1109/HPEC.2013.6670338. ISBN 978-1-4799-1365-7. S2CID 12099965. It is our view that the state of the art in constructing a large collection of graph algorithms in terms of linear algebraic operations is mature enough to support the emergence of a standard set of primitive building blocks. This paper is a position paper defining the problem and announcing our intention to launch an open effort to define this standard.
  16. ^ a b c d e f Brock, Benjamin; Buluç, Aydın; Mattson, Timothy; McMillan, Scott; Moreira, José. "The GraphBLAS C API Specification: Version 2.0.0" (PDF). Retrieved 4 December 2021.
  17. ^ "GraphBLAS Template Library (GBTL)". GitHub.com. Retrieved 8 November 2019.
  18. ^ "Graphulo: Graph Processing on Accumulo". graphulo.mit.edu. Retrieved 8 November 2019.
  19. ^ "GraphBLAST". GitHub.com. Retrieved 8 November 2019.
  20. ^ Davis, Timothy. "SuiteSparse:GraphBLAS". Retrieved 11 November 2019. SuiteSparse:GraphBLAS is a full implementation of the GraphBLAS standard (graphblas.org), which defines a set of sparse matrix operations on an extended algebra of semirings using an almost unlimited variety of operators and types.
  21. ^ Moreira, Jose; Horn, Bill. "ibmgraphblas". GitHub.com. Retrieved 19 November 2019.
  22. ^ Pelletier, Michel. "GraphBLAS for Python". GitHub.com. Retrieved 11 November 2019.
  23. ^ Davis, Timothy. "SuiteSparse:GraphBLAS". Retrieved 11 November 2019. Now with OpenMP parallelism and a MATLAB interface
  24. ^ Mehndiratta, Abhinav. "GraphBLAS Implementation". Google Summer of Code Archive. Retrieved 11 November 2019.
  25. ^ Mehndiratta, Abhinav (7 June 2019). "An introduction to GraphBLAS". GSoC'19 Blog. Retrieved 11 November 2019.
  26. ^ a b Kepner, Jeremy; Aaltonen, Peter; Bader, David; Buluç, Aydın; Franchetti, Franz; Gilbert, John; Hutchison, Dylan; Kumar, Manoj; Lumsdaine, Andrew; Meyerhenke, Henning; McMillan, Scott; Moreira, José; Owens, John D.; Yang, Carl; Zalewski, Marcin; Mattson, Timothy (13–15 September 2016). "Mathematical foundations of the GraphBLAS". 2016 IEEE High Performance Extreme Computing Conference (HPEC): 1–9. arXiv:1606.05790. Bibcode:2016arXiv160605790K. doi:10.1109/HPEC.2016.7761646. ISBN 978-1-5090-3525-0. S2CID 3654505.
  27. ^ 추가 수학 배경은 다음을 참조하십시오.

외부 링크