Motivation for DeTect

Many content creators would love to tailor their content to their audience and connect DEEPLY with their followers but due to a significance increase in bots in social media, there are no ways to figure out how authentic their audience genuinely is.

Furthemore, quantitative trading firms scrape platforms like X and Reddit to capture real time market news for their trading strategies. However, coordinated bot networks heavily clutter these feeds making triggering false buy or sell signals. By stripping out automated accounts, these firms can separate artificial noise from genuine human conviction.

What DeTect Does for You

A large follower count tells you how many accounts follow someone. DeTect uses this and other key metadata to determine whether the account is a bot.

Our Chrome extension analyses up to 300 public followers of a Mastodon profile and returns a bot risk score out of 100, a scale and a short explanation of the results. Simply paste a profile link or select the profile you are already viewing, then click Analyse.

For anyone who wants the details, “stats analysis” reveals the goodness of fit statistic, adjusted p value, following imbalance and low activity rate.

The score highlights unusual patterns that deserve a closer look and weights these factors to determine the likelihood of the account being a bot.

How We Built It

Our extension uses HTML, CSS and JavaScript, running on Chrome’s Manifest V3 platform. A horizontal progress indicator follows the backend through reading followers, analysing patterns and writing the explanation.

The backend is written in Python and collects public follower data through the Mastodon API. It examines follower count patterns, following ratios, posting activity, account age and profile completeness.

We added hypothesis testing to compare observed patterns against Benford's distribution and bootstrap resampling to explore how sensitive the results are to the sample. Google Gemini receives the weighted results and turns them into a short, readable explanation so anyone can understand the reasoning behind the score.

Benford Deviation:

$$ N_+ = \sum_{d=1}^{9} n_d,\qquad \widehat{p}_d = \frac{n_d}{N_+},\qquad p_d = \log_{10}\left(1+\frac{1}{d}\right) $$

$$ \mathrm{MAD} = \frac{1}{9}\sum_{d=1}^{9}\left|\widehat{p}_d-p_d\right| $$

$$ B = \min\left(1,\frac{\mathrm{MAD}}{0.06}\right) $$

Following imbalance:

$$ r_i = \frac{g_i+1}{f_i+1} $$

$$ R = \frac{1}{|V_R|}\sum_{i\in V_R}\mathbf{1}[r_i\geq 10] $$

Low Activity:

$$ L = \frac{1}{|V_L|}\sum_{i\in V_L}\mathbf{1}[t_i\leq 3] $$

New accounts:

$$ a_i = \frac{T_{\mathrm{collection}}-T_{\mathrm{created},i}}{86400}\quad\text{(timestamps measured in seconds)} $$

$$ A = \frac{1}{|V_A|}\sum_{i\in V_A}\mathbf{1}[0\leq a_i\leq 30] $$

Incomplete profiles:

$$ c_i = \frac{v_i+b_i+\mathbf{1}[t_i>0]}{3} $$

$$ I = \frac{1}{|V_I|}\sum_{i\in V_I}\mathbf{1}\left[c_i\leq\frac{1}{3}\right] $$

We use SQLite to preserve collection history. When an audience is analysed again, we merge follower records, keep their newest observations and recalculate the statistics. We also built tools for testing simulated audiences and comparing shared followers across profiles.

Challenges We Ran Into

One of our biggest challenge was not being able to web scrape Instagram or X accounts, especially private accounts, due to GDPR law restrictions emphasised from these social media platforms. Therefore, we used an alternative social media platform called Mastadon that has 200k+ users and provides an easy API to scrape the relevant meta data for each public account.

Another challenge was interpreting incomplete data fairly. Mastodon servers can hide follower lists, return missing fields or become unreachable. We needed to distinguish missing information from a genuine zero and avoid producing confident scores from insufficient data.

Connecting Gemini introduced timeouts and temporary model failures. We improved the error handling, tested an alternative model and made explanation retries reuse the saved statistics instead of collecting the audience again.

What We’re Proud Of

We built a working flow from a profile link to collected data, statistical analysis and a readable explanation, all inside a Chrome extension.

We’re particularly proud of keeping the calculations traceable. Users can see the headline result, inspect key statistics and retain the full reports locally.

What’s Next for DeTect

We would like to increase the follower sample size from 300 to upwards of 10k as it makes it more representative and eliminates anomalies. furthermore, it would make the data follow Benford's Law more closely.

We would also like to explore support for other social media platforms through their available APIs and make our extension compatible with other web browsers and not just for Chrome.

For wider use, our next steps would include simplifying backend setup and preparing the extension for distribution through the Chrome Web Store.

made by the 4 idiots (Namish, Anuj, Rayan, Shivam)

Share this project:

Updates

Submission history