Atinary-technologies / gryffin

Apache License 2.0
2 stars 1 forks source link

mirror_parameters does not scale well #6

Open jakobzeitler opened 2 years ago

jakobzeitler commented 2 years ago

Hi!

Trying Gryffin on a 50 param problem at the moment and hitting a complexity issue with "mirror_parameters" in observation_processor.py, i.e. with 20 params it is looping over a range of 220, but with 50 params it is 250 which is just too much for most machines, see:

for index in range(2**len(index_dict)):

I am not at all sure what mirror_parameters does (apologies for my ignorance at the moment), but either way, it is not designed scalably, possible a natural bottle neck for all of Gryffin.

Thanks!

atinary-aduran commented 2 years ago

Hi Jakob,

We would like to reproduce the issue at our end. Could you please share the config file with us?

Thank you, Alberto

@lroch

jakobzeitler commented 2 years ago

I am still unsure, what mirror_parameters does, but I was able to mitigate the problem by refining the lower and upper bounds on each parameter.

Apologies for not being able to share the config file at this stage, but I can provide a solution description.

I first dropped from 50 to 20 or so parameters. Many of these parameters are physically in the interval [0,5], but out of laziness I had set the bounds at [0,1000]. This triggered the "mirror_parameters" for all 20 or so parameters, i.e. it mirrors each observation across the origin, individually for each parameter in an observation, as they fall below a 0.1 threshold set in in the init function of the observations_processors.

I assume this is related to BNNs learning not well with many observations at the fringes of their bounds, but I am not sure. A quick Google did not show anything in that regards.

Do you know what the mirror_parameters function does exactly?

Thanks, Jakob