EditLens: AI Text & Graph Edit Framework
- The paper introduces a dual-purpose framework where AI text edits are quantified using regression over similarity metrics, achieving high F1 scores.
- It employs an interactive orthogonal edge-routing system for incremental graph edits, utilizing A* search, R-tree indexing, and local nudging for stability.
- Both approaches integrate fast heuristics and incremental data structures, although challenges remain with adversarial text edits and graph routing memory overhead.
The EditLens framework encompasses two major contributions: (1) quantitative detection of AI editing in textual documents using regression over similarity metrics, and (2) an interactive orthogonal edge-routing system for incremental graph editing. Both instances are characterized by their architectural integration of fast heuristics, incremental data structures, and rigorous measurement of editing operations, though they are applied in distinct domains (text versus graphs).
1. Problem Formulations in EditLens Frameworks
The EditLens textual framework operates in the homogeneous mixed-authorship regime, where a human-authored source is modified by an AI system into , possibly through multiple passes. The central objective is not per-token attribution, but rather predicting a scalar as a continuous measure of the magnitude of AI editing in relative to [(Thai et al., 3 Oct 2025), Sec. 2]. During training, parallel pairs are assumed; at inference, only is available.
By contrast, the graph-based EditLens is concerned with incremental editing operations—insertions, updates, and deletions of nodes and edges—in an existing orthogonal graph layout. Here, user intent is mediated via a “lens,” which suggests edits without disturbing the global structure unless necessary (Gladisch et al., 2016).
2. Methodological Foundations
Textual Edit Quantification
EditLens quantifies AI editing using monotonic transformations of similarity metrics , setting . Four classes of similarity metrics are employed for intermediate supervision [(Thai et al., 3 Oct 2025), Sec. 3]:
- Normalized Levenshtein distance:
- Jaccard distance over unique token sets:
0
- Cosine distance over sentence embeddings:
1
where 2 are generated by a pre-trained encoder (LINQ-Embed-Mistral).
- Soft n-gram overlap (embedding-based ROUGE precision).
These metrics function as supervision signals for regression, correlating well with human-perceived AI-edit intensity (Krippendorff's 3) [(Thai et al., 3 Oct 2025), Sec. 3.3].
Graph Edit Routing
The graph EditLens formalizes the problem as: given fixed nodes 4 with disjoint geometry and connector points 5, find orthogonal polylines 6 for new or updated edges 7 that minimize a cost:
8
subject to obstacle constraints [(Gladisch et al., 2016), Sec. 2.1].
Key data structures:
- R-tree for bounding-box spatial indexing over nodes
- Orthogonal Visibility Graph (OVG) where nodes are connector points and edges exist if orthogonal connections avoid node interiors
A* search with Manhattan heuristics over the OVG produces candidate routes, followed by local “nudging” to resolve geometric overlaps [(Gladisch et al., 2016), Sec. 2.3].
3. System Architectures
Textual EditLens
The model backbone is a pre-trained, open LLM such as Mistral-Small 24B or Llama-3.x, subject to parameter adaptation by QLoRA over linear projections in all MLP and self-attention blocks. The final representation 9 from the classification token or pooled sequence output is layer-normalized and mapped to a regression output 0. No activation is used between normalization and output projection. Loss functions are mean squared error for regression and cross-entropy for 1-way classification, with continuous outputs reconstructed via weighted bucket averages [(Thai et al., 3 Oct 2025), Sec. 3.4 & App].
Training utilizes approximately 2 3 triplets spanning six domains (e.g., Amazon reviews, XSum, Reddit, Enron mails), a broad set of LLMs for generating synthetic edits, and 303 human and model-composed editing prompts. Optimization is performed via AdamW at 4 learning rate with batch size 24 on 85A100 GPUs, targeting adapters and output heads [(Thai et al., 3 Oct 2025), Sec. 3.1–3.4].
Graph EditLens
Subsystems:
- Placement Suggester: Proposes candidate node locations by heuristics (e.g., edge length, crossing minimization)
- Orthogonal Router: Constructs and incrementally updates OVG, computes shortest orthogonal paths by A*
- Layout Stabilizer: Ensures local edits do not propagate alterations to unaffected layout regions
Edit operations—insert, update, and delete—are decomposed into parallelizable substeps ensuring sub-6 ms response times even for 7 node graphs [(Gladisch et al., 2016), Sec. 1].
4. Quantitative Performance and Evaluation
EditLens for Text
Performance across tasks:
- Binary regression-to-classification (“any AI” vs “fully human”): 8 (soft n-grams), exceeding Pangram (9)
- Binary (AI vs rest): 0 (cosine)
- Ternary (human vs AI-edited vs AI-generated): macro-1 (cosine), compared to GPTZero’s 2
- Out-of-domain generalization: 3 remains robust, dropping from 4 to 5 on unseen LLMs, 6 on out-of-domain data [(Thai et al., 3 Oct 2025), Sec. 4].
Correlation with APT-Eval and other editing metrics (Pearson 7 with Levenshtein 8, Jaccard 9) outperforms binary detectors (0).
EditLens for Graphs
The orthogonal router achieves:
- Insertion of one node plus two edges in 1 ms for 2 to 3 nodes (constant latency)
- Quality: edge polyline length and bend count competitive with Wybrow et al.; route stability at 4
- In contrast, Wybrow et al. display runtime increases from 5 ms (N=50) to 6 s (N=600) [(Gladisch et al., 2016), Sec. 4].
5. Applications and Limitations
Textual EditLens
Applications:
- Authorship attribution: Provides a continuous, non-binary measure resilient to scenarios of mild AI assistance
- Educational contexts: Distinguishes grammatical refinement from substantive rewriting by AI
- Policy compliance: Enables enforcement of AI-editing budgets [(Thai et al., 3 Oct 2025), Sec. 6]
Limitations:
- Single-pass, single-model AI edits; does not handle layered human–AI workflows
- No chunk- or token-level granularity
- Vulnerable to adversarial paraphrase attacks [(Thai et al., 3 Oct 2025), Sec. 6]
This suggests that real-world deployment for fine-grained or adversarial settings may require substantial extensions.
Graph EditLens
Applications:
- Interactive graph editing for large node-link diagrams where rapid, stable, and orthogonally routed edits are critical
Limitations:
- Quadratic OVG memory footprint in 7; random nudging is not always overlap-free
- Not yet incorporating recent ultra-fast routing approaches that could further lower runtime constants [(Gladisch et al., 2016), Sec. 4]
6. Case Study and Empirical Validation
A large-scale analysis on real-world AI edits via the Grammarly interface confirmed alignment between EditLens scalar outputs and intuitive prompt severity. For nine default prompts (“Fix any mistakes,” “Summarize this,” “Make it more detailed,” etc.), median edit magnitudes ranged from 8 (minor fixes) to 9–0 (summarization, major detail changes), and both soft n-gram and cosine-based models yielded identical qualitative rankings across prompts [(Thai et al., 3 Oct 2025), Sec. 4.7].
Annotators' judgments further validated that similarity-based 1 scores approximate human perception of AI edit intensity, supporting the suitability of the chosen similarity metrics for supervision.
7. Future Directions
EditLens research identifies several promising extensions:
- Handling multi-pass, heterogeneous human–AI editing workflows
- Region-level edit quantification (subspan 2)
- Incorporation of richer linguistic/discourse features
- Robustness to adversarial paraphrasing, watermark removal, and prompt-engineering strategies [(Thai et al., 3 Oct 2025), Sec. 6]
- In the graph domain, OVG compression and deterministic local nudging are anticipated to improve scalability and robustness [(Gladisch et al., 2016), Sec. 4].
A plausible implication is that both textual and graph-based EditLens frameworks are adaptable to broader classes of mixed-origin, incrementally edited artifacts provided appropriate data structures and task-specific supervision metrics are developed.