# Not All Seeds Are Important: Fuzzing Guided by Untouched Edges
## 4 Design of UntouchFuzz
### Energy Scheduling Optimization  
The goal of energy scheduling is to allocate energy efficiently to the chosen seeds for optimal mutations. It is essential to strike the right balance in energy allocation. Allocating excessive energy can lead to a significant waste of fuzzing resources on a single seed. Conversely, insufficient energy allocation may underutilize a seed's potential to explore new paths, as discussed in reference [14].  
In this paper, we obtain the number of seeds in the seed set for each untouched edge included. Following this, we sort the number of seeds for these untouched edges in ascending order and select the top \(\beta\)% (40% is the default in this paper) as rare untouched edges. Then, we calculate the difference between the number of current seed's rare untouched edge _'\(\mathit{rare_{s}}[i]\)'_ and the maximum number of seed _'\(\mathit{max_{s}}\)'_ among all rare untouched edges then calculate the average distance value \(dist_{s}\) based on Equation (4).  
\[dist_{s}=\frac{\sum_{i}^{n}(max_{s}-\mathit{rare_{s}}[i])}{n} \tag{4}\]  
Assuming the original energy allocated to the seed was \(p\), it is now assigned a new energy of \((1+\alpha\times dist_{s})\times p\), where \(\alpha\) is the default value of 0.3. In our insight, if a certain untouched edge appears frequently in the seed set, it implies a high probability that the selected seed contains this untouched edge and suggests that this particular untouched edge is likely to be difficult to explore. Therefore, if a seed includes many high-frequency untouched edges, it should be allocated less energy. Conversely, if the seed contains numerous low-frequency untouched edges, it should be allocated more energy.  
To elaborate on our insight, Figure 5 illustrates it through an example. Assuming that the current phase has fuzzed for a while and the seed set contains four seeds, with two global untouched edges: BB1\(\rightarrow\)BB10 and BB5\(\rightarrow\)BB8. According to the seed scheduling algorithm outlined in Section 4.3, seed B is identified as a favored seed due to the presence of untouched edge BB1\(\rightarrow\)BB10 in its execution path and superior seed attribute. Similarly, seed D is designated as a favored seed because of the inclusion of the new untouched edge BB5\(\rightarrow\)BB8 in its execution path.  
Subsequently, the fuzzing process prioritizes the mutation of seed B and seed D. As previously mentioned, the untouched edge BB1\(\rightarrow\)BB10 appears in the execution paths of all four seeds, indicating it is not a rare untouched edge. In contrast, BB5\(\rightarrow\)BB8 is considered as a rare untouched edge since it appears only in the execution path of seed D. Consequently, we can make a reasonable conjecture that the untouched edge BB1\(\rightarrow\)BB10 is likely associated with a hard-to-solve constraint, whereas BB5\(\rightarrow\)BB8 is likely to represent a more manageable constraint. To increase the likelihood of covering edge BB5\(\rightarrow\)BB8, we allocate more energy to the mutation of seed D based on the previously outlined energy allocation mechanism. It is essential to note that the provided example is simplified for explanatory purposes, while the real-world program will be complex.  
However, in AFL, when new seeds are discovered, the fuzzer doubles the energy allocated to the seeds. Hence, we do not intentionally reduce the energy but instead provide seeds with a higher initial energy value to the seeds, aiming to fully unleash the potential of seeds to discover new paths.