Graph reducer