neps icon indicating copy to clipboard operation
neps copied to clipboard

Hyperband bracket generation is inconsistent with the original Hyperband paper

Open nabenabe0928 opened this issue 1 year ago • 1 comments

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$.

nabenabe0928 avatar Apr 18 '23 19:04 nabenabe0928

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.

Neeratyoy avatar Apr 19 '23 09:04 Neeratyoy