  In practical implementation of quantum key distributions (QKD), it requires
efficient, real-time feedback control to maintain system stability when facing
disturbance from either external environment or imperfect internal components.
Usually, a "scanning-and-transmitting" program is adopted to compensate
physical parameter variations of devices, which can provide accurate
compensation but may cost plenty of time in stopping and calibrating processes,
resulting in reduced efficiency in key transmission. Here we for the first
propose to employ a well known machine learning model, i.e., the Long
Short-Term Memory Network (LSTM), to predict those physical parameter
variations in advance and actively perform real-time control on corresponding
QKD devices. Experimentally, we take the phase-coding scheme as an example and
run the LSTM model based QKD system for more than 10 days. Experimental results
show that we can keep the same level of quantum-bit error rate as the
traditional "scanning-and-transmitting" program by employing our new machine
learning method, but dramatically reducing the scanning time and resulting in
significantly enhanced key transmission efficiency. Furthermore, our present
machine learning model should also be applicable to any other QKD systems using
any coding scheme or QKD protocols, and thus seems a very promising candidate
in large-scale application of quantum communication network in the near future.
