Metaverse Security: LLM-Based Malicious Code Detection Through Token Optimization

Metaverse platforms increasingly offer immersive virtual environments while simultaneously introducing significant vulnerabilities through malicious code, particularly when concealed within software supply chains. To address these security challenges, this study utilizes Large Language Models (LLMs) for the detection of harmful JavaScript code. Specifically, it underscores the pivotal role of optimising input token length in order to enhance both detection accuracy and overall computational efficiency. To examine this optimisation process, we conduct an empirical comparison of several advanced LLMs—namely CodeLLaMA, LLaMA-2/3, Qwen2.5, and EXAONE-3.5—across token ranges from 500 up to 128K. Our findings reveal that the optimal input size varies considerably among these models, indicating that arbitrarily enlarging token counts does not inherently improve performance. Notably, Qwen2.5 achieves an F1 score of 0.9276 at an input size of 5120 tokens, thereby surpassing diverse conventional approaches as well as large-context baselines. This outcome highlights the viability of tailored input lengths as a practical and efficient security measure for metaverse ecosystems. By adhering to an optimal token length strategy, our study not only diminishes computational overhead but also accelerates inference times, a crucial consideration in safeguarding modern metaverse infrastructures. These results confirm that a carefully calibrated approach to token length can strike a balance between precision and resource management, offering an effective mechanism to thwart malicious JavaScript activity. Consequently, this line of inquiry opens the way for LLM-driven security frameworks that combine thorough threat detection with tangible gains in computational performance.

Authors

Institutions

Publication Details

Published
2025-08-27
DOI
https://doi.org/10.1109/metacom65502.2025.00057
Primary Topic
Advanced Malware Detection Techniques
Type
article
Field-Weighted Citation Impact
0.00
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Metaverse Security: LLM-Based Malicious Code Detection Through Token Optimization

Seongmin Park, Eunmi Choi, Tuan Anh Nguyen, Dugki Min
Advanced Malware Detection Techniques
article

Metaverse Security: LLM-Based Malicious Code Detection Through Token Optimization

Seongmin Park, Eunmi Choi, Tuan Anh Nguyen, Dugki Min
article en

Abstract

Metaverse platforms increasingly offer immersive virtual environments while simultaneously introducing significant vulnerabilities through malicious code, particularly when concealed within software supply chains. To address these security challenges, this study utilizes Large Language Models (LLMs) for the detection of harmful JavaScript code. Specifically, it underscores the pivotal role of optimising input token length in order to enhance both detection accuracy and overall computational efficiency. To examine this optimisation process, we conduct an empirical comparison of several advanced LLMs—namely CodeLLaMA, LLaMA-2/3, Qwen2.5, and EXAONE-3.5—across token ranges from 500 up to 128K. Our findings reveal that the optimal input size varies considerably among these models, indicating that arbitrarily enlarging token counts does not inherently improve performance. Notably, Qwen2.5 achieves an F1 score of 0.9276 at an input size of 5120 tokens, thereby surpassing diverse conventional approaches as well as large-context baselines. This outcome highlights the viability of tailored input lengths as a practical and efficient security measure for metaverse ecosystems. By adhering to an optimal token length strategy, our study not only diminishes computational overhead but also accelerates inference times, a crucial consideration in safeguarding modern metaverse infrastructures. These results confirm that a carefully calibrated approach to token length can strike a balance between precision and resource management, offering an effective mechanism to thwart malicious JavaScript activity. Consequently, this line of inquiry opens the way for LLM-driven security frameworks that combine thorough threat detection with tangible gains in computational performance.

Kookmin University (KR), Konkuk University (KR), Ho Chi Minh City University of Industry and Trade (VN)
Openalex Percentile: Top 65%
Advanced Malware Detection Techniques
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.

Metaverse Security: LLM-Based Malicious Code Detection Through Token Optimization — Seongmin Park, Eunmi Choi, et al. · (2025) | TGRS Research Map | TGRS