MIT researchers develop speedier network analysis graph tool
Graphs โ data structures that show the relationship among objects โ are highly versatile. Itโs easy to imagine a graph depicting a social media networkโs web of connections. But graphs are also used in programs as diverse as content recommendation (what to watch next on Netflix?) and navigation (whatโs the quickest route to the beach?). As Ajay Brahmakshatriya summarizes: โgraphs are basically everywhere.โ
Brahmakshatriya has developed software to more efficiently run graph applications on a wider range of computer hardware. The software extends GraphIt, a state-of-the-art graph programming language, to run on graphics processing units (GPUs), hardware that processes many data streams in parallel. The advance could accelerate graph analysis, especially for applications that benefit from a GPUโs parallelism, such as recommendation algorithms.
Brahmakshatriya, a PhD student in MITโs Department of Electrical Engineering and Computer Science and the Computer Science and Artificial Intelligence Laboratory, will present the work at this monthโs International Symposium on Code Generation and Optimization. Co-authors include Brahmakshatriyaโs advisor, Professor Saman Amarasinghe, as well as Douglas T. Ross Career Development Assistant Professor of Software Technology Julian Shun, postdoc Changwan Hong, recent MIT PhD student Yunming Zhang PhD โ20 (now with Google), and Adobe Researchโs Shoaib Kamil.
When programmers write code, they donโt talk directly to the computer hardware. The hardware itself operates in binary โ 1s and 0s โ while the coder writes in a structured, โhigh-levelโ language made up of words and symbols. Translating that high-level language into hardware-readable binary requires programs called compilers. โA compiler converts the code to a format that can run on the hardware,โ says Brahmakshatriya. One such compiler, specially designed for graph analysis, is GraphIt.
The researchers developed GraphIt in 2018 to optimize the performance of graph-based algorithms regardless of the size and shape of the graph. GraphIt allows the user not only to input an algorithm, but also to schedule how that algorithm runs on the hardware. โThe user can provide different options for the scheduling, until they figure out what works best for them,โ says Brahmakshatriya. โGraphIt generates very specialized code tailored for each application to run as efficiently as possible.โ
A number of startups and established tech firms alike have adopted GraphIt to aid their development of graph applications. But Brahmakshatriya says the first iteration of GraphIt had a shortcoming: It only runs on central processing units or CPUs, the type of processor in a typical laptop.
โSome algorithms are massively parallel,โ says Brahmakshatriya, โmeaning they can better utilize hardware like a GPU that has 10,000 cores for execution.โ He notes that some types of graph analysis, including recommendation algorithms, require a high degree of parallelism. So Brahmakshatriya extended GraphIt to enable graph analysis to flourish on GPUs.
Brahmakshatriyaโs team preserved the way GraphIt users input algorithms, but adapted the scheduling component for a wider array of hardware. โOur main design decision in extending GraphIt to GPUs was to keep the algorithm representation exactly the same,โ says Brahmakshatriya. โInstead, we added a new scheduling language. So, the user can keep the same algorithms that they had before written before [for CPUs], and just change the scheduling input to get the GPU code.โ
This new, optimized scheduling for GPUs gives a boost to graph algorithms that require high parallelism โ including recommendation algorithms or internet search functions that sift through millions of websites simultaneously. To confirm the efficacy of GraphItโs new extension, the team ran 90 experiments pitting GraphItโs runtime against other state-of-the-art graph compilers on GPUs. The experiments included a range of algorithms and graph types, from road networks to social networks. GraphIt ran fastest in 65 of the 90 cases and was close behind the leading algorithm in the rest of the trials, demonstrating both its speed and versatility.
GraphIt โadvances the field by attaining performance and productivity simultaneously,โ says Adrian Sampson, a computer scientist at Cornell University who was not involved with the research. โTraditional ways of doing graph analysis have one or the other: Either you can write a simple algorithm with mediocre performance, or you can hire an expert to write an extremely fast implementation โ but that kind of performance is rarely accessible to mere mortals. The GraphIt extension is the key to letting ordinary people write high-level, abstract algorithms and nonetheless getting expert-level performance out of GPUs.โ
Sampson adds the advance could be particularly useful in rapidly changing fields: โAn exciting domain like that is genomics, where algorithms are evolving so quickly that high-performance expert implementations canโt keep up with the rate of change. Iโm excited for bioinformatics practitioners to get their hands on GraphIt to expand the kinds of genomic analyses theyโre capable of.โ
Brahmakshatriya says the new GraphIt extension provides a meaningful advance in graph analysis, enabling users to go between CPUs and GPUs with state-of-the-art performance with ease. โThe field these days is tooth-and-nail competition. There are new frameworks coming out every day,โ He says. But he emphasizes that the payoff for even slight optimization is worth it. โCompanies are spending millions of dollars each day to run graph algorithms. Even if you make it run just 5 percent faster, youโre saving many thousands of dollars.โ
This research was funded, in part, by the National Science Foundation, U.S. Department of Energy, the Applications Driving Architectures Center, and the Defense Advanced Research Projects Agency.
















