TL;DR
Your smartphone logs are a rich diary of who you are, capable of letting an on-device AI personalize itself without you ever filling out a profile—or sending private data to the cloud. The catch? A single day of phone activity generates ~30,000 tokens, creating a memory bottleneck so massive it crashes mobile-sized language models. By filtering out repetitive, semantically redundant log entries before inference, the authors slash memory usage by up to 39% and halve processing time, all while improving how well the AI understands you.
What Problem Does This Paper Address?
For AI assistants to be genuinely helpful, they need context about your routines, job, and habits. Asking users directly doesn't work well; people hate filling out long surveys, and our lives change constantly. Inferring a "persona" passively from smartphone activity logs is a natural alternative, provided it happens strictly on-device so sensitive behavioral records never leave the phone.
On-device inference hits a wall—not because of speed (persona updates can run quietly overnight while your phone charges), but because of memory. If an app exceeds its RAM budget, the mobile OS doesn't slow it down; it kills the process immediately.
In Large Language Models (LLMs), peak memory consists of model weights plus the Key-Value (KV) cache—the model’s working memory for the input text, which grows linearly with input length. A 24-hour mobile log averages 29.7K tokens. For a compact 4-billion-parameter model (Qwen3-4B), the KV cache for that single day takes up 4.1 GB—nearly double the size of the model's own compressed (INT4) weights (2.2 GB). Standard model compression shrinks weights, leaving the KV cache elephant untouched. To fit on a phone, the input itself has to shrink.
Methods
Think about your phone usage today: how many times did you unlock the screen, check the same chat app, or trigger a routine system ping? Raw logs are full of repetitive events that inflate token counts without adding new information about who you are.
Instead of standard token-level prompt compression (like LLMLingua-2), which chops out individual words and risks mangling timestamps or app names, the authors propose Semantic Similarity Log Filtering—an event-level deduplication pipeline:
- Embed: Each complete log entry is independently converted into a dense vector using a lightweight embedding model (
Qwen3-Embedding-0.6B), which is unloaded before the main LLM runs so their memory footprints never stack. - Search: Vectors are indexed in FAISS using exact $L_2$ (Euclidean) distance search.
- Iterative Deduplication: Stepping through the day chronologically, the algorithm keeps the first occurrence of an activity and skips any subsequent log entries that fall within a distance threshold ($\tau = 0.2$) in embedding space.
Theauthors also test a simpler Exact Match filter (removing character-for-character duplicate entries) alongside baselines like random 50% sampling and LLMLingua-2.
Datasets
Because real-world mobile logs paired with deep personal profiles are a privacy nightmare to collect and release, existing public datasets (like StudentLife) only offer coarse sensor data and sparse annotations.
To fill this gap, the authors introduce LogToPersona, a synthetic benchmark of 1,600 persona–log pairs (split 1,000 train / 100 validation / 500 test) generated via a 3-stage pipeline using Gemma-4 31B:
- Generate a structured persona across 8 categories (Demographics, Job/Lifestyle, Daily Patterns, Financial Behavior, Health/Fitness, Social Activities, Tech Habits, and Motivations/Pain Points).
- Draft a coherent 24-hour activity timeline.
- Expand that timeline into granular, hourly smartphone logs containing app launches, search queries, messages, and transactions that implicitly reflect the persona.
Key Insights and Ideas
- Behavioral diversity beats completeness: Discarding 61% of the log doesn't hurt accuracy—it frequently improves it. Repetitive log entries act more like distracting noise than helpful signal.
- Preserve the event, not just tokens: Token-dropping methods (LLMLingua-2) and random sampling tank prediction quality. Keeping whole, structurally intact log entries is crucial so actions stay tied to their timestamps and apps.
- Trade context length for model brainpower: Under a fixed ~6.2 GB memory budget, running a larger model (
Qwen3-8B) on filtered logs outperforms running a smaller model (Qwen3-4B) on the full log by a massive +7.0 points.
- Filtering unlocks fine-tuning: When the authors LoRA fine-tuned
Qwen3-4B, training on full logs yielded zero improvement over zero-shot performance. Fine-tuning only helped when redundant entries were filtered out first, making the underlying behavioral evidence easier for the model to learn from.
Key Results
Evaluated across nine open-weight models spanning four families (Qwen3, Gemma-3, Gemma-4, and Ministral-3) using a 0–100 Persona Prediction Score (PPS):
- Compression & Speed: Semantic filtering shrinks average log length by 61% (from 29.7K to 11.6K tokens). It adds just 1.4 seconds of preprocessing overhead while cutting LLM prefill latency by 51% to 67% across all models.
- Memory Savings: Peak memory (INT4 weights + FP16 KV cache) drops by 22–39% on dense-attention models (Qwen3, Ministral-3) and 11–13% on sliding-window models (Gemma-3/4). Notably,
Qwen3-4Bdrops from 6.3 GB to 3.8 GB, crossing the critical 4 GB mobile feasibility threshold. - Prediction Quality: Semantic Similarity and Exact Match match or beat the full-log baseline across virtually all models (boosting
Qwen3-14Bby +2.8 PPS with Semantic Similarity and +4.8 PPS with Exact Match). By contrast, LLMLingua-2 dropsQwen3-4Bperformance by 11.5 points.
Limitations and Future Work
- Loss of frequency signals: Deduplicating logs erases how often something happened. Checking a fitness or trading app once looks identical to checking it 40 times. Future work could attach simple event counters or duration stats to retained entries.
- Synthetic data & 24-hour window: Synthetic logs are naturally cleaner and more aligned with personas than messy human behavior, and a single Tuesday might miss weekend habits or broader routines. Extending to multi-day windows and real-world consented data are natural next steps.
- Analytical hardware estimates: Memory footprints were calculated analytically (excluding runtime activation buffers) and latency was benchmarked on server GPUs (NVIDIA A40s) rather than physical smartphones. On-device profiling is needed to confirm real-world mobile behavior.
Summary updated