Entropy and complexity unveil the landscape of memes evolution

On the Internet, information circulates fast and widely, and the form of content adapts to comply with users’ cognitive abilities. Memes are an emerging aspect of the internet system of signification, and their visual schemes evolve by adapting to a heterogeneous context. A fundamental question is whether they present culturally and temporally transcendent characteristics in their organizing principles. In this work, we study the evolution of 2 million visual memes published on Reddit over ten years, from 2011 to 2020, in terms of their statistical complexity and entropy. A combination of a deep neural network and a clustering algorithm is used to group memes according to the underlying templates. The grouping of memes is the cornerstone to trace the growth curve of these objects. We observe an exponential growth of the number of new created templates with a doubling time of approximately 6 months, and find that long-lasting templates are associated with strong early adoption. Notably, the creation of new memes is accompanied with an increased visual complexity of memes content, in a continuous effort to represent social trends and attitudes, that parallels a trend observed also in painting art.

www.nature.com/scientificreports/ models from mathematical epidemiology to account for the growth and decline of visual memes. Ratkiewicz and coworkers 17 developed a framework for analyzing the diffusion of politics-related tweets. Weng et al. 18 studied meme virality through an agent-based approach, accounting for the limited attention each user can spend in online environments. The mechanisms of competition and collaboration among memes, that determine the successful passage of a meme from a generation to another one has been investigated by Coscia 19 , together with the rules underlying memes popularity 20,21 . These studies show that the dynamics behind memes (both visual and textual) virality are not linearly dependent upon the adherence to the template of new meme instances. The popularity of memes is investigated also with the underlying network community structure 22 . Ferrara et al. 23 employed clustering techniques to identify text-based memes, leveraging the content, metadata, and network structure of social data. Dang et al. 24 used tri-grams to cluster posts from Reddit and track the spreading of memes. Linguistic features 25 have been also investigated as predictors for textual memes popularity. Adamic et al. 26 explored a large corpus of textual data from Facebook modeling the propagation of information as a Yule process. Scientific memes 27 in the form of words were investigated exploring inheritance patterns in the scientific literature. Dubey et al. 28 employed a Deep Learning architecture to process memes, extract the underlying template and explore its variations. An extensive analysis of visual memes is performed by Zannettou and coworkers 29 exploiting perceptual hashing to cluster visual memes together and explore the connections between the meme content and the communities in which it circulates. In 30 a deep-learning classifier for memes is proposed to explore the role of memes instead of non-meme images during elections. These investigations developed relevant insights and tools for handling and researching the world of internet memes. Nevertheless, little attention is given to the fundamental aspects of the evolution of memes in terms of visual features and conveyed information. Eventually, no evidence is reported for the hypothesis of internet memes constituting a metalanguage of the internet 10,11 . In this work, we investigate the general evolution pattern of memes as an online communication artifact. To this aim, we leverage the evolutionist approach to define and measure the evolution rate, i.e., the number of new templates that appear online per time unit, the variation rate, i.e., the number of new instances of the same template that are produced in time; this quantity is particularly relevant concerning memes' popularity. As artistic expressions have been effectively investigated exploiting network science and physics concepts 31 , we compute the trajectory of memes in the entropy-complexity plane. Specifically, these measures, grounded on the physics of complex systems, have been employed to investigate painting arts 32 , revealing a temporal pattern towards higher complexity.
The basis of this investigation is a massive dataset of 2 million Reddit memes over ten years. Each image has been classified and ascribed to a template through a Machine Learning pipeline composed by an unsupervised Deep-learning based classifier followed by a density-based clustering algorithm (see Methods). Our investigation shows that the memes ecosystem size is exponentially increasing, with a doubling time of approximately six months, indicating that replication is currently the leading process. Concerning selection, we observe that memes' persistence is dominated by rapid early adoption. The variation pattern is captured by the trajectory in the entropy-complexity plane. Similarly to what happens in painting arts, we observe a tendency towards structures with increasing visual complexity; early memes were made up of simple foreground images (e.g., animals or explicit human expressions) on plain backgrounds, while later ones involve more articulated scenes (e.g., modified movie frames).
As cultural signs, memes are strictly connected to the broader cultural system in which they are embedded. While their ultimate theoretical definition is still elusive and debated in terms of methodological frames, our results indicate that memes appear as one of the most productive and adaptable areas of digital communication, functioning as a metalanguage of cultural dynamics and evolving in progressive forms of textual complexity.

Results
Our study starts from Dawkins' hypothesis of the meme as the basic unit of cultural evolution, in connection with the post-memetics analyses of memes as cultural signs. We studied the evolution of Internet visual memes, i.e. images with (typically) overlapped text strings over a time span of 10 years. The dataset comprises around 2 million images, that were grouped together exploiting an unsupervised Machine Learning routine (see Methods). Such an extended dataset enables us to investigate some properties of this particular cultural meme. The clusters retrieved by our procedure correspond to the templates of the various memes. In the following, we refer to "meme" as for the template, while each image belonging to a given template is an "instance" of the meme.
To quantify the growth of memes adoption we computed their evolution rate. For each cluster, we store the creation time of its first instance. Next, per each week of sampling, we compute the number of new templates. The result is reported in Fig. 1, in which the growth rate is estimated by an exponential fit, giving a doubling time for the number of templates T ∼ 6 months . The sudden drop in the plot is a finite size effect of the dataset. Namely, for subreddits r/memes and r/dankmemes it has not been possible to download the data over 2019, due to the exponential trend in the number of memes (see Fig. 4). The fit was performed considering the data until January 2019.
Another relevant quantity in terms of cultural evolution is the mutation rate. The mutation rate can be approximated by looking at the instances of each meme. For each template we computed the distribution of the differences ( t ) between the creation times of an instance and the following one. This distribution reveals the nature of growth of each cluster: a distribution skewed towards low values of t corresponds to a very fast and bursty growth dynamic. Conversely, larger values of t may reveal a more persistent template, whose instances occur more spaced in time. In Fig. 2 the distribution of the "inter-instance" times (blue histograms, left column) is reported together with the clusters lifetime distribution (orange histograms, right column) i.e. the time interval between the first and the last instance of a given meme. These distributions are computed for different typical cluster sizes (indicated as CS). www.nature.com/scientificreports/ Overall, lifetime results positively correlated with cluster size. Small clusters show a heterogeneous distribution of instances' inter-arrival times, comprising both small-bursty clusters and small-slowly paced ones. The lifetime is peaked towards low values. This behaviour is also shown by very recent clusters whose actual size cannot be estimated within our dataset, as their evolution is ongoing. As the cluster size grows, we observe a shift of the inter-times distribution towards low values, unveiling faster dynamics, while the lifetime distribution is concentrated around larger values. By looking the corresponding growth curves we observe an ensemble of trajectories that tend to display a fast initial build up of popularity, followed by a slower diffusion that determines the longer lifetime values. Conversely there are also examples of memes that takes more time to reach a wide popularity. This aspect may be due to non-trivial popularity dynamics, calling for further research.
Following Sigaki et al. 32 , we investigated the evolution of memes in the entropy-complexity plane. For each meme instance we computed the values of H(P) and C(P) and then averaged the obtained values by year. The results are reported, for each subreddit, in Fig. 3. We observe that each community moves towards higher complexity values, except for r/AdviceAnimals, whose posting rules limit the natural evolution of produced memes; this effect could be also linked to the overall decrease in memes production observed for this community. Interestingly, also paintings followed a similar trajectory in the entropy-complexity plane: quite localized along the entropy axis, but shifting towards higher complexity in time.
The tendency of memes to evolve towards more complex structures can be explained considering this object as part of the emerging internet meta-language. In fact, memes are used to quickly vehicle context-specific content, which in turn evolves towards more and more specific templates. This may lead to a segregation effect, with a specific dialect depending on the community in which a meme is shared. In fact a meme created for a specific community, e.g. gaming community, does not have to be universally comprehensible across the web. This aspect leads to the use of more complex and specific patterns.

Discussion
The Internet provides an environment in which information quickly spreads and adapts to comply with users' cognitive abilities. A foundational question about memes is whether they present culturally and temporally transcendent characteristics in their organizing principles and how they evolve. Such a significant increase and spread of visual memes can be read under the light of post-memetics theories. Visual memes are favored by the rapid, fluid, continuously changing internet environment because of their simplicity, ease of handling and broad applicability in terms of subjects and situations. We find support for the hypothesis that memes are part of an emerging form of internet metalanguage: on one side, we observe an exponential growth with a doubling time around 6 months; on the other side, the complexity of memes contents increases, allowing to timely represent social trends and attitudes. Our analysis shows that memes are relational entities functioning as flexible elements of a metalanguage that de-codifies and re-codifies the cultural system. They appear as fundamental components of an organic process that affects and conditions the digital environment and produces evolving forms of visual and textual complexity.

Methods
Data breakdown. Reddit is an online social media platform that aggregates users in communities of interest. In the last years, it has been widely employed to perform academic research on online communities, and the number of active users on this platform is constantly increasing 33 .
The visual memes used as dataset for this study were downloaded through the Pushshift Reddit Dataset 34 , selecting four communities (subreddits) explicitly devoted to share and discuss about memes, namely: r/Advice-Animals, r/memes, r/CemeteryComedy and r/dankmemes. Data were collected considering a ten years window, from 2011 to 2020. In Fig. 4 the number of downloaded posts per each community is reported, as function of time. Not all the communities started their activity simultaneously. A list of all images urls employed in this study is available online 35 .  However, long lasting memes template shows skewed distributions for the inter-arrival times ( t ). This highlights the tendency of long lasting memes to undergo strong early adoption. www.nature.com/scientificreports/ from the original template. To measure the evolution and variation rate of visual memes, it is crucial to cluster them according to the underlying template. As the collected number of memes is about two million, such a large amount of images calls for automatic classification methods. Our unsupervised clustering procedure is divided into two steps: first, we apply, to our knowledge, the state of the art Deep Learning implementation for unsupervised image clustering, that is called SCAN 36 (Semantic Clustering by Adopting Nearest neighbors), followed by a further clustering procedure through the HDBSCAN (Hierarchical Density-Based Spatial Clustering of Applications with Noise) algorithm 37 .
Specifically, the SCAN algorithm works in two steps. In the first one, self-supervised learning is used to train a neural network with parameters ϑ that maps images ( x i , i = 1 . . . N ) into feature representations φ ϑ (x i ) ∈ R d . Therefore, each image is represented by a vector of dimension d, with d being the dimension of the embedding space carrying semantically meaningful information about its content. The parameters ϑ are determined by minimizing the loss function given by the distance δ between the representation of the image and the representation of their augmentations: The augmentation of an image may be a rotation, an affine or perspective transformation, etc.  . Trajectories in entropy-complexity plane for the four Reddit communities. All, except r/ AdviceAnimals present an evolution towards higher values of complexity that resembles that of painting arts 32 . Each dot is the average value of entropy and complexity for each year. Visually complex templates could be linked to the tendency of using memes to continuously represent social trends and attitudes, supporting the hypothesis that memes are part of the emerging internet meta-language. www.nature.com/scientificreports/ In the second step, a neural network with parameters η is used to classify an image x i and its nearest neighbors sampled exploiting its corresponding representation φ ϑ (x i ) . As the second task is a classification, the output is a probability distribution over the considered classes for the given image: φ η (x) ∈ [0, 1] C , where C is the number of clusters considered.
The loss function, in this case, is made of two terms where D is the dataset comprising all images, N x is the set of nearest neighbors of image x, C is the set of clusters, and �·� is the dot product. The first term aims to maximize the probability that the image and its nearest neighbors are classified in the same class. The second term avoids the formation of a single cluster containing all the images and forces the spread of the predictions uniformly across the clusters. Eventually, for each processed image, we get a representation vector of size d = 2048 and a set to which it belongs.
The SCAN algorithm provides us with an informative and compact representation for each image in our dataset together with a first, high-level clustering. SCAN divides the corpus into four clusters that group the visual memes into three broad and general categories: animals (two sets), humans, and others. The two clusters with animal images have been merged together. In other words, memes containing humans represent the 50% of the corpus, followed by 25% of animals and 25% of other kind of contents.
To obtain a template-based clustering, we exploited HDBSCAN 37,38 . For each high-level cluster obtained from SCAN, the entire corpus of memes can be represented by a matrix whose rows are the representations φ ϑ (x i ) . To make the problem computationally more tractable, Principal Component Analysis was used to reduce the features' dimension from 2048 to 20. This allowed us to better fit our computational resources and did not cause any reduction in the quality of the clustering. By applying HDBSCAN to such a matrix, we were able to get a label for each image of our corpus and to separate the memes by their template. Notably, HDBSCAN can separate clusters from noisy points. Part of the corpus does not belong to any template, and therefore is marked as noise and grouped in a large "cluster of noise". Despite this suitable property of the algorithm, some clusters may result made up of images whose template is not the same for all. A purity measurement is therefore required to exclude from the analysis too heterogeneous clusters, i.e. clusters below a given purity threshold.
In a completely unsupervised framework, the quality of clustering is in general not easy to evaluate 39 . A quantity that is usually employed as an objective function for clustering is the average-pairwise distance S k , which evaluates the intra-cluster homogeneity 40 , i.e. how much each element of the cluster is, on average, similar to all the others. Its definition is given by In our case, we employed the latter quantity to measure the purity of the clusters identified by HDBSCAN, together with the cluster size. In Fig. 5(a) for each cluster is reported S k and the cluster size. The red dots are the clusters that are not considered for the following analysis. Four of them correspond to the "noisy clusters" retrieved by HDBSCAN. All of them result in outliers with respect to the joint size and S k distribution, whose marginals distributions are reported in panels (b) and (c) respectively. HDBSCAN performances depends upon several parameters. We used mainly default values, setting min_cluster_size and min_samples to 20 and 3, respectively.
Entropy and complexity. Permutation entropy H and statistical complexity C are two quantities that can be used to synthesize general properties of images, based on the value and relative disposition of their pixels. In the following, we give a minimal description of both quantities, and we refer the reader to original articles for more formal details [41][42][43][44][45] . Permutational entropy measures the degree of disorder in the pixel arrangement. High values indicate high pixel randomness, while low values correspond to more regular patterns. Statistical complexity instead measures the amount of "structural" complexity. Non-trivial spatial patterns give rise to positive values, while extremely ordered or disordered patterns correspond to low values.
To compute H and C all colored images were converted to grayscale. Thus, each image consists of twodimensional matrix. Next, for all the 2 × 2 submatrices comprised in the image the relative ordering of the pixel is computed 32 . For a collection of four elements, a number of 4! = 24 possible permutations can be obtained. By counting the relative occurrence of each permutation, a probability mass function can be built. Shannon's entropy is then computed over this probability distribution to obtain the permutation entropy www.nature.com/scientificreports/ Given the probability mass function P, its discrepancy with respect to a uniform distribution U is obtained by computing the Jensen-Shannon divergence Combining this quantity with H(P), the statistical complexity can be computed as with the normalizing factor The evolution of visual patterns can be studied as a trajectory in the above defined entropy-complexity plane 42,43 , following the same approach used for paintings 32 .

Data availability
The list of all the images used in this study is available online 35 . Software used for computations are all properly referenced in the main text.   Each dot corresponds to a cluster, i.e. a template for memes. Red dots represent "noisy clusters" identified by HDBSCAN that are outliers with respect to the cluster size and S k distributions, shown respectively in panels (b) and (c). Noisy clusters are removed from the analysis.