Enhancing Product Visibility Through Strategic Text Sequence Optimization in Large Language Models: A Gradient-Based Replication Study

Large Language Models (LLMs) are increasingly integrated into e-commerce search and recommendation pipelines, raising concerns about their susceptibility to adversarial manipulation of product rankings. This study implements and evaluates a gradient-based Strategic Text Sequence (STS) optimization framework, using the Greedy Coordinate Gradient (GCG) algorithm of Zou et al. [7] to construct adversarial token sequences embedded in product descriptions, with the goal of promoting a target product's rank in LLM-generated recommendation lists. Using the open-weight Llama-3.2-1B-Instruct model, we optimize an STS over 50 GCG iterations and evaluate the resulting sequence against a no-STS baseline across 30 independent, randomly reordered trials. Optimization produced a consistent, monotonic reduction in training loss (2.73 to 0.32), and evaluation showed a positive directional trend across ranking metrics: NDCG@5 improved from 0.073 to 0.152, Top-5 frequency from 0.133 to 0.300, and mean rank from 8.57 to 7.67. However, a paired t-test on the 30-trial sample did not reach statistical significance (t=1.10, p=0.279), indicating that while the attack shows a genuine positive effect, its magnitude on a small (1B-parameter) instruction-tuned model is modest and requires a larger sample to confirm reliably. We report these results transparently, including the null result on significance, and discuss why effect sizes on small LLMs may differ from those reported for larger models in prior work [1].

Authors

Institutions

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-07-23
DOI
https://doi.org/10.5281/zenodo.21514702
Primary Topic
Topic Modeling
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Enhancing Product Visibility Through Strategic Text Sequence Optimization in Large Language Models: A Gradient-Based Replication Study

Sameed Rashid
Zenodo (CERN European Organization for Nuclear Research)
Topic Modeling
article

Enhancing Product Visibility Through Strategic Text Sequence Optimization in Large Language Models: A Gradient-Based Replication Study

Sameed Rashid
article en

Abstract

Large Language Models (LLMs) are increasingly integrated into e-commerce search and recommendation pipelines, raising concerns about their susceptibility to adversarial manipulation of product rankings. This study implements and evaluates a gradient-based Strategic Text Sequence (STS) optimization framework, using the Greedy Coordinate Gradient (GCG) algorithm of Zou et al. [7] to construct adversarial token sequences embedded in product descriptions, with the goal of promoting a target product's rank in LLM-generated recommendation lists. Using the open-weight Llama-3.2-1B-Instruct model, we optimize an STS over 50 GCG iterations and evaluate the resulting sequence against a no-STS baseline across 30 independent, randomly reordered trials. Optimization produced a consistent, monotonic reduction in training loss (2.73 to 0.32), and evaluation showed a positive directional trend across ranking metrics: NDCG@5 improved from 0.073 to 0.152, Top-5 frequency from 0.133 to 0.300, and mean rank from 8.57 to 7.67. However, a paired t-test on the 30-trial sample did not reach statistical significance (t=1.10, p=0.279), indicating that while the attack shows a genuine positive effect, its magnitude on a small (1B-parameter) instruction-tuned model is modest and requires a larger sample to confirm reliably. We report these results transparently, including the null result on significance, and discuss why effect sizes on small LLMs may differ from those reported for larger models in prior work [1].

Zenodo (CERN European Organization for Nuclear Research)
University of Faisalabad (PK)
Openalex Percentile: Top 7%
Topic Modeling
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Enhancing Product Visibility Through Strategic Text Sequence Optimization in Large Language Models: A Gradient-Based Replication Study — Sameed Rashid · Zenodo (CERN European Organization for Nuclear Research) (2026) | TGRS Research Map | TGRS