## 5 Discussion  
The results clearly indicate that introducing dynamic update rules in TPM-based synchronization improves resistance against various forms of attacks. In particular, when the attacker is unaware of the update rule strategy or incorrectly assumes a static rule (e.g., always hebbian or random walk), their ability to synchronize with the victims is significantly diminished. To evaluate the robustness of the proposed approach under different conditions, a structured set of simulation scenarios was designed. In each scenario, different TPM parameter is increased, to both test out what is the influence of the key length and the hidden to input neuron ratio on the security achieved by dynamic_rows and dynamic_matrix algorithms, compared to standard update rules. To analyze how the length and structure of the cryptographic key, derived from TPM parameters, affect the system's security, two scenarios have been prepared. Scenario 1 focused on varying the number of hidden neurons (K) while keeping the number of input neurons per hidden neuron (N) constant. This setup tests how increasing the depth of the neural structure (i.e., the number of sub-trees involved in synchronization) affects the resilience to attacks. In contrast, Scenario 2 kept the number of hidden neurons constant and varied the number of input neurons per hidden neuron, simulating the effect of extending each hidden neuron's input space, and in result increasing the entropy and granularity of the key. This dual approach allows to compare how different architectural dimensions of the TPM influence synchronization behavior and the effectiveness of dynamic update strategies against potential attackers. While dynamic algorithms do not always outperform standard rules in all configurations, they consistently provide a better security-to-performance trade-off in scenarios involving attacker uncertainty. There are two main approaches-either the victims suspect that the attacker is using a single rule or that the attacker is choosing their rule randomly. In the first case, the dynamic update rules are either better in 100%-if the attacker is using hebbian-or in \(\approx 3/4\%\) of the cases-if the attacker is using random walk. These results reinforce that hebbian-while efficient in terms of learning speed-leads to increased vulnerability when the attack model is predictable. Alternatively, when random walk is used by the attacker, the dynamic methods show clear statistical advantages. In case the attacker uses the random update rule, the dynamic_rows and dynamic_matrix in most cases do not provide more security compared to all parties using hebbian, but they outperform random walk-based synchronization in all of the cases. This trade-off indicates that dynamic update rules may not always be optimal in absolute terms, but can introduce substantial confusion and desynchronization in adversarial conditions where the attacker'sstrategy is uncertain or varies between the attacks. This robustness to unpredictability makes the dynamic rules particularly appealing in practical QKD systems where full knowledge of the attack model cannot be assumed. Based on all of this information, we can conclude two main outcomes (for synchronization using machines with parameters as described in Section 3.3). * In the vast majority of cases, it is more secure to use either dynamic_rows or dynamic_matrix if we are sure that the attacker will use a static update rule (in case they are using hebbian rule, it is always more profitable). * If the communicating parties would want to use random walk as the update rule, in the vast majority of cases it is more secure to use dynamic approaches, no matter what the attacker's approach is (in case they are using random update rule, it is always more profitable).