压缩预测怎么样?
How Is Compression Prediction?

原始链接: https://lukefleed.xyz/posts/compression/

“压缩即预测”这一观点在数学上是成立的,但并不完整。虽然这两个概念相互关联——概率模型的累积对数损失对应于编码比特流的理想长度——但这种等价性只有在确定了几个关键参数后才成立。 在进行预测之前,编码器和解码器必须就以下内容达成一致: 1. **对象族**:明确被压缩的对象是什么,以及什么样的重建结果才算无损。 2. **信息边界**:区分哪些知识是预先共享的,哪些是必须传输的(例如模型的参数)。 3. **操作约定**:如随机访问或部分解码等需求,这些需求可能会导致必须引入增加总比特长度的结构。 虽然柯尔莫哥洛夫复杂性和计数界限在不假设概率模型的情况下定义了描述的极限,但实际的压缩通常使用序列模型来缩短比特流。然而,一个在训练数据上实现对数损失最小化的模型,在处理未来数据时表现可能不佳,或者在计入存储模型的成本后,会导致文件变得更大。 总之,这一口号只有在编码问题被完整定义之后才成立。它描述了给定模型下的理想负载长度,却忽略了决定压缩方案是否真正实用的基本结构和上下文前提。

Hacker News 最新 | 过往 | 评论 | 提问 | 展示 | 招聘 | 投稿 登录 压缩预测如何? (lukefleed.xyz) 5 分,由 aziis98 于 37 分钟前发布 | 隐藏 | 过往 | 收藏 | 讨论 | 帮助 指南 | 常见问题 | 列表 | API | 安全 | 法律 | 申请 YC | 联系 搜索:
相关文章

原文

Over the past few weeks, I have repeatedly encountered the same claim on Hacker News: compression is prediction. The recent discussion has approached it from both directions. Two 3Blue1Brown videos, Reinventing Entropy and But what is cross-entropy?, derive entropy and cross-entropy from the limits of source coding. An ngrok article follows the same mathematics through arithmetic coding and language models. Salvatore Sanfilippo asks how far the resulting identification between prediction and compression should be taken.

These explanations meet at one fact. A probabilistic model assigns a conditional probability to every possible continuation, and an entropy coder converts the probability assigned to the observed continuation into bits. For a sequence x1:nx_{1:n}

log2Q(x1:n)=i=1nlog2Q(xix<i)-\log_2 Q(x_{1:n}) = \sum_{i=1}^n -\log_2 Q(x_i\mid x_{<i})
联系我们 contact @ memedata.com