Systems and methods for interpretable neural networks for genomic analysis

The ARGMINN architecture addresses the challenges of uninterpretable dispersion and noisy scores in neural networks by directly encoding motifs and syntax in its weights and activations, enabling robust and efficient genomic analysis.

WO2026073223A1PCT designated stage Publication Date: 2026-04-02GENENTECH INC

Patent Information

Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2025-09-30
Publication Date
2026-04-02

AI Technical Summary

Technical Problem

Existing genomic analysis methods using neural networks struggle with uninterpretable dispersion of information across filters and layers, noisy importance scores, and lack of mechanistic interpretability, making it difficult to extract biologically meaningful patterns and accurately predict genomic regulatory functions.

Method used

A mechanistically interpretable neural network architecture, ARGMINN, with a motif-scanner module using filter regularization and a syntax-builder module with modified attention, enables direct encoding of motifs and their syntax in the model's weights and activations, allowing for direct interpretation without post hoc analysis.

Benefits of technology

ARGMINN provides robust and efficient motif discovery, accurate motif instance calling, and interpretable sequence generation, maintaining predictive performance across varying GC content and resisting adversarial attacks, while eliminating the need for computationally expensive post hoc pipelines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure US2025048711_02042026_PF_FP_ABST
    Figure US2025048711_02042026_PF_FP_ABST
Patent Text Reader

Abstract

In one embodiment, a method includes providing sequence information of a DNA sequence as an input to a neural network model, generating activations by convolutional filters of the neural network model based on the sequence information, wherein each convolutional filter is associated with a weight, identifying motifs from the DNA sequence based on the convolutional filters and their weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif, generating a linear vector of attention scores for the motifs and identifying interactions between the motifs by attention layers of the neural network model based on the activations, determining motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the interactions, and generating predictions associated with genomic regulatory functions based on the motif instances and the associated syntax.
Need to check novelty before this filing date? Find Prior Art

Description

ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 1 of 66 Systems and Methods for Interpretable Neural Networks for Genomic Analysis TECHNICAL FIELD

[0001] This disclosure generally relates to systems and methods for genomic analysis, and more specifically to neural network models for genomic analysis. BACKGROUND

[0002] Genomic analysis is the study of an organism's genome, which is the complete set of its genetic information. It involves identifying, measuring, or comparing genomic features, such as DNA sequence, gene expression, and structural variation. Genomic analysis can help researchers understand how DNA affects health and disease. For example, it can help identify genetic variants that may increase the risk of developing certain conditions or diseases, which could allow for earlier intervention and preventative measures.

[0003] In machine learning, a neural network (also artificial neural network or neural net, abbreviated ANN or NN) is a model inspired by the structure and function of biological neural networks in animal brains. A neural network consists of connected units or nodes called artificial neurons, which loosely model the neurons in the brain. These are connected by edges, which model the synapses in the brain. Each artificial neuron receives signals from connected neurons, then processes them and sends a signal to other connected neurons. The “signal” is a real number, and the output of each neuron is computed by some non-linear function of the sum of its inputs, called the activation function. The strength of the signal at each connection is determined by a weight, which adjusts during the learning process. Typically, neurons are aggregated into layers. Different layers may perform different transformations on their inputs. Signals travel from the first layer (the input layer) to the last layer (the output layer), possibly passing through multiple intermediate layers (hidden layers). A network is typically called a deep neural network if it has at least two hidden layers. SUMMARY OF PARTICULAR EMBODIMENTS

[0004] Deep neural networks excel in mapping genomic DNA sequences to associated readouts (e.g., protein–DNA binding). Beyond prediction, the goal of these networks is to reveal to scientists the underlying motifs (and their syntax) which drive genome regulation. Traditional methods that extract motifs from convolutional filters may suffer from the uninterpretable dispersion of information across filters and layers. Other methods which relyACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 2 of 66 on importance scores can be unreliable. Instead, the embodiments disclosed herein utilize a novel mechanistically interpretable architecture for regulatory genomics, where motifs and their syntax are directly encoded and readable from the learned weights and activations. This disclosure provides theoretical and empirical evidence of the disclosed architecture’s full expressivity, while still being highly interpretable. Through several experiments, particular embodiments show that the disclosed architecture can excel in de novo motif discovery and motif instance calling, can be robust to variable sequence contexts, and can enable fully interpretable generation of novel functional sequences.

[0005] Certain technical challenges exist for genomic analysis using interpretable neural networks. One technical challenge may include difficulty to extract biologically meaningful patterns from standard convolutional neural networks (CNNs) as motifs are often distributed across multiple filters and layers. The solution presented by the embodiments disclosed herein to address this challenge may be a motif-scanner module with filter regularization as a single convolutional layer is regularized to ensure each filter learns a distinct, non-redundant motif, allowing motifs to be read directly from filter weights. Another technical challenge may include noisy and unstable importance scores, requiring complex post hoc pipelines for motif discovery. The solution presented by the embodiments disclosed herein to address this challenge may be a mechanistically interpretable architecture which encodes motifs and their syntax directly in the model’s weights and activations, enabling direct interpretation without post hoc analysis. Another technical challenge may include lack of mechanistic interpretability (i.e., difficulty) to understand how predictions are made. The solution presented by the embodiments disclosed herein to address this challenge may be a syntax-builder module with modified attention, where a custom attention mechanism with a memory stream enables the model to learn and reveal motif syntax (e.g., spacing, orientation) in a single forward pass. Another technical challenge may include accurate motif instance calling. The solution presented by the embodiments disclosed herein to address this challenge may be using attention scores for motif instance calling, as the attention scores can be used to trace motif instances directly.

[0006] Certain embodiments disclosed herein may provide one or more technical advantages. A technical advantage of the embodiments may include robustness to background variation and adversarial inputs as the disclosed embodiments can maintain predictive performance across varying GC content and resist adversarial attacks due to its biologically grounded motif encoding. Another technical advantage of the embodiments may includeACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 3 of 66 efficiency and scalability as the disclosed embodiments can eliminate the need for computationally expensive post hoc pipelines, reducing time and resource requirements for motif analysis. Another technical advantage of the embodiments may include generalizability across tasks, as the disclosed embodiments can be applicable to multiple regulatory genomics tasks (e.g., TF binding, accessibility prediction) without requiring task-specific modifications. Certain embodiments disclosed herein may provide none, some, or all of the above technical advantages. One or more other technical advantages may be readily apparent to one skilled in the art in view of the figures, descriptions, and claims of the present disclosure.

[0007] In particular embodiments, the techniques described herein relate to a method including, by one or more computing systems: providing sequence information associated with a DNA sequence as an input to a neural network model; generating, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identifying one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generating at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determining one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generating, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.

[0008] In particular embodiments, the techniques described herein relate to a method, further including: generating a novel functional sequence by inserting the identified motifs into a non-functional background sequence following the syntax associated with the identified motifs.

[0009] In particular embodiments, the techniques described herein relate to a method, further including: synthesizing a DNA sequence based on the novel functional sequence; inserting the synthesized DNA sequence into a cell; measuring activities associated with the synthesized DNA sequence inserted into the cell; and validating the novel functional sequence based on the measured activities.

[0010] In particular embodiments, the techniques described herein relate to a method, wherein the one or more predictions include one or more of: a prediction of protein binding toACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 4 of 66 the DNA sequence, an accessibility associated with the DNA sequence, a gene activation associated with the DNA sequence, a prediction of DNA modifications associated with the DNA sequence, or a prediction of chromatin modifications (e.g., methylation) associated with the DNA sequence.

[0011] In particular embodiments, the techniques described herein relate to a method, wherein the syntax includes one or more of motif density, motif spacing, motif orientation, or motif co-binders.

[0012] In particular embodiments, the techniques described herein relate to a method, wherein the weights associated with the set of convolutional filters directly encode the identified motifs by mapping a weight matrix of each weight to a position weight matrix of each identified motif.

[0013] In particular embodiments, the techniques described herein relate to a method, wherein the identified motifs are non-redundant with respect to each other.

[0014] In particular embodiments, the techniques described herein relate to a method, wherein the set of convolutional filters are associated with a first layer of the neural network model.

[0015] In particular embodiments, the techniques described herein relate to a method, further including: generating, based on the DNA sequence, a one-hot encoded DNA sequence, wherein generating the set of activations is further based on the one-hot encoded DNA sequence.

[0016] In particular embodiments, the techniques described herein relate to a method, wherein generating the set of activations includes scanning the set of convolutional filters across the DNA sequence at a plurality of positions.

[0017] In particular embodiments, the techniques described herein relate to a method, wherein at least two of the convolutional filters have an overlapping window at a particular position of the plurality of positions, and wherein the regularization is further configured to prevent the two convolutional filters learn a motif in the overlapping window by penalizing overlapping weights of the two convolution filters associated with the overlapping window.

[0018] In particular embodiments, the techniques described herein relate to a method, further including: generating a set of positional encodings for the DNA sequence; and concatenating the positional encodings to the activations; wherein generating the linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs is further based on the concatenations.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 5 of 66

[0019] In particular embodiments, the techniques described herein relate to a method, further including: deriving, by each attention layer of the attention layers, a key vector and a value vector from the concatenations, wherein generating the linear vector of attention scores for the identified motifs is further based on the key vector and value vector associated with each attention layer.

[0020] In particular embodiments, the techniques described herein relate to a method, wherein generating a linear vector of attention scores for the identified motifs includes: deriving a first single query from a memory stream by a prior attention layer of the attention layers; updating the memory stream by a subsequent attention layer of the attention layers; and deriving a second single query from the updated memory stream.

[0021] In particular embodiments, the techniques described herein relate to a method, wherein each attention layer of the attention layers includes a plurality of attention heads configured to attend to a plurality of motifs, and wherein identifying interactions between the identified motifs is further based on the plurality of attention heads attending to the plurality of motifs.

[0022] In particular embodiments, the techniques described herein relate to a method, further including: determining, based on the linear vector of attention scores, a first attention score higher than a threshold score; identifying a first sequence position of the DNA sequence corresponding to the first attention score; determining a first activation at the first sequence position; and determining a first motif instance at the first sequence position if the first activation is higher than a threshold activation.

[0023] In particular embodiments, the techniques described herein relate to a method, further including: visualizing the linear vector of attention scores in a graphical user interface.

[0024] In particular embodiments, the techniques described herein relate to a method, wherein the identified interactions comprise one or more of a cooperation between motifs, a synergy between motifs, a competition between motifs, or an inhibition between motifs. Although this disclosure describes particular interactions, this disclosure contemplates any suitable interactions.

[0025] In particular embodiments, the techniques described herein relate to a method, wherein the interactions between the identified motifs are identified at a layer level or a cross- layer level by the one or more attention layers associated with the neural network model.

[0026] In particular embodiments, the techniques described herein relate to one or more computer-readable non-transitory storage media embodying software that is operable whenACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 6 of 66 executed to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.

[0027] In particular embodiments, the techniques described herein relate to a system including: one or more processors; and a non-transitory memory coupled to the processors including instructions executable by the processors, the processors operable when executing the instructions to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.

[0028] The embodiments disclosed herein are only examples, and the scope of this disclosure is not limited to them. Particular embodiments may include all, some, or none of the components, elements, features, functions, operations, or steps of the embodiments disclosed herein. Embodiments according to the invention are in particular disclosed in the attachedACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 7 of 66 claims directed to a method, a storage medium, a system and a computer program product, wherein any feature mentioned in one claim category, e.g. method, can be claimed in another claim category, e.g. system, as well. The dependencies or references back in the attached claims are chosen for formal reasons only. However any subject matter resulting from a deliberate reference back to any previous claims (in particular multiple dependencies) can be claimed as well, so that any combination of claims and the features thereof are disclosed and can be claimed regardless of the dependencies chosen in the attached claims. The subject-matter which can be claimed comprises not only the combinations of features as set out in the attached claims but also any other combination of features in the claims, wherein each feature mentioned in the claims can be combined with any other feature or combination of other features in the claims. Furthermore, any of the embodiments and features described or depicted herein can be claimed in a separate claim and / or in any combination with any embodiment or feature described or depicted herein or with any of the features of the attached claims. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] FIGS.1A-1D illustrate an example schematic of the ARGMINN architecture.

[0030] FIGS.2A-2D illustrates example motif discovery.

[0031] FIGS.3A-3C illustrate example motif instance calling and syntax discovery.

[0032] FIG.4A illustrates an example dsQTL classification.

[0033] FIG.4B illustrates an example comparison of ARGMINN 100 and related methods for prioritizing true causal dsQTLs.

[0034] FIG.4C illustrates two examples of causal dsQTLs.

[0035] FIG. 4D illustrates example predictive performance after training on 50% background GC content and testing on out-of-distribution background sequences.

[0036] FIG. 4E illustrates example predictive performance of traditional CNN under adversarially constructed backgrounds.

[0037] FIG. 4F illustrates example strength of true motifs in Ledidi-generated sequence when coupled with various predictive models.

[0038] FIGS.5A-5C illustrate example interpretable sequence design.

[0039] FIGS. 6A-6B illustrate an example generation of sequences with ARGMINN interpretations.

[0040] FIGS.7A-7C illustrate example testing of predicted accessibility using ARGMINN.

[0041] FIGS.8A-8C illustrate example testing of predicted accessibility using Borzoi.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 8 of 66

[0042] FIGS.9A-9C illustrate example attribution scores for input sequences.

[0043] FIG.10 illustrates example motifs discovered by different methods on a simulated TAL / GATA dataset.

[0044] FIG. 11 illustrates example motifs discovered by different methods on an experimental dataset of FOXA2 binding in HepG2.

[0045] FIG. 12 illustrates example motifs discovered by different methods on an experimental dataset of DNase accessibility in HepG2.

[0046] FIG. 13 illustrates example motifs discovered by different methods on an experimental dataset of DNase accessibility in HL-60.

[0047] FIG. 14 illustrates additional examples of motif-instance quality, comparing ARGMINN with the traditional method of sequence-scanning using FIMO.

[0048] FIG. 15 illustrates example attention scores and strength of the experimentally determined peaks at the test-set sequences.

[0049] FIG.16 illustrates example predictive performance of ARGMINN compared to the traditional CNN and ExplaiNN.

[0050] FIG.17 illustrates example motifs extracted from the first-layer filters after appling the disclosed filter regularizer to a traditional CNN architecture.

[0051] FIG.18A illustrates example effect of the filter-overlap weights on the performance and interpretability of ARGMINN.

[0052] FIG.18B illustrates example effect of the filter-L1 loss weights on the performance and interpretability of ARGMINN.

[0053] FIG. 19 illustrates an example method for genomic analysis using interpretable neural networks

[0054] FIG.20 illustrates an example computer system. DESCRIPTION OF EXAMPLE EMBODIMENTS Introduction

[0055] Transcription factors (TFs) are proteins that regulate gene activity by recognizing and binding to specific short DNA sequence patterns—or “motifs”—in the genome. High- throughput experiments measure regulatory activity—such as protein–DNA binding or associated readouts—across the genome. In general, the regulatory function of a DNA sequence is defined by the combination of motifs in that sequence. Understanding the motifs (and their syntax) which regulate the genome is thus important for many scientific and medicalACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 9 of 66 tasks, such as disease diagnosis and design of novel therapies (e.g., with CRISPR). Extracting motifs and syntax from these experiments, however, can be challenging. Motifs and their configurations have a soft syntax (i.e., density, spacing, orientation, and co-binders), which may induce a particular function such as TF binding, and these syntactical rules can be dependent on surrounding context and cell type.

[0056] Thus, accurately predicting genome regulation from DNA sequence may require expressive models to capture the complexities of motifs and their syntax. In particular, deep neural networks (DNNs) have achieved state-of-the-art performance in mapping DNA sequences to TF binding and associated readouts. These models take a DNA sequence as an input, and predict a label measured by a biological experiment (e.g., a binary label denoting if a TF bound to that sequence). The common goal of these genomic DNNs is to ultimately identify the fundamental code (i.e., motifs and their syntax) underpinning genome regulation. Notably, recent work has shown that motif discovery from these DNNs has far surpassed the ability of traditional statistical methods.

[0057] There may be two main classes of methods that extract motifs from a trained DNN. As these DNNs are almost universally convolution-based in early layers, a common approach may be to extract a motif from each first-layer filter. This method, however, may suffer from the critical limitation that information (including motifs) tends to be distributed or dispersed across filters and layers, thus there may be no guarantee that any single filter will learn a biologically meaningful motif (FIG.2A). The second class of methods may rely on importance scores, which attempt to measure the contribution of individual DNA bases to the output prediction, with the hope that bases in motifs have elevated importance. By effectively integrating throughout the whole DNN, importance scores may bypass the problem of distributed information. Unfortunately, importance scores can be highly unstable and unreliable approximations of a model’s decision making, and in genomic DNNs, importance scores typically only show noisy and fragile motif instances (FIGS. 9A-9C). In practice, to improve robustness, motif discovery via importance scores may require complex pipelines composed of many computationally expensive steps, which tend to be delicate and require constant human intervention.

[0058] The embodiments disclosed herein disclose a new method of recovering genome biology from a DNN, based on mechanistic interpretability. Mechanistic interpretability (MI) has recently emerged as a key research direction to explain complex models. The disclosed method, Analysis of Regulatory Genomics via Mechanistically Interpretable Neural NetworksACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 10 of 66 (ARGMINN), can enable motifs and their syntax to be directly readable from the network architecture, without compromising expressivity or relying on complex post hoc pipelines. This disclosure will formally describe the ARGMINN architecture, including several novel architectural contributions including: 1) a regularizer designed to ensure that the first layer’s convolutional-filter weights directly encode a non-redundant set of relevant motifs; and 2) a modified attention mechanism which reveals motif instances and their syntax in any query sequence with a single forward pass.

[0059] This disclosure will also show experimental results which demonstrate ARGMINN’s interpretability and its main contributions to motif biology, including: 1) superior motif discovery and motif-instance / syntax analysis compared to existing approaches; 2) robustness against natural or adversarial sequence modifications; and 3) the novel ability to perform fully interpretable sequence generation. In addition, this disclosure will provide theoretical results on ARGMINN’s expressivity, showing that it can learn any motifs and syntax, whereas previous MI architectures cannot. Related Work

[0060] Practically all prevalent genomic DNN architectures have convolutional filters as the first layer. To recover motifs, most works directly visualize the filter weights or average subsequences which highly activate each filter. Although this has shown some limited success, these methods assume that each filter learns one motif, and each motif is learned by one filter. This is generally not true because—without special constraints—motifs are typically learned in a distributed fashion, where each motif is learned across many filters and layers (FIG.2A).

[0061] As a result, more sophisticated post hoc pipelines were developed to extract motifs from trained DNNs. These pipelines integrate over the entire DNN to compute importance scores across the dataset (e.g., via integrated gradients or DeepLIFTShap), resulting in an importance score at each position for each sequence. These scores are then segmented into high-importance regions as putative motif instances. Due to the extreme noisiness of importance scores, however, these instances may need to be clustered into clean motifs by tools like MoDISco. Each step of this pipeline can be computationally expensive, and for most datasets, the time required to recover motifs may be over an order of magnitude longer than the time needed to train the model. Furthermore, these pipelines may heavily rely on importance scores from a black-box model, which can be extremely fragile, as importance scores frequently fail to reveal a model’s true decision-making process.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 11 of 66

[0062] Within the field of explainable AI, there has been some burgeoning work exploring MI, where the patterns and rules learned by a DNN are reflected in its physical computation. In particular, the embodiments disclosed herein can be a type of intrinsic MI, where the DNN’s architecture (e.g., weights and activations) can directly encode learning. This can be done by increasing sparsity, modularity, and the proportion of monosemantic neurons (i.e., neurons which learn a single concept). DNNs may also improve their intrinsic MI by learning logical rules in a more structured way.

[0063] Despite these promising works, constructing intrinsically MI architectures for very general problems remains difficult. However, focusing on more constrained predictive tasks (e.g., motif discovery) may make MI more feasible, allowing one to restrict computation and the solution space. ARGMINN may use similar principles as other intrinsic MI works (e.g., sparsity, modularity, monosemanticity, and explicit logic), but in a biologically grounded manner, making it both highly interpretable and expressive.

[0064] Recently, the ExplaiNN architecture also aimed to interpretably learn motifs from DNA sequences. ExplaiNN consists of a set of single-filter convolutional networks. Each network may learn a distinct motif and output a scalar summarizing binding strength over the input. The final output may be a learned linear combination of these scalars. In later sections, this disclosure will show that ARGMINN surpasses ExplaiNN in both interpretability and expressivity.

[0065] The embodiments disclosed herein may also relate to concept bottleneck models (CBMs), which may force decisions to be based on interpretable concepts from an intermediate layer. While CBMs can provide meaningful explanations, they may require pre-defined concepts and concept-labeled inputs, which are labor-intensive to obtain. In the embodiments disclosed herein, ARGMINN can be viewed as a type of CBM, but the concepts may be motifs, and the concepts are learned entirely from the data, thus overcoming the typical limitations of CBMs. Furthermore, ARGMINN may elucidate syntax between motifs—rules relating to positioning between concepts—in addition to the motifs themselves. Architecture

[0066] The embodiments disclosed herein disclose a mechanistically interpretable DNN architecture designed to 1) accurately predict regulatory function (e.g., protein binding) from DNA sequence; 2) reveal crucial motifs responsible for function across the dataset; and 3) reveal motif instances and their syntax in any given query sequence. Importantly, 2) and 3) canACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 12 of 66 be directly encoded in the model weights and activations. The mechanistically interpretable architecture may be an effective solution to address the technical challenge of noisy and unstable importance scores which require complex post hoc pipelines for motif discovery mechanistically interpretable architecture which encodes motifs and their syntax directly in the model’s weights and activations, enabling direct interpretation without post hoc analysis.

[0067] FIGS.1A-1D illustrate an example schematic of the ARGMINN 100 architecture. FIG. 1A illustrates the schematic of the ARGMINN 100 pipeline. After training 101, motifs can be read at operation 102 from the motif-scanner module 105, and the syntax-builder module 120 uncovers motif instances and syntax at operation 103 with a forward pass. The architecture may include two modules trained end to end (FIG.1B). The motif-scanner module 105 may be a single convolutional layer which identifies motifs 115 from the input sequence 110. Particular embodiments may use a novel regularizer for the filters 125 so that the filter weights directly encode non-redundant motifs 115, thereby accomplishing goal 2) above. The convolutional activations may be passed to the second module—the syntax builder 120—consisting of several layers of modified attention that assemble the syntax and logic between motifs 115 to produce a final prediction. The syntax builder 120 may be designed such that the activations and attention scores immediately reveal motif instances and syntax, thus achieving goal 3).

[0068] Referring to FIG. 1B, the motif-scanner module 105 may produce activations 130 denoting which motifs 115 were found at each position, where activation magnitude reflects match strength. The activations 130 may be passed to the syntax builder 120, which learns higher-order logic between motif instances for the final prediction. Referring to FIG. 1C, the motif-scanner module 105 may be a single convolutional layer which learns all motifs 115 de novo. Regularization may ensure that each filter 125 learns one motif 115 (and vice versa), penalizing different filters 125 from activating based on the same underlying subsequences. The motif-scanner module 105 with filter regularization may be an effective solution to address the technical challenge of difficulty to extract biologically meaningful patterns from standard convolutional neural networks (CNNs) as a single convolutional layer is regularized to ensure each filter learns a distinct, non-redundant motif, allowing motifs to be read directly from filter weights. Referring to FIG.1D, the syntax builder 120 may include a series of uniquely designed attention layers 135. An explicit memory stream 140 may track the model’s 120 state. Each attention layer 135 may derive a single query vector 145 from the memory stream 140, and key vectors 150 and value vectors 155 from the original activations 130, to update the memory stream 140. The syntax-builder module 120 with modified attention may be an effectiveACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 13 of 66 solution to address the technical challenge of lack of mechanistic interpretability (i.e., difficulty) to understand how predictions are made as a custom attention mechanism with a memory stream enables the model to learn and reveal motif syntax (e.g., spacing, orientation) in a single forward pass. Module 1: Motif Scanners

[0069] The “motif scanners 105” may include a set of ^^convolutional filters of width w, which are scanned across the input sequence 110 to a set of activations 130 (FIG.1B).The network may be trained such that the weights of each filter 125 directly encode a motif 115. Thus, a filter’s 125 activation may be maximized when it scans over a one-hot-encoded sequence that exactly matches the encoded motif 115 (motifs 115 are learned de novo). In alternative embodiments, K-mer encoding, or any suitable encoding method, can be used to generate an encoded sequence for the DNA sequence. These activations 130 may be then thresholded by a ReLU (the additive bias parameter of the filters and the ReLU may allow the network to selectively cut off weak matches, thereby producing more sparse activations).For a 1-hot encoded DNA sequence ^ ∈ ^0, 1^^×^, the convolutional weights ^ ∈ ℝ^^×^×^(and bias ^ ∈ ℝ^^) may yield activations ^ ∈ ℝ(^^^^^)×^^^ :^ = ReLU. (1)

[0070] Importantly, the filters 125 may be regularized so that each filter 125 learns one distinct motif 115, and each motif 115 is learned by one filter 125. This may allow motifs 115 to be directly read from the filter weights after training. Particular embodiments may use a novel secondary objective which penalizes different filters 125 from activating on overlapping sequences. This may be combined with a simple L1-penalty on the filter weights themselves to induce sparse filters 125 that directly reveal distinct, non-redundant motifs 115.

[0071] At each position i in a sequence S, each filter 125 may aggregate values ^"#, # + %&.Let ' = argmax^^-^ ∈ .0, … , ^^ − 11 be the index of the maximally activated filter 125 at i.For all other filters ^ ≠ ',a and b both achieve non-zero activation in the sameneighborhood of S, then they should not both have non-zero weights in the overlapping region (i.e., they should not be attending to the same part of the sequence). In other words, every position of S is “protected”: at most one filter 125 can activate while attending to any position. If another filter 125 is activated nearby, then its weights should not be attending to the protectedACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 14 of 66 part of the sequence. The disclosed filter-overlap regularization then can be defined as the following loss function: ^^^-^(^^^)ℒ4(^, ^) = 5 5 5 6^7,8∥^E − #^& ∥^&. (2)filter weights of the maximally activated filter ^Hwith the weights of all other filters (^8), at every possible overlapping window j. Particular embodiments may penalize the L1 norm of the overlapping weights, multiplied by the activation of filter b (i.e., if ^8is not activated, there is no penalty). Importantly, this is a soft regularization which the model can choose to ignore if needed for performance. This regularization may help prevent: 1) two filters learning the same motif 115 (or the same part of the same motif 115); and 2) two filters 125 learning a motif 115 in an interleaved fashion. However, the disclosed regularization may still allow for a long motif 115 to be learned by two filters 125, split somewhere down the middle (or similarly, two half-sites directly next to each other, each learned by one filter 125).

[0073] In practice, this loss may be computed efficiently by caching all possible windows of weight sums (for each value of j) once, and at each i scaling the window products with the activation of ^8.

[0074] As described above, the filter-overlap regularization (along with its differentiable formulation) can guide the model to learn a different motif / subsequence for each filter 125. The fact that it is differentiable can allow the strength of this regularization to be tuned / controlled. Furthermore, the combination of the filter-overlap regularization and a L1 penalty on the convolutional weights themselves can ensure that each filter 125 learns a distinct motif / subsequence, and that excess filters 125 which are not learning any signal are removed or zeroed out. Module 2: Syntax Builder

[0075] After the motif-scanner module 105, positional encodings P may be concatenated to the activations A. The second module of ARGMINN 100 is the syntax builder 120, which may consist of ^Ilayers of a custom attention mechanism that learns syntax between motifs 115 (FIG. 1C). In contrast to typical attention, the disclosed modified attention layer 135 hasACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 15 of 66 an explicit “memory stream 140” J^which is updated after each layer 135. Each layer 135 may derive a single query 145 from J^, resulting in a linear vector of attention scores rather than a quadratic matrixboth interpretability and efficiency). Using attention scores for motif instance calling may be an effective solution to address the technical challenge of accurate motif instance calling as the attention scores can be used to trace motif instances directly.

[0076] Importantly, every layer 135 may derive key 150 and value 155 vectors directlyfrom the original “tokens” (i.e., ^ ∥ K). Each attention layer 135 can be described as follows:L^ ∶= ^N,^J^^^, O^ ∶= ^P,^"^ ∥ K&, Q^ ≔ ^S,^"^ ∥ K&' PTUTwhere JBthe query vector145. Particular embodiments also include ^\attention heads, but do not show the reshaping operations above for clarity.

[0077] Each layer 135 can attend to multiple motifs 115 (due to the multiple attention heads), and successive layers 135 may allow the model to capture interactions between motifs 115 (e.g., with k layers 135, the model 120 can reason about kth-order interactions betweenmotifs 115). Altogether, the final loss function becomes:ℒ(^, ^, ^) = ℒ]^_W(`(^), a) + b4ℒB(^, ^) + b^ ∥ ^ ∥^ (4)

[0078] Asembodiments can instantiate a single memory stream 140 which tracks all memory state, where a single query vector 145 is extracted from that memory stream 140. In every layer 135, extracting key / value vectors directly from the original concept-level activations (and positional encodings) can ensure that every additional attention layer 135 learns an interpretable set of higher-order interactions (i.e., the k-th layer learns k-order interactions). Experimental Results

[0079] In this section, this disclosure shows experimental results demonstrating ARGMINN’s advantages in motif discovery, motif instance calling, robustness, and interpretable generation. Improved Motif Discovery

[0080] To extract motifs from ARGMINN 100, particular embodiments obtained a motif from each of the first-layer convolutional filters by averaging test-set subsequences whichACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 16 of 66 highly activate the filter (filters which were never activated in the test set were dropped) (See, Appendix C).

[0081] Over several simulated and real-world experimental datasets (See, Appendix C), this disclosure compared the motifs discovered by ARGMINN 100 to those identified by several other methods: interpreting the filters of a traditional CNN, ExplaiNN, and importance- score clustering via DeepLIFTShap and MoDISco. Particular embodiments systematically matched each discovered motif to the closest known relevant motif. For simulated datasets, particular embodiments matched to ground-truth motifs; for experimental datasets, particular embodiments matched to the closest relevant human motif.

[0082] FIGS. 2A-2D illustrates example motif discovery. FIG. 2A shows example SPI1 motifs discovered by ARGMINN 100, compared to interpreting the first-layer filters of a traditional CNN, using ExplaiNN, and by clustering DeepLIFTShap importance scores using MoDISco. Note that MoDISco combines forward and reverse-complement orientations. For each dataset, FIG.2B shows whether or not each method successfully recovered each relevant motif (above), and the amount of redundancy as the number of times each motif was discovered. To quantify accuracy of motif discovery, for each relevant motif FIG. 2C shows the maximum similarity to motifs discovered by each method. For each dataset, FIG.2D shows the number of extraneous motifs—those which do not match any known relevant motif—that each method discovered (left). FIG. 2D shows a few examples of such extraneous motifs discovered for the CTCF (HepG2) experimental dataset (right).

[0083] ARGMINN 100 identified known, biologically relevant motifs, and compared to other methods. ARGMINN 100 generally missed the fewest relevant motifs and discovered the fewest redundant motifs (FIGS. 2A-2B, FIG. 10, FIG. 11, FIG. 12, FIG. 13, Table 1). For example, ARGMINN 100 trained on FOXA2 in HepG2 (a pioneer factor) revealed factors in the FOX, HNF4, and CEBP families, all known to co-localize or co-bind with FOXA. Impressively, in the experimental datasets, the singular most similar motif (an extremely strict requirement) to an ARGMINN filter is typically a known relevant motif (e.g., on this FOXA dataset, ARGMINN 100 identified 4 motifs whose top match was a relevant motif, whereas the traditional and dilated CNNs only identified 1 relevant motif (if at all), with much weaker similarities to true relevant motifs). ExplaiNN also discovered representations of these relevant motifs, but with very poor quality. Additionally, ARGMINN’s 100 motifs were generally most similar to the ground truth (FIG.2C, Table 2), thus highlighting its accuracy. In 62% of cases, ARGMINN’s 100 discovered motif was the most similar to the ground truth over all methods.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 17 of 66 The next most similar method was MoDISco on the dilated CNN, which revealed the most accurate motifs 20% of the time (FIG. 2C). ARGMINN 100 was also the method which consistently identified the fewest extraneous motifs—patterns which do not match any biologically relevant motif (FIG.2D, Table 3).

[0084] In contrast, other methods performed much worse than ARGMINN. Even when the traditional CNN or ExplaiNN encoded motifs in their filters, ARGMINN’s filters were far more similar to the true motifs. ARGMINN 100 also outperformed MoDISco, which—despite recovering many relevant motifs—almost universally identified motifs less accurate than ARGMINN 100 (FIG. 2C). Due to the unreliability and noisiness of the importance scores themselves, as well as the frailty of clustering, MoDISco also found many redundancies and extraneous motifs (FIG.2B and FIG.2D). Improved Motif Instance Calling and Syntax Discovery

[0085] FIGS. 3A-3C illustrate example motif instance calling and syntax discovery. Referring to FIG.3A, ARGMINN 100 can call motif instances in any query sequence in only a forward pass. High attention scores 310 in any attention layer may trace directly back to original filter activations 320, which directly map to sequence motifs 330. Referring to FIG. 3B, after training on an experimental dataset of REST binding in HepG2, ARGMINN 100 may reveal the unique binding syntax of REST, where the half-sites (left and right) bind either adjacently or around 9–14 bp apart. Referring to FIG. 3C, particular embodiments compare motif instances discovered by ARGMINN 100 to the traditional approach of using MoDISco to discover motifs and subsequently scanning for them with FIMO. Particular embodiments rank motif instances by confidence (attention score from ARGMINN 100, or FIMO hit q- value), and compute the fraction of true instances that are covered in a top-k fashion. Particular embodiments also compare to motif instances discovered by scanning for ARGMINN- discovered motifs with FIMO.

[0086] With previous DNN-based methods, identifying motif syntax may require first learning motifs (e.g., via MoDISco) and then scanning sequences to “call” motif instances. Not only is this computationally expensive, but instance calling by sequence scanning tends to be highly inaccurate (e.g., due to partial hits or missing context which the DNN would have considered).

[0087] Instead, ARGMINN 100 may reveal motif instances by tracing attention scores from a single forward pass on any sequence (FIG. 3A). Since every attention layer derivesACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 18 of 66 keys / values directly from the motif-scanner activations, high attention scores may directly point to the precise motif instances which the network deemed important for prediction. Specifically, for any input query sequence, particular embodiments may examine the attention scores across all layers / heads on the forward pass. For each high score (e.g., > 0.9), particular embodiments may identify the corresponding sequence position. Particular embodiments may then check the motif activations at that position and call a motif instance if a motif / filter has high activation (See, Appendix C). For example, trained on an experimental dataset of REST binding, ARGMINN 100 directly recovered the unique binding syntax—including spacing preferences—of the two halves of the REST motif in both directions / orientations (FIG.3B).

[0088] This disclosure quantitatively evaluated motif instances identified by ARGMINN 100 versus a traditional pipeline. Namely, using FIMO, particular embodiments called instances of MoDISco-discovered motifs in test sequences. For each method, particular embodiments ranked motif instances by confidence and computed the number of ground-truth instances recovered by the top-k motifs. For experimental datasets, particular embodiments used independently derived binding footprints as ground truth. In general, ARGMINN’s motif instances were far more accurate than those found by the baseline (FIG. 3C, FIG. 14, Tables 4-5). To gain further intuition, this disclosure also compared to motif instances found by scanning for ARGMINN-discovered motifs using FIMO. Again, ARGMINN 100 identified more accurate motif instances than FIMO, even when FIMO is given the same set of ARGMINN motifs. This comparison also shows the benefit of using a neural-network-based approach such as ARGMINN 100, compared to the traditional method of sequence scanning.

[0089] Finally, to further demonstrate that ARGMINN’s 100 attention scores match underlying biological signal, this disclosure shows that the positions of high attention scores in experimental test-set sequences closely track the measured biological strength of protein binding along the sequence (FIG.15). QTL Prioritization

[0090] Next, this disclosure evaluated the ability of ARGMINN 100 to classify and prioritize a set of causal DNase-sensitivity quantitative trait loci (dsQTLs) from a background set of non-causal dsQTLs. dsQTLs are mutations which change the DNase accessibility of a sequence. A predictive model which has learned to understand and make decisions based on biological signals (and not spurious correlates) should predict a larger change in causal dsQTLs compared to non-causal dsQTLs which are merely correlated with the causal changes.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 19 of 66

[0091] FIG. 4A illustrates an example dsQTL classification. Classification performance measures the ability to prioritize true causal mutations by quantifying the difference in predictions with and without the mutation. FIG. 4B illustrates an example comparison of ARGMINN 100 and related methods for prioritizing true causal dsQTLs. FIG. 4C illustrates two examples of causal dsQTLs. The two examples fall in ARGMINN-discovered motif instances. In both cases, by making the dsQTL mutation, the ARGMINN-discovered binding site is disrupted, leading to a reduced prediction of accessibility. FIG. 4D illustrates example predictive performance after training on 50% background GC content and testing on out-of- distribution background sequences. FIG. 4E illustrates example predictive performance of traditional CNN under adversarially constructed backgrounds. FIG. 4F illustrates example strength of true motifs in Ledidi-generated sequence when coupled with various predictive models. Particular embodiments used Ledidi to perform back-propagation-based sequence design on models trained to predict SPI1 binding, generating novel sequences which are meant to maximize the likelihood of SPI1 binding. Particular embodiments evaluated the quality of the generated sequences from each model by quantifying the distribution of match scores to the true SPI1 motif.

[0092] On a set of known DNase-sensitivity QTLs, this disclosure evaluated the ability of ARGMINN 100 to prioritize true causal dsQTLs by quantifying the difference in predictions with and without the dsQTL mutation, which is shown in FIGS. 4A-4B. FIG. 4C shows two examples of causal dsQTLs, which fall in ARGMINN-discovered motif instances. In both cases, by making the dsQTL mutation, the ARGMINN-discovered binding site is disrupted, leading to a reduced prediction of accessibility.

[0093] To further evaluate the quality of the mechanistically interpretable architecture of ARGMINN 100, this disclosure assessed its ability to ground predictions in biologically meaningful motifs and syntax. In particular, this disclosure evaluated (1) whether motifs discovered by ARGMINN 100 align with known causal trait loci, and (2) whether its motif- based reasoning improves overall model robustness.

[0094] Particular embodiments quantified ARGMINN’s 100 ability to classify and prioritize a set of causal DNase-sensitivity quantitative trait loci (dsQTLs) from a background set of non-causal dsQTLs. dsQTLs are mutations which change the DNase accessibility of a sequence. A predictive model that makes decisions based on biological signals (and not spurious correlates) should predict a larger change for causal dsQTLs compared to non-causal dsQTLs, which are merely correlated with the causal changes (FIG. 4A). On a held-outACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 20 of 66 chromosome, this disclosure found that compared to other architectures, ARGMINN 100 was capable of classifying / prioritizing the causal dsQTLs significantly more accurately (FIG.4B). Causal dsQTLs tended to overlap with specific motif instances ARGMINN 100 used for its prediction of accessibility (FIG.4C). Unlike other methods, ARGMINN’s 100 interpretability can allow it to directly reveal the underlying motif being disrupted by a QTL. These results can confirm that ARGMINN 100 predictions are more grounded in interpretable motif biology compared to baselines. Robustness of ARGMINN

[0095] Because ARGMINN 100 makes decisions based on biologically meaningful motifs, it can be more robust to background variations. On several simulated datasets, particular embodiments trained ARGMINN 100 (along with a traditional CNN and ExplaiNN) with a 50% GC background, and then computed prediction performance on test sequences with GC content ranging from 5% to 95%. ARGMINN’s 100 performance suffered the least, with a higher and tighter distribution of performance in general (FIG.4D).

[0096] Furthermore, because traditional CNNs learn filters which do not accurately represent motifs, they may be prone to adversarial attacks (See, Appendix C). On the SPI1 dataset, particular embodiments trained a CNN to achieve 88% accuracy. Particular embodiments then easily constructed many sequences which contain short substrings which highly activate its filters, but without any instances of the SPI1 motif. On this set of sequences, the traditional CNN’s accuracy dropped to 55%. Reflexively, particular embodiments also were able to easily design sequences which have the SPI1 motif, but particular embodiments inserted substrings into the background which strongly deactivate the filters, leading the CNN’s accuracy to drop to 48%. In contrast, because ARGMINN 100 encodes meaningful biological motifs in each filter, it may remain robust against such an attack (i.e., one cannot easily identify highly activating or anti-activating sequences which trick the model into giving the wrong prediction). As a result, the disclosed embodiments may have a technical advantage of robustness to background variation and adversarial inputs as the disclosed embodiments can maintain predictive performance across varying GC content and resist adversarial attacks due to its biologically grounded motif encoding.

[0097] Finally, particular embodiments used Ledidi to generate sequences which would bind to SPI1. Ledidi is a back-propagation-based sequence-design method, which optimizes input sequences to maximize the probability of a positive prediction from a given model.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 21 of 66 Applying Ledidi on the ARGMINN 100 architecture generated sequences with the strongest instances of the true SPI1 motif (FIG. 4E). The true binding strength of ARGMINN’s 100 Ledidi-generated instances were significantly higher than those generated from the traditionalCNN (c = 8.95 × 10^^g) and ExplaiNN (c = 5.53 × 10^^^i). This may be becauseARGMINN is trained to focus on the relevant motifs, whereas the other models tend to focus on spurious non-motif sequence patterns. Interpretable Design of Novel Functional Sequences

[0098] Upon training, ARGMINN may reveal the functional motifs and the syntactical rules for combining them which produce a prediction of binding or accessibility. As such, ARGMINN can be used for interpretable generation of novel functional sequences.

[0099] FIGS. 5A-5C illustrate example interpretable sequence design. Referring to FIG. 5A, after training 505 on experimental data 510 (e.g., accessibility in HepG2), ARGMINN 100 reveals the functional motifs and their binding syntax 515 which induce function. To generate 520 a novel functional sequence, particular embodiments can insert motifs into a non- functional background sequence, following the syntactical rules learned by ARGMINN 100. This may generate 520 a novel sequence 525 of putative biological function, where the mechanistic justification is fully controlled and known. Particular embodiments may interpretably construct novel HepG2-accessible sequences using ARGMINN 100 and validate their accessibility using Borzoi.

[0100] FIG. 5B compares the accessibility between generated sequences and natural sequences from the experimental dataset (top), as well as between generated sequences and shuffled backgrounds (bottom). Particular embodiments performed additional in silico validation of our interpretably designed HepG2-accessible sequences. Particular embodiments tested the generated sequences using multiple independently trained models (trained on different datasets) as oracles: an open-chromatin model trained on an independently collected dataset of HepG2 accessibility, and an MPRA model trained on independently collected massively-parallel-reporter-assay data. We also show the predictions made by ARGMINN 100 using the model as a predictive oracle rather than an interpretable-design agent. In all cases, generated sequences are far more accessible than background sequences, and are about as accessible as natural sequences identified by the experiment.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 22 of 66

[0101] FIG. 5C shows experimentally measured accessibility of ARGMINN-generated sequences compared to shuffled backgrounds and sequences constructed with directed evolution.

[0102] In contrast with sequence generation using traditional methods (such as Ledidi or directed evolution) or non-interpretable generative models (e.g., diffusion models or autoencoders), particular embodiments may start with ARGMINN 100 interpretations and sample motif configurations to insert into non-functional backgrounds. This may yield a generated sequence for which one has a complete understanding on the reason why it is biologically active (e.g., it is active because it has the FOXA motif and TEAD motif 50 bp apart) (FIG.5A).

[0103] To demonstrate this ability, particular embodiments trained ARGMINN 100 to predict DNA accessibility in the HepG2 cell type from experimental data. On the test set, particular embodiments then extracted the functional motifs and the syntactical rules and grammars between them. Particular embodiments sampled motifs and their configurations entirely from ARGMINN’s 100 discovered biology and inserted them into non-functional sequence backgrounds.

[0104] Further, particular embodiments selected a set of ARGMINN-generated sequences to be synthesized and experimentally tested for accessibility in HepG2. Compared to shuffled background, the ARGMINN-generated sequences achieved significantly higher activity (FIG. 5C). Furthermore, the ARGMINN-generated sequences attained comparable activity to sequences designed using directed evolution. Importantly, however, not only does directed evolution produce completely uninterpretable sequences, directed evolution also optimizes solely for high predicted activity. In contrast, our ARGMINN generates completely interpretable sequences with fully characterized motifs / syntax, which are selected for high activity, but not directly optimized. Together, the in silico and in vivo experiments can confirm that ARGMINN generates fully interpretable sequences of biological function.

[0105] FIGS. 6A-6B illustrate an example generation of sequences with ARGMINN interpretations. ARGMINN 100 can provide the unique ability to generate novel sequences and understand the mechanistic justification for its function. The generation may start with original test-set sequence from HepG2 DNase dataset. Forward-passing this sequence through ARGMINN 100 may reveal the identities and positions of motifs driving accessibility. Note that ARGMINN 100 can be length agnostic. It was trained on 500 bp sequences, but here it was used with 200 bp. Particular embodiments may then dinucleotide-shuffle the originalACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 23 of 66 sequence to create shuffled sequence with no motifs. Particular embodiments may then reinsert motifs (sampling from learned PFMs) at the identified positions / spacings to create constructed sequence. Note that for any constructed sequence, one can match it to the shuffled background we used and the starting original sequence.

[0106] FIGS. 7A-7C illustrate example testing of predicted accessibility using ARGMINN. The sanity check shows that forward and reverse-complement constructed sequences are equally accessible. Constructed sequences have roughly the same predicted accessibility as their original (natural) counterparts. Constructed sequences are much more accessible than the shuffled backgrounds (i.e., adding in motifs increases predicted accessibility).

[0107] FIGS. 8A-8C illustrate example testing of predicted accessibility using Borzoi. Borzoi has 3 output tasks for DNase in HepG2. This output task is trained on the same experiment as ARGMINN. To turn the profile output into a scalar, particular embodiments take the log of the sum of the central 200 bp. Note there is far more extreme difference between shuffled and constructed sequences.

[0108] Using the same ARGMINN model 100 as a predictor of accessibility, the newly generated sequences were predicted to be significantly more accessible than the shuffled non-functional backgrounds (c = 1.78 × 10^kl). Furthermore, these generated sequences werepredicted to be just as accessible as natural sequences identified to be highly accessible by theoriginal biological experiment ((c = 0.75) (FIG. 5B). Particular embodiments then repeatedthe in silico validation with a completely independently trained model, Borzoi. Using the output head of Borzoi which predicts DNA accessibility in HepG2, particular embodiments passed the same sequences through Borzoi to predict accessibility and confirmed the same trends: the generated sequences were far more accessible than the non-functional backgrounds and were similar in accessibility to natural sequences identified by the experiment (FIG.5B). This trend was also upheld by two other independent oracles (FIG.5B).

[0109] Particular embodiments can create a pool of constructed sequences. From the test set, particular embodiments can call motifs using ARGMINN 100 and sort into “patterns” (i.e., which motifs are present in that sequence). Particular embodiments can further filter patterns for sufficiently high count and only those which matches to a known motif. For example, there may be 613 count for the pattern of TEAD2; there may be 559 count for the pattern of FOXL2; there may be 448 count for the pattern of CTCF; and there may be 115 count for the pattern of CTCF-TEAD2. For each pattern, particular embodiments can sample a set of originalACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 24 of 66 sequences to apply the design algorithm to (32 for single-motif patterns, 128 for double-motif patterns). Altogether, there may be 2624 sequences (200 bp each).

[0110] As can be seen, the disclosed embodiments may have another technical advantage of generalizability across tasks, as the disclosed embodiments can be applicable to multiple regulatory genomics tasks (e.g., TF binding, accessibility prediction) without requiring task- specific modifications. Theoretical Results

[0111] For a MI architecture, ARGMINN 100 can be highly interpretable, yet uniquely retain high expressivity. Here, this disclosure shows that ARGMINN 100 is capable of learning any possible configuration of motifs—including positional and syntactic constraints—as long as the constraints are definable in first-order logic.

[0112] Theorem 1. Every configuration of motif / subsequences which is definable by a sentence in first-order logic (with positional variables) is recognizable by an ARGMINN classifier.

[0113] Furthermore, ARGMINN 100 can be more expressive than previous interpretable architectures for regulatory genomics, such as ExplaiNN, which learns an output label from a linear combination of motif strengths:

[0114] Corollary 1.1. There exists a configuration of first-order-logic-expressable motif / subsequences which is not recognizable by any ExplaiNN classifier.

[0115] Intuitively, the motif-scanning module of ARGMINN 100 may learn motifs and output binding strengths by encoding the position-weight matrix of a different motif in each filter. With a sufficiently expressive positional encoding, the syntax-building module may then learn syntax / interactions between motif instances. Each attention head may learn a single syntactical “rule” (i.e., possible combination of motifs), and these rules may be built up in complexity over layers (i.e., kth-order interactions are learned by the kth layer). This disclosure formally proves Theorem 1 and Corollary 1.1 in Appendix A. Experimental Follow-up to Theoretical Results

[0116] To empirically reinforce the theoretical results, particular embodiments consider the REST binding motif, which consists of two halves which must bind together (with variable spacings) (FIG. 3B). Notably, both halves may need to bind in the same orientation and order (half sites cannot be mixed / matched). On a simulated REST dataset which explicitly tests these complex requirements, ARGMINN 100 achieved over 90% test-set accuracy, whereasACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 25 of 66 ExplaiNN only achieved 73.4%. This demonstrates that ARGMINN 100 is sufficiently expressive to capture complex grammars and syntax between motifs, which previous architectures could not. Discussion

[0117] This disclosure illustrated ARGMINN’s 100 unique ability to reveal genome- regulatory motifs and their syntax directly from its weights and activations—an advantage which may be entirely absent from traditional (non-MI) DNNs. This disclosure then compared the predictive performance of ARGMINN 100 to traditional CNNs and ExplaiNN (FIG. 16, Table 6). It is generally well known that more interpretable models may suffer slightly in predictive performance. This is expected, as these models tend to base decisions on human- interpretable concepts (e.g., crucial motifs), instead of spurious signals which can be informative, but are not useful for understanding regulatory genomics (e.g., GC content, exceptionally rare motifs, etc.). The disclosed empirical results fall in line with these expectations. On simulated datasets where particular embodiments ensured that the only informative signals are motifs, ARGMINN 100 achieved superior performance compared to the baselines. On experimental datasets with many more spurious signals, ARGMINN 100 achieved competitive performance, but did not outperform its non-MI counterparts.

[0118] Additionally, to further show the benefit of the disclosed filter regularizer, particular embodiments applied the regularization to a traditional CNN. As a result, the CNN’s filters also encoded relevant and non-redundant motifs (FIG.17). This shows that the disclosed novel regularizer can be readily applied to standard genomic DNNs to achieve more interpretable first-layer filters in general. Importantly, however, without the other architectural novelties of ARGMINN 100, such a DNN would still not reap benefits such as motif-instance and syntax discovery.

[0119] Finally, particular embodiments explored the robustness of ARGMINN 100 to the loss weights for the disclosed regularizers. Over many orders of magnitude, ARGMINN’s 100 predictive performance and interpretability both remained robust to the loss weights (FIG.17). This may be partially due to the design of these regularizers, which are aimed to synergize with predictive performance and the learning of biological motifs, rather than compete with other losses.

[0120] Mechanistic interpretability may be still a nascent field, and the embodiments disclosed herein pioneer an architecture that enables direct interpretation with minimal postACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 26 of 66 hoc analysis. To our knowledge, ARGMINN 100 may be the most MI (yet still expressive) architecture for genome regulation—a field where understanding a model’s underlying decision rules is equally critical as its accuracy—and is one of the few intrinsically MI architectures of its complexity in general. This disclosure showed that ARGMINN 100 is expressive enough to accurately predict genome regulation yet is uniquely constrained so that the weights and activations directly encode the model’s decision process in a human- interpretable way. As a result, the disclosed embodiments may have another technical advantage of efficiency and scalability as the disclosed embodiments can eliminate the need for computationally expensive post hoc pipelines, reducing time and resource requirements for motif analysis.

[0121] Besides the embodiments disclosed herein, the ARGMINN 100 architecture can be applied in additional applications as follows.

[0122] One example application can apply the unique attention mechanism disclosed herein to other data types and problems to learn and interpret interactions and decision rules. This disclosure started with motifs as individual “concepts” and used the disclosed attention mechanism to learn and also decipher / reveal the logical combinations and syntax between them. One can also apply the disclosed attention mechanism to other forms of data where one would like to learn / understand the logical syntax between concepts. As an example and not by way of limitation, the data can be natural language text (syntax between words or strings of words). As another example and not by way of limitation, the data can be images (how different parts of an image interact with each other to create a scene with meaning). As yet another example and not by way of limitation, the data can be molecules (logical combinations / syntax between functional groups). Unlike motifs in a sequence or objects in an image, functional groups in molecules have positions which are not indexed along a line or a plane, but one can modify the positional encoding to deal with this easily.

[0123] Another example application can apply the disclosed filter regularization to other data types and problems to learn a clean set of concepts. As described above, the disclosed regularizer can make sure that one can identify individual concepts or “pieces” of the input, on which logical syntax is based (i.e., motifs in a sequence). This can be done by making sure that each part of the input (e.g., base in the sequence) is “protected”, and that at most one concept / motif can rely on each part. One can also apply a similar technique to learning concepts in text, images, and molecules. This could allow for identifying human-interpretable concepts (for direct interpretation, or to use with concept-bottleneck models) from other domains in a deACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 27 of 66 novo fashion. This would be a particularly useful and novel application, as very few (if any) works are able to perform de novo concept discovery.

[0124] Another example application can be combining the disclosed attention mechanism and the disclosed regularizer. For example, one can learn clean functional group-based concepts in molecules using the disclosed regularizer, and then use the disclosed attention mechanism to learn the syntax between them).

[0125] In addition, other applications may include extending mechanistic interpretations from local explanations (per example) to global understandings across a dataset, streamlined generation of cell-type-specific promoters and enhancers, and incorporation into sequence foundation models to improve interpretability using an ARGMINN-like architecture in collaboration with ReLU, etc. Appendix A – Supplementary Proofs A.1 Proof of Theorem

[0126] In this section, this disclosure proves that every configuration of motifs (which is definable by a first-order-logical sentence with position-indexed variables) is recognizable by an ARGMINN 100 classifier. This disclosure will first show that ARGMINN’s 100 motif- scanning module is sufficiently expressive to characterize motif-based protein binding, and then subsequently that the syntax-building module can recognize arbitrary logical syntax between these binding sites.

[0127] The proof begins with the following biophysical assumptions which justify our modeling of motif biology by first-order logic (with position-indexed variables). One biophysical assumption may be that, for binary biological readouts of interest (e.g., protein- binding measured by ChIP-seq, DNA accessibility measured by DNase-seq, etc.), the readout is fully characterized by the binding of proteins, which recognize motifs in the sequence.

[0128] Another biophysical assumption may be that the free concentration of any particular protein is constant across training and testing conditions.

[0129] Another biophysical assumption may be that, for a given potential binding site (e.g., a motif instance in a DNA sequence), the binding strength and likelihood of binding of a specific protein (these quantities are related through statistical mechanics) can be sufficiently summarized by a single scalar value (related to the OW, or dissociation constant). Through statistical mechanics, the fraction / probability of binding is"mn&Po^"mn&.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 28 of 66

[0130] Another biophysical assumption may be that the OWvalue (or a monotonic function of it) can be computed as an independently additive function of individual positions of the binding site. An example of this is the PWM (position weight matrix), which has been shown to be a good approximation of binding mechanics.

[0131] Another biophysical assumption may be that input sequences are a finite length l.

[0132] Another biophysical assumption may be that, given real-valued variables real- valued variables ^p,]representing the binding strength of motif m at position p in a sequence, the binary biological readout (e.g., binding of a particular protein of interest or accessibility) of the sequence as a whole can be expressed as the following disjunction of statements: ^q ∶= r s--9^where s- is a statement denoting a possible configuration of motifs that induces a positive biological readout. Each s- has the following form: s- ∶= t^pA,u,vA,u ≥ x-,^y ∧ ⋅ ⋅ ⋅ ∧ t^pA,o,vA,o ≥ x-,Wy.That is, s- defines[ ≥ 1 binding motifsJ-,^,⋅ ⋅ ⋅, J-,W exist with sufficient strength at positions c-,^,⋅ ⋅ ⋅, c-,W. Note that with finitesequences, all possible statements about combinations of motifs (expressable in first-order logic) can be written in this form, by the Disjunctive Normal Form Theorem.

[0133] Below, this disclosure proceeds with the proof by constructing an instantiation of the ARGMINN 100 architecture where the particular instantiation implements / recognizes a sentence σ.

[0134] Given the above biophysical assumptions, the motif-scanning module’s convolutional filters are sufficiently expressive to capture the binding strengths / likelihoods of each position for each potential binding motif.

[0135] Particular embodiments design this module to have nf filters equal to the number of unique motifs m in σ, with width w equal to the maximum width of any motif. Particular embodiments set the multiplicative weights of each filter with the PWM of each motif, so that this module precisely implements the PWM-scanning procedure that is common in the field of regulatory genomics. For this proof, this disclosure sets the bias to be 0. Thus, the motif- scanning module outputs a set of binding strengths for each position of the sequence, for each possible motif. In other words, this module outputs ^p,]for each relevant motif m, at each position p. This constitutes the motif activations A of the model.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 29 of 66

[0136] Now particular embodiments design an instantiation of the syntax-building module which captures the logic in σ. In particular, the disclosed model will produce a pre-sigmoid output which is positive if and only if σ is true.

[0137] The input to the syntax-building module is the concatenation of motif activations A(which is the matrix of binding strengths ^p,]) and the positional encodingsK: "^ ∥ K&. Forease of proof, let the positional encodings P be a one-hot-encoded vector of size l, denotingposition. This disclosure will use the notation "^ ∥ K&] to denote the column vector at positionp, which is an (^^ + })-dimensional vector where the first ^^ entries contain the bindingstrengths / activations of each motif at position p, and the latter l entries contain a one-hot encoding of position p.

[0138] Recall that within σ, n is the number of statements in disjunction. Let [pH~be the maximum length of any of the s-^. For simplicity of our proof and construction, particular embodiments pad every s- to exactly [pH~clauses by adding “dummy motif clauses”.For example, let us pad (^B,B ≥ xp-^), where xp-^ is the smallest possible motifactivation achieved through the motif- module. This simply checks that somearbitrary motif (index 0) at some arbitrary position (position 0) has the minimal activation, which will always be true.

[0139] Let the memory vector J^ be of dimension ^(^^ + }). Additionally, this disclosuredefines the dimension of the query / key / value vectors be ^^ + }.

[0140] The proof (like many other similar proofs) relies on the universal approximation theorem of feed-forward networks (FFNs). This disclosure also leverages a lemma from a conventional work, which shows that in an FFN, residual connections can effectively be ignored (which simplifies the construction of the disclosed network).

[0141] This disclosure proceeds with induction on [pH~, where the disclosed syntax- building module has [pH~attention layers, with n heads for each layer (one head for every s-). Base case: ^^^^ = ^

[0142] Consider [pH~ = 1. In this case, each s- can be written as s- ∶= ^p-,]- ≥ x-. Thatis, s- is true if and only if motif J- at position c- is strong enough.

[0143] Now particular embodiments instantiate a single-attention-layer syntax-building module with n attention heads. Particular embodiments repeat the following for each head independently:ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 30 of 66

[0144] For each head i, particular embodiments learn to recognize s-. Recall that the memory vector JBis initialized to be all 1s.

[0145] Let ^N,Bmap JBto a single vector where the first ^^entries are a one-hot encoding where the 1 is in the position of motif J-, and the latter l entries are a one-hot encoding wherethe 1 is in the position c-. Let ^P,B = ^S,B = ^^^^^, the identity matrix of appropriate size:LB = ^N,BJB = "0 … 010 … 0 | 0 … 010 … 0&⊺where the 1 is at the right block.O =B= = = "^ ∥ K&

[0146] The dot product of every key vector with the query vector will then be 0, except for position pi, which will have the value of ^pA,]A. Thus, after scaled dot-product attention, the final vector being passed to the feed-forward network (FFN) is equivalent to the value vector corresponding to position c- (which is equivalent to the motif activations / positional encodingat position c-):'BQB = "^ ∥ K&]A

[0147] With all attention headsobtain a concatenated vector of size^(^^ + }), where every contiguous ith block of ^^ + } entries corresponds to s-, and containsthe "^ ∥ K&]A.

[0148] Particular embodiments then design the disclosed FFN to map from this vector to our final memory stream J^. In particular, this FFN will produce an output vector of the samesize, where every contiguous ith block of ^^ + } entries contains all − ^^^^^ if ^pA,]A < x- andl^a l^^^^otherwise. This disclosure invokes the lemma from thework and the Universal Approximation Theorem to perform this step.

[0149] The final linear projection layer (which takes J^ and maps to an output predictiona^) has weights of all 1 and bias of 0.

[0150] Together, this ensures that the output a^ > 0 if and only if there exists an i such that^pA,]A > x- (i.e., s- is true).= ^

[0151] This disclosure proceeds with a similar structure as with the above base case. In the first layer, this disclosure defines ^N,B, ^P,B, ^S,Bidentically as above. However, after theACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 31 of 66 first attention layer, particular embodiments design the FFN differently so that J^contains information about the next motif within s- to search for.

[0152] In particular, consider some s- ∶= ^^pA,u,]A,u ≥ x-,^^ ∧ ^^pA,^,]A,^ ≥ x-,l^. In thefirst attention layer, this disclosure defines ^S,Bas above, sothat the vector passed to the FFN is aA,u

[0153] This FFN will produce J^, where every contiguous ith block of ^^ + } entriescontain all 1s if ^pA,u,]A,u ≥ x-,^, and all 0s otherwise.

[0154] Next, the second attention layer will identify the second motif s-. In this second layer, ^Nis the identity matrix with all rows zeroed out except for the row corresponding to motif J and position c . That is, this creates a query vector for each head-,l -,lwhich is similar to that in the previous base case: a vector of ^^ + } entries where the first ^^is all 0 except for the position of J-,l, and the latter lare all 0 except for the positionc-,l (however, note that if the first motif J-,^ was not found at position c-,^, then the queryvector will be all 0s). Again, we let ^P,^ = ^S,^ = ^:L^ = ^N,^J^ = "0 ⋅ ⋅ ⋅ 010 ⋅ ⋅ ⋅ 0 | 0 ⋅ ⋅ ⋅ 010 ⋅ ⋅ ⋅ 0&⊺where the 1 is atthe right block. Ifthe first motif J-,^ was not found, then this vector will be all 0s.O^ = ^P,^"^ ∥ K& = "^ ∥ K& Q^ = ^S,^"^ ∥ K& = "^ ∥ K&

[0155] This disclosure then follows the same construction as with the previous base case, where the second FFN produces the final memory stream J based on comparing each ^l pA,^]A,^to x : every contiguous ith block of ^ + } entries contains all − ^-,l ^ ^^^^ if ^pA,^]A,^ < x-,l, and^all otherwise. If, however, themotif J was not the FFN will always-,^^ ^^^negative numbers (in this case, the query vector is all 0s, and the latter l entries of the ith block in the input to the FFN will be a smeared fraction rather than a one-hot encoding). The final projection layer will be the same as with the first base case, leading to the desired outcome. Inductive case

[0156] This disclosure completes the inductive proof for a general [ , as thepH~construction of the architecture with [ layers is a straightforward extension from the basepH~cases.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 32 of 66

[0157] This disclosure assumes that in the first [pH~− 1 layers, the memory streamJW^^^^^ is structured as contiguous blocks of ^^ + } entries, where the ith block is such thatit contains all 1s if and only if ^pA,^]A,^ ≥ x-,7 for all E < [pH~ and all 0s otherwise. Particularembodiments then structure our final [pH~th of the attention mechanism similarly to thesecond layer in the base case of= 2.A.2 Proof of Corollary

[0158] Here, this disclosure proves that there exists a configuration of motifs specified by first-order logic, which is not recognizable by ExplaiNN.

[0159] Consider a dataset of sequences defined by the presence of distinct motifs A, B, C, D. Every sequence has exactly two instances of such motifs. A positive sequence is defined by having both A and B, or both C and D. A negative sequence is defined by any other combination: AC, BD, AD, or BC. This constructed example is a realistic one, as it is the binding rule seen in transcription factors with two half sites (e.g., REST), or co-factor binding where the motifs and transcription factors are unidirectional (e.g., JUND and TEAD).

[0160] Within ExplaiNN, each CNN “unit” learns the presence of one such motif and returns a scalar score. Let there be four CNN units, one for each motif. For each inputsequence, we obtain four such scores: ^@, ^^ , ^^ , ^^.

[0161] Each CNN unit consists of a single convolutional filter whose activation is maximized by the motif it learns. For simplicity, this disclosure assumes that given a convolutional filter that learns substring X, the distribution of activations of that filter on background sequences is identical to the distribution of activations on non-X motifs. This could be realized, for example, by motifs whose composition is base / letter-wise distributed identically to the background (e.g., uniform). Thus, for a convolutional filter which recognizes X, the distribution of its activations is identical across all non-X substrings. Given sufficiently long sequences, the CNN unit for some motif X will output a scalar score as follows: if X is inthe sequence, ^^ = c^, a score for “positives”; if X is not present ^^ = ^^ ≠ c^, a score for“negatives”.

[0162] Given these CNN units, suppose it is possible to distinguish positive and negativesequences with a linear combination, as in ExplaiNN. The output of the model is %@^@ +%^^^ + %^^^ + %^^^ + ^ for scalar weights %@, ⋅ ⋅ ⋅, %^ and bias ^.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 33 of 66

[0163] For the classifier to be sufficiently expressive, this disclosure requires that positive examples have a final output that is at least some threshold ^, and negative examples to have an output that is strictly less than ^.

[0164] Thus, this disclosure has the following inequalities (one for each possible pair ofmotifs):%@c@ + %^c^ + %^^^ + %^^^ + ^ ≥ ^%@^@ + %^^^ + %^c^ + %^c^ + ^ ≥ ^%@c@ + %^^^ + %^c^ + %^^^ + ^ < ^%@c@ + %^^^ + %^^^ + %^c^ + ^ < ^%@^@ + %^c^ + %^c^ + %^^^ + ^ < ^%@^@ + %^c^ + %^^^ + %^c^ + ^ < ^

[0165] Adding⋅⋅ ⋅ ≥ − ^)⋅ ⋅ ⋅ − ^)

[0166] This is a contradiction, as this requires %@ + + ⋅ ⋅ ⋅ +%^(c^ + ^^) to beboth at least 2(^ − ^) and strictly less than 2(^ − ^).

[0167] Thus, ExplaiNN is not sufficiently expressive to capture every configuration of motifs expressable in first-order logic (e.g., exclusive disjunctions). Appendix B – Supplementary Figures and Tables

[0168] FIGS. 9A-9C illustrate example attribution scores for input sequences. From a single traditional CNN model trained on TAL / GATA binding, FIGS. 9A-9C show the attribution scores for the same five input sequences, computed using three different methods: integrated gradients (FIG.9A), DeepLIFTShap (FIG.9B), and in silico mutagenesis (FIG.9C). The locations of the true motifs are highlighted by the red box in each example. Although this model achieves near perfect test accuracy, the importance scores remain unreliable and noisy. Regardless of the method, it is difficult to even identify where the motif is from these score tracks, let alone what the motif is. Additionally, the methods disagree heavily with each other, even showing different signs (positive vs negative) in importance for the true motifs.

[0169] FIG.10 illustrates example motifs discovered by different methods on a simulated TAL / GATA dataset. FIG. 10 shows all motifs discovered by: 1) ARGMINN 100, 2) interpreting the first-layer filters of a traditional CNN, 3) ExplaiNN, and 4) running MoDISco on DeepLIFTShap importance scores. Each motif is labeled with the most similar motif fromACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 34 of 66 the simulation, using TOMTOM. Motifs which are not sufficiently similar to any of the motifs in the simulation (as determined by TOMTOM’s default thresholds), remain unlabeled. FIG. 10 also shows the true motifs used in the simulation.

[0170] FIG. 11 illustrates example motifs discovered by different methods on an experimental dataset of FOXA2 binding in HepG2. FIG.11 shows all motifs discovered by: 1) ARGMINN 100, 2) interpreting the first-layer filters of a traditional CNN, 3) interpreting the first-layer filters of a dilated CNN, 4) ExplaiNN, 5) running MoDISco on DeepLIFTShap importance scores from the traditional CNN, and 6) running MoDISco / DeepLIFTSHap on the dilated CNN. Each motif is labeled with the most similar known human motif, using TOMTOM. Motifs which are not sufficiently similar to any known human motif (as determined by TOMTOM’s default thresholds), remain unlabeled. FIG.11 also shows ground-truth motifs from JASPAR which are supported by external literature.

[0171] FIG. 12 illustrates example motifs discovered by different methods on an experimental dataset of DNase accessibility in HepG2. FIG. 12 shows all motifs discovered by: 1) ARGMINN 100, 2) interpreting the first-layer filters of a traditional CNN, 3) interpreting the first-layer filters of a dilated CNN, 4) ExplaiNN, 5) running MoDISco on DeepLIFTShap importance scores from the traditional CNN, and 6) running MoDISco / DeepLIFTSHap on the dilated CNN. Each motif is labeled with the most similar known human motif, using TOMTOM. Motifs which are not sufficiently similar to any known human motif (as determined by TOMTOM’s default thresholds), remain unlabeled. FIG.12 also shows ground-truth motifs from JASPAR which are supported by external literature.

[0172] FIG. 13 illustrates example motifs discovered by different methods on an experimental dataset of DNase accessibility in HL-60. FIG.13 shows all motifs discovered by: 1) ARGMINN 100, 2) interpreting the first-layer filters of a traditional CNN, 3) interpreting the first-layer filters of a dilated CNN, 4) ExplaiNN, 5) running MoDISco on DeepLIFTShap importance scores from the traditional CNN, and 6) running MoDISco / DeepLIFTSHap on the dilated CNN. Each motif is labeled with the most similar known human motif, using TOMTOM. Motifs which are not sufficiently similar to any known human motif (as determined by TOMTOM’s default thresholds), remain unlabeled. FIG.13 also shows ground-truth motifs from JASPAR which are supported by external literature.

[0173] FIG. 14 illustrates additional examples of motif-instance quality, comparing ARGMINN 100 with the traditional method of sequence-scanning using FIMO. As before, particular embodiments rank motif instances by confidence (attention score from ARGMINNACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 35 of 66 100, or FIMO hit q-value), and compute the fraction of true motif instances that are covered in a top-k fashion. This disclosure also compares the disclosed method to using FIMO to scan with ARGMINN-discovered motifs.

[0174] Table 1 shows identification and redundancy of discovered motifs. The number of times each relevant motif was discovered by each method. A value of 0 means the motif was not discovered at all. Values greater than 1 indicate redundancy. This disclosure compared ARGMINN (ARG) to a traditional CNN (T-CNN), a dilated CNN (D-CNN), and ExplaiNN (ExpNN). For the traditional and dilated CNNs, motifs can be discovered from filters (f) or DeepLIFTShap / MoDISco (M). Dataset Relevant motif ARG T-CNN (f) D-CNN (f) ExpNN T-CNN (M) D-CNN (M) SPI1 SPI1 1 4 4 2 8 7 TAL / GATA TAL 1 1 4 3 15 1 GATA1 1 1 2 2 10 0 E2F6 E2F6 1 2 1 3 13 1 MAX 1 1 0 2 5 0 JUND / TEAD JUND-TRE 1 3 3 3 23 1 JUND-CRE 1 1 0 2 5 3 REST REST-left 1 1 1 1 5 5 REST-right 1 1 2 3 2 7 SPI1 1 2 2 2 2 5 CTCF 1 1 1 2 0 0 CTCF (HepG2) CTCF 2 4 5 3 14 4 FOX 1 3 0 1 2 13 FOXA1 (HepG2) HNF4 1 0 0 1 0 0 CEBF 1 0 0 1 0 0 HNF 2 0 1 2 0 2 TEAD 1 0 0 0 0 0 DNase (HepG2) CTCF 3 7 5 6 26 7 FOX 1 3 1 1 2 1 CEBF 1 0 0 0 0 2 FOS::JUN 1 0 0 1 0 1 RUNX 1 0 0 1 0 0 CTCF 2 7 8 9 31 1 DNase (HL-60) FOX 0 2 2 1 5 0 CEBF 2 1 1 2 0 1 SPI1 1 1 1 0 0 2 FOSL2::JUN 1 2 1 1 0 1 DNase (K562) CTCF 3 8 7 8 25 6 GATA 1 1 0 2 0 1 Table 1: Identification and redundancy of discovered motifs

[0175] Table 2 shows similarity of discovered motifs to ground truth. Similarity of closest motif was discovered by each method to each relevant motif. If a method did not discover a motif, it is given a similarity of 0. This disclosure compared ARGMINN (ARG) to a traditional CNN (T-CNN), a dilated CNN (D-CNN), and ExplaiNN (ExpNN). For the traditional and dilated CNNs, motifs can be discovered from filters (f) or DeepLIFTShap / MoDISco (M). Dataset Relevant motif ARG T-CNN (f) D-CNN (f) ExpNN T-CNN (M) D-CNN (M)ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 36 of 66 SPI1 SPI1 11.086 1.575 10.146 4.866 8.731 9.466 TAL / GATA TAL 8.296 6.981 8.666 2.753 7.816 10.292 GATA1 7.499 1.819 6.477 4.130 5.504 0 E2F6 E2F6 8.068 6.333 1.734 5.341 7.007 5.955 MAX 4.128 0.711 0 1.966 3.994 0 JUND / TEAD JUND-TRE 7.105 2.640 2.723 4.512 7.626 6.252 JUND-CRE 6.171 1.489 0 2.798 6.140 7.032 REST REST-left 13.426 0.398 0.588 1.778 9.186 10.700 REST-right 12.773 0.753 2.419 4.067 5.427 9.898 SPI1 / CTCF SPI1 9.691 6.930 4.882 6.952 9.938 9.038 CTCF 13.543 2.087 0.805 7.425 0 0 CTCF (HepG2) CTCF 21.851 6.759 7.922 16.376 12.400 22.205 FOX 5.705 2.750 0 4.869 6.053 4.638 FOXA1 (HepG2) HNF4 7.439 0 0 4.544 0 0 CEBF 5.826 0 0 1.003 0 0 HNF 6.347 0 1.269 5.887 0 3.937 TEAD 8.731 0 0 0 0 0 DNase (HepG2) CTCF 25.669 23.820 16.093 19.553 4.247 25.579 FOX 6.977 1.331 2.197 3.811 1.823 7.408 CEBF 4.801 0 0 0 0 0.785 FOS::JUN 9.938 0 0 1.937 0 5.422 RUNX 4.822 0 0 3.295 0 0 CTCF 25.281 6.305 7.396 16.583 5.113 22.841 DNase (HL-60) FOX 0 2.462 4.550 4.188 1.342 0 CEBF 5.061 4.751 3.977 4.078 0 8.899 SPI1 11.229 7.415 7.430 0 0 10.189 FOSL2::JUN 7.702 7.711 7.013 5.171 0 6.788 DNase (K562) CTCF 23.528 6.071 4.039 13.120 2.332 26.262 GATA 9.386 0.505 0 6.999 0 0.521 Table 2: Similarity of discovered motifs to ground truth

[0176] Table 3 shows extraneous discovered motifs. The number of extraneous motifs (i.e., those which do not match any known relevant motif) was found by each method for each dataset. This disclosure compared ARGMINN (ARG) to a traditional CNN (T-CNN), a dilated CNN (D-CNN), and ExplaiNN (ExpNN). For the traditional and dilated CNNs, motifs can be discovered from filters (f) or DeepLIFTShap / MoDISco (M). Dataset ARG T-CNN (f) D-CNN (f) ExpNN T-CNN (M) D-CNN (M) SPI1 0 1 1 4 2 0 TAL / GATA 0 5 0 2 5 0 E2F6 0 3 6 2 0 1 JUND / TEAD 0 4 5 3 1 0 REST 0 6 3 1 0 0 SPI1 / CTCF 0 3 4 1 1 0 CTCF (HepG2) 0 1 2 3 0 4 FOXA1 (HepG2) 2 3 8 3 1 41 DNase (HepG2) 3 2 7 4 16 10 DNase (HL-60) 2 3 0 2 2 0 DNase (K562) 3 3 6 0 10 10 Table 3: Extraneous discovered motifsACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 37 of 66

[0177] Table 4 shows motif-instance precision. Table 4 shows precision values for motif instances discovered by ARGMINN 100 on its own, by running FIMO on ARGMINN- discovered motifs, and by running FIMO on MoDISco-discovered motifs from the traditional CNN (T-CNN) or dilated CNN (D-CNN). Dataset ARGMINN ARGMINN / FIMO T-CNN / FIMO D-CNN / FIMO SPI1 0.9763 ± 0.004 0.9185 ± 0.017 0.9996 ± 0.000 0.8792 ± 0.037 TAL / GATA 0.9346 ± 0.010 0.9422 ± 0.003 0.9638 ± 0.001 0.9108 ± 0.004 E2F6 0.9708 ± 0.006 0.9038 ± 0.014 0.9688 ± 0.001 0.8133 ± 0.015 JUND / TEAD 0.9980 ± 0.001 0.9838 ± 0.004 1.0000 ± 0.000 0.9914 ± 0.003 REST 0.9720 ± 0.006 0.9404 ± 0.008 0.9790 ± 0.007 0.9860 ± 0.006 SPI1 / CTCF 0.9607 ± 0.008 0.9190 ± 0.043 0.8709 ± 0.041 0.8692 ± 0.006 CTCF (HepG2) 0.3720 ± 0.009 0.5178 ± 0.005 0.2788 ± 0.079 0.0740 ± 0.007 FOXA1 (HepG2) 0.1642 ± 0.007 0.1938 ± 0.025 0.1482 ± 0.003 0.1676 ± 0.004 DNase (HepG2) 0.2124 ± 0.011 0.5312 ± 0.002 0.2486 ± 0.037 0.1528 ± 0.013 DNase (K562) 0.2478 ± 0.015 0.3996 ± 0.086 0.2624 ± 0.059 0.1790 ± 0.008 Table 4: Motif-instance precision

[0178] Table 5 shows motif-instance precision. Table 5 shows recall values for motif instances discovered by ARGMINN 100 on its own, by running FIMO on ARGMINN- discovered motifs, and by running FIMO on MoDISco-discovered motifs from the traditional CNN (T-CNN) or dilated CNN (D-CNN). Dataset ARGMINN ARGMINN / FIMO T-CNN / FIMO D-CNN / FIMO SPI1 0.7128 ± 0.087 0.6676 ± 0.034 0.2024 ± 0.002 0.6470 ± 0.047 TAL / GATA 0.6693 ± 0.023 0.3961 ± 0.008 0.2420 ± 0.006 0.4307 ± 0.003 E2F6 0.3929 ± 0.054 0.3082 ± 0.023 0.2184 ± 0.002 0.3806 ± 0.012 JUND / TEAD 0.5973 ± 0.021 0.3941 ± 0.018 0.2291 ± 0.010 0.4950 ± 0.022 REST 0.4386 ± 0.032 0.3444 ± 0.010 0.2658 ± 0.018 0.3457 ± 0.013 SPI1 / CTCF 0.8620 ± 0.026 0.5834 ± 0.038 0.5282 ± 0.048 0.6820 ± 0.012 CTCF (HepG2) 0.0058 ± 0.000 0.0051 ± 0.000 0.0028 ± 0.001 0.0012 ± 0.000 FOXA1 (HepG2) 0.0036 ± 0.000 0.0038 ± 0.001 0.0016 ± 0.000 0.0034 ± 0.000 DNase (HepG2) 0.0012 ± 0.000 0.0023 ± 0.000 0.0007 ± 0.000 0.0009 ± 0.000 DNase (K562) 0.0011 ± 0.000 0.0013 ± 0.000 0.0006 ± 0.000 0.0008 ± 0.000 Table 5: Motif-instance recall

[0179] FIG. 15 illustrates example attention scores and strength of the experimentally determined peaks at the test-set sequences. FIG.15 shows the attention scores and the strength of the experimentally determined peaks at the test-set sequences for CTCF in HepG2 (above) and FOXA1 in HepG2 (below). To avoid center bias, the test peaks were independently and randomly jittered by up to 200 bp in either direction with uniform probability. The peaks / sequences are ordered left to right by the jittered peak summit. The attention scores closely track the peak locations across sequences, which demonstrates biological support for the interpretability of the attention scores.

[0180] FIG. 16 illustrates example predictive performance of ARGMINN 100 compared to the traditional CNN, dilated CNN, and ExplaiNN. All models are given the same numberACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 38 of 66 and size of convolutional filters, and the overall complexity / capacity of the models are kept as similar as possible for comparison.

[0181] Table 6 shows model performance measured in accuracy comparing ARGMINN 100, a traditional CNN, a dilated CNN, and ExplaiNN. All models are given the same number and size of convolutional filters, and the overall complexity / capacity of the models are kept as similar as possible for comparison. Dataset ARGMINN Trad. CNN Dil. CNN ExplaiNN SPI1 0.8816 ± 0.006 0.8859 ± 0.004 0.7539 ± 0.052 0.8848 ± 0.005 TAL / GATA 0.8738 ± 0.006 0.8409 ± 0.002 0.7558 ± 0.025 0.8594 ± 0.004 E2F6 0.8672 ± 0.011 0.8819 ± 0.004 0.7605 ± 0.025 0.8936 ± 0.005 JUND / TEAD 0.9806 ± 0.002 0.9786 ± 0.001 0.7970 ± 0.050 0.9797 ± 0.002 REST 0.8602 ± 0.008 0.8017 ± 0.010 0.6933 ± 0.012 0.8562 ± 0.006 SPI1 / CTCF 0.8912 ± 0.007 0.8311 ± 0.008 0.6197 ± 0.007 0.8917 ± 0.005 CTCF (HepG2) 0.7718 ± 0.002 0.7732 ± 0.001 0.7620 ± 0.004 0.7784 ± 0.001 FOXA1 (HepG2) 0.7297 ± 0.003 0.7291 ± 0.002 0.6895 ± 0.007 0.7412 ± 0.002 DNase (HepG2) 0.7315 ± 0.001 0.7295 ± 0.001 0.7283 ± 0.003 0.7424 ± 0.001 DNase (HL-60) 0.7547 ± 0.001 0.7572 ± 0.001 0.7645 ± 0.002 0.7658 ± 0.001 DNase (K562) 0.7645 ± 0.001 0.7650 ± 0.001 0.7603 ± 0.001 0.7712 ± 0.001 DNase (GM12878) 0.7565 ± 0.001 0.7479 ± 0.001 N / A 0.7621 ± 0.001 Table 6: Model performance (accuracy)

[0182] Table 7 shows model performance measured in auROC comparing ARGMINN 100, a traditional CNN, a dilated CNN, and ExplaiNN. All models are given the same number and size of convolutional filters, and the overall complexity / capacity of the models are kept as similar as possible for comparison. Dataset ARGMINN Trad. CNN Dil. CNN ExplaiNN SPI1 0.9491 ± 0.004 0.9534 ± 0.003 0.8298 ± 0.046 0.9474 ± 0.004 TAL / GATA 0.9461 ± 0.004 0.9162 ± 0.004 0.8187 ± 0.025 0.9421 ± 0.003 E2F6 0.9368 ± 0.010 0.9423 ± 0.002 0.8491 ± 0.018 0.9549 ± 0.003 JUND / TEAD 0.9956 ± 0.001 0.9952 ± 0.001 0.8854 ± 0.034 0.9957 ± 0.001 REST 0.9324 ± 0.007 0.8776 ± 0.013 0.7781 ± 0.013 0.9310 ± 0.003 SPI1 / CTCF 0.9576 ± 0.005 0.9046 ± 0.009 0.6842 ± 0.004 0.9529 ± 0.003 CTCF (HepG2) 0.8488 ± 0.001 0.8499 ± 0.001 0.8394 ± 0.004 0.8572 ± 0.001 FOXA1 (HepG2) 0.8075 ± 0.003 0.8073 ± 0.001 0.7591 ± 0.013 0.8227 ± 0.002 DNase (HepG2) 0.8143 ± 0.001 0.8104 ± 0.001 0.8113 ± 0.003 0.8255 ± 0.001 DNase (HL-60) 0.8369 ± 0.001 0.8399 ± 0.001 0.8479 ± 0.002 0.8493 ± 0.001 DNase (K562) 0.8487 ± 0.001 0.8499 ± 0.001 0.8496 ± 0.001 0.8580 ± 0.001 DNase (GM12878) 0.8390 ± 0.000 0.8299 ± 0.001 N / A 0.8445 ± 0.001 Table 7: Model performance (auROC)

[0183] Table 8 shows model performance measured in auPRC comparing ARGMINN 100, a traditional CNN, a dilated CNN, and ExplaiNN. All models are given the same number and size of convolutional filters, and the overall complexity / capacity of the models are kept as similar as possible for comparison. Dataset ARGMINN Trad. CNN Dil. CNN ExplaiNN SPI1 0.9531 ± 0.003 0.9584 ± 0.003 0.8269 ± 0.050 0.9477 ± 0.004 TAL / GATA 0.9501 ± 0.004 0.9268 ± 0.003 0.8326 ± 0.026 0.9443 ± 0.003ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 39 of 66 E2F6 0.9442 ± 0.009 0.9470 ± 0.002 0.8468 ± 0.022 0.9576 ± 0.003 JUND / TEAD 0.9940 ± 0.002 0.9929 ± 0.002 0.8742 ± 0.036 0.9942 ± 0.002 REST 0.9337 ± 0.006 0.8589 ± 0.019 0.7604 ± 0.014 0.9299 ± 0.004 SPI1 / CTCF 0.9570 ± 0.006 0.8944 ± 0.012 0.6728 ± 0.008 0.9503 ± 0.004 CTCF (HepG2) 0.8543 ± 0.001 0.8534 ± 0.001 0.8385 ± 0.005 0.8585 ± 0.000 FOXA1 (HepG2) 0.8013 ± 0.004 0.8044 ± 0.003 0.7368 ± 0.021 0.8198 ± 0.002 DNase (HepG2) 0.8135 ± 0.001 0.8073 ± 0.001 0.8077 ± 0.004 0.8215 ± 0.001 DNase (HL-60) 0.8326 ± 0.002 0.8365 ± 0.001 0.8411 ± 0.002 0.8435 ± 0.001 DNase (K562) 0.8441 ± 0.001 0.8460 ± 0.001 0.8460 ± 0.001 0.8534 ± 0.001 DNase (GM12878) 0.8367 ± 0.001 0.8288 ± 0.002 nan ± nan 0.8419 ± 0.001 Table 8: Model performance (auPRC)

[0184] FIG.17 illustrates example motifs extracted from the first-layer filters after appling the disclosed filter regularizer to a traditional CNN architecture. Particular embodiments applied the disclosed filter regularizer (i.e., Equation 2 and Equation 4) to the traditional CNN architecture, and show the resulting motifs extracted from the first-layer filters. With the filter regularization, the traditional CNN attains the ability to show clean, non-redundant, relevant motifs in its filters. Thus, the disclosed filter regularizer is able to turn even traditional neural networks into more mechanistically interpretable architectures. Importantly, although a traditional CNN with the disclosed filter regularizer can now reveal discovered motifs, without the disclosed unique attention mechanism (i.e., Equation 3), it still is unable to easily reveal motif instances and syntax. As such, these partially interpretable architectures would still need to rely on traditional motif-instance-scanning algorithms.

[0185] FIG.18A illustrates example effect of the filter-overlap weights on the performance and interpretability of ARGMINN 100. FIG.18B illustrates example effect of the filter-L1 loss weights on the performance and interpretability of ARGMINN 100. FIGS.18A-18B also show the effect of the loss weights on the value of the filter-overlap and filter-L1 loss itself. Interpretability is measured by the maximum similarity of the discovered motifs to true motif. In general, ARGMINN’s 100 predictive performance and interpretability remain largely invariant to the loss weights over a wide range of orders of magnitude. Appendix C – Supplementary Methods

[0186] Particular embodiments trained all of our models and performed all analyses on a single Nvidia Quadro P6000. C.1 Training Data

[0187] For the simulated datasets referred in this disclosure, motif PFMs (position frequency matrices) were downloaded from JASPAR, and trimmed off low-information- content flanks. When training and testing, particular embodiments randomly generated 500 bpACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 40 of 66 sequences on the fly. Motif instances were sampled from the PFMs and inserted into a randomly sampled background (from a uniform distribution of A, C, G, and T). Motifs (or combinations of them) were randomly inserted in the central 100 bp of the background. The disclosed simulations contained motif configurations as follows.

[0188] Regarding SPI1, all positive sequences have a single instance of the SPI1 motif. Regarding TAL / GATA, 37.5% of positive sequences have a single instance of TAL1, 37.5% have a single instance of GATA1, and 25% of sequences have both (either 7, 8, or 9 bp apart). Regarding E2F6, 10% of positive sequences have a single instance of E2F6, and 90% have both E2F6 and MAX, between 30 and 60 bp apart; 50% of negative sequences have only the MAX motif, and the other 50% are random background. Regarding JUND, 25% of positive sequences have the JUND TRE motif, 25% have the JUND CRE motif, and 50% have the JUND TRE motif followed by the TEAD4 motif with a spacing of 6 bp in between. Regarding REST, all positive sequences have both the left- and right-half motifs, with a spacing of 2, 6, 7, 8, 9, 10, or 11 bp apart; 25% of negative sequences have only the left-half motif, 25% have only the right-half motif, and 50% are random background. Regarding SPI1 / CTCF, all positive sequences have a single instance of the SPI1 motif; 50% of negative sequences have SPI1 followed by the CTCF motif (either 30, 40, or 50 bp apart), and 50% are random background.

[0189] When generating simulated sequences, particular embodiments scan the random backgrounds for spurious matches and filter out such instances. Note that this is an important step for simulated datasets, as for short motifs such as GATA (6 bp), one would expect over 12% of random backgrounds to contain a perfect match by chance. This may be an issue which is much rarer in real datasets, but for the simulations, particular embodiments scan the PFMs (and their reverse complements) across the generated backgrounds (for positive and negative sequences) and ensure that no PFM attains a match score of over 0.9.

[0190] For the experimental datasets, the IDR peaks were downloaded from ENCODE for the following experiments shown in Table 9. Dataset ENCODE experiment ID IDR peaks file ID CTCF (HepG2) ENCSR607XFI ENCFF664UGR FOXA2 (HepG2) ENCSR865RXA ENCFF081USG REST (K562) ENCSR054JMQ ENCFF118ECK DNase (HepG2) ENCSR149XIL ENCFF897NME DNase (HL-60) ENCSR889WKL ENCFF773SFA DNase (K562) ENCSR000EKS ENCFF274YGF DNase (GM12878) ENCSR000EMT ENCFF073ORT Table 9: Experimental ENCODE datasetsACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 41 of 66

[0191] The positive dataset consisted of random 500 bp sequences drawn from the genome, where at least half of the 500 bp overlaps a peak (if the peak is less than 500 bp), or at least half of the peak overlaps the 500 bp (if the peak is over 500 bp). The negative dataset consisted of randomly sampled intervals from the genome. If a randomly selected negative sample overlaps a peak by more than half (or vice versa, it is relabeled as positive for the batch).

[0192] Note that when training, particular embodiments automatically use reverse- complement augmentation so that every batch contains sequences along with their reverse complements. C.2 Model Architectures

[0193] The disclosed ARGMINN 100 architecture may consist of two modules: motif scanners and a syntax builder. The motif scanners may consist of a single convolutional layerof ^^ filters, each of w bp in width (typical values are ^^ = 8, % = 10), which scan across aone-hot-encoded DNA sequence. The result may to a ReLU, and the output mayconstitute the “motif activations”.

[0194] The motif activations are concatenated with a positional encoding of dimension [ =16. The disclosed positional encoding is defined as follows:#= ^ ^ = ^# ^where i is the

[0195] Let ^ ∥ K be the motif activations andencodings concatenated together.This is passed to two consecutive memory-stream-based attention layers. The lth attentionlayer starts with a memory stream J^^^ of dimension 128 (JBis a vector of all 1s), and ^ ∥ K.In each layer, J^^^is passed through a linear layer to obtain a single query L^of dimensionequal to the dimension of each input token in ^ ∥ K. Two separate linear layers also converteach token in ^ ∥ K into a set of key vectors and value vectors (of the same dimension as theinput token). The query, keys, and values are reshaped to obtain 4 attention heads. Particular embodiments may then compute the attention scores by multiplying the query against all keys and normalizing byV[U^, where [U^is the dimension of the query / key / value vectors. Particular embodiments may then perform dropout on the attention scores with dropout rate 0.1, and softmax the scores for each attention head. These attention scores may be used to weight the value vectors in a weighted sum, which is then reshaped to reincorporate the heads. This mayACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 42 of 66 be passed through another linear layer which retains the same dimension, followed by dropout and layer normalization. This may be then fed to a 2-layer MLP with ReLU and dropout in between the two linear layers, mapping the result to the same dimension as J^^^. After a final dropout and layer norm, this may be added to J^^^to obtain J^.

[0196] After all attention layers, the final J^may be passed to a single linear layer which maps it to a scalar prediction which is passed to a sigmoid activation function (for binary prediction).

[0197] The traditional CNN in this disclosure follows an architecture which is common in the literature for single-task predictions. Particular embodiments apply 3 successive convolutional layers to the input sequence, each with ^^filters and of filter width w, 5, and 5. After each layer particular embodiments pass through a ReLU and apply batch normalization. Particular embodiments then perform max pooling with a filter size of 40 and a stride of 40. This is passed to two linear layers of 10 and 5 hidden dimensions each. After each linear layer, particular embodiments pass through a ReLU and apply batch normalization. Finally, a final linear layer maps the result to a sigmoid-activated output.

[0198] The ExplaiNN implementation in this disclosure is as follows. As with the other architectures, particular embodiments use the same number and width of first-layer convolutional filters.

[0199] Depending on the complexity of the dataset’s syntax, particular embodiments selected the ARGMINN 100 architectural hyperparameters accordingly. Note that these values were not tuned at all and were chosen at the outset based on domain knowledge and never modified. This disclosure also ensures that for each dataset, particular embodiments always use the same number and length of first-layer convolutional filters in other architectures for a fair comparison.

[0200] Table 10 shows ARGMINN architectural hyperparameters. Dataset Number of attention layers nL Number of filters nf Length of filters w SPI1 1 8 10 TAL / GATA 1 8 10 E2F6 2 8 10 JUND 1 8 10 REST 2 8 10 SPI1 / CTCF 2 8 15 CTCF (HepG2) 1 8 15 FOXA2 (HepG2) 2 8 15 REST (K562) 2 8 8 DNase (HepG2) 3 20 15 DNase (HL-60) 3 20 15 DNase (K562) 3 20 15ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 43 of 66 DNase (GM12878) 3 20 15 Table 10: ARGMINN architectural hyperparameters C.3 Training Schedules

[0201] When training, particular embodiments used a batch size of 128 with an equal number of positives and negatives (this includes the reverse-complement augmentation). For the simulated datasets in this disclosure, each training epoch consisted of 100 batches, and each validation and test epoch consisted of 10 batches. For the experimental datasets in this disclosure, particular embodiments reserved chr8 and chr10 for validation, and chr1 for test (all other autosomes along with chrX were used for training).

[0202] Particular embodiments trained all of the disclosed models for 40 epochs (regardless of architecture) and noted that the loss had converged in all cases. Particular embodiments used a learning rate of 0.001.

[0203] For ARGMINN 100, particular embodiments weighted the secondary losses as follows. bB: 0 for the first 10 epochs, increasing from 100.5to 104evenly in logarithmic space over the next 20 epochs, and stable at 104for the last 10 epochs. b^: 0 for the first 10 epochs, increasing from 10-4to 10-3evenly in logarithmic space over 20 epochs, and stable at10-3for the last 10 epochs.

[0204] For all of the disclosed models (ARGMINN 100, traditional CNN, dilated CNN, ExplaiNN), particular embodiments train 3 random initializations and select the one with the best test accuracy for downstream analyses.

[0205] Table 11 shows the training time and number of parameters in each of the compared models for a typical example (in this case, our SPI1 dataset). Note that the increased training time for ARGMINN 100 stems chiefly from the computation of the filter-overlap regularizer. The increased parameter count for ExplaiNN is due to the separation of the architecture into individual CNN towers. Model Training time (min) Number of parameters ARGMINN 15 13000 Traditional CNN 6 2100 Dilated CNN 6 1600 ExplaiNN 8 58000 Table 11. Space / time requirements of different architecturesACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 44 of 66 C.4 Analyses

[0206] To extract motif PFMs from convolutional filters, particular embodiments pass the test set through the model and compute the average of all sub-sequences (pooling together all possible sub-sequences in the test set) which activate that filter to at least 50% of the maximum activation achieved over all such windows.

[0207] Particular embodiments computed importance scores using DeepLIFTShap, integrated gradients, or in silico mutagenesis.

[0208] For DeepLIFTShap and integrated gradients, particular embodiments used PyTorch Captum. For DeepLIFTShap, particular embodiments used a reference of 10 baselines consisting of dinucleotide-shuffled sequences. Particular embodiments also recovered the hypothetical importance scores at each position, as recommended for MoDISco. For integrated gradients, particular embodiments used a baseline of all 0s.

[0209] To obtain in silico mutagenesis scores, particular embodiments computed the importance of a base by first computing the difference between the output prediction of the original sequence versus every possible mutation that made at that position. Particular embodiments mean normalize over the base dimension to obtain a set of hypothetical importance scores. The actual importance score for a position is simply the hypothetical importance score (after mean normalization) for the base actually present in the sequence at the position.

[0210] In general, particular embodiments discovered motifs using MoDISco from the traditional CNN. Particular embodiments computed importance scores over the entire positive- labeled dataset using the DeepLIFTShap algorithm as described above. Particular embodiments then ran MoDISco-lite v2.2.0 using a maximum of 10000 seqlets and default parameters.

[0211] To compute matches to known motifs, particular embodiments used TOMTOM to compute the q-value similarity between a PFM to known motifs (across all possible alignments). This disclosure reported the − log10(q) value as similarity. For simulated datasets, this disclosure reported the closest match (i.e., highest similarity) to any motif in the dataset. For experimental datasets, this disclosure reported the closest match to any relevant motif in the JASPAR human-motif database.

[0212] Note that to ensure a fair comparison, the lengths of the motifs are all the same in each dataset. For ARGMINN 100, the traditional CNN, dilated CNN, and ExplaiNN, allACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 45 of 66 models are trained with the same first-layer filter sizes. MoDISco by default outputs longer patterns, so particular embodiments trim MoDISco-discovered motifs to the same size as the filters used by other methods (maximizing the total information content in the post-trimmed window), to ensure a fair comparison.

[0213] For the analyses on motif accuracy / similarity, redundancy, and number of extraneous motifs, we needed to match each motif discovered by each method to the closest relevant motif (or none at all). To do this, particular embodiments first needed to identify the set of possible relevant motifs for each dataset. For simulated datasets, the set of relevant motifs is simply the PFMs used to create the simulation. For experimental datasets, the set of relevant motifs was defined by first running TOMTOM against all known human motifs and pooling together the top matches (by motif family) over all methods and architectures (e.g., ARGMINN 100, MoDISco, etc.). Particular embodiments used a q-value cut off of 0.5. After pooling together all the top TOMTOM matches over all methods, particular embodiments extracted a set of relevant motifs or motif families by checking for supporting literature. Any motif / family with supporting literature was kept as a relevant motif.

[0214] Finally, once the set of relevant motifs for each dataset was determined, particular embodiments matched each motif (discovered by each method) to the closest relevant motif using TOMTOM. Discovered motifs which did not match any relevant motif (using the default TOMTOM threshold) are considered extraneous.

[0215] To compute redundancy, particular embodiments counted the number of times each relevant motif was matched to by a method’s discovered motifs. We kept track of forward and reverse-complement orientations. As long as one orientation was discovered, particular embodiments considered that motif to have been found; particular embodiments computed redundancy as the maximum number of times a relevant motif was matched to (maximum over orientations). For reverse-complement symmetric motifs / families, particular embodiments did not consider orientations separately, and computed redundancy accordingly.

[0216] To compute motif accuracy, particular embodiments computed the similarity (measured by the TOMTOM q-value) of the closest motif discovered by each method to each relevant motif.

[0217] To trace back motif instances for a particular input sequence in ARGMINN 100, particular embodiments performed a forward pass and retained the motif activations and attention scores. Over all layers and all attention heads, particular embodiments examined the positions in the sequence which had an attention score of at least 0.9. Particular embodimentsACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 46 of 66 then called a motif hit if the activation for a filter at that position was at least the average activation (for that filter) over the test set.

[0218] In the analyses, particular embodiments called motif instances over the test set. To identify syntax, particular embodiments separated the input sequences by which motif instances were called, and computed the distribution of the spacings between the motif instances. To rank motif instances from ARGMINN 100, particular embodiments ranked by maximum attention score over all heads / layers at that position. To break any ties, particular embodiments used the highest motif-filter activation score at that position.

[0219] Before running FIMO on MoDISco or ARGMINN motifs, particular embodiments trimmed and filtered the motifs for high-information-content regions. Specifically, particular embodiments cut off flanks with information content lower than 0.2. Particular embodiments then required that after trimming, the motif was at least 5 bp and had an average information content of 1.0.

[0220] To scan for motif instances using FIMO, particular embodiments started with PFMs and ran FIMO v5.0.5 on test-set sequences and their reverse complements. Particular embodiments used the default FIMO parameters. To rank FIMO hits, particular embodiments used the q-value from FIMO. Particular embodiments also collapsed overlapping FIMO hits before analyzing.

[0221] To evaluate the motif instances, particular embodiments compared called motif instances to ground-truth instances. Particular embodiments computed the precision as the fraction of called instances which overlap ground-truth instances, and the recall as the fraction of ground-truth instances which overlap called instances. Particular embodiments also computed recall curves in a top-k fashion, where particular embodiments ranked the called instances (described above) and for each top k called instances, particular embodiments computed the recall relative to ground-truth instances.

[0222] For simulated datasets, the ground-truth motif instances are completely known, as they are defined at the time of sequence generation. For experimental datasets, particular embodiments obtained “ground-truth” motif instances from an independently collected set of DNA-binding footprints in various cell types. For each cell type of interest (e.g., HepG2), particular embodiments simply pooled together the footprints of all experiments from that cell type and used those as a set of ground-truth motif instances. Due to computational efficiency, particular embodiments also limited the set of called motif instances for experimental datasets to the top 10000 hits.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 47 of 66

[0223] Causal and non-causal QTLs in the GM12878 cell type were downloaded. Particular embodiments then took the disclosed models trained on GM12878 DNase accessibility, and for each putative QTL (causal or non-causal), particular embodiments computed the absolute difference in the output prediction and treated that as a score to compute precision and auROC.

[0224] To test the robustness of the disclosed models against changes in GC content, particular embodiments examined the disclosed models trained on simulated datasets (which allow us to modify the background GC content freely while keeping the motifs the same). Without retraining or fine-tuning, particular embodiments evaluated the models’ predictive performance on background GC content of 5%, 10%, 15%, ... ,90%, 95%.

[0225] To generate novel sequences using Ledidi, particular embodiments took the disclosed models (ARGMINN 100, traditional CNN, dilated CNN, Ex-plaiNN) trained on the simulated SPI1 dataset. For each model, particular embodiments fitted Ledidi 32 times, and for each fitted instance, particular embodiments generated 32 sequences. This yielded 1024 Ledidi- generated SPI1 sequences for each model. Particular embodiments used τ = 5, λ = 5000 for Ledidi.

[0226] To evaluate the quality of the generated sequences, particular embodiments scanned the true PFM across each sequence (note that these models were trained on sequences which contain motifs sampled from this exact PFM), and computed the top match score (as a cross- correlation score) for each sequence. Particular embodiments computed significance of the difference in distributions (between different models used with Ledidi) of top SPI1 match scores using a one-sided Mann-Whitney U test.

[0227] Particular embodiments generated adversarial examples in a traditional CNN in two ways. First, particular embodiments generated sequences which had no motifs present, but were still predicted to have a positive label by the CNN. To do this, particular embodiments built up random sequences by taking highly activating sequences from random filters and adding them to the sequence. Particular embodiments took the most highly activating sequence for each filter and randomly strung together a random ordering of such sequences to obtain a 500 bp example. Particular embodiments verified that no part of these sequences matched any motif (or reverse complement) in the dataset, using the same criteria as the data loader as described above.

[0228] Next, particular embodiments generated sequences which had motifs, but were still predicted to be negative by the CNN. To do this, particular embodiments first sampled a motifACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 48 of 66 configuration from the normal simulation. Under normal circumstances, such a configuration would endow a positive label in the dataset. Particular embodiments then surrounded either side of this configuration with sequences that are least activating for a random ordering of filters. Particular embodiments randomly strung together a random ordering of such sequences to pad out a 500 bp example.

[0229] To design novel sequences interpretably using ARGMINN 100, particular embodiments started with the ARGMINN 100 model trained on HepG2 DNase accessibility. Particular embodiments extracted motifs from the filters as described above. Prior to designing, particular embodiments trimmed and filtered the motifs. Specifically, particular embodiments first cut off flanks with information content lower than 0.2. Particular embodiments then required that after trimming, the motif was at least 5 bp and had an average information content of 0.8.

[0230] Particular embodiments then extracted the motif syntax as described above, again only using the test set. This procedure takes each input sequence and assigns it a motif pattern (e.g., “CTCF - TEAD” or “FOXA” or “CTCF - FOXA - FOXA”). The motif pattern denotes which motifs were identified by ARGMINN 100 in that sequence (in order) (e.g., CTCF followed by TEAD). Over the entire test set, particular embodiments labeled each sequence with its motif pattern. For each pattern which has more than one motif, ARGMINN then gives a set of spacings that were identified over all sequences with that pattern.

[0231] Particular embodiments took the top 20 patterns (by number of sequences which have that pattern, requiring at least 5 sequences with that pattern). For each of the top 20 patterns, particular embodiments generated 100 novel sequences with that pattern. To construct a novel sequence for a pattern, particular embodiments started with an original 500 bp test sequence which falls under that pattern (sampled randomly). Particular embodiments then dinucleotide-shuffled the central 300 bp to destroy any functional motifs. Particular embodiments then inserted the motifs of that pattern (sampling from the PFM(s)), at spacings sampled from the empirical distribution for that pattern (for single-motif patterns, the motif is simply placed in the center).

[0232] To validate the generated sequences in silico, particular embodiments used several independently trained models as oracles as follows. Interpretations from ARGMINN 100 itself were used to generate these sequences, but we also used ARGMINN 100 as a predictive oracle, as it predicts accessibility from DNA sequence. Particular embodiments used Borzoi as a predictive oracle. Specifically, particular embodiments used output task 1510 (trained onACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 49 of 66 ENCFF577SOF), which also measured HepG2 DNase accessibility. Whereas particular embodiments designed 500 bp sequences, Borzoi predicts entire signal-profile tracks from an extremely large context (524000 bp inputs). To evaluate the 500 bp sequences, particular embodiments took the original coordinate from which the sequence arose and padded it with the appropriate genomic context on either side to from the full 524 kb input. To produce a scalar prediction, particular embodiments summed the center of the (binned) profile prediction corresponding to the central 500 bp input.

[0233] In addition, particular embodiments fine-tuned Enformer on HepG2 DNA accessibility measured by massively parallel reporter assays (MPRAs). The MPRA data were downloaded and verified that the predictive performance was on-par with the performance recorded in conventional work. The fine-tuning was performed using the gReLU software package. Particular embodiments additionally fine-tuned Enformer using gReLU, using binary labels of HepG2 DNase accessibility from ENCODE (ENCSR291GJU).

[0234] Particular embodiments computed significance of the difference in predicted accessibility (e.g., generated vs. background, or generated vs. natural) using a one-sided Wilcoxon test.

[0235] To demonstrate the expressivity and interpretability of ARGMINN 100 compared to ExplaiNN, particular embodiments constructed a simulated REST dataset which explicitly tests the requirements of the unique binding syntax of REST. In this dataset, positive sequences always had the left and right motifs (in that order) with 10 bp in between. Negative sequences were structured as follows: 10% have only the left motif; 10% have only the right motif; 50% have both the left and right motifs but in improper order or orientation (e.g., the reverse- complement of left and right in that order, or the left with the reverse of the right, etc.), with each configuration having a 10 bp spacer and being selected uniformly at random; 30% have two left or two right motifs, of all sorts of configurations (e.g., forward or reverse), each having a 10 bp spacer and being selected uniformly at random; 10% are uniform background.

[0236] Particular embodiments applied the disclosed filter regularization to a traditional CNN architecture, using the same loss weights and annealing schedule as described above. Particular embodiments assigned identities to these motifs also using the procedure with TOMTOM as described above.

[0237] To evaluate the robustness of ARGMINN 100 to the weights of the filter-overlap loss and the filter-L1 loss, particular embodiments trained ARGMINN 100 on the simulated SPI1 dataset 100 times, each time with a randomly selected loss weight. The filter-overlap lossACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 50 of 66 weight was randomly selected between λo∈ [101, 108] and the filter-L1 loss weight was randomly selected between λl∈ [10−5, 100], where sampling was done uniformly on a logarithmic scale. Particular embodiments trained each model to completion as described above.

[0238] To evaluate the motif interpretability of each model, particular embodiments extracted motifs from each ARGMINN 100 model as described above. For each model, particular embodiments then computed the average similarity of all the discovered motifs to the true SPI1 PFM (similarity was computed as the − log(q) score from TOMTOM). If a discovered motif was not similar enough to the true PFM to pass TOMTOM’s thresholds, it was given a − log(q) value of 0 by default.

[0239] FIG. 19 illustrates an example method 1900 for genomic analysis using interpretable neural networks. The method may begin at step 1910, where a computing system may provide sequence information associated with a DNA sequence as an input to a neural network model. At step 1920, the computing system may generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight, and wherein the set of convolutional filters are associated with a first layer of the neural network model. At step 1930, the computing system may identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif, wherein the weights associated with the set of convolutional filters directly encode the identified motifs by mapping a weight matrix of each weight to a position weight matrix of each identified motif, and wherein the identified motifs are non-redundant with respect to each other. At step 1940, the computing system may generate at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations, wherein each attention layer of the attention layers comprises a plurality of attention heads configured to attend to a plurality of motifs, wherein the identified interactions comprise one or more of a cooperation between motifs, a synergy between motifs, a competition between motifs, or an inhibition between motifs, and wherein identifying interactions between the identified motifs is further based on the plurality of attention heads attending to the plurality of motifs. At step 1950, the computing system may determine one or more motif instances and an associated syntax by the neural network modelACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 51 of 66 based on the linear vector of attention scores and the identified interactions, wherein the syntax comprises one or more of motif density, motif spacing, motif orientation, or motif co-binders. At step 1960, the computing system may generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence, wherein the one or more predictions comprise one or more of a prediction of protein binding to the DNA sequence, an accessibility associated with the DNA sequence, a gene activation associated with the DNA sequence, a prediction of DNA modifications associated with the DNA sequence, or a prediction of chromatin modifications associated with the DNA sequence. At step 1970, the computing system may generate a novel functional sequence by inserting the identified motifs into a non-functional background sequence following the syntax associated with the identified motifs. Particular embodiments may repeat one or more steps of the method of FIG. 19, where appropriate. Although this disclosure describes and illustrates particular steps of the method of FIG. 19 as occurring in a particular order, this disclosure contemplates any suitable steps of the method of FIG. 19 occurring in any suitable order. Moreover, although this disclosure describes and illustrates an example method for genomic analysis using interpretable neural networks, including the particular steps of the method of FIG. 19, this disclosure contemplates any suitable method for genomic analysis using interpretable neural networks, including any suitable steps, which may include all, some, or none of the steps of the method of FIG. 19, where appropriate. Furthermore, although this disclosure describes and illustrates particular components, devices, or systems carrying out particular steps of the method of FIG.19, this disclosure contemplates any suitable combination of any suitable components, devices, or systems carrying out any suitable steps of the method of FIG.19. Systems and Methods

[0240] FIG. 20 illustrates an example computer system 2000. In particular embodiments, one or more computer systems 2000 perform one or more steps of one or more methods described or illustrated herein. In particular embodiments, one or more computer systems 2000 provide functionality described or illustrated herein. In particular embodiments, software running on one or more computer systems 2000 performs one or more steps of one or more methods described or illustrated herein or provides functionality described or illustrated herein. Particular embodiments include one or more portions of one or more computer systems 2000. Herein, reference to a computer system may encompass a computing device, and vice versa,ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 52 of 66 where appropriate. Moreover, reference to a computer system may encompass one or more computer systems, where appropriate.

[0241] This disclosure contemplates any suitable number of computer systems 2000. This disclosure contemplates computer system 2000 taking any suitable physical form. As example and not by way of limitation, computer system 2000 may be an embedded computer system, a system-on-chip (SOC), a single-board computer system (SBC) (such as, for example, a computer-on-module (COM) or system-on-module (SOM)), a desktop computer system, a laptop or notebook computer system, an interactive kiosk, a mainframe, a mesh of computer systems, a mobile telephone, a personal digital assistant (PDA), a server, a tablet computer system, or a combination of two or more of these. Where appropriate, computer system 2000 may include one or more computer systems 2000; be unitary or distributed; span multiple locations; span multiple machines; span multiple data centers; or reside in a cloud, which may include one or more cloud components in one or more networks. Where appropriate, one or more computer systems 2000 may perform without substantial spatial or temporal limitation one or more steps of one or more methods described or illustrated herein. As an example and not by way of limitation, one or more computer systems 2000 may perform in real time or in batch mode one or more steps of one or more methods described or illustrated herein. One or more computer systems 2000 may perform at different times or at different locations one or more steps of one or more methods described or illustrated herein, where appropriate.

[0242] In particular embodiments, computer system 2000 includes a processor 2002, memory 2004, storage 2006, an input / output (I / O) interface 2008, a communication interface 2010, and a bus 2012. Although this disclosure describes and illustrates a particular computer system having a particular number of particular components in a particular arrangement, this disclosure contemplates any suitable computer system having any suitable number of any suitable components in any suitable arrangement.

[0243] In particular embodiments, processor 2002 includes hardware for executing instructions, such as those making up a computer program. As an example and not by way of limitation, to execute instructions, processor 2002 may retrieve (or fetch) the instructions from an internal register, an internal cache, memory 2004, or storage 2006; decode and execute them; and then write one or more results to an internal register, an internal cache, memory 2004, or storage 2006. In particular embodiments, processor 2002 may include one or more internal caches for data, instructions, or addresses. This disclosure contemplates processor 2002 including any suitable number of any suitable internal caches, where appropriate. As anACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 53 of 66 example and not by way of limitation, processor 2002 may include one or more instruction caches, one or more data caches, and one or more translation lookaside buffers (TLBs). Instructions in the instruction caches may be copies of instructions in memory 2004 or storage 2006, and the instruction caches may speed up retrieval of those instructions by processor 2002. Data in the data caches may be copies of data in memory 2004 or storage 2006 for instructions executing at processor 2002 to operate on; the results of previous instructions executed at processor 2002 for access by subsequent instructions executing at processor 2002 or for writing to memory 2004 or storage 2006; or other suitable data. The data caches may speed up read or write operations by processor 2002. The TLBs may speed up virtual-address translation for processor 2002. In particular embodiments, processor 2002 may include one or more internal registers for data, instructions, or addresses. This disclosure contemplates processor 2002 including any suitable number of any suitable internal registers, where appropriate. Where appropriate, processor 2002 may include one or more arithmetic logic units (ALUs); be a multi- core processor; or include one or more processors 2002. Although this disclosure describes and illustrates a particular processor, this disclosure contemplates any suitable processor.

[0244] In particular embodiments, memory 2004 includes main memory for storing instructions for processor 2002 to execute or data for processor 2002 to operate on. As an example and not by way of limitation, computer system 2000 may load instructions from storage 2006 or another source (such as, for example, another computer system 2000) to memory 2004. Processor 2002 may then load the instructions from memory 2004 to an internal register or internal cache. To execute the instructions, processor 2002 may retrieve the instructions from the internal register or internal cache and decode them. During or after execution of the instructions, processor 2002 may write one or more results (which may be intermediate or final results) to the internal register or internal cache. Processor 2002 may then write one or more of those results to memory 2004. In particular embodiments, processor 2002 executes only instructions in one or more internal registers or internal caches or in memory 2004 (as opposed to storage 2006 or elsewhere) and operates only on data in one or more internal registers or internal caches or in memory 2004 (as opposed to storage 2006 or elsewhere). One or more memory buses (which may each include an address bus and a data bus) may couple processor 2002 to memory 2004. Bus 2012 may include one or more memory buses, as described below. In particular embodiments, one or more memory management units (MMUs) reside between processor 2002 and memory 2004 and facilitate accesses to memory 2004 requested by processor 2002. In particular embodiments, memory 2004 includes randomACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 54 of 66 access memory (RAM). This RAM may be volatile memory, where appropriate. Where appropriate, this RAM may be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, where appropriate, this RAM may be single-ported or multi-ported RAM. This disclosure contemplates any suitable RAM. Memory 2004 may include one or more memories 2004, where appropriate. Although this disclosure describes and illustrates particular memory, this disclosure contemplates any suitable memory.

[0245] In particular embodiments, storage 2006 includes mass storage for data or instructions. As an example and not by way of limitation, storage 2006 may include a hard disk drive (HDD), a floppy disk drive, flash memory, an optical disc, a magneto-optical disc, magnetic tape, or a Universal Serial Bus (USB) drive or a combination of two or more of these. Storage 2006 may include removable or non-removable (or fixed) media, where appropriate. Storage 2006 may be internal or external to computer system 2000, where appropriate. In particular embodiments, storage 2006 is non-volatile, solid-state memory. In particular embodiments, storage 2006 includes read-only memory (ROM). Where appropriate, this ROM may be mask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM), or flash memory or a combination of two or more of these. This disclosure contemplates mass storage 2006 taking any suitable physical form. Storage 2006 may include one or more storage control units facilitating communication between processor 2002 and storage 2006, where appropriate. Where appropriate, storage 2006 may include one or more storages 2006. Although this disclosure describes and illustrates particular storage, this disclosure contemplates any suitable storage.

[0246] In particular embodiments, I / O interface 2008 includes hardware, software, or both, providing one or more interfaces for communication between computer system 2000 and one or more I / O devices. Computer system 2000 may include one or more of these I / O devices, where appropriate. One or more of these I / O devices may enable communication between a person and computer system 2000. As an example and not by way of limitation, an I / O device may include a keyboard, keypad, microphone, monitor, mouse, printer, scanner, speaker, still camera, stylus, tablet, touch screen, trackball, video camera, another suitable I / O device or a combination of two or more of these. An I / O device may include one or more sensors. This disclosure contemplates any suitable I / O devices and any suitable I / O interfaces 2008 for them. Where appropriate, I / O interface 2008 may include one or more device or software drivers enabling processor 2002 to drive one or more of these I / O devices. I / O interface 2008 mayACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 55 of 66 include one or more I / O interfaces 2008, where appropriate. Although this disclosure describes and illustrates a particular I / O interface, this disclosure contemplates any suitable I / O interface.

[0247] In particular embodiments, communication interface 2010 includes hardware, software, or both providing one or more interfaces for communication (such as, for example, packet-based communication) between computer system 2000 and one or more other computer systems 2000 or one or more networks. As an example and not by way of limitation, communication interface 2010 may include a network interface controller (NIC) or network adapter for communicating with an Ethernet or other wire-based network or a wireless NIC (WNIC) or wireless adapter for communicating with a wireless network, such as a WI-FI network. This disclosure contemplates any suitable network and any suitable communication interface 2010 for it. As an example and not by way of limitation, computer system 2000 may communicate with an ad hoc network, a personal area network (PAN), a local area network (LAN), a wide area network (WAN), a metropolitan area network (MAN), or one or more portions of the Internet or a combination of two or more of these. One or more portions of one or more of these networks may be wired or wireless. As an example, computer system 2000 may communicate with a wireless PAN (WPAN) (such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAX network, a cellular telephone network (such as, for example, a Global System for Mobile Communications (GSM) network), or other suitable wireless network or a combination of two or more of these. Computer system 2000 may include any suitable communication interface 2010 for any of these networks, where appropriate. Communication interface 2010 may include one or more communication interfaces 2010, where appropriate. Although this disclosure describes and illustrates a particular communication interface, this disclosure contemplates any suitable communication interface.

[0248] In particular embodiments, bus 2012 includes hardware, software, or both coupling components of computer system 2000 to each other. As an example and not by way of limitation, bus 2012 may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT) interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBAND interconnect, a low-pin-count (LPC) bus, a memory bus, a Micro Channel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCIe) bus, a serial advanced technology attachment (SATA) bus, a Video Electronics Standards Association local (VLB) bus, or another suitable bus or a combination of two or more of these. Bus 2012 may include one or more buses 2012, where appropriate. AlthoughACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 56 of 66 this disclosure describes and illustrates a particular bus, this disclosure contemplates any suitable bus or interconnect.

[0249] Herein, a computer-readable non-transitory storage medium or media may include one or more semiconductor-based or other integrated circuits (Ics) (such, as for example, field- programmable gate arrays (FPGAs) or application-specific Ics (ASICs)), hard disk drives (HDDs), hybrid hard drives (HHDs), optical discs, optical disc drives (ODDs), magneto-optical discs, magneto-optical drives, floppy diskettes, floppy disk drives (FDDs), magnetic tapes, solid-state drives (SSDs), RAM-drives, SECURE DIGITAL cards or drives, any other suitable computer-readable non-transitory storage media, or any suitable combination of two or more of these, where appropriate. A computer-readable non-transitory storage medium may be volatile, non-volatile, or a combination of volatile and non-volatile, where appropriate. Recitation of Embodiments

[0250] Embodiment 1. A method comprising, by one or more computing systems: providing sequence information associated with a DNA sequence as an input to a neural network model; generating, based on the sequence information, a set of activations by a set of respective convolutional filters associated with a neural network model, wherein each convolutional filter is associated with a respective weight; identifying one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generating at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determining one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generating, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.

[0251] Embodiment 2. The method of Embodiment 1, further comprising: generating a novel functional sequence by inserting the identified motifs into a non-functional background sequence following the syntax associated with the identified motifs.

[0252] Embodiment 3. The method of Embodiment 1 or 2, further including: synthesizing a DNA sequence based on the novel functional sequence; inserting the synthesized DNA sequence into a cell; measuring activities associated with the synthesized DNA sequenceACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 57 of 66 inserted into the cell; and validating the novel functional sequence based on the measured activities

[0253] Embodiment 4. The method of any one of Embodiments 1-3, wherein the one or more predictions comprise one or more of: a prediction of protein binding to the DNA sequence, an accessibility associated with the DNA sequence, a gene activation associated with the DNA sequence, a prediction of DNA modifications associated with the DNA sequence, or a prediction of chromatin modifications associated with the DNA sequence.

[0254] Embodiment 5. The method of any one of Embodiments 1-4, wherein the syntax comprises one or more of motif density, motif spacing, motif orientation, or motif co-binders.

[0255] Embodiment 6. The method of any one of Embodiments 1-5, wherein the weights associated with the set of convolutional filters directly encode the identified motifs by mapping a weight matrix of each weight to a position weight matrix of each identified motif.

[0256] Embodiment 7. The method of any one of Embodiments 1-6, wherein the identified motifs are non-redundant with respect to each other.

[0257] Embodiment 8. The method of any one of Embodiments 1-7, wherein the set of convolutional filters are associated with a first layer of the neural network model.

[0258] Embodiment 9. The method of any one of Embodiments 1-8, further comprising: generating, based on the DNA sequence, a one-hot encoded DNA sequence, wherein generating the set of activations is further based on the one-hot encoded DNA sequence.

[0259] Embodiment 10. The method of any one of Embodiments 1-9, wherein generating the set of activations comprises scanning the set of convolutional filters across the DNA sequence at a plurality of positions.

[0260] Embodiment 11. The method of Embodiment 10, wherein at least two of the convolutional filters have an overlapping window at a particular position of the plurality of positions, and wherein the regularization is further configured to prevent the two convolutional filters learn a motif in the overlapping window by penalizing overlapping weights of the two convolution filters associated with the overlapping window.

[0261] Embodiment 12. The method of any one of Embodiments 1-11, further comprising: generating a set of positional encodings for the DNA sequence; and concatenating the positional encodings to the activations; wherein generating the linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs is further based on the concatenations.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 58 of 66

[0262] Embodiment 13. The method of Embodiment 12, further comprising: deriving, by each attention layer of the attention layers, a key vector and a value vector from the concatenations, wherein generating the linear vector of attention scores for the identified motifs is further based on the key vector and value vector associated with each attention layer.

[0263] Embodiment 14. The method of any one of Embodiments 1-13, wherein generating a linear vector of attention scores for the identified motifs comprises: deriving a first single query from a memory stream by a prior attention layer of the attention layers; updating the memory stream by a subsequent attention layer of the attention layers; and deriving a second single query from the updated memory stream.

[0264] Embodiment 15. The method of any one of Embodiments 1-14, wherein each attention layer of the attention layers comprises a plurality of attention heads configured to attend to a plurality of motifs, and wherein identifying interactions between the identified motifs is further based on the plurality of attention heads attending to the plurality of motifs.

[0265] Embodiment 16. The method of any one of Embodiments 1-15, further comprising: determining, based on the linear vector of attention scores, a first attention score higher than a threshold score; identifying a first sequence position of the DNA sequence corresponding to the first attention score; determining a first activation at the first sequence position; and determining a first motif instance at the first sequence position if the first activation is higher than a threshold activation.

[0266] Embodiment 17. The method of any one of Embodiments 1-16, further comprising: visualizing the linear vector of attention scores in a graphical user interface.

[0267] Embodiment 18. The method of any one of Embodiments 1-17, wherein the identified interactions comprise one or more of a cooperation between motifs, a synergy between motifs, a competition between motifs, or an inhibition between motifs.

[0268] Embodiment 19. The method of any one of Embodiments 1-18, wherein the interactions between the identified motifs are identified at a layer level or a cross-layer level by the one or more attention layers associated with the neural network model.

[0269] Embodiment 20. One or more computer-readable non-transitory storage media embodying software that is operable when executed to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with a neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutionalACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 59 of 66 filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate a linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions.

[0270] Embodiment 21. A system comprising: one or more processors; and a non- transitory memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with a neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate a linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions. Miscellaneous

[0271] Herein, “or” is inclusive and not exclusive, unless expressly indicated otherwise or indicated otherwise by context. Therefore, herein, “A or B” means “A, B, or both,” unless expressly indicated otherwise or indicated otherwise by context. Moreover, “and” is both joint and several, unless expressly indicated otherwise or indicated otherwise by context. Therefore, herein, “A and B” means “A and B, jointly or severally,” unless expressly indicated otherwise or indicated otherwise by context.

[0272] The scope of this disclosure encompasses all changes, substitutions, variations, alterations, and modifications to the example embodiments described or illustrated herein thatACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 60 of 66 a person having ordinary skill in the art would comprehend. The scope of this disclosure is not limited to the example embodiments described or illustrated herein. Moreover, although this disclosure describes and illustrates respective embodiments herein as including particular components, elements, feature, functions, operations, or steps, any of these embodiments may include any combination or permutation of any of the components, elements, features, functions, operations, or steps described or illustrated anywhere herein that a person having ordinary skill in the art would comprehend. Furthermore, reference in the appended claims to an apparatus or system or a component of an apparatus or system being adapted to, arranged to, capable of, configured to, enabled to, operable to, or operative to perform a particular function encompasses that apparatus, system, component, whether or not it or that particular function is activated, turned on, or unlocked, as long as that apparatus, system, or component is so adapted, arranged, capable, configured, enabled, operable, or operative. Additionally, although this disclosure describes or illustrates particular embodiments as providing particular advantages, particular embodiments may provide none, some, or all of these advantages.ACTIVE 513272610.1

Claims

ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 61 of 66 CLAIMS What is claimed is:

1. A method comprising, by one or more computing systems: providing sequence information associated with a DNA sequence as an input to a neural network model; generating, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identifying one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generating at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determining one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generating, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.

2. The method of Claim 1, further comprising: generating a novel functional sequence by inserting the identified motifs into a non- functional background sequence following the syntax associated with the identified motifs.

3. The method of Claim 2, further comprising: synthesizing a DNA sequence based on the novel functional sequence; inserting the synthesized DNA sequence into a cell; measuring activities associated with the synthesized DNA sequence inserted into the cell; and validating the novel functional sequence based on the measured activities.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 62 of 66 4. The method of Claim 1, wherein the one or more predictions comprise one or more of: a prediction of protein binding to the DNA sequence, an accessibility associated with the DNA sequence, a gene activation associated with the DNA sequence, a prediction of DNA modifications associated with the DNA sequence, or a prediction of chromatin modifications associated with the DNA sequence.

5. The method of Claim 1, wherein the syntax comprises one or more of motif density, motif spacing, motif orientation, or motif co-binders.

6. The method of Claim 1, wherein the weights associated with the set of convolutional filters directly encode the identified motifs by mapping a weight matrix of each weight to a position weight matrix of each identified motif.

7. The method of Claim 1, wherein the identified motifs are non-redundant with respect to each other.

8. The method of Claim 1, wherein the set of convolutional filters are associated with a first layer of the neural network model.

9. The method of Claim 1, further comprising: generating, based on the DNA sequence, a one-hot encoded DNA sequence, wherein generating the set of activations is further based on the one-hot encoded DNA sequence.

10. The method of Claim 1, wherein generating the set of activations comprises scanning the set of convolutional filters across the DNA sequence at a plurality of positions.

11. The method of Claim 10, wherein at least two of the convolutional filters have an overlapping window at a particular position of the plurality of positions, and wherein the regularization is further configured to prevent the two convolutional filters learn a motif in the overlapping window by penalizing overlapping weights of the two convolution filters associated with the overlapping window.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 63 of 66 12. The method of Claim 1, further comprising: generating a set of positional encodings for the DNA sequence; and concatenating the positional encodings to the activations; wherein generating the linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs is further based on the concatenations.

13. The method of Claim 12, further comprising: deriving, by each attention layer of the attention layers, a key vector and a value vector from the concatenations, wherein generating the linear vector of attention scores for the identified motifs is further based on the key vector and value vector associated with each attention layer.

14. The method of Claim 1, wherein generating a linear vector of attention scores for the identified motifs comprises: deriving a first single query from a memory stream by a prior attention layer of the attention layers; updating the memory stream by a subsequent attention layer of the attention layers; and deriving a second single query from the updated memory stream.

15. The method of Claim 1, wherein each attention layer of the attention layers comprises a plurality of attention heads configured to attend to a plurality of motifs, and wherein identifying interactions between the identified motifs is further based on the plurality of attention heads attending to the plurality of motifs.

16. The method of Claim 1, further comprising: determining, based on the linear vector of attention scores, a first attention score higher than a threshold score; identifying a first sequence position of the DNA sequence corresponding to the first attention score; determining a first activation at the first sequence position; and determining a first motif instance at the first sequence position if the first activation is higher than a threshold activation.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 64 of 66 17. The method of Claim 1, further comprising: visualizing the linear vector of attention scores in a graphical user interface.

18. The method of Claim 1, wherein the identified interactions comprise one or more of a cooperation between motifs, a synergy between motifs, a competition between motifs, or an inhibition between motifs.

19. The method of Claim 1, wherein the interactions between the identified motifs are identified at a layer level or a cross-layer level by the one or more attention layers associated with the neural network model.

20. One or more computer-readable non-transitory storage media embodying software that is operable when executed to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.ACTIVE 513272610.1ATTORNEY DOCKET PATENT APPLICATION 00B206.1670 65 of 66 21. A system comprising: one or more processors; and a non-transitory memory coupled to the processors comprising instructions executable by the processors, the processors operable when executing the instructions to: provide sequence information associated with a DNA sequence as an input to a neural network model; generate, based on the sequence information, a set of activations by a set of respective convolutional filters associated with the neural network model, wherein each convolutional filter is associated with a respective weight; identify one or more motifs from the DNA sequence based on the set of convolutional filters and their respective weights by the neural network model based on a regularization function configured to enable each convolutional filter to learn a distinct motif; generate at least one linear vector of attention scores for the identified motifs and identifying interactions between the identified motifs by one or more attention layers associated with the neural network model based on the set of activations; determine one or more motif instances and an associated syntax by the neural network model based on the linear vector of attention scores and the identified interactions; and generate, based on the motif instances and the associated syntax, one or more predictions associated with genomic regulatory functions of the DNA sequence.ACTIVE 513272610.1

Citation Information

Patent Citations

  • Natural language processing to predict properties of proteins

    US20230386610A1

  • Methods and systems for identifying gene regulatory elements and altering gene regulation and expression

    WO2024178321A1

Cited By

  • Probiotic tolerance characteristic prediction method and device, electronic equipment and storage medium

    CN122117042A