Elamur Research

Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics

Paper · 2015 · Ehsaneddin Asgari and Mohammad R. K. Mofrad

Summary

A protein’s amino acid sequence may be known long before its function or structure is understood. Asgari and Mofrad ask how to turn that sequence into a set of features that can help make such predictions. Their method, ProtVec, learns from the neighborhoods of short amino acid fragments in Swiss-Prot. Each distinct fragment receives a vector, a list of numerical coordinates. A whole protein can then be represented by adding the vectors of the fragments it contains. The resulting list has the same size for every protein, so a classifier can use it even when the original sequences differ in length.

The authors learn the fragment vectors from 546,790 sequences, without supplying family labels or measurements of physical and chemical properties during training. Yet fragments that are close in the resulting space tend to have similar properties. The paper checks this by coloring a projection of the space according to properties such as polarity and hydrophobicity, then measuring how much those properties can change between nearby fragments. The changes are smaller in the learned space than when fragment names are randomly reassigned to the same coordinates.

For the family experiment, the authors use Pfam annotations for 324,018 Swiss-Prot sequences across 7,027 categories. They train a separate support vector machine for each category. Given the vector for a sequence, this classifier decides whether the sequence belongs to that category. With equally many positive and randomly selected negative examples per category, the reported weighted accuracy in cross-validation is 93% ± 0.06%. The weighting gives more influence to categories with more examples, and individual category scores vary.

The disorder experiments ask two different questions. A classifier distinguishes phenylalanine–glycine nucleoporins, known as FG-Nups, from a sample of structured proteins with the same average length at 99.81% accuracy. A separate comparison of regions labeled as ordered or disordered in DisProt reaches 100% accuracy. These results describe specific contrasts between curated groups. The method assigns a label to an input sequence or region, so the experiments do not test whether it can locate the boundaries of a disordered segment within a protein. The broader contribution is a reusable way to obtain features from sequence data and then test, with separate labels, what those features can help predict.

Deep dive: Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics

ProtVec learns vectors from short amino acid sequences and uses them to classify protein families and distinguish ordered from disordered sequences. · about 34 minutes to read

The problem and its context

What a sequence can tell a classifier

Primary sequence records the order of a protein’s amino acids. That order is a natural starting point when a protein has already been sequenced and researchers want to infer something about it. The paper emphasizes the gap between the large number of known sequences and the smaller amount of information about their functions. A family assignment can help narrow the possibilities because members of a protein family are evolutionarily related and frequently share aspects of structure or function. Even so, a family label supplies evidence about a protein, while a direct measurement answers a question about the particular protein itself.

Learning from primary sequence immediately raises a question about representation. A sequence is an ordered string, and different proteins can have very different lengths. A classification method that expects a list of numerical features needs a way to give the same meaning to each input coordinate from one protein to the next. A feature might come from a physical property, the presence of a short pattern, or an association discovered across a collection of sequences. The choice governs which distinctions the classifier can draw. If the representation discards a distinction before classification, the classifier has no direct way to recover it.

The authors describe family classification methods that use support vector machines, or SVMs. Feature construction in the earlier work they discuss can draw on such information as hydrophobicity, charge, side-chain volume, or predicted structural properties such as solvent accessibility. Some of these quantities characterize individual residues. Others concern how residues behave in a structural setting. They need to be selected and represented before classification. A different example in the paper uses motifs inferred from protein interactions to identify families from a structural classification. A motif is a recurring local pattern that can help distinguish a group of sequences or structures.

The questions asked by these earlier methods differ in part because a protein category can refer to different units. Pfam distinguishes families, domains, repeats, and motifs. A domain is a part of a protein to which an annotation can apply, and a repeat describes a recurring unit within a sequence. An annotation for a domain can therefore be relevant to a protein even when much of its sequence lies outside that domain. The paper uses Pfam categories in the family experiment, with the whole Swiss-Prot sequence as the classifier’s input. That setup ties together a category that may describe a local feature and a representation that summarizes the entire chain.

From fragments to shared features

Giving each short sequence its own feature is another way to describe proteins. A fixed-length fragment is called an n-gram. The paper describes earlier protein uses of overlapping windows of 3 to 6 residues. Overlap means that a new fragment begins at the next residue, retaining some of the residues in the previous window. This produces a record of local patterns with a well-defined identity. It also makes the treatment of closely related fragments a separate design question. A feature that records one exact fragment can distinguish it from another, even when the two fragments occur in similar sequence settings.

The alternative comes from natural language processing. In the work the authors draw on, a word can be represented by a list of learned coordinates. The same set of coordinate positions is used for every word, and information about any particular word is spread across the list. Similarities among words can then be studied through distances between their vectors. There is no need to designate one coordinate for each possible meaning or syntactic role before training. The evidence for placing words near one another comes from how they are used, a principle associated with distributional semantics.

Skip-gram is the particular training approach that ProtVec adapts. Given a word at one position, Skip-gram learns to predict words found around it. Related words can end up near one another if they help predict similar surroundings. The motivating analogy is that a fragment in a protein can also have characteristic surroundings. Those surroundings are amino acid fragments elsewhere within a nearby stretch of the chain. There is no assumption that protein sequences have word boundaries corresponding to spaces in written language. The authors choose their fragment boundaries and use several starting positions so that the construction does not depend on any one of them. Efficient Estimation of Word Representations in Vector Space · Distributed Representations of Words and Phrases and their Compositionality

This shift changes where the feature information comes from. In a scheme built around pre-defined properties, the investigator supplies the terms in which the sequence will be described. In ProtVec, the training procedure begins with the sequence and estimates features from fragment co-occurrences. Physical and chemical measurements can still be used to check the learned space afterward. The distinction matters because a correspondence found after training provides evidence that sequence neighborhoods contain information about that property. It also gives researchers a way to inspect the features even though the training objective never asks for a polarity or hydrophobicity prediction.

Why disorder is a separate test

A protein can be disordered throughout or contain only particular regions that lack an ordered structure. This makes disorder a different kind of target from family membership. The paper’s two disorder collections also start from different kinds of evidence. DisProt records experimentally identified disorder and includes annotations for ordered and disordered regions. The FG-Nup collection concerns a particular group of nucleoporins with phenylalanine–glycine repeats. The authors describe those entries as mostly identified computationally. Nucleoporins form the nuclear pore complex, which provides passage between the nucleus and the cytoplasm in eukaryotic cells.

The paper cites earlier work reporting that disordered stretches in FG-Nups and typical disordered sequences in DisProt differ in their physical properties. This motivates a comparison more specific than asking whether ordered and disordered sequences look different on average. If two collections with disorder annotations occupy different parts of the learned space, that can be evidence that ProtVec retains distinctions within the broader category of disorder. The visualization and the classification experiments pursue different sides of that question. One follows the distribution of local fragments across collections, and the other checks whether whole inputs can be assigned to the groups defined for each task.

The method, step by step

Turning protein chains into streams of fragments

BioVec is the authors’ general name for learned representations of biological sequences. They use ProtVec for the protein version and GeneVec for the corresponding idea applied to gene sequences. The work carried out in the paper concerns ProtVec. It begins with 546,790 reviewed and manually annotated Swiss-Prot protein sequences. At this stage, the training procedure reads the amino acid strings. The fact that the database is annotated matters for what can be done with it later, but the fragment vectors are learned without asking the procedure to use those annotations.

A chain has to be divided into units before Skip-gram can treat it as a sequence of words. The authors choose fragments of 3 amino acids, which they call 3-grams. They start at the beginning of the chain, take a complete fragment, then move past it to read the next complete fragment. Within this list, consecutive fragments share no residues. If the entire procedure stopped there, it would skip windows beginning inside the first fragment. To include those windows, the authors repeat the process from the next starting residue, and again from the one after that. Each starting position provides its own ordered stream of fragments. Tokenization

Across the shifted streams, the procedure encounters the overlapping windows that can be read along the chain. The difference is in which windows are presented as immediate neighbors during training. Two windows beginning at consecutive residues go into different streams. In each stream, the next token describes the next block of the chain rather than a window that repeats part of the center fragment. The streams preserve their own order. Skip-gram uses that order to decide which fragments count as neighbors, so how the chain is split matters even when the same fragment occurrences are available overall.

The 546,790 Swiss-Prot sequences yield 1,640,370 streams of 3-grams by this procedure. The latter number is a count of training streams, each of which can contain many fragment occurrences. It is neither a count of unique fragments nor the number of proteins. The authors mention a preliminary comparison using nearest neighbors and cross-validation to examine window length, embedding size, and overlapping versus shifted non-overlapping fragments. They describe the chosen split and fragment length as producing more consistent training. The evidence available for that choice is discussed below with the other comparisons.

How ProtVec learns and uses protein features

The steps in order.

How ProtVec learns and uses protein featuresStep 1: Read Swiss-Prot amino acid chains1. Read Swiss-Prot amino acid chainsStep 2: Split each chain into shifted fragment streams2. Split each chain into shifted fragment streamsStep 3: Collect nearby fragment pairs within each stream3. Collect nearby fragment pairs within each streamStep 4: Learn fragment vectors by distinguishing sampled pairs4. Learn fragment vectors by distinguishing sampled pairsStep 5: Read overlapping fragments from an input sequence5. Read overlapping fragments from an input sequenceStep 6: Sum its fragment vectors6. Sum its fragment vectorsStep 7: Use sequence vectors for classification7. Use sequence vectors for classification

What Skip-gram learns from a neighborhood

A 3-gram can appear repeatedly, in different chains and at different positions. ProtVec associates the same vector with each occurrence of that fragment when encoding a sequence. Learning the vector means looking across occurrences for a way to represent the kinds of fragments found nearby. If two center fragments regularly predict similar neighbors, the training procedure can assign them similar input vectors. The relationship is indirect. Skip-gram rewards a center for predicting the context it actually occurs in, and similarity between centers can emerge as a consequence of that shared task.

During training, there are separate vectors for a fragment appearing as a center and for a fragment appearing in someone else’s context. Consider an occurrence toward the middle of a stream. The training procedure can use the fragment at that position to predict fragments before and after it within the chosen window. The same fragment can serve as a context for other centers. Its input and output vectors therefore take different roles even though they refer to the same vocabulary item. The output vectors make it possible to compare different candidate neighbors given the same center.

The paper gives the following objective for a training stream.

argmaxᵥ,ᵥ′ (1/N) ∑ᵢ₌₁ᴺ ∑₋꜀≤ⱼ≤꜀, ⱼ≠₀ log p(wᵢ₊ⱼ | wᵢ)

Here v and v′ stand for the collections of input and output vectors. The operator argmax asks for the vectors that maximize the expression. N is the number of fragment positions in the stream. The first ∑ adds terms across positions i from 1 through N. The second adds terms for offsets j from −c to c, where c is the span on either side of the center. The symbol ≠ excludes offset 0, so the fragment at position i is not its own neighbor at that occurrence. wᵢ is the center and wᵢ₊ⱼ is the fragment at the offset. p denotes probability, and the vertical bar means that the probability of the neighbor is conditional on the center. log takes its logarithm. The factor 1/N averages the summed log scores over center positions.

Using a logarithm lets the training criterion add contributions from the observed pairs. An actual neighbor given a low probability contributes a worse score than one given a high probability. The resulting objective rewards vectors that make the observed combinations plausible. Center positions and offsets come from the fragment streams, so the prediction task is supplied by the original amino acid chains. There is no separate set of expected families or physical measurements to predict in this part of the procedure.

The paper first expresses the probability using a softmax, which gives a distribution over candidate neighbors.

p(wᵢ₊ⱼ | wᵢ) = exp((v′_{wᵢ₊ⱼ})ᵀ v_{wᵢ}) / ∑ₖ₌₁ᵂ exp((v′_{wₖ})ᵀ v_{wᵢ})

The tokens and position indices on the left have the same meaning as in the objective. v is an input vector, v′ is an output vector, and each subscript identifies the fragment whose vector is used. The braces delimit the subscript. ᵀ denotes transpose. Placing the transposed output vector beside the input vector denotes their dot product, a sum of products of corresponding coordinates. exp is the exponential function. In the denominator, W is the size of the fragment vocabulary, and k indexes its entries starting at 1. wₖ is the candidate at that index. The slash divides the score of the observed neighbor by the sum of scores of all candidates.

The denominator explains a computational issue. Even when training focuses on a particular observed pair, the softmax expression needs a score for every vocabulary item. The paper mentions hierarchical softmax and negative sampling as more efficient approaches and uses negative sampling in its Word2Vec implementation. The operational task becomes distinguishing an observed pair from sampled pairs. This allows the training procedure to update vectors with reference to selected alternatives while retaining the main idea that an actual context should receive a compatible score.

How the negative examples supply a contrast

In the negative-sampling notation, a positive example consists of a center fragment and a context fragment that occur together under the window rule. A negative example is drawn by sampling a pair for use as a contrast. Negative examples are defined by the training construction. Calling a pair negative in this procedure does not establish that the two fragments could never occur near one another in a protein. It describes the origin of that training example. This distinction is particularly important here because the paper also has negative examples for its downstream classification tasks. Those are proteins or regions given a task-specific comparison label.

The paper expresses the negative-sampling objective as a product of probabilities.

argmaxθ [∏_{(w,c)∈D} p(D = 1 | c,w; θ)] [∏_{(w,c)∈D′} p(D = 0 | c,w; θ)]

θ represents the vector parameters to be learned, and argmax seeks the parameter values that maximize the product. An ordered pair (w,c) consists of the center fragment w and context fragment c. Here c is a fragment, whereas in the window formula it represents a span. ∈ means that a pair belongs to a set. D in the first product’s subscript is the set of observed pairs, and D′ in the second is the set of sampled negative pairs. The paper also uses D inside p for the binary source indicator. It takes value 1 for a pair from the training data and 0 for a sampled negative. The vertical bar marks conditioning on the pair and the semicolon introduces the parameters. Each ∏ multiplies the appropriate probabilities across its set, and juxtaposing the brackets multiplies the two products.

The training rule uses a sigmoid to convert a pair’s vector score into a probability of belonging to the observed group.

p(D = 1 | w,c; θ) = 1 / (1 + e⁻⁽ᵛᶜ·ᵛʷ⁾)

D, w, c, θ, and the conditional probability notation have the meanings given for the objective. In the exponent, ᵛᶜ and ᵛʷ denote the vectors v_c and v_w, respectively. The centered dot is their dot product. The minus sign negates that product, and e is the base of the natural exponential. The denominator adds 1 to the exponential of the negated score, and the numerator is 1. This is the sigmoid function. The negative-label probability in the preceding objective is the complement of the positive-label probability.

A high dot product raises the positive-label probability. For an observed pair, this improves its contribution to the objective. For a sampled negative, that same change would make the negative label less probable. This is what gives the sampled pairs their role. Assigning the same high score to every combination would fit the observed examples poorly once the negative examples were taken into account. The contrast encourages the vectors to distinguish among fragment neighborhoods, although the objective itself has no terms for any biophysical property.

For their Word2Vec run, the authors report using 100-dimensional vectors and a context size of 25. The context setting concerns the streams of fragments introduced by the split. It is distinct from the window that determines how many amino acids make up each fragment. Each learned 3-gram vector accordingly has 100 coordinates. These coordinates are the protein counterpart of word embeddings.

Turning a variable-length sequence into one vector

For classification, the authors go back to the amino acid sequence and take all its overlapping 3-grams. They look up the learned vector for each occurrence and add the vectors coordinate by coordinate. A fragment that occurs several times contributes each time. The sequence vector has 100 coordinates, as does each fragment vector. A long sequence contributes more terms to the sum, but it does not require a longer input to the classifier. The paper describes a sum rather than an average, so there is no division by the number of fragment occurrences at this step.

During training, the order of fragments in each stream decides which pairs contribute to the learning objective. During encoding, the letters within each 3-gram remain ordered, and reading overlapping windows preserves information about short local patterns. The final pooling step then forgets the positions from which the vectors came. For example, if two sequences have identical counts of every overlapping 3-gram, the sum gives them the same vector. The SVM receives no fragment positions that would allow it to distinguish such inputs. This follows from the use of addition, regardless of how well the fragment vectors have been trained.

Summing embeds a sequence by aggregating evidence from its local fragments. Two sequences can receive related representations through exact shared fragments or through fragments that have similar coordinates. This is the attraction of learning a common space before training a classifier. Once the fragment vectors are available, the same lookup and summation procedure can be applied to a whole protein for family classification or to an annotated stretch for a disorder comparison. The classifier for each task is trained separately using examples with the relevant labels.

An SVM uses those labeled examples to learn a decision boundary in terms of its inputs. In the family experiment, the inputs are fixed-size sequence vectors and the labels record membership in a particular Pfam category. In the disorder experiments, the label depends on which of the comparison groups the input came from. A supervised boundary can be useful even if no coordinate on its own has a convenient biological interpretation. The paper investigates interpretation separately by examining the relations among fragments and comparing the distribution of fragments across collections.

Testing what the space preserves

The authors prepare a visual analysis by projecting 3-gram vectors from 100 dimensions into a 2D layout with t-SNE. A projected point corresponds to a fragment. The authors color the points by each of the properties they consider, including mass, volume, van der Waals volume, polarity, hydrophobicity, and charge. With color added after the projection, a region of similar shades provides a way to see whether similar property values occur in nearby parts of the display. The projection is an aid for inspecting the space. The classification input is the full sum of the fragment vectors.

For the numerical analysis the authors measure how sharply a property can change between fragments relative to their separation in the original space. They use the smallest constant that satisfies the following bound.

d_f(f_prop(w₁), f_prop(w₂)) ≤ k · d_w(w₁, w₂)

w₁ and w₂ are two fragment entries. f_prop maps a fragment to the score for a particular property, such as its average mass. d_f is the absolute difference between those property scores. d_w is the Euclidean distance between the fragment vectors in the embedding space. The centered dot denotes ordinary multiplication. k is the proposed upper bound on property change per unit of distance, and ≤ requires the observed property difference to stay at or below that bound for each fragment pair. The smallest k satisfying this condition is the Lipschitz constant reported for the property.

A small constant means the property cannot change very abruptly over a short distance, given the scales used in the comparison. As the bound has to hold for every pair, it concerns the steepest changes anywhere in the space. It is a different description from the typical color in a projected neighborhood. For the comparison, the authors shuffle fragment identities among the existing vector positions. The coordinates and their relative distances are retained, while the mapping from an amino acid fragment to a point changes. They can then apply the same bound to the property scores associated with the shuffled identities.

For the collection-level visualizations, the authors use occurrences of overlapping fragments to build histograms in the projected layout. The property plots and the histograms therefore answer different questions. A point colored by polarity tells the reader the property score of the fragment occupying that point. A region of high histogram density tells the reader that the collection contributes many occurrences of fragments mapped to that region. The two plots can be read together to characterize which kinds of fragments contribute most strongly to a collection. The paper names the Life Language Processing website and Harvard Dataverse as locations for its ProtVec resources and trained data.

Experiments and results

How performance is measured

The classification experiments compare predicted labels with the labels used to construct the task. A true positive is a positive example correctly assigned to the positive group. In the family experiment, that means a protein carrying the relevant Pfam annotation and identified as a member by the classifier. A false negative is a member assigned to the negative group. A true negative is a comparison example assigned to that group, and a false positive is a comparison example assigned to the positive group. The paper reports sensitivity, specificity, and accuracy using these counts.

Sensitivity = TP / (TP + FN)

TP is the true-positive count and FN the false-negative count. The parentheses group the total number of actual positives, and the slash divides the correctly identified positives by that total. Sensitivity is therefore the fraction of the positive group recovered. Its interpretation depends on the task. For a family, it measures recovery of annotated members. For the FG-Nup contrast, the positives are the sampled FG-Nup sequences.

Specificity = TN / (FP + TN)

TN is the true-negative count and FP the false-positive count. The plus sign sums the actual negatives in the denominator. Dividing the true negatives by that total gives the fraction of the comparison group correctly rejected. The paper also describes specificity as the complement of the false-positive rate. With random negatives in the family experiment, specificity concerns the chosen comparison proteins. A classifier could behave differently if it were assessed against a set selected to be particularly similar to the annotated members.

Accuracy = (TP + TN) / (P + N)

Here P is the number of actual positives and N the number of actual negatives. In this formula, N counts negative examples, while in the Skip-gram objective it counts positions in a training stream. TP and TN count the correctly identified cases from both groups. The plus signs combine those counts in the numerator and the group sizes in the denominator. The slash makes accuracy the fraction of examples classified correctly across the two groups.

Sensitivity and specificity are informative alongside accuracy because the errors can fall unevenly on the two groups. The family setup chooses equally many examples from each side of the binary comparison. Cross-validation rotates which portion of the examples is used for testing. In the family experiment and the FG-Nup comparison, the paper reports 10-fold cross-validation. This procedure concerns the downstream use of the learned features. The original fragment embedding comes from the Swiss-Prot training corpus.

Family membership across a large collection of categories

For the family experiment, the authors use Pfam information for 324,018 Swiss-Prot sequences. They test 7,027 categories, using one binary classification problem per category. An annotated member is a positive example for that category. For each such set of positives, the authors sample the same number of negative examples from Swiss-Prot. They represent each full sequence by its sum of overlapping 3-gram vectors, train the category’s SVM, and evaluate its ability to distinguish the two sets. This setup permits a separate decision for each Pfam category.

Across all categories, the paper gives a weighted cross-validation accuracy of 93% ± 0.06%, with weights based on the number of instances. In its family results table, it reports weighted specificity of 0.91, sensitivity of 0.95, and accuracy of 0.93. The accuracy summarizes balanced binary evaluations with different numbers of examples. A result for an especially frequent category consequently has more influence on the headline than a result for a category with very few examples. Sensitivity and specificity also make clear that the aggregate success rate differs for recovering positives and rejecting negatives.

The authors separately report averages for increasingly broad groups ranked by category frequency in Swiss-Prot. For the first 1,000 categories, covering 261,149 sequences in the paper’s count, the cross-validation accuracy is 94% ± 0.05%. For the first 2,000, with 293,957 sequences, it is 93% ± 0.05%. For the first 3,000, with 308,292 sequences, it is 92% ± 0.06%. For the first 4,000, with 316,135 sequences, it is 91% ± 0.08%. Each wider set includes the categories in the preceding set. The decline describes what happens to the reported average as less frequent groups are included. It does not give the average for any of the added groups by itself.

Cross-validation accuracy across Pfam frequency cutoffs in Swiss-Prot

The strongest average comes from the narrowest group of frequent families.

Cross-validation accuracy across Pfam frequency cutoffs in Swiss-ProtFirst 1,000 families (this paper): 94First 1,000 families (this paper)94First 2,000 families: 93First 2,000 families93First 3,000 families: 92First 3,000 families92First 4,000 families: 91First 4,000 families91
The numbers
System or settingaccuracy %
First 1,000 families (this paper)94
First 2,000 families93
First 3,000 families92
First 4,000 families91

Examples from the per-family results make the variation concrete. For the ribosome-binding GTPase entry, the table reports 3,084 positive and 3,084 negative sequences. Its specificity is 0.95, sensitivity is 0.93, and accuracy is 0.94 in the family cross-validation. For the conserved C-terminal domain of helicases, the counts are 2,518 on each side and the metrics are 0.83 specificity, 0.80 sensitivity, and 0.82 accuracy. For the nucleotide-binding domain in the ATP synthase alpha-beta family, the counts are 2,387 on each side, with specificity of 0.98, sensitivity of 0.97, and accuracy of 0.97. These are outcomes for individual binary comparisons. They illustrate the variation that a weighted average necessarily compresses.

The earlier family results cited in the paper serve as historical context for its claim of improvement. One study reported accuracies ranging from 69.1–99.6% across 54 families. Another used motifs associated with protein interactions to study 368 proteins under the SCOP classification and reported 75% classification accuracy at 10% sensitivity. These are different evaluation settings. The paper does not run those methods on its Swiss-Prot and Pfam splits, so the historical numbers and the ProtVec weighted accuracy cannot rank the methods under common conditions. What the ProtVec experiment establishes directly is that the learned features support classification across many annotated categories with the chosen random comparison examples.

Physical and chemical properties in the fragment space

In the projected property maps, each point represents a distinct 3-gram. The authors report patches in which neighboring fragments have similar shades for the property being plotted. They interpret the visual patterns as evidence that the distribution of fragments in the embedding reflects real physical and chemical differences. The quantitative check keeps the full 100-dimensional space and compares the smallest Lipschitz bound with the one obtained after shuffling fragment identities. That comparison goes beyond whether clusters happen to look distinct on the projected plots.

Every property has a lower bound in the learned arrangement than in the corresponding scrambled comparison, where “bound” here means the reported upper bound on steepness. For mass, the learned-space Lipschitz constant is 0.3137 and the scrambled-space value is 0.6605. For volume, the respective values are 0.3742 and 0.6699. Van der Waals volume has values of 0.3629 and 0.6431. The polarity comparison gives 0.4757 and 1.2551. Hydrophobicity has values of 0.608 and 1.448, and charge has values of 0.8733 and 1.3620. All of these comparisons concern the relation between property-score differences and distances among 3-gram vectors.

Average Lipschitz constant across six properties of Swiss-Prot fragment embeddings

Physical and chemical properties vary more smoothly in the learned arrangement than after fragment identities are shuffled.

Average Lipschitz constant across six properties of Swiss-Prot fragment embeddingsShuffled fragment identities: 1.01Shuffled fragment identities1.01Learned ProtVec fragment identities (this paper): 0.50Learned ProtVec fragment identities(this paper)0.50
The numbers
System or settingLipschitz constant
Shuffled fragment identities1.01
Learned ProtVec fragment identities (this paper)0.50

The result is about the placement of fragment identities within a common geometry. Shuffling does not require fitting another embedding or choosing different points. The same points acquire different property scores because different fragments are assigned to them. The learned space doing better on this comparison means the connection between distance and property is tied to the learned assignment. The mean constants describe the scale of that difference as summarized by the authors. The separate property results show that the effect is visible across the measured properties rather than depending on the mean alone.

FG-Nups compared with structured PDB proteins

The FG-Nup collection contains 1,138 sequences. In the paper’s description, disordered regions account for at least one third of each chosen sequence. For visual comparison, the authors select two random groups of structured proteins from the Protein Data Bank, or PDB, each containing 1,138 sequences. PDB proteins are shorter on average than the FG-Nup collection before selection. The comparison groups are chosen to share the FG-Nups’ average length of 900 residues. Matching the mean limits the most direct difference in typical sequence length, a relevant choice when the representation adds fragment vectors.

For each collection, the authors plot a histogram of the overlapping 3-grams in the projected fragment space. The two groups of structured PDB proteins yield similar patterns. The FG-Nups produce a different distribution. The paper also plots only the annotated disordered portions of the FG-Nup sequences. This helps the reader inspect the regions of the chain of greatest interest while keeping the same vocabulary and projected map. In these histograms, a prominent area represents many fragment occurrences in the collection. It does not represent a cluster of whole proteins.

For the binary classification, the positive group is the FG-Nup set, and the negative group is a randomly selected, average-length-matched PDB set of 1,138 proteins. The classifier receives summed sequence vectors. Its reported accuracy in 10-fold cross-validation is 99.81%, and the authors describe both sensitivity and specificity as high. They show a separate projection of the classified proteins in which each point represents an entire protein. The histogram and this final projection visualize different units. The former shows where the individual fragments occur in aggregate, and the latter shows how full-sequence representations are distributed.

This is a comparison between a biologically distinctive group and structured proteins from another collection. The positive sequences carry information associated with being FG-Nups as well as with disorder, and a successful classifier can use either kind of signal. The result still answers the question the experiment poses. The ProtVec sums provide enough information to separate the chosen groups under the stated cross-validation setup, even after the authors match average length.

Ordered and disordered regions within DisProt

DisProt Release 6.02 contains 694 proteins, with 1539 annotated disordered regions and 95 ordered regions. The authors use it both to characterize the fragments typical of DisProt and to test a classifier on regions already identified as ordered or disordered. The dataset counts describe the release and its region annotations. They do not specify a detailed accounting of which regions were in every held-out split. This matters when comparing the result with the FG-Nup experiment, for which the paper gives explicit class sizes and a fold count.

The DisProt histogram for disordered regions differs from the histogram for disordered parts of FG-Nups. Looking at those histograms together with the property maps, the authors infer that the disordered FG-Nup regions contain more hydrophobic and fewer polar residues than the disordered sequences shown for DisProt. They relate the visual pattern to the earlier comparison of these groups. Their figures use different histogram scales for DisProt and the other collections because of the difference in size. The displays therefore support a comparison of where occurrences concentrate without allowing a direct comparison of the absolute heights across all groups.

The DisProt experiment reports 100% accuracy when the SVM uses ProtVec to separate annotated disordered regions from annotated ordered regions. The examples are regions with known boundaries, whereas the FG-Nup comparison assigns a group label to each input protein sequence. The accuracy measures success on the task of labeling given regions. It supplies no measure of boundary location or of finding a disordered region anywhere it might occur in a longer, unsegmented protein. The two experiments show that the representation can support a classifier at different input scales, each with its own definition of the positive and negative classes.

What the ablations show

The paper has no full component-by-component ablation of the classifier pipeline, but it offers comparisons of fragment construction, a label-shuffle control for the embedding, frequency analyses for family classification, and controls for interpreting the disorder visualizations.

The choice of fragment length and split

The methods section describes a preliminary nearest-neighbor evaluation in 2xfold cross-validation. The authors considered fragment window sizes, embedding dimensions, and the choice between overlapping and shifted non-overlapping streams. Their reported conclusion is that the window of 3 residues and the shifted streams gave more consistent training. This makes the chosen setup an empirical design decision. The paper provides no score breakdown by setting, so the comparison cannot tell a reader how much of the difference came from the fragment length, how much came from the way streams were formed, or how much it affected the later SVM results.

The choices have distinct effects on the training inputs. Changing fragment length changes which strings become vocabulary entries. Changing the streams changes the neighbors a center sees. The later summation step is another design choice and is not isolated in this preliminary test. In particular, the paper does not give a downstream comparison between raw 3-gram counts and ProtVec sums on the same labeled splits. Such a comparison would quantify how much the learned relations among fragments contribute beyond the sequence information already present in their counts. The paper’s results show what the combined construction achieves.

The fragment identities matter

The label shuffle is the most direct controlled comparison in the paper. The learned and scrambled spaces have the same coordinates. Every distance therefore remains available in both versions, and the collection of property scores is unchanged. What differs is the assignment of those scores to points, because the fragment identities have been reassigned. A smoother property in the learned space is evidence that the training procedure’s placement of individual fragments matters to how that property is arranged.

This comparison also distinguishes the visual impression in a projection from a measurement in the original space. A neighborhood can look homogeneous after projection, and visual separation can depend on how the points are laid out. The Lipschitz constants are measured before that reduction. Their advantage for the learned arrangement across all the properties studied thus supports a claim about the 100-dimensional vectors themselves. The control leaves open whether another representation trained on the same sequences would exhibit similar smoothness, or whether several of the properties concentrate together because the underlying scores are related.

The strength of the bound is also its sensitivity. Because it must apply to every pair, even one pair with very similar coordinates and an appreciably different property score can determine the constant. The reported constants describe what is possible in the steepest part of the space. They do not reveal how typical that case is. The colored visualizations offer the accompanying qualitative picture of broader distributions. Together, the analyses support the narrower conclusion that nearby fragments tend to reflect biophysical distinctions and that the correspondence survives a test outside the display.

The disorder controls address specific alternatives

Matching the average length of the FG-Nups and the PDB groups addresses a concrete concern about the representation. A sum of vectors can vary as the number of terms varies. If the comparison proteins were much shorter on average, the classifier could in principle use a signal from the overall amount of sequence. The reported separation persists with matched means. However, two sets with the same mean can still have different length distributions, and the paper does not report performance for a classifier using length alone. The comparison shows that an average-length difference is unnecessary for the reported separation.

The independent PDB samples serve a different purpose. They show whether the reference histogram looks similar when the structured proteins are sampled again. Their similar density patterns make the difference between those histograms and the FG-Nup histogram easier to interpret. The whole-sequence and region-only histograms then let the authors examine how the pattern changes when they restrict attention to annotated disorder. Neither comparison removes the FG-Nup-specific sequence characteristics that can contribute to the classification. The DisProt test adds evidence from a distinct collection and label definition.

Family frequency affects the reported average

Moving from the most frequent Pfam categories to broader groups changes the composition of the family evaluation. The averages decline across the successive frequency cutoffs, while the headline gives more weight to larger categories. That observation concerns which tasks are being averaged. It cannot isolate whether classification is harder for less frequent families because they supply fewer examples, because their sequences share weaker signals, or because the random negatives differ in how difficult they are to distinguish from the positives. The category-specific scores add useful detail because even a category with plentiful examples can be difficult in this setup.

The explicit weighting makes the aggregate more representative of outcomes on the categories with many examples. It also means that changes in performance on a rare family may have little effect on the headline. A reader interested in a particular family should look to that category’s own result and example count. The paper names its supplementary file as the location of the complete family results. A single average has a different purpose, namely describing the performance of the procedure over the collected tasks under a stated rule for combining them.

Limitations

Limits the authors acknowledge

The authors explain that for families with fewer than 10 instances, a validation fold contains too few examples for a stable estimate. They use an instance-weighted average to give such families less influence over the headline. This responds to uncertainty in the smallest validation sets, but it leaves the experience of learning those families unresolved. A strong frequency-weighted statistic can coexist with weak or uncertain performance on sparsely represented categories. The ambiguity is relevant to the biological motivation because the kinds of groups with limited annotations may be among those for which a sequence-based prediction would be most useful.

The paper also calls attention to sequence length in the FG-Nup comparison. Structured proteins in PDB tend to be shorter than the disordered examples used here, making length a possible shortcut. The authors address this explicitly through sampling and state the resulting average. They also qualify the cross-collection histogram comparison. The DisProt display uses a different scale because the collections differ in size. Its shape can be compared with the shapes of the other distributions. Direct comparison of how large individual densities are across those plots would require comparable scaling.

The authors distinguish the provenance of the two disorder resources. DisProt contains experimentally identified disorder, while the FG-Nup collection is mostly computationally identified. They report that only 10 of its 1,138 disordered sequences are in Swiss-Prot. These details describe the data used for the comparison. They limit how the FG-Nup accuracy can be read as evidence of agreement with independently measured disorder across every positive example. The paper explicitly names interaction prediction and structure prediction as potential uses of the representation. The experiments presented concern visualization and the specified classification tasks.

Limits that follow from the evaluation

The family experiment evaluates one category against randomly sampled Swiss-Prot sequences. It does not require the classifier to choose the most likely category among all Pfam labels. In a multicategory use, a query could have several relevant annotations, and a wrong candidate might be more similar to the query than a typical randomly sampled negative is. The paper’s reported sensitivity and specificity apply to the binary tasks it constructed. Extending them to an exhaustive family assignment would require measuring performance on that different problem.

Within the tested family tasks, a property of the validation split matters as much as the number of folds. The fragment vectors are trained on the broad Swiss-Prot corpus, while family evaluation uses Swiss-Prot sequences with Pfam information. The design therefore supports a supervised evaluation on held-out labels using shared unsupervised features. The paper does not demonstrate that every test sequence, or close relatives of every test sequence, was absent from the unsupervised corpus. It also does not report a family test with deliberate separation of closely related sequences across folds. The experiment cannot determine from its stated splits how accuracy would change for proteins remote from sequences encountered earlier.

Likewise, claims of superiority over earlier family classifiers need a common task and evaluation. The paper relates its weighted accuracy to published results for different sets of categories, with different sizes and, in the structural example, a specified sensitivity. The comparisons establish where ProtVec sits in the authors’ account of the field. They leave open how much improvement would be observed if an earlier feature representation and ProtVec were used with the same classifier, examples, and validation partitions. The lack of a same-split count-based baseline also prevents an estimate of how much of the family result should be attributed specifically to Skip-gram training.

The disorder results are bounded by their labels and sampling. A classifier distinguishing FG-Nups from PDB proteins could recognize features characteristic of nucleoporins, of the repeated patterns highlighted by the dataset, of disorder, or of several of those factors together. Matching the mean length does not remove those associations. DisProt supplies a different test because both kinds of region come from the same resource. Its reported accuracy does not come with a comparable breakdown of the split, balancing choices, and whether regions from the same parent protein were separated between training and testing. Those details would matter for assessing performance on regions of completely new proteins.

Both disorder experiments give the classifier the sequence to classify. The inputs supplied in DisProt already specify the boundaries of ordered or disordered regions. No step in the tested pipeline learns to propose those boundaries. In the FG-Nup experiment a single decision describes the whole input, even though only a fraction of the sequence need be annotated as disordered. The experiments do not establish residue-level prediction. They also do not establish how classifiers trained on the reference groups perform on disordered sequences with different properties or on a mixture whose class frequencies differ substantially from the evaluation cases.

Limits of the representation itself

The supervised experiments rely on a single vector per input. The benefit is that the same classifier interface accommodates variable-length sequences. The cost is loss of position. A local fragment may contribute equally wherever it occurs, and different arrangements of the same fragment counts collapse to one vector. It is therefore possible for the representation to preserve enough aggregate information to classify a domain-bearing sequence while giving no direct account of where the domain lies. Inferring detailed structure would require evidence beyond distinguishing annotated groups by their summed vectors.

The sequence sum also preserves effects of repeated fragments and the number of terms added. It does not isolate those effects from other differences in composition. This matters for interpreting the embeddings. Smoothness for hydrophobicity, for example, shows a relationship between the property and relative positions of fragments. It does not identify a unique hydrophobicity coordinate or show that an SVM used hydrophobicity as the basis for a particular decision. Projection, distance analysis, and classification provide evidence at different levels of the construction.

Finally, the name BioVec describes a broader proposal than the experiments cover. The protein study demonstrates how to train reusable fragment features on amino acid sequences and test them on protein tasks. GeneVec names a prospective counterpart for gene sequences. The paper’s quantitative results give no measurement of that extension. Even within proteins, the option to reuse the same embedding is a property of the feature construction. Its utility for each proposed prediction task would depend on a separate evaluation of the relevant inputs, labels, and baselines.

What came after

Comparing sequence collections through their embeddings

The work on Word Embedding Language Divergence, or WELD, takes a related idea in the direction of comparing languages. Its stated problem is to quantify distance across natural and genetic languages using word embeddings. In ProtVec, fragment contexts produce a geometry that makes it possible to investigate similarity between fragments and construct features for individual sequences. WELD puts the comparison at another level, asking how embeddings can inform a distance between the languages themselves. The connection is the use of context-derived evidence as a basis for comparison, with a different choice of what is being compared. Comparing Natural and Genetic Languages Using Word Embedding Language Divergence

That change in unit gives the later work a different aim from the protein family experiment. A Pfam classifier is evaluated by its decisions on members and comparison examples for a given category. A measure of language distance is meant to characterize a relationship between collections more broadly. Both approaches start from relationships among recurring units. The ProtVec paper uses the resulting geometry to inspect properties and represent proteins, while the WELD study names the comparison of natural and genetic languages as its objective. Word Embedding Language Divergence

Inspecting attention in protein sequences

BERTology Meets Biology pursues the question of what a learned representation of protein sequences can tell researchers about biology by interpreting attention. Attention is the part of a sequence computation that weights which positions contribute to the processing of a given position. This makes the object of analysis different from a fixed vector for a 3-gram. The ProtVec property experiments inspect where fragments sit in a shared space and whether those positions relate to measurable properties. A study of attention shifts the focus to relationships among positions within a sequence. BERTology Meets Biology

The two lines of work extend different parts of the original proposal. Language divergence develops the idea that learned embeddings can provide evidence about relationships across collections. Attention interpretation continues the inquiry into what biological information is visible in a representation learned from sequences. The ProtVec paper contributes a concrete example of how to frame that inquiry. A neighborhood-prediction objective produces fragment vectors, an independent comparison tests how their geometry relates to physical properties, and labeled experiments determine which group distinctions the sequence sums can support.

Cite

Cite as Ehsaneddin Asgari and Mohammad R. K. Mofrad. 2015. Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics. PLoS ONE.

The paper itself, not this page. BibTeX from the library's record of the work. DOI 10.1371/journal.pone.0141287 · arXiv 1503.05140

@inproceedings{asgari2015continuous,
  title = {{Continuous Distributed Representation of Biological Sequences for Deep Proteomics and Genomics}},
  author = {Ehsaneddin Asgari and Mohammad R. K. Mofrad},
  booktitle = {PLoS ONE},
  year = {2015},
  doi = {10.1371/journal.pone.0141287},
  eprint = {1503.05140},
  archivePrefix = {arXiv},
  url = {https://doi.org/10.1371/journal.pone.0141287}
}

↑ back to top

This page in Markdown https://md.research.elamur.ai/free/en/papers/asgari-2015-continuous-distributed-representation-biological-sequences/