## 5 Experimental Results
### Supffix Generation Results  
In this section, individual tests are conducted for beam search, top-k, top-p, and typical-p to assess their generation effectiveness. Additionally, the impact of temperature and repetition penalty on generation effectiveness is evaluated. To compare the diversity of text generation by different strategies, experiments are conducted with trial counts set to 1 and 20. M1p denotes the overall precision in a single experiment, while \(M_{20p}\) denotes the overall precision across 20 experiments. \(M_{p}\) indicates the precision across 20 experiments, and \(D_{edit}\) measures the edit distance between the correct answer and the generated samples in one experiment. A larger \(M_{20p}\) signifies greater diversity in the generated text, whereas a smaller \(D_{edit}\) indicates higher quality of the generated text. To control variables, a suffix sorting strategy based on loss is employed for membership inference attacks. As shown in Table 1, beam search retains the top num_beam options at each step, making it the strategy closest to greedy search for suffix generation. Consequently, samples generated through the beam search strategy typically exhibit lower loss values and higher overall confidence, resulting in high-quality text generation. However, since beam search consistently selects samples with the lowest loss values, the diversity of the generated text is limited, which can be a significant drawback, especially when suffix sorting strategies perform well. The top-k suffix generation strategy samples uniformly from the top-k ranked candidates at each time step. Compared to beam search, this approach includes tokens with lower probabilities. As shown in Table 2, the quality of text generated by top-k is generally poorer, and as the parameter k increases, the quality of the generated text further deteriorates. This decline in quality can be attributed to the increased likelihood of selecting tokens with extremely low probabilities as k increases, which significantly impacts the overall quality of the generated text. However, top-k generates samples with higher diversity, making it a preferable choice under conditions where suffix sorting strategies perform well. To test the diversity of text generated by the top-k strategy, we set \(\text{top-k}=2\) and conducted 200 trials to observe the achievable \(M_{np}\) and \(M_{p}\) values. As illustrated in Figure 2, both the total precision \(M_{np}\) and the precision \(M_{p}\) exhibit a gradually rising trend as the number of trials increases. The increase is relatively rapid when the number of trials is fewer than 20, but the rate of increase slows down significantly once the number of trials exceeds 20. The top-p suffix generation strategy addresses the issue of selecting low-probability tokens inherent in the top-k strategy. As shown in Table 3, when the top-p value is relatively small (less than 0.6), it effectively prevents the occurrence of low-probability tokens, resulting in performance similar to beam-search. However, when the top-p value is larger (greater than 0.6), the performance of top-p becomes similar to that of top-k. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Num\_Beam** & \(M_{1p}\) & \(M_{20p}\) & \(M_{p}\) & \(D_{edit}\) \\ \hline
2 & 0.474 & 0.543 & 0.511 & 12.913 \\
3 & 0.479 & 0.545 & 0.513 & 12.589 \\
4 & 0.496 & 0.540 & 0.517 & 12.001 \\
5 & 0.499 & 0.541 & 0.517 & 11.839 \\
6 & 0.500 & 0.537 & 0.518 & 11.798 \\
7 & 0.501 & 0.535 & 0.518 & 11.776 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The suffix generation capability of beam-search. \begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Top-k** & \(M_{1p}\) & \(M_{20p}\) & \(M_{p}\) & \(D_{edit}\) \\ \hline
2 & 0.306 & 0.604 & 0.501 & 17.769 \\
3 & 0.283 & 0.599 & 0.492 & 19.242 \\
4 & 0.278 & 0.587 & 0.484 & 19.576 \\
5 & 0.274 & 0.585 & 0.482 & 19.805 \\
6 & 0.269 & 0.577 & 0.479 & 20.223 \\
7 & 0.268 & 0.574 & 0.477 & 20.279 \\ \hline \hline \end{tabular}
\end{table}