SlowGuess/NeurIPS_2023_OCR huggingface dataset:
Setting this as no less than  $1 - \delta$  leads to that  $n \geq \frac{m + \log\left(\frac{1}{\delta}\right)}{\log\left(\frac{1}{1 - p}\right)}$ .
Given  $O(2^m + \frac{m + \log(\frac{1}{\delta})}{\log(\frac{1}{1 - p})})$  pairs of data and gradients, we will observe at least one pair from each region of the partition. Then, identifying the values of  $u_i$ 's and  $w_i$ 's is equivalent to identifying the datapoints that correspond to a value of the binary vector where only one indicator value is 1. These values can be identified in  $O(2^{3m})$  time; the algorithm is given in Algorithm J.1. These results demonstrate that we can indeed learn the parameters (up to a permutation) of a two layer neural network given exact gradient information.
J.1 Algorithm for Identifying Regions
We first note that identifying the parameters  $u_{i}$ 's and  $w_{i}$ 's of a two layer neural network is equivalent to identifying the values  $\{x_{1},\dots,x_{m}\}$  from the set  $\{\sum_{x\in C}x|C\in \mathcal{P}(\{x_1,\dots,x_m\})\}$ , where  $\mathcal{P}$  denotes the power set. We also assume that  $x_{1},\ldots ,x_{m}$  are linearly independent, so we cannot create  $x_{i}$  from any linear combination of  $x_{j}$ 's with  $j\neq i$ . Then, we can identify the set  $\{x_{1},\dots,x_{m}\}$  as in Algorithm 1. This algorithm runs in  $O(2^{3m})$  time as it iterates through each point in  $M$  and computes the overlapping set  $O$  and resulting updated sum  $S$ , which takes  $O(2^{2m})$  time. From the resulting set  $B$ , we can exactly compute values  $u_{i}$  and  $w_{i}$  up to a permutation.
K Additional Synthetic Experiments
We now present additional synthetic experiments that demonstrate the performance of our approach under settings with imperfect explanations and compare the benefits of using different types of explanations.
K.1 Variational Objective is Better with Noisy Gradient Explanations
Here, we present the remainder of the results from the synthetic regression task of ??, under more settings of noise  $\epsilon$  added to the gradient explanation.
Again, we observe that our method does better than that of the Lagrangian approach and the self-training method. Under high levels of noise, the Lagrangian method does poorly. On the contrary,
Figure 10: Comparison of MSE on regressing a two layer neural network with explanations of noisy gradients.  $m = 1000$ ,  $k = 20$ ,  $\lambda = 10$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.
our method is resistant to this noise and also outperforms self-training significantly in settings with limited labeled data.
K.2 Comparing Different Types of Explanations
Here, we present synthetic results to compare using different types of explanation constraints. We focus on comparing noisy gradients as before, as well as noisy classifiers, which are used in the setting of weak supervision [30]. Here, we generate our noisy classifiers as  $h^{*}(x) + \epsilon$ , where  $\epsilon \sim \mathcal{N}(0,\sigma^2)$ . We omit the results of self-training as it does not use any explanations, and we keep the supervised method as a baseline. Here,  $t = 0.25$ .
We observe different trends in performance as we vary the amount of noise in the noisy gradient or noisy classifier explanations. With any amount of noise and sufficient regularization  $(\lambda)$ , this influences the overall performance of the methods that incorporate constraints. With few labeled data, using noisy classifiers helps outperform standard supervised learning. With a larger amount
Figure 11: Comparison of MSE on regressing a two layer neural network with explanations as a noisy classifier (top) and noisy gradients (bottom).  $m = 1000$ ,  $k = 20$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.  $\epsilon$  represents the variance of the noise added to the noisy classifier or noisy gradient.
of labeled data, this leads to no benefits (if not worse performance of the Lagrangian approach). However, with the noisy gradient, under small amounts of noise, the restricted class of hypothesis will still capture solutions with low error. Therefore, in this case, we observe that the Lagrangian approach outperforms standard supervised learning in the case with few labeled data and matches it with sufficient labeled data. Our method outperforms or matches both methods across all settings.
We consider another noisy setting, where noise has been added to the weights of a copy of the target two layer neural network. Here, we compare how this information impacts learning from the direct outputs (noisy classifier) or the gradients (noisy gradients) of that noisy copy (Figure 12).
Figure 12: Comparison of MSE on regressing a two layer neural network with explanations as a noisy classifier (top) and noisy gradients (bottom).  $m = 1000$ ,  $k = 20$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.  $\epsilon$  represents the variance of the noise added to the noisy classifier or noisy gradient.
L Additional Baselines
We compare against an additional baseline of a Lagrangian-regularized model + self-training on unlabeled data. We again note that this is not a standard method in practice and does not naturally fit into a theoretical framework, although we present it to compare against a method that uses both explanations and unlabeled data.
Figure 13: Comparison of MSE on regressing a linear model (top left) and two layer neural network (top right) with gradient explanations.  $m = 1000$ ,  $k = 20$ . For the iterative methods,  $T = 2$ . Results are averaged over 5 seeds. Comparison of classification accuracy on the YouTube dataset (bottom left) and the Yelp dataset (bottom right).  $m = 500$ ,  $k = 150$ . Results are averaged over 40 seeds.
We observe that our method outperforms this baseline (Figure 13), again especially in the settings with limited labeled data. We observe that although this new method indeed satisfies constraints, when performing only a single round of self-training, it no longer satisfies these constraints as much. Thus, this supports the use of our method to perform multiple rounds of projections onto a set of EPAC models.
M Experimental Details
For all of our synthetic and real-world experiments, we use values of  $m = 1000$ ,  $k = 20$ ,  $T = 3$ ,  $\tau = 0$ ,  $\lambda = 1$ , unless otherwise noted. For our synthetic experiments, we use  $d = 100$ ,  $\sigma^2 = 5$ . Our two layer neural networks have hidden dimensions of size 10. They are trained with a learning rate of 0.01 for 50 epochs. We evaluate all networks on a (synthetic) test set of size 2000.
For our real-world data, our two layer neural networks have a hidden dimension of size 10 and are trained with a learning rate of 0.1 (YouTube) and 0.1 (Yelp) for 10 epochs.  $\lambda = 0.01$  and gradient values computed by the smoothed approximation in [?] has  $c = 1$ . Test splits are used as follows from the YouTube and Yelp datasets in the WRENCH benchmark [46].
We choose the initialization of our variational algorithm  $h_0$  as the standard supervised model, trained using gradient descent.
N Ablations
We also perform ablation studies in the same regression setting as Section 6. We vary parameters that determine either the experimental setting or hyperparameters of our algorithms.
N.1 Number of Explanation-annotated Data
First, we vary the value of  $k$  to illustrate the benefits of our method over the existing baselines.
Figure 14: Comparison of MSE on regressing a two layer neural network over different amounts of explanation-annotated data  $k$ .  $m = 1000$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.
We observe that our variational approach performs much better than a simple augmented Lagrangian method, which in turn does better than supervised learning with sufficiently large values of  $k$ . Our approach is always better than the standard supervised approach.
We also provide results for how well these methods satisfy these explanations over varying values of  $k$ .
N.2 Simpler Teacher Models Can Maintain Good Performance
As noted before, we can use simpler teacher models to be regularized into the explanation-constrained subspace. This can lead to overall easier optimization problems, and we synthetically verify the impacts on the overall performance. In this experimental setup, we are regressing a two layer neural network with a hidden dimension size of 100, which is much larger than in our other synthetic experiments. Here, we vary over simpler teacher models by changing their hidden dimension size.
Figure 15: Comparison of MSE on regressing a two layer neural network over simpler teacher models (hidden dimension). Here,  $k = 20$ ,  $m = 1000$ ,  $T = 10$ . Results are averaged over 5 seeds.
We observe no major differences as we shrink the hidden dimension size by a small amount. For significantly smaller hidden dimensions (e.g., 2 or 4), we observe a large drop in performance as these simpler teachers can no longer fit the approximate projection onto our class of EPAC models accurately. However, slightly smaller networks (e.g., 6, 8) can fit this projection as well, if not better in some cases. This is a useful finding, meaning that our teacher can be a smaller model and get comparable results, showing that this simpler teacher can help with scalability without much or any drop in performance.
N.3 Number of Unlabeled Data
As a main benefit of our approach is the ability to incorporate large amounts of unlabeled data, we provide a study as we vary the amount of unlabeled data  $m$  that is available. When varying the amount of unlabeled data, we observe that the performance of self-training and our variational objective improves at similar rates.
Figure 16: Comparison of MSE on regressing a two layer neural network over different values of  $m$ .  $k = 20, T = 10$ . Results are averaged over 5 seeds.
N.4 Data Dimension
We also provide ablations as we vary the underlying data dimension  $d$ . As we increase the dimension  $d$ , we observe that the methods seem to achieve similar performance, due to the difficulty in modeling the high-dimensional data. Also, here gradient information is much harder to incorporate, as the input gradient itself is  $d$ -dimensional, so we do not see as much of a benefit of our approach as  $d$  grows.
Figure 17: Comparison of MSE on regressing a two layer neural network over different underlying data dimensions  $d$ .  $m = 1000$ ,  $k = 20$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.
N.5 Hyperparameters
First, we compare the different approaches over different values of regularization  $(\lambda)$  towards satisfying the explanation constraints. Here, we compare the augmented Lagrangian approach, the self-training approach, and our variational approach.
Figure 18: Comparison of MSE on regressing a two layer neural network over different values of  $\lambda$ .  $m = 1000$ ,  $k = 20$ . For the iterative methods,  $T = 10$ . Results are averaged over 5 seeds.
We observe that there is not a significant trend as we change the value of  $\lambda$  across the different methods. Since we know that our explanation is perfect (our restricted EPAC class contains the target classifier), increasing the value of  $\lambda$  should help, until this constraint is met.
Figure 19: Comparison of MSE on regressing a two layer neural network over different values of  $T$  (left) and  $\tau$  (right) in our variational approach.  $m = 1000, k = 20, \tau = 10, T = 10$ , unless noted otherwise. Results are averaged over 5 seeds.
Next, we compare different hyperparameter settings for our variational approach. Here, we analyze trends as we vary the values of  $T$  (number of iterations) and  $\tau$  (threshold before adding hinge penalty).
We note that the value of  $\tau$  does not significantly impact the performance of our method while increasing values of  $T$  seems to generally benefit performance on this task.
O Social Impacts
While our proposed method has the potential to improve performance and efficiency in a variety of applications, our method could introduce new biases or reinforce existing biases in the data used to train the model. For example, if our explanations constraints are poorly specified and reflect biased behavior, this could lead to inaccurate or discriminatory predictions, which could have negative impacts on individuals or groups that are already marginalized. Therefore, it is important to note that these explanation constraints must be properly analyzed and specified to exhibit the desired behavior of our model.