Define and train the graph for asynchronous updates