SlowGuess/NeurIPS_2023_OCR huggingface dataset:
$\mathbb{E}\left[\frac{r_i}{1 - r_i} \mid \omega = 0\right] = \rho;$
$\mathbb{E}\left[\frac{1 - r_i}{r_i} \mid \omega = 1\right] = \frac{1}{\rho}.$
As corollaries, for  $k$  conditionally independent reports  $r_1, \ldots, r_k$ , we have  $\mathbb{E}\left[\prod_{i=1}^{k} \frac{r_i}{1 - r_i} \mid \omega = 0\right] = \rho^k$  and  $\mathbb{E}\left[\prod_{i=1}^{k} \frac{1 - r_i}{r_i} \mid \omega = 1\right] = \frac{1}{\rho^k}$ .
Proof. Because  $\frac{r_i}{1 - r_i} = \frac{P(s_i|\omega = 1)}{P(s_i|\omega = 0)}\rho$  (from (13)), we have
$$
\mathbb {E} \left[ \frac {r _ {i}}{1 - r _ {i}} \mid \omega = 0 \right] = \sum_ {s _ {i} \in \mathcal {S} _ {i}} P (s _ {i} \mid \omega = 0) \frac {P (s _ {i} \mid \omega = 1)}{P (s _ {i} \mid \omega = 0)} \rho = \sum_ {s _ {i} \in \mathcal {S} _ {i}} P (s _ {i} \mid \omega = 1) \rho = \rho .
$$
For conditionally independent  $r_1, \ldots, r_k$ , we have
$$
\mathbb {E} \left[ \prod_ {i = 1} ^ {k} \frac {r _ {i}}{1 - r _ {i}} \mid \omega = 0 \right] = \prod_ {i = 1} ^ {k} \mathbb {E} \left[ \frac {r _ {i}}{1 - r _ {i}} \mid \omega = 0 \right] = \rho^ {k}.
$$
Similarly, we can prove  $\mathbb{E}\left[\frac{1 - r_i}{r_i} \mid \omega = 1\right] = \frac{1}{\rho}$  and  $\mathbb{E}\left[\prod_{i=1}^{k} \frac{1 - r_i}{r_i} \mid \omega = 1\right] = \frac{1}{\rho^k}$ .
Let  $\Delta = \frac{\sqrt{\varepsilon}}{3\gamma n}$  and suppose we are given  $T = \frac{6e}{\gamma n\Delta^2}\log \frac{2}{\delta} = \frac{54e\gamma n}{\varepsilon}\log \frac{2}{\delta} = O(\frac{\gamma n}{\varepsilon}\log \frac{1}{\delta})$  samples. Suppose when drawing the samples we first draw the events  $\omega^{(t)}$ 's, and then draw the reports  $r_i^{(t)},$  s conditioning on  $\omega^{(t)}$  being 0 or 1. After the first step, the numbers of samples with  $\omega^{(t)} = 0$  and  $\omega^{(t)} = 1$  are determined, which we denote by  $\#_0$  and  $\#_1$ . Since  $\#_0 + \#_1 = T$ , one of them must be at least  $T / 2$ . We argue that whether  $\#_0 \geq \frac{T}{2}$  or  $\#_1 \geq \frac{T}{2}$  we can estimate  $\rho^{1 / \gamma}$  with accuracy  $3\Delta$ . (For simplicity, we assume that  $1 / \gamma$  is an integer.)
- If  $\#_0 \geq T/2$ , then we consider the  $\#_0 n$  reports  $r_i^{(t)}$ 's in the samples with  $\omega^{(t)} = 0$ . We divide these  $\#_0 n$  reports evenly into  $\#_0 n \gamma$  groups, each of size  $1 / \gamma$ , denoted by  $G_1, \ldots, G_{\#_0 n \gamma}$ . Consider the product of  $\frac{r_i^{(t)}}{1 - r_i^{(t)}}$ s in a group  $G_j$ : because  $r_i^{(t)}$ 's are independent given  $\omega = 0$ , by Lemma G.9 we have
$$
\mathbb {E} \Big [ \prod_ {r _ {i} ^ {(t)} \in G _ {j}} \frac {r _ {i} ^ {(t)}}{1 - r _ {i} ^ {(t)}} \mid \omega = 0 \Big ] = \rho^ {1 / \gamma}.
$$
Using (65) and the inequality  $(1 + \gamma)^{1 / \gamma} \leq e$ , we have
$$
\frac {1}{e} \rho^ {1 / \gamma} \leq \frac {1}{(1 + \gamma) ^ {1 / \gamma}} \rho^ {1 / \gamma} \leq \prod_ {r _ {i} ^ {(t)} \in G _ {j}} \frac {r _ {i} ^ {(t)}}{1 - r _ {i} ^ {(t)}} \leq (1 + \gamma) ^ {1 / \gamma} \rho^ {1 / \gamma} \leq e \rho^ {1 / \gamma}.
$$
Let  $X_{j}$  be the random variable  $\frac{1}{e\rho^{1 / \gamma}}\prod_{r_i^{(t)}\in G_j}\frac{r_i^{(t)}}{1 - r_i^{(t)}}$ . From the above equation and inequality we have  $\mathbb{E}[X_j] = \frac{1}{e}$  and  $X_{j}\in [\frac{1}{e^{2}},1]\subseteq [0,1]$ . So, by Chernoff bound,
$$
\operatorname * {P r} \left[ \frac {1}{\# _ {0} n \gamma} \sum_ {j = 1} ^ {\# _ {0} n \gamma} X _ {j} \in (1 \pm \Delta) \frac {1}{e} \mid \omega = 0 \right] \geq 1 - 2 e ^ {- \frac {\# _ {0} n \gamma \Delta^ {2}}{3 e}} \geq 1 - 2 e ^ {- \frac {T n \gamma \Delta^ {2}}{6 e}} = 1 - \delta ,
$$
given our choice of  $T$ . Multiplying  $\frac{1}{\#_0 n \gamma} \sum_{j=1}^{\#_0 n \gamma} X_j$  by  $e \rho^{1/\gamma}$ , we obtain the following estimate of  $\rho^{1/\gamma}$ :
$$
\hat {\rho} _ {0} ^ {1 / \gamma} := \frac {1}{\# _ {0} n \gamma} \sum_ {j = 1} ^ {\# _ {0} n \gamma} \prod_ {r _ {i} ^ {(t)} \in G _ {j}} \frac {r _ {i} ^ {(t)}}{1 - r _ {i} ^ {(t)}} \in (1 \pm \Delta) \rho^ {1 / \gamma}.
$$
Dividing by  $\rho^{1 / \gamma}$ , we get  $(\frac{\hat{\rho}_0}{\rho})^{1 / \gamma} \in 1 \pm \Delta$ .
- If  $\#_1 \geq T/2$ , then by considering the  $\#_1 n$  reports in the samples with  $\omega^{(t)} = 1$ , dividing them into  $\#_1 n \gamma$  groups of size  $1 / \gamma$ ,  $H_1, \ldots, H_{\#_1 n \gamma}$ , and similarly defining random variable  $Y_j = \frac{\rho^{1 / \gamma}}{e} \prod_{r_i^{(t)} \in H_j} \frac{1 - r_i^{(t)}}{r_i^{(t)}}$ , we obtain the following estimate of  $(\frac{1}{\rho})^{1 / \gamma}$ :
$$
(\frac {1}{\hat {\rho} _ {1}}) ^ {1 / \gamma} := \frac {1}{\# _ {1} n \gamma} \sum_ {j = 1} ^ {\# _ {1} n \gamma} \prod_ {r _ {i} ^ {(t)} \in H _ {j}} \frac {1 - r _ {i} ^ {(t)}}{r _ {i} ^ {(t)}} \in (1 \pm \Delta) (\frac {1}{\rho}) ^ {1 / \gamma}.
$$
Multiplying by  $\rho^{1 / \gamma}$ , we get  $(\frac{\rho}{\hat{\rho}_1})^{1 / \gamma} \in 1 \pm \Delta$ . Taking the reciprocal and noticing that  $\frac{1}{1 \pm \Delta} \subseteq 1 \pm 3\Delta$  when  $\Delta < \frac{1}{3}$ , we obtain  $(\frac{\hat{\rho}_1}{\rho})^{1 / \gamma} \in 1 \pm 3\Delta$ .
From the discussion above we obtained an estimate  $\hat{\rho} \in \{\hat{\rho}_0, \hat{\rho}_1\}$  of  $\rho$  such that  $(\frac{\hat{\rho}}{\rho})^{1/\gamma} \in 1 \pm 3\Delta$ . Raising to the power of  $\gamma$ , and using the inequality  $(1 - x)^{\gamma} \geq 1 - x\gamma$  and  $(1 + x)^{\gamma} \leq e^{x\gamma} \leq 1 + 2x\gamma$  for  $x\gamma \leq 1$ , we get
$$
\frac {\hat {\rho}}{\rho} \in (1 \pm 3 \Delta) ^ {\gamma} \subseteq [ 1 - 3 \Delta \gamma , e ^ {3 \Delta \gamma} ] \subseteq [ 1 - 3 \Delta \gamma , 1 + 6 \Delta \gamma ].
$$
In particular, this implies  $\frac{|\hat{\rho} - \rho|}{\rho} \leq 6\Delta \gamma = \frac{2\sqrt{\varepsilon}}{n}$ . Then, according to Claim G.8, the aggregator  $\hat{f}$  defined by  $\hat{f}(\boldsymbol{r}) = \frac{1}{1 + \hat{\rho}^{n-1}\prod_{i=1}^{n}\frac{1 - r_i}{r_i}}$  is  $\varepsilon$ -optimal. We hence obtained an  $\varepsilon$ -optimal aggregator.
H Missing Proofs from Section 7
H.1 Proof of Theorem 7.1
Regard  $P$  as a joint distribution over reports  $\boldsymbol{r} = (r_1, \dots, r_n)$  and the state  $\omega$ , where  $r_i$  is sampled by first sampling  $s_i \in S_i$  and then letting  $r_i = P(\omega = 1 | s_i)$ . Since  $|\mathcal{S}_i| = m$ , there are at most  $m$  different values of  $r_i$  that can be sampled, so there are at most  $2m^n$  different tuples of  $(\boldsymbol{r}, \omega)$  in the support of  $P$ . For each such tuple  $(\boldsymbol{r}, \omega)$ , consider the empirical probability of this tuple:
$$
\hat {P} (\boldsymbol {r}, \omega) = \frac {1}{T} \sum_ {t = 1} ^ {T} \mathbb {1} \left[ \left(\boldsymbol {r} ^ {(t)}, \omega^ {(t)}\right) = (\boldsymbol {r}, \omega) \right].
$$
By the Chernoff bound, we have
$$
\Pr \left[ \left| \hat {P} (\boldsymbol {r}, \omega) - P (\boldsymbol {r}, \omega) \right| > \Delta P (\boldsymbol {r}, \omega) \right] \leq 2 e ^ {- \frac {T P (\boldsymbol {r} , \omega) \Delta^ {2}}{3}}.
$$
Using a union bound for all the  $2m^n$  tuples and the fact that  $P(\boldsymbol{r}, \omega) \geq P(\boldsymbol{s}, \omega) > \frac{c}{m^n}$  (where  $\boldsymbol{s} \in \mathcal{S}$  are some signals that generate  $\boldsymbol{r}$ ), we have
$$
\left| \hat {P} (\boldsymbol {r}, \omega) - P (\boldsymbol {r}, \omega) \right| \leq \Delta P (\boldsymbol {r}, \omega) \tag {66}
$$
holds for all tuples  $(r,\omega)$  except with probability at most
$$
2 m ^ {n} \cdot 2 e ^ {- \frac {T P (r , \omega) \Delta^ {2}}{3}} \leq 4 m ^ {n} \cdot e ^ {- \frac {c T \Delta^ {2}}{3 m ^ {n}}} = \delta
$$
$$
T \geq \frac {3 m ^ {n}}{c \Delta^ {2}} \log \frac {4 m ^ {n}}{\delta}. \tag {67}
$$
Assuming (66) holds, we consider the "empirical" Bayesian aggregator:
$$
\hat {f} (\boldsymbol {r}) = \frac {\hat {P} (\boldsymbol {r} , \omega)}{\hat {P} (\boldsymbol {r})}.
$$
Since (66) implies  $\hat{P} (\pmb {r},\omega)\in (1\pm \Delta)P(\pmb {r},\omega)$  and  $\hat{P} (\pmb {r})\in (1\pm \Delta)P(\pmb {r})$  , we have
$$
\hat {f} (\boldsymbol {r}) \geq \frac {1 - \Delta}{1 + \Delta} \cdot \frac {P (\boldsymbol {r} , \omega)}{P (\boldsymbol {r})} = \left(1 - \frac {2 \Delta}{1 + \Delta}\right) f ^ {*} (\boldsymbol {r}) \geq (1 - 2 \Delta) f ^ {*} (\boldsymbol {r})
$$
$$
\hat {f} (\boldsymbol {r}) \leq \frac {1 + \Delta}{1 - \Delta} \cdot \frac {P (\boldsymbol {r} , \omega)}{P (\boldsymbol {r})} = \left(1 + \frac {2 \Delta}{1 - \Delta}\right) f ^ {*} (\boldsymbol {r}) \leq (1 + 4 \Delta) f ^ {*} (\boldsymbol {r}),
$$
if  $\Delta < \frac{1}{2}$ . Putting these two inequalities together:
$$
\left| \hat {f} (\boldsymbol {r}) - f ^ {*} (\boldsymbol {r}) \right| \leq 4 \Delta f ^ {*} (\boldsymbol {r}).
$$
We note that this holds for all possible  $r$  in the support of  $P$ . So, the expected approximation error of  $\hat{f}$  is at most:
$$
\begin{array}{l} \mathbb {E} \left[ | \hat {f} (\boldsymbol {r}) - f ^ {*} (\boldsymbol {r}) | ^ {2} \right] = \sum_ {\boldsymbol {r}} P (\boldsymbol {r}) | \hat {f} (\boldsymbol {r}) - f ^ {*} (\boldsymbol {r}) | ^ {2} \\ \leq \sum_ {\boldsymbol {r}} P (\boldsymbol {r}) 1 6 \Delta^ {2} f ^ {*} (\boldsymbol {r}) ^ {2} \\ = 1 6 \Delta^ {2} \sum_ {\boldsymbol {r}} P (\boldsymbol {r}) \left(\frac {P (\boldsymbol {r} , \omega)}{P (\boldsymbol {r})}\right) ^ {2} \\ = 1 6 \Delta^ {2} \sum_ {\boldsymbol {r}} \frac {P (\boldsymbol {r} , \omega) ^ {2}}{P (\boldsymbol {r})} \leq 1 6 \Delta^ {2} \sum_ {\boldsymbol {r}} \frac {P (\boldsymbol {r}) ^ {2}}{P (\boldsymbol {r})} = 1 6 \Delta^ {2}. \\ \end{array}
$$
Letting  $16\Delta^2 = \varepsilon$ , namely  $\Delta^2 = \frac{\varepsilon}{16}$ , we have  $\mathbb{E}\big[|\hat{f}(\boldsymbol{r}) - f^*(\boldsymbol{r})|^2\big] \leq \varepsilon$ , so  $\hat{f}$  is an  $\varepsilon$ -optimal aggregator. Plugging  $\Delta^2 = \frac{\varepsilon}{16}$  into (67) we obtain the sample complexity
$$
\frac {3 m ^ {n}}{c \Delta^ {2}} \log \frac {m ^ {n}}{\delta} = \frac {4 8 m ^ {n}}{c \varepsilon} \log \frac {m ^ {n}}{\delta} = O \Big (\frac {m ^ {n}}{c \varepsilon} \big (n \log m + \log \frac {1}{\delta} \big) \Big).
$$