Abstract Although the continuous-variable quantum key distribution (CV-QKD) protocol based on a local local oscillator (LLO) can close all the security loopholes from the transmitted local oscillator (TLO), the phase noise caused by the inaccurate phase reference information limits the performance of the protocol. To reduce the residual phase noise, in this work, we propose a phase estimation and compensation method based on the temporal convolutional neural (TCN) model, where a part of phase information obtained by measuring pilot pulses is employed as the training data and input into the TCN module. With a trained TCN module, the subsequent phase drifts can be more accurately estimated, allowing for better phase compensation and lower phase noise. Numerical analysis shows that the proposed scheme can improve the transmission distance and the secret key rate of the LLO protocol.