arXivDaily arXiv每日学术速递 周一至周五更新
感恩节,周五至周末无更新,大家顺遂。周一再来吧
arXiv 2307.11585cs.DScs.DB
收藏

子集采样及其扩展

Subset Sampling and Its Extensions

Jinchao Huang, Sibo Wang

AI总结:

本文研究子集采样问题,分别针对内存内动态场景和外存场景提出高效数据结构与I/O算法,还将问题扩展为范围子集采样并给出动态场景下的解决方案,各方案均达到较优的时间与空间复杂度。

摘要:

本文研究子集采样(subset sampling)问题。输入为包含$n$条记录的集合$\u27e8\uc4f0\u27e9\uc815\ub97c \ub098\ud0c0\ub0b4\ub294 \uae30\ud638\ub294 \uc6d0\ubcf8 \uc218\uc2dd\uacfc \uac19\uc740 \ubaa8\uc591\uc73c\ub85c \ub098\uc640\uc57c \ud569\ub2c8\ub2e4. \uc5ec\uae30\uc11c\ub294 \uc815\uc0c1\uc801\uc73c\ub85c \mathcal{S} \ub85c \ub098\ud0c0\ub0c5\ub2c8\ub2e4. \mathcal{S}$,以及一个为每条记录$v\in\mathcal{S}$分配概率$\textbf{p}(v)$的函数$\textbf{p}$。查询返回$\mathcal{S}$的一个随机子集$X$,其中每条记录$v\in\mathcal{S}$以概率$\textbf{p}(v)$被独立采样到$X$中。研究目标是将$\mathcal{S}$存储在一种数据结构中以高效回答查询。若$\mathcal{S}$可放入内存,该问题在$\mathcal{S}$为动态时具有研究价值。我们提出了一种动态数据结构,其期望查询时间为$\mathcal{O}(1+\mu_{\mathcal{S}})$,空间复杂度为$\mathcal{O}(n)$,更新、插入和删除的摊还期望时间为$\mathcal{O}(1)$,其中$\mu_{\mathcal{S}}=\sum_{v\in\mathcal{S}}\textbf{p}(v)$。该结构的查询时间和空间均为最优。若$\mathcal{S}$无法放入内存,即使$\mathcal{S}$是静态的,该问题也颇具难度。在此场景下,我们提出了一种I/O高效算法,使用$\mathcal{O}(n/B)$的空间,以$\mathcal{O}\left((\log^*_B n)/B+(\mu_\mathcal{S}/B)\log_{M/B} (n/B)\right)$的摊还期望I/O数回答查询,其中$M$为内存大小,$B$为块大小,$\log^*_B n$是对$n$进行迭代取$\log_2(\cdot)$运算直到结果小于$B$所需的次数。此外,当每条记录关联一个实值键时,我们将子集采样问题扩展为范围子集采样(range subset sampling)问题,该问题要求采样得到的记录的键落在指定的输入范围$[a,b]$内。针对这一扩展问题,我们给出了动态场景下的解决方案,其期望查询时间为$\mathcal{O}(\log n+\mu_{\mathcal{S}\cap[a,b]})$,空间复杂度为$\mathcal{O}(n)$,更新、插入和删除的摊还期望时间为$\mathcal{O}(\log n)$。

英文摘要:

This paper studies the \emph{subset sampling} problem. The input is a set $\mathcal{S}$ of $n$ records together with a function $\textbf{p}$ that assigns each record $v\in\mathcal{S}$ a probability $\textbf{p}(v)$. A query returns a random subset $X$ of $\mathcal{S}$, where each record $v\in\mathcal{S}$ is sampled into $X$ independently with probability $\textbf{p}(v)$. The goal is to store $\mathcal{S}$ in a data structure to answer queries efficiently. If $\mathcal{S}$ fits in memory, the problem is interesting when $\mathcal{S}$ is dynamic. We develop a dynamic data structure with $\mathcal{O}(1+μ_{\mathcal{S}})$ expected \emph{query} time, $\mathcal{O}(n)$ space and $\mathcal{O}(1)$ amortized expected \emph{update}, \emph{insert} and \emph{delete} time, where $μ_{\mathcal{S}}=\sum_{v\in\mathcal{S}}\textbf{p}(v)$. The query time and space are optimal. If $\mathcal{S}$ does not fit in memory, the problem is difficult even if $\mathcal{S}$ is static. Under this scenario, we present an I/O-efficient algorithm that answers a \emph{query} in $\mathcal{O}\left((\log^*_B n)/B+(μ_\mathcal{S}/B)\log_{M/B} (n/B)\right)$ amortized expected I/Os using $\mathcal{O}(n/B)$ space, where $M$ is the memory size, $B$ is the block size and $\log^*_B n$ is the number of iterative $\log_2(.)$ operations we need to perform on $n$ before going below $B$. In addition, when each record is associated with a real-valued key, we extend the \emph{subset sampling} problem to the \emph{range subset sampling} problem, in which we require that the keys of the sampled records fall within a specified input range $[a,b]$. For this extension, we provide a solution under the dynamic setting, with $\mathcal{O}(\log n+μ_{\mathcal{S}\cap[a,b]})$ expected \emph{query} time, $\mathcal{O}(n)$ space and $\mathcal{O}(\log n)$ amortized expected \emph{update}, \emph{insert} and \emph{delete} time.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑