NLP · Reasoning · Domain-Specific Intelligence
Moncif El-mouden
NLP Researcher · PhD Candidate · Co-founder of HyperSec
Second-year PhD in NLP, pushing domain-specific intelligence in economics and law: constrained decoding for large-scale structured extraction, domain ontologies and knowledge graphs, and post-training methods like RLVR and RLAIF for better reasoning. Co-founder of HyperSec, where I lead platform development and research on agentic offensive security. Based in Paris.
Research
exploring the boundaries of domain-specific intelligence
Structured output extraction at scale
PhD year 1 · publication in preparation
My first year went into constrained decoding on domain-specific knowledge where economics meets law. The goal was not a demo but a pipeline: force a model's output into a schema the domain actually accepts, verify it, and run it over a large corpus until you have a dataset instead of a pile of text. The public database and the publication are on their way.
Domain ontologies & graph knowledge representation
Ongoing
Extraction is only half the problem — the records have to mean something together. I build domain-specific ontologies and model the extracted data as graphs, which is where patterns across actors, sectors and decisions start to show. In practice this is where GraphRAG beats a classical retrieval pipeline on specialised knowledge, which is what I presented at AI Tinkerers using Neo4j.
Pushing reasoning in domain-specific models
PhD year 2 · active experiments
I like NLP and I want to know how far reasoning can be pushed when the domain is narrow and the compute is not generous. Recently that has meant post-training: RLVR with programmatically verifiable rewards, and RLAIF with an AI judge grounded in verified references, both applied to economics and mathematics. Apertus Nash and Légitus are the two experiments behind that, with every recipe and reward rule published.
Agentic harnesses for offensive security
Co-founder · HyperSec
At HyperSec I lead the platform development and the research on the agentic harness: separate agents for reconnaissance, payload and scenario construction, and pentest planning, stitched into a system that attacks a live application and has to show its work. A finding ships only with the proof we pulled it off, which keeps the whole thing honest.
A different way to build, with agents as teammates
Pre-alpha · open source
LatticeDB started from a frustration: today's systems do not let large teams coordinate effectively — not developers, and not the people doing business intelligence next to them. It is an open-source Rust database that keeps one permissioned history of a team's work items, docs, specs, designs and deployments, with AI agents working inside the same permissions as everyone else. Built evidence-first: a deterministic simulator replays crashes and disk faults, and planted bugs prove the checks can fail.
In Practice
Structured Extraction & Knowledge Graphs
Constrained decoding turns legal and economic corpora into typed records; a domain ontology turns those records into a graph where patterns are queryable.
[RECON]
Recon agent mapped the app. 3 candidate surfaces.
[BUILD]
Scenario built, payload crafted for /api/search...
[EXPLOIT]
Exploit reproduced, with proof. CVSS 9.1
Agentic Offensive Security
The research behind HyperSec: agentic harnesses for reconnaissance, payload and scenario construction, and pentest planning — reporting only what they actually exploited.
Post-Training & Reasoning
RLVR and RLAIF on domain-specific intelligence — verifiable rewards, AI judges and GRPO, teaching a model to think less when it can and more when it must.
from enum import Enum
from datetime import date
from pydantic import BaseModel, Field
import outlines
class Outcome(str, Enum):
SANCTION = "sanction"
COMMITMENT = "commitment"
DISMISSAL = "dismissal"
NO_GROUNDS = "no_grounds"
class Practice(str, Enum):
CARTEL = "cartel"
ABUSE_OF_DOMINANCE = "abuse_of_dominance"
VERTICAL_RESTRAINT = "vertical_restraint"
MERGER_BREACH = "merger_breach"
class Undertaking(BaseModel):
name: str
role: str # addressee, complainant, third party
fine_eur: int | None = None # null when the decision imposes none
leniency: bool = False
class Decision(BaseModel):
"""One row of the database. Every field is graded against the source."""
case_id: str = Field(pattern=r"^\d{2}-[A-Z]-\d{2}$")
decided_on: date
sector_nace: str
practices: list[Practice]
outcome: Outcome
undertakings: list[Undertaking]
legal_basis: list[str] # e.g. ["L420-1", "TFUE 101"]
# The grammar is compiled from the schema: the model samples only tokens that
# keep the output a valid Decision. No retries, no JSON repair, no silent drift.
model = outlines.from_transformers(
"swiss-ai/Apertus-8B-Instruct-2509", device="cuda"
)
extract = outlines.Generator(model, Decision)
def extract_decision(full_text: str) -> Decision:
return extract(
"Extract the decision record. Leave a field null rather than guessing.\n\n"
f"{full_text[:24000]}"
)
# 1 decision is a demo; 10,000 decisions with the same guarantees is a dataset.
for path in corpus.iter_decisions():
record = extract_decision(path.read_text())
store.upsert(record) # typed, so it lands straight in SQLOpen source & models
the experiments, published
Code, datasets and weights are public wherever the licences allow it — including the parts that did not work.
Apertus Nash 8B
Apertus-8B fine-tuned for mathematics, statistics and economics: three SFT stages, then GRPO with an AI judge grounded in code-verified references. Trained on a single DGX Spark, with the reward served as a live, hot-reloadable service so the rubric could be fixed mid-run.
Légitus
A French legal assistant built on Apertus: continued pretraining on the LEGI corpus, SFT on 27k synthetic Q&A pairs covering grounded citation, abstention and tool use, then a weight merge back into the instruct model. Built for the Assemblée nationale AI hackathon; dataset and weights are public.
LatticeDB
An open-source Rust database keeping one permissioned history of a team's work items, docs, specs, designs and deployments — with agents as permission-bound teammates. MVCC, a checksummed WAL, CRDTs, PostgreSQL wire protocol, and a deterministic simulator that replays crashes and disk faults across millions of seeds.
Memory-LoRA
A hypernetwork that writes a repository-specific LoRA adapter for Gemma-4-E2B in one forward pass — no fine-tuning, no RAG, and zero repo tokens at inference. On repositories absent from the training corpus the adapter cut cross-entropy by 5.31 nats and won 9 of 9 benchmark combinations.
Gemma Miner
An autonomous agent that turns a one-sentence goal into a typed, research-grade dataset: it crawls the source, designs a 20–60 variable codebook, extracts every row under strict type discipline, self-verifies with a second pass, then exports Parquet, CSV and a codebook. Published on PyPI.
medannot
Medical entity annotation for French clinical documents — PDF, DOCX, TXT and Markdown in, typed entities out with exact offsets, page numbers and confidence scores. Runs fully locally on GLiNER2 over mDeBERTa-v3, with no network call once the model is cached.
Ramanujan-Swarm
An agentic system searching for novel mathematical identities between fundamental constants: a swarm of explorer, mutator and hybrid agents under a LangGraph map-reduce loop, with a genetic gene pool and mpmath verification at 1500 decimal places scoring candidates on elegance.
Orbit Studio
Built during the TRAIL research camp at UNIL, where our project tested whether Kolmogorov-Arnold Networks could recover something a physicist would recognise as a law from raw orbital trajectories. Orbit Studio extends the open-source Satvis globe with a custom force-model propagator — J2, drag, third-body gravity and solar radiation pressure.
RLVR on mathematics
A LoRA over Apertus-8B-v1.5 trained with reinforcement learning from verifiable rewards — the reward comes from programmatically checking the answer, not from a preference model, which is the cleanest signal available when the domain can be graded exactly.
A line of legal & economic models
Two years of adapting open bases to law and economics before the Apertus work: TinyLlama and Mistral-7B on French legal text, a Mistral competition-law model and its instruct variant, Salamandra-7B on legal economics, a Qwen3-4B legal model, and a cybersecurity QLoRA. Each one narrowed what domain adaptation actually buys you.
Open datasets
Extraction pipelines are only credible if the output is public: every CNIL sanction since 2011 as a typed table, a quarter-century of AI clinical trials, and the 27k-pair French legal instruction set behind Légitus — all on the Hub with their codebooks.
GeoAlpha
Fidelity-first geospatial super-resolution from SPOT 1.5 m imagery to a 30 cm/px product, deliberately refusing to claim the 10 cm the input cannot support. Every training pair carries a provenance manifest with checksums, measured alignment and a usability flag — detail has to be evidence, not a prior.
Focus Areas
Structured Output Extraction
Constrained decoding pipelines that turn unstructured legal and economic corpora into typed, verifiable records at scale — the backbone of my first PhD year.
Learn more >Ontologies & Knowledge Graphs
Domain-specific ontologies that model extracted data as graphs, so patterns across decisions, actors, and sectors become queryable rather than buried in text.
Learn more >Post-Training for Reasoning
RLVR and RLAIF experiments on domain intelligence: verifiable rewards, AI judges, and GRPO to make models reason better — and shorter — on economics and mathematics.
Learn more >Agentic Offensive Security
At HyperSec: agentic harnesses for reconnaissance, payload and scenario construction, and pentest planning — agents that prove an exploit instead of flagging a suspicion.
Learn more >AI × Competition Law
Statistical and agentic analysis of French competition authority decisions, with a public database and a publication on the way.
Learn more >Agent-Native Infrastructure
LatticeDB: an open-source Rust database exploring how large teams — and the agents working alongside them — can coordinate on one permissioned history.
Learn more >At a Glance
Year of PhD in NLP — economics × law
Open models & 4 datasets on Hugging Face
Years of Java engineering at Amundi
Experience & Education
HyperSec
Co-Founder · Oct 2025 – Present
Co-founder, leading platform development and the research on our agentic harness: agents for reconnaissance, payload and scenario construction, and pentest planning. They attack a live application and report only what they actually exploited, with the proof and the fix. Started as terminal experiments with two friends, became a proof of concept at the {Tech: Europe} hackathon, then a month at STATION F, and is now live.
PhD Research
NLP · Economics × Law · UPEC / EPISEN
PhD in NLP on domain-specific intelligence where economics meets law. Year one built a large-scale extraction pipeline with constrained decoding, plus domain ontologies and graph knowledge representation to find patterns in the result; the public database and the publication follow. Year two is about pushing reasoning further with post-training — RLVR and RLAIF on domain-specific intelligence.
Amundi Technology
Software Engineer · Java · Jun 2023 – Sep 2025
Java engineer on the ALTO platform, contributing to one of its core modules — large-scale asset-management systems, data pipelines and platform infrastructure at one of Europe's largest asset managers. Joined as an intern, continued as an apprentice, then full time.
Amundi Technology
AI Projects · Agents for Engineering Support
In the same team, I moved into AI: Merlin, an agent on top of Amundi's AI platform with access to over three million lines of compiled documentation, to accelerate support and surface insights; then Morgan, a more knowledgeable agent answering support questions across several teams and projects. On my last day, a manager read me a farewell speech generated by Merlin.
UPEC — IAG4UPEC
Educational AI Platform
Building an AI-powered educational platform at UPEC under the IAG4UPEC project — a generative AI proof of concept presented in 2024, fully self-hosted on the university's own servers, from the application to the model. RAG-based course assistants and AI tutoring, built on an open model for the same reason I pick open models elsewhere: you can audit them.
Competition Authority Project
Ongoing Research · Extraction & Knowledge Graphs
Framework for analysing decisions of the French Competition Authority (Autorité de la concurrence), with Pierre and Arnold. Structured extraction over the decision corpus, a domain ontology on top, and a graph that makes sanction patterns across sectors and actors queryable instead of anecdotal.
Selected highlights
Talks & writing
2026
Hack Apertus — fine-tuned Apertus Nash and published the full RLAIF recipe
Swiss AI · online
2026
First AI hackathon of the Assemblée nationale — built Légitus, a French legal model
Assemblée nationale, Paris
2025
Domain-specific knowledge representation in graphs, and where GraphRAG beats classical RAG
AI Tinkerers meetup, Paris
2025
Benchmarking 7 models on structured XSS challenges for LLM-driven web pentesting
HyperSec blog
Awards & hackathons
2025
3rd place — Agent Honeypots, prompt-injection detection for LangChain and LangGraph agents
Pioneers Hackathon, STATION F · 260 builders
2025
1st place — an agent that reads Oura health data over MCP and coaches you through the day
AI Tinkerers × Anthropic, Paris
2025
Top 6 — the pentest agent that became HyperSec, and a month at STATION F with it
{Tech: Europe} Hackathon
2025
The first Apple Health MCP server, with a multi-agent deep-research layer on top
AgentHack · Hugging Face, Anthropic & Unaite
2024
1st in the Koyeb challenge — a self-hosted Qwen2.5 on vLLM behind a private document RAG
AI Hack Night, STATION F
2024
An M&A advisory tool with EU merger-regulation checks and a company knowledge graph
LLM × Law Hackathon · Stanford CodeX
Research camps & certifications
2026
TRAIL Research Camp — orbital trajectory propagation with Kolmogorov-Arnold Networks
Université de Lausanne · two weeks, ten projects
2026
ML Summer School — ML fundamentals through agents, RL, world models and evaluation
Cohere Labs
2026
DeepLearning.AI
2026
Inaugural Economic Data Science Society Conference — ML, NLP and alternative data in economics
Banque de France
2025 – 2026
AI Usage & Regulation workshops — AI across computer science, law, economics and public policy
HEC Lausanne & UPEC
Latest Articles
The Reward Is a Service: What RLAIF Taught Me About Grading Reasoning
Training Apertus Nash on a single DGX Spark, the reward model lived in its own container and re-read its rubric on every request — because RL exploits whatever the reward forgets to punish, and that only shows up mid-run.
A Model That Writes Its Own Adapter — and the Bug That Almost Hid It
Memory-LoRA generates a repository-specific LoRA for Gemma-4-E2B in one forward pass. For weeks it looked like it worked. It was worse than no adapter at all, and the training loss never said so.
Teaching a Model to Say 'I Don't Know' in French Law
Légitus in four stages: continued pretraining on the LEGI corpus, 27k synthetic instructions built around citation and abstention, assistant-only SFT, and a weight merge that traded self-identification for clean stopping.
Interested in domain-specific reasoning?
I write up the research as it happens — structured extraction, knowledge graphs, post-training experiments, agentic systems, and the parts that did not work. Always happy to talk about any of it.