## 3 Materials and Methods
### Pareto-Optimized FaceNet Architecture  
The Pareto-optimized FaceNet architecture is a variant of the original FaceNet model, which seeks to balance multiple objectives, such as accuracy, computational complexity, and memory requirements. To achieve this balance, the Pareto-optimized FaceNet architecture is designed based on a Pareto frontier, which is the set of solutions that cannot be further improved in one objective without degrading another objective.  
Let \(\mathcal{A}\) be the set of all possible architectures for FaceNet, and let \(f_{1}(a)\), \(f_{2}(a)\), and \(f_{3}(a)\) be the accuracy, computational complexity, and memory requirements of the architecture \(a\in\mathcal{A}\), respectively. An architecture \(a_{1}\) is said to dominate another architecture \(a_{2}\) if \(f_{1}(a_{1})\geq f_{1}(a_{2})\), \(f_{2}(a_{1})\leq f_{2}(a_{2})\), and \(f_{3}(a_{1})\leq f_{3}(a_{2})\), with at least one inequality being strict. The Pareto-optimized FaceNet architecture is obtained from the set of Pareto optimal solutions, defined as:  
\[\mathcal{P}=a\in\mathcal{A}:|:\
exists a^{\prime}\in\mathcal{A}:\text{s.t.}:a^{ \prime}:\text{dominates}:a \tag{10}\]  
The algorithm for Pareto optimization of the FaceNet architecture (see Algorithm 1) is based on the concept of multi-objective optimization using genetic algorithms. Note that this is just one possible approach to Pareto optimization, and other optimization algorithms may be used as well.  
```
1:\(population\_size\), \(max\_generations\), \(mutation\_rate\), \(crossover\_rate\)
2:Initialize \(population\leftarrow\textsc{RandomPopulation}(population\_size)\)
3:\(generation\gets 0\)
4:while\(generation<max\_generations\)do
5: Evaluate the objectives \(f_{1}(a)\), \(f_{2}(a)\), and \(f_{3}(a)\) for all \(a\in population\)
6:\(pareto\textsc{\_}{front}\leftarrow\textsc{\_}{\textsc{ParetoFront}}(population)\)
7:\(offspring\leftarrow\emptyset\)
8:while\(|offspring|<|population|\)do
9:\(parent_{1},parent_{2}\leftarrow\textsc{\_}{\textsc{Selection}}(population,pareto\_front)\)
10:\(child_{1},child_{2}\leftarrow\textsc{\_}{\textsc{Crossover}}(parent_{1},parent_{2},crossover\_rate)\)
11:\(child_{1}\leftarrow\textsc{\_}{\textsc{Mutation}}(child_{1},mutation\_rate)\)
12:\(child_{2}\leftarrow\textsc{\_}{\textsc{Mutation}}(child_{2},mutation\_rate)\)
13:Add\(child_{1},child_{2}\) to \(offspring\)
14:endwhile
15:\(population\gets offspring\)
16:\(generation\gets generation+1\)
17:endwhile
18:return\(pareto\)\(front\)
```  
**Algorithm 1** Pareto optimization of FaceNet architecture  
The algorithm starts by initializing a random population of FaceNet architectures (line 2). Then, for a predefined number of generations (lines 3-14), the algorithm evaluates the objectives for each architecture (line 4) and computes the Pareto front (line 5). It generates offspring through selection, crossover, and mutation operations (lines 7-12), and the offspring become the new population for the next generation (line 13). Once the algorithm reaches the maximum number of generations, it returns the final Pareto front (line 15).  
The Pareto-optimized FaceNet architecture includes the components from the original FaceNet architecture, such as the Inception CNN, the embedding layer, and the triplet loss function. However, the specific structure of the Inception CNN and the embedding layer may be altered to achieve a balance between the objectives. For example, a Pareto-optimized FaceNet architecture (see Figure 6) might have a reduced number of layers, filters, or neurons in the Inception CNN and the embedding layer. This would result in a trade-off between accuracy, computational complexity, and memory requirements, achieving a balance that is optimal according to the Pareto frontier.