The described noise assessment and reduction methods are an experimental approach to manage noise in hypergraph space ciphertexts with a redefined vector basis.
Noise elements of C in HFHE are presented in the form of a matrix Ω=(ωij;i=1,…,r), where each element ωij is a noise determinant for all elements of C′.
Determining the moment of overflow of the ciphertext vector with noise elements in Ω is determined through the inequality:
(* other part *)
let delta_noise c r b alpha =
let sum_square_noise row =
Array.fold_left (fun acc noise -> acc +. (noise ** 2.)) 0. row
in
let total_noise_power =
Array.fold_left (fun acc row -> acc +. sum_square_noise row) 0. c
in
let row_noise_sums =
Array.map (Array.fold_left (+.) 0.) c
in
let col_noise_sums =
let t m =
Array.init (Array.length m.(0)) (fun i ->
Array.init (Array.length m) (fun j -> m.(j).(i))
)
in
t c |> Array.map (Array.fold_left (+.) 0.)
in
let diff_noise_power i j =
let d = (f row_noise_sums.(i) -. g col_noise_sums.(j)) ** 2. in
c.(i).(j) ** 2. *. d
in
let sum_diff_noise_power =
Array.fold_left
(fun acc i ->
Array.fold_left
(fun acc j -> acc +. diff_noise_power i j)
acc
(Array.init r (fun x -> x))
)
0.
(Array.init r (fun x -> x))
in
let noise_metric = sqrt sum_diff_noise_power in
let threshold = b *. (total_noise_power ** alpha) in
noise_metric > threshold
let gen_mat n m =
let rec row m acc =
if m = 0 then acc
else row (m - 1) (Random.float 10. :: acc)
in
let rec matrix_rows n acc =
if n = 0 then acc
else matrix_rows (n - 1) (Array.of_list (row m []) :: acc)
in
Array.of_list (matrix_rows n [])
let apply_to_mat matrix f =
Array.map (Array.map f) matrix
let apply_to_mat_rows matrix f =
Array.map (fun row -> Array.map f row) matrix
let apply_to_mat_cols matrix f =
let transpose matrix =
Array.init (Array.length matrix.(0)) (fun i ->
Array.init (Array.length matrix) (fun j -> matrix.(j).(i))
)
in
let transposed_matrix = transpose matrix in
apply_to_mat_rows transposed_matrix f
let apply_to_mat_elems matrix f =
apply_to_mat_rows matrix (fun x -> apply_to_mat_cols x f)
After the bootstrapping procedure, a re-evaluation occurs to determine the noise elements in the ciphertext vector:
Estimation methodology after bootstrapping is done by calculating the interaction between the elements of the noise matrix and the elements of the ciphertext matrix through the consistency function, expressed through the internal sum.
The product applies this analysis to the entire hypergraph for all pairs of elements, the exponential function determines the distribution of noise by determining deviations from the reference average level.
Asymptotic behavior is brought to explicit form through an integral (a continuum analogue of a sum with an analysis of the upper limit of complexity).
To effectively process vectors and carry out operations of any kind, it is necessary to maintain the noise level within 35% of the total vector size. NCij is noise component associated between elements of the hypergraph with a pointer to the area with the ciphertext:
if r×m1i=1∑rj=1∑m(NCij−0.35×dvij)2>0.35, bootstrapping is required.