## 5 Privacy Risk Assessment: Advancements within the PRUDEnce Framework
### Optimizations
#### 5.2.2 Unique Values and Direct Evaluation  
While saving combinations in memory brings several advantages, it also presents challenges and considerations. One main issue is the potential for increased memory usage, especially when dealing with large datasets or many combinations. Storing all possible combinations can lead to high memory requirements, which may demand many system resources. The scikit-mobility library in Python ([[https://scikit-mobility.github.io/scikit-mobility/](https://scikit-mobility.github.io/scikit-mobility/)]([https://scikit-mobility.github.io/scikit-mobility/](https://scikit-mobility.github.io/scikit-mobility/))) (accessed on 1 May 2023), introduces an improvement related to PRUDENce risk assessment and its computation, which we will call the **Break** approach. This improvement involves the \(force\_instances\) parameter. When using the **Original** approach and determining maximum risk, if \(force\_instances\) is set to false and a single maximum value is detected, indicating a risk value of one, there is no need to assess additional background knowledge instances, as can be seen in Algorithm 3. This is because the trajectory risk is already at its maximum. ```
1:for each user trajectory \(traj\)do
2: Compute all possible background knowledge instances with size \(k\)
3:for each background knowledge instance \(inst\)do
4: Compute risk for \(inst\) using matching function and update maximum risk
5:if\(risk\) is equal to 1 then
6:break
7:endif
8:endfor
9:endfor
```  
**Algorithm 3** Risk computation with original approach + Break  
However, the **Break** approach relies on evaluating instances with high risk at the start of the risk evaluation process to achieve significant performance improvement. Despite this, it still involves computing more matching operations for each remaining instance. To address this issue, we propose a strategy to evaluate the risk directly, thus reducing the need to store background knowledge configurations in memory and eliminating the necessity to calculate combinations and matching operations for all instances. **Claim:** if a user's trajectory contains at least one unique feature value, then the re-identification risk for that user is one without calculating background knowledge configurations. **Proof. ** let \(U\) denote the set of individuals, and \(D\) be the dataset. We consider a user trajectory \(t_{u}\) with at least one unique feature value. The re-identification risk \(\text{PR}_{D}(u_{i}|b)\) for the user trajectory \(t_{u}\), given a background knowledge instance \(b\), is defined as the probability of re-identification. If \(t_{u}\) contains at least one unique feature value, then at least one trajectory in \(D\) is identical to \(t_{u}\), resulting in a risk of 1. This is because unique features ensure that no other trajectory in the dataset matches \(t_{u}\). Therefore, the re-identification risk for a user trajectory with at least one unique feature value is 1, without the need to calculate background knowledge configurations. This optimization simplifies the risk assessment process and saves computational resources, as it eliminates the necessity to consider background knowledge configurations for trajectories with unique features. This refinement ensures that computational resources are utilized efficiently while maintaining privacy risk assessment integrity within the PRUDEnce framework. The computational complexity of the PRUDEnce framework for evaluating privacy risks is \(O(\binom{len}{k}\times N)\), where \(len\) represents the trajectory size, \(k\) denotes the number of elements in each background knowledge configuration, and \(N\) signifies the number of matching operations for each instance. This complexity is used to evaluate the privacy risk of a single user trajectory. To compute the overall complexity across multiple user trajectories, each with potentially different sizes, we need to consider the total number of trajectories and sum up the complexities for each trajectory.