Efficient Loss-Based Decoding On Graphs For Extreme Classification