Mass transfer in rocks provides a direct record of fluid–rock interaction within the Earth, including metamorphism, metasomatism, and hydrothermal alteration. However, mass transfer analyses are usually limited to local reaction zones where the protoliths are evident in outcrops (1–100 m in scale), from which regional mass transfer can be only loosely constrained due to uncertainty in protolith compositions. In this study, we developed protolith reconstruction models (PRMs) for metabasalt based on a machine learning approach. We constructed PRMs through learning multi-element correlations among basalt compositional datasets, including mid-ocean ridge, ocean island, and island arc basalts. The PRMs were designed to estimate trace-element compositions from inputs of 2–9 selected trace elements, and basalt trace-element compositions (e.g., Rb, Ba, U, K, Pb, Sr, and rare earth elements) were estimated from only four inputs with a reproducibility of ~0.1 log10 units (i.e., ±25%). Using Th, Nb, Zr, and Ti, which are typically immobile during metamorphism, as input elements, the PRM was verified by applying it to seafloor altered basalt with known protoliths. When suitable immobile elements are incorporated, a PRM can yield unbiased and accurate mass transfer analysis of any metabasalt with unknown protolith.