We have developed a system of models designed to generate Tweets optimized to spread quickly on a particular user’s Twitter network. This system’s use is accessible for any public Twitter user, though it was developed with two possible end uses in mind: the first being corporate accounts who aim to reach a wide audience with relatable and amusing content, the second is an extremely active Twitter user who wants help in crafting new content.

The users will interact with the model through a web interface. They first input their Twitter handle while registering for the site. After registration, the model will crawl their Twitter network and history. The user can then input a prompt for the text generation model to generate Tweets that are optimized to spread over their subnetwork.

This system incorporates a few different models: GPT-2 for language generation and graph embedding methods to optimize user content propagation for their subnetwork. Twitter is the system’s graph network, where nodes denote an individual Twitter user and directed edges denote their relationship with other users and the user’s subnetwork consists of users within a distance of 2 edges from the user’s root node. Using a fine-tuned GPT-2 model as a shared representation, trained through a Federated Learning approach, we train a client-specific layer for each user to emulate their writing style. Using these final layers as a basis for graph embeddings, we perform several updates of these embeddings over the graph network so that a user’s client-specific layer will contain features for their surrounding subnetwork. While natural language processing models are well understood and used, the novelty of this design comes from combining the embedding with the graph network. Finally, using the shared feature representation (fine-tuned GPT-2) and the final layer, we generate Tweets for a particular client.

Link to final video: https://www.youtube.com/watch?v=yob8Zm8afYY&feature=youtu.be

Built With

Share this project: