Concentration Cube — a Self-Evolving Focus Agent on Qwen Cloud

Track 1: MemoryAgent · Live demo on Alibaba Cloud ECS: http://47.84.139.15:8200 · Repository

Inspiration

Every parent and teacher asks the same question: is this student actually focusing, or just sitting at the desk? A camera can answer it — but nobody wants a camera streaming a child's face to somebody's cloud. And once you measure focus with an algorithm, a second question appears that almost nobody asks: who tunes the algorithm, and how do you know a tune made it better?

Our vantage point on this question is unusual. Concentration Cube's founder chairs the Medical Committee of the Korean Olympic Committee — an internationally recognized orthopedic surgeon who has treated and operated on most of Korea's elite athletes. At that level, every body is extraordinary; what separates a medal from fourth place isn't hours of training, it's the quality of focus. Watching that one scarce resource decide careers, year after year, made the question unavoidable: if focus is this decisive, why does nobody measure it properly?

What it does

Concentration Cube measures a student's Sustained Focus Index (SFI, 0–100) from a desk-side camera device — without ever storing or transmitting raw video. On-device CV emits only ~12,000–24,000 numeric records per session at 10 Hz (gaze, blink, PERCLOS, pupil z-scores). The cloud sees numbers, never faces.

On top sits our core innovation: a self-evolution engine that evolves the interpretation method itself — how gaze dispersion, saccades, blinks, and pupil dynamics map onto focus / blank-stare / off-task. qwen3.7-max reads the mistake log and proposes which interpretation parameters to change. Every proposal is verified (see the firewall below), proven on held-out sessions, and adopted only by a human click. Meanwhile qwen3.7-plus writes trilingual (ko/en/zh) coaching reports for students and parents from a numeric summary containing no personal data.

The instructed-session protocol — where ground truth comes from

Every labeled session is a supervised experiment, not an opinion. A subject sits at the cube while an investigator instructs in real time — "Focus." (actually read), "Blank-stare." (keep looking at the book, stop reading), "Look away." (leave the task entirely) — and logs each command on the console at the moment it is spoken. The 10 Hz eye/pupil stream is thereby synchronized with ground truth to the second; the labeling method is literally called realtime_instructed in the API, and the evolution console ships a built-in instructed-session mode.

Our team runs this protocol as an IRB-approved validation program at a general hospital, daily — confronting the ethics of measuring children's attention head-on. Every day of instructed ground truth becomes fresh evidence for the next generation. (The public repo and cloud demo use a synthetic seeding tool in place of clinical data.)

Why this is a MemoryAgent

The agent's memory is not a chat log. It is a versioned lineage of validated interpretation parameters, together with the evidence that justified each generation — the mistake log that motivated it, the server-recomputed before/after metrics, the gate verdict, the adoption decision, any rollback.

And it demonstrably works. In our measured generation, Qwen's stated reasoning included:

"…a value distinct from the previously rejected 0.06 / 0.062, to distribute holdout overfitting risk."

An earlier generation had proposed 0.06 and been rejected. That outcome was in the lineage, the lineage was in the evidence, and the model used it — deliberately avoiding a recorded failure. Nothing in the prompt tells it to consult past rejections. The agent's history changed what it proposed next. That is experience accumulating as evidence.

The hallucination firewall (the safety layer)

The LLM is never trusted for a number — it is trusted only for the judgment call of which interpretation parameters to move. The server re-runs the simulation itself, and any claimed metric off by more than 0.5 percentage points kills the proposal. Survivors face a train/holdout gate measured on sessions the proposal never influenced. Survivors of that wait for a human to click Adopt — and every adopted set can be rolled back.

A measured generation (on the live cloud deployment)

Elapsed COLLECT → PASSED: about 2 minutes, with the Qwen proposal taking ~50 seconds.

Holdout state Sensitivity Specificity
blank_stare 0.125 → 1.000 1.000 → 1.000
focus 1.000 → 1.000 improved
off_task 1.000 → 1.000 1.000 → 1.000

Zero regressions; validator recorded stage: 4, warnings: [].

The two-server design

Concentration Cube is deliberately two servers. The operations server IS the product; the evolution server exists only to grow it — it owns the mistake logs, the lineage, the Qwen proposer, and the gates. Nothing reaches production except a fully gated parameter set a human adopts.

How we built it — an Alibaba-native ecosystem

The cube is sourced for manufacturing through Accio (Alibaba's AI sourcing platform) with Alibaba-ecosystem PCBA suppliers; the backend runs on Alibaba Cloud ECS (Singapore); the intelligence is Qwen on Model Studio via the OpenAI-compatible endpoint. Splitting roles across models (qwen3.7-max proposer / qwen3.7-plus coach) also splits the per-model free-quota pools — role separation and cost control turned out to be the same decision.

Proof of Alibaba Cloud usage — the actual HTTP calls: qwen_api.py (evolution proposer) and llm_report.py (coach). Deployment bundle: deploy/alibaba/.

Built during the submission period

The project started on June 12, 2026 — inside the submission window — so everything in the repository was built during it. The final week added the pieces this hackathon is about: (1) the QwenApiAdapter that moved the evolution engine's brain onto the Qwen API — proposals previously came from local CLI coding agents requiring interactive OAuth, which could never run on a server; the API adapter is what made the engine cloud-deployable for the first time; (2) the trilingual qwen3.7-plus coaching layer; (3) unification of the entire LLM stack on Qwen Cloud; (4) the first cloud deployment, onto Alibaba Cloud ECS, with a reproducible deploy + verification bundle — and a full self-evolution generation measured end-to-end on that live deployment.

Challenges

Letting an LLM touch a number that gets shown to a parent about their child forced the central design decision: make the model's trustworthiness irrelevant. The model chooses; deterministic server code measures; a holdout gate checks generalization; a human owns adoption.

Accomplishments / test status

Operations server 81 tests passing, evolution server 75 tests passing; full generation measured end-to-end on the live ECS deployment; every claim in this description is reproducible from the repository.

What's next — why this gets stronger every single day

Focus doesn't look the same at 8 as it does at 15 or 40. The eye-tracking and pupil signatures of focus / blank-stare / off-task vary enormously across people — and systematically with age. The companion app already collects each user's birth year. As the fleet grows, the interpretation becomes age-stratified: parameter sets per 5-year age band, each band with its own lineage, evolved against its own cohort's instructed ground truth and gated on its own holdout. That requires data at the tens-of-thousands-of-users scale — which is exactly the point.

Concentration Cube is a device that gets smarter the longer it exists — it is at its least capable the day you buy it. Accumulated data compounds into accumulated interpretation quality. The heart of that compounding is the evolution server — and the engine driving it is Qwen on Qwen Cloud.

Nearer term: manufacturing the NIR cube through the Accio/PCBA path, expanding the hospital validation program, and multi-subject calibration.

Built With

Share this project:

Updates