Question: Represent the scientific article to find a short TLDR

Question: We show that in a variety of large-scale deep learning scenarios the gradient dynamically converges to a very small subspace after a short period of training. The subspace is spanned by a few top eigenvectors of the Hessian (equal to the number of classes in the dataset), and is mostly preserved over long periods of training. A simple argument then suggests that gradient descent may happen mostly in this subspace. We give an example of this effect in a solvable model of classification, and we comment on possible implications for optimization and learning. Stochastic gradient descent (SGD) BID14 and its variants are used to train nearly every large-scale machine learning model. Its ubiquity in deep learning is connected to the efficiency at which gradients can be computed BID15 BID16, though its success remains somewhat of a mystery due to the highly nonlinear and nonconvex nature of typical deep learning loss landscapes. In an attempt to shed light on this question, this paper investigates the dynamics of the gradient and the Hessian matrix during SGD.In a common deep learning scenario, models contain many more tunable parameters than training samples. In such "overparameterized" models, one expects generically that the loss landscape should have many flat directions: directions in parameter space in which the loss changes by very little or not at all (we will use "flat" colloquially to also mean approximately flat).1 Intuitively, this may occur because the overparameterization leads to a large redundancy in configurations that realize the same decrease in the loss after a gradient descent update. One local way of measuring the flatness of the loss function involves the Hessian. Small or zero eigenvalues in the spectrum of the Hessian are an indication of flat directions BID10. In, the spectrum of the Hessian for deep learning crossentropy losses was analyzed in depth.2 These works showed empirically that along the optimization trajectory the spectrum separates into two components: a bulk component with many small eigenvalues, and a top component of much larger positive eigenvalues. 3 Correspondingly, at each point in parameter space the tangent space has two orthogonal components, which we will call the bulk subspace and the top subspace. The dimension of the top subspace is k, the number of classes in the classification objective. This indicates the presence of many flat directions, which is consistent with the general expectation above. In this work we present two novel observations:• First, the gradient of the loss during training quickly moves to lie within the top subspace of the Hessian. 4 Within this subspace the gradient seems to have no special properties; its direction appears random with respect to the eigenvector basis.• Second, the top Hessian eigenvectors evolve nontrivially but tend not to mix with the bulk eigenvectors, even over hundreds of training steps or more. In other words, the top subspace is approximately preserved over long periods of training. These observations are borne out across model architectures, including fully connected networks, convolutional networks, and ResNet-18, and data sets FIG1, TAB0, Appendices C-D).Taken all together, despite the large number of training examples and even larger number of parameters in deep-learning models, these seem to imply that learning may happen in a tiny, slowly-evolving subspace. Indeed, consider a gradient descent step −ηg where η is the learning rate and g the gradient. The change in the loss to leading order in η is δL = −η g 2. Now, let g top be the projection of g onto the top subspace of the Hessian. If the gradient is mostly contained within this subspace, then doing gradient descent with g top instead of g will yield a similar decrease in the loss, assuming the linear approximation is valid. Therefore, we think this may have bearing on the question of how gradient descent can traverse such a nonlinear and nonconvex landscape. To shed light on this mechanism more directly, we also present a toy model of softmax regression trained on a mixture of Gaussians that displays all of the effects observed in the full deep-learning scenarios. This isn't meant as a definitive explanation, but rather an illustrative example in which we can understand these phenomenon directly. In this model, we can solve the gradient descent equations exactly in a limit where the Gaussians have zero variance. 5 We find that the gradient is concentrated in the top Hessian subspace, while the bulk subspace has all zero eigenvalues. We then argue and use empirical simulations to show that including a small amount of variance will not change these , even though the bulk subspace will now contain non-zero eigenvalues. Finally, we conclude by discussing some consequences of these observations for learning and optimization, leaving the study of improving current methods based on these ideas for future work. In this section, we present the main empirical observations of the paper. First, the gradient lies predominantly in the smaller, top subspace. Second, in many deep learning scenarios, the top and bulk Hessian subspaces are approximately preserved over long periods of training. These properties come about quickly during training. In general, we will consider models with p parameters denoted by θ and a cross-entropy loss function L(θ). We will generally use g(θ) ≡ ∇L(θ) for the gradient and H(θ) ≡ ∇∇ T L(θ) for the Hessian matrix of the loss function at a point θ in parameter space. A gradient descent update with learning rate η at step t is DISPLAYFORM0 and for stochastic gradient descent we estimate the gradient using a mini-batch of examples. For a classification problem with k classes, consider a point θ in parameter space where the Hessian spectrum decomposes into a top and a bulk subspace as discussed above. Now, let V top be the subspace of tangent space spanned by the top k eigenvectors of the Hessian; we will call this the top subspace. Let V bulk be the orthogonal subspace. The gradient at this point can be written as a sum g(θ) = g top + g bulk where g top (g bulk) is the orthogonal projection of g onto V top (V bulk). The fraction of the gradient in the top subspace is then given by DISPLAYFORM0 5 Other works where the dynamics of gradient descent were analyzed directly include BID8; BID2. 6 As we have mentioned, this decomposition was originally found in, and we provide additional discussion of the Hessian spectrum in Appendix B. FIG1 shows this fraction for common datasets and network architectures during the early stages of training. The fraction starts out small, but then quickly grows to a value close to 1, implying that there is an underlying dynamical mechanism that is driving the gradient into the top subspace. For these experiments, training was carried out using vanilla stochastic gradient descent on a variety of realistic models and dataset combinations. However, measurements of the gradient and Hessian were evaluated using the entire training set. Additionally, all of our empirical have been replicated in two independent implementations. (See Appendix A for further details on the numerical calculation.)In the next subsection we provide evidence that this effect occurs in a broader range of models. DISPLAYFORM1 In this section, we consider the overlap between the gradient g and the Hessian-gradient product Hg during training, defined by DISPLAYFORM0 The overlap takes values in the range [−1, 1].Computing the overlap is computationally much more efficient than computing the leading Hessian eigenvectors. We argue below that the overlap becomes big (of order 1) if the gradient is contained in the top subspace of the Hessian. We can use the overlap as a proxy measurement: if the overlap is large, we take that to be evidence that the gradient lives mostly in the top subspace. We measured the overlap in a range of deep learning scenarios, and the are shown in TAB0. In these experiments we consider fully-connected networks, convolutional networks, a ResNet-18 BID9, as well as networks with no hidden layers, models with dropout and batch-norm, models with a smooth activation function (e.g. softplus instead of ReLU), models trained using different optimization algorithms (SGD and Adam), models trained using different batch sizes and learning rates, models trained on data with random labels (as was considered by Zhang et al. FORMULA0), and a regression task. The overlap is large for the gradient and Hessian computed on a test set as well (except for the case where the labels are randomized). In addition, we will see below that the effect is not unique to models with cross-entropy loss; a simpler version of the same effect occurs for linear and deep regression models. In all the examples that we checked, the overlap was consistently close to one after some training. Let us now show that the overlap tends to be large for a random vector in the top Hessian subspace. Let λ i be the Hessian eigenvalues in the top subspace of dimension k, with corresponding eigenvectors v i. Let w be a vector in this subspace, with coefficients w i in the v i basis. To get an estimate for the overlap equation 3, we choose w to be at a random vertex on the unit cube, namely choosing w i = ±1 at random for each i. The overlap is then given by DISPLAYFORM1 As discussed above, in typical scenarios the spectrum will consist of k positive eigenvalues where k is the number of classes and all the rest close to zero. To get a concrete estimate,we approximate this spectrum by taking λ i ∝ i (a rough approximation, empirically, when k = 10), and take k large so that we can compute the sums approximately. This estimate for the overlap is 3/4 ≈ 0.87, which is in line with our empirical observations. This should compared with a generic random vector not restricted to the top subspace, which would have an overlap much less than 1.We have verified empirically that a random unit vector w in the top Hessian subspace will have a large overlap with Hw, comparable to that of the gradient, while a random unit vector in the full parameter space has negligible overlap. Based on these observations, we will take the overlap equation 3 to be a proxy measurement for the part of the gradient that lives in the top Hessian subspace. We now show empirically that the top Hessian subspace is approximately preserved during training. Let the top subspace Vtop at training step t be spanned by the top k Hessian eigenvectors v DISPLAYFORM0 top. We will define the overlap between a subspace V (t) top and a subspace V (t) top at a later step t > t as follows. BID5. By default, no regularization was used. The regression data set was sampled from one period of a sine function with Gaussian noise of standard deviation 0.1. We used SGD with a mini-batch size of 64 and η = 0.1, unless otherwise specified. All models were trained for a few epochs, and the reported overlap is the mean over the last 1,000 steps of training. Plots of f top for many of these experiments are collected in Appendix D. It is easy to verify the rightmost equality. In particular, each element in the sum measures the fraction of a late vector v DISPLAYFORM1 that belongs to the early subspace Vtop. Notice that the overlap of a subspace with itself is 1, while the overlap of two orthogonal subspaces vanishes. Therefore, this overlap is a good measure of how much the top subspace changes during training. 7 Figure 2 shows the evolution of the subspace overlap for different starting times t 1 and future times t 2, and for classification tasks with k = 10 classes. For the subspace spanned by the top k eigenvectors we see that after about t 1 = 100 steps the overlap remains significant even when t 2 − t 1 t 1, implying that the top subspace does not evolve much after a short period of training. By contrast, the subspace spanned by the next k eigenvectors does not have this property: Even for large t 1 the subspace overlap decays quickly in t 2.This means that the projector P (t) top is only weakly dependent on time, making the notion of a "top subspace" approximately well-defined during the course of training. It is this observation, in conjunction with the observation that the gradient concentrates in this subspace at each point along the trajectory, that gives credence to the idea that gradient descent happens in a tiny subspace. In Appendix C we give additional on the evolution of the top subspace, by studying different sizes of the subspace. To summarize this, we can average the overlap over different interval values t 2 − t 1 for each fixed t 1 and plot as a function of subspace dimension. We present this plot in Figure 3 for the same fully-connected (a) and ResNet-18 (b) models as in FIG1. Here, we very clearly see that increasing the subspace until d = 9 leads to a pretty fixed overlap as a function of dimension. At d = 10 it begins to decrease monotonically with increasing dimension. This is strong evidence that there's and interesting feature when the dimension is equal to the number of classes. In order to understand the mechanism behind the effects presented in the previous section, in this section we work out a toy example. We find this to be a useful model as it captures all of the effects 7 We have written the middle expression in (equation 5) to make it clear that our overlap is the natural normalized inner product between the projectors P (t) top and P (t) top. This is simply related to the Frobenius norm of the difference between the two projectors, ||P DISPLAYFORM0 top ||, the canonical distance between linear subspaces. 8 Note that this does not mean the actual top eigenvectors are similarly well-defined, indeed we observe that sometimes the individual eigenvectors within the subspace tend to rotate quickly and other times they seem somewhat fixed.9 It might be more reasonable to describe this transition at the number of classes minus one, k − 1, rather than the number of classes k. This distinction is inconclusive given the spectrum (see Appendix B), but seems rather sharp in Figure 3. we observed in realistic deep learning examples. However, at this point we only interpret the toy model to be illustrative and not a definitive explanation of the phenomenon. DISPLAYFORM1 Although the way we first set it up will be very simple, we can use it as a good starting point for doing small perturbations and generalizations in which all of the realistic features are present. We will show empirically that such small perturbations do not change the qualitative , and leave an analytic study of this perturbation theory and further generalization to future work. Consider the following 2-class classification problem with n samples {(x a, y a)} n a=1 with x a ∈ R d and labels y a. The samples x a are chosen from a mixture of two Gaussian distributions N (µ 1, σ 2) and N (µ 2, σ 2), corresponding to the two classes. The means µ 1,2 are random unit vectors. On this data we train a model of softmax-regression, with parameters θ y,i where y = 1, 2 is the label and top for different top subspace dimensions with different initial number of steps t 1 averaged over the interval t 2 − t 1 for (a) fully-connected two-layer network trained on MNIST and (b) ResNet-18 architecture trained on CIFAR10. Note the kink around subspace dimension equal to one less than the number of classes in the dataset. DISPLAYFORM2 The cross-entropy loss is given by DISPLAYFORM3 log e θy a · xa y e θy·xa.(Here we denote by θ y ∈ R d the weights that feed into the y logit.) We will now make several simplifying approximations. First, we take the limit σ 2 → 0 such that the samples concentrate at µ 1 and µ 2. The problem then reduces to a 2-sample learning problem. Later on we will turn on a small σ 2 and show that our qualitative are not affected. Second, we will assume that µ 1 and µ 2 are orthogonal. Random vectors on the unit sphere S d−1 have overlap d −1/2 in expectation, so this will be a good approximation at large d. With these assumptions, it is easy to see that the loss function has 2d − 2 flat directions. Therefore the Hessian has rank 2, its two nontrivial eigenvectors are the top subspace, and its kernel is the bulk subspace. The gradient is always contained within the top subspace. In Appendix E, we use these assumptions to solve analytically for the optimization trajectory. At late-times in a continuous-time approximation, the solution is DISPLAYFORM4 DISPLAYFORM5 DISPLAYFORM6 Here η is the learning rate, c i are arbitrary positive real numbers,θ i ∈ R d are two arbitrary vectors orthogonal to both µ 1,2, andθ ∈ R d is an arbitrary vector in the space spanned by µ 1,2. 11 Together, c i,θ i, andθ parameterize the 2d-dimensional space of solutions. This structure implies the following.1. The Hessian has two positive eigenvalues (the top subspace), 12 while the rest vanish. The top subspace is always preserved.2. The gradient evolves during training but is always contained within the top subspace. 11 We thank Vladimir Kirilin for pointing out a mistake in an earlier version of this paper. 12 For the analytically simple form of model chosen here, the two eigenvalues in this top subspace are equal. However, this degeneracy can be broken in a number of ways such as adding a bias. These properties are of course obvious from the counting of flat directions above. We have verified empirically that the following statements hold as well. • If we introduce small sample noise (i.e. set σ 2 to a small positive value), then the bulk of the Hessian spectrum will contain small non-zero eigenvalues (suppressed by σ 2), and the gradient will still evolve into the top subspace.• If we add biases to our model parameters, then the degeneracy in the top subspace will be broken. During training, the gradient will become aligned with the eigenvector that has the smaller of the two eigenvalues.• All these statements generalize to the case of a Gaussian mixture with k > 2 classes.14 The top Hessian subspace will consist of k positive eigenvalues. If the degeneracy is broken by including biases, there will be k−1 large eigenvalues and one smaller (positive) eigenvalue, with which the gradient will become aligned. Let us now tie these statements into a coherent picture explaining the evolution of the gradient and the Hessian. The dynamics of the gradient within the top subspace (and specifically that fact that it aligns with the minimal eigenvector in that subspace) can be understood by the following argument. Under a single gradient descent step, the gradient evolves as DISPLAYFORM0 If we assume the linear approximation holds, then for small enough η this evolution will drive the gradient toward the eigenvector of H that has the minimal, non-zero, eigenvalue. This seems to explain why the gradient becomes aligned with the smaller of the two eigenvectors in the top subspace when the degeneracy is broken. (It is not clear that this explanation holds at late times, where higher order terms in η may become important.) The reader may wonder why the same argument does not apply to the yet smaller (or vanishing) eigenvalues of the Hessian that are outside the top subspace. Applying the argument naively to the whole Hessian spectrum would lead to the erroneous that the gradient should in fact evolve into the bulk. Indeed, from equation 10 it may seem that the gradient is driven toward the eigenvectors of (1 − ηH) with the largest eigenvalues, and these span the bulk subspace of H.There are two ways to see why this argument fails when applied to the whole parameter space. First, the bulk of the Hessian spectrum corresponds to exactly flat directions, and so the gradient vanishes in these directions. In other words, the loss function has a symmetry under translations in parameter space, which implies that no dynamical mechanism can drive the gradient toward those tangent vectors that point in flat directions. Second, in order to show that the gradient converges to the bulk we would have to trust the linear approximation to late times, but (as mentioned above) there is no reason to assume that higher-order corrections do not become large. Let us now discuss what happens when we introduce sample noise, setting σ 2 to a small positive value. Now, instead of two samples we have two sets of samples, each of size n/2, concentrated around µ 1 and µ 2. We expect that the change to the optimization trajectory will be small (namely 13 In our experiments we used d = 1000, k = 2, 5, 10, and σ = 0, 0.02. For the means µi, we use random unit vectors that are not constrained to be orthogonal.14 This can be studied analytically and will be presented in future work (Kirilin et al.). However, we will discuss an important point here of the k > 2 class model that makes the dynamical nature of the top-k subspace more apparent. Considering the loss equation 6 and k orthogonal mean vectors, one can see that symmetries of the loss lead to k(k − 1) nontrivial directions, meaning the Hessian is naturally rank k(k − 1). After solving the model, one can see that in fact this k(k − 1) subspace dynamically becomes dominated by k top eigenvalues. 15 We mention in passing that the mechanism above holds exactly for linear regression with quadratic loss. In this setting the Hessian is constant and there are no higher-order corrections, and so the gradient will converge to the leading eigenvector of (1 − ηH). 2 ) because the loss function is convex, and because the change to the optimal solution is also suppressed by σ 2. The noise breaks some of the translation symmetry of the loss function, leading to fewer flat directions and to more non-zero eigenvalues in the Hessian, appearing in the bulk of the spectrum. The Hessian spectrum then resembles more closely the spectra we find in realistic examples (although the eigenvalues comprising the top subspace have a different structure). Empirically we find that the top subspace still has two large eigenvalues, and that the gradient evolves into this subspace as before. Therefore turning on noise can be treated as a small perturbation which does not alter our analytic . We leave an analytic analysis of the problem including sample noise to future work. We note that the argument involving equation 10 can again not be applied to the whole parameter space, for the same reason as before. Therefore, there is no contradiction between that equation and saying that the gradient concentrates in the top subspace. We have seen that quite generally across architectures, training methods, and tasks, that during the course of training the Hessian splits into two slowly varying subspaces, and that the gradient lives in the subspace spanned by the k eigenvectors with largest eigenvalues (where k is the number of classes). The fact that learning appears to concentrate in such a small subspace with all positive Hessian eigenvalues might be a partial explanation for why deep networks train so well despite having a nonconvex loss function. The gradient essentially lives in a convex subspace, and perhaps that lets one extend the associated guarantees to regimes in which they otherwise wouldn't apply. An essential question of future study concerns further investigation of the nature of this nearly preserved subspace. From Section 3, we understand, at least in certain examples, why the spectrum splits into two blocks as was first discovered by. However, we would like to further understand the hierarchy of the eigenvalues in the top subspace and how the top subspace mixes with itself in deep learning examples. We'd also like to investigate more directly the different eigenvectors in this subspace and see whether they have any transparent meaning, with an eye towards possible relevance for feature extraction. Central to our claim about learning happening in the top subspace was the fact the decrease in the loss was predominantly due to the projection of the gradient onto this subspace. Of course, one could explicitly make this projection onto g top and use that to update the parameters. By the argument given in the introduction, the loss on the current iteration will decrease by almost the same amount if the linear approximation holds. However, updating with g top has a nonlinear effect on the dynamics and may, for example, alter the spectrum or cause the top subspace to unfreeze. Further study of this is warranted. Similarly, given the nontrivial relationship between the Hessian and the gradient, a natural question is whether there are any practical applications for second-order optimization methods (see BID7 for a review). Much of this will be the subject of future research, but we will conclude by making a few preliminary comments here. An obvious place to start is with Newton's method BID7. Newton's method consists of the parameter update DISPLAYFORM0. There are a few traditional criticisms of Newton's method. The most practical is that for models as large as typical deep networks, computation of the inverse of the highly-singular Hessian acting on the gradient is infeasible. Even if one could represent the matrix, the fact that the Hessian is so ill-conditioned makes inverting it not well-defined. A second criticism of Newton's method is that it does not strictly descend, but rather moves towards critical points, whether they are minima, maxima, or saddles. These objections have apparent simple resolutions given our . Since the gradient predominantly lives in a tiny nearly-fixed top subspace, this suggests a natural low rank approximation to Newton's method DISPLAYFORM1 top.Inverting the Hessian in the top subspace is well-defined and computationally simple. Furthermore, the top subspace of the Hessian has strictly positive eigenvalues, indicating that this approximation to Newton's method will descend rather then climb. Of course, Newton's method is not the only second-order path towards optima, and similar statements apply to other methods. For the empirical in this paper, we did not actually have to ever represent the Hessian. For example, to compute the top eigenvectors of the Hessian efficiently, we used the Lanczos method BID11, which relies on repeatedly computing the Hessian-vector product Hv for some vector v. This product can be computed in common autograd packages such as TensorFlow (Abadi et al.) or PyTorch BID13 as follows. Let v be a pre-computed numerical vector (such as the gradient). One first computes the scalar a = ∇L T v, and then takes the gradient of this expression, ing in ∇a = Hv. As first explored by, the Hessian eigenvalue spectrum appears to naturally separate into "top" and "bulk" components, with the top consisting of the largest k eigenvalues, and the bulk consisting of the rest. An example of this for a small fully-connected two-layer network is shown in FIG4. The hidden layers each have 32 neurons, and the network was trained on MNIST for 40 epochs. The eigenvalues belonging to the top subspace are clearly visible, and for clarity, we labeled them showing that there's 10 nontrivial eigenvalues. We further confirmed this effect by studying datasets with a different number of classes (such as CIFAR100) and by studying synthetic datasets. We also confirmed that the dimension of the top subspace is tied to the classification task and not intrinsic to the dataset. For instance, we can study MNIST where we artificially label the digits according to whether they are even or odd, creating 2 class labels (even though the data intrinsically contains 10 clusters). In this case, there were only 2 large eigenvalues, signifying that the top is 2-dimensional and not 10-dimensional. Additionally, we experimented by applying a random permutation to the MNIST labels. This removed the correlation between the input and the labels, but the network could still get very high training accuracy as in BID9. In this case, we still find 10 large eigenvalues. The fact that the top subspace is frozen (as we show in Figure 2), suggests that there could be some kind of a special feature in the Hessian spectrum. To study this, we looked at a two-layer fully-connected network on CIFAR100, with each hidden layer having 256 neurons each. We chose CIFAR100 to allow us a larger value of k to perhaps see something meaningful in the transition between the bulk and top subspaces. Furthermore, rather than just plotting the value of the eigenvalues as a function of their index, we made a density plot averaged over 200 realizations. This is shown in FIG5, where we note that the x-axis is log of the eigenvalue. Since we were only interested in the transition from top to bulk, we only computed the top 1000 eigenvalues. This allowed us to study a larger model than we did for the plot of the full spectrum in FIG4. The density plot, FIG5, shows a clear feature in the density function describing the Hessian eigenvalues occurring around the mean 100th eigenvalue. While the exact location is hard to determine, there is a clear underdensity around the 100th eigenvalue, counting from the right edge. It's an interesting observation that a Gaussian provides a very good fit to the part of the spectrum in the top subspace, suggesting the eigenvalue distribution could be described by a log-normal distribution. However, this is only suggestive, and much more evidence and explanation is needed. In future work, it would be interesting to characterize the different functions that describe the spectral density of the Hessian. Next, let's look at a particular top eigenvector. One hypothesis is that the corresponding eigenvectors to the k largest eigenvalues would just correspond to either the weights or biases in the last layer (which also depend on the number of classes). In FIG6, we plot the maximal eigenvector after (a) 0 steps, (b) 100 steps, (c) 200 steps, and (d) 400 steps of training for the fully-connected architecture trained on MNIST. First it's easy to see that this vector is not constant during training. More importantly, we see that there are many nonzero elements of the vectors across the entire range of model parameters. We colored these plots according to where the parameters are located in the network, and we note that even though the top layer weights seem to have the largest coefficients, they are only ∼ 4× larger than typical coefficients in the first hidden layer. In Figure 7, we zoom in on the final layer for the fully-connected architecture trained on MNIST after (a) 0 steps and (b) 400 steps. This makes it clear that the eigenvector is never sparse and is evolving in time. Thus, we conclude that eigenvectors are a nontrivial linear combination of parameters with different coefficients. It would be interesting to understand in more detail whether the linear combinations of parameters represented by these top-subspace eigenvectors are capturing something important about either learning dynamics or feature representation. Finally, for completeness let us also give a plot of some example evolutions of a top Hessian eigenvalue. In FIG7, we plot the evolution of the maximal eigenvalue for (a) our fully-connected architecture trained on MNIST and (b) our ResNet-18 architecture trained on CIFAR10. In both cases, we see an initial period of growth, then the eigenvalue remains very large as the model is training, then it decays. The fully-connected MNIST example trains very quickly, but comparing with FIG1 for the ResNet-18, we see that the loss and accuracy converge around step 10000, where the maximum eigenvalue begins to oscillate and also decay. Our toy model suggests that eigenvalues should decay at the late part of training like ∼ 1/t. These plots are too rough to say We organize according to first hidden layer (blue), second hidden layer (orange), top layer weights (green), and top layer biases (red).(a) (b) Figure 7: Eigenvector corresponding to the maximal eigenvalue for the fully-connected architecture trained on MNIST after (a) 0 steps and (b) 400 steps zoomed in on the top layer weights and biases. These plots are strong evidence that eigenvector is clearly not dominated by any particular parameter and is meaningfully changing in time.anything specific about the functional form of the decay, but we do see qualitatively in both cases that it's decreasing.16 16 To learn something more concrete, ideally we should train a large number of realizations and then average the behavior of the maximal eigenvalue across the different runs. We will save this analysis for the future. In this section, we will give further evidence that the size of the nearly-preserved subspace is related to the number of classes. As we showed in the last section and FIG5 in particular, there is a feature in the Hessian spectrum that seems related to the number of classes. In FIG1, we explain that the gradient tends to lie in a subspace spanned by the eigenvalues corresponding to the top-k eigenvectors, and in Figure 2, we show that a subspace of size k seems to be nearly preserved over the course of training. These three phenomena seem to be related, and here we'd like to provide more evidence. First, let's investigate whether the nearly preserved subspace is k-dimensional. To do so, let us consider the same fully-connected two-layer network considered in (a) and (b) of Figure 2. In Figure 9, we consider top subspaces of different dimensions, ranging from 2 to 20. We can consider subspace dimensions of different sizes for the ResNet-18 architecture considered in (e) and (f) of Figure 2, which also has 10 classes. These are shown in FIG1. Both of these show interesting behavior as we increase the subspace past the number of classes. Notably, the top 15 and top 20 subspaces shown in (e) and (f) of Figures 9-10 and are significantly less preserved than the others. The top 11 subspace is marginally less preserved, and most of the subspaces with dimensions less than 10 seem to be preserved amongst themselves. In particular, both (e) and (f) in both plots shows that adding additional eigenvectors does not always lead to increased preservation. The maximally (i.e. largest dimensional) preserved subspace seems to peak around the number of classes. The fact that these smaller top subspaces are also preserved suggests additional structure perhaps related to the eigenvectors no longer rotating as much amongst themselves as training progresses. A nice summary of these where we average the overlap for a particular t 1 over the interval t 2 − t 1 is shown in the main text in Figure 3. Now that we've studied whether the fixed subspace is really k-dimensional, let's better understand how the fraction of the gradient spreads across the top subspace for a few different points in training. Let us define the overlap of the gradient with a particular eigenvector DISPLAYFORM0 In this section, we provide some plots highlighting additional experiments. The of these experiments were summarized in TAB0, but we include some additional full on the gradient overlap with the top-k subspace here. In particular, FIG1 plots the fraction of the gradient lying in the top subspace, f top, for a variety of different scenarios. In (a) we give an example of changing the learning rate, in (b) we give an example of changing the batch size, in (c) we give an example with 0 hidden layers, in (d) we give an example of changing the activation function, in (e) we apply a random permutation to labels, and in (f) we use the Adam optimizer instead of SGD. In all these experiments, we see pretty consistently that the gradient quickly converges to live in the top subspace and then stays there. For the reduced case of a 2-sample, 2-class problem learned using softmax-regression, the loss function can be written as L(θ) = 1 2 log 1 + e (θ2−θ1)·µ1 + 1 2 log 1 + e (θ1−θ2)·µ2.At a late stage of training the loss is near its zero minimum value. The exponents in equation 13 must then be small, so we can approximate L(θ) ≈ 1 2 e (θ2−θ1)·µ1 + 1 2 e (θ1−θ2)·µ2. The loss function has 2d − 2 flat directions, 17 and so the Hessian can have rank at most 2, and the gradient will live inside this non-trivial eigenspace. This is a simple example of the general phenomenon we observed. To gain further understanding, we solve for the optimization trajectory. We train the model using gradient descent, and take the small learning rate limit (continuous time limit) in which the parameters θ(t) evolve as dθ dt = −η∇L(θ(t)). The general solution of this equation is θ 1 (t) =θ 1 + µ 1 2 log (ηt + c 1) − µ 2 2 log (ηt + c 2),θ 2 (t) =θ 2 − µ 1 2 log (ηt + c 1) + µ 2 2 log (ηt + c 2).The space of solutions has 2d − 2 dimensions and is parameterized by the positive constants c 1,2 and byθ 1,2, which are constant vectors in R d orthogonal to both µ 1 and µ 2. The gradient along the optimization trajectory is then given by ∇ θ1 L(t) = −∇ θ2 L(t) = − µ 1 2(ηt + c 1) + µ 2 2(ηt + c 2) = 2(µ 2 − µ 1) ηt + O(t −2).Notice that in the limit t → ∞ the gradient approaches a vector that is independent of the solution parameters. Next, consider the Hessian. By looking at the loss equation 13 we see there are 2d − 2 flat directions and 2d parameters, implying that the Hessian has at most rank 2. Let us work out its spectrum in At leading order in the limit t → ∞ we find two non-trivial eigenvectors, given by DISPLAYFORM0 both with eigenvalue (ηt) −1. The remaining eigenvalues all vanish. The top Hessian subspace is fixed, and the gradient is contained within this space.

represent the tldr for finding the corresponding scientific article

For instance, <<We develop a framework for generating human-understandable explanations for why infeasibility is occurring in over-constrained instances of a class of resource-constrained scheduling problems.>>  to <<Significant work has been dedicated to developing methods for communicating reasons for decision-making within au- tomated scheduling systems to human users. However, much less focus has been placed on communicating reasons for why scheduling systems are unable to arrive at a feasible solution when over-constrained. We investigate this problem in the context of task scheduling. We introduce the agent resource-constrained project scheduling problem (ARCPSP), an ex- tension of the resource-constrained project scheduling problem which includes a conception of agents that execute tasks in parallel. We outline a generic framework, based on efficiently enumerating minimal unsatisfiable sets (MUS) and maximal satisfiable sets (MSS), to produce small descriptions of the source of infeasibility. These descriptions are supple- mented with potential relaxations that would fix the infeasibility found within the problem instance. We illustrate how this method may be applied to the ARCPSP and demonstrate how to generate different types of explanations for an over- constrained instance of the ARCPSP. In many real-world applications, human users in charge of developing plans and making decisions are aided by automated planning and scheduling systems. For example, NASA mission planning makes use of a large team of human planners that use various automated scheduling systems in order to construct day-to-day as well as long-term plans for crew members. A primary function of these automated systems is generating different types of plans and schedules while ensuring that various constraints do not conflict. When plans are ultimately constructed by human planners for a human crew, it is essential for both the planners, and the crew executing the plans, to understand how and why certain scheduling decisions were made by automated tools. In general, when the primary function of such constraint satisfaction and optimization tools is to support human decision-making, it is necessary for the automated systems to be transparent in how they arrive at certain outputs. Significant work has been dedicated to generating humanunderstandable explanations for why certain automated planning decisions were made BID10 ).However, little work has been done in generating reasons for why plans or schedules cannot be generated under certain specifications. Human users interacting with such constraint satisfaction or optimization tools are bound to run into configurations for which no feasible solution exists. Fixing infeasible configurations is a challenging task for the human user if they are unable to understand why the solver arrives at an unsatisfiable . While various partial constraint satisfaction tools exist for solving such over-constrained problems BID4, solutions employing these tools have significant limitations that make them less applicable in certain real-life scenarios. Most of these methods employ constraint hierarchies to determine which constraints should be violated in order to satisfy more important ones. However, in complicated planning or scheduling applications involving multiple human agents, constructing such a hierarchy is often impractical. Instead, if reasons for infeasibility can be properly conveyed back to the human user, they can make high-level decisions to solve infeasibility in any way they see fit. In this paper, we provide a framework for iteratively generating human-understandable explanations of infeasibility for a specific class of scheduling problems. These explanations manifest themselves as minimal sets of specifications (or constraints) that are responsible for causing infeasibility, coupled with suggestions for relaxations through which feasibility could be achieved. The method proposed in this paper allows users to enumerate over a series of explanations for infeasible instances of problems at varying levels of abstraction. For example, raw explanations of relevant low-level constraints may be directly output or a causal link may be established back to higher level descriptions of the problem to understand what specifications were responsible for the feasibility issue. This system also allows directed questions about feasibility to be asked, such as "why can task A not be scheduled after task B?"A strategy for iteratively generating minimal unsatisfiable sets (MUS) and maximal satisfiable sets (MSS) forms the basis for interpreting the infeasibility of the problem. Existing methods such as QuickXplain BID5 ) focus on generating a single most preferable explanation of infeasibility. Likewise, BID1 aims to generate a single explanation in the context of optimization without attempting to achieve minimality. However, overconstrained problems may contain several infeasibility issues which cannot be solved by changing only a single part of the problem. So, because a single MUS only provides indication of a single feasibility issue, we aim to enumerate several sets of MUS to highlight multiple feasibility issues found within the problem instance. Therefore, the proposed enumeration strategy is based on MARCO BID8 ), a flexible algorithm for generating MUSes and MSSes in succession. Motivated by the domain of space mission scheduling, we introduce and investigate the agent resource-constrained project scheduling problem (ARCPSP), an extension of the resource-constrained project scheduling problem (RCPSP) that incorporates the delegation of tasks to differing agents. This problem cannot be framed as an instance of the RCPSP because it deals with the case of asymmetric agents in which certain tasks may only be executed by a subset of the agents. This problem is meant to model applications in which efficient scheduling for teams of differing agents is critical. While we only explicitly investigate this problem, the generality of the approach outlined in this paper would allow the methodology to be adapted for different types of constraint satisfaction and optimization tools as well as different types of planning and scheduling problems. The main contributions of this paper are the following: firstly, we provide a formal definition of the agent resourceconstrained project scheduling problem (ARCPSP) in Section 3. Then in Section 4 we outline a difference logic encoding of the ARCPSP which is used to check feasibility of problem instances. The framework for generating humanunderstandable explanations of infeasibility for instances of the ARCPSP is described in Section 5. Finally, we provide an overview of the trade-off between interpretability and expressibility of different types of explanations and conclude by discussing how these ideas can be extended. In this section, we introduce relevant information and definitions used throughout the paper. These concepts will set the stage for formulating the ARCPSP in terms of satisfiability modulo theory and using minimal unsatisfiable sets and maximal satisfiable sets to generate explanations of infeasibility. Let X be a set of variables and clauses C 1,..., C n be formulas representing constraints over X. Consider a formula of the form DISPLAYFORM0 We say the formula ϕ is satisfiable if there exists some assignment to the variables in X which makes ϕ evaluate to TRUE. Otherwise, it is unsatisfiable. Note that if ϕ takes the form of equation FORMULA0, as it does throughout this paper, every clause C i must be TRUE in order for ϕ to evaluate to TRUE. To implement the temporal constraints within a schedule, the clauses C i are taken from the theory of difference logic (DL), which makes deciding ϕ a satisfiability modulo theory (SMT) problem. To check satisfiability of problem instances, we use the Microsoft Z3 SMT solver (De Moura and Bjørner 2008). As will be discussed in Section 4, the agent resourceconstrained project scheduling problem (ARCPSP) can be encoded in difference logic (DL), a fragment of linear real arithmetic (LRA). The numerical components of DL are solvable in polynomial time BID2 using graph-based procedures based on an incremental BellmanFord algorithm. In general, decidability for DL using these methods is more efficient than the simplex-based methods used to decide LRA. Under DL, atoms are restricted to the form DISPLAYFORM0 However, we can rewrite the following atoms in difference form: DISPLAYFORM1 Bounds x ≤ k can also be incorporated by writing them as x − x 0 ≤ k where x 0 is a special variable that is later set to zero. Definition 1. A minimal unsatisfiable set (MUS) of a set C of constraints is a subset M ⊆ C such that M is unsatisfiable and every proper subset M ⊂ M is satisfiable. A maximal satisfiable set (MSS) of a set C of constraints is a subset M ⊆ C such that M is satisfiable and every proper superset M, with C ⊇ M ⊃ M, is unsatisfiable. A minimal correction set (MCS) of a set C of constraints is the complement of some maximal satisfiable set of C, and can be understood as a minimal set of constraints which need to be removed from C in order to make it satisfiable. It is important to note that MUSes, MSSes, and MCSes are only locally maximal (or minimal), and are different from concepts of globally optimal subsets. MUSes can be understood as isolated, infeasible subsets of the constraints. Their primary characteristic is that removing any single constraint would make the set satisfiable. However, this does not necessarily guarantee the feasibility of the entire set of constraints because there might be many disjoint MUSes within the set. In order to make the entire set feasible (satisfiable), a hitting set of the MUSes must be removed. Every MCS is precisely one combination of such a hitting set. Definition 2. A of a set C of constraints is a subset B ⊆ C of hard constraints, which must be necessarily satisfied. In the context of scheduling problems, s typically include constraints that ensure that the outcome of the schedule is logical, including conditions such as tasks not overlapping and resource constraints not being exceeded. We denote everything outside of the M \ B as the foreground. Hence, the and foreground partition the set C of constraints. A minimal conflict of an over-constrained set C of constraints with respect to a B is then a subset of the foreground M ⊂ C \ B such that M ∪ B is unsatisfiable and, for any superset M ⊃ M, M ∪B is satisfiable. A minimal relaxation of an over-constrained set C of constraints with respect to a B is a subset of the foreground M ⊂ C \ B such that (C \ M) ∪ B is satisfiable and, for any superset M ⊃ M, (C \ M) ∪ B is unsatisfiable. Then an explanation is a sequence of minimal conflicts and minimal relaxations for a problem instance. The definitions of minimal conflicts and minimal relaxations mirror the concepts of MUSes and MCSes, respectively, while incorporating a of constraints which cannot be modified. A is necessary for specifying hard constraints which cannot be relaxed or modified. This way we can prevent certain constraint from consideration for conflicts or relaxations. A also allows the generation of explanations concerning different aspects of a scheduling problem instance, a concept which will be explored later in the paper. The problem that we formulate is an extension of the resource-constrained project scheduling problem (RCPSP). Loosely, the RCPSP considers nonpreemptive, precedenceconstrained tasks of known durations that are constrained by reusable resource requirements (i.e. resources that are returned after a task stops using them). The agent resourceconstrained project scheduling problem extends the RCPSP to include a set number of agents that execute the tasks in parallel, subject to certain compatibility constraints. Additionally, while the RCPSP generally cares about optimizing the total makespan of the schedule, we instead introduce a set start and end time for each scheduling instance and only focus on its feasibility (i.e. whether or not all tasks can be completed within this specified time frame). An instance of an agent resource-constrained project scheduling problem (ARCPSP) is defined by a tuple (M, J, s, p, U, E, R, B, b), where the components are defined as follows. DISPLAYFORM0 are the allowable time ranges in which the tasks should be executed, where DISPLAYFORM1 -p = [p 1, . . ., p n] is a vector of the durations of tasks J, where p i is the duration of task J i.-U = {U 1, U 2, · · ·, U n} is the compatibility set for the tasks. Each task J i can be completed by a subset U i ⊆ M of agent.-E ⊆ J × J is a set of precedence relations. (J i, J j) ∈ E if and only if task J i must terminate before task J j begins. Precedence relations must be defined in a consistent way (by respecting the transitive property).-R = {R 1, R 2, · · ·, R q} is a set of reusable resources.-B ∈ N q represents the total availability of the resources R. The tasks that share resource B i are mutually exclusive if B i = 1.-b ∈ N n×q represents the resource demands of tasks where task J i requires b i,j units of resource R j during its execution. The total demand of resource R j at anytime cannot exceed its total availability B j. DISPLAYFORM2 is a solution to an instance of an ARCPSP, where S i and A i are the start time and the assigned agent of task J i, respectively. A schedule is feasible if it satisfies the following constraints:• No agent has overlapping tasks, DISPLAYFORM3 • Every task falls within its allowable time frame DISPLAYFORM4 • The activities are assigned to compatible agents DISPLAYFORM5 • The precedence relations are met DISPLAYFORM6 • The resource constraints are satisfied, let J t = {J i ∈ J | S i ≤ t < S i + p i} represent the set of tasks being executed at time t, then DISPLAYFORM7 The constraints of the ARCPSP can be formulated in terms difference logic in the following way. Constraint can be rewritten as DISPLAYFORM0 Constraint can be rewritten as DISPLAYFORM1 and constraint can be rewritten as DISPLAYFORM2 By representing the agents as integers M i ∈ N, constraint can be rewritten as Encoding the resource constraints is slightly more challenging. For mutually exclusive constraints (B i = 1), the tasks that share a resource can simply be encoded as not being allowed to be executed at the same time. That is, constraint FORMULA10 can be rewritten as DISPLAYFORM3 DISPLAYFORM4 DISPLAYFORM5 We can generalize this idea to non-mutually exclusive constraints through the concept of minimal forbidden sets. First introduced by BID9 ), forbidden sets are unsatisfiable sets with respect to resource constraints only. They represent the sets of tasks that cannot be simultaneously scheduled because they would otherwise exceed the availability of some resource constraint. The essential feature of a minimal forbidden set is that a single task can be rescheduled to another time to make the set respect the resource constraint. Therefore, given a minimal forbidden set J *, we would like to encode a constraint requiring that they cannot all be executing at the same time DISPLAYFORM6 where J t = {J i ∈ J | S i ≤ t < S i + p i} represents the set of tasks being executed at time t. This encoding is similar to methods which encode the RCPSP in terms of linear arithmetic BID0, but this requires discretizing time and incurs a cumbersome number of constraints if there are a large number of time-points. Moreover, equation FORMULA0 cannot easily be formulated in terms of difference logic. Instead, we can reformulate the constraint as there being at least two tasks in J * that do not overlap DISPLAYFORM7 for every minimal forbidden set J *. This constraint is logically equivalent to requiring that at any time-point, there be at least one task in each minimal forbidden set that is not being executed. Constraining all of the minimal forbidden sets, a subset of all of the forbidden sets, is sufficient to prevent resource conflicts because every forbidden set is a superset of some minimal forbidden set. Algorithms exist for computing all minimal forbidden sets (Stork and Uetz 2005) so we will not discuss such a computation here. Encoding resource constraints as forbidden sets is efficient in the context of the ARCPSP in comparison to other methods, such as equation FORMULA0. This is primarily because of the computational advantage achieved by difference logic over other theories such as linear real arithmetic and the encoding not requiring a discretization of time. Representing resource constraints as minimal forbidden sets also provides an explicit representation of resource constraints in terms of MUSes. If a resource constraint appears in an explanation, we can represent it as the minimal forbidden set which is being violated. For example, if a resource constraint constitutes a component of some MUS, it will be represented as some subset {A, B, C} of tasks, meaning that tasks A, B, and C cannot be scheduled at the same time because they would violate a resource constraint. Example 1. Scheduling astronauts aboard the ISS We model the problem of scheduling astronauts aboard the International Space Station (ISS) as an instance of the AR-CPSP for which the elements of M = {M 1, M 2, · · ·, M m} represent the crew members. We consider the case of m = 6 astronauts. The bounds on task execution are from minute 120 to 840; the sleeping related tasks outside of this bound are fixed so are not a part of the problem instance. The availability of the power resource, is 1000 units. The tasks are divided into different categories: -There are 6 laboratory tasks, each of duration 120 with allowable time ranges of, the entire work day. However, they have precedence constraints {(J Li, J Li+1) | 1 ≤ i < 6}, each laboratory task must be completed before the next one begins. Each laboratory task can be completed by any astronaut, so the compatibility set is all of the astronauts. Each laboratory task also has a power requirement of 400 units. -There are m weights and m treadmill tasks, one for each agent, each of duration 75. They have allowable time ranges of. Each weight and treadmill task must be completed by a unique astronaut so their compatibility sets can be specified by letting the ith task only be completed by astronaut M i. However, there is only one set of weights and treadmill equipment, so we can define reusable resources R W and R T both with availability B W, B T = 1, respectively. Each treadmill task also has a power requirement of 200 units. -There are m meal tasks. They have allowable time ranges of. Similar to the exercise tasks, each one must be completed by a unique astronaut so their compatibility sets can be specified by letting the ith meal task only be completed by astronaut M i. -Several miscellaneous tasks, deploy cubesat, collect sample, hardware gather, and eva suit test with durations 60, 60, 120, and 120 respectively, do not fall into any particular group. These tasks have an allowable time range of and can all be completed by any astronaut. They require 400, 500, 400, 400 units of power, respectively. A feasible schedule for this instance of the ARCPSP is visualized in FIG0. We modify the previous example slightly to produce an unsatisfiable problem instance. If we change the duration of each laboratory task from 120 to 121, we get an overconstrained system of constraints for which no feasible schedule exists. We'll use this running example to produce explanations in the next several sections. The proposed strategy for enumerating subsets is based on MARCO BID8 ) over other systems such as CAMUS BID7 because outputting at least some MUSes quickly is more important than explicitly generating every MUS. MARCO relies on four main functions to explore the feasibility of a power set lattice of constraints which we outline here in the language of conflicts and relaxations. -BlockUp -Called whenever a conflict is found. Marks every supersets of the current set, preventing it from being explored later on. -BlockDown -Called whenever a relaxation is found. Marks every subsets of the current set, preventing it from being explored later on. -Grow -If the current set is satisfiable, adds constraints to the current set until adding any other constraint would make it unsatisfiable. -Shrink -If the current set is unsatisfiable, removes constraints from the current set until removing any other constraint would make it satisfiable. A power set lattice of Boolean variables representing each constraint in the foreground is maintained throughout the execution of the algorithm. First, a random subset of constraints is constructed by choosing a point in the Boolean lattice. Then the SAT solver checks whether the set is SAT or UNSAT. If the ing assignment is SAT (feasible), then constraints are iteratively added to the current set until a minimal relaxation is found. If the initial set is instead DISPLAYFORM0 The power set lattice of {C 1, C 3, C 4} with C 2 and corresponding relaxation (green) and conflict (red).UNSAT (infeasible), constraints are iteratively removed until a minimal conflict is found. After a minimal conflict is found, BlockUp is called, removing any supersets of the minimal conflict from consideration in the lattice. We can do this because any superset of a conflict must be unsatisfiable because it contains the conflict. The opposite direction also applies, any subset, after a minimal relaxation has been removed, must be satisfiable so we can rule them out of consideration. Hence, after a minimal relaxation is found, we BlockDown, removing any subsets from consideration in the lattice. Then a new satisfying assignment is pulled from the remaining sections of the boolean lattice and new conflicts and relaxations are generated until the entire lattice is blocked or the algorithm times out. Consider the unsatisfiable conjunction of the following set of clauses, DISPLAYFORM0 with B = {C 2}. We'll use this example to step through an execution of the subset enumeration algorithm. A visualization of the associated Boolean lattice is shown in Figure 2. A random initial seed has us start with clause {C 1, C 3} and the SAT solver says it's UNSAT. We then Shrink and remove C 3 from the set and the SAT solver says {C 1} is still UNSAT and minimal. We then output this minimal conflict {C 1}. Because this set is now minimal, we can BlockUp, removing supersets {C 1}, {C 1, C 3}, {C 1, C 4}, {C 1, C 3, C 4} from consideration. We then choose a new seed, let's say {C 3}. The ing set is SAT so we Grow to the set {C 3, C 4} which is then SAT and maximal so we can BlockDown subsets {C 4}, {C 3}, {∅} and output {C 1}, the complement of {C 3, C 4}, as a relaxation. The lattice is then entirely blocked off so we terminate with the single conflict and relaxation. Figure 2 shows the power set lattice of the foreground along with the corresponding relaxation (green) and conflict (red). The standard for the ARCPSP involves constraints to ensure that the ing schedule is logical. This way, the foreground only involves constraints which can be altered by parameters that are controlled by the user.-New variables S 0 and S m+1 are introduced that mark the beginning and end of the schedule bounds. These variables prevents the subset enumeration from relaxing the temporal constraints of tasks outside of the feasible bounds of the schedule DISPLAYFORM0 -Each task is assigned to some existing agent. Without this constraint, the solver could assign tasks to a nonexistent agent to solve conflicts DISPLAYFORM1 -No agent has overlapping activities. Disallowing the solver from consider cases in which tasks can overlap prevents it from generating meaningless . This condition is precisely constraint.We will refer to this set of constraints throughout the following section. The method of generating minimal conflicts and relaxations can be applied to both sets of individual constraints and, by modifying the , sets of tasks. In this section, we investigate the first case, which we call constraint explanations. Following the strategy in the beginning of Section 5, we enumerate only over the constraints that are in the foreground, as specified in Section 5.1. That is, we consider constraints timeframe, compatibility, precedence, and resource referring to equations,,, and, respectively, for each task in the schedule. The rest of the constraints are implied as a part of the because they only correspond to imposing a logical structure on the solution, not constraining the parameters of the schedule. Hence, the Boolean lattice which is enumerated over contains only these four types of constraints. The outputs for constraint explanations are formatted as a tuple of the relevant tasks followed by a constraint type. For example, (LAB 0, LAB 1) precedence refers to the precedence constraint between the first and second laboratory tasks. When a constraint is only relevant to a single task, we write the task followed by the constraint type (e.g., MEAL 0 compatible refers to the agent compatibility constraint for the first meal task).The full constraint explanation for Example 2 includes 14 minimal relaxations and 3 minimal conflicts. FIG2 shows a representative part of this full constraint explanation. The omitted conflicts and relaxations are identical in structure to the ones shown in FIG2 and give practically redundant information. Computing the set of minimal forbidden sets took 2.11 seconds and calculating the full explanation took 1.57 seconds. In this example, relaxations provide the user with minimal ways in which constraints could be changed to fix the schedule. Meanwhile, conflicts give insight into why infeasibility is occurring. For example, Relex 1 indicates that removing the precedence between laboratory task 3 and 4 would make the schedule feasible. However, Confl 1 indicates that the precedence between all of the laboratory tasks does not fit in the schedule. A user could use this latter information to alter the original parameters of the schedule rather than having to void an entire task or constraint. One possible solution could be extending the length of the schedule or shortening the length of some of the laboratory tasks, an option which is not revealed by relaxations alone. This formulation of explainability in terms of conflicts and relaxations also allows a user to ask pointed questions concerning the feasibility of an instance of an ARCPSP problem. Given a feasible instance of a problem, such as Example 1, specific questions may be asked about infeasible modifications of the problem. The modification in Example 2 is gotten by extending the lengths of the laboratory tasks. Hence, the explanation in FIG2 may be interpreted as an answer to the question: "why can the laboratory tasks not have a duration longer than 120 minutes?" In the following sections we explore two variations of the subset enumeration algorithm to generate higher-level descriptions of infeasibility. This is accomplished by pushing every constraint to the and populating the foreground with a fresh set of Boolean variables. Then, a set L of constraints can be constructed that encodes a logical relationship between the new symbolic variables in the foreground and the actual constraints in the . The set L of logical relations linking symbolic variables to the constraints also becomes part of the . Then, only the set of Boolean variables remains to be enumerated over in the foreground. In practice, this can be accomplished by replacing the Boolean lattice outlined in Section 5 by the symbolic lattice composed of the new variables. This enables the generation of explanations concerning these symbolic variables, which is dependent on the relationship L.Depending on what kinds of constraints populate the foreground, the size of the Boolean lattice which needs to be enumerated over can be greatly reduced. This reduces the number of calls that need to be made to the SMT solver before arriving upon conflicts and relaxation. Additionally, these type of explanations can reduce redundancies and produce more compact descriptions of infeasibility. The following section outlines how this concept can be applied to generate minimal conflicts and relaxations of sets of tasks. Task explanations can be generated by replacing the foreground (and hence, the power set lattice) with a set of variables representing individual tasks. We introduce a Boolean variable for each task and separate the constraints of the ARCPSP into two classifications: individual and relational. Constraints FORMULA7 and FORMULA8 as well as constraints FORMULA0 and FORMULA0 are individual constraints, involving only a single task. Constraints, FORMULA10, and are relational constraints, involving multiple tasks. We then encode the constraint that the truth of each task's Boolean variable J j implies the truth of every one of its individual constraints J j =⇒ I j where I j represents a conjunction of the task's timeframe, compatibility, and feasibility Hence, individual constraints need only be satisfied if their associated task's Boolean variable is true and relational constraints need only be satisfied if all of their associated tasks' Boolean variables are true. Through this logical relationship, we can now enumerate over these Boolean variables, each of which conceptually represents a task. As the Boolean variables are toggled on and off, the associated constraint lattice becomes constrained as if the schedule had been constructed with only that subset of tasks. Executing the enumeration algorithm over this modified foreground for the same overconstrained problem (Example 2) produces a similar set of conflicts and relaxations, part of which is shown in FIG3. The full explanation includes 3 minimal relaxations and 17 minimal conflicts in total. It took 4.03 seconds to compute the minimal forbidden sets and 0.55 seconds to compute the full explanation. Here, the task and constraint explanations are quite similar, but this is not always the case. The task explanations can often be much more compact than the constraint explanations because each variable represents many constraints. For similar reasons, the number of total conflicts and relaxations is often greatly reduced. Because of this, task explanations can give more straight forward explanations for the over-constrained problem, but they lack the granularity of the constraint explanations. For example, with the constraint explanations we were able to diagnose that the precedence between the lab tasks was creating an issue rather than a resource or other constraint. The task explanations leave out this detail, sacrificing expressibility for interpretability. In order to draw explanations back to a high-level interpretation of the problem, the foreground can be replaced by a set of human-written specifications. This further reduces the size of the power set lattice that is constructed out the foreground and reduces redundancy in the generated conflicts and relaxations. Tasks are often formed in groups which share certain scheduling specifications. For example, the meal tasks in Example 1 all share the same parameters except that they are assigned to unique astronauts. When Example 1 was described, such similar tasks were naturally formulated in different categories (e.g., meal, weights, etc.). Hence, specifications for tasks may be more succinctly expressed by making use of these similarities. An informal, human written list of constraints specifying Specifications Confl 1 {Lab tasks must happen in sequence, the scheduling horizon is 6am to 6pm} Relax 1 {Lab tasks must happen in sequence} Relax 2 {The scheduling horizon is 6am to 6pm} the parameters of Example 1 could be as follows:-The scheduling horizon is 6am to 6pm.-Meal tasks must be scheduled between 1pm and 2pm.-Lab tasks must happen in sequence.-Each meal/treadmill/weights task must be assigned to a different astronaut.-Weights/treadmill tasks cannot happen 60 minutes before pre-sleep.-No more than 1000 units of power may be drawn at once.-The treadmill tasks require 200 units of power.-Tasks EVA SUIT TEST, HW GATHER, C-SAT, and SAMP require 400, 400, 500, and 400 units of power.-There is only one set of weights and treadmill equipment. Then a relevant logical relationship may be drawn back to the actual set of constraints for each such specification. For example, the precedence relations between the lab tasks could be related through:"Lab tasks must happen in sequence."(LAB 0, LAB 1) precedence (LAB 1, LAB 2) precedence (LAB 2, LAB 3) precedence (LAB 3, LAB 4) precedence (LAB 4, LAB 5) precedence (LAB 5, LAB 6) precedence Similar constraints may be encoded for the rest of the specifications, which compose the set L linking the human written specifications to the actual constraints of the problem. This construction allows the generation of specification explanations. The specification explanation for Example 1 is displayed in FIG4. Notice the greatly reduced size of the specification explanation. Unlike the constraint and task explanation, the specification explanation does not suffer from producing many redundant conflicts and relaxations. A fundamental trade-off exists between the expressibility and interpretability of different kinds of explanations. Low-level explanations involving constraints provide detailed reasons for infeasibility but may be difficult for a human user to parse or understand. In contrast, because the high-level specification explanations correlate directly with the types of constraints which a human planner may think in, they potentially provide more direct and concise information to the user. However, they lack the fine tuned granularity of information that constraint and task explanations provide. For example, if only a single precedence constraint between the laboratory tasks was causing an issue, the specification explanation would obscure which of the constraints is responsible. We introduced the agent resource-constrained project scheduling problem (ARCPSP) along with an associated difference logic encoding. We proposed a general framework for generating minimal conflicts and minimal relaxations based on the MARCO algorithm and demonstrated how it could be used to generate varying types of descriptions for why infeasibility is occurring in instances of the ARCPSP. The framework outlined in this paper is general enough to be applied to constraint satisfaction formulations for various other scheduling and planning problems. These ideas may potentially be further extended to different kinds of formal languages, such as linear temporal logic, that are used to describe planning problems. In an interactive system, such as a scheduling software, when a user attempts to make an infeasible modification, it may be useful to generate a reason for the infeasibility in real time. Similarly, a user could query whether a modification to a feasible schedule would preserve feasibility and, if not, why not? Explanations similar to the ones constructed throughout this paper may likely be used to such an effect. Investigating methods for synthesizing natural language sentences out of the explanations is also subject to future research. Following the goal of QuickXplain BID5, given a partial ordering of constraint or task importance, preferred conflicts and relaxations may be explored earlier and full explanations may list conflicts and relaxations in preferential order. Such functionality would be especially useful in cases for which generating the full explanation is intractable. A preferential ordering of explanations may be achieved by adding and removing constraints during the Grow and Shrink steps based on the constraint preference ordering. Similarly, methods for enumerating disjoint (or otherwise distinct) conflicts may also be useful for producing a representative set of conflicts as concisely as possible. Currently, the most limiting bottleneck for scaling to larger problem instances comes from the number of minimal forbidden sets which can grow exponentially with the number of tasks. Certain lazy clause generation algorithms (Laborie 2003) may be used to represent resource constraints in a more efficient manner. Such representations may also be adapted to implement consumable resources in an explainability setting.>>

For classification problems with k classes, we show that the gradient tends to live in a tiny, slowly-evolving subspace spanned by the eigenvectors corresponding to the k-largest eigenvalues of the Hessian.

We propose a hypothesis for why gradient descent generalizes based on how per-example gradients interact with each other.