Retrosynthesis strategically plans the synthesis of a chemical target
compound from simpler, readily available precursor compounds. This process is
critical for synthesizing novel inorganic materials, yet traditional methods in
inorganic chemistry continue to rely on trial-and-error experimentation.
Emerging machine-learning approaches struggle to generalize to entirely new
reactions due to their reliance on known precursors, as they frame
retrosynthesis as a multi-label classification task. To address these
limitations, we propose Retro-Rank-In, a novel framework that reformulates the
retrosynthesis problem by embedding target and precursor materials into a
shared latent space and learning a pairwise ranker on a bipartite graph of
inorganic compounds. We evaluate Retro-Rank-In's generalizability on
challenging retrosynthesis dataset splits designed to mitigate data duplicates
and overlaps. For instance, for Cr2AlB2, it correctly predicts the verified
precursor pair CrB + Al despite never seeing them in training, a capability
absent in prior work. Extensive experiments show that Retro-Rank-In sets a new
state-of-the-art, particularly in out-of-distribution generalization and
candidate set ranking, offering a powerful tool for accelerating inorganic
material synthesis.