BERT News Intelligence v1 β€” Fine-Tuned Transformer for News Classification

This project is developed as part of applied NLP research in transformer-based language models, focusing on fine-tuning pretrained architectures for real-world text intelligence systems.

The work demonstrates expertise in:

  • Natural Language Processing (NLP)
  • Transformer Architectures (BERT-based models)
  • Deep Learning Fine-Tuning Strategies
  • Model Evaluation & Benchmarking
  • Production-Ready ML Pipelines (Hugging Face Ecosystem)

This is not just a classification model β€” it is a research-driven transformer adaptation system for domain-specific intelligence extraction.


Model Overview

A fine-tuned BERT (bert-base-uncased) model for automatic news topic classification.

It categorizes news into:

  • World
  • Sports
  • Business
  • Science & Technology

Problem Statement

Traditional rule-based or manual news categorization systems:

  • Do not scale
  • Lack semantic understanding
  • Fail on ambiguous text

This system solves the problem using context-aware transformer representations, enabling semantic-level classification.


Architecture (Transformer Pipeline)

Input Text
↓
WordPiece Tokenizer
↓
Token IDs + Attention Mask
↓
12-Layer BERT Encoder
↓
CLS Token Representation
↓
Dense Classification Head
↓
Softmax Layer
↓
Predicted Class


Dataset

AG News Benchmark Dataset:

  • 120,000 training samples
  • 7,600 test samples
  • 4 balanced classes

Training Configuration

  • Model: bert-base-uncased
  • Task: Sequence Classification
  • Epochs: 3
  • Batch Size: 16
  • Learning Rate: 2e-5
  • Max Length: 128
  • Optimizer: AdamW
  • Precision: FP16 (GPU Accelerated)
  • Loss: CrossEntropyLoss

Performance

  • Accuracy: 94.8%
  • F1 Score: 94.8%
  • Eval Loss: 0.19

Class-wise Performance:

Class F1 Score
World 0.96
Sports 0.99
Business 0.92
Sci/Tech 0.93

Key Research Insights

  • Transformer fine-tuning significantly improves domain adaptation
  • Sports category shows highest separability due to lexical structure
  • Sci/Tech and Business exhibit semantic overlap
  • Contextual embeddings outperform traditional NLP approaches

Deployment Pipeline

This project is production-ready and includes:

  • Hugging Face Model Hub Deployment
  • Gradio-based Interactive Web UI (Spaces)
  • Local + API-based inference support

Example Inference

Input:

"NASA launches new Mars exploration satellite"

Output:

Sci/Tech (0.99 confidence)


Project Structure

BERT/news-topic-classifier-bert/

β”œβ”€β”€ app/
β”œβ”€β”€ models/
β”œβ”€β”€ outputs/
β”œβ”€β”€ src/
β”œβ”€β”€ notebooks/
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md


Future Research Directions

  • Multi-label classification using transformers
  • Real-time news streaming pipelines
  • Explainable AI (attention visualization)
  • Distilled lightweight transformer models
  • Agent-based news intelligence systems

Author Identity

Mudassir-08

Role:

  • NLP & Transformer Engineer
  • Applied AI Researcher
  • Deep Learning Practitioner and Researcher
  • GenAi and AgenticAi

Focus:

Building production-ready transformer systems for real-world language intelligence applications.

Hugging Face: https://huggingface.co/Mudassir-08


License

For educational and research purposes.

Downloads last month
45
Safetensors
Model size
0.1B params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Dataset used to train Mudassir-08/bert-news-intelligence-v1-release

Space using Mudassir-08/bert-news-intelligence-v1-release 1

Evaluation results