FileGram: File-System AI Personalization
- FileGram is a unified framework for personalizing AI agents via file-system behavioral traces that capture chronological events and content changes.
- It integrates three key components—FileGramEngine, FileGramBench, and FileGramOS—to simulate realistic behaviors, evaluate memory systems, and construct personalized profiles.
- Empirical results demonstrate notable accuracy in profile reconstruction and anomaly detection, emphasizing the value of structured behavioral evidence over summary-based methods.
FileGram is a unified framework for personalizing AI agents via file-system behavior rather than conversations. In the published formulation, it grounds agent memory in file-system behavioral traces: chronological sequences of atomic file operations paired with content deltas, and it comprises three tightly coupled components—FileGramEngine, FileGramBench, and FileGramOS (Liu et al., 6 Apr 2026). The framework is motivated by a specific claim about OS-level and desktop agents: interaction-centric, summary-first memory pipelines overlook the dense procedural evidence present in how users read, write, organize, revise, and curate files over long horizons, while privacy constraints make real-world multimodal trace collection difficult at scale (Liu et al., 6 Apr 2026).
1. Scope, definition, and problem setting
FileGram addresses three stated bottlenecks in personalized file-system agents: data scarcity and privacy, the lack of benchmarks grounded in longitudinal file-system traces, and a methodological gap in which mainstream memory systems ingest dialogue turns but rarely observe how users interact with files (Liu et al., 6 Apr 2026). The framework therefore treats personalization as a memory problem rooted in workspace behavior rather than chat history.
A file-system behavioral trace is defined as a chronological sequence of typed events paired with content deltas. After cleaning, FileGram uses 12 atomic action types: file_read, file_browse, file_search, file_write, file_edit, dir_create, file_move, file_copy, file_delete, file_rename, cross_file_ref, and context_switch. Each event carries fields such as path, depth, file type, length, lines added and deleted, and timing intervals. For new files, FileGram stores full snapshots; for edits, it stores patch diffs with before_hash, after_hash, and line changes (Liu et al., 6 Apr 2026).
The framework is organized as a full stack: a persona-driven data engine for generating traces, a diagnostic benchmark for evaluating memory systems, and a bottom-up memory architecture that builds profiles directly from atomic actions and content deltas.
| Component | Function | Reported scale |
|---|---|---|
| FileGramEngine | Persona-driven workflow simulation | 640 trajectories; 20,028 atomic actions |
| FileGramBench | Diagnostic benchmark for memory systems | 4.6K QA items; 9 subtasks in 4 tracks |
| FileGramOS | Bottom-up memory architecture | 59.6% average accuracy |
This decomposition is significant because it makes file-system behavioral personalization measurable, trainable, and architecturally explicit in a single research program (Liu et al., 6 Apr 2026).
2. Behavioral traces and persona-conditioned data generation
FileGramEngine synthesizes realistic behavioral trajectories by combining a controlled persona space, a task suite designed to elicit observable behavior, and a tool-based simulation layer that logs atomic actions together with content creation and revision (Liu et al., 6 Apr 2026).
Each profile is defined by 19 attributes: 3 identity attributes—name, role, language—and 16 behavioral attributes organized into 6 dimensions. These dimensions are Consumption Pattern, Production Style, Organization Preference, Iteration Strategy, Curation, and Cross-Modal Behavior. Every attribute is discretized into three tiers, Left, Middle, and Right, and the system instantiates 20 profiles with unique L/M/R configurations. The profiles are deliberately arranged so that some pairs differ in only 1–2 dimensions while others differ across 5+ dimensions, enabling both subtle and coarse discrimination (Liu et al., 6 Apr 2026).
Task design mirrors the same six dimensions so that traits become trace-observable rather than merely descriptive. The engine uses 32 tasks spanning Understand, Create, Organize, Synthesize, Iterate, and Maintain. Half of these tasks are text-centric and half are multimodal, operating over a pre-populated workspace built from real personal-file collections with 615 files, including videos, audio, images, spreadsheets, and PDFs (Liu et al., 6 Apr 2026).
The resulting dataset scale is explicit: 20 user profiles multiplied by 32 tasks yields 640 trajectories; these trajectories contain 20,028 atomic file-system actions; the engine produces approximately 2.5K agent-created files, expanded to approximately 10K multimodal outputs (Liu et al., 6 Apr 2026). Raw logs initially contain 22 event types, but 10 simulation-specific metadata events are removed, leaving the 12 atomic action types used throughout the framework. To support drift analysis, FileGram perturbs 5 of the 32 trajectories for each profile by shifting a single behavioral dimension by one tier, thereby introducing localized behavioral drift with ground truth (Liu et al., 6 Apr 2026).
This design matters because the traces jointly encode procedural regularities, semantic output characteristics, and cross-session variability. A plausible implication is that FileGramEngine is less a synthetic dialogue generator than a synthetic workspace generator, with the task and profile schema serving as controls over observable behavior rather than over conversational style.
3. Benchmark design: FileGramBench
FileGramBench converts behavioral traces into a diagnostic benchmark with 4.6K QA items organized into 4 tracks and 9 subtasks (Liu et al., 6 Apr 2026). Its purpose is not generic task success but memory-centric evaluation under controlled user profiles, trajectory histories, perturbations, and multimodal evidence.
Track 1, Understanding, covers Attribute Recognition, Behavioral Fingerprint, and Profile Reconstruction. Attribute Recognition contains 326 three-choice multiple-choice questions; Behavioral Fingerprint contains 560 four-choice multiple-choice questions; Profile Reconstruction contains 320 free-form questions corresponding to 20 profiles times 16 behavioral attributes. These tasks probe whether a system can infer a user’s traits from one or more trajectories (Liu et al., 6 Apr 2026).
Track 2, Reasoning, contains Behavioral Inference and Trace Disentanglement. Behavioral Inference uses 560 four-choice multiple-choice questions in which 31 trajectories are observed and one task is left out, requiring prediction of behavior on the unseen task. Trace Disentanglement contains 1,134 multiple-choice questions with 2–4 choices, built from event streams interleaved from two users on the same task, and asks for the primary behavioral difference between them (Liu et al., 6 Apr 2026).
Track 3, Detection, covers Anomaly Detection and Shift Analysis. Anomaly Detection uses 815 multiple-choice questions with 5–6 choices, requiring identification of an impostor session among trajectories from one profile. Shift Analysis contains 288 multiple-choice questions with 3–6 choices and asks both which behavioral dimension changed and the direction of the tier shift (Liu et al., 6 Apr 2026).
Track 4, Multimodal grounding, contains File Grounding and Visual Grounding. File Grounding has 550 multiple-choice questions in which evidence is rendered PDFs or images rather than raw text. Visual Grounding uses 100 free-form questions over real-world screen recordings, scored by an LLM judge (Liu et al., 6 Apr 2026).
The evaluation protocol standardizes both ingest and answer phases. During ingest, methods process raw trajectories consisting of atomic actions and content deltas; when ingestion involves an LLM, all such methods use Gemini 2.5-Flash. During answer generation, Gemini 2.5-Flash receives the question and only the memory retrieved by the method, never direct access to raw traces. The models also never see the ground-truth profile templates or dimension definitions (Liu et al., 6 Apr 2026).
This benchmark design is diagnostically important because it separates profile reconstruction, cross-task generalization, trace disentanglement, drift detection, and multimodal grounding rather than collapsing them into a single task-success score.
4. FileGramOS and bottom-up memory construction
FileGramOS is the architectural core of the framework. It is explicitly designed for file-centric behavior rather than dialogue, and its central principle is to avoid summary-first ingestion. Instead, it constructs memory directly from atomic actions and content deltas and defers abstraction to query time (Liu et al., 6 Apr 2026).
The architecture has three stages: per-trajectory encoding into Engrams, cross-engram consolidation into a three-channel MemoryStore, and query-adaptive retrieval. Each Engram contains a Procedural Unit, a Semantic Unit, and an Episodic Unit (Liu et al., 6 Apr 2026).
The Procedural Unit is a 17-dimensional fingerprint derived from more than 50 raw statistics. Its features span the six behavioral dimensions. Examples include search_ratio, browse_ratio, revisit_ratio, avg_output_length, files_created, total_output_chars, dirs_created, max_dir_depth, files_moved, total_edits, avg_lines_changed, small_edit_ratio, total_deletes, delete_to_create, structured_files, md_table_rows, and image_files. One reported feature is
The Semantic Unit stores file metadata, behavioral descriptors, and content embeddings. Created files and edit diffs are processed by a vision-LLM to obtain structural captions and short behavioral descriptors. Textual content is chunked into approximately 800-character segments and embedded using Cohere embed-english-v3.0, with up to 50 chunks per profile retained for storage efficiency (Liu et al., 6 Apr 2026).
The Episodic Unit models temporal segmentation and change. FileGramOS renders events into a compact textual representation, asks an LLM to propose 2–5 episode boundaries, and then summarizes each episode with a title, a short multi-sentence narrative, and a one-sentence summary (Liu et al., 6 Apr 2026).
Across trajectories, the Engram Consolidator writes to a MemoryStore with three channels. The Procedural channel stores normalized fingerprints together with mean, median, standard deviation, minimum, and maximum. The Semantic channel aggregates language distribution, filename patterns, file type proportions, and an LLM-generated cross-session semantic summary, and builds an embedding index for retrieval. The Episodic channel clusters episode summaries and attaches anomaly and drift analysis (Liu et al., 6 Apr 2026).
At query time, FileGramOS uses an LLM to identify which channels are relevant, constructs a Markdown context with up to 800 characters per key segment, and feeds this context to the QA backbone. This query-time abstraction policy is a central design choice: the system stores structured evidence and composes a narrative only when needed, rather than replacing raw evidence with ingest-time summaries (Liu et al., 6 Apr 2026).
5. Mathematical formulation and empirical behavior
FileGramOS formalizes episodic drift detection through z-normalized procedural features. For each trajectory and feature dimension ,
where is feature value for trajectory , and and are the mean and standard deviation across trajectories (Liu et al., 6 Apr 2026). The per-trajectory deviation is
0
and a session is flagged as anomalous if
1
Flagged sessions are then passed to an LLM “Anomaly Judge”:
2
This two-stage design separates statistical outlier detection from semantic interpretation (Liu et al., 6 Apr 2026).
The reported benchmark results position FileGramOS above the evaluated baselines. Overall average accuracy is 25.4 for No Context, 48.0 for Full Context, 51.9 for VisRAG, 49.9 for EverMemOS, 44.7 for MMA, and 59.6 for FileGramOS. By channel, FileGramOS reaches 60.1 on Procedural, 54.6 on Semantic, and 58.9 on Episodic aggregates (Liu et al., 6 Apr 2026).
The subtask breakdown reveals where the architecture helps and where the field remains limited. On Trace Disentanglement, FileGramOS reaches 80.9, narrowly above Full Context at 80.5 and substantially above EverMemOS at 62.2. On Anomaly Detection, EverMemOS records 71.4 while FileGramOS records 70.2, with much lower numbers for Mem0 and SimpleMem. On Shift Analysis, FileGramOS reaches 37.8 and EverMemOS 38.9, indicating that detecting an anomaly is easier than naming the changed dimension and its direction. On multimodal tasks, FileGramOS reaches 55.8 on File Grounding, compared with 45.3 for VisRAG and 44.5 for EverMemOS, but Visual Grounding on real-world videos remains difficult for all methods, with all methods at or below 8.5/100 and FileGramOS itself at 8.5 (Liu et al., 6 Apr 2026).
The analysis attached to these results is equally important. Full Context is unexpectedly strong on Trace Disentanglement because it preserves original ordering, but it is extremely token-inefficient, ingesting 625K tokens versus 109K for FileGramOS. Ablation studies show that removing the Procedural channel drops performance by approximately 11 points, the largest single effect. The paper also states that minimal, structured context beats very verbose context, and that query-time truncation matters more than longer ingest-time previews (Liu et al., 6 Apr 2026).
6. Privacy, realism, limitations, and misconceptions
FileGram uses synthetic traces generated by an LLM agent, specifically Claude Haiku 4.5, operating on curated workspaces; no real user logs are used (Liu et al., 6 Apr 2026). This choice is central to the framework’s privacy posture, because real file-system histories are highly sensitive and difficult to release. The paper nevertheless states that deployment would require local processing, fine-grained opt-in and opt-out per directory, and right-to-forget and related compliance mechanisms (Liu et al., 6 Apr 2026).
The framework’s realism claims are qualified rather than absolute. Its tasks and workspaces mirror white-collar workflows, profiles vary across roles, languages, organizational habits, and thoroughness levels, and human verifiers confirm that traces express intended personas. At the same time, all trajectories originate from one LLM family; drift is enforced as single-tier shifts in one dimension; and the task suite excludes code development, real-time multi-user collaboration, and system administration or operations tasks (Liu et al., 6 Apr 2026).
Several misconceptions are therefore explicitly ruled out by the data. FileGram is not a dialogue-memory benchmark with file attachments added afterward; its evidential core is behavioral trace plus content delta. It is not a claim that multimodality alone solves personalization; the reported numbers show that multimodal memory systems do not outperform strong text-centric baselines overall. Nor is it a claim that full summarization is sufficient; one of the paper’s recurring findings is that summary-first methods flatten discriminative procedural signals into generic descriptors such as “structured” or “methodical,” degrading performance on profile identification and related tasks (Liu et al., 6 Apr 2026).
The principal open challenges remain the sim-to-real gap, especially on screen recordings, and fine-grained drift attribution. This suggests that FileGram’s main contribution is not that it solves personalization in local file systems, but that it establishes an evaluation and architectural substrate in which these failures become measurable.
7. Broader uses of “FileGram” and adjacent file-centric research
The named FileGram framework in current arXiv literature is the personalization stack described above (Liu et al., 6 Apr 2026). At the same time, adjacent papers use “FileGram” or “FileGram-like” as a label for several distinct file-centric abstractions, which broadens the term’s surrounding research context.
In stylometry, Gram2Vec describes a document representation in which each dimension is a normalized relative frequency of a human-readable grammatical or lexical feature, and the accompanying discussion explicitly characterizes a “FileGram-style” system as an interpretable grammatical profile for search, clustering, and authorship analysis (Zeng et al., 2024). In decentralized storage, FileDAG is presented as a blueprint for building “FileGram” as a multi-version decentralized storage network with file-level deduplication, increment generation, and a two-layer DAG-based blockchain ledger for blockchain-native indexing (Guo et al., 2022). In high-performance transfer, the xDFS paper is used to motivate a modern FileGram-like service built around compact binary protocols, event-driven multiplexing, and an MTEDP concurrency model in which transfer scales linearly in sessions rather than streams (Poshtkohi et al., 2017).
Other neighboring usages push the label toward file-system observability and formal structure. FBench is described as a “file-system laboratory” and as a FileGram-style exploratory tool for HPC I/O behavior, using CFGs derived from Recorder traces to replay or vary access patterns under different MPI-IO and file-system settings (Zhu et al., 29 Jun 2026). Interval Parsing Grammars are proposed as a grammar mechanism for context-sensitive file-format specification, and their discussion frames a “FileGram” language as a declarative, grammar-based system for binary parsing with intervals, attributes, switch terms, and termination checking (Zhang et al., 2023). Infini-gram mini, finally, is presented as a blueprint for a FileGram-like internet-scale exact substring and n-gram search engine based on an FM-index whose practical index size is approximately 44% of corpus size, with a demonstrated use case in benchmark contamination analysis (Xu et al., 13 Jun 2025).
This broader literature suggests that “FileGram” functions not only as the title of a specific personalization framework but also as a recurring shorthand for file-centric systems built around structured traces, interpretable representations, or grammar-like abstractions. In the strict sense, however, the formally named framework is the file-system behavioral personalization stack consisting of FileGramEngine, FileGramBench, and FileGramOS (Liu et al., 6 Apr 2026).