To address this issue, we use feature hashing [1]} to reduce the dimensionality of the input gradient.
To this end we create \(k\)  bins, where \(k\)  is much smaller than the size of gradient \(m\) , and assign each gradient dimension \(i\in [m]\)  to a random bin \(r(i)\in [k]\) .
For each bin, we sum up the gradient values that are assigned to this bin.
As a result, we obtain a feature vector of size \(k\)  for the inversion model \(g_{\theta }\) .
In other words, we project the gradient \(\nabla _{\mathbf {w}}\ell (f_{\mathbf {w}}(\mathbf {x}_{\rm aux}), y_{\rm aux})\)  to \(P\nabla _{\mathbf {w}}\ell (f_{\mathbf {w}}(\mathbf {x}_{\rm aux}), y_{\rm aux})\)  using the random projection matrix \(P\)  given by:
\(P \in \lbrace 0, 1\rbrace ^{k\times m} s.t.~\forall i,~P_{j, i}=0~(\forall j\ne r(i)),~P_{r(i), i}=1.\) 
