{'fraction_non_alphanumeric': 0.04187074765108346, 'fraction_numerical': 0.01623754073678794, 'mean_word_length': 4.412832680008252, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 7, 'https://': 7, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Rethinking Neural Operations for Diverse Tasks

An important goal of AutoML is to automate-away the design of neural networks on new tasks in under-explored domains. Motivated by this goal, we study the problem of enabling users to discover the right neural operations given data from their specific domain. We introduce a search space of operations called XD-Operations that mimic the inductive bias of standard multi-channel convolutions while being much more expressive: we prove that it includes many named operations across multiple application areas. Starting with any standard backbone such as ResNet, we show how to transform it into a search space over XD-operations and how to traverse the space using a simple weight-sharing scheme. On a diverse set of tasks -- solving PDEs, distance prediction for protein folding, and music modeling -- our approach consistently yields models with lower error than baseline networks and often even lower error than expert-designed domain-specific approaches.


Introduction
Automated machine learning (AutoML) and neural architecture search (NAS) are often motivated by a vision of democratizing ML by reducing the need for expert design on a variety of tasks. While NAS has grown rapidly with developments such as weight-sharing [36] and "NAS-benches" [47,49], most efforts focus on search spaces that glue together established primitives for well-studied tasks like vision and text [32,24,45,26] or on issues such as latency [8,13]. In this work, we revisit the broader vision of NAS and propose to move towards much more general search spaces while still exploiting successful network topologies. To do so we focus on expanding the set of operations, which is usually fairly small; for example, that of the well-studied DARTS space has eight elements: a few types of convolution and pooling layers [32]. The baseline approach for expanding this set-adding operations one-by-one-scales poorly and will not result in new operations when faced with new types of data.
Our core contribution is a re-imagining of NAS operation spaces that drastically expands this set in a principled fashion to include both standard operations as well as a wide range of new ones. To do so we exploit the fact that most standard operations used in modern NAS return linear transforms diagonalized by the discrete Fourier transform (DFT). Replacing the DFT matrices in the diagonal decomposition by a more expressive family of efficient linear transforms known as Kaleidoscope or K-matrices [10] yields the set of Expressive Diagonalization (XD) Operations, which comprise a large search space containing various types of grid-based convolutions and pooling, permutations, transposed convolutions, certain kinds of graph convolutions, the Fourier Neural Operator (FNO) [30], and infinitely many more. This broad expressivity reflects the key insight of our work: that many of the most important neural operations in ML consist of multiple channels that apply weights w to inputs x by computing K diag(Lw)Mx (1) where the matrices K, L, and M are efficient (to represent and apply) and shared across channels.
We leverage XD-operations to take critical steps towards a broader NAS that enables the discovery of good design patterns with limited human specification from data in under-explored domains. To do so we develop a simple procedure which transforms any backbone convolutional neural network (CNN) into an architecture search space by replacing its operations with XD-operations. This space is then searched using a simple weight-sharing algorithm that needs only a small amount of tuning to find effective operations. As a simple first demonstration, we show that XD-operations yield models that are 15% more accurate than standard discrete search spaces on permuted CIFAR-10, highlighting the fragility of standard NAS operation spaces on new datasets, and thus the need for XD-operations.
As our main evaluation, we demonstrate the effectiveness of XD-operations in a series of applications showing that, starting from vanilla CNNs, they consistently outperform custom-designed operations.
• Learning to solve partial differential equations (PDEs): when substituted into a simple CNN backbone, XD-operations outperform convolutions and the dense prediction NAS method Auto-DeepLab [31], and even achieve lower error than custom-designed, state-of-the-art operations (FNOs [30]) across three problems with different dimensionalities (Burgers' equation, Darcy Flow, and Navier-Stokes). Our method also maintains consistent performance across different resolutions, a major stated advantage of FNOs over previous methods. • Protein folding: on the task of predicting residue distances in a polypeptide chain-a key component of the protein folding problem-we substitute XD-operations into vanilla ResNets and achieve lower error than cyclically-dilated ResNets adapted specifically for this setting [1]. Furthermore, our ResNet-34 XD outperforms the reported error of the much deeper Dilated ResNet-258. • Music modeling: on two next-note prediction tasks, we show that substituting XD-operations into an undilated CNN outperforms temporal convolutional networks (TCNs)-exponentially-dilated 1d CNNs that themselves outperform standard convolutional and recurrent networks [5].

Related Work
AutoML is a well-studied area, with most work focusing on fairly small hyperparameter spaces [7,25] or on NAS [12]. Most NAS operation spaces only contain a few operations such as convolutions [32,33,49,11], which may not be useful for domains where CNNs are ineffective. Applications of NAS outside vision largely follow the same pattern of combining human-designed operations [35,43]. On the other extreme, AutoML-Zero [37] demonstrates the possibility of evolving all aspects of ML from scratch. We seek to establish a middle ground with large and domain-agnostic search spaces that still allow the use of well-tested methods, e.g. stochastic gradient descent (SGD).
Several papers have generalized the DFT to replace layers in deep nets [9,3,2,10] in order to speed up or add structure to models while reducing expressivity. In contrast, we can replace convolutions and other layers while increasing expressivity by extending their diagonalization via K-matrices. As discussed in Section 2, using K-matrices for this directly is inefficient for input dimension > 1.

The Expressive Diagonalization Relaxation
In this section we overview our main contribution: a large, general search space of neural operations. Formally, we view an architecture as a parameterizable object-a mapping from model weights to functions-described by a labeled directed acyclic graph (DAG) G(V, E). Each edge in E has the form (u, v, Op), where u, v ∈ V are nodes and Op is an operation that can be parameterized to define some transformation of the representation at node u; node v aggregates the outputs of its incoming edges into a new representation. For example, the popular ResNet architecture [15] has many nodes with two incoming edges, one labeled by the convolution operation Conv and one by the identity (skip-connect) Id, whose outputs it sums and passes to outgoing edges with the same labels. Each architecture has a source node taking in input data and an output node returning a prediction.
Neural architecture search is the problem of automatically selecting an operation for each edge of G to optimize an objective. 1 For each edge e ∈ E a NAS algorithm must pick one element of a search space S = {Op a |a ∈ A} of operations specified by architecture parameters a ∈ A to assign to e; in past work, A usually indexes a small set of operations. As an example, we will refer to a variant 2 S discrete of the DARTS search space with parameters A discrete = {1, . . . , 8} where each operation is one of Zero, Id, MaxPool 3×3 , AvgPool 3×3 , Conv 3×3 or 5×5 , or DilatedConv 3×3,2 or 5×5,2 [32].
Our main contribution is a novel family of operations that comprise a search space containing almost all these operations, in addition to many others that have been found useful on different types of data. The starting point of our construction of these XD-operations is the simple observation that all the operations Op ∈ S discrete listed above except MaxPool 3×3 are linear, i.e. for any model weights w there exists a matrix A w such that for all inputs x we have Op(w)(x) = A w x. More specifically, all seven of them return convolutions: to see this note that Zero, Id, and AvgPool 3×3 each apply a convolution with filter 0 1×1 , 1 1×1 , and 1 3×3 /9, respectively. This means that most of the operations in the DARTS search space-which is representative of NAS operation spaces in computer vision-share the convolution's diagonalization by the discrete Fourier transform (DFT). Formally, if A w ∈ R n 2 ×n 2 is the matrix representing a 2d convolution with filter w ∈ R k of kernel size k ∈ [n] 2 , then for any 2d input x ∈ R n 2 we have Here [n] = {1, . . . , n}, diag(z) denotes the diagonal matrix with entries z, w ∈ R n 2 is an appropriate zero-padding of w ∈ R k , and F ∈ C n 2 ×n 2 is the 2d DFT (a Kronecker product of two 1d DFTs).
This diagonalization explicates both the computational and representational efficiency of the DARTS operations, as the DFT and its inverse can be applied in time O(n log n) and stored with O(n log n) bits. It also suggests a natural way to dramatically expand the operation space while preserving these efficiencies: just replace matrices F and F −1 in (2) by any one of a general family of efficient matrices. Doing so yields the single-channel version of our expressive diagonalization (XD) operations: Here architecture parameter α = (K, L, M) sets the matrices replacing F and F −1 in Equation 2.
The main remaining question is the family of efficient matrices to use, i.e. the domain of the architecture parameters K, L, and M. For this we turn to the Kaleidoscope matrices, or K-matrices [10], which generalize F and F −1 to include all computationally efficient linear transforms with short description length, including important examples such as sparse matrices and permutations. To obtain this general family, K-matrices allow the DFT's butterfly factors-matrices whose products yield its efficient implementation-to take on different values. While a detailed construction of K-matrices can be found in the original paper, we need only the following useful properties: they are as (asymptotically) efficient to apply as DFTs, are differentiable and can thus be updated using gradient-based methods, and can be composed (made "deeper") to make more expressive K-matrices.
Specifying that K, L, and M in Equation 3 are K-matrices largely completes our core contribution: a new search space S XD of XD-operations with K-matrix architecture parameters. We give a full multi-channel formalization in N dimensions, as well as an overview of its expressivity, in Section 3. First, we note some key aspects of this new search space: • Complexity: XD 1 α (w) requires three K-matrices and O(1) filter weights to represent, i.e. description length O(n log n); this is larger than a regular convolution (which has no architecture parameters) but is not quadratic in the input size like a linear layer. Applying XD 1 α requires multiplication by three K-matrices, yielding a theoretical per-channel time complexity of O(n log n), matching the efficiency of convolutions. However, as XD-operations strictly generalize convolutions they are more expensive to apply in-practice; we detail these costs both in the application sections and as appendix table, and we view improving upon them as an important future direction.
• Initialization: a crucial advantage of XD-operations is that we can initialize or warm-start search using operations with known constructions. In particular, since we can recover convolutions (2) by setting architecture parameters K = F −1 , L = F, and M = F in Equation 3, we can always start search with any CNN backbone. We use this extensively in experiments. • K-matrices: as they contain all efficient linear transforms, K-matrices can represent all functions returned by XD-operations, including convolutions. However, for input dimension and filter size > 1 the only known way is to apply K-matrices directly to flattened inputs x ∈ R n N , yielding much worse description length O(n N log n). In contrast, as detailed in Section 3, our diagonalization approach uses Kronecker products to apply DFTs to each dimension separately, yielding description length O(n log n). It is thus the first (and in some sense, "right") method to use such matrices to replace convolutions. Furthermore, diagonalization allows us to separate model weights w from architecture parameters α, letting the former vary across channels while fixing the latter.
Finally, we address the fact that the architecture parameters of S XD are continuous, not discrete, contrasting with much of the NAS literature. This can be viewed as a natural extension of the weight-sharing paradigm [36], in which continuous relaxation enables updating architecture parameters with gradient methods. For example, many algorithms traverse the relaxed DARTS

defined via DARTS operations
Op i ∈ S discrete and architecture parameters λ i in the 8-simplex; most search spaces then require discretizing after search via a rounding procedure that maps from the simplex to A discrete . Note that the fully continuous nature of XD-operations means that we will only evaluate the final network returned by search. In particular, while some weight-sharing papers also report the correlation between true architecture performance and that indicated by the shared weights [46], there is no obvious way to define a ranking or sampling distribution over XD-operations in order to do so. This also means that our final architecture will not be more efficient than the supernet, unlike other weight-sharing methods that do discretize.

XD-Operations and Their Expressivity
Here we formalize XD-operations and show what operations they include. We first define operations: Definition 3.1. A parameterizable operation is a mapping Op : W → F from parameter space W to a space F = {Op(w) : X → Y|w ∈ W} of parameterized functions from input space X to output space Y. A search space is a set of operations with the same W, X , and Y.
For example, if X = Y = R n and W = R n×n then each W ∈ W defines a parameterized linear layer that for each x ∈ X returns Lin(W)(x) = Wx. Here Lin is the parameterizable operation and for each W the linear map Lin(W) is the parameterized function.
From Definition 3.1, we say a search space can express a specific operation if it contains it. Crucially, the ability of a parameterizable operation Op 1 to express a parameterized function Op 2 (w) output from another operation Op 2 given the right set of weights w does not imply that a search space containing Op 1 can express Op 2 . For example, Lin(I n ) = Id(W) ∀ W ∈ R n×n but Lin(W) = Id(W) ∀ W = I n , so a search space containing the linear operation Lin cannot express the skip-connection Id, despite the fact that Lin can be parameterized to compute the identity.
Formalizing Multi-Channel XD-Operations Recall the single-channel XD-operation XD 1 α in Equation 3 specified by three-matrix architecture parameter α = (K, L, M). For input dimension N ≥ 1, every matrix B ∈ α is a Kronecker product of N K-matrices of depth d ∈ Z 3 + , i.e. B = N i=1 B i for K-matrices B i ∈ C n×n of depth d [1] , d [2] , or d [3] for B = K, L, or M, respectively. 3 Roughly speaking, XD 1 α can return any linear operation that is diagonalized by Kmatrices and is thus efficient to compute and represent, e.g. any convolution (recall we recover the diagonalization of Conv(w) in Equation 2 by setting K, L, and M appropriately in Equation 3). However, XD 1 α cannot represent efficient parameter-free operations such as skip-connections and average-pooling, both common in NAS. In particular, the only way to always ignore the model weights w is to set one of the K-matrices to zero, producing the zero-operation. We avoid this by adding a bias b ∈ C n N as an architecture parameter, yielding the biased single-channel XD-operation: 4 This lets us define skip-connections (set K = M = I n N , L = 0 n N ×n N , and b = 1 n N ) and average-pooling (set K = F −1 , L = 0 n N ×n N , M = F, and b to be F multiplied by a pooling filter).
Lastly, we use XD 1 α,b to construct multi-channel "layers" that pass multiple input features through multiple channels and re-combine them as multiple output features. This follows the primary way of using convolutions in deep nets. The key insight here is that we will share the same parameterizable operation (specified by α and b) across all channels, just as in convolutional layers.
Definition 3.2. Let a = (α, b, C) be an architecture parameter containing a triple α = (K, L, M) of Kronecker products of N K-matrices with depths d ∈ Z 3 + , a bias b ∈ C n N , and channel gates C ∈ C c×c . 5 Using " " to denote concatenation, the XD-operation XD a of depth d specified by a is a parameterizable operation on parameter space W = R c×c×k consisting of c 2 filters of size k ∈ [n] N that outputs parameterized functions on X = R c×m N for m ≤ n mapping every x ∈ X to The last architecture parameter C allows interpolation between all-to-all layers (C = 1 c×c ), e.g. multi-channel convolutions, and layers where each channel is connected to one other channel (C = I c ), e.g. skip-connections and average-pooling. We note that we use S XD to describe the set of operations covered by Definition 3.2 and conclude our construction by discussing two properties: • Kernel size: the weight-space available to an XD-operation is R c×c×n N ; however, since we will initialize search with existing CNNs, we will zero-pad to have the same weight-space R c×c×k N as the convolutions with filter size k ≤ n that they replace. This preserves the weight count but also means that if the backbone has 3 × 3 filters our search space will not contain 5 × 5 convolutions. Experimentally, we find that relaxing the constraint to allow this does not significantly affect results on image tasks, so we do not do so in subsequent applications to avoid increasing the weight count. • Depth: an XD-operation's depth is a triple describing the depths of its K-matrices K, L, and M.
Increasing it trades off efficiency for expressivity; for example, in the next section we describe operations that we can show are contained in S XD if L or M have depth > 1. By default we will set the depth to be the minimum needed to initialize search with the backbone operation.
Expressivity of XD-Operations For many papers that replace deep net layers with efficient linear transforms [34,10], the question of expressivity comes down to the transform capacity. For example, layers with a K-matrix in every channel can represent a different transform in each, thus allowing the output to be any combination of efficient linear operations. Our case is less straightforward since we care about expressivity of the search space, not of parameterized functions, and our approach is less-expressive by design as all channels share K-matrices K, L, and M. The latter can be thought of as a useful inductive bias on NAS: the set of XD-operations is still much broader than the set of convolutions, but the way in which model weights are applied is the same across all channels.
Expressivity results are a way to see if this bias is useful or constraining. Here we summarize some important operations that are 1d XD-operations; proofs can be found in the appendix and are straightforward to extend to multi-dimensional inputs. Formally, there exists d ∈ Z 3 + such that the set of XD-operations of depth d over weights W = R c×c×k and inputs X = R m for m ≤ n contains 1. convolutions with filter size ≤ k, dilation ≤ n−1 k−1 , stride ≤ n − 1, and arbitrary channel groups. 2. parameter-free operations Id, Zero, and AvgPool s for any kernel size s ≤ n. 3. composing 1 or 2 with multiplication of all input or output channels by a bounded-depth K-matrix.
Note this does not account for all important XD-operations, e.g. we show in the appendix that they also express Fourier Neural Operators [30] with ≤ k/2 modes and any transposed convolutions whose stride equals the dilated kernel size. 6 Still, the first two items account for non-separable variants of most operations considered in past NAS work in computer vision, excluding the nonlinear MaxPool [47,11]. Note depthwise-separable convolutions are contained in the set of compositions of XD-operations. The third item implies that XD-operations can express the basic and diffusion graph convolutions over fixed graphs [21,27]: both are point-wise convolutions composed with sparse multiplication by a modified adjacency matrix, which K-matrices can represent efficiently.
As a concrete example, consider dilated convolutions, which for k > 1 and dilation factor d ≥ 1 apply filters of effective size (k − 1)d + 1 with nonzero entries separated by d − 1 zeros. One could hope to express the application of DilatedConv k,d to an input x ∈ R n in the single-channel setting as , 1} n zeroes out appropriate entries of w, but this requires filter size (k − 1)d + 1 > k, increasing the number of weights. Instead, we can use a permutation P k,d ∈ {0, 1} n×n before the DFT to place the k entries of w into dilated positions: As permutations are depth-2 K-matrices [10], we can express DilatedConv k,d with an XDoperation of depth (1, 3, 1), with K = F −1 , L = FP k,d , and M = F.

Finding and Evaluating XD-Operations
This section outlines a simple procedure that we use to evaluate XD-operations. Recall that NAS methods specify architectures by assigning operations to each edge (u, v, Op) of a computational graph. We aim to simultaneously find good operations and model weights, a goal distinct from the classic two-stage NAS formulation, which finds assignments in an initial search phase before training the resulting architecture from scratch [47]. However, the use of weight-sharing [36] extends NAS to one-shot objectives where weights and architectures are jointly optimized. Under weight-sharing, architecture parameters become weights in a larger "supernet," extending the hypothesis class [26].
To assess XD-operations directly we assume the user provides a starter network with existing edge labels Op u,v as a backbone. We transform this into a weight-sharing supernet by reparameterizing each operation Op u,v as an XD-operation XD au,v with architecture parameter a u,v . Then we simultaneously train both a u,v and the model weights w u,v associated with each edge as follows: • Architecture parameters a u,v are initialized using the original operation used by the CNN backbone by setting Op u,v = XD au,v ; a u,v is then updated via SGD or Adam [20]. We tune step-size, momentum, and the number of "warmup" epochs: initial epochs during which only model weights w u,v are updated. This can be viewed as a specialized step-size schedule. • Model weights w u,v are initialized and updated using the routine provided with the backbone. Table 1: Search space comparison on CIFAR-10. Validation accuracies are averages of three trials. While we use small CNNs for exploration, XD-operations can also be used with high-performance backbones to obtain > 95% accuracy (c.f. the appendix).

Backbone
Permuted Cost search space CIFAR-10 CIFAR-10 * (hours † )  This approach allows us to use established topologies and optimizers while searching for new operations, thus aligning with the goal for Sections 5, 6, and 7: to improve upon the CNN backbones that practitioners often use as a first attempt. As a simple example, we start by applying the procedure to image classification. Since this is not the main objective of our work, we treat it as a warmup and consider two datasets: CIFAR-10 and a variant where the images' rows and columns are permuted. On CIFAR-10 we do not expect to see much improvement from XD-operations over the CNN backbone used to initialize search, as convolutions are already the "right" operation for images. On the other hand, the "right" operation on permuted data, at least in layer one, is an inverse permutation followed by convolution; as this is an XD-operation 7 , here we do hope to see improvement.
Using LeNet [23] and ResNet-20 [15] as backbones, we compare applying our algorithm to XDoperations with two baselines: (1) using just the backbone CNN and (2) applying a similar method to the relaxed setS discrete of DARTS operations from Section 2. To optimize overS discrete we take an approach similar to DARTS: parameterize the simplex using a softmax and apply Adam. We experiment with both a uniform initialization and one biased towards the backbone's operation. While both S XD and S discrete contain LeNet's Conv 5×5 and ResNet's Conv 3×3 and Id, for LeNet's MaxPool 3×3 layer we initialize with the closest operation. For direct comparison, both search spaces employ weights with maximum filter size 5 × 5 and for both we evaluate the shared weights rather than retraining, which we find hurtsS discrete . We set the XD-operations' depth to d = 3 3 to express the dilated convolutions in S discrete and convolutions composed with permutations.
In Table 1, we see that while both the relaxed discrete NAS operations and XD-operations perform comparably on regular images, XD-operations achieve around 15% better accuracy with both backbones when the images are permuted. 8 Note that even networks obtained by running state-of-the-art NAS procedures such as GAEA PC-DARTS [26] and DenseNAS [13] on permuted CIFAR-10 achieve only 66.3% and 61.6% accuracy, respectively, despite using millions more parameters than ResNet-20.
While it is not straightforward to understand the recovered XD-operations that perform so well, we can use the relative Euclidean distance of their architecture parameters from initialization as a proxy for novelty; in Figure 2 we see that on regular images our procedure finds operations that are quite similar to convolutions, but on permuted data they are much further away. These results show that to enable NAS on diverse data, we will need a search space that contains truly novel operations, not just combinations of existing ones. In the remainder of the paper, we study more diverse and realistic tasks that show further evidence that S XD is a strong candidate for this. 7 Recall S XD includes compositions of convolutions with multiplication by a K-matrix, e.g. a permutation. 8 Full accuracy can be recovered via an auxiliary loss encouraging permutation-like K-matrices [10].

Application: Learning to Solve Partial Differential Equations
As our first non-vision application, we consider the task of solving PDEs, an important application area of ML in the natural sciences [28,29,41]. In our setup, data generated by classical PDE solvers is used to learn functions from some initial condition or setting to the corresponding PDE solution, with the goal of replacing the solver by a deep net forward pass; the latter can be orders of magnitude faster. A recent state-of-the-art approach for this introduces Fourier Neural Operators [30], operations that significantly improve upon previous neural approaches across three different PDE settings. To evaluate the ability of XD-operations to compete with such custom-designed operations starting from simple CNN backbones, we will investigate the same three PDEs that they study: Burgers' equation, Darcy Flow, and the 2d Navier-Stokes equations, which involve 1d, 2d, and 3d data, respectively. The first two are studied across multiple resolutions, while the last one is studied at different viscosities.
As before, we start with a simple CNN backbone-the type a scientist might use in a first attempt at a solution-and replace all convolutions by XD-operations. We initially hope to do better than this backbone, but ambitiously also hope to compete with the custom-designed FNO. The specific CNN we use is simply the FNO architecture of the appropriate dimension N but with all N -dimensional FNOs replaced by N -dimensional convolutions; this performs similarly to their CNN baselines [30]. In all cases we compare mainly to the CNN backbone and our reproduction of the FNO results, as the latter exceeds all other neural methods; a complete results table is provided in the appendix. Our reproduction of FNO is slightly worse than their reported numbers for Burgers' equation and slightly better in the other two settings. Note that on the Navier-Stokes equations we only compare to the 3d FNO on the two settings in which we were able to reproduce their approach; moreover, we do not compare to their use of a 2d FNO plus a recurrent net in time, but in-principle XD-operations can also be substituted there. In the 2d Darcy Flow case we also include comparisons to DARTS operations in the simple CNN backbone, as in Section 4, and to Auto-DeepLab (AutoDL) [31], a well-known NAS method for dense prediction. For evaluating XD-operations we again follow the procedure in Section 4, in which we tune only the architecture optimizer; notably, we do this only at the lowest resolutions. At all dimensions we use XD-operations of depth d = 1 3 ; in addition, in dimensions N > 1 we fix the architecture biases b and channel gates C to 0 and 1, respectively, to conserve memory at higher resolutions. At lower ones we find that the performance difference is negligible.
We report our results for the Burger's equation and Darcy Flow in Figure 3; for 2d Navier-Stokes the results are in Table 2. In all cases we dramatically outperform the CNN backbone used to initialize XD-operations; furthermore, we also achieve better error than FNO, despite it being custom-made for this problem. In particular, we find that XD-operations have higher training error but generalize better (c.f. the appendix). Figure 3 also shows that XD-operations perform consistently well across resolutions, a major advantage of FNOs over previous methods, whose performance was tightly coupled to the discretization [30]. Notably, CNN performance worsens with higher resolution, unlike that of XD and FNO. Finally, we also substantially outperform DARTS operations and AutoDL in 2d, although the latter is at least consistent across resolutions. These results provide strong evidence that XD-operations are a useful search space for discovering neural operations, even in domains where the convolutions used to initialize them perform much worse than state-of-the-art. Note that these results do come at a cost of slower training and inference: XD-operations are roughly an order of magnitude slower than FNOs, despite having fewer parameters in 2d and 3d. This still yields solvers one-to-two orders of magnitude faster than classical solvers, maintaining usefulness for the problem.

Application: Real-Valued Distance Prediction for Protein Folding
As a second scientific application, we consider the task of inferring the 3d "folded" structure of a polypeptide chain, which yields important insights into the function of the resulting protein [18]. This problem is a high-priority challenge in biology and has recently seen significant ML-driven advances from deep learning methods such as AlphaFold [40,19] and PDNET [1]. These typically involve training a network to predict pairwise physical distances between residues in the chain. We work with the PDNET benchmark, which consists of a training set of 3,356 proteins, a validation set of 100 of proteins, and the PSICOV [18] test set of 150 proteins. PDNET is designed to be more accessible than datasets used by large-scale methods such as AlphaFold, which are not always publicly available and/or require massive compute [40,19]. We follow the PDNET training procedure [1] and evaluate test set performance using their MAE 8 metric for assessing long-range distances.
As before we start with simple CNN backbones-in this case ResNets. We choose this to compare most directly to the custom-designed architecture used by PDNET, consisting of a Dilated ResNet characterized by its use of a cyclically increasing dilation rate across ResNet blocks [1]. At a sufficient depth, the Dilated ResNet is shown to outperform a standard pre-activation ResNet adapted to this task [1]. Our goal will be to see whether we can start with the vanilla ResNet and use XD to outperform both it and the specialized Dilated ResNet. We also aim to outperform the DARTS operations baseline from the previous two sections as well as the AutoDL NAS approach for dense prediction. We use XD-operations of depth d = 1 3 and fix the architecture biases and channel gates as before to conserve memory. We evaluate architectures of different depths-4, 6, 10, 18, and 34-by varying the number of ResNet blocks used in the backbone architecture and baseline.
We report the results as averages across three trials for each depth in Figure 4. Notably, while Dilated ResNet slightly outperforms ResNet, ResNet XD outperforms both dilated and standard ResNets at all depths. This provides further evidence that XD-operations can outperform specialized operations for diverse domains, even when initialized naively as standard convolutions. XD also outperforms AutoDL, which does poorly, and DARTS operations, except at the two smaller depths where performance is similar. Moreover, our ResNet-34 XD's MAE 8 of 4.0 also improves upon PDNET's reported MAE 8 of 4.1 attained by the much deeper Dilated ResNet-258 [1]; however, in our reproduction Dilated ResNet-258 achieved an MAE 8 of 3.5. Given the trend in Figure 4, where XD-operations consistently improve the backbone architecture of the same depth, we conjecture that ResNet-258 XD could further improve upon this result. We leave scaling XD-operations to such deeper networks to future work.

Application: Music Modeling
Our final application is to music modeling, i.e. learning to predict the next note from sheet music [4].
The dominant approaches for such tasks are recurrent nets [16] and Transformers [42], but recent work has shown that specially-designed convolutional models can also be made competitive at similar model sizes [5,6]. We will consider the temporal convolutional network (TCN) [5], which improves upon a regular CNN by having the dilation factor grow exponentially across layers. The tasks we study are on the JSB Chorales and Nottingham corpora, used in the original evaluation of TCNs [5].
As the baseline we take the TCN and set all dilation factors to one (undilated); our goal will be to start with this undilated network and match or outperform the custom dilation design of the TCN.
The results presented in Table 3 show that we achieve this goal, as we outperform both the undilated baseline and the TCN on both tasks. While the simple undilated backbone that we initialize with turns out to already match the TCN on JSB Chorales, on Nottingham our approach demonstrates that XD-operations can be used to outperform hand-designed architectures starting from vanilla CNNs. 9 Where possible we also compare to other known results; XD-operations outperforms all of these except the R-Transformer [44], a model combining recurrent nets and self-attention, on Nottingham.
Together with our results on PDEs and proteins, our study of music modeling provides further evidence that XD-operations can effectively find good operations using standard backbones on diverse tasks. One notable difficulty here is causality enforcement: making sure the input data does not contain the target when predicting the next entry. While TCNs can efficiently do so via temporal shifts, we do it in a brute-force manner by treating sequences of length n as n − 1 data-points with masked targets. This is expensive and thus limits our evaluation to small music tasks. A fruitful direction for future work is thus to examine whether it is possibly to directly enforce causality in XDoperations, e.g. by forcing architecture parameters K and M to be lower triangular; since a product of lower triangular matrices is again lower triangular, the entire operation is then a multiplication of the input sequence by a lower triangular matrix, which suffices to prevent causality violations.

Conclusion
This work aims to transition NAS from combining existing operations designed for vision and text to finding novel and effective operations in many domains. To do so we introduced a new search space of XD-operations and demonstrated its effectiveness on diverse tasks. Combining XD-operations with standard topology-search NAS, warm-starting search from non-standard operations such as graph convolutions and FNOs, 10 improving the computational limitations described earlier, and constructing spaces containing missing operations such as BatchNorm [17] and self-attention [42] are all promising future directions. Finally, note that our goal-lowering the barrier for applying ML-necessarily comes with the possibility of misuse. Mitigating this involves developing tools for application-specific concerns, e.g. privacy and fairness, that go beyond the error metrics we target.

A Expressivity Results
Here we collect results on the expressivity of the set of XD-operations. For simplicity, our results will be in the following single-dimensional (N = 1) setting: Setting A.1. We consider input spaces of form X = R c×m for input size m ∈ N and channel count c ∈ N and parameter spaces W = R c×c×k for filter size k ∈ [n], where output size n ≥ m is a power of 2.
It is straightforward to extend the results to multiple dimensions using Kronecker products and to input sizes other than powers of two using padding. Note that all of our results will also assume a circular padded domain.

A.1 Convolutions
, stride s ∈ [n−1], and channel groups described by a matrix B ∈ {0, 1} n×n s.t. B [i,j] = 1 if channels i and j are in the same group and 0 otherwise is a parameterizable operation that for any weight w ∈ W outputs a function mapping every x ∈ X to where F n ∈ C n×n is the n × n DFT and a d : R n → R n is an atrous permutation of a vector that is equivalent to multiplication by some permutation matrix P d ∈ {0, 1} n×n . We will use Conv k to denote the case of d = 1, s = 1, and B = 1 c×c . Claim A.1. All multi-channel convolutions of the form given in Definition A.1 are contained in the search space of XD-operations of depth (1, 3, 1).
Proof. Setting the architecture parameters to be K = diag(a s (1 n s ))F −1 n , L = F n P d , M = F n , b = 0 n , and C = B, and noting that (a) the DFT and its inverse are both depth 1 K-matrices, (b) multiplying a K-matrix by a diagonal matrix is another K-matrix of the same depth, and (c) permutation matrices are K-matrices of depth 2 yields the result. These three facts can be found in the original paper [10].
Remark A.1. Note that for the case of dilation d = 1 the result in Claim A.1 holds with depth 1 3 .

A.2 Parameter-Free Operations
Definition A.2. The skip-connection in Setting A.1 is parameterizable operation that outputs a function mapping every x ∈ X to itself. The zero-operation in Setting A.1 is parameterizable operation that outputs a function mapping every x ∈ X to 0 c×n . Claim A.2. The skip-connection and zero-operation are both contained in the search space of XD-operations of depth 1 3 .
Proof. For both set the architecture parameters to be K = F −1 n , L = 0 n×n , M = F n , and C = I c . To obtain the skip-connection set b = 1 n ; to obtain the zero-operation set b = 0 n . Definition A.3. An average pooling operation in Setting A.1 with filter size k, dilation d ∈ [ n−1 k−1 ], and stride s ∈ [n − 1] is parameterizable operation outputs a function mapping every x ∈ X to the output of a convolution (as in Definition A.1) with the same filter size, dilation, and stride, channel groups described by B = I c , and filters w [j,j] = 1 k /k ∀ j ∈ [c]. Proof. Setting the architecture parameters to be K = diag(a s (1 n s ))F −1 n , L = 0 n×n , M = F n , b = a d (1 k /k), and C = I c and noting that (a) the DFT and its inverse are both depth 1 K-matrices and (b) multiplying a K-matrix by a diagonal matrix of the same depth is another K-matrix of the same depth yields the result.

A.3 Compositions with Multiplication by a Fixed K-Matrix
Definition A.4. A fixed linear operation Lin A in Setting A.1 with fixed matrix A ∈ R n×n is a parameterizable operation that outputs a function mapping every x ∈ X to Lin A (w)(x) = Ax [1] · · · Ax [c] T . For example, Lin Ic = Id.
Definition A.5. Let Op 1 and Op 2 be two parameterizable operations in Setting A.1 with X . Then for any weight w ∈ W their composition Op 1 • Op 2 outputs the parameterized function Op 1 (w) • Op 2 (w).
Claim A.4. Let Op be a parameterizable operation in Setting A.1 that is contained in the set of XD-operations of some depth d ∈ N 3 and let A be a K-matrix of depth d . Then Op • Lin A is contained in the set of XD-operations of depth (d [1] , d [2] , d [3] + d ) and Lin A • Op is contained in the set of XD-operations of depth (d [1] + d , d [2] , d [3] ).
Proof. Let K and M be the first and last K-matrices of the representation of Op as an XD-operation, which thus have depth at most d [1] and d [3] , respectively. Then the representation of Op • Lin A as an XD-operation is the same except with depth d [3] + d K-matrix MA as the last K-matrix, and similarly the representation of Lin A • Op as an XD-operation is the same except with depth d [1] + d K-matrix AK as the first K-matrix.

A.4 Other Named Operations
Definition A.6. Suppose we have a fixed n-node graph with adjacency matrix A and degree matrix D, and letÂ andD be the adjacency and degree matrices, respectively, of the same graph but with added self-loops. Then regular graph convolution [21] in Setting A.1 with k = 1 is a parameterizable operation that for any weight W ∈ W outputs a function mapping every x ∈ X toD − 1 2ÂD − 1 2 x T w and the diffusion graph convolution [27] in Setting A.1 with k = 1 is a parameterizable operation that for any weight W ∈ W outputs a function mapping every x ∈ X to D −1 Ax T w.
Claim A.5. Suppose A andÂ can be represented by K-matrices of depth d andd, respectively. Then the corresponding graph convolution is contained in the search space of XD-operations of depth (1, 1,d + 1) and the corresponding diffusion graph convolution in that of depth (1, 1, d + 1).

Proof. For any
The result follows by Claims A.1 and A.4, the fact that a K-matrix multiplied by a diagonal matrix is another K-matrix of the same depth, and by substituting G = D − 1 2ÂD − 1 2 (for graph convolution) or G = D −1 A (for diffusion graph convolution).
Remark A.2. Note that the above claim is meaningful because adjacency matrices of realistic graphs are usually sparse and sparse matrices can be efficiently represented as K-matrices [10].
Definition A.7. A Fourier neural operator (FNO) [30] in Setting A.1 with even k and thus k/2 modes is a parameterizable operation that for any weight w ∈ W outputs a function mapping every x ∈ X to . . .
Claim A.6. The FNO with k/2 modes is contained in the search space of XD-operations of depth (1, 4, 1).
Remark A.3. If we allow the parameter space in Setting A.1 to be complex then the FNO with all k modes will be contained in the search space of XD-operations of depth 1 3 . Definition A.8. Each channel of transposed convolution with stride d(k − 1) + 1, where k is the kernel size and d is the dilation rate, computes a feature map in which each input element is replaced by that element multiplied by the dilated filter of size d(k − 1) + 1. The multi-channel extension of this over parameter space W = R c×c×k is similar to that for standard convolutions. Claim A.7. All transposed convolutions with stride equal to the dilated kernel size are contained in the search space of XD-operations of depth (1, 3, 3).

Proof.
A transposed convolution is equivalent to a regular convolution with the same filter applied to the input after it has been zero-padded and then permuted to separate all entries by d(k − 1) zeros.
Since permutations are K-matrices of depth 2 the result follows by Claims A.1 and Claim A.4.
Definition A.9. A depthwise-separable convolution in Setting A.1 with filter size k but with parameter space W = R c×k × R c×c is a parameterizable operation that for any weight w ∈ W outputs Conv 1 (w [2] ) • Conv k,Ic (w [1] ), where Conv k,Ic denotes the convolution in Definition A.1 with B = I c .
Remark A.4. Since both Conv 1 and Conv k,Ic are XD-operations, by definition depthwiseseparable convolutions are contained in the search space of composed XD-operations, which by Claim A.2 also contains all of the above operations. In this section we report a detailed comparison of computational costs of the XD-operation compared to a convolution; this is presented in Table 4. Due to their familiarity, we present results for tasks that have 2d inputs and thus use 2d convolutions in their default backbone. Note that since XD-operations are more general than convolutions, they must by definition be at least as expensive as convolutions in both computation and memory. While in this paper our focus is on absolute performance using learning metrics (e.g. test error), we view finding a good tradeoff between the performance of XD-operations on certain tasks and convolutions, for example by restricting the expressivity of XD-operations, as important directions for future work.

B Practical Complexity of XD-Operations
C Experimental Details: CIFAR-10 and Permuted CIFAR-10 For our experiments with image classification backbones we use the standard CIFAR-10 data [22] and a permuted version where all rows and columns are identically permuted. For unpermuted data we use standard data augmentation [15] while for permuted data we do not use any data augmentation. As specified in Section 4, we keep the training routine of the model weights the same and tune only the architecture optimizer, the settings of which are specified in Table 5. Note that for the DARTS operation space we specify a "perturb" parameter that specifies how unbiased the initial architecture parameters are towards the backbone operation; specifically, we initialize architecture parameters so as to assign one minus this quantity as the weight to the backbone operation, so 0.875 means the initialization is uniform (since |S discrete | = 8) while 0.1 means the backbone operation is assigned 0.9 of the weight.

C.1 LeNet
The LeNet backbone we consider consists of two Conv 5×5 layers, each followed by MaxPool 2×2 , and two fully connected layers. When warm-starting with XD-operations we use AvgPool 2×2 instead of MaxPool 2×2 , while when warm-starting with the DARTS operations we use MaxPool 3×3 . For the baseline training routine we use 200 epochs of Momentum(0.9), with the first 100 at learning rate 0.01, the next 50 at 0.005, and the last 50 at 0.001.

C.2 ResNet-20
We use the implementation and training routine provided here: https://github.com/akamaster/ pytorch_resnet_cifar10. When replacing operations in the backbone we substitute for both the Conv 3×3 operations and the skip-connections Id; some of the latter are downsampled, which XD-operations can handle as strides.

C.3 WideResNet-40-4
We use the same implementation as for ResNet-20 but adapt the original WRN training routine [48], except with weight-decay set to 10 −4 (as in ResNet-20); on the regular CIFAR-10 tasks this does not seem to affect performance. To conserve computation and memory, we do not tune the architecture optimizer parameters here and simply use the same ones used for ResNet-20; furthermore, we fix the channel and bias parameters of XD-operations and do not allow the kernel size to be larger the 3 × 3.
Because of these modifications, we only use our evaluation here as a sanity check for large-network performance of XD-operations and do not include it in the main results.  [26]; training using "base" routine [46].

C.4 DARTS Cell Search
To search the full DARTS search space, which is a standard NAS benchmark, we use GAEA PC-DARTS, a recent state-of-the-art method [26], using code made available by the authors here: https://github.com/liamcli/gaea_release. On CIFAR-10 we simply use their best reported cell but evaluate it using the "base" routine [46], i.e. without auxiliary losses or additional data augmentation; this is to obtain fair comparison with the other backbone models. Note that the model is still much larger and the training routine much more intensive. On permuted data we follow the standard three-stage pipeline in which we run search four times, train all four found cells and select the best one, and finally train that cell multiple times.

C.5 DenseNAS Search
We use the DenseNAS search and evaluation code released by the authors here: https://github. com/JaminFong/DenseNAS. While the search space is designed for ImageNet [39], we adapt it to CIFAR-10 by taking the DenseNAS-R1 setting and downscale the input sizes to match 32x32 images used.

D Experimental Details: Solving PDEs
For our PDE experiments, we use the FNO code and setup [30] provided here: https://github. com/zongyi-li/fourier_neural_operator. We use the same training routine and settings as the backbone architecture for each task and only tune the architecture optimizer. We consider the following hyperparameters for the architecture optimizer: Adam vs. SGD (with or without momentum), initial learning rate, and number of warmup epochs. The final hyperparameters for each task can be found in Table 7. Our CNN backbone is analogous to the FNO architecture used for each problem. In particular, the CNN backbone architecture used for each task is simply the FNO architecture where FNO layers of dimension N with m modes are replaced by N -dimensional convolutional layers with filters of size (m + 1) N and circular padding to match the dimensionality of FNO. In Table 8 and Table 9 we present reported [30], reproduced, and our own results on the 1d Burgers' equation and 2d Darcy Flow.
For AutoDL we use the code and setup provided here: https://github.com/NoamRosenberg/ autodeeplab. We only conduct search on the lowest resolution and use the resulting architecture at higher resolutions. Search was conducted for 40 epochs, as in the original paper, and the search learning rate was tuned.    Table 9: Test relative errors on 2d Darcy Flow. Our reproduction of the FNO-2d results outperform those reported by the authors [30]. Nonetheless, our proposed XD operations outperform both our reproduction and the reported results at every resolution.
Method (source) s = 85 s = 106 s = 141 s = 211 s = 421 NN [30] 0.1716 -0.1716 0.1716 0.1716 GCN [30] 0.0253 -0.0493 0.0727 0.1097 FCN [30] 0.0299 -0.0298 0.0298 0.0299 PCANN [30] 0.0244 -0.0251 0.0255 0.0259 GNO [30] 0.0346 -0.0332 0.0342 0.0369 LNO [30] 0.0520 -0.0461 0.0445 -MGNO [30] 0.0416 -0.0428 0.0428 0.0420 FNO-2d [30] 0.    For our protein folding experiments, our code is a PyTorch re-implementation of the PDNET code and setup [1] provided here: https://github.com/ba-lab/pdnet. As before, we use the same training routine and settings as the Dilated ResNet architecture and only tune the architecture optimizer. We consider the following hyperparameters for the architecture optimizer: Adam vs. SGD (with or without momentum), learning rate, and number of warmup epochs. The final hyperparameters for each depth can be found in Table 10. Our ResNet backbone differs from Dilated ResNet in that its dilation rate is set to 1 in every convolutional layer. In Table 11, we present average MAE 8 on the PSICOV test set for each method at each depth.  For our sequence modeling experiments we use the TCN code [5] provided here: https://github. com/locuslab/TCN. As before we use the same settings and training routine as the backbone for all tasks, tuning only the architecture optimizer. The specific settings are provided in Table 12. For both the baselines and XD-operations we use the same optimizer settings for both the dilated and undilated TCN backbones. In Table 13 we present results for both music modeling and for two additional benchmarks-permuted MNIST and Penn Treebank-on which we see a similar pattern of XD-operations being able to recover and even beat (dilated) TCN performance starting from an undilated network.