Efficient Loss-Based Decoding on Graphs for Extreme Classification