Collagen is one of the most important structural proteins
in biology,
and its structural hierarchy plays a crucial role in many mechanically
important biomaterials. Here, we demonstrate how transformer models
can be used to predict, directly from the primary amino acid sequence,
the thermal stability of collagen triple helices, measured via the
melting temperature T
m. We report two
distinct transformer architectures to compare performance. First,
we train a small transformer model from scratch, using our collagen
data set featuring only 633 sequence-to-T
m pairings. Second, we use a large pretrained transformer model, ProtBERT,
and fine-tune it for a particular downstream task by utilizing sequence-to-T
m pairings, using a deep convolutional network
to translate natural language processing BERT embeddings into required
features. Both the small transformer model and the fine-tuned ProtBERT
model have similar R
2 values of test data
(R
2 = 0.84 vs 0.79, respectively), but
the ProtBERT is a much larger pretrained model that may not always
be applicable for other biological or biomaterials questions. Specifically,
we show that the small transformer model requires only 0.026% of the
number of parameters compared to the much larger model but reaches
almost the same accuracy for the test set. We compare the performance
of both models against 71 newly published sequences for which T
m has been obtained as a validation set and
find reasonable agreement, with ProtBERT outperforming the small transformer
model. The results presented here are, to our best knowledge, the
first demonstration of the use of transformer models for relatively
small data sets and for the prediction of specific biophysical properties
of interest. We anticipate that the work presented here serves as
a starting point for transformer models to be applied to other biophysical
problems.