News for hackers. Stuff that matters.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by eps on Saturday May 22, 2021 @03:08AM (#27244260)
Compression speed is around 2 KB/sec.

The figure is given in nncp_v2.1.pdf. This is 1000x slower than xz, which in turn is 1000x slower than gzip.

I have always wondered if a compression service could be a viable commercial offering and with NNCP rates and its compression speed, it looks like it could! That's for cases when you need to really compress the heck out of something, e.g. prior to distributing a large static piece of data to a very large number of recipients. I think there was a service like this, used by AAA game developers for distributing patches, but it didn't take because it had a very slow decompression... and, now reading further through the paper, it looks like an issue with NNCP too -

    The NNCP v2 decompression speed is similar to its compression speed.
So it's a no-go for my brilliant and lazy startup idea, but fascinating stuff nonetheless.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by m463 on Saturday May 22, 2021 @04:08AM (#27244550)
I think maybe matching the compression speed with the network speed is what you want to do.

In a place with ubiquitous fast broadband, a compromise with regard to decompression speed might be ok.

If you're sending something to mars... 2 kb/sec might make sense.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by xxs on Saturday May 22, 2021 @04:15AM (#27244587)
>If you're sending something to mars... 2 kb/sec might make sense.

Keep in mind that 2KB/s is on something like 3090... Massively power hungry even on the decompression.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by loeg on Saturday May 22, 2021 @11:59AM (#27247739)
> I think maybe matching the compression speed with the network speed is what you want to do.

You might be interested: Zstandard has an adaptive mode that attempts to do this.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by AtlasBarfed on Saturday May 22, 2021 @01:18PM (#27248484)
Hm, there are likely multiple large files that exist that are very common (DLLs, versions of shared libs, etc etc etc) that might be frequently compressed (SCP, stored in SSDs, etc) since disk space isn't free yet last I checked.

Each file is really its own special theoretical multivariate space to find the best theoretical compression ratio. Usually finding the optimal or near-optimal compression is the hardest computationally.

And it's basically a perfectly cacheable computation if you have some sort of database mapping algorith + parameters to apply to a given file.

Decompression usually isn't as big a deal for performance.

Anyway an online database for a service that has actively tried to take a known common file (match on filesize, hash, etc) down to its best compressed representation so 1) we don't have to do it every time.

Cloud providers would presumably love these, since S3 probably has millions copies of many files and would 1) get to compress the file and 2) get to share its representation across all instances.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by kitd on Saturday May 22, 2021 @04:34AM (#27244689)
Compression speed is around 2 KB/sec.

Apologies if this is a noob question, but could you improve it with training?

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by esquire_900 on Saturday May 22, 2021 @05:21AM (#27244921)
> Apologies if this is a noob question, but could you improve it with training?

Considering all other things like GPU, code quality etc. equal, the speed here mainly depends on the size of the network. Larger networks result in better performance (logarithmic), but also slower speeds (linear). There are some tricks like pruning to create significantly smaller networks with similar-ish performance, but good models are often large.

Unrelated to your question, what nobody mentions is that the decompression side also needs to complete network. With 57M and 187M parameters, those files are going to be quite large, > 100MB for sure. That completely annihilates the performance wins for 1 time transfers.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by 317070 on Saturday May 22, 2021 @06:16AM (#27245155)
No, as I understand it, the network does not need to be transmitted. The decoder learns on the same stream as the encoder, so you do not need to transmit network parameters.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by ironSkillet on Saturday May 22, 2021 @08:15AM (#27245774)
If I compress a large file at location A using this algorithm, and want to send it to location B, how does location B know how to decompress it?
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by Yoric on Saturday May 22, 2021 @09:38AM (#27246418)
Basically the same way your favorite codec knows how to decompress. It builds the predictor (in this case, a NN) from the known input. The predictor then assigns a symbol (or a series of symbols) to the next few bits - higher probabilities need fewer bits (I haven't checked for this specific technique, but there are techniques that don't even require an integer number of bits, e.g. range encoding).
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by e12e on Saturday May 22, 2021 @08:32AM (#27245891)
See https://news.ycombinator.com/item?id=27244810

As I understand it, when starting up (beginning of stream) - the network does not compress, then guesses the next byte at every turn determininstically from input so far.

Decoding can "read" the fist byte, then proceed to learn and guess the second byte and so on.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by clavigne on Saturday May 22, 2021 @08:31AM (#27245885)
see the (current) top comment

https://news.ycombinator.com/item?id=27244810

it's a very clever use of symmetry.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by vidarh on Saturday May 22, 2021 @10:46AM (#27247010)
It's clever, but pretty much "standard" in compression. Earliest I'm aware of that used symmetry in the encoder and decoder to prevent explicitly transferring the parameters this way was LZ78 (Lempel, Ziv; 1978), but there could well be predecessors I'm not aware of.

LZ78 used it "just" to build a dictionary, but the general idea of using symmetry is there.

(A fascinating variant on this is Semantic Dictionary Encoding, by Dr Michael Franz in his doctoral dissertation (1994), that used this symmetry to compress partial ASTs to cache partially generated code for runtime code generation)

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by xxs on Saturday May 22, 2021 @03:28AM (#27244360)
Yup, it isn't a dictionary based compression. Nonetheless that's a fascinating take
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by thesz on Saturday May 22, 2021 @11:42AM (#27247574)
With preprocessing it is a dictionary based compression. It uses a fixed dictionary to improve on compression.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by wolf550e on Saturday May 22, 2021 @02:17PM (#27248978)
This is what the games industry uses in practice. It is optimized for fast decompression. http://www.radgametools.com/oodle.htm
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by eps on Monday May 24, 2021 @10:51AM (#27265032)
Reads like a snake oil blurb to be honest. No comparision against any modern compressors, eg lz4, no specs, no pricing. Just "trust us, it's awesome." Looks really strange.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by wolf550e on Tuesday May 25, 2021 @10:59PM (#27285684)
Of course there is comparison with LZ4: http://www.radgametools.com/oodlemermaidselkie.htm

LZ4HC is LZ4 compressed with the slow compressor to achieve better compression. It is decompressed using regular LZ4 decompressor.

They also compare with zstd and lzma, which are the open source competition.

I don't know what "specs" you think are missing. They do say which architectures are supported, what the memory use is, whether multi-threading is supported, etc.

No public price, true.

You can read the blogs of the people who work on this code to get a feel for the caliber:

https://cbloomrants.blogspot.com/

https://fgiesen.wordpress.com/

These are known people with known reputation. The product itself is well known in the industry.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by agumonkey on Saturday May 22, 2021 @09:34AM (#27246363)
What about decompression speed ?
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by raverbashing on Saturday May 22, 2021 @03:37AM (#27244408)
For real

I know shipping speeds are important, but it seems game developers could try harder with delta compressing their updates, because it's hard to believe a tens-of-GBs download is the best they could do when you already have a BluRay disk or something (unless it's new content, of course)

I wonder how much their bandwidth costs are and how quickly a reduction would pay itself.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by tomalpha on Saturday May 22, 2021 @09:12AM (#27246174)
Does DRM contribute to this perhaps?

Given the layers of encryption and obfuscation, and leaving aside the merits or otherwise of DRM in the first place, I can imagine it could be hard to do delta patching. At least, without making it easier to crack the DRM - e.g. you’d presumably have to decrypt the asset that needed patching, apply the delta, and re-encrypt/re-sign it all client side.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by cinntaile on Saturday May 22, 2021 @05:36AM (#27244983)
Would it even pay for itself? It seems to me like bandwidth is pretty cheap compared to computation costs so why bother trying to squeeze everything out. Just do some basic compression and you're good to go. Buy a bigger SSD if necessary, with technologies like reBAR compression just slows down a game anyway.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by literallycancer on Saturday May 22, 2021 @07:36AM (#27245536)
As far as cloud providers go, bandwidth is where the lock in is. It's priced to make it too expensive to switch to a competitor.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by xxs on Saturday May 22, 2021 @03:39AM (#27244414)
What would pay for itself is p2p, e.g. bittorrent... alas.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by lxgr on Saturday May 22, 2021 @03:45AM (#27244450)
Blizzard used to use Bittorrent in some of their installers/updaters a while ago.

I'm not sure how viable this is today, or ever was: Many residential connections are heavily asymmetric. Players presumably aren't too excited either by the idea of continuing to seed while they already play online, with shitty ISP-provided routers suffering hundreds of milliseconds of bufferbloat whenever the uplink is saturated.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by xxs on Saturday May 22, 2021 @04:00AM (#27244508)
>Blizzard used to use Bittorrent in some of their installers/updaters a while ago.

Yes, WoW used to have bit-torrent based update.

>Many residential connections are heavily asymmetric.

this is a US centric-view, though. For instance I have 300Mb up/down. At least for most of the Europe (and I suppose Asia), it's pretty common not to be restricted in any way.

I could leave a bit-torrent client non-stop and won't feel it. Like I've said: alas. There is some stigma associated with p2p/torrents.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by paavohtl on Saturday May 22, 2021 @04:50AM (#27244787)
I have very rarely seen symmetric broadband plans available in Finland. In the past I've had 10/1, 24/1, 100/10 and now I have 1000/100. With ADSL connections being asymmetric was basically necessary because the bandwidth is so limited - I think most consumers would prefer 24/1 over 12/12. With fiber I think it's more about market segmentation: ISPs want businesses to buy significantly more expensive symmetric plans.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by dividuum on Saturday May 22, 2021 @04:19AM (#27244614)
Not sure where you are in Europe, but in Germany you have to search a bit to find a residential ISP with symmetric bandwidth. Mine is 50/10.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by Bayart on Saturday May 22, 2021 @05:47AM (#27245037)
Asymmetry is the rule in my country for both copper and fibre lines, although it's less pronounced with fibre. Symmetric lines are a specific business option.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by patrakov on Saturday May 22, 2021 @12:37PM (#27248116)
> At least for most of the Europe (and I suppose Asia), it's pretty common not to be restricted in any way.

In the Philippines, 15 Mbps down / 3 Mbps up ADSL with a static public IP is not something that a foreigner could easily buy. Globe Telecom in Cebu asked for evidence that I have sufficient income to pay for this (2600 PHP per month), and their rules only allow documents from the Philippines, so my bank statement was rejected. I had to talk to their higher-level manager to negotiate an exception. And their default router has 2 seconds of bufferbloat, so I bought a TP-Link Archer C7 and installed OpenWRT to compensate.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by lxgr on Saturday May 22, 2021 @09:20AM (#27246238)
> this is a US centric-view, though

I live in Europe and I have a 1000/0.5 Mbit/s connection.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by LargoLasskhyfv on Saturday May 22, 2021 @09:25PM (#27251707)
My gut feeling says you have a 200/0.5Mbit/s connection at maximum, because just from watching some download monitor out of the corner of my eye while downloading something with 100Mbit/s requires about 250kbit/s ACK packets in the upstream.

No more ACKs? No more DL!

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by lxgr on Sunday May 23, 2021 @03:27AM (#27253076)
No, I can still hit (almost) 1 Gigabit on the downlink. DOCSIS networks are so heavily asymmetric, they take special measures (ACK compression) to get around that!
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by LargoLasskhyfv on Sunday May 23, 2021 @11:24AM (#27255613)
Interesting... never been on Cable/DOCSIS.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by labawi on Saturday May 22, 2021 @09:48AM (#27246494)
That seems very atypical. As the link capacity ratio goes past 10:1, even for typical dowloads, speed starts to be limited by the ability to send requests, or even TCP ACKs.

I've seen 20:1 offers on cable providers, but it's mostly marketing BS, as you're unlikely to get full download speed in most circumstances due to upload limitations.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by lxgr on Sunday May 23, 2021 @03:30AM (#27253086)
True - my nominal bandwidth (i.e. what I pay for) is 1000/50.

I do reach the full downlink speed though due to (presumably) ACK compression in the modem and ACK synthesis/reexpansion in the CMTS. You are right that otherwise such a high ratio would not be feasible with TCP.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by labawi on Thursday June 03, 2021 @03:18AM (#27378121)
Plain single-stream download-only TCP should fit without compression, probably even without Delayed ACKs.

IME, the line starts to choke when you actually want to send requests and they compete with ACKs and your internet stutters and crawls in both direction. Though that was with a slower connection - it's harder to fill a bigger pipe.

BTW, is the ACK compression counted for consumers benefit?

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by cinntaile on Saturday May 22, 2021 @05:38AM (#27244992)
This is not the standard at all in Europe, maybe that's the standard in your specific country?
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by xxs on Saturday May 22, 2021 @07:59AM (#27245668)
I have lived in quite few countries, travelled as well. Someone mentioned Germany (and Bavaria) - indeed, it had one of the worst inet couple of years back. OTOH, Austria was totally fine.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by lxgr on Saturday May 22, 2021 @09:24AM (#27246276)
"It's fine" is a different statement from "up- and downlink bandwidths are heavily asymmetric", no?

While asymmetric connections make sense for many residential use cases, P2P is not one of them.

Re:NNCP: Lossless Data Compression with Neural Networks (2019) by cinntaile on Saturday May 22, 2021 @10:17AM (#27246753)
Your claim was that the lines were symmetric and "unrestricted". Neither are the standard unfortunately.
Re:NNCP: Lossless Data Compression with Neural Networks (2019) by raverbashing on Saturday May 22, 2021 @05:18AM (#27244908)
p2p wouldn't solve the main issues, which are excessive download times and poor user experiences for upgrades.