# Exploration of the possibility of infusing Social Media Trends into
generating NFT Recommendations

Dinuka Ravijaya Piyadigama<EMAIL_ADDRESS>0000-0002-8123-0099
University of Westminster309 Regent St.LondonUK and  Guhanathan Poravi
Informatics Institute of Technology57 Ramakrishna RdColombo 06Sri Lanka
<EMAIL_ADDRESS>
(2022)

###### Abstract.

Recommendations Systems have been identified to be one of the integral
elements of driving sales in e-commerce sites. The utilization of opinion
mining data extracted from trends has been attempted to improve the
recommendations that can be provided by baseline methods in this research when
user-click data is lacking or is difficult to be collected due to privacy
concerns.

Utilizing social trends to influence the recommendations generated for a set
of unique items has been explored with the use of a suggested scoring
mechanism. Embracing concepts from decentralized networks that are expected to
change how users interact via the internet over the next couple of decades,
the suggested Recommendations System attempts to make use of multiple sources
of information, applying coherent information retrieval techniques to extract
probable trending items.

The proposed Recommendations Architecture in the research presents a method to
integrate social trends with recommendations to produce promising outputs.

Recommendation Systems, Opinion Mining, Non-fungible Tokens, Data Science,
Algorithm Design

††copyright: acmcopyright††journalyear: 2022††conference: 16th ACM Conference
on Recommender Systems; September 18–23, 2022; Seattle, WA, USA††ccs:
Information systems Recommender systems††ccs: Human-centered computing Social
recommendation††ccs: Information systems Retrieval models and ranking††ccs:
Information systems Data mining††ccs: Applied computing Online shopping

##  1\. Introduction

Non-fungible Token (NFT) s allow people to trace the origin of digital items
with the help of Blockchain technology. Since the introduction of crypto, NFT
s have stood out to be the most widely accepted application of Blockchain
technology.

One NFT is expected to be unique from another. As these items are unique from
each other, as expressed by the name itself, they are not fungible. They
cannot be replaced like crypto, which is fungible.

Due to several restraints that are presented with the nature of NFT s & the
overwhelming amount of data that needs to be analyzed, it is difficult to find
NFTs of comparable value that are trending among the community, timely and
relevant to each user’s identified interests.

Recommendations Systems have been identified to be one of the integral
elements of driving sales in e-commerce sites. They have been driving
engagement and consumption of content as well as items on almost every corner
of the internet over the last decade. 30% of Amazon’s revenue is said to come
from the items recommended to users (naumovDeepLearningRecommendation2019,
14). 60% of watch time on Youtube and 75% on Netflix were also reported to
have come about as a result of recommendations (RecommendationsWhatWhy, 15,
17).

In the month of June of 2021, OpenSea which is poised to be the Amazon of NFT
s facilitated sales of $150 million and was valuated at $1.5 Billion
(hackettThisCryptoMarketplace2021, 9, 7, 6). Therefore, it is clear that
Recommendation Systems could help bolster sales on such NFT-marketplaces,
bringing in more revenue to businesses, and creators while helping users
explore trending & relevant items.

##  2\. Review of Related Work

###  2.1. Identified Challenges & Requirements to build a Social Trends aware
Recommendations System for NFTs

When considering possible options to explore the possibility of recommending
NFT s, it appeared that there hadn’t been much past work that could relate to
this specific purpose.

> _”Crypto has a founding tradition of emphasizing freedom and privacy. Maybe
> because of this prevailing cultural trend, the NFT space does not have many
> recommender systems.”_
> (WhatAreYou2020, 18)

Being loosely related to the crypto market and community
(dowlingNonfungibleTokenPricing2021, 8) it is understood that the early
adopters & pioneers in this space are concerned about their privacy.

Since NFT s have a distant relationship with crypto assets, it is expected to
be of help to understand how crypto assets are evaluated when opted for
selection to comprehend how NFT assets could be evaluated. A study which was
done related to a modelling framework that exposes this area of research
(bartolucciModelOptimalSelection2020, 2) assumes that two main features,
namely security and stability can be used to determine the user’s desire to
own a specific crypto asset. Crypto-related assets have a tendency to change
with time, social acceptance and trends. Therefore, it is important to
consider these factors when building a crypto-related Recommendations System.

###  2.2. User Opinion & Sentiment Aware Recommendation Systems

> _”Catching opinions from social media could be a cheap, fast and effective
> way to collect feedbacks from users”_
> (zhangOpinionMiningSentiment2018, 20)

When the above fact is looked at in a more generalized form, it is clear that
exploiting user trends that build-up of opinions from social media can lead to
better quality recommendations, while (huReviewerCredibilitySentiment2020, 10)
expressing how sentiment analysis of user reviews can be used to point to the
direction of personalized recommendations.

The utilization of opinion mining data extracted from trends to improve the
recommendations that can be provided by baseline methods was expected to
address the restraints of recommending items presented by the very nature of
NFT s.

There have been many attempts to expand the capabilities of Recommendations by
making use of public opinion. Collaborative Filtering was one approach to
achieve that and it has been the standard baseline technique for
Recommendations for over a decade (lindenAmazonComRecommendations2003, 13,
16). But, it can’t be taken as the only recommendations model in this use-case
because, by the time one NFT is viewed many times by other users, it may
already be too late for another user to purchase that item for a profitable
cost as the value would’ve sky-rocketed due to high demand over a long period
of time.

User data on social media has been integrated into Machine Learning (ML)
Hybrid Recommendation Architectures in several ways to produce user-opinion &
social context-aware Recommendations.

One of these methods was to apply opinion mining & sentiment analysis on
users’ reviews to create a preference profile and create collaborative
filtering like recommendations (chengHybridRecommenderSystem2020a, 5). While
this method is effective in dealing with insufficient data, the issue related
to the required use case is that users still have to place reviews on previous
movies to create a preference profile, which would add to the privacy concern
mentioned before. A similar Deep learning (DL) model was attempted to generate
possible user ratings, again based on user comments
(chenUserRatingClassification2019, 4), letting the same issue prevail.

A hybrid approach of combining content-based recommendation, user-to-user
collaborative filtering and personalized recommendation techniques has been
attempted, to finally show the sentiment analysis polarity of the recommended
item based on a user’s tweets (ayushiCrossDomainRecommendationModel2018, 1).
While this model does a good job in addressing the limitation of single domain
analysis such as data sparsity & cold start problem, it doesn’t consider the
sentiment for the particular recommendation. It is only calculated and made
visible to the user. The user is required to make the decision of selecting if
the item is worth. It also doesn’t make use of trends that are happening on
social media.

###  2.3. Research Motivation

In recent research done by Amazon (larryHistoryAmazonRecommendation2019, 12)
it is understood that when a timeline is considered for recommendations, an
_Autoencoder_ Deep Learning model is capable of Recommending the best possible
combination of movies to users. Chronologically sorted movie-viewing data
managed to outperform item-to-item collaborative filtering applied with the
bestseller list. This was done by getting the model to recommend at least 2
recently released movies. The idea behind this was that a user is more likely
to watch a recently released movie rather than a very popular and highly rated
old movie.

The method followed to recommend items to the user in this case motivated the
authors to pursue to attempt to infuse social media trends into
Recommendations. The reason for this was that trends on social media will give
an idea of the things, people that are very popular at that moment in time. A
person would be more interested in getting a recommendation with whatever that
is related to a popular topic rather than an old item that was very popular
back for a while and highly rated.

This can be applied even to an e-commerce setting. But, especially in the case
of NFT s, this opens up another way to get items that may not otherwise
surface in front of users’ eyes. It would also keep updating over time, as
trending topics change. Therefore, new trends may open up new valuable,
relevant items rather than old items that are already high in demand and owned
by owners who may not wish to sell.

##  3\. Proposed System Architecture Design

In the attempt to find a method to recommend items based on people’s
aggregated opinions in the form of trending topics on social platforms,
without having to track user clicks and online behaviour in a way that can
expose individuals, the author decided to move in the direction of searching
possible methods to integrate social media trends data that is sourced from
external sources for recommendations. Due to the privacy concern mentioned
earlier, the author’s goal was to build the Recommendation System in a way
that potential buyers’ privacy isn’t threatened by the collection of user
click data.

###  3.1. System Process Flowchart

The flow of data in the system with the various processing steps these data
flows through has been represented in Figure 1.

Figure 1. System Process Flowchart (self-composed)

###  3.2. Algorithm Design

The following equation was designed to calculate the impact of a trend.

(1) $i_{t}=\frac{t_{vt,c}}{Med(T_{vt})}$

The volume of a trend is divided by the median volume here to get a relative
impact of a trend. When the trend score is kept as low as possible, when
applied to the next total trend-score calculation equation, the score will
drop down to a low value faster.

For trends that don’t have a measurable volume, $t_{vt,c}$ can be taken as
$\left(T_{vt}{min}-1\right)$ to give it the lowest possible value, or as
$Med(T_{vt})$ to omit the impact score all-together.

The following equation was designed to calculate the total trends score of
each item.

(2)
$T_{t_{s},i}=\frac{\sum^{N_{i_{s}}}_{i_{s}=1}\left[\sum^{k_{w}}_{k_{w}=1}s_{c}\left(\frac{t_{vt,c}}{Med(T_{vt})}\right)\frac{mu}{\left(\mu+n_{m}\right)}\right]}{N_{i_{s}}}$

$T_{t_{s},i}$ \- Total trends score for one item
$N_{i_{s}}$ \- Total number of information sources
$i_{s}$ \- Source of information
$k_{w}$ \- Number of keywords in the current item
$s_{c}$ \- Sentiment score surrounding chosen trend content
$m$ \- Match value, a Boolean used to check if the current evaluated content
contains the chosen trend to be matched against.
$u$ \- User priority, used to check the current user’s interest in the chosen
trend. This is 1 by default
$t_{vt,c}$ \- Tweet volume at this moment in time of the chosen content
$Med(T_{vt})$ \- Median Tweet volume at this moment in time
$\mu$ \- Constant, set to 0.1 to avoid division by 0 error for today’s trends
$n_{m}$ \- Number of days between the current day & the day of the trend.

Although the equation supports the calculation of a trend-score using multiple
sources of trends, only Twitter trends were used for the testing & evaluation
purposes of this research.

As much as the constant $\mu$ helps get rid of division by zero error for
trends that happened on the same day of calculating the trend-score, it also
helps multiply the score by 10 to significantly increase the trend-score of
those trends.

The beauty of this equation is that it isn’t necessarily required to be
applied for only NFT recommendations. It can be used to enhance any content-
based recommendations model. It can be seen as another way of infusing
collaborative filtering, without the collection of user-specific data by the
platform that integrates the presented Recommendations Architecture.

The Total trends score for one item calculated above can either be taken for
recommendations as to the top N items or as an absolute similarity match with
other chosen items’ trends scores. In this research, the author decided to
test this with the top N items strategy, to generate featured items
recommendations at a given date & time.

##  4\. Implementation Choices

###  4.1. Extracting the Keywords of each item

NFT asset name, description, collection name & description were used to
extract words that describe the asset. The RAKE Vectorizer of the NTLK Python
Natural Language Processing (NLP) library was used for the purpose of
extracting keywords from these descriptions.

###  4.2. Selection of a Sentiment Analysis Model

Sentiment scores of the top mentions of the trend on social media (top tweets)
were generated using a pre-built sentiment analysis model. 3 Models were
tested for this purpose. The 3 models that were tested were:

  1. (1)

SpacyTextBlob

  2. (2)

HappyTransformer

  3. (3)

Twitter-roBERTa-base for Sentiment Analysis

The 3rd model, which is a state of the art Transformer model
(CardiffnlpTwitterrobertabasesentimentHugging, 3, 19) that outputs negative,
neutral & positive sentiment scores was chosen. This model outperformed the
other two both in the accuracy of the sentiment and the speed. Another
advantage of choosing this model was that it was trained on past Tweet data.
Therefore, all complexities such as hashtags were handled by the model itself.

This model gave 3 parameters as output. Namely, negative, neutral and positive
sentiment scores. The highest score from each of these was taken into
consideration. In the case of negative sentiment, the trend score would become
negative. It made sense to leave it as it was since items with negative
sentiment may not be suitable to show to users. This could be modified based
on the use case of the system. A neutral sentiment score was taken without any
modification as well, while positive sentiment was multiplied by 2. This was
done to have a clear increase in trends surrounding positive sentiment since
it was expected by the author of the research that a user would be more likely
to purchase an item with positive sentiment.

##  5\. Testing & Evaluation

Out of 3872 randomly fetched NFT asset data & 677 randomly fetched trends from
the OpenSea & Twitter Application Programming Interface (API) s respectively,
across 14 different datetimes, 55 recommendations were produced using this
method. All the trends & items mined from external APIs were randomly sourced
& heavily pre-processed.

The practicality & value of the Recommendations Architecture suggested in this
research can be better understood by a qualitative evaluation of the outputs
produced by the generated graphs that are represented below.

(a) Total Trends based Recommendations made with time

(b) Evaluation of Trends based Recommender

Figure 2. Count of Generated Recommendations Recommendations generated (self-
composed)

The graph in Figure 2(b) shows the count of the items that were matched with
the trends of each datetime, highlighting the counts of newly matched items.
It is important to note that the rankings of these items that were recommended
are updated each time a new set of trends are entered into the system (using
an automated process) based on the trend score that is calculated.

The count of matched items in Figure 2 may have been low over the first few
days due to fetching worldwide trends, which included trends in languages such
as Chinese & Korean that were not contained in the descriptions of the items.
Towards the latter half of the experiment, trends from only the UK were
fetched to overcome this constraint.

A sample output that was generated by the model from a pandas data-frame
output of a Jupyter notebook is shown in Figure 3. The keywords have been used
to find matches between an NFT which is referenced by the reference_id (a
combination of the Contract Address of the Smart Contract
(IntroductionSmartContracts, 11) that minted the NFT & the Token Id of the
NFT). This reference_id can be used to track the NFT on the Blockchain.

Figure 3. Sample output of Generated Recommendations (self-composed)

The heatmap generated by the output produced in Figure 4 shows how the trend-
score for items decreases with time, from the date of matching with the trend
for items that had a maximum trend-score of 30. The max score was limited to
generate this heatmap, to make the changes in scores clearly visible for as
much items as possible. Additional heatmaps that were generated have been
placed in the Appendix of this paper under Extended Testing & Evaluation of
the Model

Figure 4. Trends based Recommender - Trend Score Heatmap (self-composed)

The matrix that was generated by calculating each trend-score for each NFT on
each datetime of the collected trends can be seen in Figure 6.

When taking a look at the heatmap in Figure 4, several observations can be
made related to the expected output. It clearly shows how the trend-score
gradually decreases with time, as the trend gets older. The decrease in scores
in time can be understood better by the annotated heatmap in Figure 7. High-
impact trends stay relevant for a longer period of time. Sometimes even better
than those matched on the same day. This makes sense since a highly impactful
topic is expected to be in peoples’ minds for a longer period of time.

Although the trends data matches may be low as it depends on the kind of
descriptions of items used for recommendations, another trends recommender
could help identify possible interests that a marketplace admin/ creator/
seller could identify for future item additions to an e-commerce platform.
This could show the impact of the trend. Even though new matching items could
be added over the course of several days, that wouldn’t affect the usability
of the trend-score calculation algorithm as the number of days since the trend
happened is considered for the final trend-score.

##  6\. Conclusion

In this research, the author had identified the lack of Recommendation Systems
for NFT s. Social media trends data appeared to be a valuable source of
getting real-time global trends. An attempt to infuse these trends data into
generating valid feature recommendations was attempted.

The trends-based recommender, NFT-Trends-RecSys explored in this research is
expected to enhance Content-based Recommendation Systems with Collaborative-
filtering-like capabilities, while preserving user anonymity & without
collecting user click-data. The suggested model architecture was tested to
identify if it was possible to recommend trending, timely items to users
without collecting user-specific information. The results shown are very
promising since all the data collected & used for the research was entirely
random & arbitrary.

The data extraction methods explored for recommending NFT s, integration of
social trends into recommendations & the aggregation algorithm of
recommendations utilizing ensembled models are novel results yielded by this
research.

Many possibilities appeared after the conclusion of this research as mentioned
in the Future Work section that could be used as a stepping stone to creating
even more interesting & utilitarian Recommendation Architectures in the
future. With the NFT s expected to be embraced by digital systems & the
internet of the next decade, the outcome of this research & the invented
algorithm could be built-upon to make recommendations as good as those of the
last decade.

##  7\. Future Enhancements & Novel Possibilities that Emerged

The current solution does a string match with keywords of each item. This may
cause some matches to be skipped due to appearing in different forms. The NLP
technique, lemmatization could be a possible solution for this. Name Entity
Recognition is another NLP technique that could enhance the quality of trends
data used. The significance of introducing such techniques will have to be
tested since they may not have a significant impact on the output as most
trends appear to be nouns.

Using multiple sources of trends data would be the first thing the author
suggests as this would easily add to the quality and quantity of the generated
recommendations. In the case of NFT s, Reddit & Discord could be identified as
the next 2 best options. Google Trends data & possibly Search data could be
value-addition as well. Furthermore, this can be applied to a localized forum
or feedback received in the form of comments on e-commerce sites.

One of the short-comings to help match trends for this purpose that the author
of this research noticed is that Twitter trends contain hashtags as trends
names at times. Either the developers from the end of Twitter could give a
possible solution to it or hashtags may have to be pre-processed and
separated.

Due to the lack of NFT data, a DL based approach could not be attempted in
this research. As a substitute or addition to recently released movies,
Amazon’s DL Neural Network Model could make use of trends, maybe to bolster
recommendations for movies as well as e-commerce items.

The trends could be categorized to identify similar trends that users seem to
show interest in. It would be almost impossible to attempt this level of
personalization without collecting user data. Therefore, the value of such an
attempt may have to be justified.

The trends-based recommender could act as a Decentralized Recommendations
System to provide trending recommendations of NFT assets since the trends and
items can come from two different sources. It would be interesting to build a
peer-to-peer Recommendation Network that could support this.

The suggested solution to integrate social media trends into recommendations
could also help address the cold-start problem in a distributed computing
environment or when used as a SASS product where a store gives its items with
descriptions and requests for recommendations from a third-party that has
social trends data.

###### Acknowledgements.

To Twitter & OpenSea development teams for providing API-keys for free API
access & data.

## References

  * (1) Smriti Ayushi and Badri Prasad  “Cross-Domain Recommendation Model Based on Hybrid Approach”  In _International Journal of Modern Education and Computer Science_ 10.11, 2018, pp. 36–42  DOI: 10.5815/ijmecs.2018.11.05
  * (2) Silvia Bartolucci and Andrei Kirilenko  “A Model of the Optimal Selection of Crypto Assets”  In _Royal Society Open Science_ 7.8 Royal Society, 2020, pp. 191863  DOI: 10.1098/rsos.191863
  * (3) “Cardiffnlp/Twitter-Roberta-Base-Sentiment $\cdot$ Hugging Face”, https://huggingface.co/cardiffnlp/twitter-roberta-base-sentiment
  * (4) Rung-Ching Chen and Hendry  “User Rating Classification via Deep Belief Network Learning and Sentiment Analysis”  In _IEEE Transactions on Computational Social Systems_ 6.3, 2019, pp. 535–546  DOI: 10.1109/TCSS.2019.2915543
  * (5) Li Chen Cheng and Ming-Chan Lin  “A Hybrid Recommender System for the Mining of Consumer Preferences from Their Reviews”  In _Journal of Information Science_ 46.5, 2020, pp. 664–682  DOI: 10.1177/0165551519849510
  * (6) Sylve Chevet  “Blockchain Technology and Non-Fungible Tokens: Reshaping Value Chains in Creative Industries”  In _SSRN Electronic Journal_ , 2018  DOI: 10.2139/ssrn.3212662
  * (7) dfinzer  “Announcing Our $100M Raise, Led by A16z”  In _OpenSea Blog_ , 2021
  * (8) Michael Dowling  “Is Non-Fungible Token Pricing Driven by Cryptocurrencies? — Elsevier Enhanced Reader”, https://www.sciencedirect.com/science/article/pii/S1544612321001781?via%3Dihub, 2021  DOI: 10.1016/j.frl.2021.102097
  * (9) Robert Hackett  “This Crypto Marketplace Just Raised $23 Million to Be the ‘Amazon of NFTs”’  In _Fortune_ , https://fortune.com/2021/03/18/nft-art-crypto-marketplace-opensea-amazon/, 2021
  * (10) Shigang Hu et al.  “Reviewer Credibility and Sentiment Analysis Based User Profile Modelling for Online Product Recommendation”  In _IEEE Access_ 8, 2020, pp. 26172–26189  DOI: 10.1109/ACCESS.2020.2971087
  * (11) “Introduction to Smart Contracts”  In _ethereum.org_ , https://ethereum.org
  * (12) Hardesty Larry  “The History of Amazon’s Recommendation Algorithm”  In _Amazon Science_ , https://www.amazon.science/the-history-of-amazons-recommendation-algorithm, 2019
  * (13) G. Linden, B. Smith and J. York  “Amazon.Com Recommendations: Item-to-Item Collaborative Filtering”  In _IEEE Internet Computing_ 7.1, 2003, pp. 76–80  DOI: 10.1109/MIC.2003.1167344
  * (14) Maxim Naumov et al.  “Deep Learning Recommendation Model for Personalization and Recommendation Systems”  In _arXiv:1906.00091 [cs]_ , 2019  arXiv:1906.00091 [cs]
  * (15) “Recommendations: What and Why? — Recommendation Systems”, https://developers.google.com/machine-learning/recommendation/overview
  * (16) Brent Smith and Greg Linden  “Two Decades of Recommender Systems at Amazon.Com”  In _IEEE Internet Computing_ 21.3, 2017, pp. 12–18  DOI: 10.1109/MIC.2017.72
  * (17) Tom Vanderbilt  “The Science Behind the Netflix Algorithms That Decide What You’ll Watch Next”  In _Wired_
  * (18) “What Are You Missing? Using Basic Machine Learning to Predict and Recommend NFTs with OpenSea Data - OpenSea Blog”, https://opensea.io/blog/analysis/predict-and-recommend-nfts/, 2020
  * (19) Thomas Wolf et al.  “Transformers: State-of-the-Art Natural Language Processing”  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing: System Demonstrations_ Online: Association for Computational Linguistics, 2020, pp. 38–45  DOI: 10.18653/v1/2020.emnlp-demos.6
  * (20) Wenping Zhang, Mengna Xu and Qiqi Jiang  “Opinion Mining and Sentiment Analysis in Social Media: Challenges and Applications”  In _HCI in Business, Government, and Organizations_ 10923 Cham: Springer International Publishing, 2018, pp. 536–548  DOI: 10.1007/978-3-319-91716-0˙43

##  Appendix A Extended Testing & Evaluation of the Model

Figure 5. Trends based Recommendations Trends Matches Data (self-composed)
Figure 6. Trends based Recommendations Heatmap Data Matrix (self-composed)
Figure 7. Trends based Recommender Testing Annotated Heatmap - 10 random items
(self-composed) Figure 8. Trends based Recommender Testing Heatmap - max score
30 (self-composed) Figure 9. Trends based Recommender Testing Heatmap - max
score 100 (self-composed) Figure 10. Trends based Recommender Testing Heatmap
- All items (self-composed)

(a) Trends based Recommendations Newly Matched Items

(b) Trends based Recommendations Total Matched Items

Figure 11. Trends based Recommendations Matched Item Counts (self-composed)