-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Issue Description:
Running the DOMIAS code with gen_size > 200 results in the following error message with:
Additionally, running BNAF density generator on gen_size <=200 always results in an AUCROC of 0.5. It Appears the p_G_evaluated always resolves to an all-zero array.
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-6-e273f542404d> in <module>
135 training_epochs=training_epoch,
136 synthetic_sizes=[gen_size],
--> 137 density_estimator=density_estimator,
138 )
139
~\anaconda3\lib\site-packages\domias\evaluator.py in evaluate_performance(generator, dataset, mem_set_size, reference_set_size, training_epochs, synthetic_sizes, density_estimator, seed, device, shifted_column, zero_quantile, reference_kept_p)
200
201 wd_n = min(len(synth_set), len(reference_set))
--> 202 eval_met_on_reference = compute_wd(synth_set[:wd_n], reference_set[:wd_n])
203 performance_logger[synthetic_size]["MIA_performance"][
204 "sample_quality"
~\anaconda3\lib\site-packages\domias\metrics\wd.py in compute_wd(X_syn, X)
26 OT_solver = SamplesLoss(loss="sinkhorn")
27
---> 28 return OT_solver(X_ten, Xsyn_ten).cpu().numpy().item()
~\anaconda3\lib\site-packages\torch\nn\modules\module.py in _call_impl(self, *input, **kwargs)
1192 if not (self._backward_hooks or self._forward_hooks or self._forward_pre_hooks or _global_backward_hooks
1193 or _global_forward_hooks or _global_forward_pre_hooks):
-> 1194 return forward_call(*input, **kwargs)
1195 # Do not call functions when jit is used
1196 full_backward_hooks, non_full_backward_hooks = [], []
~\anaconda3\lib\site-packages\geomloss\samples_loss.py in forward(self, *args)
281 labels_x=l_x,
282 labels_y=l_y,
--> 283 verbose=self.verbose,
284 )
285
~\anaconda3\lib\site-packages\geomloss\sinkhorn_samples.py in sinkhorn_online(a, x, b, y, p, blur, reach, diameter, scaling, cost, debias, potentials, **kwargs)
387 cost = cost_formulas[p]
388
--> 389 my_lse = lse_genred(cost, D, dtype=str(x.dtype)[6:])
390 softmin = partial(softmin_online, log_conv=my_lse)
391
~\anaconda3\lib\site-packages\geomloss\sinkhorn_samples.py in lse_genred(cost, D, dtype)
324 """Legacy "Genred" implementation, with low-level KeOps formulas."""
325
--> 326 log_conv = generic_logsumexp(
327 "( B - (P * " + cost + " ) )",
328 "A = Vi(1)",
NameError: name 'generic_logsumexp' is not defined
Issue Summary:
Note that this error relates to all density estimation methods, while the domias AUCROC=0.5 issue is unique to BNAF.
I have attached an example notebook that I have been using:
BNAF_error_github.zip
Settings for reproduction:
reference_set_size = 10000 #held out set
training_epochs = [2000]
training_sizes = [10000]
density_estimator = "bnaf"
gen_size = 300
Windows OS
python==3.7.6
torch==1.13.1
domias==0.0.5
geomloss==0.2.6
pykeops==2.1.2
Any help resolving this issues would be greatly appreciated. I am hoping to generate the results for my MSc thesis before mid-August.
Thanks,
Jordan