automl / neps

Neural Pipeline Search (NePS): Helps deep learning experts find the best neural pipeline.
https://automl.github.io/neps/
Apache License 2.0
51 stars 12 forks source link

Hyperband bracket generation is inconsistent with the original Hyperband paper #11

Closed nabenabe0928 closed 1 month ago

nabenabe0928 commented 1 year ago

The HB paper says that each SH bracket samples $n = \lceil \frac{s_{\max} + 1}{s + 1} \eta^s \rceil$ configurations; however, this line samples $n = \lfloor\lfloor \frac{s_{\max} + 1}{s + 1} \rfloor \eta^s\rfloor$ configurations. In reality, this line should be:

_n_config = int(np.ceil(s_max / (_s + 1) * self.eta**_s))

Note that self.s_max is $s_{\max} + 1$.

Neeratyoy commented 1 year ago

Hi,

Yes, you are correct in that way. However, the exact setup in NePS' HB was designed to spit HB allocations similar to HpBandster. The correctness of the implementation was verified by comparing it.

Regarding the paper, I verified the NePS implementation of SH/HB with the floor-ceil issue as you mentioned. I was able to reproduce the example Table 1 from the original paper using the current implementation in NePS and not the ceil method as mentioned in the pseudo-code of the paper.

Moreoever, np.ceil(s_max / (_s + 1)) * self.eta ** _s is not the same as np.ceil((s_max / (_s + 1)) * self.eta ** _s).

Overall, given the empirical results, past implementations that have been published, and the original HB paper examples, I do not think this issue needs addressing.