where k λ is a vector learned from feeding the same embedding f λ used to predict q λ into a separate FFNN, and k λ can be seen as a high level representation of an inquiry about how to adjust the predicted values of each individual atom or bond to satisfy the overall molecular constraints. The final, constraint-adjusted prediction for each atom or bond target, q final λ , is determined by correcting the initial unconstrained prediction, q λ , through a weighted adjustment. For each target property, this adjustment is based on the discrepancy between the sum of the predictions for all atoms or bonds, λ∈G q λ , and the overall expected value, Q, of the molecule. The adjustment for each individual atom or bond prediction is proportionally allocated using a normalized weight, w λ , calculated via a softmax function to represent the fraction of the total discrepancy that each individual adjustment accounts for. .