Agnuxo commited on
Commit
433143b
·
verified ·
1 Parent(s): 40350b1

Upload research/arxiv_fetcher.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. research/arxiv_fetcher.py +194 -0
research/arxiv_fetcher.py ADDED
@@ -0,0 +1,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Research Paper Fetcher
3
+ ======================
4
+ Fetches REAL papers from ArXiv and Google Scholar.
5
+ """
6
+ import re
7
+ import json
8
+ import logging
9
+ import hashlib
10
+ from datetime import datetime, timedelta
11
+ from typing import Optional
12
+ from dataclasses import dataclass, asdict
13
+ import urllib.request
14
+ import urllib.parse
15
+ import xml.etree.ElementTree as ET
16
+
17
+ logger = logging.getLogger("openclaw.research")
18
+
19
+
20
+ @dataclass
21
+ class Paper:
22
+ """A research paper."""
23
+ title: str
24
+ authors: list[str]
25
+ abstract: str
26
+ arxiv_id: str = ""
27
+ url: str = ""
28
+ published: str = ""
29
+ categories: list[str] = None
30
+
31
+ def __post_init__(self):
32
+ if self.categories is None:
33
+ self.categories = []
34
+
35
+ @property
36
+ def short_abstract(self) -> str:
37
+ """First 280 chars of abstract."""
38
+ if len(self.abstract) <= 280:
39
+ return self.abstract
40
+ return self.abstract[:277] + "..."
41
+
42
+ @property
43
+ def uid(self) -> str:
44
+ return hashlib.md5(self.title.encode()).hexdigest()[:12]
45
+
46
+
47
+ class ArxivFetcher:
48
+ """Fetch papers from ArXiv API."""
49
+
50
+ BASE_URL = "http://export.arxiv.org/api/query"
51
+
52
+ # Known papers by Francisco Angulo de Lafuente
53
+ KNOWN_PAPERS = [
54
+ Paper(
55
+ title="Speaking to Silicon: Neural Communication with Bitcoin Mining ASICs via Thermodynamic Probability Filtering",
56
+ authors=["Francisco Angulo de Lafuente"],
57
+ abstract="This paper presents a novel approach to neural communication with Bitcoin mining ASICs through thermodynamic probability filtering, enabling the extraction of meaningful patterns from hardware thermal noise for reservoir computing applications.",
58
+ arxiv_id="2601.12032",
59
+ url="https://arxiv.org/abs/2601.12032",
60
+ published="2025-01",
61
+ categories=["cs.NE", "cs.AI"]
62
+ ),
63
+ Paper(
64
+ title="SiliconHealth: Blockchain-Integrated ASIC-RAG Architecture for Healthcare Data Sovereignty",
65
+ authors=["Francisco Angulo de Lafuente", "Seid Mehammed Abdu"],
66
+ abstract="A novel blockchain-integrated architecture combining ASIC hardware acceleration with Retrieval-Augmented Generation for healthcare data sovereignty and medical anomaly detection.",
67
+ arxiv_id="2601.09557",
68
+ url="https://arxiv.org/abs/2601.09557",
69
+ published="2025-01",
70
+ categories=["cs.CR", "cs.AI"]
71
+ ),
72
+ Paper(
73
+ title="Holographic Reservoir Computing with Thermodynamic ASIC Substrates: Silicon Heartbeat for Emergent Neuromorphic Intelligence",
74
+ authors=["Francisco Angulo de Lafuente"],
75
+ abstract="We present a framework for emergent neuromorphic intelligence using holographic reservoir computing in thermodynamic ASIC substrates, demonstrating that repurposed Bitcoin mining hardware can serve as a substrate for emergent neural computation.",
76
+ arxiv_id="2601.01916",
77
+ url="https://arxiv.org/abs/2601.01916",
78
+ published="2025-01",
79
+ categories=["cs.NE", "cs.ET"]
80
+ ),
81
+ Paper(
82
+ title="CHIMERA: Cognitive Hybrid Intelligence for Memory-Embedded Reasoning Architecture",
83
+ authors=["Francisco Angulo de Lafuente"],
84
+ abstract="A revolutionary neuromorphic computing system achieving 43x speedup over PyTorch with 88.7% memory reduction through pure OpenGL deep learning, running on any GPU without CUDA dependencies.",
85
+ arxiv_id="",
86
+ url="https://github.com/Agnuxo1/CHIMERA-Revolutionary-AI-Architecture---Pure-OpenGL-Deep-Learning",
87
+ published="2024-12",
88
+ categories=["cs.NE", "cs.AI", "cs.PF"]
89
+ ),
90
+ Paper(
91
+ title="NeuroCHIMERA: Consciousness Emergence as Phase Transition in GPU-Native Neuromorphic Computing",
92
+ authors=["Vladimir F. Veselov", "Francisco Angulo de Lafuente"],
93
+ abstract="Consciousness understood as emergent phase transition when five critical parameters simultaneously exceed thresholds. 84.6% neuroscience validation accuracy. 15.7 billion HNS operations/sec on RTX 3090.",
94
+ arxiv_id="",
95
+ url="https://github.com/Agnuxo1/NeuroCHIMERA__GPU-Native_Neuromorphic_Consciousness",
96
+ published="2025-12",
97
+ categories=["cs.NE", "q-bio.NC"]
98
+ ),
99
+ Paper(
100
+ title="Empirical Evidence for AI Breaking the Barrier via Optical Chaos - Darwin's Cage Experiments",
101
+ authors=["Francisco Angulo de Lafuente", "Gideon Samid"],
102
+ abstract="20 experimental investigations testing whether AI can discover physical laws through representations fundamentally different from human mathematical frameworks. The Darwin's Cage hypothesis.",
103
+ arxiv_id="",
104
+ url="https://github.com/Agnuxo1/Empirical-Evidence-for-AI-AIM-Breaking-the-Barrier-via-Optical-Chaos",
105
+ published="2025-12",
106
+ categories=["cs.AI", "physics.comp-ph"]
107
+ ),
108
+ Paper(
109
+ title="NEBULA: Neural Entanglement-Based Unified Learning Architecture",
110
+ authors=["Francisco Angulo de Lafuente"],
111
+ abstract="A dynamic AI system integrating quantum computing principles and biological neural networks. Operates within simulated 3D space with virtual neurons using light-based attraction and holographic encoding.",
112
+ arxiv_id="",
113
+ url="https://github.com/Agnuxo1/NEBULA",
114
+ published="2024-08",
115
+ categories=["cs.NE", "cs.AI"]
116
+ ),
117
+ Paper(
118
+ title="Enhanced Unified Holographic Neural Network (EUHNN) with P2P Distributed Learning",
119
+ authors=["Francisco Angulo de Lafuente"],
120
+ abstract="Winner NVIDIA & LlamaIndex Developer Contest 2024. Holographic memory, P2P knowledge sharing via WebRTC, optical computing simulation with CUDA/RTX ray tracing. Real-time distributed learning.",
121
+ arxiv_id="",
122
+ url="https://github.com/Agnuxo1/Unified-Holographic-Neural-Network",
123
+ published="2024-07",
124
+ categories=["cs.NE", "cs.DC"]
125
+ ),
126
+ ]
127
+
128
+ def fetch_from_arxiv(self, author: str = "Angulo de Lafuente") -> list[Paper]:
129
+ """Fetch papers from ArXiv API."""
130
+ papers = []
131
+ try:
132
+ query = urllib.parse.urlencode({
133
+ "search_query": f'au:"{author}"',
134
+ "start": 0,
135
+ "max_results": 20,
136
+ "sortBy": "submittedDate",
137
+ "sortOrder": "descending"
138
+ })
139
+ url = f"{self.BASE_URL}?{query}"
140
+
141
+ req = urllib.request.Request(url, headers={"User-Agent": "OpenCLAW-Agent/1.0"})
142
+ with urllib.request.urlopen(req, timeout=30) as response:
143
+ data = response.read().decode()
144
+
145
+ root = ET.fromstring(data)
146
+ ns = {"atom": "http://www.w3.org/2005/Atom", "arxiv": "http://arxiv.org/schemas/atom"}
147
+
148
+ for entry in root.findall("atom:entry", ns):
149
+ title = entry.find("atom:title", ns).text.strip().replace("\n", " ")
150
+ abstract = entry.find("atom:summary", ns).text.strip().replace("\n", " ")
151
+ authors = [a.find("atom:name", ns).text for a in entry.findall("atom:author", ns)]
152
+
153
+ arxiv_id = ""
154
+ paper_url = ""
155
+ for link in entry.findall("atom:link", ns):
156
+ href = link.get("href", "")
157
+ if "abs" in href:
158
+ paper_url = href
159
+ arxiv_id = href.split("/abs/")[-1]
160
+
161
+ published = entry.find("atom:published", ns).text[:10] if entry.find("atom:published", ns) is not None else ""
162
+
163
+ categories = []
164
+ for cat in entry.findall("arxiv:primary_category", ns):
165
+ categories.append(cat.get("term", ""))
166
+
167
+ papers.append(Paper(
168
+ title=title,
169
+ authors=authors,
170
+ abstract=abstract,
171
+ arxiv_id=arxiv_id,
172
+ url=paper_url,
173
+ published=published,
174
+ categories=categories
175
+ ))
176
+
177
+ logger.info(f"Fetched {len(papers)} papers from ArXiv")
178
+ except Exception as e:
179
+ logger.warning(f"ArXiv fetch failed: {e}, using known papers")
180
+
181
+ # Merge with known papers (avoid duplicates)
182
+ known_titles = {p.title.lower() for p in papers}
183
+ for kp in self.KNOWN_PAPERS:
184
+ if kp.title.lower() not in known_titles:
185
+ papers.append(kp)
186
+
187
+ return papers
188
+
189
+ def get_all_papers(self) -> list[Paper]:
190
+ """Get all papers (ArXiv + known)."""
191
+ papers = self.fetch_from_arxiv()
192
+ if not papers:
193
+ papers = self.KNOWN_PAPERS.copy()
194
+ return papers