4 ms·
I hugely appreciate the whole section that's a "rant" on synchronicity. Algorithms should always produce the same results on the same inputs. There. I said i
by heavenlyhash 11y ago
I hugely appreciate the whole section that's a "rant" on synchronicity.
Algorithms should always produce the same results on the same inputs. There. I said it.
Relaxing constraints on large graph processing or AI systems because A) threads are hard and B) we're tossing in random values anyway is a mistake that's made research in these areas far too hard to reproduce and reliably quantify, and that in turn makes progress very difficult.
We can engineer better than this. Build random systems with deterministic seeds. Pass the seeds down in initialization trees if necessary; never refer to a global random source from another thread, and providing a whole system with enough "random"ness for stochastic behaviors AND keeping it deterministic and reproducible is 100% possible. When going concurrent, build flows and when there's a merge, sort results before passing on: determinism AND parallelization are possible.
As a personal anecdote, my first forays into ML are covered with rand() calls, and in retrospect, it's head-smashingly obvious that this was a Bad Idea. I spent huge amounts of time re-running the same code, then making a one-character change to a constant or sign somewhere, then re-running it dozens of times again to be sure it had any predictable impact at all. If I had made it deterministic, it would be obvious immediately, and I could have iterated much faster. It would also be far easier to farm out a CI/lab cluster with different (but consistent) rand seeds to gather meaningful results in bulk. I could have saved hundreds of hours of my attention (and sanity), even on small projects.
Once these things become a bar for minimum viable quality in research, we can start catching, debugging, and improving -- stuff like the "kingmaker scheduler" problem the author describes can be made to vanish.
If only we had a video of Ballmer chanting "Determinism! Determinism! Determinism!"...
- GFK_of_xmaspast 11y ago> As a personal anecdote, my first forays into ML are covered with rand() calls, and in retrospect, it's head-smashingly obvious that this was a Bad Idea. It's a perfectly fine idea, except that like you said you needed to keep better control over your seeds, and probably also could have benefitted from some kind of test harness. (Not to mention it sounds like your metrics were a bit underpowered)