Hybrid modeling combines physical and data-driven models to improve the performance of industrial soft sensors. However, simplified physical assumptions and extensive parameter optimization increase the complexity of the model and decrease its robustness and accuracy. In this study, a novel neural network-based approach for hybrid modeling was developed, based on Runge-Kutta (RK) and Bayesian hyperparameter optimization. First, the recursive solution equation for the quality variable was derived using the master equation, which included the black-box term and RK method. Second, the numerical solution of the black-box term was inverted using the derived equation as a label for the training samples, and hyperparameters were optimized using Bayesian optimization. Finally, during the prediction phase, quality variables at subsequent times were derived by solving a recursive equation containing neural network approximations. The superiority of the proposed soft sensing method was assessed through studies on a continuous stirred tank reactor (CSTR) case and a simulated penicillin case. The experimental findings demonstrate that the proposed method is better than existing methods in terms of robustness and accuracy.