0% found this document useful (0 votes)
20 views21 pages

NewsAI: Personalized News Summarization & Recommendations

The document presents 'NewsAI,' an integrated system designed for personalized news summarization and recommendation, utilizing generative AI techniques. It employs a two-pronged approach with a summarization module using the T5-small model and a recommendation engine based on Sentence-BERT, both evaluated through standard metrics. The system aims to enhance user experience by efficiently delivering relevant news content while addressing challenges in the dynamic news landscape.

Uploaded by

Tauheed Akbar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views21 pages

NewsAI: Personalized News Summarization & Recommendations

The document presents 'NewsAI,' an integrated system designed for personalized news summarization and recommendation, utilizing generative AI techniques. It employs a two-pronged approach with a summarization module using the T5-small model and a recommendation engine based on Sentence-BERT, both evaluated through standard metrics. The system aims to enhance user experience by efficiently delivering relevant news content while addressing challenges in the dynamic news landscape.

Uploaded by

Tauheed Akbar
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NewsAI: An Integrated System for Personalized News

Summarization and Recommendation Leveraging Generative AI

Tauheed Akbar1[0000−0000−0000−0000] , Zaib Un Nisa1[0000−0000−0000−0000] , and Javeria


Habib1[0000−0000−0000−0000]

National University of Computer and Emerging Sciences, Islamabad, Pakistan


Roll Nos: i210723, i210383, i212484
{i210723, i210383, i212484}@[Link]
[Link]

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.

Keywords: News Recommendation · News Summarization · Generative AI · Transformers · T5 · BERT


· Sentence-BERT · FAISS · Information Retrieval · Natural Language Processing · Flask · Docker · MIND
Dataset.

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:

1. Abstractive News Summarization Module: This component focuses on generating high-quality,


concise summaries of full-length news articles. We selected the T5-small model [14], a pre-trained Text-To-
Text Transfer Transformer, renowned for its versatility and strong performance in various text generation
tasks, including summarization. The goal is to produce summaries that are not merely extractive (copying
sentences) but abstractive, meaning they can rephrase and synthesize information to create fluent, human-
like overviews.
2 T. Akbar et al.

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.

2.1 Personalized News Recommendation Systems


Personalized news recommendation aims to provide users with news articles that align with their interests,
typically inferred from their past behavior or explicit preferences.

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.

Surveys and Overviews of Recommendation Techniques Paper 2: A Survey of Personalized


News Recommendation (2023) [2]
– Summary: This survey offers a comprehensive review of personalized news recommendation tech-
niques. It categorizes various methods, including content-based, collaborative, graph-based, and hybrid
approaches, and discusses the challenges and trends in the domain.
– Methodology: A systematic literature review organizing existing methods into a coherent taxonomy.
It evaluates different strategies based on their underlying techniques and performance on benchmark
datasets.
– Major Findings: Key insights include the critical role of user profiling, the importance of integrating
multiple data sources, and the challenges of data sparsity and real-time adaptation.
– Dataset(s) Used: The survey covers several datasets, with a focus on the Microsoft News Dataset
(MIND) among others.
– Evaluation Metrics: Summarizes the use of precision, recall, F1-score, and diversity measures across
different studies.
– Relevance to NewsAI: The survey provides valuable context and a broad perspective on current trends
and challenges in personalized news recommendation, informing NewsAI’s model design and evaluation
strategy.
– Identified Gaps: The survey notes the absence of unified frameworks for handling explainability and
bias, as well as limited exploration of multimodal inputs (e.g., images and videos).
Paper 3: Personalized News Recommendation: Methods and Challenges (2022) [3]
– Summary: This paper analyzes various personalized news recommendation methods and discusses the
challenges inherent in modeling user preferences in dynamic news environments. It highlights the evolution
of techniques from traditional collaborative filtering to modern deep learning approaches.
4 T. Akbar et al.

– 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.

Paper 5: A survey on knowledge-aware news recommender systems (2024) [5]

– 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.

Leveraging Large Language Models in Recommendation Paper 4: Harnessing Large Language


Models for Text-Rich Sequential Recommendation (2024) [4]

– 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.

2.2 Generative Models for News Content


Paper 6: Generative News Recommendation (2024) [6]
– Summary: This paper proposes Generative News Recommendation (GNR), where LLMs create "dual-
level" representations (semantic + theme) and generate personalized narratives by fusing multiple related
articles.
– Methodology: A three-module pipeline: Generative Dual-level Representation (LLM for theme sum-
maries), Personalized Related News Exploration (ranking, relation classification), and Interest-aware
Multi-news Narrative Fusion (LLM to synthesize narrative, fine-tuned with UIFT).
– Major Findings: Dual-level representations improve recommendation. GNR generates personalized,
factually consistent narratives. UIFT enhances personalization.
– Dataset(s) Used: MIND (politics subset), custom CNN dataset.
– Evaluation Metrics: Recommendation: AUC, MRR, NDCG@5. Narrative: Win Rate, Consistency Rate,
Human/GPT-4 Evaluation.
– Relevance to NewsAI: Highly relevant, addressing both recommendation and summarization/genera-
tion with LLMs.
– Identified Gaps: Limited to one news category. Narrative quality evaluation needs more qualitative
depth. Complex pipeline. Scalability concerns.
Paper 7: AI-driven Generation of News Summaries: Leveraging GPT and Pegasus Summa-
rizer for Efficient Information Extraction (2024) [7]
– Summary: Details an AI tool for automated online news summarization, including scraping, duplicate
merging (BERT title similarity), and abstractive summarization using GPT-3.5 Turbo or Pegasus.
– Methodology: Python libraries for scraping, BERT for de-duplication, GPT-3.5 (OpenAI Langchain)
or Pegasus (Transformers library) for summarization. Evaluation with ROUGE, BLEU.
– Major Findings: Both GPT-3.5 and Pegasus are capable. GPT-3.5 showed higher quantitative similarity
to references on a test text. Title-based similarity was effective for de-duplication.
– Dataset(s) Used: Scraped articles from Burkina Faso news sites; "Universal Declaration of Human
Rights" for specific model comparison.
– Evaluation Metrics: ROUGE (variants), BLEU.
– Relevance to NewsAI: Highly relevant for the summarization component, providing a practical work-
flow and model comparison.
– Identified Gaps: Focuses purely on summarization quality, no personalization or link to recommenda-
tion. Limited evaluation set. No fine-tuning explored.
(Placeholder for 5 more detailed paper reviews, focusing on areas like:
– Advanced user profiling techniques in news recommendation.
– Scalability solutions for large-scale recommendation systems (e.g., two-tower models, advanced indexing).
– Hybrid recommendation models combining content, collaborative, and knowledge-based approaches.
– Evaluation methodologies for interactive or session-based news recommendation.
– Ethical considerations and bias mitigation in personalized news systems.
– Recent advancements in abstractive summarization beyond T5/BART, or specific fine-tuning strategies
for news.
– Multimodal news recommendation/summarization if relevant.
Each review should follow the Summary, Methodology, Major Findings, Dataset(s), Evaluation Metrics, Rel-
evance, and Identified Gaps structure.)
NewsAI: Summarization and Recommendation 7

3 Methodology and Technical Depth

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.

3.1 Dataset Acquisition and Preprocessing

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.

A subsequent script (cell 8 in ‘datac [Link]‘basedontheprovidednotebookstructure)f urtherprocessedthesecleanedf i


Loading ‘cleaneda [Link]‘and‘cleanedb [Link]‘.ApplyingBERT tokenization(BertTokenizer.from_pretrained
Mapping these tokenized article representations to the user histories and clicked articles in ‘behaviorsd f ‘, creating ′ clicked_arti
The final data cleaning script (cell 23 in ‘datac [Link]‘)seemstoperf ormasimplif iedtokenization(regex−
based‘simplet okenizer‘)andhistoryparsing, savingtheoutputto‘cleanedu serh [Link]‘.F orconsistencyandthemainmodels
basedmodelsweretobetrainedf [Link], ourmainmodulesusepre−trainedSentence−
BERT andT 5, whichhandletheirowntokenizationinternallyonrawtext.

3.2 News Summarization Module

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.

Implementation Details (news_summarization.ipynb) The summarization process was implemented as


follows:
1. Data Loading: The cleaned_articles.csv was loaded, and the ’abstract_clean’ column was used
as the source text for summarization. NaN values were filled with empty strings.
2. Model and Tokenizer Initialization: The AutoTokenizer and AutoModelForSeq2SeqLM classes
from the Hugging Face transformers library were used to load the pre-trained ’t5-small’ model
and its corresponding tokenizer. The model was transferred to the available device (GPU if available,
otherwise CPU).
3. Batch Summarization (generate_batch_summaries): To handle the potentially large number of
articles efficiently, summaries were generated in batches (batch size of 16 was used). For each batch
of texts:
– The prefix "summarize: " was added to each article abstract.
– The T5 tokenizer processed these prefixed texts, converting them into input IDs, attention masks,
etc., suitable for the model. This involved padding texts within a batch to the same length and
truncating texts longer than the model’s maximum input length (max_input_len=512).
– The [Link]() method was invoked to produce the summaries. Key generation param-
eters included:
• max_length=100: Set the maximum length for the generated summary.
• min_length=25: Set the minimum length for the summary.
• num_beams=4: Employed beam search with 4 beams to potentially find better quality sum-
maries than greedy decoding.
• length_penalty=2.0: Discouraged the model from generating overly short summaries.
• early_stopping=True: Allowed generation to stop once an end-of-sequence token was pro-
duced by all beams.
– The generated token IDs were then decoded back into human-readable text summaries using
tokenizer.batch_decode(), skipping special tokens.
4. Storing Summaries: The list of generated summaries was added as a new ’summary’ column to the
articles DataFrame. This augmented DataFrame was then saved to summarized_articles_t5.csv.
This output file serves as the primary source for the summarizer feature in the web application.
The process was monitored using tqdm for progress tracking during the batch summarization.
10 T. Akbar et al.

3.3 News Recommendation Module

The news recommendation module aims to suggest relevant articles to users based on their past interaction
history, leveraging semantic understanding of news content.

Model Selection: Sentence-BERT with FAISS

1. News Article Representation (Sentence-BERT): We chose the sentence-transformers/all-MiniLM-L6-v2


model [15]. Sentence-BERT fine-tunes pre-trained BERT (or similar Transformer) networks using a
Siamese or triplet network structure to derive semantically meaningful sentence embeddings. The
all-MiniLM-L6-v2 model is a lightweight yet powerful variant that maps sentences and paragraphs
to a 384-dimensional dense vector space. It is particularly well-suited for tasks like semantic textual
similarity and information retrieval. For each news article, the ’Title’ and ’Abstract’ (cleaned) were
concatenated to form the input text for embedding.
2. User Profile Representation: A user’s reading preferences were modeled by creating a profile
vector. This vector was computed as the element-wise mean of the Sentence-BERT embeddings of
all news articles the user had previously clicked. This includes articles from their ’History’ log and
any articles clicked in ’Impressions’ across all their logged sessions. The mean embedding aims to
represent the central tendency of the user’s topical interests.
3. Efficient Similarity Search (FAISS): Given a large corpus of news articles, finding the most similar
articles to a user profile vector efficiently is crucial. We employed FAISS (Facebook AI Similarity
Search) [16], a library for efficient similarity search and clustering of dense vectors.
– Indexing: An IndexFlatIP index was used. This index computes the inner product between the
query vector (user profile) and the database vectors (news article embeddings).
– Normalization: Before adding to the index and before querying, all news embeddings and user
profile embeddings were L2-normalized. With L2-normalized vectors, inner product search be-
comes equivalent to cosine similarity search, which is a standard measure for semantic similarity.
A·B
CosineSimilarity(A, B) = ||A||·||B|| . If ||A|| = ||B|| = 1, then CosineSimilarity(A, B) = A · B.
4. Recommendation Generation: For a target user:
(a) Their profile vector is retrieved (or computed).
(b) This vector is L2-normalized and used to query the FAISS index, requesting the top-N (e.g., N
= 2 * top_k to allow for filtering) most similar news article indices.
(c) The NewsIDs corresponding to these indices are retrieved.
(d) Articles that the user has already interacted with (from their comprehensive click history) are
filtered out from this candidate list to ensure novelty in recommendations.
(e) The remaining articles, up to the desired number (e.g., top 10), form the final recommendation
list.
5. Cold-Start Handling: If a user has no click history (i.e., no profile vector can be computed), the
system falls back to recommending a list of globally popular news articles (determined by overall click
counts across all users), after filtering any items the user might have seen in the current non-clicked
impression if available.

Implementation Details ([Link]) The recommendation pipeline was im-


plemented as follows:

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.

3.4 User Interface (Flask Application)

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.

4 Experimental Setup and Results


This section details the environment used for experiments, the evaluation metrics employed, and the results
obtained for both the news summarization and news recommendation modules.

4.1 Experimental Setup


– Dataset: The preprocessed MINDsmall dataset (as described in Section 3.1) was used for all experi-
ments. For the summarization task, the ’abstract_clean’ column from cleaned_articles.csv served
as the input text. For recommendation, user profiles were built from cleaned_behaviors.csv, and
article content for embedding was derived from ’title’ and ’abstract_clean’ in cleaned_articles.csv.
– Computational Resources: Data preprocessing, embedding generation, and FAISS index build-
ing were primarily performed on Google Colab, utilizing GPU runtimes where beneficial (e.g., for
Sentence-BERT encoding and T5 summary generation). The Flask web application was developed
and tested locally.
– Key Software and Libraries:
• Python 3.x
• Pandas: For data manipulation and loading CSV files.
• NLTK: For initial text preprocessing (tokenization, stopwords, lemmatization).
• Scikit-learn: For TF-IDF vectorization.
• Hugging Face Transformers: For T5-small model and tokenizer, and BERT tokenizer for initial
data exploration.
• Sentence-Transformers: For the ’all-MiniLM-L6-v2’ model used in the recommendation engine.
• FAISS-CPU: For building and querying the similarity search index.
• PyTorch: As the underlying framework for Transformers and Sentence-Transformers.
• Flask: For developing the web application.
• Docker: For containerizing the web application.
• evaluate library (from Hugging Face) and rouge-score: For calculating ROUGE and BLEU
metrics.
– Summarization Model Configuration:
• Model: t5-small
• Input Prefix: "summarize: "
• Max Input Length: 512 tokens
• Generation Parameters: max_length=100, min_length=25, num_beams=4, length_penalty=2.0,
early_stopping=True.
NewsAI: Summarization and Recommendation 13

– Recommendation Model Configuration:

• Embedding Model: sentence-transformers/all-MiniLM-L6-v2 (384 dimensions).

• FAISS Index: IndexFlatIP with L2 normalization.

• User Profile: Mean of clicked article embeddings.

• Top-K for Recommendation: 10 articles.

4.2 News Summarization Evaluation Results

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).

Fig. 2: ROUGE F1-Scores for T5-small Summarization as per execution log.


14 T. Akbar et al.

Fig. 3: Bar Plot visualization of ROUGE F1-Scores for T5-small Summarization.

The ROUGE (Recall-Oriented Understudy for Gisting Evaluation) [27] metrics obtained are presented in
Figure 2 and visualized in Figure 3:

– ROUGE-1 F1-Score: 0.7147 (overlap of unigrams)


– ROUGE-2 F1-Score: 0.6605 (overlap of bigrams)
– ROUGE-L F1-Score: 0.6875 (longest common subsequence based)
– ROUGE-Lsum F1-Score: 0.6876 (LCS at summary level)

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.

4.3 News Recommendation Evaluation Results

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

Fig. 4: Console output from the BERT-FAISS recommendation system.

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.

5 User Interface Details

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.

(a) NewsAI Homepage (b) News Summarizer Interface

(c) News Recommender Interface

Fig. 5: Screenshots of the NewsAI Flask Web Application Interface.

Key features and pages of the UI include:


– Homepage (Fig. 5a): Serves as the entry point, providing a brief overview of the project and
navigation links to the Summarizer and Recommender modules.
– News Summarizer Page (Fig. 5b):
• Allows users to input a specific Article ID.
• Upon submission, the backend ([Link]) retrieves the pre-computed T5-generated summary for
the given ID from summarized_articles_t5.csv.
NewsAI: Summarization and Recommendation 17

• 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.

– News Recommender Page (Fig. 5c):

• Allows users to input a User ID.


• On submission, the backend retrieves the top-10 pre-computed recommended NewsIDs for that
user from bert_faiss_recommendations.csv.
• For each recommended NewsID, it fetches the title, category, and subcategory from cleaned_articles.csv.
• The interface displays a ranked list of these recommended articles.
• Error handling is in place for UserIDs not found in the recommendation data.

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

# Set working directory inside the container


WORKDIR /app

# Copy all files into the container


COPY . .

# Install dependencies
RUN pip install --upgrade pip && pip install -r front_end/[Link]

# Expose the port (adjust if needed)


EXPOSE 5000

# Run the application


CMD ["python", "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.

6 Discussion, Limitations, and Future Work


The NewsAI project successfully developed and integrated two key generative AI functionalities—news sum-
marization and personalized recommendation—into a demonstrable web application. This section discusses
the observed results, identifies the limitations of the current system, and proposes avenues for future enhance-
ments.
Discussion of Findings: The T5-small model proved to be a competent abstractive summarizer for news
articles, achieving ROUGE-L F1 scores around 0.68. This indicates that the generated summaries maintain
a good degree of lexical and sequential overlap with the original cleaned abstracts, suggesting they capture
essential information. Qualitatively, the summaries displayed in the UI were generally fluent and informa-
tive, offering concise previews of article content. The choice of T5-small balanced generation quality with
computational feasibility for summarizing a large corpus of articles.
The news recommendation module, employing Sentence-BERT for semantic embeddings and FAISS for effi-
cient retrieval, was technically well-implemented. User profiles, constructed as the mean of historically clicked
article embeddings, aimed to capture user interests. The FAISS index allowed for rapid retrieval of seman-
tically similar articles. However, when evaluated against the task of predicting actual user clicks in new,
unseen impressions, the system yielded Precision@10, Recall@10, and nDCG@10 scores of 0.0000. This stark
result is highly indicative of the challenges in news recommendation. User engagement with news is not solely
driven by long-term semantic similarity to past consumption. Factors such as article freshness, breaking news,
trending topics, serendipity, and even the layout of presented articles play crucial roles. An aggregated his-
torical average struggles to capture these dynamic, short-term, and context-dependent factors. The ablation
from TF-IDF to BERT did improve the semantic quality of "similar" articles, but this did not overcome the
fundamental mismatch between the model’s predictive basis and the dynamic nature of news click behavior
in the chosen evaluation setup.
The Flask UI successfully showcased both functionalities, providing an intuitive way to interact with the
summarizer and recommender. Dockerization further ensures the application’s portability.
Prompt Engineering (General Project Aspect): Throughout the development of the NewsAI project,
generative AI models like ChatGPT were utilized for various assistance tasks, including conceptual brain-
storming, code snippet generation and debugging, understanding complex library usages (e.g., FAISS, Trans-
formers), and drafting initial text for this report. Effective prompt engineering was key to obtaining useful
outputs. For example, when seeking code solutions, prompts would specify the Python version, libraries in-
volved, desired input/output formats, and often include error messages for debugging. For textual content,
NewsAI: Summarization and Recommendation 19

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) Summarization Model and Evaluation:


– Model Capacity: T5-small, while efficient, might be outperformed by larger variants (T5-base,
T5-large) or models specifically fine-tuned for news summarization (e.g., BART-CNN/DM) in
terms of factual accuracy, coherence, and handling of longer, more complex articles. Hallucination
or factual inaccuracies, common with abstractive models, were not rigorously evaluated.
– Reference Quality: Using ’abstract_clean’ as the reference for ROUGE/BLEU is a proxy. True
gold-standard human-written summaries would provide a more accurate assessment.
2) Recommendation Model and Evaluation:
– User Profile Simplicity: Averaging embeddings is a basic user profiling method. It doesn’t
capture evolving interests, the recency of interactions, or the diversity of a user’s tastes.
– Content-Only Focus: The recommendation is purely content-based. It lacks collaborative filter-
ing signals (i.e., learning from other similar users’ behavior), which are often crucial for effective
recommendation.
– Dynamic Nature of News: As discussed, the model doesn’t account for timeliness, trends, or
serendipity, leading to poor performance on predicting immediate clicks in new sessions.
– Evaluation Rigor: The current evaluation setup for recommendations is very strict. While it
reflects a real-world scenario (predicting clicks on newly presented items), alternative evaluations
(e.g., predicting held-out historical clicks) might better assess the model’s ability to capture long-
term semantic relevance.
3) Cold-Start Problem: For new users with no click history, the system defaults to a simple popularity
baseline, which is non-personalized.
4) Scalability of Pre-computation: While the UI is fast due to pre-computed summaries and recom-
mendations, a production system would need efficient pipelines for real-time or near real-time updates
as new articles arrive and user interactions occur.
5) Multilingual and Multimodal Aspects: The current system processes English text only. The
MIND dataset does contain some entity information that could link to knowledge graphs, but this
was not deeply explored. Images within articles were not processed for the recommendation or sum-
marization modules.

Future Work and Potential Enhancements:

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)

You might also like