{
  "title": "Markdown Decision Process: A Framework for Probabilistic Document Analysis and Optimization",
  "version": "0.1",
  "doi": "10.5281/zenodo.17244386",
  "doi_url": "https://doi.org/10.5281/zenodo.17244386",
  "zenodo_record": "https://zenodo.org/records/17244386",
  "record_id": "17244387",
  "publication_date": "2025-10-02",
  "resource_type": {
    "title": "Publication",
    "type": "publication"
  },
  "creators": [
    {
      "name": "Friedman, Daniel",
      "affiliation": "Active Inference Institute",
      "orcid": "0000-0001-6232-9096"
    }
  ],
  "description": "The Markdown Decision Process (MDP) framework revolutionizes document processing by treating Markdown documents as stochastic decision processes, enabling intelligent analysis, generation, and optimization through rigorous probabilistic modeling. This comprehensive framework bridges decision theory with practical document engineering, providing tools that learn from existing content to generate coherent documents and optimize structure according to user-defined quality criteria. At its core, MDP models Markdown elements as states in a stochastic process where transitions follow learned probabilistic patterns. Drawing from Markov Decision Process (MDP) and Partially Observable Markov Decision Process (POMDP) theory, the framework explicitly addresses the fundamental uncertainty in interpreting syntactic structure as semantic meaning, a challenge that has limited traditional document processing approaches. The framework operates at multiple complementary levels of analysis, following David Marr's influential framework: (1) Computational theory defines document processing as maximizing expected quality under uncertainty; (2) Algorithmic implementation employs Markov chains, graph algorithms, and reinforcement learning; and (3) Physical realization uses efficient Python implementations suitable for production deployment. Key innovations include: (1) MarkChain, sophisticated Markov chain models for document generation with higher-order dependencies and smoothing; (2) PolicyOptimizer, reinforcement learning techniques for document optimization that maximize user-specified reward functions; (3) BeliefUpdater, a probabilistic inference system handling semantic ambiguity through Bayesian belief maintenance; (4) Visualization Framework, comprehensive tools for exploring document state spaces and transition dynamics; and (5) Plugin Architecture, an extensible system enabling domain-specific customizations. Unlike black-box neural approaches, MDP provides interpretable, theoretically-grounded document processing with explicit uncertainty quantification. The framework supports both traditional reward-based optimization and Active Inference approaches, enabling uncertainty-aware decision making, domain-specific customization without extensive retraining, and resource-efficient operation suitable for production environments. All methods, tests, documentation, and resources to regenerate this paper are available at https://github.com/docxology/markdown_decision_process .",
  "keywords": [],
  "files": [
    {
      "name": "MarkdownDecisionProcess_DAF_10-02-2025.pdf",
      "size_bytes": 796266,
      "checksum": "md5:9900a2f463a4079d6aa6edff377aacb7",
      "download_url": "https://zenodo.org/api/records/17244387/files/MarkdownDecisionProcess_DAF_10-02-2025.pdf/content"
    }
  ],
  "related_resources": [],
  "github_repo": "",
  "source": "zenodo-only",
  "checked_at": "2026-06-30T23:25:52Z",
  "domain": "Computational",
  "type": "Paper",
  "methods": [
    {
      "name": "Markdown elements modeled as states in a stochastic decision process",
      "description": "Treats Markdown documents as stochastic processes drawing on MDP/POMDP theory, with transitions between elements following learned probabilistic patterns.",
      "evidence": "At its core, MDP models Markdown elements as states in a stochastic process where transitions follow learned probabilistic patterns."
    },
    {
      "name": "MarkChain, PolicyOptimizer and BeliefUpdater components",
      "description": "Higher-order Markov chains for generation, reinforcement-learning policy optimization against user reward functions, and Bayesian belief updating over semantic interpretations.",
      "evidence": "Policy-Based Document Optimization: The first comprehensive application of reinforce- ment learning to document improvement, learning optimal transformation policies that max- imize user-defined reward functions"
    },
    {
      "name": "Evaluation corpora: technical docs, arXiv papers, blogs, mixed",
      "description": "Reports four evaluation corpora, e.g. 500 technical documents from 25 open-source projects and 200 arXiv CS papers converted to Markdown.",
      "evidence": "Source: 500 technical documents from 25 popular open-source projects (React, TensorFlow, Kubernetes, Django, etc.)"
    },
    {
      "name": "Comparisons against n-gram, GPT-2, BERT and rule-based baselines",
      "description": "Compares MarkChain orders 1–3 against n-gram and GPT-2 baselines for structure learning, and BeliefUpdater against rule-based and BERT classifiers.",
      "evidence": "Methodology: - Train MarkChain models on each corpus with varying orders (1-3) - Generate 100 documents of average length (~800 words) per model - Compare structural similarity between generated and training documents"
    },
    {
      "name": "Manually annotated 200-document semantic classification test",
      "description": "BeliefUpdater accuracy and calibration (ECE) assessed on 200 manually annotated documents with an 80/20 train/test split.",
      "evidence": "Methodology: - Manually annotate 200 documents with semantic labels for sections - Train belief models on 80% of data, test on 20% - Measure classification accuracy and calibration"
    }
  ],
  "key_findings": [
    "The paper reports higher structural similarity for MarkChain than baselines, with higher-order chains performing better at the cost of longer generation time.",
    "BeliefUpdater is reported as more calibrated than rule-based approaches but slightly less accurate than a BERT classifier.",
    "Reported scalability is approximately linear in document size, with policy optimization the most computationally costly operation.",
    "In one controlled example, optimization reduced average paragraph length from 16.0 to 14.4 words and the list-to-paragraph ratio from 1.0 to 0.2.",
    "The paper lists threats to validity, including corpus bias, hyperparameter sensitivity and limited domain diversity in evaluation corpora."
  ],
  "related_papers": [
    "2023_NSFReporting",
    "2023_NaturalAIBased",
    "2025_AuBI"
  ],
  "key_findings_evidence": [
    "The MDP framework demonstrates superior structural coherence compared to baselines, with higher-order models achieving better performance at the cost of increased generation time.",
    "The BeliefUpdater achieves competitive accuracy with superior calibration compared to rule- based approaches, though slightly behind neural methods in raw accuracy.",
    "Performance scales approximately linearly with document size for most operations, with policy optimization showing the highest computational cost.",
    "optimization reduced average paragraph length from 16.0 to 14.4 words while maintaining information content, and improved the list-to-paragraph ratio from 1.0 to 0.2",
    "Limited domain diversity in evaluation corpora"
  ],
  "summary_provenance": {
    "source": "full_text.md",
    "date": "2026-10-01",
    "work_kind": "software/methods",
    "method": "Evidence-grounded extraction from full_text.md: every method and finding carries a verbatim quote from the paper text, mechanically verified to occur in full_text.md (whitespace/ligature-normalized) before merge.",
    "notes": "Reviewer caution: the evaluation section gives results tables but little procedural detail (several results defer to a 'Code Supplement'; the Experiment 3 results table is absent from the extracted text), and the baseline list names 'GPT-2 Medium' while the Experiment 1 table reports 'GPT-2 Small'. A 25-participant user study and blanket 'all improvements significant (p < 0.05)' claim appear without design details; findings above are stated as reported by the paper. README 'Key Findings' contains a garbled placeholder ('Analysis of Dr...') not supported by the text, and README DOI 10.5281/zenodo.17244386 differs from the PDF's 10.5281/zenodo.17244387 (likely concept vs version).",
    "reviewed": "2026-10-01 independent review of every item against its quote and context; no corrections needed"
  },
  "abstract": "The Markdown Decision Process (MDP) framework treats Markdown documents as stochastic decision processes, enabling intelligent analysis, generation, and optimization through probabilistic modeling. Drawing from Markov Decision Process and POMDP theory, the framework operates at Marr's three levels: computational, algorithmic, and implementational. Key innovations include MarkChain for document generation, PolicyOptimizer for reinforcement learning optimization, and BeliefUpdater for probabilisti",
  "abstract_provenance": {
    "source": "papers/paper_metadata.json",
    "date": "2026-10-01",
    "basis": "Retained source-grounded summary"
  },
  "source_revision_review": {
    "reviewed_at": "2026-11-05",
    "repository": "docxology/markdown_decision_process",
    "commit": "45d00ebf8278d75c60f75190dd999fd180314695",
    "document": "paper/EVALUATION_EVIDENCE.md",
    "summary": "The active manuscript removes unsupported calibration, comparison, optimality and participant-study claims. Direct assembly requires its evaluation-evidence appendix, and prospective evaluation has explicit acceptance criteria. Native conversion, model-state loading and CI contracts have regression tests. Historical model checkpoints, datasets and participant/statistical observations remain unrecovered."
  },
  "source_revision_history": [
    {
      "reviewed_at": "2026-10-19",
      "repository": "docxology/markdown_decision_process",
      "commit": "7c21c57c34ac78998a94d6a1379803e380ff8505",
      "document": "paper/EVALUATION_EVIDENCE.md",
      "summary": "The corrected active manuscript withdraws unsupported numerical, model-comparison and participant-study claims. Its evaluation is prospective. Historical checkpoints, datasets and study observations have not been recovered."
    }
  ]
}
