A key bottleneck for material discovery is synthesis. While significant advances have been made in computational material design, synthesis pathways are still often determined through trial and error. In this work, we develop a method that predicts the major product of solid-state reactions. The main advance presented here is the construction of fixed-length, learned representations of reactions. Precursors are represented as nodes on a “reaction graph”, and message-passing operations between nodes are used to embody the interactions between precursors in the reaction mixture. We show that this deep learning framework not only outperforms baseline methods but also more reliably assesses the uncertainty in its predictions. Moreover, our approach establishes a quantitative metric for inorganic reaction similarity, allowing the user to explain model predictions and retrieve relevant literature sources.