<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[TechTweet]]></title><description><![CDATA[TechTweet]]></description><link>https://techtweet.hashnode.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 20 Sep 2026 10:39:02 GMT</lastBuildDate><atom:link href="https://techtweet.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[🚀 My First NLP Project: Topic Modeling 63,000+ Research Papers with BERTopic + GPT-4o-mini]]></title><description><![CDATA[Hey there! 👋 I'm super excited to share my first blog post and even more excited that it's about my very first NLP project. I dove deep into topic modeling using BERTopic , and ended up analyzing over 63,000 research papers from arXiv (yes, sixty-th...]]></description><link>https://techtweet.hashnode.dev/my-first-nlp-project-topic-modeling-63000-research-papers-with-bertopic-gpt-4o-mini</link><guid isPermaLink="true">https://techtweet.hashnode.dev/my-first-nlp-project-topic-modeling-63000-research-papers-with-bertopic-gpt-4o-mini</guid><category><![CDATA[BERTopic]]></category><category><![CDATA[topic modeling]]></category><category><![CDATA[arxiv]]></category><category><![CDATA[nlp]]></category><dc:creator><![CDATA[Khushi Dubey]]></dc:creator><pubDate>Sat, 03 May 2025 19:18:40 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1746299323807/c02a627e-ff80-4cd5-8fe8-e85db09970fb.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Hey there! 👋 I'm super excited to share my first blog post and even more excited that it's about my <strong>very first NLP project</strong>. I dove deep into topic modeling using <strong>BERTopic</strong> , and ended up analyzing over <strong>63,000 research papers</strong> from arXiv (yes, sixty-three <em>thousand</em>!!).</p>
<p>This blog post is a walk-through of what I built, why I built it, and what cool insights I found along the way. Let’s dive in!</p>
<hr />
<h2 id="heading-what-i-worked-on">🔍 What I Worked On</h2>
<p>I applied <strong>BERTopic</strong> on the <code>neuralwork/arxiver</code> dataset of over <strong>63,000 research papers</strong> to discover and label meaningful topics using embeddings and clustering.</p>
<p>Here’s what I did:</p>
<ul>
<li><p>✅ Preprocessed the abstracts</p>
</li>
<li><p>✅ Ran <strong>BERTopic</strong> on them</p>
</li>
<li><p>✅ Used <strong>GPT-4o-mini</strong> to assign <strong>descriptive topic names</strong></p>
</li>
<li><p>✅ Saved outputs (topics, names, visualizations) to avoid recomputation</p>
</li>
<li><p>✅ Analyzed trends like top topics and paper counts over time</p>
</li>
</ul>
<p>I learned a lot about how BERTopic clusters papers based on semantic meaning and how GPT-generated names can make topics more intuitive.</p>
<hr />
<h2 id="heading-dataset-at-a-glance">🗂 Dataset at a Glance</h2>
<ul>
<li><p><strong>📦 Dataset</strong>: <code>neuralwork/arxiver</code></p>
</li>
<li><p><strong>📄 Fields</strong>: Title, Abstract, Authors, Date, Markdown, Link</p>
</li>
<li><p><strong>📊 Size</strong>: 63,357 papers from <strong>Sept 2022 to Oct 2023</strong></p>
</li>
</ul>
<hr />
<h2 id="heading-project-workflow-modular-amp-reusable">🧠 Project Workflow (Modular &amp; Reusable!)</h2>
<p>To keep things clean, fast, and reusable, I split the project into 3 neat parts:</p>
<h3 id="heading-part-1-topic-modeling-pipeline-caching">Part 1: Topic Modeling Pipeline + Caching</h3>
<ul>
<li><p>Loaded the <a target="_blank" href="https://huggingface.co/datasets/neuralwork/arxiver">neuralwork/arxiver</a> dataset</p>
</li>
<li><p>Preprocessed the abstracts</p>
</li>
<li><p>Ran BERTopic to generate topics</p>
</li>
<li><p>Used GPT-4o-mini to give each topic a <strong>meaningful name</strong></p>
</li>
<li><p>Saved everything to a CSV (so I don’t have to rerun the heavy stuff)</p>
</li>
</ul>
<blockquote>
<p>📌 This step is compute-heavy but only needs to be done once — super helpful if you want to experiment later.</p>
</blockquote>
<hr />
<h3 id="heading-part-2-building-the-final-dataset">Part 2: Building the Final Dataset</h3>
<ul>
<li><p>Fetched full paper metadata (title, authors, date, etc.)</p>
</li>
<li><p>Merged it with the topic modeling results</p>
</li>
<li><p>The final dataset includes:<br />  <code>id | title | abstract | authors | published_date | link | markdown | topic | Topic Name</code></p>
</li>
</ul>
<hr />
<h3 id="heading-part-3-visualizations-topic-insights">Part 3: Visualizations + Topic Insights</h3>
<p>I then explored the data with fun, interactive, informative visualizations!</p>
<h3 id="heading-key-highlights">📊 Key Highlights:</h3>
<ol>
<li><p><strong>🔝 Top 10 Topics by Paper Count</strong></p>
<ul>
<li><p>Most frequent: <em>Astrophysics of Neutrinos and Black Holes</em> (9561 papers!)</p>
</li>
<li><p>Least frequent: <em>Renewable Energy and Grid Management</em> (509 papers)</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746297709756/7fdfbf2f-e755-466f-9df6-05449967792f.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
</li>
<li><p><strong>📅 Papers Published Per Month</strong></p>
<ul>
<li><p>Peak: May 2023 (4701 papers)</p>
</li>
<li><p>Low: Sept 2022 (1 paper)</p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746297733452/23959281-59ff-43cb-9063-c29b51f3ecfc.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
</li>
<li><p><strong>📈 Monthly Trends for Top 5 Topics</strong></p>
</li>
</ol>
<p>Tracked trends for topics like <em>Quantum Phase Transitions</em>, <em>Medical Imaging</em>, and more!</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746297757930/49bf9655-7a04-4f5f-a3a2-c9e7cef699f3.png" alt class="image--center mx-auto" /></p>
<hr />
<h2 id="heading-model-settings">🛠️ Model Settings</h2>
<p>Here’s what I used under the hood:</p>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Component</td><td>Config</td></tr>
</thead>
<tbody>
<tr>
<td>Embedding</td><td><code>all-MiniLM-L6-v2</code></td></tr>
<tr>
<td>UMAP</td><td><code>n_neighbors=10</code>, <code>min_dist=0.1</code></td></tr>
<tr>
<td>HDBSCAN</td><td><code>min_cluster_size=60</code>, <code>min_samples=15</code></td></tr>
<tr>
<td>Topic Naming</td><td>GPT-4o-mini (summarized top words into readable names)</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-visual-goodies">📊 Visual Goodies</h2>
<p>You can also explore the BERTopic visualizations in the Colab notebook.</p>
<ul>
<li><p><strong>Bar Chart</strong></p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746299787638/f01a1a65-3cba-45b2-9d10-a3fa4e4cfa5e.png" alt class="image--center mx-auto" /></p>
</li>
<li><p><strong>Heatmap</strong></p>
<p>  <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746299467674/33a2fc1d-c37f-4120-98e6-27d9f7669bc1.png" alt class="image--center mx-auto" /></p>
</li>
</ul>
<p><strong>Intertopic Distance Map</strong></p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1746299508536/482b0cb0-fab6-4dcb-bbe9-050fff1344a1.png" alt class="image--center mx-auto" /></p>
<hr />
<h2 id="heading-sample-topic-analysis">🧪 Sample Topic Analysis</h2>
<div class="hn-table">
<table>
<thead>
<tr>
<td>Topic Name</td><td>Peak Month</td><td>Trough Month</td><td>Total Papers</td></tr>
</thead>
<tbody>
<tr>
<td>Astrophysics of Neutrinos and Black Holes</td><td>Jul 2023</td><td>Oct 2022</td><td>9561</td></tr>
<tr>
<td>Audio Recognition and Analysis</td><td>May 2023</td><td>Dec 2022</td><td>1166</td></tr>
<tr>
<td>Deep Neural Network Optimization</td><td>Oct 2023</td><td>Dec 2022</td><td>787</td></tr>
<tr>
<td>Medical Imaging &amp; Diagnosis</td><td>Mar 2023</td><td>Dec 2022</td><td>1412</td></tr>
<tr>
<td>Quantum Phase Transitions</td><td>Mar 2023</td><td>Nov 2022</td><td>7659</td></tr>
</tbody>
</table>
</div><hr />
<h2 id="heading-why-i-loved-this-project">💡 Why I Loved This Project</h2>
<ul>
<li><p><strong>Fast Iteration</strong>: Thanks to caching, I could explore ideas quickly</p>
</li>
<li><p><strong>Readable Results</strong>: GPT-4o made topics actually understandable</p>
</li>
<li><p><strong>Emerging Trends</strong>: I saw how research areas evolve month-by-month</p>
</li>
<li><p><strong>Easily Extendable</strong>: You can plug in more data, tweak models, or explore new fields 🔧</p>
</li>
</ul>
<hr />
<h2 id="heading-want-to-try-it-out">📁 Want to Try It Out?</h2>
<p>Check out the full Colab notebook and GitHub repo here:<br />👉 <a target="_blank" href="https://github.com/khushidubeyokok/TopicModelling/tree/main">GitHub Repo</a><br />👉 <a target="_blank" href="https://colab.research.google.com/drive/1hOlGcNZ1Yh_CDQyM6Zmg-dbM_p4njGRN?usp=sharing">Colab Notebook</a></p>
<hr />
<p>Thanks for reading! I’m just starting out in NLP and AI, and this project taught me so much about pipelines, embeddings, visualizations, and model efficiency. Hope it inspired you to explore BERTopic too! 😊</p>
<p>If you have feedback or ideas to improve it — I’d love to hear from you!</p>
]]></content:encoded></item></channel></rss>