Block 3A. Primary pairwise quantum-like metrics

Interpreted results for H1, H2, and H3 with classical, frequency/dimensionality, and quantum-like benchmarks

Author

Alejandro Martínez-Mingo

Published

July 3, 2026

1 Analytical scope

This notebook evaluates the primary pairwise computational results for three behavioral targets:

  1. H1 ipsative asymmetry, defined as directional forced-choice asymmetry.
  2. H2 forced-choice salience, defined as directional salience selection.
  3. H3 scalar similarity, defined as order-averaged Likert similarity.

The analytical aim is to determine whether quantum-like pairwise metrics provide explanatory leverage beyond the classical and prominence-based baselines established in Block 2. The notebook therefore compares three families of predictors: symmetric vector baselines, directional frequency/dimensionality contrasts, and quantum-like metrics derived from subspaces, projectors, operator/density representations, and sequential QSM states.

The key distinction is methodological as much as theoretical. Symmetric vector measures are appropriate baselines for scalar similarity, whereas directional effects require either a directional scalar contrast or a genuinely relational asymmetric metric. Consequently, the analyses below separate scalar similarity from directional salience-asymmetry phenomena rather than collapsing them into a single generic notion of semantic relatedness.

2 Packages, paths, and helpers

Code
required_packages <- c(
  "tidyverse", "vroom", "broom", "knitr", "scales", "stringr", "forcats", "fs"
)

missing_packages <- required_packages[!vapply(required_packages, requireNamespace, logical(1), quietly = TRUE)]
if (length(missing_packages) > 0) {
  if (isTRUE(params$install_missing)) {
    install.packages(missing_packages)
  } else {
    stop(
      "Missing packages: ", paste(missing_packages, collapse = ", "),
      "\nInstall them or render with -P install_missing:true."
    )
  }
}

library(tidyverse)
library(vroom)
library(broom)
library(knitr)
library(scales)
library(stringr)
library(forcats)
library(fs)

knitr::opts_chunk$set(
  fig.width = 12,
  fig.height = 7,
  dpi = 150,
  out.width = "100%"
)
Code
or_empty <- function(x) {
  if (is.null(x) || length(x) == 0) return(character())
  x <- unlist(x, use.names = FALSE)
  x <- x[!is.na(x) & nzchar(x)]
  x
}

clean_paths <- function(paths) {
  paths <- unlist(paths, use.names = FALSE)
  paths <- paths[!is.na(paths) & nzchar(paths)]
  unique(paths)
}

first_existing <- function(paths, type = c("file", "dir"), required = TRUE, label = "path") {
  type <- match.arg(type)
  paths <- clean_paths(paths)
  exists_fun <- if (type == "file") file.exists else dir.exists
  hit <- paths[exists_fun(paths)]
  if (length(hit) > 0) return(normalizePath(hit[[1]], mustWork = TRUE))
  if (required) {
    stop(
      "Could not find ", label, ". Tried:\n",
      paste(paths, collapse = "\n"),
      "\n\nCheck folder names or pass the explicit path with a Quarto parameter."
    )
  }
  NA_character_
}

find_parent_by_file <- function(roots, filename, max_depth = 8) {
  roots <- clean_paths(roots)
  roots <- roots[dir.exists(roots)]
  if (length(roots) == 0) return(character())
  hits <- character()
  pattern <- paste0("^", gsub("\\.", "\\\\.", filename), "$")
  for (r in roots) {
    files <- list.files(r, pattern = pattern, recursive = TRUE, full.names = TRUE)
    if (length(files) > 0) {
      root_norm <- normalizePath(r, mustWork = FALSE)
      file_norm <- normalizePath(files, mustWork = FALSE)
      rel <- sub(paste0("^", root_norm, "/?"), "", file_norm)
      depth <- stringr::str_count(rel, .Platform$file.sep)
      hits <- c(hits, dirname(files[depth <= max_depth]))
    }
  }
  unique(hits)
}

read_csv_fast <- function(path, required = TRUE) {
  if (is.na(path) || !file.exists(path)) {
    if (required) stop("File not found: ", path)
    return(tibble())
  }
  if (file.info(path)$size <= 1) return(tibble())
  vroom::vroom(path, delim = ",", show_col_types = FALSE, progress = FALSE)
}

read_optional <- function(path) read_csv_fast(path, required = FALSE)

show_table <- function(data, caption = NULL, digits = 3, ...) {
  print(knitr::kable(data, caption = caption, digits = digits, ...))
}

show_plot <- function(plot) {
  print(plot)
}

write_table <- function(data, filename) {
  readr::write_csv(data, file.path(output_dir, "tables", filename))
}

save_plot <- function(plot, filename, width = 10, height = 6) {
  ggplot2::ggsave(
    filename = file.path(output_dir, "figures", filename),
    plot = plot,
    width = width,
    height = height,
    dpi = 300
  )
}

slug <- function(x) {
  x <- as.character(x)
  x <- iconv(x, from = "", to = "ASCII//TRANSLIT")
  x <- stringr::str_to_lower(x)
  x <- stringr::str_replace_all(x, "[^a-z0-9]+", "_")
  x <- stringr::str_replace_all(x, "^_+|_+$", "")
  x
}

make_unordered_pair <- function(a, b) {
  a <- as.character(a)
  b <- as.character(b)
  ifelse(a <= b, paste(a, b, sep = "__"), paste(b, a, sep = "__"))
}

safe_cor <- function(data, x, y, method = "spearman") {
  if (!x %in% names(data) || !y %in% names(data)) {
    return(tibble(n = 0L, estimate = NA_real_, p.value = NA_real_, method = method))
  }
  d <- data %>% filter(!is.na(.data[[x]]), !is.na(.data[[y]]))
  if (nrow(d) < 3 || sd(d[[x]], na.rm = TRUE) == 0 || sd(d[[y]], na.rm = TRUE) == 0) {
    return(tibble(n = nrow(d), estimate = NA_real_, p.value = NA_real_, method = method))
  }
  test <- suppressWarnings(cor.test(d[[x]], d[[y]], method = method, exact = FALSE))
  tibble(n = nrow(d), estimate = unname(test$estimate), p.value = test$p.value, method = method)
}

cor_by_group <- function(data, group_cols, x = "metric_value", y = "human_value", method = "spearman") {
  present_group_cols <- intersect(group_cols, names(data))
  missing_group_cols <- setdiff(group_cols, names(data))

  out <- data %>% filter(!is.na(.data[[x]]), !is.na(.data[[y]]))

  if (length(present_group_cols) > 0) {
    out <- out %>%
      group_by(across(all_of(present_group_cols))) %>%
      group_modify(~ safe_cor(.x, x = x, y = y, method = method)) %>%
      ungroup()
  } else {
    out <- safe_cor(out, x = x, y = y, method = method)
  }

  if (length(missing_group_cols) > 0) {
    for (cc in missing_group_cols) out[[cc]] <- NA_character_
  }

  out %>%
    mutate(
      p_fdr = p.adjust(p.value, method = "BH"),
      abs_estimate = abs(estimate)
    ) %>%
    arrange(desc(abs_estimate), p.value)
}

cor_table <- function(data, predictors, outcome, method = "spearman") {
  predictors <- predictors[!is.na(predictors) & nzchar(predictors)]
  if (length(predictors) == 0) {
    return(tibble(
      predictor = character(), outcome = character(), n = integer(),
      estimate = double(), p.value = double(), method = character(),
      p_fdr = double(), abs_estimate = double()
    ))
  }
  purrr::map_dfr(predictors, function(pred) {
    safe_cor(data, pred, outcome, method = method) %>%
      mutate(predictor = pred, outcome = outcome, .before = 1)
  }) %>%
    mutate(p_fdr = p.adjust(p.value, method = "BH"), abs_estimate = abs(estimate)) %>%
    arrange(desc(abs_estimate), p.value)
}

is_asymmetry_metric <- function(metric_name) {
  str_detect(metric_name, regex("asymmetry|a_minus_b|a_to_b_minus_b_to_a", ignore_case = TRUE))
}

is_distance_metric <- function(metric_name) {
  str_detect(metric_name, regex("distance|bures|angle|geodesic|frobenius|commutator", ignore_case = TRUE))
}

metric_family_from_source <- function(metric_source) {
  case_when(
    metric_source == "classical_baselines" ~ "Classical vector baseline",
    metric_source == "pairwise_subspace_metrics" ~ "Subspace/projector geometry",
    metric_source == "pairwise_operator_density_metrics" ~ "Operator/density geometry",
    metric_source == "pairwise_qsm_state_metrics" ~ "Sequential QSM",
    TRUE ~ metric_source
  )
}

metric_short_label <- function(metric_name) {
  case_when(
    str_detect(metric_name, "containment_asymmetry") ~ "Containment asymmetry",
    str_detect(metric_name, "qsm_neutral_asymmetry") ~ "Neutral QSM asymmetry",
    str_detect(metric_name, "qsm_asymmetry") ~ "QSM state asymmetry",
    str_detect(metric_name, "qsm_p_b_given_a") ~ "QSM p(B|A)",
    str_detect(metric_name, "qsm_p_a_given_b") ~ "QSM p(A|B)",
    str_detect(metric_name, "density_fidelity") ~ "Density fidelity",
    str_detect(metric_name, "density_bures") ~ "Bures distance, reversed",
    str_detect(metric_name, "cosine_hilbert_schmidt") ~ "Hilbert-Schmidt cosine",
    str_detect(metric_name, "symmetric_projector_overlap") ~ "Projector overlap",
    str_detect(metric_name, "symmetric_trace_normalized_overlap") ~ "Trace-normalized overlap",
    str_detect(metric_name, "projector_chordal") ~ "Chordal distance, reversed",
    str_detect(metric_name, "mean_cosine_sq") ~ "Mean cos² principal angles",
    str_detect(metric_name, "mean_cosine") ~ "Mean principal cosine",
    str_detect(metric_name, "classical_.*lsa_term.*cosine") ~ "LSA term cosine",
    str_detect(metric_name, "classical_.*contour_centroid.*cosine") ~ "Contour-centroid cosine",
    str_detect(metric_name, "classical_.*angular_distance") ~ "Angular distance, reversed",
    str_detect(metric_name, "classical_.*euclidean_distance") ~ "Euclidean distance, reversed",
    TRUE ~ str_replace_all(metric_name, "_", " ")
  )
}

variant_short <- function(x) {
  x <- coalesce(as.character(x), "")
  x <- str_replace_all(x, "clust-", "")
  x <- str_replace_all(x, "__g-", " | g=")
  x <- str_replace_all(x, "__l-", " | l=")
  x
}

similarity_orient_value <- function(metric_name, value) {
  ifelse(is_distance_metric(metric_name), -as.numeric(value), as.numeric(value))
}

orient_asymmetry_to_human_order <- function(metric_name, value, direction_sign) {
  ifelse(is_asymmetry_metric(metric_name) & !is.na(direction_sign), as.numeric(value) * direction_sign, as.numeric(value))
}

z_score <- function(x) as.numeric(scale(x))

fit_lm_summary <- function(data, outcome, predictors, model_label) {
  predictors <- predictors[predictors %in% names(data)]
  needed <- c(outcome, predictors)
  d <- data %>% select(any_of(needed)) %>% drop_na()

  if (length(predictors) == 0 || nrow(d) < length(predictors) + 3) {
    return(tibble(
      model = model_label,
      n = nrow(d),
      r.squared = NA_real_,
      adj.r.squared = NA_real_,
      AIC = NA_real_,
      BIC = NA_real_,
      p.value = NA_real_,
      df = NA_real_,
      df.residual = NA_real_,
      status = "not enough complete observations or predictors"
    ))
  }

  constant_predictors <- predictors[vapply(predictors, function(pp) {
    stats::sd(d[[pp]], na.rm = TRUE) == 0 || is.na(stats::sd(d[[pp]], na.rm = TRUE))
  }, logical(1))]
  predictors <- setdiff(predictors, constant_predictors)

  if (length(predictors) == 0 || nrow(d) < length(predictors) + 3) {
    return(tibble(
      model = model_label,
      n = nrow(d),
      r.squared = NA_real_,
      adj.r.squared = NA_real_,
      AIC = NA_real_,
      BIC = NA_real_,
      p.value = NA_real_,
      df = NA_real_,
      df.residual = NA_real_,
      status = "all candidate predictors were constant after filtering"
    ))
  }

  for (pp in predictors) d[[pp]] <- z_score(d[[pp]])

  tryCatch({
    model_fit <- stats::lm(stats::reformulate(predictors, response = outcome), data = d)
    n_model <- stats::nobs(model_fit)

    broom::glance(model_fit) %>%
      mutate(
        model = model_label,
        n = n_model,
        predictors = paste(predictors, collapse = " + "),
        status = "ok",
        .before = 1
      ) %>%
      select(model, n, predictors, r.squared, adj.r.squared, AIC, BIC, p.value, df, df.residual, status, everything())
  }, error = function(e) {
    tibble(
      model = model_label,
      n = nrow(d),
      predictors = paste(predictors, collapse = " + "),
      r.squared = NA_real_,
      adj.r.squared = NA_real_,
      AIC = NA_real_,
      BIC = NA_real_,
      p.value = NA_real_,
      df = NA_real_,
      df.residual = NA_real_,
      status = paste("model failed:", e$message)
    )
  })
}

plot_ranked_correlations <- function(rank_df, title, subtitle = NULL, n = 12, filename = NULL) {
  d <- rank_df %>%
    filter(!is.na(estimate)) %>%
    slice_head(n = n) %>%
    mutate(
      metric_display = str_wrap(metric_short_label(metric_name), 30),
      family_display = str_wrap(metric_family_from_source(metric_source), 24),
      label = paste0(metric_display, "\n", family_display),
      label = fct_reorder(label, abs_estimate),
      significant = if_else(!is.na(p_fdr) & p_fdr < .05, "FDR < .05", "FDR >= .05"),
      rho_label = sprintf("%.2f", estimate),
      label_x = if_else(estimate >= 0, pmax(estimate - .045, .045), pmin(estimate + .045, -.045)),
      label_hjust = if_else(estimate >= 0, 1, 0)
    )

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No valid correlations available."))
  }

  p <- ggplot(d, aes(x = estimate, y = label, fill = significant)) +
    geom_vline(xintercept = 0, linewidth = .35, colour = "grey55") +
    geom_col(width = .68, alpha = .94) +
    geom_text(
      aes(x = label_x, label = rho_label, hjust = label_hjust),
      size = 3.2,
      fontface = "bold",
      colour = "white"
    ) +
    scale_x_continuous(
      limits = c(-1.05, 1.05),
      breaks = seq(-1, 1, .25),
      labels = scales::number_format(accuracy = .01),
      expand = expansion(mult = c(.01, .01))
    ) +
    scale_fill_manual(values = c("FDR < .05" = "#2F5D8C", "FDR >= .05" = "#B8B8B8"), drop = FALSE) +
    labs(title = title, subtitle = subtitle, x = "Spearman correlation with human effect", y = NULL) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_blank(),
      axis.text.y = element_text(size = 8.7, lineheight = .92),
      legend.position = "bottom"
    )

  if (!is.null(filename)) save_plot(p, filename, width = 11.5, height = max(5.4, .50 * min(n, nrow(d)) + 2.0))
  p
}
plot_benchmark_triage <- function(cross_df, filename = NULL) {
  d <- cross_df %>%
    filter(!is.na(estimate)) %>%
    mutate(
      hypothesis_short = factor(hypothesis_short, levels = c("H1", "H2", "H3")),
      benchmark_clean = benchmark,
      benchmark_label = paste0(str_wrap(benchmark_clean, 28), "\n", str_wrap(metric_short_label(metric_name), 30)),
      benchmark_label = fct_reorder(benchmark_label, abs_estimate),
      rho_label = sprintf("rho = %.2f", estimate),
      label_x = pmax(abs_estimate - .035, .08)
    )

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = "Cross-hypothesis benchmark triage", subtitle = "No valid benchmark correlations available."))
  }

  p <- ggplot(d, aes(x = abs_estimate, y = benchmark_label, fill = benchmark_clean)) +
    geom_col(width = .64, alpha = .95) +
    geom_text(aes(x = label_x, label = rho_label), hjust = 1, size = 3.15, fontface = "bold", colour = "white") +
    facet_wrap(~ hypothesis_short, ncol = 1, scales = "free_y") +
    scale_x_continuous(
      limits = c(0, 1.03),
      breaks = seq(0, 1, .25),
      labels = scales::number_format(accuracy = .01),
      expand = expansion(mult = c(.01, .02))
    ) +
    scale_fill_manual(values = benchmark_palette, drop = FALSE) +
    labs(
      title = "Benchmark triage across H1, H2, and H3",
      subtitle = "Bars show absolute association strength; labels retain the signed Spearman coefficient.",
      x = "Absolute Spearman correlation with human effect",
      y = NULL
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_blank(),
      legend.position = "none",
      axis.text.y = element_text(size = 8.8, lineheight = .92),
      strip.text = element_text(face = "bold", size = 12)
    )

  if (!is.null(filename)) save_plot(p, filename, width = 10.8, height = 8.2)
  p
}
best_by_family <- function(rank_df) {
  rank_df %>%
    mutate(metric_family = metric_family_from_source(metric_source)) %>%
    group_by(metric_family) %>%
    slice_max(order_by = abs_estimate, n = 1, with_ties = FALSE) %>%
    ungroup() %>%
    arrange(desc(abs_estimate))
}

theme_block3a_pub <- function(base_size = 11) {
  ggplot2::theme_minimal(base_size = base_size) +
    theme(
      panel.grid.minor = element_blank(),
      panel.grid.major.y = element_blank(),
      panel.grid.major.x = element_line(linewidth = .25, colour = "grey86"),
      axis.title = element_text(face = "bold"),
      axis.text = element_text(colour = "grey20"),
      plot.title = element_text(face = "bold", size = base_size + 4, margin = margin(b = 5)),
      plot.subtitle = element_text(size = base_size + 1, colour = "grey30", margin = margin(b = 8)),
      plot.caption = element_text(size = base_size - 2, colour = "grey35", hjust = 0),
      legend.position = "bottom",
      legend.title = element_blank(),
      strip.text = element_text(face = "bold", size = base_size + 1),
      plot.margin = margin(8, 18, 8, 8)
    )
}

benchmark_palette <- c(
  "Best quantum-like directional metric" = "#2F5D8C",
  "Best quantum-like metric" = "#2F5D8C",
  "Best frequency/dimensionality difference" = "#B35C2E",
  "Best classical cosine" = "#6B6B6B",
  "Contour-centroid cosine" = "#4F7F52",
  "LSA term cosine" = "#8A6FB0"
)

plot_benchmark_strength <- function(benchmark_df, title, subtitle = NULL, filename = NULL) {
  d <- benchmark_df %>%
    filter(!is.na(abs_estimate)) %>%
    mutate(
      benchmark_clean = benchmark,
      axis_label = paste0(str_wrap(benchmark_clean, 30), "\n", str_wrap(metric_short, 34)),
      axis_label = fct_reorder(axis_label, abs_estimate),
      signed_label = sprintf("rho = %.2f", estimate),
      label_x = pmax(abs_estimate - .035, .08)
    )

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No benchmark data available."))
  }

  p <- ggplot(d, aes(x = abs_estimate, y = axis_label, fill = benchmark_clean)) +
    geom_col(width = .62, alpha = .95) +
    geom_text(aes(x = label_x, label = signed_label), hjust = 1, size = 3.25, fontface = "bold", colour = "white") +
    scale_x_continuous(
      limits = c(0, 1.03),
      breaks = seq(0, 1, .25),
      labels = scales::number_format(accuracy = .01),
      expand = expansion(mult = c(.01, .02))
    ) +
    scale_fill_manual(values = benchmark_palette, drop = FALSE) +
    labs(
      title = title,
      subtitle = subtitle,
      x = "Absolute Spearman correlation with human effect",
      y = NULL
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_blank(),
      axis.text.y = element_text(size = 8.8, lineheight = .92),
      legend.position = "none"
    )

  if (!is.null(filename)) save_plot(p, filename, width = 10.4, height = max(4.9, .72 * nrow(d) + 2.2))
  p
}
plot_nested_r2 <- function(model_df, title, subtitle = NULL, filename = NULL) {
  d <- model_df %>%
    filter(status == "ok", !is.na(r.squared)) %>%
    mutate(
      model = factor(model, levels = c("FD baseline only", "Quantum-like metric only", "FD + quantum-like metric")),
      model_label = fct_reorder(str_wrap(as.character(model), 32), r.squared),
      r2_label = sprintf("R² = %.3f", r.squared),
      label_x = pmax(r.squared - .035, .08)
    )

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No valid nested model results available."))
  }

  p <- ggplot(d, aes(x = r.squared, y = model_label, fill = model)) +
    geom_col(width = .62, alpha = .95) +
    geom_text(aes(x = label_x, label = r2_label), hjust = 1, size = 3.35, fontface = "bold", colour = "white") +
    scale_x_continuous(
      limits = c(0, max(1, max(d$r.squared, na.rm = TRUE) + .04)),
      breaks = seq(0, 1, .2),
      labels = scales::number_format(accuracy = .01),
      expand = expansion(mult = c(.01, .02))
    ) +
    scale_fill_manual(values = c(
      "FD baseline only" = "#B35C2E",
      "Quantum-like metric only" = "#2F5D8C",
      "FD + quantum-like metric" = "#3F7A57"
    )) +
    labs(
      title = title,
      subtitle = subtitle,
      x = "Explained variance",
      y = NULL,
      caption = "Adjusted R² values are reported in the corresponding table."
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_blank(),
      legend.position = "none",
      axis.text.y = element_text(size = 9.5)
    )

  if (!is.null(filename)) save_plot(p, filename, width = 9.6, height = 4.9)
  p
}
plot_predictor_scatter <- function(nested_df, title, subtitle = NULL, filename = NULL) {
  d <- nested_df %>%
    select(pair_id, human_value, best_fd_metric, best_quantum_metric) %>%
    pivot_longer(
      cols = c(best_fd_metric, best_quantum_metric),
      names_to = "predictor_family",
      values_to = "predictor_value"
    ) %>%
    filter(!is.na(human_value), !is.na(predictor_value)) %>%
    group_by(predictor_family) %>%
    mutate(
      predictor_z = as.numeric(scale(predictor_value)),
      human_z = as.numeric(scale(human_value)),
      predictor_family = recode(
        predictor_family,
        best_fd_metric = "Best frequency/dimensionality baseline",
        best_quantum_metric = "Best quantum-like metric"
      ),
      predictor_family = str_wrap(predictor_family, 36)
    ) %>%
    ungroup()

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No predictor-level data available."))
  }

  p <- ggplot(d, aes(x = predictor_z, y = human_z)) +
    geom_hline(yintercept = 0, linewidth = .25, colour = "grey75") +
    geom_vline(xintercept = 0, linewidth = .25, colour = "grey75") +
    geom_point(size = 2.35, alpha = .76, colour = "#2F3A45") +
    geom_smooth(method = "lm", se = TRUE, linewidth = .8, colour = "#2F5D8C", fill = "#BFD2E6") +
    facet_wrap(~ predictor_family, ncol = 1) +
    labs(
      title = title,
      subtitle = subtitle,
      x = "Standardized predictor value",
      y = "Standardized human effect"
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_line(linewidth = .25, colour = "grey88"),
      strip.text = element_text(face = "bold", size = 11, lineheight = .92)
    )

  if (!is.null(filename)) save_plot(p, filename, width = 8.8, height = 8.4)
  p
}
plot_h3_metric_landscape <- function(rank_df, title, subtitle = NULL, filename = NULL) {
  d <- rank_df %>%
    filter(!is.na(estimate)) %>%
    mutate(
      metric_family = metric_family_from_source(metric_source),
      metric_family = fct_reorder(metric_family, abs_estimate, .fun = max),
      significant = if_else(!is.na(p_fdr) & p_fdr < .05, "FDR < .05", "FDR >= .05")
    )

  winners <- d %>%
    group_by(metric_family) %>%
    slice_max(abs_estimate, n = 1, with_ties = FALSE) %>%
    ungroup()

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No valid metric correlations available."))
  }

  p <- ggplot(d, aes(x = estimate, y = metric_family)) +
    geom_vline(xintercept = 0, linewidth = .3, colour = "grey55") +
    geom_boxplot(width = .42, outlier.shape = NA, alpha = .16, colour = "grey45") +
    geom_jitter(aes(alpha = significant), width = 0, height = .13, size = 1.7, colour = "#2F3A45") +
    geom_point(data = winners, shape = 21, size = 3.7, stroke = .65, fill = "#B35C2E", colour = "white") +
    scale_x_continuous(
      limits = c(-1.05, 1.05),
      breaks = seq(-1, 1, .5),
      labels = scales::number_format(accuracy = .01),
      expand = expansion(mult = c(.01, .01))
    ) +
    scale_alpha_manual(values = c("FDR < .05" = .76, "FDR >= .05" = .18), drop = FALSE) +
    labs(
      title = title,
      subtitle = subtitle,
      x = "Spearman correlation with human similarity",
      y = NULL,
      caption = "Orange markers indicate the strongest metric within each family. Exact metric labels are reported in Table 16."
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      legend.position = "bottom",
      panel.grid.major.y = element_blank(),
      axis.text.y = element_text(size = 9.2)
    )

  if (!is.null(filename)) save_plot(p, filename, width = 10.8, height = 5.8)
  p
}
plot_h3_benchmark_scatter <- function(metric_data, benchmark_df, title, subtitle = NULL, filename = NULL) {
  selected_metrics <- benchmark_df %>%
    filter(!is.na(metric_id)) %>%
    select(benchmark, metric_id)

  d <- metric_data %>%
    inner_join(selected_metrics, by = "metric_id") %>%
    mutate(benchmark = factor(str_wrap(benchmark, 34), levels = str_wrap(selected_metrics$benchmark, 34))) %>%
    group_by(benchmark) %>%
    mutate(
      metric_value_z = as.numeric(scale(metric_value)),
      human_value_z = as.numeric(scale(human_value))
    ) %>%
    ungroup()

  if (nrow(d) == 0) {
    return(ggplot() + theme_void() + labs(title = title, subtitle = "No H3 benchmark scatter data available."))
  }

  p <- ggplot(d, aes(x = metric_value_z, y = human_value_z)) +
    geom_hline(yintercept = 0, linewidth = .25, colour = "grey75") +
    geom_vline(xintercept = 0, linewidth = .25, colour = "grey75") +
    geom_point(size = 2.1, alpha = .70, colour = "#2F3A45") +
    geom_smooth(method = "lm", se = TRUE, linewidth = .75, colour = "#2F5D8C", fill = "#BFD2E6") +
    facet_wrap(~ benchmark, ncol = 1) +
    labs(
      title = title,
      subtitle = subtitle,
      x = "Standardized metric value",
      y = "Standardized human similarity"
    ) +
    theme_block3a_pub(base_size = 11) +
    theme(
      panel.grid.major.y = element_line(linewidth = .25, colour = "grey88"),
      strip.text = element_text(face = "bold", size = 10.5, lineheight = .92)
    )

  if (!is.null(filename)) save_plot(p, filename, width = 8.8, height = 10.0)
  p
}
Code
project_root <- normalizePath(getwd(), mustWork = TRUE)
data_dir <- file.path(project_root, params$data_dir)
empirical_dir <- file.path(project_root, params$empirical_dir)

phase2_candidates <- c(
  or_empty(params$phase2_dir),
  file.path(empirical_dir, "tidy_outputs"),
  file.path(empirical_dir, "phase2_tidy_outputs"),
  file.path(data_dir, "phase2_tidy_outputs"),
  file.path(project_root, "tidy_outputs"),
  file.path(project_root, "phase2_tidy_outputs"),
  find_parent_by_file(c(empirical_dir, data_dir, project_root), "responses_all_long.csv", max_depth = 8)
)

hypothesis_candidates <- c(
  or_empty(params$hypothesis_dir),
  file.path(empirical_dir, "empirical_hypothesis_outputs"),
  file.path(data_dir, "phase2_empirical_hypothesis_outputs"),
  file.path(project_root, "empirical_hypothesis_outputs"),
  file.path(project_root, "phase2_empirical_hypothesis_outputs"),
  find_parent_by_file(c(empirical_dir, data_dir, project_root), "hypothesis_level_summary.csv", max_depth = 8)
)

phase4_candidates <- c(
  or_empty(params$phase4_dir),
  file.path(data_dir, "quantum_metrics_human_aligned"),
  file.path(data_dir, "phase4_quantum_metrics_human_aligned"),
  file.path(project_root, "phase4_quantum_metrics_human_aligned"),
  find_parent_by_file(c(data_dir, project_root), "pairwise_subspace_metrics.csv", max_depth = 8)
)

dimensionality_candidates <- c(
  or_empty(params$dimensionality_dir),
  data_dir,
  project_root,
  find_parent_by_file(c(data_dir, project_root), "global_dimensionality_wide.csv", max_depth = 8)
)

phase2_dir <- first_existing(phase2_candidates, type = "dir", label = "Phase 2 tidy outputs directory")
hypothesis_dir <- first_existing(hypothesis_candidates, type = "dir", required = FALSE, label = "empirical hypothesis outputs directory")
phase4_dir <- first_existing(phase4_candidates, type = "dir", required = FALSE, label = "Phase 4 quantum metrics directory")
dimensionality_dir <- first_existing(dimensionality_candidates, type = "dir", required = FALSE, label = "dimensionality outputs directory")

output_dir <- file.path(project_root, params$output_dir)
fs::dir_create(output_dir)
fs::dir_create(file.path(output_dir, "tables"))
fs::dir_create(file.path(output_dir, "figures"))
fs::dir_create(file.path(output_dir, "data"))

paths <- list(
  project_root = project_root,
  phase2_dir = phase2_dir,
  hypothesis_dir = hypothesis_dir,
  phase4_dir = phase4_dir,
  dimensionality_dir = dimensionality_dir,
  output_dir = output_dir
)

paths
$project_root
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel"

$phase2_dir
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel/Empirical_data/tidy_outputs"

$hypothesis_dir
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel/Empirical_data/empirical_hypothesis_outputs"

$phase4_dir
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel/Computational_data/quantum_metrics_human_aligned"

$dimensionality_dir
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel/Computational_data"

$output_dir
[1] "/home/alex/Documentos/RESEARCH/QuantumNLP/Paper1_StructuralModel/Computational_data/block3a_pairwise_quantum_outputs_v4"

3 Load data

Code
phase2_files <- list(
  responses_all = file.path(phase2_dir, "tables", "responses_all_long.csv"),
  country_map = file.path(phase2_dir, "tables", "country_code_to_canonical_mapping.csv")
)

hypothesis_files <- list(
  hypothesis_level_summary = file.path(hypothesis_dir, "tables", "hypothesis_level_summary.csv"),
  asymmetry_1_binomial = file.path(hypothesis_dir, "tables", "asymmetry_1_forced_choice_item_binomial_tests_primary_excluding_attempt_duplicates.csv"),
  saliency_1_binomial = file.path(hypothesis_dir, "tables", "saliency_1_forced_choice_item_binomial_tests.csv")
)

phase4_files <- list(
  subspace = file.path(phase4_dir, "pairwise_subspace_metrics.csv"),
  operator_density = file.path(phase4_dir, "pairwise_operator_density_metrics.csv"),
  qsm_state = file.path(phase4_dir, "pairwise_qsm_state_metrics.csv"),
  classical = file.path(phase4_dir, "classical_baselines.csv"),
  lsa_term = file.path(phase4_dir, "lsa_term_cosine_baselines.csv"),
  lsa_term_audit = file.path(phase4_dir, "lsa_term_cosine_baseline_audit.csv")
)

global_dim_path <- first_existing(
  c(
    file.path(dimensionality_dir, "global_dimensionality_wide.csv"),
    file.path(data_dir, "global_dimensionality_wide.csv"),
    file.path(project_root, "global_dimensionality_wide.csv"),
    file.path(find_parent_by_file(c(data_dir, project_root), "global_dimensionality_wide.csv", max_depth = 8), "global_dimensionality_wide.csv")
  ),
  type = "file",
  required = FALSE,
  label = "global dimensionality wide file"
)

responses_all <- read_csv_fast(phase2_files$responses_all)
country_map <- read_optional(phase2_files$country_map)
hypothesis_level_summary <- read_optional(hypothesis_files$hypothesis_level_summary)
asymmetry_1_binomial <- read_optional(hypothesis_files$asymmetry_1_binomial)
saliency_1_binomial <- read_optional(hypothesis_files$saliency_1_binomial)
subspace_raw <- read_csv_fast(phase4_files$subspace)
operator_raw <- read_csv_fast(phase4_files$operator_density)
qsm_raw <- read_csv_fast(phase4_files$qsm_state)
classical_raw <- read_optional(phase4_files$classical)
lsa_term_raw <- read_optional(phase4_files$lsa_term)
lsa_term_audit <- read_optional(phase4_files$lsa_term_audit)
global_dimensionality_raw <- read_optional(global_dim_path)

import_overview <- tibble(
  data_object = c(
    "responses_all", "country_map", "hypothesis_level_summary", "asymmetry_1_binomial", "saliency_1_binomial",
    "subspace_raw", "operator_raw", "qsm_raw", "classical_raw", "lsa_term_raw", "lsa_term_audit", "global_dimensionality_raw"
  ),
  rows = c(
    nrow(responses_all), nrow(country_map), nrow(hypothesis_level_summary), nrow(asymmetry_1_binomial), nrow(saliency_1_binomial),
    nrow(subspace_raw), nrow(operator_raw), nrow(qsm_raw), nrow(classical_raw), nrow(lsa_term_raw), nrow(lsa_term_audit), nrow(global_dimensionality_raw)
  ),
  columns = c(
    ncol(responses_all), ncol(country_map), ncol(hypothesis_level_summary), ncol(asymmetry_1_binomial), ncol(saliency_1_binomial),
    ncol(subspace_raw), ncol(operator_raw), ncol(qsm_raw), ncol(classical_raw), ncol(lsa_term_raw), ncol(lsa_term_audit), ncol(global_dimensionality_raw)
  )
)

show_table(import_overview, "Table 1. Imported objects for Block 3A.")


Table: Table 1. Imported objects for Block 3A.

|data_object               |   rows| columns|
|:-------------------------|------:|-------:|
|responses_all             | 101119|      63|
|country_map               |    143|       7|
|hypothesis_level_summary  |      6|       4|
|asymmetry_1_binomial      |     30|       9|
|saliency_1_binomial       |     30|       9|
|subspace_raw              | 113288|      38|
|operator_raw              | 451248|      25|
|qsm_raw                   | 171360|      17|
|classical_raw             |   7140|      11|
|lsa_term_raw              |    123|      17|
|lsa_term_audit            |    123|      11|
|global_dimensionality_raw |    120|      22|
Code
write_table(import_overview, "table_01_imported_objects.csv")

Interpretation. The imported data confirm that Block 3A is based on the full empirical response layer and on a broad computational metric layer. The human outcomes are reconstructed from the Phase 2 empirical files, whereas the computational side includes subspace/projector metrics, operator/density metrics, sequential QSM state metrics, classical contour-centroid baselines, direct LSA term baselines, and target-level frequency/dimensionality estimates. This structure is appropriate for the present objective: testing whether quantum-like pairwise metrics improve upon both classical semantic similarity and scalar prominence contrasts.

4 Prepare human targets

Code
if (nrow(country_map) > 0 && all(c("stimulus_code", "canonical_es") %in% names(country_map))) {
  country_map_clean <- country_map %>%
    mutate(
      stimulus_code = as.character(stimulus_code),
      target_id = slug(canonical_es)
    ) %>%
    filter(!is.na(stimulus_code), !is.na(target_id), nzchar(stimulus_code), nzchar(target_id)) %>%
    distinct(stimulus_code, .keep_all = TRUE)

  code_to_target <- stats::setNames(country_map_clean$target_id, country_map_clean$stimulus_code)
} else {
  country_map_clean <- tibble(stimulus_code = character(), target_id = character())
  code_to_target <- character()
}

to_target_id <- function(x) {
  x <- as.character(x)
  out <- unname(code_to_target[x])
  fallback <- slug(x)
  ifelse(!is.na(out) & nzchar(out), out, fallback)
}
Code
parse_pair_item <- function(df, item_col = "item") {
  if (!item_col %in% names(df)) return(tibble())
  df %>%
    mutate(item = as.character(.data[[item_col]])) %>%
    tidyr::separate(item, into = c("code_a", "code_b"), sep = "\\.", remove = FALSE, fill = "right", extra = "merge") %>%
    mutate(
      target_a = to_target_id(code_a),
      target_b = to_target_id(code_b),
      pair_id = make_unordered_pair(target_a, target_b),
      human_value = as.numeric(diff_a_minus_d),
      human_clarity = abs(as.numeric(diff_a_minus_d)),
      human_first = target_a,
      human_second = target_b
    )
}

h1_human <- parse_pair_item(asymmetry_1_binomial) %>%
  mutate(hypothesis = "H1 ipsative asymmetry", outcome = "direction", .before = 1)

h2_human <- parse_pair_item(saliency_1_binomial) %>%
  mutate(hypothesis = "H2 forced-choice salience", outcome = "direction", .before = 1)

h3_human <- responses_all %>%
  filter(subexperiment %in% c("asymmetry_2_a_direct", "asymmetry_2_b_reverse"), !is.na(rating)) %>%
  mutate(
    target_a_trial = to_target_id(stimulus_1_code),
    target_b_trial = to_target_id(stimulus_2_code),
    pair_id = make_unordered_pair(target_a_trial, target_b_trial),
    pair_target_a = ifelse(target_a_trial <= target_b_trial, target_a_trial, target_b_trial),
    pair_target_b = ifelse(target_a_trial <= target_b_trial, target_b_trial, target_a_trial)
  ) %>%
  group_by(pair_id, pair_target_a, pair_target_b) %>%
  summarise(
    n = n(),
    n_participants = n_distinct(participant_id, na.rm = TRUE),
    human_value = mean(rating, na.rm = TRUE),
    median_similarity = median(rating, na.rm = TRUE),
    sd_similarity = sd(rating, na.rm = TRUE),
    mean_direct = mean(rating[subexperiment == "asymmetry_2_a_direct"], na.rm = TRUE),
    mean_reverse = mean(rating[subexperiment == "asymmetry_2_b_reverse"], na.rm = TRUE),
    order_delta_direct_minus_reverse = mean_direct - mean_reverse,
    .groups = "drop"
  ) %>%
  mutate(
    hypothesis = "H3 scalar similarity",
    outcome = "similarity",
    human_first = pair_target_a,
    human_second = pair_target_b,
    target_a = pair_target_a,
    target_b = pair_target_b,
    .before = 1
  )

human_inventory <- tibble(
  object = c("h1_human", "h2_human", "h3_human"),
  rows = c(nrow(h1_human), nrow(h2_human), nrow(h3_human)),
  empirical_unit = c("ordered pair", "ordered pair", "unordered pair")
)

show_table(human_inventory, "Table 2. Human pairwise targets reconstructed for Block 3A.")


Table: Table 2. Human pairwise targets reconstructed for Block 3A.

|object   | rows|empirical_unit |
|:--------|----:|:--------------|
|h1_human |   30|ordered pair   |
|h2_human |   30|ordered pair   |
|h3_human |   89|unordered pair |
Code
write_table(human_inventory, "table_02_human_pairwise_targets_inventory.csv")
write_table(h1_human, "data_h1_human_targets.csv")
write_table(h2_human, "data_h2_human_targets.csv")
write_table(h3_human, "data_h3_human_targets.csv")

human_pair_ids <- bind_rows(
  h1_human %>% select(pair_id),
  h2_human %>% select(pair_id),
  h3_human %>% select(pair_id)
) %>% distinct(pair_id)

Interpretation. The reconstructed human targets preserve the theoretically relevant distinction between directional and scalar outcomes. H1 and H2 are ordered-pair outcomes because the first/second item order defines the direction of the forced-choice effect. H3 is treated as an unordered-pair outcome because the empirical result from Block 1 indicated no reliable order effect in Likert similarity ratings. This separation prevents a symmetric similarity task from being incorrectly evaluated as if it had the same formal structure as directional salience-asymmetry judgments.

5 Prepare quantum-like and classical metrics

Code
subspace_metric_cols <- c(
  "principal_overlap_trace", "principal_overlap_nuclear", "mean_cosine", "mean_cosine_sq", "min_cosine", "max_cosine",
  "mean_angle_deg", "max_angle_deg", "min_angle_deg", "containment_a_to_b", "containment_b_to_a",
  "containment_asymmetry_a_minus_b", "symmetric_projector_overlap", "projector_chordal_distance",
  "projector_chordal_distance_normalized", "grassmann_geodesic_min_dim", "projector_commutator_fro",
  "projector_commutator_fro_normalized", "density_fidelity_from_projectors", "density_bures_from_projectors",
  "qsm_neutral_a_to_b", "qsm_neutral_b_to_a", "qsm_neutral_asymmetry_a_minus_b"
)

operator_metric_cols <- c(
  "trace_inner", "frobenius_distance", "frobenius_distance_sq", "cosine_hilbert_schmidt",
  "a_in_b_trace_normalized", "b_in_a_trace_normalized", "containment_asymmetry_a_minus_b",
  "symmetric_trace_normalized_overlap", "frobenius_distance_trace_normalized"
)

qsm_metric_cols <- c("qsm_p_b_given_a", "qsm_p_a_given_b", "qsm_asymmetry_a_to_b_minus_b_to_a")

make_subspace_long <- function(df) {
  df %>%
    mutate(pair_id = make_unordered_pair(target_a, target_b)) %>%
    semi_join(human_pair_ids, by = "pair_id") %>%
    rename(model_target_a = target_a, model_target_b = target_b) %>%
    pivot_longer(cols = any_of(subspace_metric_cols), names_to = "metric_name", values_to = "value") %>%
    mutate(
      metric_source = "pairwise_subspace_metrics",
      object = basis_object,
      state_vector_source = NA_character_,
      state_type = NA_character_
    )
}

make_operator_long <- function(df) {
  df %>%
    mutate(pair_id = make_unordered_pair(target_a, target_b)) %>%
    semi_join(human_pair_ids, by = "pair_id") %>%
    rename(model_target_a = target_a, model_target_b = target_b, basis_object = object) %>%
    pivot_longer(cols = any_of(operator_metric_cols), names_to = "metric_name", values_to = "value") %>%
    mutate(
      metric_source = "pairwise_operator_density_metrics",
      object = basis_object,
      state_vector_source = NA_character_,
      state_type = NA_character_
    )
}

make_qsm_long <- function(df) {
  df %>%
    mutate(pair_id = make_unordered_pair(target_a, target_b)) %>%
    semi_join(human_pair_ids, by = "pair_id") %>%
    rename(model_target_a = target_a, model_target_b = target_b) %>%
    pivot_longer(cols = any_of(qsm_metric_cols), names_to = "metric_name", values_to = "value") %>%
    mutate(
      metric_source = "pairwise_qsm_state_metrics",
      object = basis_object
    )
}

make_classical_long <- function(df) {
  if (nrow(df) == 0) return(tibble())
  df %>%
    mutate(pair_id = make_unordered_pair(target_a, target_b)) %>%
    semi_join(human_pair_ids, by = "pair_id") %>%
    rename(model_target_a = target_a, model_target_b = target_b) %>%
    pivot_longer(
      cols = any_of(c("cosine", "angular_distance", "euclidean_distance", "dot_product")),
      names_to = "baseline_metric",
      values_to = "value"
    ) %>%
    mutate(
      metric_name = paste0("classical_", vector_source, "_", baseline_metric),
      metric_source = "classical_baselines",
      variant = "classical",
      cluster_method = NA_character_,
      global_k_method = NA_character_,
      local_k_method = NA_character_,
      basis_object = NA_character_,
      object = vector_source,
      state_vector_source = vector_source,
      state_type = "vector"
    )
}

classical_sources <- list()
if (nrow(classical_raw) > 0) classical_sources[["contour_centroid"]] <- classical_raw
if (nrow(lsa_term_raw) > 0) classical_sources[["lsa_term"]] <- lsa_term_raw
classical_all <- if (length(classical_sources) > 0) bind_rows(classical_sources, .id = "classical_source_file") else tibble()

pairwise_metric_values <- bind_rows(
  make_subspace_long(subspace_raw),
  make_operator_long(operator_raw),
  make_qsm_long(qsm_raw),
  make_classical_long(classical_all)
) %>%
  mutate(
    value = as.numeric(value),
    metric_family = metric_family_from_source(metric_source),
    metric_short = metric_short_label(metric_name),
    variant_label = if_else(metric_source == "classical_baselines", "classical", variant_short(variant)),
    metric_id = paste(
      metric_source, metric_name, coalesce(variant, ""), coalesce(basis_object, ""),
      coalesce(state_vector_source, ""), coalesce(state_type, ""), sep = " | "
    )
  )

metric_inventory <- pairwise_metric_values %>%
  group_by(metric_source, metric_family, metric_name, metric_short) %>%
  summarise(
    n_rows = n(),
    n_pairs = n_distinct(pair_id),
    n_variants = n_distinct(variant, na.rm = TRUE),
    n_objects = n_distinct(object, na.rm = TRUE),
    .groups = "drop"
  ) %>%
  arrange(metric_source, metric_name)

show_table(metric_inventory, "Table 3. Pairwise metric inventory after filtering to human pairs.")


Table: Table 3. Pairwise metric inventory after filtering to human pairs.

|metric_source                     |metric_family               |metric_name                                   |metric_short                           | n_rows| n_pairs| n_variants| n_objects|
|:---------------------------------|:---------------------------|:---------------------------------------------|:--------------------------------------|------:|-------:|----------:|---------:|
|classical_baselines               |Classical vector baseline   |classical_contour_centroid_angular_distance   |Angular distance, reversed             |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_contour_centroid_cosine             |Contour-centroid cosine                |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_contour_centroid_dot_product        |classical contour centroid dot product |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_contour_centroid_euclidean_distance |Euclidean distance, reversed           |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_lsa_term_angular_distance           |Angular distance, reversed             |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_lsa_term_cosine                     |LSA term cosine                        |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_lsa_term_dot_product                |classical lsa term dot product         |     89|      89|          1|         1|
|classical_baselines               |Classical vector baseline   |classical_lsa_term_euclidean_distance         |Euclidean distance, reversed           |     89|      89|          1|         1|
|pairwise_operator_density_metrics |Operator/density geometry   |a_in_b_trace_normalized                       |a in b trace normalized                |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |b_in_a_trace_normalized                       |b in a trace normalized                |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b               |Containment asymmetry                  |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |cosine_hilbert_schmidt                        |Hilbert-Schmidt cosine                 |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |frobenius_distance                            |frobenius distance                     |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |frobenius_distance_sq                         |frobenius distance sq                  |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |frobenius_distance_trace_normalized           |frobenius distance trace normalized    |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |symmetric_trace_normalized_overlap            |Trace-normalized overlap               |   5696|      89|          8|         8|
|pairwise_operator_density_metrics |Operator/density geometry   |trace_inner                                   |trace inner                            |   5696|      89|          8|         8|
|pairwise_qsm_state_metrics        |Sequential QSM              |qsm_asymmetry_a_to_b_minus_b_to_a             |QSM state asymmetry                    |   2136|      89|          8|         1|
|pairwise_qsm_state_metrics        |Sequential QSM              |qsm_p_a_given_b                               |QSM p(A&#124;B)                        |   2136|      89|          8|         1|
|pairwise_qsm_state_metrics        |Sequential QSM              |qsm_p_b_given_a                               |QSM p(B&#124;A)                        |   2136|      89|          8|         1|
|pairwise_subspace_metrics         |Subspace/projector geometry |containment_a_to_b                            |containment a to b                     |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b               |Containment asymmetry                  |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |containment_b_to_a                            |containment b to a                     |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |density_bures_from_projectors                 |Bures distance, reversed               |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |density_fidelity_from_projectors              |Density fidelity                       |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |grassmann_geodesic_min_dim                    |grassmann geodesic min dim             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |max_angle_deg                                 |max angle deg                          |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |max_cosine                                    |max cosine                             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |mean_angle_deg                                |mean angle deg                         |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |mean_cosine                                   |Mean principal cosine                  |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |mean_cosine_sq                                |Mean cos² principal angles             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |min_angle_deg                                 |min angle deg                          |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |min_cosine                                    |min cosine                             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |principal_overlap_nuclear                     |principal overlap nuclear              |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |principal_overlap_trace                       |principal overlap trace                |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |projector_chordal_distance                    |Chordal distance, reversed             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |projector_chordal_distance_normalized         |Chordal distance, reversed             |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |projector_commutator_fro                      |projector commutator fro               |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |projector_commutator_fro_normalized           |projector commutator fro normalized    |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_a_to_b                            |qsm neutral a to b                     |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b               |Neutral QSM asymmetry                  |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_b_to_a                            |qsm neutral b to a                     |   1424|      89|          8|         2|
|pairwise_subspace_metrics         |Subspace/projector geometry |symmetric_projector_overlap                   |Projector overlap                      |   1424|      89|          8|         2|
Code
write_table(metric_inventory, "table_03_pairwise_metric_inventory.csv")
write_table(pairwise_metric_values, "data_pairwise_metric_values_human_pairs_long.csv")

Interpretation. The metric inventory shows that the analysis uses a deliberately broad multiverse of pairwise representations rather than a single hand-picked specification. The metric layer includes classical vector baselines, subspace/projector geometry, operator/density geometry, and sequential QSM quantities. This is important because the strongest claims should not depend on one arbitrary clustering or dimensionality rule. At this stage, the analysis asks which metric families repeatedly align with the human targets before deciding which specifications deserve theoretical emphasis.

6 Align metrics to human order

Code
join_metrics_to_behavior <- function(human_df, metrics_df = pairwise_metric_values) {
  metrics_df %>%
    inner_join(human_df, by = "pair_id") %>%
    mutate(
      direction_sign = case_when(
        model_target_a == human_first & model_target_b == human_second ~ 1,
        model_target_a == human_second & model_target_b == human_first ~ -1,
        TRUE ~ NA_real_
      ),
      metric_value_directional = orient_asymmetry_to_human_order(metric_name, value, direction_sign),
      metric_value = similarity_orient_value(metric_name, metric_value_directional),
      metric_direction = case_when(
        is_asymmetry_metric(metric_name) ~ "directional_asymmetry",
        is_distance_metric(metric_name) ~ "distance_reversed_to_similarity",
        TRUE ~ "similarity_or_overlap"
      )
    )
}

h1_metric_data <- join_metrics_to_behavior(h1_human)
h2_metric_data <- join_metrics_to_behavior(h2_human)
h3_metric_data <- join_metrics_to_behavior(h3_human)

aligned_inventory <- bind_rows(
  h1_metric_data %>% count(hypothesis, metric_family, metric_source, name = "n_rows"),
  h2_metric_data %>% count(hypothesis, metric_family, metric_source, name = "n_rows"),
  h3_metric_data %>% count(hypothesis, metric_family, metric_source, name = "n_rows")
) %>%
  arrange(hypothesis, metric_family, metric_source)

show_table(aligned_inventory, "Table 4. Human-aligned metric rows by hypothesis and metric family.")


Table: Table 4. Human-aligned metric rows by hypothesis and metric family.

|hypothesis                |metric_family               |metric_source                     | n_rows|
|:-------------------------|:---------------------------|:---------------------------------|------:|
|H1 ipsative asymmetry     |Classical vector baseline   |classical_baselines               |    240|
|H1 ipsative asymmetry     |Operator/density geometry   |pairwise_operator_density_metrics |  17280|
|H1 ipsative asymmetry     |Sequential QSM              |pairwise_qsm_state_metrics        |   2160|
|H1 ipsative asymmetry     |Subspace/projector geometry |pairwise_subspace_metrics         |  11040|
|H2 forced-choice salience |Classical vector baseline   |classical_baselines               |    240|
|H2 forced-choice salience |Operator/density geometry   |pairwise_operator_density_metrics |  17280|
|H2 forced-choice salience |Sequential QSM              |pairwise_qsm_state_metrics        |   2160|
|H2 forced-choice salience |Subspace/projector geometry |pairwise_subspace_metrics         |  11040|
|H3 scalar similarity      |Classical vector baseline   |classical_baselines               |    712|
|H3 scalar similarity      |Operator/density geometry   |pairwise_operator_density_metrics |  51264|
|H3 scalar similarity      |Sequential QSM              |pairwise_qsm_state_metrics        |   6408|
|H3 scalar similarity      |Subspace/projector geometry |pairwise_subspace_metrics         |  32752|
Code
write_table(aligned_inventory, "table_04_human_aligned_metric_rows.csv")
write_table(h1_metric_data, "data_h1_metric_data_long.csv")
write_table(h2_metric_data, "data_h2_metric_data_long.csv")
write_table(h3_metric_data, "data_h3_metric_data_long.csv")

Interpretation. Directional metrics are aligned to the empirical first/second order before correlation with human behavior. This step is essential: an asymmetric computational quantity has no behavioral interpretation unless its sign is matched to the order in which participants evaluated the pair. Distance-like metrics are also sign-reversed when used as similarity predictors, so that larger values consistently indicate greater predicted similarity. The resulting aligned datasets provide a common comparison scale for the three behavioral targets.

7 Frequency and dimensionality directional baselines

Code
if (nrow(global_dimensionality_raw) > 0) {
  global_dimensionality <- global_dimensionality_raw %>%
    mutate(target_id = as.character(target_id))

  if (!"n_occurrences" %in% names(global_dimensionality)) global_dimensionality$n_occurrences <- NA_real_

  feature_cols <- c(
    "n_occurrences", "rank_effective", "gavish_donoho", "horn_wishart",
    "marchenko_pastur", "permutation_pa", "profile_likelihood", "var90", "var95"
  )

  target_features <- global_dimensionality %>%
    group_by(target_id) %>%
    slice(1) %>%
    ungroup() %>%
    mutate(log_n_occurrences = log1p(n_occurrences)) %>%
    select(target_id, any_of(unique(c("n_occurrences", "log_n_occurrences", feature_cols))))
} else {
  target_features <- tibble(target_id = character())
}

add_pair_features <- function(df) {
  if (nrow(df) == 0 || nrow(target_features) == 0) return(df)

  features_a <- target_features %>% rename_with(~ paste0(.x, "_a"), -target_id) %>% rename(target_a = target_id)
  features_b <- target_features %>% rename_with(~ paste0(.x, "_b"), -target_id) %>% rename(target_b = target_id)

  out <- df %>%
    left_join(features_a, by = "target_a") %>%
    left_join(features_b, by = "target_b")

  base_features <- intersect(
    c("log_n_occurrences", "n_occurrences", "rank_effective", "gavish_donoho", "horn_wishart", "marchenko_pastur", "permutation_pa", "profile_likelihood", "var90", "var95"),
    names(target_features)
  )

  for (ff in base_features) {
    aa <- paste0(ff, "_a")
    bb <- paste0(ff, "_b")
    if (aa %in% names(out) && bb %in% names(out)) {
      out[[paste0("diff_", ff, "_a_minus_b")]] <- out[[aa]] - out[[bb]]
      out[[paste0("abs_diff_", ff)]] <- abs(out[[aa]] - out[[bb]])
      out[[paste0("mean_", ff)]] <- rowMeans(cbind(out[[aa]], out[[bb]]), na.rm = TRUE)
    }
  }
  out
}

h1_with_fd <- add_pair_features(h1_human)
h2_with_fd <- add_pair_features(h2_human)

directional_fd_predictors <- names(h1_with_fd)[str_detect(names(h1_with_fd), "^diff_")]
directional_fd_predictors <- setdiff(directional_fd_predictors, "diff_a_minus_d")

h1_fd_rank <- cor_table(h1_with_fd, directional_fd_predictors, "human_value", method = "spearman") %>%
  mutate(benchmark_family = "Frequency/dimensionality difference", hypothesis = "H1 ipsative asymmetry", .before = 1)
h2_fd_rank <- cor_table(h2_with_fd, directional_fd_predictors, "human_value", method = "spearman") %>%
  mutate(benchmark_family = "Frequency/dimensionality difference", hypothesis = "H2 forced-choice salience", .before = 1)

show_table(h1_fd_rank %>% slice_head(n = params$top_n), "Table 5. H1 top frequency/dimensionality directional baselines.")


Table: Table 5. H1 top frequency/dimensionality directional baselines.

|benchmark_family                    |hypothesis            |predictor                         |outcome     |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:-----------------------------------|:---------------------|:---------------------------------|:-----------|--:|--------:|-------:|:--------|-----:|------------:|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_marchenko_pastur_a_minus_b   |human_value | 30|   -0.928|   0.000|spearman | 0.000|        0.928|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_log_n_occurrences_a_minus_b  |human_value | 30|   -0.926|   0.000|spearman | 0.000|        0.926|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_var90_a_minus_b              |human_value | 30|   -0.842|   0.000|spearman | 0.000|        0.842|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_gavish_donoho_a_minus_b      |human_value | 30|   -0.827|   0.000|spearman | 0.000|        0.827|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_n_occurrences_a_minus_b      |human_value | 30|   -0.823|   0.000|spearman | 0.000|        0.823|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_var95_a_minus_b              |human_value | 30|   -0.813|   0.000|spearman | 0.000|        0.813|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_permutation_pa_a_minus_b     |human_value | 30|   -0.604|   0.000|spearman | 0.001|        0.604|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_profile_likelihood_a_minus_b |human_value | 30|    0.548|   0.002|spearman | 0.002|        0.548|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_horn_wishart_a_minus_b       |human_value | 30|   -0.531|   0.003|spearman | 0.003|        0.531|
|Frequency/dimensionality difference |H1 ipsative asymmetry |diff_rank_effective_a_minus_b     |human_value | 30|   -0.520|   0.003|spearman | 0.003|        0.520|
Code
show_table(h2_fd_rank %>% slice_head(n = params$top_n), "Table 6. H2 top frequency/dimensionality directional baselines.")


Table: Table 6. H2 top frequency/dimensionality directional baselines.

|benchmark_family                    |hypothesis                |predictor                         |outcome     |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:-----------------------------------|:-------------------------|:---------------------------------|:-----------|--:|--------:|-------:|:--------|-----:|------------:|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_log_n_occurrences_a_minus_b  |human_value | 30|    0.937|   0.000|spearman | 0.000|        0.937|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_marchenko_pastur_a_minus_b   |human_value | 30|    0.928|   0.000|spearman | 0.000|        0.928|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_n_occurrences_a_minus_b      |human_value | 30|    0.869|   0.000|spearman | 0.000|        0.869|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_var90_a_minus_b              |human_value | 30|    0.830|   0.000|spearman | 0.000|        0.830|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_var95_a_minus_b              |human_value | 30|    0.797|   0.000|spearman | 0.000|        0.797|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_gavish_donoho_a_minus_b      |human_value | 30|    0.780|   0.000|spearman | 0.000|        0.780|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_profile_likelihood_a_minus_b |human_value | 30|   -0.621|   0.000|spearman | 0.000|        0.621|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_permutation_pa_a_minus_b     |human_value | 30|    0.564|   0.001|spearman | 0.001|        0.564|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_horn_wishart_a_minus_b       |human_value | 30|    0.536|   0.002|spearman | 0.003|        0.536|
|Frequency/dimensionality difference |H2 forced-choice salience |diff_rank_effective_a_minus_b     |human_value | 30|    0.474|   0.008|spearman | 0.008|        0.474|
Code
write_table(h1_fd_rank, "table_05_h1_frequency_dimensionality_baselines.csv")
write_table(h2_fd_rank, "table_06_h2_frequency_dimensionality_baselines.csv")
write_table(h1_with_fd, "data_h1_with_frequency_dimensionality.csv")
write_table(h2_with_fd, "data_h2_with_frequency_dimensionality.csv")
Code
fd_rank_plot_data <- bind_rows(
  h1_fd_rank %>% mutate(hypothesis_short = "H1 asymmetry"),
  h2_fd_rank %>% mutate(hypothesis_short = "H2 salience")
) %>%
  group_by(hypothesis_short) %>%
  slice_head(n = 8) %>%
  ungroup() %>%
  mutate(
    predictor_display = predictor %>%
      str_replace("^diff_", "") %>%
      str_replace("_a_minus_b$", "") %>%
      str_replace_all("_", " ") %>%
      str_to_title(),
    predictor_display = str_wrap(predictor_display, 28),
    predictor_display = fct_reorder(predictor_display, abs_estimate),
    rho_label = sprintf("rho = %.2f", estimate),
    label_x = if_else(estimate >= 0, pmax(estimate - .045, .08), pmin(estimate + .045, -.08)),
    label_hjust = if_else(estimate >= 0, 1, 0)
  )

fd_rank_plot <- ggplot(fd_rank_plot_data, aes(x = estimate, y = predictor_display)) +
  geom_vline(xintercept = 0, linewidth = .35, colour = "grey55") +
  geom_col(width = .66, fill = "#B35C2E", alpha = .94) +
  geom_text(aes(x = label_x, label = rho_label, hjust = label_hjust), size = 3.0, fontface = "bold", colour = "white") +
  facet_wrap(~ hypothesis_short, ncol = 1, scales = "free_y") +
  scale_x_continuous(
    limits = c(-1.05, 1.05),
    breaks = seq(-1, 1, .5),
    labels = scales::number_format(accuracy = .01),
    expand = expansion(mult = c(.01, .01))
  ) +
  labs(
    title = "Frequency and dimensionality contrasts are strong directional baselines",
    subtitle = "Each bar is a Spearman correlation between an A-minus-B target-level contrast and the human forced-choice direction.",
    x = "Spearman correlation with human direction",
    y = NULL
  ) +
  theme_block3a_pub(base_size = 11) +
  theme(
    panel.grid.major.y = element_blank(),
    strip.text = element_text(face = "bold", size = 12),
    axis.text.y = element_text(size = 8.8, lineheight = .92)
  )

show_plot(fd_rank_plot)

Code
save_plot(fd_rank_plot, "fig_00_frequency_dimensionality_directional_baselines.png", width = 10.8, height = 8.4)

Interpretation. The frequency/dimensionality contrasts constitute an exceptionally strong baseline for the directional tasks. For H1, the strongest predictor is the Marchenko-Pastur dimensionality contrast, with a negative association with human asymmetry (rho = -0.928), closely followed by log-frequency difference (rho = -0.926). For H2, the strongest predictor is log-frequency difference (rho = 0.937), followed by Marchenko-Pastur dimensionality difference (rho = 0.928). The opposite signs across H1 and H2 are theoretically meaningful: the more frequent or higher-dimensional concept tends to be selected as more salient, whereas asymmetry judgments tend to favor the less-salient-to-more-salient direction. These results make frequency and dimensionality differences non-trivial competitors for the quantum-like account.

8 H1: ipsative asymmetry

Code
rank_group_cols <- c(
  "metric_id", "metric_source", "metric_family", "metric_name", "metric_short", "variant", "variant_label",
  "cluster_method", "global_k_method", "local_k_method", "basis_object", "object", "state_vector_source", "state_type", "metric_direction"
)

h1_rank_all <- cor_by_group(h1_metric_data, rank_group_cols, x = "metric_value", y = "human_value", method = "spearman") %>%
  mutate(analysis_block = "H1 ipsative asymmetry", .before = 1)

h1_rank_directional <- h1_rank_all %>%
  filter(metric_source != "classical_baselines", is_asymmetry_metric(metric_name)) %>%
  arrange(desc(abs_estimate), p.value)

h1_rank_family_winners <- best_by_family(h1_rank_all)

h1_benchmark_summary <- bind_rows(
  h1_rank_directional %>% slice_head(n = 1) %>% mutate(benchmark = "Best quantum-like directional metric"),
  h1_rank_all %>% filter(metric_source == "classical_baselines", str_detect(metric_name, "cosine")) %>% slice_max(abs_estimate, n = 1, with_ties = FALSE) %>% mutate(benchmark = "Best classical cosine"),
  h1_fd_rank %>% slice_head(n = 1) %>% transmute(
    analysis_block = "H1 ipsative asymmetry",
    metric_id = predictor,
    metric_source = "frequency_dimensionality_baseline",
    metric_family = "Frequency/dimensionality difference",
    metric_name = predictor,
    metric_short = predictor,
    variant = NA_character_,
    variant_label = NA_character_,
    cluster_method = NA_character_,
    global_k_method = NA_character_,
    local_k_method = NA_character_,
    basis_object = NA_character_,
    object = NA_character_,
    state_vector_source = NA_character_,
    state_type = NA_character_,
    metric_direction = "directional_difference",
    n, estimate, p.value, method, p_fdr, abs_estimate,
    benchmark = "Best frequency/dimensionality difference"
  )
) %>%
  select(benchmark, everything())

show_table(h1_rank_directional %>% slice_head(n = params$top_n), "Table 7. H1 top quantum-like directional metrics.")


Table: Table 7. H1 top quantum-like directional metrics.

|analysis_block        |metric_id                                                                                                                                                                               |metric_source                     |metric_family               |metric_name                     |metric_short          |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object                 |object                       |state_vector_source |state_type |metric_direction      |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:---------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:---------------------------|:-------------------------------|:---------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:----------------------------|:----------------------------|:-------------------|:----------|:---------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.906|       0|spearman |     0|        0.906|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.906|       0|spearman |     0|        0.906|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;              |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|    0.905|       0|spearman |     0|        0.905|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_lowdin &#124;  &#124;                     |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.905|       0|spearman |     0|        0.905|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;                   |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|    0.853|       0|spearman |     0|        0.853|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; P_lowdin &#124;  &#124;                          |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.853|       0|spearman |     0|        0.853|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.853|       0|spearman |     0|        0.853|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.853|       0|spearman |     0|        0.853|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_freq &#124;  &#124;       |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |projector_mixture_freq       |projector_mixture_freq       |NA                  |NA         |directional_asymmetry | 30|    0.841|       0|spearman |     0|        0.841|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_fit_global &#124;  &#124; |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |projector_mixture_fit_global |projector_mixture_fit_global |NA                  |NA         |directional_asymmetry | 30|    0.834|       0|spearman |     0|        0.834|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_fit_global &#124;  &#124;      |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |projector_mixture_fit_global |projector_mixture_fit_global |NA                  |NA         |directional_asymmetry | 30|    0.794|       0|spearman |     0|        0.794|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; P_concat_direct &#124;  &#124;                 |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa    |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa    |gmm_bic        |permutation_pa  |permutation_pa |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|    0.791|       0|spearman |     0|        0.791|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; P_lowdin &#124;  &#124;                        |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa    |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa    |gmm_bic        |permutation_pa  |permutation_pa |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.791|       0|spearman |     0|        0.791|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                                |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa    |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa    |gmm_bic        |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.791|       0|spearman |     0|        0.791|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                                |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa    |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa    |gmm_bic        |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|    0.791|       0|spearman |     0|        0.791|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_global &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_global                     |S_global                     |NA                  |NA         |directional_asymmetry | 30|    0.779|       0|spearman |     0|        0.779|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_global &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |S_global                     |S_global                     |NA                  |NA         |directional_asymmetry | 30|    0.779|       0|spearman |     0|        0.779|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_global &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_global                     |S_global                     |NA                  |NA         |directional_asymmetry | 30|    0.779|       0|spearman |     0|        0.779|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_global &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho      |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho      |gmm_bic        |gavish_donoho   |gavish_donoho  |S_global                     |S_global                     |NA                  |NA         |directional_asymmetry | 30|    0.779|       0|spearman |     0|        0.779|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_global &#124;  &#124;                     |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_global                     |P_global                     |NA                  |NA         |directional_asymmetry | 30|    0.776|       0|spearman |     0|        0.776|
Code
show_table(h1_rank_family_winners, "Table 8. H1 best metric by family.")


Table: Table 8. H1 best metric by family.

|analysis_block        |metric_id                                                                                                                                                                                          |metric_source                     |metric_family               |metric_name                       |metric_short                   |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object    |object          |state_vector_source |state_type          |metric_direction      |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:---------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:---------------------------|:---------------------------------|:------------------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:---------------|:---------------|:-------------------|:-------------------|:---------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                        |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b   |Containment asymmetry          |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin        |S_lowdin        |NA                  |NA                  |directional_asymmetry | 30|    0.906|   0.000|spearman | 0.000|        0.906|
|H1 ipsative asymmetry |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;                         |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b   |Containment asymmetry          |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_concat_direct |P_concat_direct |NA                  |NA                  |directional_asymmetry | 30|    0.905|   0.000|spearman | 0.000|        0.905|
|H1 ipsative asymmetry |pairwise_qsm_state_metrics &#124; qsm_asymmetry_a_to_b_minus_b_to_a &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_global &#124; contour_centroid &#124; state_pair_midpoint |pairwise_qsm_state_metrics        |Sequential QSM              |qsm_asymmetry_a_to_b_minus_b_to_a |QSM state asymmetry            |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_global        |S_global        |contour_centroid    |state_pair_midpoint |directional_asymmetry | 30|    0.735|   0.000|spearman | 0.000|        0.735|
|H1 ipsative asymmetry |classical_baselines &#124; classical_lsa_term_dot_product &#124; classical &#124;  &#124; lsa_term &#124; vector                                                                                   |classical_baselines               |Classical vector baseline   |classical_lsa_term_dot_product    |classical lsa term dot product |classical                                            |classical                                                  |NA             |NA              |NA             |NA              |lsa_term        |lsa_term            |vector              |similarity_or_overlap | 30|    0.203|   0.282|spearman | 0.377|        0.203|
Code
show_table(h1_benchmark_summary, "Table 9. H1 benchmark summary.")


Table: Table 9. H1 benchmark summary.

|benchmark                                |analysis_block        |metric_id                                                                                                                                                   |metric_source                     |metric_family                       |metric_name                     |metric_short                    |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object |object   |state_vector_source |state_type |metric_direction       |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:----------------------------------------|:---------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:-----------------------------------|:-------------------------------|:-------------------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:------------|:--------|:-------------------|:----------|:----------------------|--:|--------:|-------:|:--------|-----:|------------:|
|Best quantum-like directional metric     |H1 ipsative asymmetry |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124; |pairwise_subspace_metrics         |Subspace/projector geometry         |containment_asymmetry_a_minus_b |Containment asymmetry           |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin     |S_lowdin |NA                  |NA         |directional_asymmetry  | 30|    0.906|   0.000|spearman | 0.000|        0.906|
|Best classical cosine                    |H1 ipsative asymmetry |classical_baselines &#124; classical_lsa_term_cosine &#124; classical &#124;  &#124; lsa_term &#124; vector                                                 |classical_baselines               |Classical vector baseline           |classical_lsa_term_cosine       |LSA term cosine                 |classical                                            |classical                                                  |NA             |NA              |NA             |NA           |lsa_term |lsa_term            |vector     |similarity_or_overlap  | 30|    0.095|   0.616|spearman | 0.691|        0.095|
|Best frequency/dimensionality difference |H1 ipsative asymmetry |diff_marchenko_pastur_a_minus_b                                                                                                                             |frequency_dimensionality_baseline |Frequency/dimensionality difference |diff_marchenko_pastur_a_minus_b |diff_marchenko_pastur_a_minus_b |NA                                                   |NA                                                         |NA             |NA              |NA             |NA           |NA       |NA                  |NA         |directional_difference | 30|   -0.928|   0.000|spearman | 0.000|        0.928|
Code
write_table(h1_rank_all, "table_07a_h1_all_metric_rankings.csv")
write_table(h1_rank_directional, "table_07_h1_top_quantum_directional_rankings.csv")
write_table(h1_rank_family_winners, "table_08_h1_best_metric_by_family.csv")
write_table(h1_benchmark_summary, "table_09_h1_benchmark_summary.csv")

h1_plot <- plot_ranked_correlations(
  h1_rank_directional,
  title = "H1: top quantum-like directional metrics",
  subtitle = "Correlations use metrics oriented to the human first/second item order.",
  n = min(params$top_n, 15),
  filename = "fig_01_h1_top_quantum_directional_metrics.png"
)
show_plot(h1_plot)

Code
h1_best_quantum <- h1_rank_directional %>% slice_head(n = 1)
h1_best_fd <- h1_fd_rank %>% slice_head(n = 1)

if (nrow(h1_best_quantum) > 0 && nrow(h1_best_fd) > 0) {
  h1_quantum_predictor <- "best_quantum_metric"
  h1_fd_predictor <- "best_fd_metric"

  h1_nested_data <- h1_metric_data %>%
    filter(metric_id == h1_best_quantum$metric_id[[1]]) %>%
    select(pair_id, human_value, best_quantum_metric = metric_value) %>%
    left_join(
      h1_with_fd %>% select(pair_id, best_fd_metric = all_of(h1_best_fd$predictor[[1]])),
      by = "pair_id"
    )

  h1_nested_summary <- bind_rows(
    fit_lm_summary(h1_nested_data, "human_value", c(h1_fd_predictor), "FD baseline only"),
    fit_lm_summary(h1_nested_data, "human_value", c(h1_quantum_predictor), "Quantum-like metric only"),
    fit_lm_summary(h1_nested_data, "human_value", c(h1_fd_predictor, h1_quantum_predictor), "FD + quantum-like metric")
  )
} else {
  h1_nested_data <- tibble()
  h1_nested_summary <- tibble()
}

show_table(h1_nested_summary, "Table 10. H1 schematic nested OLS comparison.")


Table: Table 10. H1 schematic nested OLS comparison.

|model                    |  n|predictors                           | r.squared| adj.r.squared|    AIC|    BIC| p.value| df| df.residual|status | sigma| statistic| logLik| deviance| nobs|
|:------------------------|--:|:------------------------------------|---------:|-------------:|------:|------:|-------:|--:|-----------:|:------|-----:|---------:|------:|--------:|----:|
|FD baseline only         | 30|best_fd_metric                       |     0.826|         0.819|  0.613|  4.816|       0|  1|          28|ok     | 0.229|   132.464|  2.694|    1.468|   30|
|Quantum-like metric only | 30|best_quantum_metric                  |     0.754|         0.745| 10.885| 15.088|       0|  1|          28|ok     | 0.272|    85.940| -2.442|    2.067|   30|
|FD + quantum-like metric | 30|best_fd_metric + best_quantum_metric |     0.832|         0.820|  1.389|  6.993|       0|  2|          27|ok     | 0.228|    67.089|  3.306|    1.409|   30|
Code
write_table(h1_nested_data, "data_h1_nested_model_data.csv")
write_table(h1_nested_summary, "table_10_h1_nested_ols_comparison.csv")
Code
h1_benchmark_plot <- plot_benchmark_strength(
  h1_benchmark_summary,
  title = "H1 benchmark comparison",
  subtitle = "Containment asymmetry is strong, but frequency/dimensionality is slightly stronger in zero-order correlation.",
  filename = "fig_05_h1_benchmark_strength.png"
)
show_plot(h1_benchmark_plot)

Code
h1_model_plot <- plot_nested_r2(
  h1_nested_summary,
  title = "H1 nested model comparison",
  subtitle = "The combined model adds little over the frequency/dimensionality baseline alone.",
  filename = "fig_06_h1_nested_model_r2.png"
)
show_plot(h1_model_plot)

Code
h1_predictor_scatter <- plot_predictor_scatter(
  h1_nested_data,
  title = "H1 human asymmetry against the two strongest predictors",
  subtitle = "Predictors are standardized within facet to make the two relationships visually comparable.",
  filename = "fig_07_h1_predictor_scatter.png"
)
show_plot(h1_predictor_scatter)

Interpretation. H1 is strongly captured by quantum-like directional metrics. The best quantum-like predictor is subspace containment asymmetry in the S_lowdin representation under the Bayesian-GMM/Gavish-Donoho specification, yielding rho = 0.906. Operator/density containment produces an almost identical result (rho = 0.905), indicating that the effect is not limited to one representation of the subspace relation. Sequential QSM asymmetry is weaker but still substantial at the family level (rho = 0.735). In contrast, the best classical cosine baseline is effectively uninformative for H1 (rho = 0.095, FDR = 0.691), which confirms that symmetric vector similarity is not an adequate explanation of forced-choice asymmetry.

However, the frequency/dimensionality baseline remains extremely competitive. The best scalar directional contrast, diff_marchenko_pastur_a_minus_b, correlates with H1 at rho = -0.928, slightly exceeding the best quantum-like metric in absolute magnitude. The nested OLS comparison reinforces this point: the frequency/dimensionality-only model explains R² = 0.826 of the item-level asymmetry, whereas the quantum-like-only model explains R² = 0.754. Adding the best quantum-like metric to the frequency/dimensionality baseline increases R² only marginally to 0.832. Thus, for H1, containment asymmetry is theoretically aligned with the behavioral effect, but much of its predictive strength appears to overlap with scalar differences in concept prominence or representational richness.

The main conclusion is therefore not that the quantum-like model fails. Rather, the result suggests that containment asymmetry may formalize a relational version of the same prominence imbalance captured by dimensionality and frequency. The stronger claim for later analyses should be tested through residual, partial, or multivariate models: containment must be evaluated not only as a correlate of asymmetry, but as a potentially richer geometrical account of why prominence imbalance becomes directional similarity asymmetry.

9 H2: forced-choice salience

Code
h2_rank_all <- cor_by_group(h2_metric_data, rank_group_cols, x = "metric_value", y = "human_value", method = "spearman") %>%
  mutate(analysis_block = "H2 forced-choice salience", .before = 1)

h2_rank_directional <- h2_rank_all %>%
  filter(metric_source != "classical_baselines", is_asymmetry_metric(metric_name)) %>%
  arrange(desc(abs_estimate), p.value)

h2_rank_family_winners <- best_by_family(h2_rank_all)

h2_benchmark_summary <- bind_rows(
  h2_rank_directional %>% slice_head(n = 1) %>% mutate(benchmark = "Best quantum-like directional metric"),
  h2_rank_all %>% filter(metric_source == "classical_baselines", str_detect(metric_name, "cosine")) %>% slice_max(abs_estimate, n = 1, with_ties = FALSE) %>% mutate(benchmark = "Best classical cosine"),
  h2_fd_rank %>% slice_head(n = 1) %>% transmute(
    analysis_block = "H2 forced-choice salience",
    metric_id = predictor,
    metric_source = "frequency_dimensionality_baseline",
    metric_family = "Frequency/dimensionality difference",
    metric_name = predictor,
    metric_short = predictor,
    variant = NA_character_,
    variant_label = NA_character_,
    cluster_method = NA_character_,
    global_k_method = NA_character_,
    local_k_method = NA_character_,
    basis_object = NA_character_,
    object = NA_character_,
    state_vector_source = NA_character_,
    state_type = NA_character_,
    metric_direction = "directional_difference",
    n, estimate, p.value, method, p_fdr, abs_estimate,
    benchmark = "Best frequency/dimensionality difference"
  )
) %>%
  select(benchmark, everything())

show_table(h2_rank_directional %>% slice_head(n = params$top_n), "Table 11. H2 top quantum-like directional metrics.")


Table: Table 11. H2 top quantum-like directional metrics.

|analysis_block            |metric_id                                                                                                                                                                               |metric_source                     |metric_family               |metric_name                     |metric_short          |variant                                                |variant_label                                                |cluster_method |global_k_method |local_k_method |basis_object                 |object                       |state_vector_source |state_type |metric_direction      |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:-------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:---------------------------|:-------------------------------|:---------------------|:------------------------------------------------------|:------------------------------------------------------------|:--------------|:---------------|:--------------|:----------------------------|:----------------------------|:-------------------|:----------|:---------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.896|       0|spearman |     0|        0.896|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                             |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.896|       0|spearman |     0|        0.896|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;              |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|   -0.895|       0|spearman |     0|        0.895|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_lowdin &#124;  &#124;                     |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.895|       0|spearman |     0|        0.895|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;                   |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|   -0.885|       0|spearman |     0|        0.885|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; P_lowdin &#124;  &#124;                          |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.885|       0|spearman |     0|        0.885|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.885|       0|spearman |     0|        0.885|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                  |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.885|       0|spearman |     0|        0.885|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_freq &#124;  &#124;       |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |projector_mixture_freq       |projector_mixture_freq       |NA                  |NA         |directional_asymmetry | 30|   -0.796|       0|spearman |     0|        0.796|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_fit_global &#124;  &#124; |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho   |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho   |bayesian_gmm   |gavish_donoho   |gavish_donoho  |projector_mixture_fit_global |projector_mixture_fit_global |NA                  |NA         |directional_asymmetry | 30|   -0.794|       0|spearman |     0|        0.794|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; P_concat_direct &#124;  &#124;                 |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa      |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa      |gmm_bic        |permutation_pa  |permutation_pa |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|   -0.785|       0|spearman |     0|        0.785|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; P_lowdin &#124;  &#124;                        |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa      |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa      |gmm_bic        |permutation_pa  |permutation_pa |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.785|       0|spearman |     0|        0.785|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                                |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa      |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa      |gmm_bic        |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.785|       0|spearman |     0|        0.785|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-gmm_bic__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                                |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-gmm_bic__g-permutation_pa__l-permutation_pa      |gmm_bic &#124; g=permutation_pa &#124; l=permutation_pa      |gmm_bic        |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.785|       0|spearman |     0|        0.785|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_fit_global &#124;  &#124;      |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |projector_mixture_fit_global |projector_mixture_fit_global |NA                  |NA         |directional_asymmetry | 30|   -0.783|       0|spearman |     0|        0.783|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-permutation_pa__l-permutation_pa &#124; P_concat_direct &#124;  &#124;            |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-permutation_pa__l-permutation_pa |bayesian_gmm &#124; g=permutation_pa &#124; l=permutation_pa |bayesian_gmm   |permutation_pa  |permutation_pa |P_concat_direct              |P_concat_direct              |NA                  |NA         |directional_asymmetry | 30|   -0.774|       0|spearman |     0|        0.774|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-permutation_pa__l-permutation_pa &#124; P_lowdin &#124;  &#124;                   |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-permutation_pa__l-permutation_pa |bayesian_gmm &#124; g=permutation_pa &#124; l=permutation_pa |bayesian_gmm   |permutation_pa  |permutation_pa |P_lowdin                     |P_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.774|       0|spearman |     0|        0.774|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                           |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b |Containment asymmetry |clust-bayesian_gmm__g-permutation_pa__l-permutation_pa |bayesian_gmm &#124; g=permutation_pa &#124; l=permutation_pa |bayesian_gmm   |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.774|       0|spearman |     0|        0.774|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; qsm_neutral_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-permutation_pa__l-permutation_pa &#124; S_lowdin &#124;  &#124;                           |pairwise_subspace_metrics         |Subspace/projector geometry |qsm_neutral_asymmetry_a_minus_b |Neutral QSM asymmetry |clust-bayesian_gmm__g-permutation_pa__l-permutation_pa |bayesian_gmm &#124; g=permutation_pa &#124; l=permutation_pa |bayesian_gmm   |permutation_pa  |permutation_pa |S_lowdin                     |S_lowdin                     |NA                  |NA         |directional_asymmetry | 30|   -0.774|       0|spearman |     0|        0.774|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; projector_mixture_freq &#124;  &#124;            |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b |Containment asymmetry |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho        |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho        |gmm_bic        |gavish_donoho   |gavish_donoho  |projector_mixture_freq       |projector_mixture_freq       |NA                  |NA         |directional_asymmetry | 30|   -0.747|       0|spearman |     0|        0.747|
Code
show_table(h2_rank_family_winners, "Table 12. H2 best metric by family.")


Table: Table 12. H2 best metric by family.

|analysis_block            |metric_id                                                                                                                                                                                        |metric_source                     |metric_family               |metric_name                       |metric_short                   |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object    |object          |state_vector_source |state_type          |metric_direction      |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:-------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:---------------------------|:---------------------------------|:------------------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:---------------|:---------------|:-------------------|:-------------------|:---------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;                                      |pairwise_subspace_metrics         |Subspace/projector geometry |containment_asymmetry_a_minus_b   |Containment asymmetry          |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin        |S_lowdin        |NA                  |NA                  |directional_asymmetry | 30|   -0.896|   0.000|spearman | 0.000|        0.896|
|H2 forced-choice salience |pairwise_operator_density_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; P_concat_direct &#124;  &#124;                       |pairwise_operator_density_metrics |Operator/density geometry   |containment_asymmetry_a_minus_b   |Containment asymmetry          |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |P_concat_direct |P_concat_direct |NA                  |NA                  |directional_asymmetry | 30|   -0.895|   0.000|spearman | 0.000|        0.895|
|H2 forced-choice salience |pairwise_qsm_state_metrics &#124; qsm_asymmetry_a_to_b_minus_b_to_a &#124; clust-bayesian_gmm__g-horn_wishart__l-horn_wishart &#124; S_global &#124; contour_centroid &#124; state_pair_midpoint |pairwise_qsm_state_metrics        |Sequential QSM              |qsm_asymmetry_a_to_b_minus_b_to_a |QSM state asymmetry            |clust-bayesian_gmm__g-horn_wishart__l-horn_wishart   |bayesian_gmm &#124; g=horn_wishart &#124; l=horn_wishart   |bayesian_gmm   |horn_wishart    |horn_wishart   |S_global        |S_global        |contour_centroid    |state_pair_midpoint |directional_asymmetry | 30|   -0.709|   0.000|spearman | 0.000|        0.709|
|H2 forced-choice salience |classical_baselines &#124; classical_lsa_term_dot_product &#124; classical &#124;  &#124; lsa_term &#124; vector                                                                                 |classical_baselines               |Classical vector baseline   |classical_lsa_term_dot_product    |classical lsa term dot product |classical                                            |classical                                                  |NA             |NA              |NA             |NA              |lsa_term        |lsa_term            |vector              |similarity_or_overlap | 30|   -0.239|   0.204|spearman | 0.292|        0.239|
Code
show_table(h2_benchmark_summary, "Table 13. H2 benchmark summary.")


Table: Table 13. H2 benchmark summary.

|benchmark                                |analysis_block            |metric_id                                                                                                                                                   |metric_source                     |metric_family                       |metric_name                       |metric_short                     |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object |object           |state_vector_source |state_type |metric_direction       |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:----------------------------------------|:-------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:-----------------------------------|:---------------------------------|:--------------------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:------------|:----------------|:-------------------|:----------|:----------------------|--:|--------:|-------:|:--------|-----:|------------:|
|Best quantum-like directional metric     |H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124; |pairwise_subspace_metrics         |Subspace/projector geometry         |containment_asymmetry_a_minus_b   |Containment asymmetry            |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin     |S_lowdin         |NA                  |NA         |directional_asymmetry  | 30|   -0.896|   0.000|spearman |  0.00|        0.896|
|Best classical cosine                    |H2 forced-choice salience |classical_baselines &#124; classical_contour_centroid_cosine &#124; classical &#124;  &#124; contour_centroid &#124; vector                                 |classical_baselines               |Classical vector baseline           |classical_contour_centroid_cosine |Contour-centroid cosine          |classical                                            |classical                                                  |NA             |NA              |NA             |NA           |contour_centroid |contour_centroid    |vector     |similarity_or_overlap  | 30|    0.104|   0.586|spearman |  0.66|        0.104|
|Best frequency/dimensionality difference |H2 forced-choice salience |diff_log_n_occurrences_a_minus_b                                                                                                                            |frequency_dimensionality_baseline |Frequency/dimensionality difference |diff_log_n_occurrences_a_minus_b  |diff_log_n_occurrences_a_minus_b |NA                                                   |NA                                                         |NA             |NA              |NA             |NA           |NA               |NA                  |NA         |directional_difference | 30|    0.937|   0.000|spearman |  0.00|        0.937|
Code
write_table(h2_rank_all, "table_11a_h2_all_metric_rankings.csv")
write_table(h2_rank_directional, "table_11_h2_top_quantum_directional_rankings.csv")
write_table(h2_rank_family_winners, "table_12_h2_best_metric_by_family.csv")
write_table(h2_benchmark_summary, "table_13_h2_benchmark_summary.csv")

h2_plot <- plot_ranked_correlations(
  h2_rank_directional,
  title = "H2: top quantum-like directional metrics",
  subtitle = "Correlations use metrics oriented to the human first/second item order.",
  n = min(params$top_n, 15),
  filename = "fig_02_h2_top_quantum_directional_metrics.png"
)
show_plot(h2_plot)

Code
h2_best_quantum <- h2_rank_directional %>% slice_head(n = 1)
h2_best_fd <- h2_fd_rank %>% slice_head(n = 1)

if (nrow(h2_best_quantum) > 0 && nrow(h2_best_fd) > 0) {
  h2_quantum_predictor <- "best_quantum_metric"
  h2_fd_predictor <- "best_fd_metric"

  h2_nested_data <- h2_metric_data %>%
    filter(metric_id == h2_best_quantum$metric_id[[1]]) %>%
    select(pair_id, human_value, best_quantum_metric = metric_value) %>%
    left_join(
      h2_with_fd %>% select(pair_id, best_fd_metric = all_of(h2_best_fd$predictor[[1]])),
      by = "pair_id"
    )

  h2_nested_summary <- bind_rows(
    fit_lm_summary(h2_nested_data, "human_value", c(h2_fd_predictor), "FD baseline only"),
    fit_lm_summary(h2_nested_data, "human_value", c(h2_quantum_predictor), "Quantum-like metric only"),
    fit_lm_summary(h2_nested_data, "human_value", c(h2_fd_predictor, h2_quantum_predictor), "FD + quantum-like metric")
  )
} else {
  h2_nested_data <- tibble()
  h2_nested_summary <- tibble()
}

show_table(h2_nested_summary, "Table 14. H2 schematic nested OLS comparison.")


Table: Table 14. H2 schematic nested OLS comparison.

|model                    |  n|predictors                           | r.squared| adj.r.squared|    AIC|    BIC| p.value| df| df.residual|status | sigma| statistic| logLik| deviance| nobs|
|:------------------------|--:|:------------------------------------|---------:|-------------:|------:|------:|-------:|--:|-----------:|:------|-----:|---------:|------:|--------:|----:|
|FD baseline only         | 30|best_fd_metric                       |     0.824|         0.818| 11.922| 16.125|       0|  1|          28|ok     | 0.276|   131.229| -2.961|    2.140|   30|
|Quantum-like metric only | 30|best_quantum_metric                  |     0.800|         0.793| 15.800| 20.004|       0|  1|          28|ok     | 0.295|   111.919| -4.900|    2.435|   30|
|FD + quantum-like metric | 30|best_fd_metric + best_quantum_metric |     0.851|         0.840|  9.016| 14.621|       0|  2|          27|ok     | 0.259|    76.909| -0.508|    1.817|   30|
Code
write_table(h2_nested_data, "data_h2_nested_model_data.csv")
write_table(h2_nested_summary, "table_14_h2_nested_ols_comparison.csv")
Code
h2_benchmark_plot <- plot_benchmark_strength(
  h2_benchmark_summary,
  title = "H2 benchmark comparison",
  subtitle = "Frequency and dimensionality are the strongest zero-order predictors, with containment very close behind.",
  filename = "fig_08_h2_benchmark_strength.png"
)
show_plot(h2_benchmark_plot)

Code
h2_model_plot <- plot_nested_r2(
  h2_nested_summary,
  title = "H2 nested model comparison",
  subtitle = "The combined model improves over both single-predictor models, but the gain is modest.",
  filename = "fig_09_h2_nested_model_r2.png"
)
show_plot(h2_model_plot)

Code
h2_predictor_scatter <- plot_predictor_scatter(
  h2_nested_data,
  title = "H2 human salience against the two strongest predictors",
  subtitle = "The sign reversal relative to H1 is consistent with the salience-asymmetry interpretation.",
  filename = "fig_10_h2_predictor_scatter.png"
)
show_plot(h2_predictor_scatter)

Interpretation. H2 shows the complementary side of the same directional structure observed in H1. The best quantum-like metric is again subspace containment asymmetry under the Bayesian-GMM/Gavish-Donoho specification in the S_lowdin basis, with rho = -0.896. Operator/density containment is virtually identical (rho = -0.895), while sequential QSM asymmetry is weaker but still robust (rho = -0.709). The negative sign is not problematic; it reflects the coding relation between salience choice and the direction of asymmetry. The relevant point is the magnitude and consistency of the directional association.

The classical cosine baseline again performs poorly for the directional task. The best classical cosine reaches only rho = 0.104 and is not statistically reliable. This confirms that H2 is not primarily a symmetric semantic-proximity phenomenon. Instead, it is strongly associated with directional differences in concept prominence. The strongest frequency/dimensionality predictor is diff_log_n_occurrences_a_minus_b, with rho = 0.937, followed closely by the Marchenko-Pastur dimensionality contrast. The sign now reverses relative to H1 because H2 directly indexes which item is judged more salient.

The nested models provide a useful qualification. Frequency/dimensionality alone explains R² = 0.824, while the quantum-like metric alone explains R² = 0.800. The combined model increases explained variance to R² = 0.851. This is a modest but more visible gain than in H1, suggesting that containment may capture some relational information not fully reducible to log-frequency difference. Nevertheless, the improvement is not large enough to claim independent explanatory dominance. The appropriate interpretation is that H2 is very strongly structured by corpus prominence, with quantum-like containment providing a closely aligned relational formalization.

10 H3: scalar similarity

Code
h3_rank_all <- cor_by_group(h3_metric_data, rank_group_cols, x = "metric_value", y = "human_value", method = "spearman") %>%
  mutate(analysis_block = "H3 scalar similarity", .before = 1)

h3_rank_family_winners <- best_by_family(h3_rank_all)

h3_benchmark_summary <- bind_rows(
  h3_rank_all %>% filter(metric_source != "classical_baselines") %>% slice_max(abs_estimate, n = 1, with_ties = FALSE) %>% mutate(benchmark = "Best quantum-like metric"),
  h3_rank_all %>% filter(metric_source == "classical_baselines", str_detect(metric_name, "contour_centroid.*cosine")) %>% slice_max(abs_estimate, n = 1, with_ties = FALSE) %>% mutate(benchmark = "Contour-centroid cosine"),
  h3_rank_all %>% filter(metric_source == "classical_baselines", str_detect(metric_name, "lsa_term.*cosine")) %>% slice_max(abs_estimate, n = 1, with_ties = FALSE) %>% mutate(benchmark = "LSA term cosine")
) %>%
  select(benchmark, everything())

show_table(h3_rank_all %>% slice_head(n = params$top_n), "Table 15. H3 top metrics across all pairwise metric families.")


Table: Table 15. H3 top metrics across all pairwise metric families.

|analysis_block       |metric_id                                                                                                                                                                            |metric_source                     |metric_family             |metric_name                                   |metric_short                 |variant                                                        |variant_label                                                        |cluster_method |global_k_method    |local_k_method     |basis_object           |object                 |state_vector_source |state_type |metric_direction                |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:--------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:-------------------------|:---------------------------------------------|:----------------------------|:--------------------------------------------------------------|:--------------------------------------------------------------------|:--------------|:------------------|:------------------|:----------------------|:----------------------|:-------------------|:----------|:-------------------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H3 scalar similarity |classical_baselines &#124; classical_contour_centroid_angular_distance &#124; classical &#124;  &#124; contour_centroid &#124; vector                                                |classical_baselines               |Classical vector baseline |classical_contour_centroid_angular_distance   |Angular distance, reversed   |classical                                                      |classical                                                            |NA             |NA                 |NA                 |NA                     |contour_centroid       |contour_centroid    |vector     |distance_reversed_to_similarity | 89|    0.510|       0|spearman | 0.000|        0.510|
|H3 scalar similarity |classical_baselines &#124; classical_contour_centroid_cosine &#124; classical &#124;  &#124; contour_centroid &#124; vector                                                          |classical_baselines               |Classical vector baseline |classical_contour_centroid_cosine             |Contour-centroid cosine      |classical                                                      |classical                                                            |NA             |NA                 |NA                 |NA                     |contour_centroid       |contour_centroid    |vector     |similarity_or_overlap           | 89|    0.510|       0|spearman | 0.000|        0.510|
|H3 scalar similarity |classical_baselines &#124; classical_contour_centroid_euclidean_distance &#124; classical &#124;  &#124; contour_centroid &#124; vector                                              |classical_baselines               |Classical vector baseline |classical_contour_centroid_euclidean_distance |Euclidean distance, reversed |classical                                                      |classical                                                            |NA             |NA                 |NA                 |NA                     |contour_centroid       |contour_centroid    |vector     |distance_reversed_to_similarity | 89|    0.495|       0|spearman | 0.000|        0.495|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124;                  |pairwise_operator_density_metrics |Operator/density geometry |a_in_b_trace_normalized                       |a in b trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_freq_density       |rho_freq_density       |NA                  |NA         |similarity_or_overlap           | 89|    0.448|       0|spearman | 0.001|        0.448|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; b_in_a_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124;                  |pairwise_operator_density_metrics |Operator/density geometry |b_in_a_trace_normalized                       |b in a trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_freq_density       |rho_freq_density       |NA                  |NA         |similarity_or_overlap           | 89|    0.448|       0|spearman | 0.001|        0.448|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; symmetric_trace_normalized_overlap &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124;       |pairwise_operator_density_metrics |Operator/density geometry |symmetric_trace_normalized_overlap            |Trace-normalized overlap     |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_freq_density       |rho_freq_density       |NA                  |NA         |similarity_or_overlap           | 89|    0.448|       0|spearman | 0.001|        0.448|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; trace_inner &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124;                              |pairwise_operator_density_metrics |Operator/density geometry |trace_inner                                   |trace inner                  |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_freq_density       |rho_freq_density       |NA                  |NA         |similarity_or_overlap           | 89|    0.448|       0|spearman | 0.001|        0.448|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                |pairwise_operator_density_metrics |Operator/density geometry |a_in_b_trace_normalized                       |a in b trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                     |pairwise_operator_density_metrics |Operator/density geometry |a_in_b_trace_normalized                       |a in b trace normalized      |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho                |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho                |gmm_bic        |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; b_in_a_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                |pairwise_operator_density_metrics |Operator/density geometry |b_in_a_trace_normalized                       |b in a trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; b_in_a_trace_normalized &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                     |pairwise_operator_density_metrics |Operator/density geometry |b_in_a_trace_normalized                       |b in a trace normalized      |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho                |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho                |gmm_bic        |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; symmetric_trace_normalized_overlap &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;     |pairwise_operator_density_metrics |Operator/density geometry |symmetric_trace_normalized_overlap            |Trace-normalized overlap     |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; symmetric_trace_normalized_overlap &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;          |pairwise_operator_density_metrics |Operator/density geometry |symmetric_trace_normalized_overlap            |Trace-normalized overlap     |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho                |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho                |gmm_bic        |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; trace_inner &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                            |pairwise_operator_density_metrics |Operator/density geometry |trace_inner                                   |trace inner                  |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; trace_inner &#124; clust-gmm_bic__g-gavish_donoho__l-gavish_donoho &#124; rho_global_density &#124;  &#124;                                 |pairwise_operator_density_metrics |Operator/density geometry |trace_inner                                   |trace inner                  |clust-gmm_bic__g-gavish_donoho__l-gavish_donoho                |gmm_bic &#124; g=gavish_donoho &#124; l=gavish_donoho                |gmm_bic        |gavish_donoho      |gavish_donoho      |rho_global_density     |rho_global_density     |NA                  |NA         |similarity_or_overlap           | 89|    0.445|       0|spearman | 0.001|        0.445|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_fit_global_density &#124;  &#124;            |pairwise_operator_density_metrics |Operator/density geometry |a_in_b_trace_normalized                       |a in b trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_fit_global_density |rho_fit_global_density |NA                  |NA         |similarity_or_overlap           | 89|    0.443|       0|spearman | 0.001|        0.443|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; b_in_a_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_fit_global_density &#124;  &#124;            |pairwise_operator_density_metrics |Operator/density geometry |b_in_a_trace_normalized                       |b in a trace normalized      |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_fit_global_density |rho_fit_global_density |NA                  |NA         |similarity_or_overlap           | 89|    0.443|       0|spearman | 0.001|        0.443|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; symmetric_trace_normalized_overlap &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_fit_global_density &#124;  &#124; |pairwise_operator_density_metrics |Operator/density geometry |symmetric_trace_normalized_overlap            |Trace-normalized overlap     |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_fit_global_density |rho_fit_global_density |NA                  |NA         |similarity_or_overlap           | 89|    0.443|       0|spearman | 0.001|        0.443|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; trace_inner &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_fit_global_density &#124;  &#124;                        |pairwise_operator_density_metrics |Operator/density geometry |trace_inner                                   |trace inner                  |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_fit_global_density |rho_fit_global_density |NA                  |NA         |similarity_or_overlap           | 89|    0.443|       0|spearman | 0.001|        0.443|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; trace_inner &#124; clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood &#124; P_global &#124;  &#124;                            |pairwise_operator_density_metrics |Operator/density geometry |trace_inner                                   |trace inner                  |clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood |bayesian_gmm &#124; g=profile_likelihood &#124; l=profile_likelihood |bayesian_gmm   |profile_likelihood |profile_likelihood |P_global               |P_global               |NA                  |NA         |similarity_or_overlap           | 89|    0.423|       0|spearman | 0.001|        0.423|
Code
show_table(h3_rank_family_winners, "Table 16. H3 best metric by family.")


Table: Table 16. H3 best metric by family.

|analysis_block       |metric_id                                                                                                                                                                                                 |metric_source                     |metric_family               |metric_name                                 |metric_short               |variant                                                        |variant_label                                                        |cluster_method |global_k_method    |local_k_method     |basis_object     |object           |state_vector_source |state_type       |metric_direction                |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:--------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:---------------------------|:-------------------------------------------|:--------------------------|:--------------------------------------------------------------|:--------------------------------------------------------------------|:--------------|:------------------|:------------------|:----------------|:----------------|:-------------------|:----------------|:-------------------------------|--:|--------:|-------:|:--------|-----:|------------:|
|H3 scalar similarity |classical_baselines &#124; classical_contour_centroid_angular_distance &#124; classical &#124;  &#124; contour_centroid &#124; vector                                                                     |classical_baselines               |Classical vector baseline   |classical_contour_centroid_angular_distance |Angular distance, reversed |classical                                                      |classical                                                            |NA             |NA                 |NA                 |NA               |contour_centroid |contour_centroid    |vector           |distance_reversed_to_similarity | 89|    0.510|       0|spearman | 0.000|        0.510|
|H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124;                                       |pairwise_operator_density_metrics |Operator/density geometry   |a_in_b_trace_normalized                     |a in b trace normalized    |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho           |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho           |bayesian_gmm   |gavish_donoho      |gavish_donoho      |rho_freq_density |rho_freq_density |NA                  |NA               |similarity_or_overlap           | 89|    0.448|       0|spearman | 0.001|        0.448|
|H3 scalar similarity |pairwise_subspace_metrics &#124; principal_overlap_trace &#124; clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood &#124; S_global &#124;  &#124;                                             |pairwise_subspace_metrics         |Subspace/projector geometry |principal_overlap_trace                     |principal overlap trace    |clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood |bayesian_gmm &#124; g=profile_likelihood &#124; l=profile_likelihood |bayesian_gmm   |profile_likelihood |profile_likelihood |S_global         |S_global         |NA                  |NA               |similarity_or_overlap           | 89|    0.423|       0|spearman | 0.001|        0.423|
|H3 scalar similarity |pairwise_qsm_state_metrics &#124; qsm_asymmetry_a_to_b_minus_b_to_a &#124; clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood &#124; S_global &#124; contour_centroid &#124; state_b_centroid |pairwise_qsm_state_metrics        |Sequential QSM              |qsm_asymmetry_a_to_b_minus_b_to_a           |QSM state asymmetry        |clust-bayesian_gmm__g-profile_likelihood__l-profile_likelihood |bayesian_gmm &#124; g=profile_likelihood &#124; l=profile_likelihood |bayesian_gmm   |profile_likelihood |profile_likelihood |S_global         |S_global         |contour_centroid    |state_b_centroid |directional_asymmetry           | 89|   -0.373|       0|spearman | 0.008|        0.373|
Code
show_table(h3_benchmark_summary, "Table 17. H3 benchmark summary.")


Table: Table 17. H3 benchmark summary.

|benchmark                |analysis_block       |metric_id                                                                                                                                                           |metric_source                     |metric_family             |metric_name                       |metric_short            |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object     |object           |state_vector_source |state_type |metric_direction      |  n| estimate| p.value|method   | p_fdr| abs_estimate|
|:------------------------|:--------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|:-------------------------|:---------------------------------|:-----------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:----------------|:----------------|:-------------------|:----------|:---------------------|--:|--------:|-------:|:--------|-----:|------------:|
|Best quantum-like metric |H3 scalar similarity |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124; |pairwise_operator_density_metrics |Operator/density geometry |a_in_b_trace_normalized           |a in b trace normalized |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |rho_freq_density |rho_freq_density |NA                  |NA         |similarity_or_overlap | 89|    0.448|   0.000|spearman | 0.001|        0.448|
|Contour-centroid cosine  |H3 scalar similarity |classical_baselines &#124; classical_contour_centroid_cosine &#124; classical &#124;  &#124; contour_centroid &#124; vector                                         |classical_baselines               |Classical vector baseline |classical_contour_centroid_cosine |Contour-centroid cosine |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |contour_centroid |contour_centroid    |vector     |similarity_or_overlap | 89|    0.510|   0.000|spearman | 0.000|        0.510|
|LSA term cosine          |H3 scalar similarity |classical_baselines &#124; classical_lsa_term_cosine &#124; classical &#124;  &#124; lsa_term &#124; vector                                                         |classical_baselines               |Classical vector baseline |classical_lsa_term_cosine         |LSA term cosine         |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |lsa_term         |lsa_term            |vector     |similarity_or_overlap | 89|    0.268|   0.011|spearman | 0.096|        0.268|
Code
write_table(h3_rank_all, "table_15_h3_all_metric_rankings.csv")
write_table(h3_rank_family_winners, "table_16_h3_best_metric_by_family.csv")
write_table(h3_benchmark_summary, "table_17_h3_benchmark_summary.csv")

h3_plot <- plot_ranked_correlations(
  h3_rank_all,
  title = "H3: top pairwise metrics for scalar similarity",
  subtitle = "Distance metrics are sign-reversed so larger values mean greater predicted similarity.",
  n = min(params$top_n, 15),
  filename = "fig_03_h3_top_pairwise_metrics.png"
)
show_plot(h3_plot)

Code
h3_landscape_plot <- plot_h3_metric_landscape(
  h3_rank_all,
  title = "H3 metric landscape across pairwise families",
  subtitle = "All valid metric correlations are shown; highlighted points mark the best metric within each family.",
  filename = "fig_11_h3_metric_landscape.png"
)
show_plot(h3_landscape_plot)

Code
h3_benchmark_plot <- plot_benchmark_strength(
  h3_benchmark_summary,
  title = "H3 benchmark comparison",
  subtitle = "Scalar similarity is best captured by the contour-centroid classical baseline.",
  filename = "fig_12_h3_benchmark_strength.png"
)
show_plot(h3_benchmark_plot)

Code
h3_benchmark_scatter <- plot_h3_benchmark_scatter(
  h3_metric_data,
  h3_benchmark_summary,
  title = "H3 human similarity against the main benchmark metrics",
  subtitle = "Values are standardized within benchmark to compare the shape of the association.",
  filename = "fig_13_h3_benchmark_scatter.png"
)
show_plot(h3_benchmark_scatter)

Interpretation. H3 differs sharply from H1 and H2. For scalar order-averaged similarity, the strongest predictor is not a quantum-like metric but the classical contour-centroid baseline. Contour-centroid cosine and its distance-equivalent transformations reach rho = 0.510, whereas direct LSA term cosine reaches only rho = 0.268. This replicates and strengthens the Block 2 conclusion: contextualized centroid representations carry substantially more information about scalar similarity than isolated static term vectors.

The best quantum-like metric for H3 is an operator/density overlap measure, a_in_b_trace_normalized, in the rho_freq_density representation, with rho = 0.448. This is statistically reliable and theoretically relevant, but it does not outperform the contour-centroid cosine. Subspace/projector overlap also performs reasonably (rho = 0.423), while sequential QSM is weaker for scalar similarity (best family-level rho = -0.373). Therefore, for H3, the quantum-like machinery does not provide the strongest predictive account. It remains competitive, but the classical contextual vector baseline is superior.

The theoretical implication is important. Scalar similarity seems to be well captured by symmetric contextual proximity, whereas directional asymmetry and salience require asymmetric or directional predictors. This supports a division of labor rather than a universal superiority claim: classical centroid representations are strong for symmetric similarity judgments, while containment-type metrics become relevant when the behavioral target itself is directional. This distinction should be central in the paper, because it avoids the weaker claim that quantum-like metrics are simply better everywhere. They are not; their advantage is task-structured.

11 Compact cross-hypothesis triage

Code
cross_hypothesis_top <- bind_rows(
  h1_benchmark_summary %>% mutate(hypothesis_short = "H1"),
  h2_benchmark_summary %>% mutate(hypothesis_short = "H2"),
  h3_benchmark_summary %>% mutate(hypothesis_short = "H3")
) %>%
  select(hypothesis_short, benchmark, metric_family, metric_source, metric_name, metric_short, n, estimate, p.value, p_fdr, abs_estimate, everything())

show_table(cross_hypothesis_top, "Table 18. Compact benchmark triage across H1, H2, and H3.")


Table: Table 18. Compact benchmark triage across H1, H2, and H3.

|hypothesis_short |benchmark                                |metric_family                       |metric_source                     |metric_name                       |metric_short                     |  n| estimate| p.value| p_fdr| abs_estimate|analysis_block            |metric_id                                                                                                                                                           |variant                                              |variant_label                                              |cluster_method |global_k_method |local_k_method |basis_object     |object           |state_vector_source |state_type |metric_direction       |method   |
|:----------------|:----------------------------------------|:-----------------------------------|:---------------------------------|:---------------------------------|:--------------------------------|--:|--------:|-------:|-----:|------------:|:-------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------|:----------------------------------------------------------|:--------------|:---------------|:--------------|:----------------|:----------------|:-------------------|:----------|:----------------------|:--------|
|H1               |Best quantum-like directional metric     |Subspace/projector geometry         |pairwise_subspace_metrics         |containment_asymmetry_a_minus_b   |Containment asymmetry            | 30|    0.906|   0.000| 0.000|        0.906|H1 ipsative asymmetry     |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;         |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin         |S_lowdin         |NA                  |NA         |directional_asymmetry  |spearman |
|H1               |Best classical cosine                    |Classical vector baseline           |classical_baselines               |classical_lsa_term_cosine         |LSA term cosine                  | 30|    0.095|   0.616| 0.691|        0.095|H1 ipsative asymmetry     |classical_baselines &#124; classical_lsa_term_cosine &#124; classical &#124;  &#124; lsa_term &#124; vector                                                         |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |lsa_term         |lsa_term            |vector     |similarity_or_overlap  |spearman |
|H1               |Best frequency/dimensionality difference |Frequency/dimensionality difference |frequency_dimensionality_baseline |diff_marchenko_pastur_a_minus_b   |diff_marchenko_pastur_a_minus_b  | 30|   -0.928|   0.000| 0.000|        0.928|H1 ipsative asymmetry     |diff_marchenko_pastur_a_minus_b                                                                                                                                     |NA                                                   |NA                                                         |NA             |NA              |NA             |NA               |NA               |NA                  |NA         |directional_difference |spearman |
|H2               |Best quantum-like directional metric     |Subspace/projector geometry         |pairwise_subspace_metrics         |containment_asymmetry_a_minus_b   |Containment asymmetry            | 30|   -0.896|   0.000| 0.000|        0.896|H2 forced-choice salience |pairwise_subspace_metrics &#124; containment_asymmetry_a_minus_b &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; S_lowdin &#124;  &#124;         |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |S_lowdin         |S_lowdin         |NA                  |NA         |directional_asymmetry  |spearman |
|H2               |Best classical cosine                    |Classical vector baseline           |classical_baselines               |classical_contour_centroid_cosine |Contour-centroid cosine          | 30|    0.104|   0.586| 0.660|        0.104|H2 forced-choice salience |classical_baselines &#124; classical_contour_centroid_cosine &#124; classical &#124;  &#124; contour_centroid &#124; vector                                         |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |contour_centroid |contour_centroid    |vector     |similarity_or_overlap  |spearman |
|H2               |Best frequency/dimensionality difference |Frequency/dimensionality difference |frequency_dimensionality_baseline |diff_log_n_occurrences_a_minus_b  |diff_log_n_occurrences_a_minus_b | 30|    0.937|   0.000| 0.000|        0.937|H2 forced-choice salience |diff_log_n_occurrences_a_minus_b                                                                                                                                    |NA                                                   |NA                                                         |NA             |NA              |NA             |NA               |NA               |NA                  |NA         |directional_difference |spearman |
|H3               |Best quantum-like metric                 |Operator/density geometry           |pairwise_operator_density_metrics |a_in_b_trace_normalized           |a in b trace normalized          | 89|    0.448|   0.000| 0.001|        0.448|H3 scalar similarity      |pairwise_operator_density_metrics &#124; a_in_b_trace_normalized &#124; clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho &#124; rho_freq_density &#124;  &#124; |clust-bayesian_gmm__g-gavish_donoho__l-gavish_donoho |bayesian_gmm &#124; g=gavish_donoho &#124; l=gavish_donoho |bayesian_gmm   |gavish_donoho   |gavish_donoho  |rho_freq_density |rho_freq_density |NA                  |NA         |similarity_or_overlap  |spearman |
|H3               |Contour-centroid cosine                  |Classical vector baseline           |classical_baselines               |classical_contour_centroid_cosine |Contour-centroid cosine          | 89|    0.510|   0.000| 0.000|        0.510|H3 scalar similarity      |classical_baselines &#124; classical_contour_centroid_cosine &#124; classical &#124;  &#124; contour_centroid &#124; vector                                         |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |contour_centroid |contour_centroid    |vector     |similarity_or_overlap  |spearman |
|H3               |LSA term cosine                          |Classical vector baseline           |classical_baselines               |classical_lsa_term_cosine         |LSA term cosine                  | 89|    0.268|   0.011| 0.096|        0.268|H3 scalar similarity      |classical_baselines &#124; classical_lsa_term_cosine &#124; classical &#124;  &#124; lsa_term &#124; vector                                                         |classical                                            |classical                                                  |NA             |NA              |NA             |NA               |lsa_term         |lsa_term            |vector     |similarity_or_overlap  |spearman |
Code
write_table(cross_hypothesis_top, "table_18_cross_hypothesis_benchmark_triage.csv")

cross_hypothesis_plot <- plot_benchmark_triage(
  cross_hypothesis_top,
  filename = "fig_04_cross_hypothesis_benchmark_triage.png"
)
show_plot(cross_hypothesis_plot)

Interpretation. The cross-hypothesis triage summarizes the core pattern of Block 3A. For H1 and H2, quantum-like containment metrics strongly predict human directional effects, whereas classical cosines do not. At the same time, frequency/dimensionality contrasts are at least as strong as containment in zero-order association. For H3, the pattern reverses: the best classical contour-centroid similarity exceeds the best quantum-like metric, while direct LSA term cosine remains weaker.

The resulting interpretation should be framed as a differentiated computational account. Directional behavioral phenomena are primarily explained by directional prominence and containment-like relations; scalar similarity is best explained by contextual centroid proximity. The quantum-like framework is therefore most defensible when it is presented as a formal account of directional and relational structure, not as a blanket replacement for classical similarity models.

12 Exported files

Code
exported_tables <- list.files(file.path(output_dir, "tables"), full.names = FALSE)
exported_figures <- list.files(file.path(output_dir, "figures"), full.names = FALSE)
exported_data <- list.files(file.path(output_dir, "data"), full.names = FALSE)

export_summary <- tibble(
  folder = c("tables", "figures", "data"),
  n_files = c(length(exported_tables), length(exported_figures), length(exported_data)),
  files = c(
    paste(exported_tables, collapse = "; "),
    paste(exported_figures, collapse = "; "),
    paste(exported_data, collapse = "; ")
  )
)

show_table(export_summary, "Table 19. Exported Block 3A files.")


Table: Table 19. Exported Block 3A files.

|folder  | n_files|files                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|:-------|-------:|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|tables  |      31|data_h1_human_targets.csv; data_h1_metric_data_long.csv; data_h1_nested_model_data.csv; data_h1_with_frequency_dimensionality.csv; data_h2_human_targets.csv; data_h2_metric_data_long.csv; data_h2_nested_model_data.csv; data_h2_with_frequency_dimensionality.csv; data_h3_human_targets.csv; data_h3_metric_data_long.csv; data_pairwise_metric_values_human_pairs_long.csv; table_01_imported_objects.csv; table_02_human_pairwise_targets_inventory.csv; table_03_pairwise_metric_inventory.csv; table_04_human_aligned_metric_rows.csv; table_05_h1_frequency_dimensionality_baselines.csv; table_06_h2_frequency_dimensionality_baselines.csv; table_07_h1_top_quantum_directional_rankings.csv; table_07a_h1_all_metric_rankings.csv; table_08_h1_best_metric_by_family.csv; table_09_h1_benchmark_summary.csv; table_10_h1_nested_ols_comparison.csv; table_11_h2_top_quantum_directional_rankings.csv; table_11a_h2_all_metric_rankings.csv; table_12_h2_best_metric_by_family.csv; table_13_h2_benchmark_summary.csv; table_14_h2_nested_ols_comparison.csv; table_15_h3_all_metric_rankings.csv; table_16_h3_best_metric_by_family.csv; table_17_h3_benchmark_summary.csv; table_18_cross_hypothesis_benchmark_triage.csv |
|figures |      14|fig_00_frequency_dimensionality_directional_baselines.png; fig_01_h1_top_quantum_directional_metrics.png; fig_02_h2_top_quantum_directional_metrics.png; fig_03_h3_top_pairwise_metrics.png; fig_04_cross_hypothesis_benchmark_triage.png; fig_05_h1_benchmark_strength.png; fig_06_h1_nested_model_r2.png; fig_07_h1_predictor_scatter.png; fig_08_h2_benchmark_strength.png; fig_09_h2_nested_model_r2.png; fig_10_h2_predictor_scatter.png; fig_11_h3_metric_landscape.png; fig_12_h3_benchmark_strength.png; fig_13_h3_benchmark_scatter.png                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|data    |       0|                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |

13 Session information

Code
sessionInfo()
R version 4.4.2 (2024-10-31)
Platform: x86_64-pc-linux-gnu
Running under: Ubuntu 24.04.4 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
LAPACK: /usr/lib/x86_64-linux-gnu/openblas-pthread/libopenblasp-r0.3.26.so;  LAPACK version 3.12.0

locale:
 [1] LC_CTYPE=es_ES.UTF-8       LC_NUMERIC=C              
 [3] LC_TIME=es_ES.UTF-8        LC_COLLATE=es_ES.UTF-8    
 [5] LC_MONETARY=es_ES.UTF-8    LC_MESSAGES=es_ES.UTF-8   
 [7] LC_PAPER=es_ES.UTF-8       LC_NAME=C                 
 [9] LC_ADDRESS=C               LC_TELEPHONE=C            
[11] LC_MEASUREMENT=es_ES.UTF-8 LC_IDENTIFICATION=C       

time zone: Europe/Madrid
tzcode source: system (glibc)

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
 [1] fs_1.6.6        scales_1.4.0    knitr_1.51      broom_1.0.7    
 [5] vroom_1.6.5     lubridate_1.9.3 forcats_1.0.0   stringr_1.5.2  
 [9] dplyr_1.1.4     purrr_1.1.0     readr_2.1.6     tidyr_1.3.1    
[13] tibble_3.3.0    ggplot2_4.0.0   tidyverse_2.0.0

loaded via a namespace (and not attached):
 [1] generics_0.1.4     lattice_0.22-5     stringi_1.8.7      hms_1.1.3         
 [5] digest_0.6.37      magrittr_2.0.4     evaluate_1.0.5     grid_4.4.2        
 [9] timechange_0.3.0   RColorBrewer_1.1-3 fastmap_1.2.0      Matrix_1.7-1      
[13] jsonlite_2.0.0     backports_1.5.0    mgcv_1.9-3         textshaping_1.0.4 
[17] cli_3.6.5          rlang_1.1.6        crayon_1.5.3       splines_4.4.2     
[21] bit64_4.5.2        withr_3.0.2        yaml_2.3.10        tools_4.4.2       
[25] parallel_4.4.2     tzdb_0.4.0         vctrs_0.6.5        R6_2.6.1          
[29] lifecycle_1.0.4    htmlwidgets_1.6.4  bit_4.5.0          ragg_1.5.0        
[33] pkgconfig_2.0.3    pillar_1.11.1      gtable_0.3.6       glue_1.8.0        
[37] systemfonts_1.3.1  xfun_0.53          tidyselect_1.2.1   rstudioapi_0.17.1 
[41] farver_2.1.2       nlme_3.1-167       htmltools_0.5.8.1  labeling_0.4.3    
[45] rmarkdown_2.30     compiler_4.4.2     S7_0.2.0