--- title: Graph-PrefLexOR Scientific Reasoning emoji: 🧠 colorFrom: gray colorTo: blue sdk: gradio sdk_version: 6.19.0 app_file: app.py short_description: Graph-native LLM scientific reasoning with graph viz python_version: "3.12" startup_duration_timeout: 1h --- # Graph-PrefLexOR: Graph-Native Reinforcement Learning for Scientific Hypothesis Generation This Space demonstrates **[lamm-mit/Graph-Preflexor-8b_12292025](https://huggingface.co/lamm-mit/Graph-Preflexor-8b_12292025)** — a Qwen3-8B model fine-tuned with graph-native reinforcement learning (ORPO + Graph-GRPO) to produce structured, traceable scientific reasoning. ## How it works The model reasons through scientific questions using explicit structured blocks: 1. **``** — divergent exploration of hypotheses and mechanisms 2. **``** — verbal sketch of the conceptual graph 3. **``** — machine-readable knowledge graph (nodes + edges) 4. **``** — abstract motifs and design rules 5. **``** — coherent narrative assembled from the graph The Space parses the `` block and renders it as an interactive **Mermaid diagram** alongside the chat. ## Paper [Graph-Native Reinforcement Learning Enables Traceable Scientific Hypothesis Generation through Conceptual Recombination](https://huggingface.co/papers/2607.00924) — [GitHub](https://github.com/lamm-mit/graph-preflexor-grpo) ## Tips - Ask materials science, biology, or interdisciplinary scientific questions for best results. - The graph panel updates after generation completes. - Adjust temperature and max tokens in the Advanced settings.