Stresses resulting from elastic incompatibilities at grain boundaries have long been known to drive the premature failure and loss of desirable macroscopic properties in polycrystalline materials. In this work, we employ machine learning to create a surrogate model that furnishes a functional relationship between grain boundary configurational data and metrics of incompatibility. A planar triple junction geometry composed of cubic grains rotated about their [001] axis was adopted as the grain boundary model. High-fidelity finite element simulations of this triple junction under hydrostatic extension were used to generate a synthetic dataset for training the surrogate model. A set of J integrals computed around microcracks placed along the triple junction boundaries were used to quantify the elastic incompatibilities between the grains. Using the grain rotation angles and J integrals as the feature and label data respectively, a multi-layer perceptron network was trained using the synthetic data produced with the physics-based model. We demonstrate that the network trained using data from the physics-based model establishes an accurate functional dependence between the triple junction angles and the J integrals that enables direct and fast evaluation. We use the surrogate model to efficiently sweep the configuration space and create contour maps of the largest stress intensification at the triple junction as a function of the grain rotation angles. Furthermore, we show that the analytical properties of the surrogate model can be utilized to identify the most and least compatible triple junction configurations via optimization.