Our privacy-aware system for distributed inference is highly dynamic because of the varying number of neighboring IoT devices and the volatile requests' distribution. Moreover, the action space can be highly dimensional depending on the number of helpers joining the collaborative system. Therefore, it is challenging to use the traditional RL techniques based on storing all experienced Q-values in a Q-table. Thus, we opt to use DQN approach [1]} to approximate the optimal policy.
DQN is an algorithm that is able to learn the parametric representation of the action-value function \(Q(s,a)\) . The advantage of DQN approaches is that they are free of state transition knowledge. Meaning, instead of learning from the states model, DQN learns the optimal state–action values by interacting with the environment. The training of the DQN is done through minimizing the following loss function:
\(\begin{aligned}L(\theta )=E[(R{t}+\gamma \max _{a^{\prime }}Q(s^{\prime },a^{\prime },\theta ^{\prime })-Q(s,a,\theta ))^2].\end{aligned}\) 
