To implement the quality prediction scheme for batch processes, long short-term memory (LSTM) neural network is a feasible tool to handle with the process dynamics and nonlinearity. However, a global LSTM soft sensor suffers a decline in performance facing batch-to-batch variations. To overcome the batch diversity problem and take advantage of LSTM model, a multivariate trajectory based ensemble just-in-time learning strategy is proposed in this paper. Different trajectory based similarity measurements are designed to extract historical batch trajectories which share similar spatial positions and trends. For each selected trajectory, an online local LSTM soft sensing model is constructed and the real-time quality prediction result for each local model can be obtained. Then, a weighting parameter is determined for each model by cross validation. Bringing together quality prediction results from different local models, the ensemble prediction result can be finally figured out. Two case studies are carried out to prove the effectiveness of the proposed methodology including a fed-batch reactor and the fed-batch penicillin fermentation process.INDEX TERMS Batch production systems, Ensemble just-in-time learning, long short-term memory, multivariate trajectory analysis, soft sensor, quality prediction.