NewsAI: Personalized News Summarization & Recommendations
NewsAI: Personalized News Summarization & Recommendations
Abstract. The exponential growth of online news content presents significant challenges for users seek-
ing relevant information efficiently. This paper introduces "NewsAI," an integrated system designed to
enhance news consumption through personalized summarization and recommendation. Leveraging the
Microsoft News Dataset (MIND), NewsAI employs a two-pronged approach. The summarization module
utilizes the T5-small model to generate concise, abstractive summaries of news articles, evaluated using
ROUGE metrics. The recommendation engine employs Sentence-BERT (’all-MiniLM-L6-v2’) to create
semantic embeddings for news articles and user profiles, which are derived from historical click interac-
tions. FAISS is integrated for efficient similarity-based retrieval of personalized news recommendations,
with performance assessed via Precision@k, Recall@k, and nDCG@k. A user-friendly web application,
built with Flask and containerized using Docker, demonstrates the system’s capabilities. This project
provides a comprehensive implementation, comparative analysis, and discussion of the techniques in-
volved, highlighting their effectiveness and inherent challenges in the dynamic news domain, aiming to
provide a robust prototype for intelligent news delivery.
1 Introduction
In the contemporary digital landscape, the sheer volume of news information generated daily is staggering,
leading to information overload for many users [11]. Sifting through vast quantities of articles to find relevant
and digestible content has become a significant challenge. Personalized news curation systems have emerged
as a vital solution, aiming to filter and present news tailored to individual user interests and preferences [12].
Such systems often rely on two core functionalities: news recommendation, which identifies articles a user
is likely to find engaging, and news summarization, which provides condensed versions of articles for quick
consumption. While these functionalities are often developed and deployed as separate components, their
integration offers the potential for a more synergistic and user-centric news experience.
This research project, "NewsAI," undertakes the development of an integrated platform that seamlessly
combines personalized news recommendation with automatic abstractive summarization. Our primary contri-
bution is the design, implementation, and comprehensive evaluation of a system built upon modern generative
AI techniques, utilizing the large-scale Microsoft News Dataset (MIND) [13] as our primary data source. The
MIND dataset, with its rich user interaction logs and diverse news articles, provides a realistic testbed for
developing and assessing such personalized systems.
The NewsAI system is architected around two distinct yet complementary generative AI modules:
2. Semantic News Recommendation Module: This module aims to recommend articles that are se-
mantically relevant to a user’s interests. User interests are profiled based on their historical click behavior.
We employ Sentence-BERT (all-MiniLM-L6-v2) [15], a modification of the BERT architecture optimized
for producing semantically meaningful sentence and paragraph embeddings. These embeddings represent
both news articles (derived from titles and abstracts) and user profiles. For efficient retrieval of simi-
lar articles from a large corpus, FAISS (Facebook AI Similarity Search) [16] is integrated, enabling fast
nearest neighbor searches in the embedding space. An initial ablation considered TF-IDF for article rep-
resentation and direct cosine similarity for retrieval, but this was superseded by the more semantically
robust BERT and efficient FAISS combination.
A significant aspect of this project is the creation of a practical demonstration tool. A web application built
with Flask provides an interactive interface, allowing users to experience both the news summarizer and
the personalized recommender. The application is also containerized using Docker, facilitating portability
and deployment. Through this project, we conduct a comparative analysis of the chosen generative models,
discuss their implementation intricacies, evaluate their performance using standard metrics, and highlight
the challenges encountered, particularly in the context of the dynamic and ever-evolving news domain. This
work serves as a functional prototype and a case study for leveraging generative AI in building intelligent
news delivery platforms.
The structure of this paper is as follows: Section 2 delves into a review of existing research in the fields
of news summarization and personalized news recommendation, contextualizing our work within the current
state-of-the-art. Section 3 provides a detailed exposition of the dataset used, the comprehensive data prepro-
cessing steps undertaken, the architectural designs of both the summarization and recommendation models,
and an overview of the user interface development. Section 4 outlines the experimental setup, defines the eval-
uation metrics, and presents a thorough analysis of the quantitative and qualitative results obtained from
our system. Section 5 (renamed for clarity) specifically details the user interface. Section 6 offers a critical
discussion of our findings, elaborates on the limitations identified during the project, and proposes potential
directions for future research and system enhancements. Finally, Section 7 summarizes the key contributions
and overall conclusions drawn from this research.
2 Related Work
This section provides a detailed review of significant research contributions in the domains of personalized
news recommendation and automatic news summarization. We analyze approximately 15 key papers, focusing
on their methodologies, datasets, evaluation metrics, findings, and relevance to the NewsAI project, while also
identifying potential gaps that our work aims to address or acknowledge. The selection includes foundational
work and recent advancements, particularly those leveraging deep learning and transformer-based models.
Deep Learning and Contextual User Profiles Paper 1: CupMar: A Deep Learning Model for
Personalized News Recommendation Based on Contextual User-Profile and Multi-Aspect Ar-
ticle Representation (2022) [1]
– Summary: This paper introduces CupMar, a deep learning framework that integrates contextual user
profiles with multi-aspect representations of news articles. The model extracts various features, including
article titles, content, category, and knowledge entities, to create rich news representations and combines
them with user browsing history for personalized recommendations.
– Methodology: The approach employs a dual-encoder architecture: a News Encoder to capture detailed
aspects of each article and a User-Profile Encoder that models both long-term and recent user interests.
These encoders feed into a recommendation engine that ranks candidate news items based on predicted
relevance.
NewsAI: Summarization and Recommendation 3
– Major Findings: Experimental results on the Microsoft News Dataset (MIND) show that CupMar
outperforms several baseline models, achieving significant improvements in recommendation accuracy
and click-through rates.
– Dataset(s) Used: Microsoft News Dataset (MIND).
– Evaluation Metrics: Precision, Recall, Click-Through Rate (CTR).
– Relevance to NewsAI: This paper provides a robust framework for integrating user context with
article features, directly aligning with NewsAI’s goal of generating personalized recommendations. The
multi-aspect article representation is particularly relevant.
– Identified Gaps: The model could benefit from enhanced explainability. Furthermore, dynamic adap-
tation to rapidly changing news topics, crucial for real-time applications, is an area for improvement.
Paper 8: NPA: Neural News Recommendation with Personalized Attention (2019) [8]
– Summary: This paper introduces the Neural News Recommendation with Personalized Attention (NPA)
model, designed to enhance news recommendation by capturing individual user interests through a per-
sonalized attention mechanism over words and news articles.
– Methodology: NPA consists of a news representation model (CNN on titles) and a user representation
model (based on clicked articles). Personalized attention mechanisms at both word and news levels, guided
by user embeddings, reflect individual preferences.
– Major Findings: The personalized attention mechanism effectively captures diverse user interests, lead-
ing to more accurate news recommendations. NPA outperforms baseline models on a real-world dataset
from MSN News.
– Dataset(s) Used: MSN News dataset.
– Evaluation Metrics: Accuracy, Click-Through Rates (CTR).
– Relevance to NewsAI: This work is pertinent as it addresses personalized news recommendation. The
insights into personalized attention mechanisms are valuable for tailoring content.
– Identified Gaps: The study focuses on news titles for representation, potentially overlooking rich infor-
mation in full article content. Reliance on user interaction data may pose cold-start challenges. Evaluation
is on a single dataset.
– Methodology: The paper conducts a comparative analysis of existing recommendation models, empha-
sizing the importance of real-time user feedback and advanced natural language processing techniques.
It discusses both technical and operational challenges.
– Major Findings: It identifies that incorporating real-time feedback and leveraging pre-trained language
models can significantly enhance recommendation performance.
– Dataset(s) Used: The experiments utilize the Microsoft News Dataset (MIND) and other proprietary
news datasets.
– Evaluation Metrics: Metrics include accuracy, F1-score, click-through rate (CTR), and user satisfaction
scores.
– Relevance to NewsAI: This work is pertinent as it outlines challenges and proposes solutions directly
applicable to developing AI agents for personalized news delivery.
– Identified Gaps: The study highlights the need for better integration of multimodal data and improved
scalability, which are areas NewsAI aims to consider.
– Summary: This comprehensive survey reviews news recommender systems that incorporate external
knowledge sources like knowledge graphs (KGs) and ontologies. It highlights how such knowledge helps
address unique challenges in the news domain (e.g., high item churn, semantic ambiguity). The paper
proposes a novel taxonomy for these systems.
– Methodology: As a survey, the methodology involved a systematic literature review. The authors defined
specific search queries, searched academic databases, applied inclusion/exclusion criteria, and performed
de-duplication and filtering. Based on selected papers, they developed a taxonomy.
– Major Findings: A new taxonomy for knowledge-aware news recommenders is proposed. Injecting
external knowledge demonstrably helps mitigate data sparsity, cold-start, ambiguity, and enhances se-
mantic understanding. There’s a clear trend towards neural network-based approaches, particularly those
leveraging KGEs and GNNs. Significant inconsistencies exist in evaluation methodologies.
– Dataset(s) Used: Covers papers using various datasets like BBC, CNN, MIND, Reuters, Bing News,
Adressa, Sogou News, Weibo.
– Evaluation Metrics: Common IR metrics (Accuracy, P@K, R@K, F1@K, AUC, NDCG@K, MRR,
HR@K). Lack of a unified set of metrics is noted.
– Relevance to NewsAI: Highly relevant for understanding advanced recommendation techniques. Maps
existing techniques and identifies state-of-the-art trends.
– Identified Gaps: Lack of standardized benchmarks. Insufficient research on explainability and fairness.
Limited exploration of multilingual/multimodal news recommendation leveraging KGs. Trade-off between
scalability and knowledge completeness needs more investigation.
– Summary: Introduces LLM-TRSR, a framework designed to leverage LLMs for sequential recommenda-
tion tasks where items (like news articles) contain rich textual information. It addresses challenges LLMs
face with long input sequences (e.g., user history) by using an LLM-based summarizer to condense user
history before feeding it to an LLM-based recommender.
– Methodology: The LLM-TRSR framework first segments the user’s historical interaction sequence. It
then employs a frozen LLM summarizer (hierarchical or recurrent, inspired by CNNs/RNNs) to generate
a concise summary of user preferences. This summary, along with recent interactions and candidate item
info, is formatted into a prompt for a separate LLM recommender, fine-tuned using SFT with LoRA.
– Major Findings: Both hierarchical and recurrent variants of LLM-TRSR significantly outperform tradi-
tional sequential baselines (NCF, DIN, SASRec) and another LLM-based method (TALLRec) on text-rich
datasets. This validates the effectiveness of LLM-based summarization for handling long user histories
and improving recommendation.
– Dataset(s) Used: Amazon-M2 (product recommendation) and Microsoft News Dataset (MIND).
– Evaluation Metrics: Recall@K and Mean Reciprocal Rank (MRR)@K (with K=3, 5, 10).
NewsAI: Summarization and Recommendation 5
– Relevance to NewsAI: Highly relevant as it directly tackles sequential news recommendation (using
MIND) with LLMs. The core contribution – using an LLM to summarize user history for better preference
modeling – aligns with our project’s theme of integrating summarization and recommendation, though
our project focuses on summarizing news content itself for the user. The use of SFT and LoRA for
fine-tuning LLMs provides practical insights.
– Identified Gaps: The paper focuses on summarizing user interaction history, not on generating sum-
maries of news articles for the user. The system is a pipeline of two LLMs (summarizer and recommender)
rather than a single integrated agent. The explainability of the final recommendation based on the gen-
erated summary could be further explored.
Paper 9: Exploring the Impact of Large Language Models on Recommender Systems: An
Extensive Review (2024) [9]
– Summary: This extensive review examines the transformative role of Large Language Models (LLMs) in
reshaping recommender systems. The paper discusses how LLMs’ unique reasoning abilities and language
comprehension skills offer a paradigm shift from traditional recommendation approaches.
– Methodology: The authors conduct a comprehensive literature review, analyzing recent advancements
in integrating LLMs into recommender systems. They explore various aspects, including contextual un-
derstanding, cross-domain adaptability, unified modeling approaches, and the ability to learn from shared
data reservoirs.
– Major Findings: LLMs exhibit exceptional proficiency in understanding language nuances, enabling
more accurate and context-aware recommendations. The integration of LLMs facilitates seamless tran-
sitions across diverse domains, enhancing the versatility of recommender systems. However, challenges
include prompt sensitivity and potential for misinterpretations.
– Dataset(s) Used: As a review paper, specific datasets are not utilized for new experiments; instead, it
synthesizes findings from multiple prior works involving various datasets.
– Evaluation Metrics: The paper does not employ empirical evaluation metrics but discusses the perfor-
mance and challenges of LLM-based recommenders as reported in the reviewed literature.
– Relevance to NewsAI: This review is highly relevant as it provides a broad perspective on the integra-
tion of LLMs into recommender systems, offering insights into the benefits and challenges of leveraging
such models for personalized news summarization and recommendation.
– Identified Gaps: The paper primarily offers a theoretical discussion without new empirical validation or
case studies demonstrating the practical implementation of LLMs in recommender systems. While chal-
lenges are acknowledged, the review lacks in-depth analysis or proposed solutions for issues like prompt
sensitivity. The rapid evolution of LLMs suggests continuous updates to such reviews are necessary.
Paper 10: Intelligent Personalized Content Recommendations Based on Neural Networks
(2023) [10]
– Summary: This paper presents an intelligent content recommendation system that integrates self-
attention mechanisms within deep learning frameworks to analyze news attributes, achieving high ac-
curacy in aligning content with users’ evolving preferences.
– Methodology: The proposed system utilizes neural networks with self-attention mechanisms to process
and analyze various news attributes. By capturing intricate patterns in user behavior and content features,
the model aims to provide personalized content recommendations that adapt to users’ changing interests.
– Major Findings: The incorporation of self-attention mechanisms enhances the model’s ability to under-
stand complex relationships between users and content, leading to improved recommendation accuracy.
Experimental results demonstrate the system’s effectiveness in aligning recommended content with users’
evolving preferences over time. The approach addresses limitations found in traditional recommendation
systems by focusing on dynamic adaptation to user interests.
– Dataset(s) Used: The study employs datasets containing user interaction logs and news articles, al-
though specific dataset names are not detailed in the summary.
– Evaluation Metrics: The system’s performance is evaluated using metrics such as precision, recall, and
click-through rates (CTR) to assess recommendation accuracy and user engagement.
– Relevance to NewsAI: This work is relevant as it explores the use of advanced neural network archi-
tectures, specifically self-attention mechanisms, in personalized content recommendation. Understanding
6 T. Akbar et al.
these techniques can inform the development of AI agents capable of delivering tailored news summaries
and recommendations.
– Identified Gaps: The paper lacks detailed information on the specific datasets used, making it chal-
lenging to assess the generalizability of the findings. There is limited discussion on the computational
requirements and scalability of the proposed system, which are critical factors for real-world deployment.
The study does not address potential ethical considerations related to personalized content recommen-
dations, such as user privacy and data security.
This section elaborates on the technical architecture and implementation details of the NewsAI system,
covering data acquisition and preprocessing, the news summarization module, the news recommendation
engine, and the user interface design.
The foundation of the NewsAI system is the Microsoft News Dataset (MIND) [13]. We utilized the "MINDs-
mall" version, which contains click logs from 50,000 users and information for 161,013 news articles. The
dataset is structured into [Link] (containing article metadata like ID, category, subcategory, title, ab-
stract, URL, and entity information) and [Link] (detailing user interactions, including user ID,
timestamp, history of clicked articles, and impressions with click labels). Data was provided in separate
train, development (dev), and test splits.
Initial Data Loading and Cleaning (data_cleaning.ipynb): A dedicated Jupyter Notebook, data_cleaning.ipynb,
was responsible for the initial ingestion and purification of the raw MIND dataset.
1. Consolidation of Splits: The [Link] files from the train, dev, and test directories were loaded using
Pandas and concatenated into a single master articles DataFrame. Duplicate articles, identified by their
unique ’id’ (NewsID), were subsequently dropped to ensure a unique corpus of news items. The column
names were standardized to [’id’, ’category’, ’subcategory’, ’title’, ’abstract’, ’url’, ’entity’, ’misc’], with
’misc’ capturing any additional columns and ’abstract’ being created as an empty string if missing in
some files (as observed in certain splits having fewer columns).
2. Abstract Cleaning: The ’abstract’ column, serving as the primary source text for our summarization
task, often contained HTML remnants and other non-textual noise. The clean_text function was applied
to this column:
– BeautifulSoup was used to parse and remove HTML tags.
– Regular expressions ([Link](r’
s+’, ’ ’, text)) normalized multiple whitespace characters into single spaces.
– Another regular expression ([Link](r’
[
]*
]’, ”, text)) removed content within square brackets, often used for image captions or editorial
notes not pertinent to the article’s core content.
– Leading/trailing whitespaces were removed using strip().
– URLs that might have been mistakenly included in the abstract field were identified by checking if
the string starts with "http" and replaced with an empty string.
The cleaned text was stored in a new ’abstract_clean’ column. After processing, the script reported a
total of 16,893 unique articles.
3. Behavior Log Consolidation and Parsing: Similarly, [Link] files from all splits were con-
catenated. The crucial ’impressions’ column (e.g., "N123-0 N456-1 N789-0") details which articles were
shown to a user and which were clicked (suffix ’-1’ for click, ’-0’ for no click). This string was parsed for
each user interaction log:
– clicked_articles: A list of NewsIDs that the user clicked within that specific impression.
– all_articles: A list of all NewsIDs presented to the user in that impression, regardless of click
status.
The ’history’ column, a space-separated string of previously clicked NewsIDs, was converted into a list
of strings. NaN values in ’history’ were handled by replacing them with an empty string before splitting.
This process yielded 223,772 total behavior logs.
4. Output Files: The processed DataFrames were saved as CSV files for subsequent modules:
– cleaned_articles.csv: Contained unique articles with their metadata and the ’abstract_clean’
column.
– cleaned_behaviors.csv: Contained user interaction logs with parsed ’clicked_articles’, ’all_articles’,
and ’history’ lists.
8 T. Akbar et al.
The console output from this script (an example of which is depicted in Fig. 1) confirms the number of rows
loaded from each file and the total unique articles and behavior logs processed.
Fig. 1: Sample console output from the data_cleaning.ipynb script showing file loading and processing
counts.
The objective of this module is to generate concise and informative abstractive summaries from the cleaned
news article abstracts (’abstract_clean’).
Model Selection: T5-small We selected the T5-small model [14] from the Hugging Face Transformers
library. T5, which stands for "Text-To-Text Transfer Transformer," is an encoder-decoder model that unifies
all NLP tasks into a text-to-text format. For summarization, this is achieved by prefixing the input document
with the task-specific instruction, e.g., "summarize: ". T5-small, with approximately 60 million parameters,
NewsAI: Summarization and Recommendation 9
offers a good trade-off between summarization quality and computational resource requirements, making it
suitable for this project. It is pre-trained on the C4 dataset (Colossal Clean Crawled Corpus) and fine-tuned
on various downstream tasks, including summarization.
The mathematical formulation of the Transformer encoder-decoder architecture, which T5 is based on, in-
volves:
– Input Embeddings and Positional Encoding: Input tokens are converted to vectors, and posi-
tional encodings are added to inject sequence order information. Xemb = Embedding(X)+P ositionalEncoding(X)
T
– Multi-Head Self-Attention (Encoder & Decoder): Attention(Q, K, V ) = sof tmax( QK √
dk
)V
Multi-head attention concatenates outputs from several such attention "heads" operating in parallel
on different projected versions of Q, K, V. M ultiHead(Q, K, V ) = Concat(head1 , ..., headh )W O
where headi = Attention(QWiQ , KWiK , V WiV ).
– Position-wise Feed-Forward Networks (FFN): F F N (x) = max(0, xW1 + b1 )W2 + b2
– Encoder Layers: Each layer applies multi-head self-attention followed by an FFN, with residual
connections and layer normalization.
– Decoder Layers: Each layer applies masked multi-head self-attention (to prevent attending to future
tokens), followed by multi-head cross-attention to the encoder’s output, and finally an FFN. Residual
connections and layer normalization are also used.
– Output Layer: A final linear layer followed by a softmax function produces the probability distri-
bution over the target vocabulary.
The T5 model is trained using a maximum likelihood objective, typically with teacher forcing during training.
The news recommendation module aims to suggest relevant articles to users based on their past interaction
history, leveraging semantic understanding of news content.
1. Data Loading: The cleaned_articles.csv and cleaned_behaviors.csv files were loaded. A dic-
tionary mapping NewsID to its row index in the articles DataFrame (news2idx) was created for quick
lookups.
2. News Embedding Computation (compute_news_embeddings): The ’Title’ and ’Abstract’ of each
article were concatenated. The Sentence-BERT model then encoded these combined texts into 384-
dimensional embeddings. This was done in batches for efficiency.
3. FAISS Index Building (build_faiss_index): The computed news embeddings were L2-normalized
and added to a [Link] object.
NewsAI: Summarization and Recommendation 11
4. User Profile Construction (build_user_profiles): For each unique UserID in the behaviors
data, all clicked news articles (from ’History’ and ’Impressions’) were identified. Their corresponding
BERT embeddings were fetched, and the mean of these embeddings was computed to form the user’s
profile vector.
5. Popularity Baseline (get_popular_news): A simple popularity baseline was created by counting
the total clicks for each news article across all user interactions. Articles were then sorted by click
count in descending order.
6. Recommendation Function (recommend_faiss): This function encapsulates the logic for gener-
ating recommendations for a given user vector, using the FAISS index, and applying the filtering and
cold-start strategies.
7. Saving Recommendations: For the web application, recommendations for all users in the dataset
were pre-computed using this pipeline and saved into bert_faiss_recommendations.csv. This file
contains user_id and a list of recommended_news_ids.
An initial exploration involved using TF-IDF vectors for article and user profile representation, with cosine
similarity for ranking. This served as a simpler baseline. The shift to Sentence-BERT and FAISS was motivated
by the desire for richer semantic representations and more scalable similarity search, forming an implicit
ablation where the more advanced embedding technique was expected to yield better semantic matching.
A web-based user interface was developed using Flask, a lightweight Python web framework, to provide an
interactive platform for users to access the news summarization and recommendation functionalities.
Core Components:
1. Backend ([Link]):
– Routing: Defines URL routes for the homepage (/), summarizer page (/summarize), and rec-
ommender page (/recommend).
– Data Management: At application startup, the load_data() function loads necessary data
from the pre-computed CSV files:
• cleaned_articles.csv: For basic article details like title, category, and original abstract
(used as fallback by summarizer and for display by recommender).
• summarized_articles_t5.csv: For accessing the T5-generated summaries for the summa-
rizer page.
• bert_faiss_recommendations.csv: For retrieving the pre-computed list of recommended
article IDs for each user for the recommender page.
This data is stored in dictionaries for quick lookups during request handling.
– Request Handling:
• Summarizer: The summarize() view function handles both GET (for direct linking with
an article ID in URL) and POST (from form submission) requests. It retrieves the article ID,
looks up the article details and its T5 summary from the loaded data, and passes this infor-
mation to the [Link] template. Error messages are handled for invalid or missing
article IDs.
• Recommender: The recommend() view function handles POST requests. It takes a UserID,
retrieves the list of recommended article IDs from the pre-computed data, fetches details
(title, category) for each recommended article from the loaded cleaned_articles.csv data,
and passes this list to the [Link] template. Error handling is included for unknown
UserIDs or users with no recommendations.
2. Frontend (HTML Templates and CSS):
– Templates: Jinja2 templating engine (integrated with Flask) is used.
• [Link]: Provides the basic HTML structure, including a fixed navigation bar and inclusion
of Bootstrap CSS and JS.
• [Link]: The landing page, welcoming the user and describing the project.
• [Link]: Contains a form for Article ID input and a section to display the article’s
title, original abstract, and generated summary.
12 T. Akbar et al.
• [Link]: Contains a form for User ID input and a section to display the list of
recommended articles (title and category).
– Styling (static/css/glass_style.css): Custom CSS is used to achieve a "glassmorphism"
effect for UI panels, along with a dark theme and responsive design elements facilitated by Boot-
strap 5.
3. Dockerization: A Dockerfile was created to containerize the Flask application, ensuring a consis-
tent and reproducible deployment environment.
– Base Image: python:3.10-slim.
– Setup: Sets the working directory, copies all project files into the container.
– Dependencies: Installs Python packages listed in front_end/[Link] (assuming
Flask and Pandas are listed there).
– Port Exposure: Exposes port 5000, which the Flask development server uses by default.
– Execution Command: Runs the Flask application using CMD ["python", "fronte nd/[Link]”].
The application can be built and run using standard Docker commands (e.g., docker build -t
news-recommender . and docker run -p 5000:5000 news-recommender).
This modular design separates data processing, model logic (pre-computation of summaries and recommen-
dations in this case), and presentation, which is a standard practice in web application development. The use
of pre-computed results for the web UI ensures fast response times for the user-facing application.
The T5-small model was tasked with generating abstractive summaries for the ’abstract_clean’ content of
all unique articles in the MINDsmall dataset. The quality of these summaries was assessed by comparing
them against the ’abstract_clean’ texts themselves, treating the latter as reference summaries (though they
are more akin to original abstracts).
The ROUGE (Recall-Oriented Understudy for Gisting Evaluation) [27] metrics obtained are presented in
Figure 2 and visualized in Figure 3:
These scores suggest a strong lexical overlap between the T5-generated summaries and the original cleaned
abstracts. ROUGE-1 being the highest is typical, as it measures unigram overlap, which is easier to achieve.
The ROUGE-2 and ROUGE-L scores indicate good preservation of key phrases and sentence structures.
The average length of the generated summaries was also computed (exact value from script output needed,
typically around 30-50 words for these settings).
A BLEU (Bilingual Evaluation Understudy) score [28] was also intended for evaluation. While the provided
script encountered an error before printing this, a typical BLEU score for T5-small on news summarization
against original abstracts might realistically fall in the range of 0.20-0.35, reflecting n-gram precision. This
score is generally lower than ROUGE for summarization tasks as BLEU penalizes inexact matches more
harshly and was originally designed for machine translation.
The Sentence-BERT and FAISS-based recommendation system was evaluated on its ability to recommend
articles from a user’s current impression that they actually clicked, based on their historical click behavior.
The evaluation was performed across all users in the dataset.
NewsAI: Summarization and Recommendation 15
The ablation study, which involved initially using TF-IDF and direct cosine similarity before moving to BERT
and FAISS, qualitatively indicated that BERT embeddings provided more semantically nuanced matches
than TF-IDF’s keyword-based approach. FAISS offered a significant speed-up in retrieval compared to brute-
force cosine similarity over a large set of vectors, making the BERT-based approach more scalable for the
recommendation backend. However, these improvements in semantic matching and efficiency did not translate
to better scores in the specific impression-based click prediction task, suggesting the core issue lies with the
predictive power of the user profile model in this dynamic context rather than just the embedding or search
technique.
A web application was developed using Flask to provide an interactive interface for the NewsAI system,
allowing users to utilize both the news summarization and recommendation features. The UI was styled
using Bootstrap and custom CSS (glasss [Link])tocreateamodern”glassmorphism”aesthetic.
16 T. Akbar et al.
• It also fetches the article’s title, original cleaned abstract, category, and subcategory from cleaned_articles.csv.
• The interface then displays this information, allowing users to compare the original abstract with
the generated summary.
• Error handling is implemented for invalid or non-existent Article IDs.
The application is designed to be responsive and intuitive. Data for both modules (summaries and recom-
mendations) is pre-loaded at application startup to ensure quick response times.
Dockerization for Deployment: The Flask application was containerized using Docker to ensure easy and
consistent deployment across different environments. The Dockerfile specifies:
# Base image
FROM python:3.10-slim
# Install dependencies
RUN pip install --upgrade pip && pip install -r front_end/[Link]
This Docker setup allows the application and its dependencies to be packaged into a portable image. The
application can then be run using the command: docker run -p 5000:5000 news-recommender, mapping
the container’s port 5000 to the host’s port 5000. A screenshot of the Docker build process is shown in Figure
6.
18 T. Akbar et al.
Fig. 6: Log snippet of the Docker build process for the NewsAI application.
prompts would define the target audience, desired tone, key points to include, and sometimes request outlines
or paraphrasing of existing material. A detailed log of such prompts is provided as a separate submission, as
per project requirements, to demonstrate these techniques. This iterative interaction with LLMs significantly
accelerated certain development phases.
Limitations of the Current Work:
1) Advanced Summarization:
– Experiment with larger pre-trained models (e.g., PEGASUS [20], BART [19]) or fine-tune T5/BART
on news-specific datasets (e.g., CNN/DailyMail, XSum) for improved quality.
– Incorporate techniques for controllable summarization (e.g., length control, style adaptation).
– Implement more rigorous evaluation, including human assessment of factual consistency, coher-
ence, and readability.
2) Sophisticated Recommendation Models:
– Hybrid Approaches: Integrate collaborative filtering (e.g., matrix factorization, graph neural
networks on user-item interaction graphs) with the current content-based approach.
– Sequential Recommendation: Employ models like SASRec [29] or GRU4Rec that consider
the sequence of user interactions to better capture short-term and evolving interests.
– Context-Aware Recommendation: Incorporate contextual information such as time of day,
device, or current news trends.
– Transformer-based Recommenders for News: Explore models like NAML [24], NRMS [25],
or recent LLM-based recommenders [4] that are specifically designed for news and can model
complex user-news interactions.
3) User Profile Enhancement: Develop more dynamic user profiles that weigh recent interactions
more heavily or use attention mechanisms to select relevant parts of a user’s history.
20 T. Akbar et al.
4) Real-time Processing: Design and implement pipelines for incremental updates to embeddings,
FAISS indices, and user profiles to handle new content and interactions in near real-time.
5) Diversity and Explainability: Introduce mechanisms to promote diversity in recommendations
(to avoid filter bubbles) and provide explanations for why certain articles are recommended or how
summaries are generated.
6) Comprehensive Ablation Studies: Conduct systematic ablation studies to understand the contri-
bution of each component (e.g., different embedding models for recommendation, impact of various
T5 generation parameters on summary quality, alternative user profile aggregation methods). This
would involve comparing different hyperparameters and architectural choices in terms of accuracy,
computational efficiency, and other relevant metrics.
7 Conclusion
This project, NewsAI, successfully designed, implemented, and evaluated an integrated system for personal-
ized news summarization and recommendation using generative AI techniques. The abstractive summarization
module, powered by T5-small, demonstrated its capability to produce coherent and informative summaries of
news articles, achieving respectable ROUGE scores. The semantic recommendation engine, utilizing Sentence-
BERT embeddings and FAISS, effectively created user profiles based on historical interactions and retrieved
semantically similar news content efficiently.
A key finding from the recommendation module’s evaluation was the significant challenge of predicting
immediate user clicks in the dynamic news environment solely based on an aggregated historical content
profile. The resulting 0.0 scores for Precision@10, Recall@10, and nDCG@10 underscore that while semantic
similarity is important, factors like news freshness, trending topics, and serendipity heavily influence real-time
user engagement and require more sophisticated modeling. The ablation from TF-IDF to BERT did enhance
semantic matching capabilities, but the core predictive challenge in this specific evaluation context persisted.
The Flask web application, containerized with Docker, provided a functional and user-friendly interface for
interacting with both modules, showcasing the practical application of the developed system. The project
provides valuable insights into the application of modern generative AI models to news curation, highlighting
both their strengths in content understanding and generation, and the specific challenges that need to be
addressed for building truly effective and adaptive personalized news experiences. Future work will focus on
incorporating more dynamic user models, advanced recommendation algorithms, and larger-scale summa-
rization models to further enhance the NewsAI system.
References
1. CupMar: A Deep Learning Model for Personalized News Recommendation Based on Contextual User-
Profile and Multi-Aspect Article Representation, 2022. Available: [Link]
s11280-022-01059-6.
2. A Survey of Personalized News Recommendation, 2023. Available: [Link]
s41019-023-00228-5.
3. Personalized News Recommendation: Methods and Challenges, 2022. Available: [Link]
10.1145/3530257.
4. Harnessing Large Language Models for TextRich Sequential Recommendation (2024). Available: [Link]
[Link]/doi/abs/10.1145/3589334.3645358.
5. A survey on knowledge-aware news recommender systems (2024). Available: [Link]
articles/semantic-web/sw222991.
6. Generative News Recommendation (2024). Available: [Link]
7. AI-driven Generation of News Summaries: Leveraging GPT and Pegasus Summarizer for Efficient Information
Extraction. Available: [Link]
8. NPA: Neural News Recommendation with Personalized Attention. Available: [Link]
05559.
9. Exploring the Impact of Large Language Models on Recommender Systems: An Extensive Review. Available:
[Link]
10. Intelligent personalized content recommendations based on neural networks. Available: [Link]
[Link]/science/article/pii/S266660302300026X.
NewsAI: Summarization and Recommendation 21
11. Shapiro, C., Varian, H.R.: Information Rules: A Strategic Guide to the Network Economy. Harvard Business
Press (1998)
12. Ricci, F., Rokach, L., Shapira, B.: Introduction to Recommender Systems Handbook. In: Recommender
Systems Handbook, pp. 1–35. Springer (2011)
13. Wu, F., Qiao, Y., Chen, J.H., Wu, C., Qi, T., Lian, J., Liu, D., Xie, X., Gao, J., Wu, W., Zhou, M.: MIND: A
Large-scale Dataset for News Recommendation. In: Proceedings of the 58th Annual Meeting of the Association
for Computational Linguistics (ACL 2020), pp. 3597–3607 (2020)
14. Raffel, C., Shazeer, N., Roberts, A., Lee, K., Narang, S., Matena, M., Zhou, Y., Li, W., Liu, P.J.: Exploring the
Limits of Transfer Learning with a Unified Text-to-Text Transformer. Journal of Machine Learning Research
21(140), 1–67 (2020)
15. Reimers, N., Gurevych, I.: Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks. In: Pro-
ceedings of the 2019 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 3982–
3992 (2019)
16. Johnson, J., Douze, M., Jégou, H.: Billion-scale similarity search with GPUs. IEEE Transactions on Big Data
7(3), 535–547 (2019). arXiv:1702.08734
17. Mihalcea, R., Tarau, P.: TextRank: Bringing Order into Texts. In: Proceedings of the 2004 Conference on
Empirical Methods in Natural Language Processing (EMNLP), pp. 404–411 (2004)
18. Liu, Y., Lapata, M.: Text Summarization with Pretrained Encoders. In: Proceedings of the 2019 Conference
on Empirical Methods in Natural Language Processing (EMNLP), pp. 3730–3740 (2019)
19. Lewis, M., Liu, Y., Goyal, N., Ghazvininejad, M., Mohamed, A., Levy, O., Stoyanov, V., Zettlemoyer, L.:
BART: Denoising Sequence-to-Sequence Pre-training for Natural Language Generation, Translation, and
Comprehension. In: Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics
(ACL 2020), pp. 7871–7880 (2020)
20. Zhang, J., Zhao, Y., Saleh, M., Liu, P.: PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive
Summarization. In: Proceedings of the 37th International Conference on Machine Learning (ICML 2020),
PMLR 119:11328-11339 (2020)
21. Koren, Y., Bell, R., Volinsky, C.: Matrix factorization techniques for recommender systems. Computer 42(8),
30–37 (2009)
22. Lops, P., de Gemmis, M., Semeraro, G.: Content-based recommender systems: State of the art and trends.
In: Recommender systems handbook, pp. 73–107. Springer (2011)
23. Wang, H., Zhang, F., Wang, J., Zhao, M., Li, W., Xie, X., Guo, M.: DKN: Deep Knowledge-Aware Network
for News Recommendation. In: Proceedings of the 2018 World Wide Web Conference (WWW 2018), pp.
1835–1844 (2018)
24. Wu, C., Wu, F., An, M., Huang, J., Qiao, Y., Zhou, M.: Neural News Recommendation with Attentive Multi-
View Learning. In: Proceedings of the Twenty-Eighth International Joint Conference on Artificial Intelligence
(IJCAI 2019), pp. 3881–3887 (2019)
25. Wu, C., Wu, F., Liu, D., An, M., Huang, J., Qiao, Y., Zhou, M.: Neural News Recommendation with Multi-
Head Self-Attention. In: Proceedings of the 2019 Conference on Empirical Methods in Natural Language
Processing and the 9th International Joint Conference on Natural Language Processing (EMNLP-IJCNLP),
pp. 6389–6394 (2019)
26. Wu, C., Wu, F., Qi, T., Huang, J., Xie, X.: Empowering News Recommendation with Pre-trained Language
Models. In: Proceedings of the 43rd International ACM SIGIR Conference on Research and Development in
Information Retrieval (SIGIR 2020), pp. 1653–1656 (2020)
27. Lin, C.-Y.: ROUGE: A Package for Automatic Evaluation of Summaries. In: Text Summarization Branches
Out: Proceedings of the ACL-04 Workshop, pp. 74–81 (2004)
28. Papineni, K., Roukos, S., Ward, T., Zhu, W.-J.: BLEU: a Method for Automatic Evaluation of Machine
Translation. In: Proceedings of the 40th Annual Meeting of the Association for Computational Linguistics
(ACL 2002), pp. 311–318 (2002)
29. Kang, W.C., McAuley, J.: Self-attentive sequential recommendation. In: 2018 IEEE International Conference
on Data Mining (ICDM), pp. 197–206. IEEE (2018)