In recent years, the distinction between human-written and AI-generated text has become increasingly perceptible due to advancements in AI content detection systems. This paper explores a novel approach to humanizing AI-generated text using pre-trained language models in an offline environment. We present a modular pipeline built on the Mistral-7B model that progressively transforms machine-generated content into natural, human-like text through linguistic rephrasing, disfluencies, emotional tone shifts, and informal patterns. The system is implemented across six evolving applications, each designed to reduce the detectability of AI-generated content. Our methodology focuses on integrating semantic awareness and personalized stylistic elements such as contractions, filler words, and side-comments — mimicking how people naturally communicate. Unlike traditional API-based systems, our model runs entirely offline, ensuring data privacy, customization, and scalability. This framework offers a practical tool for enhancing the relatability and authenticity of AI-generated text in educational, creative, and professional contexts. It also contributes to ongoing conversations about machine authorship, text realism, and the ethical boundaries of content transformation.
Introduction
Large language models (LLMs) like GPT and Mistral 7B produce fluent, coherent AI-generated text but often lack human-like nuances such as emotional subtlety, disfluencies, and varied sentence structure. This makes AI content detectable by specialized tools, raising concerns about blending AI text seamlessly in academic, creative, and professional contexts.
Problem Statement
Current AI outputs are easily flagged by detectors, and existing solutions either compromise privacy (using APIs) or only make superficial edits. There is a need for an offline, privacy-preserving system that transforms AI-generated text into natural, human-like content while preserving meaning and lowering AI detection rates.
Literature Survey
LLMs like GPT-3 and BERT have advanced natural language generation, but AI-detection tools (e.g., GPTZero) are improving. Techniques like paraphrasing, prompt engineering, and adversarial tuning can reduce detectability. This work builds on those by using Mistral 7B with iterative paraphrasing and style changes to achieve better undetectability while keeping semantic fidelity.
Methodology
Developed a fully offline humanization pipeline using the lightweight Mistral 7B model running locally with llama.cpp.
The pipeline applies synonym substitution, human tone transformation (disfluencies, contractions, casual phrasing), and creative prompt rewriting.
Semantic similarity between original and transformed texts is measured with sentence embeddings to ensure meaning is preserved.
Six iterative app versions (app.py to app6.py) progressively refined these techniques to reduce AI detectability.
Experimental Setup
Used Streamlit as UI, Mistral 7B for generation, and Sentence Transformers for semantic similarity.
Evaluated detectability via AI content detectors and human judgments.
Ran completely offline on modest hardware (16GB RAM MacBook Pro).
Results
AI detectability dropped from 100% (raw AI) to less than 10% (final version).
Semantic similarity remained high (0.93 to 0.85), maintaining original meaning.
Each app iteration added more human-like features (tone shifts, disfluencies, emotional hooks) to reduce detectability.
Insights & Limitations
Layered humanization effectively masks AI signals while preserving content intent.
Mistral 7B performs well locally, enabling privacy-sensitive applications.
Current AI detectors can be circumvented by sophisticated text transformations.
Limitations include subjective human-likeness evaluation, potential loss of domain precision, hardware demands, and reliance on manual heuristic rules.
Conclusion
This study presents a comprehensive pipeline for \"humanizing\" AI-generated text, demonstrating a progressive, structured approach from app.py through app6.py. By leveraging Mistral 7B Instruct, deployed locally using .gguf format, and refining textual output with semantic preservation and stylistic enhancements, we significantly reduced AI detectability while maintaining high semantic similarity. The results show a compelling decline in AI detection rates—from 100% in the raw outputs to under 10% in the most humanized version. These findings underscore the effectiveness of incremental humanization techniques, such as syntactic variation, emotional tonality, and informal restructuring.
Additionally, the approach supports privacy-focused applications by running inference offline, a critical factor in secure environments like research, defense, or journalism. Our work provides a proof-of-concept for combining large language models, semantic tracking, and stylistic reengineering to approach near-human outputs—challenging the boundaries of current AI detectors and raising new ethical questions around AI transparency and authorship.
References
[1] T. Brown et al., \"Language Models Are Few-Shot Learners,\" Advances in Neural Information Processing Systems, vol. 33, pp. 1877–1901, 2020.
[2] J. Devlin, M. W. Chang, K. Lee, and K. Toutanova, \"BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding,\" arXiv preprint, arXiv:1810.04805, 2018.
[3] I. Solaiman et al., \"Release Strategies and the Social Impacts of Language Models,\" arXiv preprint, arXiv:1908.09203, 2019.
[4] A. M. Turing, \"Computing Machinery and Intelligence,\" Mind, vol. 59, no. 236, pp. 433–460, 1950.
[5] S. Kreps, R. M. McCain, and M. Brundage, \"All the News That’s Fit to Fabricate: AI-Generated Text as a Tool of Media Misinformation,\" Political Communication, vol. 39, no. 1, pp. 111–133, 2022.
[6] Y. Zhang et al., \"OPT: Open Pre-trained Transformer Language Models,\" arXiv preprint, arXiv:2205.01068, 2022.
[7] D. Roitman, T. Cohen, and B. Shapira, \"Human or AI? A Survey on Text Authorship Detection,\" Information Processing & Management, vol. 61, 2024.
[8] T. Gao, A. Fisch, and D. Chen, \"SimCSE: Simple Contrastive Learning of Sentence Embeddings,\" Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing (EMNLP), pp. 6894–6910, 2021.
[9] Hugging Face, \"Mistral 7B Instruct,\" [Online]. Available: https://huggingface.co/mistralai/Mistral-7B-Instruct-v0.1
[10] T. Gehrmann, H. Strobelt, and A. M. Rush, \"GLTR: Statistical Detection and Visualization of Generated Text,\" Proceedings of the 57th Annual Meeting of the Association for Computational Linguistics: System Demonstrations, pp. 111–116, 2019.
[11] Y. Li, R. Li, X. Zhang, and Z. Liu, \"HumanEval Benchmarks for AI-Written Text: Challenges and Future Directions,\" arXiv preprint, arXiv:2305.15235, 2023.
[12] H. Uchendu, J. Zhu, and J. Lee, \"Authorship Attribution for Neural Text Generation,\" Findings of the Association for Computational Linguistics: EMNLP, pp. 72–83, 2020.
[13] B. Wang et al., \"Robust Machine-Generated Text Detection Through Watermarking,\" NeurIPS Workshop on Robustness in Sequence Modeling, 2022.
[14] M. Phung and D. Tran, \"Human-Likeness Metrics in LLM Outputs: A Survey and Benchmarking Study,\" ACM Transactions on Information Systems (TOIS), vol. 42, no. 2, pp. 1–29, 2024.