Web Archives for Verifying Attribution in Twitter Screenshots
Presented By:
Tarannum Zaki, PhD Student
Advisors: Dr. Michael L. Nelson & Dr. Michele C. Weigle
Department of Computer Science
Old Dominion University, Norfolk, Virginia
April 26, 2024
2024 Web Science and Digital Libraries Research Group Expo
Screenshots are commonly used to annotate the social media of others
2
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Why screenshots?
To use as an evidence for deleted posts
Controversial posts may be deleted.
Other reasons: To deny cross-platform engagement, to aggregate, to mark-up etc.
3
https://twitter.com/DanielDefense/status/1526237750277681154
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Did they really post that?
Screenshots can also be used for humor, satire, and disinformation
4
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Creating fake tweets using Tweetgen
5
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Using the live web and web archives to validate attribution of screenshots
6
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Motivation
7
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Aim
To develop a tool that would automatically provide a probability whether screenshot of a social media post was actually posted by the alleged author using the services of live web and web archives.
8
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
To search for a tweet in the Wayback Machine, you must first know its URL
9
https://web.archive.org/web/20220323185843/https://twitter.com/annaturley/status/1506706947239817224
URL of the tweet: https://twitter.com/annaturley/status/1506706947239817224
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
But, URL of a tweet is not present in most screenshots
Construction of a tweet URL
- Use the Twitter handle and approximate a time window based on the timestamp.
- Construct URL for the tweet.
- Search for the tweet in the Wayback Machine using the URL.
10
@annaturley
March 23, 2022
March 25, 2022
https://web.archive.org/web/20220323185843/https://twitter.com/annaturley/status/1506706947239817224
Tweet ID encodes the timestamp of when the tweet was created
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Verifying if screenshot exists in the Wayback Machine
11
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Creating a dataset of screenshots collected from Twitter
12
Fields | |
Shared post’s URL | Original post’s URL |
Category | Reason |
Content category | Structural features |
Post type | Social media |
Search strategy | Annotated images |
Screenshot | Remarks |
Category: Real
Reason: Found in the live web
Content category: Politics
Post Type: Tweet
Structural features: Single author, single post
Search strategy: Searched on Twitter interface
Social media: Twitter
Original post’s URL
Shared post’s URL
Screenshot
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
OCRing screenshots: Single tweet images
Optical Character Recognition extracts information as text from digital image.
Example screenshot image
OCR extracted output
13
OCR
Twitter Handle
Timestamp
Tweet Text
Zaki, T., Nelson, M.L., and Weigle, M.C. (2023, Jun 14). Extracting Information from Twitter Screenshots. Tech Report arXiv:2306.08236. https://doi.org/10.48550/arXiv.2306.08236
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Computing a time window based on the screenshot timestamp
The maximum difference between two time zones on Earth is 26 hours.
Example screenshot image
OCR extracted output
Twitter handle and computed timestamps
14
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Using CDX API to retrieve archived tweets with left hand boundary
CDX API prefix search process
Twitter handle and computed timestamps
Output: Retrieved archived tweets with the left hand boundary(cropped).
15
request = "http://web.archive.org/cdx/search/cdx?url=" + urir + params
urir = "https://twitter.com/"+randyhillier+"/status"
params = "&matchType=prefix&from="+20220218154100
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Extracting tweet IDs and determining tweet creation timestamp using TweetedAt
An archived tweet’s URL
Mapping between all the tweet IDs and tweet creation timestamps
16
https://web.archive.org/web/20220222163926/https://twitter.com/randyhillier/status/1006984708109099008
Each tweet ID encodes its creation timestamp
Tweet ID | Tweet Creation Date |
1006984708109099008 | 20180613194037 |
………… | ………….. |
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Determining the final set of archived tweets by filtering the tweet creation timestamps within the time window
Output: 917 archived tweets with left hand boundary (cropped)
Mapping between tweet ID and tweet creation timestamp
Output: 29 archived tweets within 52 hours time window (cropped)
17
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Creation timestamp of tweets which does not fall within the 52 hours time window are filtered out.
449 archived tweets
Multiple mementos are filtered out.
29 archived tweets
Extracting tweet text from archived tweets using BeautifulSoup and Selenium
An archived tweet’s URL
Extracted text from archived tweet
HTML tag containing the tweet text
Selenium automates web scraping and BeautifulSoup parses text from HTML.
18
TweetTextSize TweetTextSize--jumbo js-tweet-text tweet-text
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Computing text similarity score between tweet text from screenshot and archived tweets using Python’s difflib library
Example screenshot image
Extracted text from archived tweet
Extracted tweet text from screenshot
Text similarity score is computed based on longest common subsequence
A match score of 81.40% helps us to prove the existence of the screenshot tweet posted by the alleged author.
19
match_score(Archived_Tweet_Text, Screenshot_Tweet_Text)= 81.40%
Archived_Tweet_Text1 | Screenshot_Tweet_Text | match _score = 81.40% |
Archived_Tweet_Text2 | Screenshot_Tweet_Text | match_score = 30.78% |
Archived_Tweet_Text3 | Screenshot_Tweet_Text | match_score = 5.67% |
…………….. | | |
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
A threshold of 60% produced the highest F1 (0.69)
Experimented on 108 single tweet images from the collected dataset.
20
Threshold Value | Precision | Recall | F1 Score |
90% | 1.00 | 0.42 | 0.59 |
80% | 1.00 | 0.49 | 0.66 |
70% | 1.00 | 0.51 | 0.67 |
60% | 1.00 | 0.53 | 0.69 |
Performance of the overlap between the tweet text from the screenshot and the archived tweets.
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
Limitations & Future Work
Complex screenshot images
Extracted output mostly results in garbage value.
21
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL
OCR
Summary
22
Tarannum Zaki WSDL Research Group Expo 2024 Web Archives for Verifying Attribution in Twitter Screenshots @tarannum_zaki @WebSciDL