How to send a real number using a single bit (and some shared randomness)
mybiasedcoin.blogspot.com
mybiasedcoin.blogspot.com
The new Tesla 8 and 16 bit floating number formats in the Dojo system supports this kind of rounding up/down using a PRNG when compressing neural network parameters from higher precision floats (it is specified in the floating point paper).
The random rounding is needed to not have a bias in the neural network weight updates, but this article improves the rounding method to be more accurate (closer to the real rounding than uniform sampling) without reintroducing bias.
Is this compared in the post? Some of it went over my head.
> Randomized rounding, where the sender sends 1 with probability x and 0 otherwise, and the receiver uses the received bit X as the estimate x', has the property that E[x'] = x. Unbiased estimators are arguably more natural for many estimation problems. Here the measure of performance would be the maximum variance for the estimate over all inputs x, so for randomized rounding the cost is 1/4 (when x = 1/2).
The "cost"/"variance" of 1/4 in the above paragraph is talked about later in the article as the "expected squared error"; the main result is a scheme that has a cost of just 0.04599, which is better than the "send a 1 with a probability x" scheme, which has a cost of 1/4 = 0.25.
To more directly answer your question, the post mentions federated learning of machine models as an application.
… it’s not the most practical, and the single-but version seems to be a toy problem, but I can imagine it being useful in some very particular cases?
I'm a bit out of my scope here, but I think the concept is really cool.
"Shared randomness" might be the current noise level on some radio frequency in enemy territory. You and your receiving friend can both hear everything, but as soon as one of you starts transmitting you must have a very careful strategy to avoid detection.
It’s a bit like the concept of dithering in images, where visually we can represent shades of grays just by using many 1 bit pixels.
I'm not sure whether so many people would be intrigued to read "How to send a real number using arbitrarily many bits."
It is obvious that there is no way of guessing more than 1 bit of a number after receiving a single bit (unless you have previously established a convention like 0=any_other_number, 1=a_certain_number, when you can estimate many bits when you receive a "1", but no bits when you receive a "0").
Looking at the text of the article, it is obviously that it does not refer to sending "a Single Bit", but to sending "a Single Bit" many times, because only then the variance and the other statistics used by them can be computed.
If the problem is rephrased as "How to Send a Real Number Using a Single Bit" at each of many transmissions, then the problem becomes banal and it has been studied for more than 60 years, in the field of analog-digital and digital-analog conversions, under names like "stochastic converters", "delta modulation", "delta-sigma modulation", and a few others, and much better solutions are known than discussed in the article.
(The corresponding problem in that field is how to measure an analog signal, i.e. the real number, with a single analog comparator and a single reference value, when you get just 1 bit of information, i.e. whether the measured value is smaller or greater than the reference. The simplest solution is to sum a random noise with the value to be measured, and then compute the average of the 1-bit values, but there are much more sophisticated methods).
How much more exposition do you want from a casual blog post? There's a link to the academic paper if you want full details (you can follow up on the numerous references to other papers, which explain applications.)
The academic paper is confusing, because it defines the problem as it would have been a singular event, the sender chooses a real number, then sends 1 bit to the receiver and the receiver miraculously guesses the real number.
You have to waste time by carefully studying the paper to see that the statistical methods used are meaningless for a singular event, so in fact a large number of transmissions of a single bit are assumed and the accuracy (i.e. the variance) of the estimation of the real number is computed over that very large but unspecified number of transmitted bits.
In any real application, the main quality of an estimation algorithm would be determined by how many single bits must be transmitted and received to guarantee a certain accuracy (variance) of the estimation, i.e. a certain number of recovered bits of the real number, but I have lost patience when reading the paper before discovering whether the authors even mention this somewhere.
What should be clear for everyone, is that recovering N bits of a real number, i.e. reducing the variance of the estimation to that level, always requires transmitting many more single bits than N.
Nevertheless, even if more bits are sent, there are many cases when this is useful, e.g. because losing some single bits or receiving them with errors has little effect, but there may also be other reasons.
Maybe better to think for a few seconds before dismissing the problem as pointless and claiming to hate it.
In this case, unlike what the article states as the problem, the point seems not to be how to send a real number using a single bit, but how to aggregate such bits from many agents that measure some shared thing.
That's two very, very different things.
Not impossible. You can perfectly well send say, pi, by implementing a protocol which sends 1 if the number is pi and 0 if not.
And it's about as useful as the mentioned algorithms.
Further, you could send the bit as a pulse, where the pulse-width is proportional to the number.
Suppose you have two clocks that are synchronized to +-dt1, and sending messages takes some known amount of time +-dt2 and you want to make sure the sender is able to transmit within +dt3 of whatever event triggered the send event.
It seems to me that you'd be able to transmit at least dt3/(2*(dt1+dt2)) distinct values with the pretty naive approach of discretizing time into segments longer than the uncertainty between the message-and-clock error. I'd be willing to bet that a sophisticated approach could do much better.
It looks like PTP only works on a local network; not sure how you'd do that across the Internet.
Your explanation that they are both going through the same list at the same rate clarifies that. They have n random numbers and are both using the same one for each transmission/receipt event.
I guess that in practice, synchronising that would be a pain. Either they sync on packets sent/received, which means that one dropped packet messes everything up, or they sync on time, in which case there's clock skew to worry about. Or they could have sync information in the data sent ("I'm using the 1234th item in the shared randomness"), which makes a bit of a nonsense of the whole "one bit" thing.
Am I missing something there?
Using a single bit to communicate weight updates during the learning process reduces bandwidth required, and allows highly parallel training.
I suspect in the future we'll even see methods of sub-1-bit weight updates to further decrease bandwidth requirements to keep massive models approximately in sync between distant learning nodes.
After enough iterations, each weight can converge on any value.
A less-than-bit update can be combined with another such an update to encode a single bit. For instance, my protocol could use a bit to indicate “the computer runs Linux, or it is one of the 256 Windows computers in this list”. You know the computer has a 50% chance of running Windows.