## 1 Introduction  
Since the early days of communication, humans have developed various techniques to secure transmitted information. Starting with the Skytale cipher, through Enigma machines, to the wide application of modern public-key cryptography such as the Rivest-Shamir-Adleman (RSA) algorithm, each approach reflects the technological capabilities of its era; while historical methods relied on the secrecy of the algorithm or mechanical complexity, modern cryptographic systems derive their security from mathematical principles and the computational difficulty. These systems, though secure for their time, share one trait: their resistance is ultimately based on the computational difficulty of solving certain mathematical problems, such as prime factorization. As computing technology evolves, particularly with the advent of quantum computing, the limitations of classical cryptography become increasingly evident.  
For nearly 10 years, the RSA key length recommended by the National Institute of Standards and Technology (NIST) has been 2048 bits [1]. Although breaking modern encryption remains theoretically impossible for classical machines, quantum algorithms such as the Shor algorithm pose a serious threat. According to a commonly held estimate, with today's computer resources, it would take 300 trillion years to break an RSA-2048 encryption key. According to the Center for Strategic and International Studies, a powerful quantum computer will break the same key in 10 s [2]. While such a quantum machine does not yet exist, the field is advancing rapidly. At the time of writing, the most powerful quantum computer has been created by Atom Computing-with a capacity of 1225 qubits and population of 1180 qubits [3]-and IBM plans to release a 2000-qubit machine in 2033 or later [4], so viable quantum decryption capabilities can be only a matter of time.  
This approaching threat to our security mechanisms has driven the development of post-quantum cryptography and quantum-safe communication models [5]. Among the most promising approaches is Quantum Key Distribution (QKD), which leverages the fundamental principles of quantum mechanics to securely exchange encryption keys. However, QKD itself still depends on classical procedures, such as error correction and privacy amplification, which must also be resistant to quantum adversaries. One emerging solution is to combine quantum cryptography with adaptive mechanisms from machine learning. Artificial Neural Network (ANN) structures, and in particular Tree Parity Machine (TPM), offer a way to perform secure key synchronization and error correction without explicitly transmitting sensitive key information. However, as with every approach to security, neural-based cryptography is not invulnerable: if an attacker can predict the internal parameters of the communication, the synchronization becomes endangered.  
In this context, our work proposes a novel enhancement to TPM-based synchronization: dynamic selection of the update rule, driven by the properties of the input vector. This randomized approach increases the attacker's uncertainty while preserving performance and compatibility with existing QKD infrastructures. The proposed solution represents a significant step toward improving the robustness of quantum cryptographic systems in the face of realistic adversaries.