---
title: `nexyron.model_compare`
url: https://nexyron.tech/docs/cypher/procedures/abstraction-platform/models/nexyron-model-compare
description: nexyron.model compare compare two registered native models on the same labeled abstraction dataset and threshold
---

# `nexyron.model_compare`

## Generic Description

`nexyron.model_compare` compare two registered native models on the same labeled abstraction dataset and threshold

```cypher
CALL nexyron.procedures()
YIELD name, description, parameters, output_columns
WHERE name = 'nexyron.model_compare'
RETURN name, description, parameters, output_columns
```

Semantic model procedures score, evaluate, compare, explain, materialize, and inspect registered models that are bound to named datasets or snapshots.

## Consumer-Level Explanation

This procedure belongs to the model and feature-serving runtime. Use it when you need feature resolution, scoring, explanation, evaluation, or model-quality analysis from already registered abstraction contracts.

### Parameters

-   `left_model`: Left model name Required.
-   `right_model`: Right model name Required.
-   `dataset`: Dataset name Required.
-   `learner`: Causal learner family such as t\_learner or x\_learner Optional.
-   `split`: Optional split label filter such as train, validation, or test Optional.
-   `threshold`: Optional decision threshold used for the compared classification metrics Optional.
-   `at`: Optional as-of timestamp in epoch milliseconds for bound dataset execution Optional.
-   `system_at`: Optional system-time cutoff in epoch milliseconds for dual-time replay Optional.
-   `prefer_materialized`: When true, reuse a matching materialized dataset before rebuilding it Optional.

### Output Columns

-   `left_model`
-   `right_model`
-   `dataset`
-   `split`
-   `threshold`
-   `left_accuracy`
-   `right_accuracy`
-   `left_precision`
-   `right_precision`
-   `left_recall`
-   `right_recall`
-   `left_f1`
-   `right_f1`
-   `left_roc_auc`
-   `right_roc_auc`
-   `left_avg_prediction`
-   `right_avg_prediction`
-   `left_model_version`
-   `right_model_version`
-   `source`

## Example Contract Prerequisite

The executable Cypher blocks on this page query `nexyron.procedures()` so they work in an empty database and stay synchronized with the live procedure registry. A direct `CALL nexyron.model_compare(...)` requires the named abstraction contracts, artifacts, features, snapshots, datasets, models, or policies referenced by that call to exist first; otherwise the runtime correctly fails with an unknown-contract error rather than inventing state.

## Conceptual Explanation

The important thing about `nexyron.model_compare` is that it stays inside the same Cypher and abstraction-contract runtime as the rest of Nexyron. That means it can compose with named abstractions, time-aware snapshot contracts, document-style payloads, graph-native identity, and later model or policy layers without forcing you to move into a separate tool first.

## More Detailed Explanation

In practical queries, start by deciding the row grain you want after the call: one row per node, one row per path, one row per registry object, one row per artifact, or one row per summary. Then keep that grain explicit with `YIELD` and named projections. That is the difference between a useful planner-facing example and a vague call that downstream tooling cannot safely compose. For contract-driven abstraction procedures, the executable examples on these pages intentionally inspect procedure metadata unless the required named artifacts are created in the same example.

## Advanced Example

```cypher
CALL nexyron.procedures()
YIELD name, parameters, output_columns
WHERE name = 'nexyron.model_compare'
RETURN name,
       [p IN parameters | p.name] AS parameter_names,
       output_columns
ORDER BY name
```

## Real Use Cases

-   Evaluate, compare, and operationalize retention-risk models directly against named abstraction datasets before moving a candidate model into campaign or service decisioning.
-   Score live member cohorts from the same feature contract used offline so risk review, calibration review, and production serving stay on one contract path.

## Real Limitations And Tradeoffs

-   This surface is contract-driven. If the registered feature, snapshot, dataset, model, or policy definition is weak, the procedure will faithfully execute that weak contract rather than silently repairing it.
-   Reported quality or causal metrics are only as defensible as the dataset, split, and temporal contract supplied underneath.
