Compare commits
505
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
bc4193316f | ||
|
|
c26c3f33f5 | ||
|
|
88e0b44d54 | ||
|
|
96d63b95a2 | ||
|
|
40f44932b6 | ||
|
|
9c1ae2737e | ||
|
|
4c8255e600 | ||
|
|
99dbd3ba47 | ||
|
|
4701f1ee87 | ||
|
|
6a929588c6 | ||
|
|
da63bff8d3 | ||
|
|
f790b2cb3e | ||
|
|
eb61f1a8b0 | ||
|
|
04c4f033f7 | ||
|
|
27433efe72 | ||
|
|
05eb4c49f7 | ||
|
|
ab87b87072 | ||
|
|
2878667727 | ||
|
|
68f1cae4d9 | ||
|
|
bd4305e0eb | ||
|
|
46bf66c910 | ||
|
|
1bfa0f113d | ||
|
|
1482e3fdc5 | ||
|
|
3f4b032e34 | ||
|
|
56ada07d97 | ||
|
|
2f509fbbfe | ||
|
|
2c03f53604 | ||
|
|
6609b64076 | ||
|
|
a1889f13f6 | ||
|
|
0854c16a0b | ||
|
|
50ff313a57 | ||
|
|
84073854bf | ||
|
|
9440605a6f | ||
|
|
24b7364894 | ||
|
|
767f532e6f | ||
|
|
a21d5eaea4 | ||
|
|
d8de0c2156 | ||
|
|
ba1c53b642 | ||
|
|
ef00947786 | ||
|
|
9a4a4de379 | ||
|
|
04e3f97b8b | ||
|
|
2bf8e03117 | ||
|
|
1219970ba8 | ||
|
|
5c50c29760 | ||
|
|
5343c3204d | ||
|
|
613640a730 | ||
|
|
3147de9fcb | ||
|
|
7d3792c7b4 | ||
|
|
eb5d6830a5 | ||
|
|
7da36d8777 | ||
|
|
21482f3c6f | ||
|
|
b772b100d5 | ||
|
|
bbce780609 | ||
|
|
d719a34ab0 | ||
|
|
57d0daa21b | ||
|
|
1ca3db5c78 | ||
|
|
c85d3fa03f | ||
|
|
ffc02a4e59 | ||
|
|
6c20dc2b58 | ||
|
|
24cc476dbe | ||
|
|
b2f55bd05a | ||
|
|
e153e2d74a | ||
|
|
171b296c2a | ||
|
|
435c4ae3db | ||
|
|
ac6b5aa72b | ||
|
|
e8be0ae8aa | ||
|
|
17e0909d69 | ||
|
|
3aa4c478f6 | ||
|
|
9ef9e334fd | ||
|
|
e7269c6bd2 | ||
|
|
5aff658c16 | ||
|
|
a40aca3dbe | ||
|
|
95662119b1 | ||
|
|
5b59aca4e6 | ||
|
|
83c809983c | ||
|
|
f5cd79a718 | ||
|
|
81b7e04b66 | ||
|
|
25cf39ff69 | ||
|
|
9a6bae2df4 | ||
|
|
6eb159cc03 | ||
|
|
6b7a036128 | ||
|
|
da70af9163 | ||
|
|
09e5af0016 | ||
|
|
203d9cb6d4 | ||
|
|
dde38bb680 | ||
|
|
e7b6255e54 | ||
|
|
0f9991b618 | ||
|
|
ac97c9f496 | ||
|
|
8261de4a02 | ||
|
|
f69b3cf871 | ||
|
|
6e7a8237ef | ||
|
|
c8e5a65f5d | ||
|
|
a6c4668d13 | ||
|
|
4338b1cc0e | ||
|
|
d5164f9863 | ||
|
|
86fc87f507 | ||
|
|
156e31643c | ||
|
|
dbe8f2449a | ||
|
|
9c593a0d09 | ||
|
|
a21030309e | ||
|
|
a8db8194cf | ||
|
|
ce218cbfa1 | ||
|
|
ae80f0f812 | ||
|
|
df5f131320 | ||
|
|
2f22240d94 | ||
|
|
77095c8549 | ||
|
|
c733442300 | ||
|
|
fed1e56c81 | ||
|
|
e0d1f0df5c | ||
|
|
27301bf6a5 | ||
|
|
bbd4ff8685 | ||
|
|
dbc53a9a49 | ||
|
|
0f0f30f08c | ||
|
|
6c3c43ef4f | ||
|
|
a5f6ccc75b | ||
|
|
cfa2c768eb | ||
|
|
54e0701698 | ||
|
|
4a61c00642 | ||
|
|
49c45cb924 | ||
|
|
ad14f60a2c | ||
|
|
2bcd1d4586 | ||
|
|
5d2d694a20 | ||
|
|
dc31b21dac | ||
|
|
d28a662da3 | ||
|
|
8a418a99b4 | ||
|
|
17100024e5 | ||
|
|
9b95728c7b | ||
|
|
4937889968 | ||
|
|
36773c4ae2 | ||
|
|
353d938d3e | ||
|
|
f02e510847 | ||
|
|
6e0acb9cde | ||
|
|
a0fdc8799b | ||
|
|
f4656fcf39 | ||
|
|
d73ee592ea | ||
|
|
c6e1051059 | ||
|
|
014364ec03 | ||
|
|
024724b51d | ||
|
|
7798cdaea5 | ||
|
|
a1b9f5a084 | ||
|
|
6f79733b3e | ||
|
|
9cb01cab45 | ||
|
|
fc30865f34 | ||
|
|
b2a8af532d | ||
|
|
bee9b6e8fd | ||
|
|
8d7323a387 | ||
|
|
6a6ec8662c | ||
|
|
c70e6bf489 | ||
|
|
82fa2e816b | ||
|
|
fbcee778d2 | ||
|
|
1758227f1e | ||
|
|
cbd2e902a7 | ||
|
|
2cb6d1f660 | ||
|
|
ae2230ff0e | ||
|
|
12914208cd | ||
|
|
abb11077de | ||
|
|
ef1a5ad7a1 | ||
|
|
ed919832d8 | ||
|
|
ef2ea46882 | ||
|
|
da9516331e | ||
|
|
bd581e6004 | ||
|
|
e37f636236 | ||
|
|
0ec47e42e4 | ||
|
|
1369a2bf29 | ||
|
|
e0704bc8a5 | ||
|
|
d8041751c5 | ||
|
|
87b283ccfb | ||
|
|
16d44a0b88 | ||
|
|
07f8e8bcca | ||
|
|
cbfa60ae46 | ||
|
|
89ce894066 | ||
|
|
66487c20e7 | ||
|
|
08bc87e764 | ||
|
|
22afd0fbb5 | ||
|
|
5633b412d4 | ||
|
|
bd030ccb9f | ||
|
|
41037efd6f | ||
|
|
81c4094708 | ||
|
|
6382987990 | ||
|
|
3276bf46a7 | ||
|
|
da1a5b732d | ||
|
|
5702223716 | ||
|
|
21da33be11 | ||
|
|
545f38bc3d | ||
|
|
92e421a61c | ||
|
|
15f55af4c4 | ||
|
|
8b150a81a0 | ||
|
|
91efbdffeb | ||
|
|
c8fa70e7f0 | ||
|
|
934c49bf49 | ||
|
|
70d6b3d698 | ||
|
|
e6e9628837 | ||
|
|
0dd2a5743d | ||
|
|
f8678af87e | ||
|
|
5e7f968808 | ||
|
|
e1b3318e68 | ||
|
|
4d8a7405ca | ||
|
|
f1a6c32e0c | ||
|
|
cf5a3e7d3d | ||
|
|
89f45082fb | ||
|
|
0ad6ac70ff | ||
|
|
e8e0decc6c | ||
|
|
57aaf77162 | ||
|
|
a3eebedb02 | ||
|
|
f8e5cd90a5 | ||
|
|
07ce24143b | ||
|
|
3d092b02f3 | ||
|
|
bf5e065520 | ||
|
|
08178e74d2 | ||
|
|
c66fcff906 | ||
|
|
b0dd0e509d | ||
|
|
719da6e921 | ||
|
|
e4b3d0a9a9 | ||
|
|
c0e231a32b | ||
|
|
af9f9a25da | ||
|
|
0a465bc7e1 | ||
|
|
aec735e09e | ||
|
|
9ce6d5f26e | ||
|
|
f4b4fb0562 | ||
|
|
aa22fad67d | ||
|
|
548bb4ce70 | ||
|
|
b6871b3618 | ||
|
|
fe5e816551 | ||
|
|
20d2a281b1 | ||
|
|
e2ae0c660a | ||
|
|
9e8ae16597 | ||
|
|
e5284a79c9 | ||
|
|
79dad5dfb0 | ||
|
|
a511c16fb1 | ||
|
|
98a1214a4d | ||
|
|
be459c45cf | ||
|
|
328ef2938c | ||
|
|
21f3f49078 | ||
|
|
882ad3b8cf | ||
|
|
d8b7d8bc2e | ||
|
|
c1692535a5 | ||
|
|
af0e326747 | ||
|
|
6cdaa9738a | ||
|
|
1e5d0c4517 | ||
|
|
127f5ca287 | ||
|
|
f51b775fd9 | ||
|
|
0015b92591 | ||
|
|
37e1f1811f | ||
|
|
deb6448739 | ||
|
|
bfb3224684 | ||
|
|
aed1f33935 | ||
|
|
33192efa33 | ||
|
|
d48435b948 | ||
|
|
daa4f79ea0 | ||
|
|
07bb754566 | ||
|
|
c70a566514 | ||
|
|
b99d3a7ff1 | ||
|
|
30cbb080b0 | ||
|
|
d8eec59d5d | ||
|
|
be89e2986b | ||
|
|
916af84651 | ||
|
|
567b5ecd4f | ||
|
|
b21d8d3e88 | ||
|
|
4e5ab529de | ||
|
|
3b1ffda3b2 | ||
|
|
cdf58044a8 | ||
|
|
727c3fde67 | ||
|
|
de880fb9f0 | ||
|
|
e9fdf7d538 | ||
|
|
57f221868d | ||
|
|
ae7d1a54cb | ||
|
|
71b075b365 | ||
|
|
c054cf99fe | ||
|
|
98a742f024 | ||
|
|
fb40bc548e | ||
|
|
d06c1954a5 | ||
|
|
545d487fea | ||
|
|
62f0812aae | ||
|
|
e0dda3ea0c | ||
|
|
7628f219e2 | ||
|
|
1d7a54c866 | ||
|
|
6c55493acb | ||
|
|
42bcac251b | ||
|
|
bb791138cd | ||
|
|
1fc509ea13 | ||
|
|
90a1b930a3 | ||
|
|
9011d58355 | ||
|
|
f2c0f203f6 | ||
|
|
3f5746dd7d | ||
|
|
adce95ead4 | ||
|
|
84d7ca0122 | ||
|
|
053af573fc | ||
|
|
06f34bec45 | ||
|
|
c1641fdb38 | ||
|
|
9115af350e | ||
|
|
77cf3612d9 | ||
|
|
07c7343f94 | ||
|
|
530f751f02 | ||
|
|
9a005cabe9 | ||
|
|
f7eb502d9d | ||
|
|
a407cfb514 | ||
|
|
ff43d07b6d | ||
|
|
340b5f22b7 | ||
|
|
b4a90131bb | ||
|
|
90149ddb4e | ||
|
|
1f09f0cf68 | ||
|
|
8035e7aecb | ||
|
|
cea32deba2 | ||
|
|
b02358e3a0 | ||
|
|
79320f27c9 | ||
|
|
52ca2f7339 | ||
|
|
78e54248e3 | ||
|
|
fc82604947 | ||
|
|
40bb0feaf8 | ||
|
|
0afb6a9481 | ||
|
|
57f72a473f | ||
|
|
876fbb9980 | ||
|
|
bee09f7c29 | ||
|
|
c31aef4131 | ||
|
|
53a36e7974 | ||
|
|
60e74c4916 | ||
|
|
1d24f912ae | ||
|
|
f9591c512c | ||
|
|
f74396e97b | ||
|
|
1127eeebb8 | ||
|
|
e9590e8b04 | ||
|
|
fd0bc89771 | ||
|
|
32a38b46fe | ||
|
|
e5f9d8cfdf | ||
|
|
0b6a74a8e3 | ||
|
|
da59e8137f | ||
|
|
ecd6b30626 | ||
|
|
31da701fe7 | ||
|
|
9d875b3935 | ||
|
|
8cab4ffb42 | ||
|
|
61aeb5bf86 | ||
|
|
0821008d6e | ||
|
|
a4a24b77b9 | ||
|
|
897edab3cf | ||
|
|
a25d70466f | ||
|
|
4270dafd6a | ||
|
|
fc3baef406 | ||
|
|
be20407238 | ||
|
|
26c4dc8fe7 | ||
|
|
4dd124d003 | ||
|
|
ee40f1386a | ||
|
|
4f116d3ca2 | ||
|
|
9ef1ce7ce1 | ||
|
|
641f40ff45 | ||
|
|
6f0d17a991 | ||
|
|
2d1155d46b | ||
|
|
a1cf6e06af | ||
|
|
2e4a861e9c | ||
|
|
70e4ad71a6 | ||
|
|
dc27b49f63 | ||
|
|
b8707c7619 | ||
|
|
b251abb79f | ||
|
|
14be6c1a6c | ||
|
|
7addfe2a71 | ||
|
|
2474700473 | ||
|
|
0150f81a24 | ||
|
|
8a801d0bb5 | ||
|
|
496d2c88f0 | ||
|
|
9d8b287c13 | ||
|
|
94e0cad2d0 | ||
|
|
8be123bf3a | ||
|
|
570da1b47c | ||
|
|
02dd286d55 | ||
|
|
58199760de | ||
|
|
17b59213d3 | ||
|
|
06e2785914 | ||
|
|
0aea390e5e | ||
|
|
c33a900c66 | ||
|
|
f36e9a7d54 | ||
|
|
7259e3a0c0 | ||
|
|
b0581ad452 | ||
|
|
813953f1f5 | ||
|
|
288b21d407 | ||
|
|
01453f73dc | ||
|
|
410f1ade01 | ||
|
|
621a9dd2a1 | ||
|
|
18b9b8bf67 | ||
|
|
3f1ea0a418 | ||
|
|
211f7b82dc | ||
|
|
6675976feb | ||
|
|
034d3ee453 | ||
|
|
faa866f4e1 | ||
|
|
9c3e36930c | ||
|
|
d4daecd921 | ||
|
|
9f10e9e7af | ||
|
|
fa9def349c | ||
|
|
4073214131 | ||
|
|
03fac2a656 | ||
|
|
a204584ddd | ||
|
|
25de01c7be | ||
|
|
176235689f | ||
|
|
f27ee8b295 | ||
|
|
32616fe6aa | ||
|
|
9a5cb9e9b0 | ||
|
|
d11869c70b | ||
|
|
abb8c9dbb5 | ||
|
|
b8442213f8 | ||
|
|
0d19abb293 | ||
|
|
74587f5c6d | ||
|
|
6ea3e79087 | ||
|
|
ba72b146a2 | ||
|
|
0f360c86b2 | ||
|
|
ecf7a6f905 | ||
|
|
345dffaa9b | ||
|
|
7b912196e9 | ||
|
|
6e4742206f | ||
|
|
a28ecc9d02 | ||
|
|
53397f844e | ||
|
|
818398ccda | ||
|
|
a6c7068ca6 | ||
|
|
4785bb4d40 | ||
|
|
1a9f9496fd | ||
|
|
78f35daa58 | ||
|
|
b2e70c2bb3 | ||
|
|
3d8ceeb5b6 | ||
|
|
0b8540d70b | ||
|
|
e9ccfe6796 | ||
|
|
e20f2732b3 | ||
|
|
4da4ea1bff | ||
|
|
93ba39f9b0 | ||
|
|
0642a3704d | ||
|
|
57e1bafa8b | ||
|
|
3d5eb524aa | ||
|
|
c15afed0aa | ||
|
|
b133ce80c9 | ||
|
|
ae8332dc3d | ||
|
|
026a35dd90 | ||
|
|
5fdc1cdce3 | ||
|
|
02bb8b8fb8 | ||
|
|
27f289f4a0 | ||
|
|
6af1747477 | ||
|
|
401b82c226 | ||
|
|
9d128e18b6 | ||
|
|
a6a78bb556 | ||
|
|
bc59c3f563 | ||
|
|
8b7ac08192 | ||
|
|
4fe78c2b88 | ||
|
|
2e8dd00aa6 | ||
|
|
127eed5c49 | ||
|
|
7a84fc2b12 | ||
|
|
96e0925054 | ||
|
|
730ee7f89a | ||
|
|
e62d1ca458 | ||
|
|
6bca5643ee | ||
|
|
db20b23ff3 | ||
|
|
66f34668a9 | ||
|
|
ceadc26741 | ||
|
|
3a74dc9b7b | ||
|
|
4a47d752cb | ||
|
|
1bca6648bd | ||
|
|
af00bc4635 | ||
|
|
def210b4b9 | ||
|
|
89bdab0a26 | ||
|
|
448922d907 | ||
|
|
3ef8c28191 | ||
|
|
46aee46ea3 | ||
|
|
e57875d2a5 | ||
|
|
28726cf4c7 | ||
|
|
b0e4ad639e | ||
|
|
1810918e43 | ||
|
|
a736539851 | ||
|
|
591233e255 | ||
|
|
c2a2a31fb9 | ||
|
|
d4a4bfa2c7 | ||
|
|
3a127450e3 | ||
|
|
c2f9a6381a | ||
|
|
7adf12912f | ||
|
|
0b2b05ae85 | ||
|
|
127c32dce7 | ||
|
|
652ff8db15 | ||
|
|
3a78519655 | ||
|
|
c6de85d4a0 | ||
|
|
f25c5cd222 | ||
|
|
0b5c6bed37 | ||
|
|
2d485263d1 | ||
|
|
103b6180d0 | ||
|
|
6edca93c1c | ||
|
|
a7548d59c0 | ||
|
|
8b1f7d6eb3 | ||
|
|
ff3ac03520 | ||
|
|
e51d3095bc | ||
|
|
d19003d531 | ||
|
|
6d5dd88e50 | ||
|
|
de70973296 | ||
|
|
2a5f104739 | ||
|
|
71bd10b303 | ||
|
|
97b7fe6a6f | ||
|
|
eb84d3014f | ||
|
|
2bdee21169 | ||
|
|
a278ad300f | ||
|
|
3d78ec900e | ||
|
|
fc134dad8e | ||
|
|
59a1f765d0 | ||
|
|
0dd2023224 | ||
|
|
d4880b417b | ||
|
|
a7ced052dd | ||
|
|
9ac618ebec | ||
|
|
de6339586f | ||
|
|
97c9e2eec3 | ||
|
|
167913aa85 | ||
|
|
18c9785325 | ||
|
|
f4e0888ce2 | ||
|
|
d3266ee50e | ||
|
|
410bcdec4b | ||
|
|
577b9f4557 |
+3
-1
@@ -19,4 +19,6 @@ angular-app/.angular
|
||||
# Ignore sentence-transformer local model cache
|
||||
service/sentence_transformer/models/
|
||||
|
||||
llm_evaluations/bio_generation/.venv
|
||||
llm_evaluations/bio_generation/.venv
|
||||
|
||||
.devcontainer
|
||||
|
||||
@@ -5,7 +5,6 @@ from typing import Any
|
||||
|
||||
from openalex_client import get_all_author_works
|
||||
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
INPUT_FILE = BASE_DIR / "career_stage_sample.csv"
|
||||
OUTPUT_FILE = BASE_DIR / "career_stage_results.csv"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
from collections.abc import Callable
|
||||
from pathlib import Path
|
||||
from typing import Callable, Literal
|
||||
from typing import Literal
|
||||
|
||||
import matplotlib.pyplot as plt
|
||||
import pandas as pd
|
||||
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
INPUT_FILE = BASE_DIR / "career_stage_results.csv"
|
||||
PLOTS_DIR = BASE_DIR / "plots"
|
||||
|
||||
@@ -4,7 +4,6 @@ from urllib.error import HTTPError, URLError
|
||||
from urllib.parse import urlencode
|
||||
from urllib.request import Request, urlopen
|
||||
|
||||
|
||||
OPENALEX_WORKS_URL = "https://api.openalex.org/works"
|
||||
REQUEST_TIMEOUT_SECONDS = 30
|
||||
PER_PAGE = 200
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
import os
|
||||
import requests
|
||||
from requests.adapters import HTTPAdapter
|
||||
from urllib.parse import quote
|
||||
|
||||
import requests
|
||||
from dotenv import load_dotenv
|
||||
from requests.adapters import HTTPAdapter
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import os
|
||||
import requests
|
||||
from openai import OpenAI, APIConnectionError
|
||||
|
||||
from dotenv import load_dotenv
|
||||
from openai import APIConnectionError, OpenAI
|
||||
|
||||
load_dotenv()
|
||||
|
||||
|
||||
@@ -1,12 +1,13 @@
|
||||
import elastic.client as es_client
|
||||
import llm.client as llm_client
|
||||
import json
|
||||
import argparse
|
||||
import time
|
||||
import json
|
||||
import logging
|
||||
import threading
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import elastic.client as es_client
|
||||
import llm.client as llm_client
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
@@ -3,7 +3,6 @@ from pathlib import Path
|
||||
|
||||
from llama_parse import LlamaParse
|
||||
|
||||
|
||||
BASE_DIR = Path(__file__).resolve().parent
|
||||
|
||||
AD_PATH = BASE_DIR / "AD.pdf"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import pymupdf4llm
|
||||
|
||||
AD_PATH = "188274\AD.pdf"
|
||||
CD_PATH = "188274\СD.pdf"
|
||||
AD_PATH = r"188274\AD.pdf"
|
||||
CD_PATH = r"188274\СD.pdf"
|
||||
|
||||
ad_md = pymupdf4llm.to_markdown(AD_PATH)
|
||||
cd_md = pymupdf4llm.to_markdown(CD_PATH)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pathlib import Path
|
||||
import getpass
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import pymupdf
|
||||
import requests
|
||||
@@ -206,7 +206,7 @@ def make_debug_data(
|
||||
) -> dict:
|
||||
choice = {}
|
||||
|
||||
if "choices" in data and data["choices"]:
|
||||
if data.get("choices"):
|
||||
choice = data["choices"][0]
|
||||
|
||||
message = choice.get("message", {})
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
from pathlib import Path
|
||||
import getpass
|
||||
import json
|
||||
import os
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
|
||||
@@ -181,7 +181,7 @@ def make_debug_data(
|
||||
):
|
||||
choice = {}
|
||||
|
||||
if "choices" in data and data["choices"]:
|
||||
if data.get("choices"):
|
||||
choice = data["choices"][0]
|
||||
|
||||
message = choice.get("message", {})
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from pathlib import Path
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
ROOT_DIR = SCRIPT_DIR
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
from pathlib import Path
|
||||
import re
|
||||
from pathlib import Path
|
||||
|
||||
import pymupdf
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from pathlib import Path
|
||||
|
||||
import pymupdf # PyMuPDF
|
||||
|
||||
try:
|
||||
@@ -7,7 +8,7 @@ except ImportError:
|
||||
MarkItDown = None
|
||||
|
||||
|
||||
AD_PATH = Path("154115\AD.pdf")
|
||||
AD_PATH = Path(r"154115\AD.pdf")
|
||||
OUT_DIR = Path("ad_extraction_outputs3")
|
||||
OUT_DIR.mkdir(exist_ok=True)
|
||||
|
||||
|
||||
@@ -3,9 +3,9 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import json
|
||||
from collections import Counter
|
||||
from statistics import mean, median
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from statistics import mean, median
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
@@ -17,7 +17,7 @@ SERVICE_SOURCE_ROOT = ROOT.parents[1] / "service" / "src" / "main"
|
||||
if str(SERVICE_SOURCE_ROOT) not in sys.path:
|
||||
sys.path.insert(0, str(SERVICE_SOURCE_ROOT))
|
||||
|
||||
from inse.authors.institution_membership_query import ( # noqa: E402
|
||||
from inse.authors.institution_membership_query import (
|
||||
build_institution_membership_query,
|
||||
current_affiliation_year_cutoff,
|
||||
)
|
||||
@@ -852,9 +852,7 @@ def validate(result: dict[str, Any]) -> list[str]:
|
||||
if score is None:
|
||||
errors.append("basic_research_score_missing")
|
||||
elif score_is_usable:
|
||||
if quadrant == "pure_basic" and not 0 <= score <= 30:
|
||||
errors.append("basic_research_quadrant_score_mismatch")
|
||||
elif quadrant == "use_inspired_basic" and not 25 <= score <= 45:
|
||||
if quadrant == "pure_basic" and not 0 <= score <= 30 or quadrant == "use_inspired_basic" and not 25 <= score <= 45:
|
||||
errors.append("basic_research_quadrant_score_mismatch")
|
||||
if quadrant not in {"pure_basic", "use_inspired_basic"}:
|
||||
errors.append("basic_research_quadrant_mismatch")
|
||||
|
||||
@@ -26,12 +26,12 @@ import json
|
||||
import os
|
||||
import sys
|
||||
from collections import defaultdict
|
||||
from collections.abc import Iterable
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterable
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
DEFAULT_AUTHOR_ID = "A5034365278"
|
||||
DEFAULT_WORK_YEAR_GTE = 1950
|
||||
SOURCE_INDEX = "openalex-works*"
|
||||
|
||||
@@ -373,8 +373,8 @@ def interval_distance(value: float, minimum: float, maximum: float) -> float:
|
||||
|
||||
|
||||
def safe_rate(
|
||||
numerator: int | float,
|
||||
denominator: int | float,
|
||||
numerator: float,
|
||||
denominator: float,
|
||||
) -> float | None:
|
||||
if not denominator:
|
||||
return None
|
||||
|
||||
+1
-2
@@ -13,7 +13,6 @@ from typing import Any
|
||||
|
||||
from openai import OpenAI
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
PROMPT_FILE = ROOT.parent / "prompt_frascati_hard_ranges_v2.txt"
|
||||
CONSENSUS_FILE = ROOT / "consensus_reference.json"
|
||||
@@ -282,7 +281,7 @@ def interval_distance(value: float, minimum: float, maximum: float) -> float:
|
||||
return 0.0
|
||||
|
||||
|
||||
def safe_rate(numerator: int | float, denominator: int | float) -> float | None:
|
||||
def safe_rate(numerator: float, denominator: float) -> float | None:
|
||||
if not denominator:
|
||||
return None
|
||||
return numerator / denominator
|
||||
|
||||
+2
-2
@@ -3,13 +3,13 @@ from __future__ import annotations
|
||||
import argparse
|
||||
import json
|
||||
from collections import Counter
|
||||
from collections.abc import Callable, Iterable
|
||||
from datetime import datetime, timezone
|
||||
from pathlib import Path
|
||||
from typing import Any, Callable, Iterable
|
||||
from typing import Any
|
||||
|
||||
import requests
|
||||
|
||||
|
||||
ROOT = Path(__file__).resolve().parent
|
||||
|
||||
ES_BASE_URL = "https://project.nes.uni-due.de/elastic"
|
||||
|
||||
@@ -8,7 +8,6 @@ from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
from ollama import Client
|
||||
|
||||
|
||||
ENDPOINT = os.environ.get("OLLAMA_HOST", "https://project.nes.uni-due.de/llm2/")
|
||||
MODEL = os.environ.get("OLLAMA_MODEL", "gemma4:e4b-it-bf16")
|
||||
DATA_FOLDER = "data"
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from time import time
|
||||
|
||||
from openai import OpenAI, APIConnectionError
|
||||
from openai import APIConnectionError, OpenAI
|
||||
|
||||
DATA_FOLDER = "data2"
|
||||
BATCH_SIZE = 6
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import requests, json
|
||||
import json
|
||||
|
||||
import helpers
|
||||
import requests
|
||||
|
||||
AUTHOR_OPEN_ALEXID = helpers.get_all_author_ids_from_specific_university("University of Duisburg-Essen")
|
||||
#AUTHOR_OPEN_ALEXID = ["A5047117780"]
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
import requests, json
|
||||
import json
|
||||
|
||||
import helpers
|
||||
import requests
|
||||
|
||||
AUTHOR_OPEN_ALEXID = helpers.get_all_author_ids_from_specific_university("University of Duisburg-Essen")
|
||||
#AUTHOR_OPEN_ALEXID = ["A5093075883", "A5047117780", "A5007170803"]
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
|
||||
import requests
|
||||
|
||||
ELASTICSEARCH_URL = os.environ.get("ELASTICSEARCH_URL", "https://project.nes.uni-due.de/elastic")
|
||||
|
||||
@@ -2,8 +2,8 @@ import os
|
||||
from concurrent.futures import ThreadPoolExecutor
|
||||
from time import time
|
||||
|
||||
from openai import OpenAI, APIConnectionError
|
||||
import helpers
|
||||
from openai import APIConnectionError, OpenAI
|
||||
|
||||
DATA_FOLDER = "data2"
|
||||
BATCH_SIZE = 6
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
from typing import Any, Iterator
|
||||
from elasticsearch import Elasticsearch
|
||||
from collections import defaultdict
|
||||
import json
|
||||
from collections import defaultdict
|
||||
from collections.abc import Iterator
|
||||
from pathlib import Path
|
||||
from elasticsearch import NotFoundError
|
||||
from typing import Any
|
||||
|
||||
from elasticsearch import Elasticsearch, NotFoundError
|
||||
|
||||
# elasticseach library required. Here used elasticsearch==8.0.0
|
||||
# estimated execution time: 3-5 Minutes
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
from time import time
|
||||
|
||||
from llm_classify_news import call, parse_label, parse_persons
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Baut aus den JSON-Dateien in data2/ eine eigenstaendige viewer.html.
|
||||
|
||||
@@ -8,8 +7,8 @@ mit Vor/Zurueck durch die News blaettern. Oben stehen _id, llm_label und
|
||||
llm_persons, darunter der full_content als reiner Text (kein Parsing).
|
||||
"""
|
||||
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
DATA_FOLDER = "validation_data"
|
||||
OUTPUT_FILE = "viewer.html"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
|
||||
import requests
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
import random
|
||||
|
||||
import requests
|
||||
from openai import OpenAI, APIConnectionError
|
||||
|
||||
from openai import APIConnectionError, OpenAI
|
||||
|
||||
INSE_URL = "https://inse.nes.uni-due.de/elastic"
|
||||
INDEX_URL = f"{INSE_URL}/aktuell"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import os
|
||||
import json
|
||||
import os
|
||||
|
||||
DATA_FOLDER = "data2"
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
|
||||
from tabulate import tabulate
|
||||
|
||||
result_files = [
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
from urllib.parse import quote
|
||||
|
||||
import requests
|
||||
from requests.adapters import HTTPAdapter
|
||||
from urllib.parse import quote
|
||||
|
||||
INSE_URL = "https://inse.nes.uni-due.de/elastic"
|
||||
INSE_API_KEY = "bG1NSWc1NEJPZ3FnTGZCZXRSSEg6VnJXRFd5SnpSTTNWc1VPT01FMEhMZw=="
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import requests
|
||||
from openai import OpenAI, APIConnectionError
|
||||
from openai import APIConnectionError, OpenAI
|
||||
|
||||
LLM_BASE_URL = "https://project.nes.uni-due.de/llm2/v1/"
|
||||
LLM_API_KEY = "c2d5e7ccf7a4760dd3d19bed2caed9d85ff7437400e0ea82a6d6f912ebc2f212"
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
import argparse
|
||||
import json
|
||||
import threading
|
||||
import time
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
import elastic.client as es_client
|
||||
import llm.client as llm_client
|
||||
import json
|
||||
import argparse
|
||||
import time
|
||||
import threading
|
||||
from concurrent.futures import ThreadPoolExecutor, as_completed
|
||||
|
||||
|
||||
def print_pretty_json(data):
|
||||
print(json.dumps(data, indent=2))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#!/usr/bin/env python3
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import asyncio
|
||||
import json
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import httpx
|
||||
import numpy as np
|
||||
|
||||
@@ -14,6 +14,7 @@ project_root = current_dir.parent.parent.resolve()
|
||||
env_path = project_root / "service" / "src" / "main" / "inse" / ".env"
|
||||
|
||||
from dotenv import load_dotenv
|
||||
|
||||
load_dotenv(dotenv_path=env_path)
|
||||
|
||||
sys.path.append(str(project_root / "service" / "src" / "main"))
|
||||
@@ -311,7 +312,7 @@ async def evaluate():
|
||||
try:
|
||||
resp = client.post(f"{ELASTIC_URL}topicvectors/_search", json=payload, headers=headers)
|
||||
resp.raise_for_status()
|
||||
except Exception as exc:
|
||||
except Exception:
|
||||
# Log error but don't crash
|
||||
pass
|
||||
t1 = time.perf_counter()
|
||||
|
||||
@@ -4,15 +4,14 @@ Professional evaluation pipeline to benchmark different Sentence Transformer mod
|
||||
on the OpenAlex topics dataset. Measures Information Retrieval (IR) metrics,
|
||||
Taxonomy Clustering metrics, and operational performance metrics.
|
||||
"""
|
||||
import os
|
||||
import sys
|
||||
import json
|
||||
import time
|
||||
import argparse
|
||||
import json
|
||||
import random
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import httpx
|
||||
import numpy as np
|
||||
from dotenv import load_dotenv
|
||||
|
||||
# Add service/src/main to python path to load settings
|
||||
@@ -30,8 +29,8 @@ API_KEY = settings.elasticsearch_api_key
|
||||
# Import evaluation libraries
|
||||
from sentence_transformers import SentenceTransformer
|
||||
from sentence_transformers.evaluation import InformationRetrievalEvaluator
|
||||
from sklearn.cluster import KMeans
|
||||
from sklearn import metrics
|
||||
from sklearn.cluster import KMeans
|
||||
|
||||
DEFAULT_MODELS = [
|
||||
"paraphrase-multilingual-mpnet-base-v2",
|
||||
@@ -161,9 +160,9 @@ def evaluate_model(model_name, data, output_dir):
|
||||
model_safe_name = model_name.replace("/", "_").replace("-", "_")
|
||||
report_file = output_dir / f"model_report_{model_safe_name}.json"
|
||||
|
||||
print(f"\n==================================================")
|
||||
print("\n==================================================")
|
||||
print(f"Evaluating Model: '{model_name}'")
|
||||
print(f"==================================================")
|
||||
print("==================================================")
|
||||
|
||||
start_load = time.time()
|
||||
try:
|
||||
|
||||
+10
-1
@@ -6,5 +6,14 @@ RUN mkdir /test && \
|
||||
pip install --root-user-action=ignore --no-cache-dir torch --index-url https://download.pytorch.org/whl/cpu && \
|
||||
pip install --root-user-action=ignore --no-cache-dir "sentence-transformers~=5.5.1"
|
||||
|
||||
ARG MODEL_NAME=intfloat/multilingual-e5-base
|
||||
ENV MODEL_NAME=${MODEL_NAME}
|
||||
ENV SENTENCE_TRANSFORMERS_HOME=/models
|
||||
RUN python -c "from sentence_transformers import SentenceTransformer; SentenceTransformer('intfloat/multilingual-e5-base')"
|
||||
ENV HF_HOME=/models
|
||||
|
||||
RUN python -c "import os, sentence_transformers; sentence_transformers.SentenceTransformer(os.environ['MODEL_NAME'])"
|
||||
|
||||
ENV HF_HUB_OFFLINE=1
|
||||
ENV TRANSFORMERS_OFFLINE=1
|
||||
ENV HF_DATASETS_OFFLINE=1
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import logging
|
||||
import sys
|
||||
import time
|
||||
import logging
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# extracted person-level data + generated artifacts — never commit
|
||||
cache/
|
||||
reports/
|
||||
*.log
|
||||
__pycache__/
|
||||
@@ -0,0 +1,518 @@
|
||||
# Multiplicator detection — offline pipeline
|
||||
|
||||
Detects **multiplicators** among an institution's researchers — *bridgers* (connect
|
||||
disconnected research communities), *mentors* (bring up junior/debutant co-authors), and
|
||||
*amplifiers* (patents, industry co-authorship, news visibility) — from OpenAlex plus the
|
||||
patent/project/news sources, and writes per-author scores + tags + evidence to a derived
|
||||
Elasticsearch index.
|
||||
|
||||
Follows the repo's offline pattern (`scripts/patents/index_org_patents.py`): all analysis
|
||||
and joining happen **offline**, the result lands in a **separate, institution-parameterised
|
||||
ES index**, and a thin read-only backend router is added only once the UI needs it.
|
||||
|
||||
**New here? Read [ROADMAP.md](docs/ROADMAP.md) first** — a ground-up explanation of the
|
||||
concept, every index field, the related work behind the metrics, and what's next.
|
||||
|
||||
## Status
|
||||
|
||||
**M0 — spike: done. M1 — metrics core: done** (exit check PASS). **M2 — pipeline +
|
||||
`multiplicators_v1` index: done** (idempotency verified). **M3 — amplifier signal
|
||||
joins: wired and indexed** (patents / news / CORDIS; results below) — remaining:
|
||||
the coach calibration session. **M4 — read router:** pending, once the UI needs it.
|
||||
All results per milestone are documented in the sections below.
|
||||
|
||||
## Setup
|
||||
|
||||
```bash
|
||||
cd service/scripts/multipliers
|
||||
python -m venv .venv && source .venv/bin/activate
|
||||
pip install -r requirements.txt
|
||||
```
|
||||
|
||||
Credentials are read from `service/src/main/inse/.env`:
|
||||
- `ELASTICSEARCH_URL` / `ELASTICSEARCH_API_KEY` — NES cluster (OpenAlex).
|
||||
- `ELASTICSEARCH_INSE_URL` / `ELASTICSEARCH_INSE_API_KEY` — INSE cluster (patents, news).
|
||||
|
||||
## Run the spike
|
||||
|
||||
```bash
|
||||
# Extract + audit for University of Duisburg-Essen (writes cache/ + report json)
|
||||
python spike_audit.py --institution-id I62318514
|
||||
|
||||
# Re-audit from the cache without re-hitting ES
|
||||
python spike_audit.py --institution-id I62318514 --skip-extract
|
||||
|
||||
# Also test write/delete permissions on the INSE cluster (throwaway index)
|
||||
python spike_audit.py --institution-id I62318514 --probe-writes
|
||||
```
|
||||
|
||||
Outputs land in `cache/`:
|
||||
- `authors_<ID>.jsonl.gz` — the two-group author union.
|
||||
- `works_<ID>.jsonl.gz` — full-authorship works (external co-authors + institutions).
|
||||
- `spike_report_<ID>.json` — the audit report.
|
||||
|
||||
The report answers: reproduction (author/work counts), field coverage
|
||||
(`author_position` / `is_corresponding` / institution `type`), scale (authors-per-work
|
||||
histogram, pair counts at caps 20/50/100), career quality (suspicious-profile %,
|
||||
`active_years` distribution), signal reachability (`org_patents` match-type breakdown),
|
||||
and write permissions.
|
||||
|
||||
`cache/` is disposable and should not be committed (it can be hundreds of MB and contains
|
||||
extracted person data).
|
||||
|
||||
---
|
||||
|
||||
## M0 spike results (I62318514, run 2026-07-15)
|
||||
|
||||
The spike existed to answer six questions the whole design was betting on. Full raw
|
||||
numbers in `cache/spike_report_I62318514.json`; this section explains each stat, why it
|
||||
was measured, and which downstream metric it feeds.
|
||||
|
||||
### 1. Reproduction — is the extraction correct?
|
||||
|
||||
| Stat | Value | Meaning |
|
||||
|---|---|---|
|
||||
| Author count | **4,921** | Exactly reproduces the audited seed extraction (`llm_evaluations/basic_applied_experimental/ude_audit_report.json`). Our port of the query is faithful. |
|
||||
| — `backend_compatible` group | 4,740 | Authors with `last_known_institutions == UDE` **and** a recent UDE affiliation. |
|
||||
| — `empty_last_known_recent` group | 181 | Authors with a recent UDE affiliation but **no** `last_known_institutions` at all. Without this second query group, 3.7% of the cohort would silently vanish — this is why the author set is a *union of two queries*, not one. |
|
||||
| Work count | **183,661** | All works by those 4,921 authors, globally, unrestricted by institution or year. Matches the seed audit. |
|
||||
|
||||
**Contributes to:** everything. This is the corpus. The "all works globally" property is
|
||||
load-bearing for the career metrics: it means `active_years` is *exact* for in-set
|
||||
authors (we see their complete history), while for external co-authors we only see works
|
||||
shared with UDE — which is why mentor metrics are restricted to UDE-internal pairs.
|
||||
|
||||
### 2. Field coverage — are the fields the metrics need actually populated?
|
||||
|
||||
The OpenAlex Pydantic models declare these fields, but that says nothing about whether
|
||||
the ES index actually populates them. Two sub-scores would have died silently.
|
||||
|
||||
| Stat | Value | Feeds | Verdict |
|
||||
|---|---|---|---|
|
||||
| Authorships total | 3,805,507 | — | denominator |
|
||||
| `author_position` populated | **100%** | `last_author_with_junior_first` (mentor): the classic supervision signature — PI last, junior first. | ✅ computable |
|
||||
| `is_corresponding` populated | **100%** | reserved for later refinement (corresponding-author weighting). | ✅ available |
|
||||
| `institutions.type` populated | **99.91%** | `cross_sector_share` / `industry_coauthor_share` (bridger + amplifier): share of works with a co-author at `type == "company"`. | ✅ computable |
|
||||
| Company-institution occurrences | **67,131** | same | dense enough to rank on — this is the strongest *ID-linked* industry signal we have, stronger than any name-matched source. |
|
||||
|
||||
**Contributes to:** confirms the metric set needs no fallbacks. Had `institutions.type`
|
||||
been empty, the amplifier would have collapsed onto 123 high-confidence patents (see §6).
|
||||
|
||||
### 3. Scale — where does the pair explosion land, and what cap do we need?
|
||||
|
||||
Co-author pair generation is quadratic per work: a work with *n* authors yields
|
||||
*n·(n−1)/2* pairs. The distribution of authors-per-work decides whether the self-join is
|
||||
feasible locally and where to cap it.
|
||||
|
||||
| Stat | Value |
|
||||
|---|---|
|
||||
| Authors per work p50 / p90 / p99 / max | **5 / 17 / 144 / 4,839** |
|
||||
| Works with > 100 authors | **2,459** (1.3%) |
|
||||
| Pair instances at cap 20 / 50 / 100 | **3.9M / 8.0M / 13.9M** |
|
||||
|
||||
**Why `max_authors_per_work` matters** (the cap): the max-4,839-author work alone would
|
||||
generate ~11.7M pairs — more than the *entire rest of the corpus* at cap 50 — and a
|
||||
hyperauthored consortium paper (CERN/medical mega-trials) carries no real collaboration
|
||||
signal: being 1 of 4,839 names says nothing about who actually works with whom, but it
|
||||
*would* create a giant artificial clique that inflates betweenness and strength for
|
||||
everyone on it, poisoning the bridger score. The cap drops works above the threshold
|
||||
from **graph construction only** — they still count for publication years / `active_years`.
|
||||
|
||||
**Chosen: `max_authors_per_work = 50`.** Rationale: p90 = 17, so a cap of 50 keeps ≥ 99%
|
||||
of works (cap sits well above p90, below p99 = 144) while excluding only true
|
||||
hyperauthorship; the resulting 8.0M pair instances collapse to ~1–2M distinct edges,
|
||||
comfortably in-memory for polars. It's a config value (`extraction.max_authors_per_work`),
|
||||
not code — tunable per institution.
|
||||
|
||||
**Contributes to:** graph construction (Stage C); confirms the "pure local compute, no
|
||||
DuckDB/warehouse" bet.
|
||||
|
||||
### 4. Career quality — can we bucket careers, and how bad is profile merging?
|
||||
|
||||
Background: `analysis/career_stage/` established that `first_publication_year` is
|
||||
unreliable at UDE (merged OpenAlex profiles → debut years of 1893/1906 for active
|
||||
professors) and that `active_years` (distinct years with ≥ 1 publication) is robust.
|
||||
The pipeline therefore buckets by `active_years` and uses prefix-counted
|
||||
`active_years_at(A, Y)` instead of debut years for the mentor metrics.
|
||||
|
||||
| Stat | Value | Meaning / use |
|
||||
|---|---|---|
|
||||
| Suspicious profiles | **225 (4.6%)** | `first_year < 1970 or career_span > 60` (same flag as `persons/logic.py`). These are likely *merged identities*. They are **not dropped** — their `active_years` is still fine — but their evidence is marked `low_confidence`. Especially important for the **bridger** score: a merged profile is one node standing in for two people and *systematically* fakes bridging. |
|
||||
| `active_years` p50 / p90 / max / mean | **4 / 25 / 60 / 8.9** | p50 = 4 means **half the cohort is career-stage "Early" (≤ 4)**. This is why percentile normalization happens *within career buckets* (Early/Emerging/Established/Senior via `_classify_career_stage`): institution-wide percentiles would just rank seniority, and no early-career person could ever surface as a multiplicator. |
|
||||
|
||||
**Contributes to:** career bucketing (scoring), mentor junior/senior thresholds,
|
||||
confidence flags on evidence.
|
||||
|
||||
### 5. Permissions — can we ship the result anywhere?
|
||||
|
||||
Initial spike: `PUT` to create an index on the INSE cluster → **403** (key can read, not
|
||||
create). Resolved 2026-07-15: **`multiplicators_v1` was created by the cluster admin**,
|
||||
and the standard INSE key can now write to it (verified: doc create + delete both
|
||||
succeed). The build step must therefore *never* try to create/re-create the index — only
|
||||
delete-by-institution + bulk-index into the existing one (same constraint as
|
||||
`org_patents`, whose key also rejects `_delete_by_query`; use the search + bulk-delete
|
||||
loop from `patents/org/elastic_search_client.py`).
|
||||
|
||||
**Contributes to:** M2 index/build design.
|
||||
|
||||
### 6. Signal reachability — which amplifier sources are real?
|
||||
|
||||
| Stat | Value | Meaning |
|
||||
|---|---|---|
|
||||
| `org_patents` docs for UDE | **436** | The patent→OpenAlex-author link index exists and is populated. |
|
||||
| — `match_type: name` | 313 | Name-only match. **Evidence only, weight 0** — name matching is the weakest link type. |
|
||||
| — `match_type: both` | 65 | Institution assignee **and** name match — highest confidence. **Scores.** |
|
||||
| — `match_type: institution` | 58 | Institution-assignee match. **Scores.** |
|
||||
|
||||
**Contributes to:** amplifier sub-score. Only 123 patents are high-confidence, so patents
|
||||
are a *secondary* amplifier signal; the primary is `industry_coauthor_share` (67k
|
||||
ID-linked company co-authorships, §2). News (`aktuell_postproc`, exact-string person
|
||||
match) enters at low weight; DFG (token containment) and Bund (no person link) are
|
||||
excluded entirely.
|
||||
|
||||
### Spike exit criteria — all met (see below for M1)
|
||||
|
||||
- ✅ Extraction reproduces the audited counts exactly.
|
||||
- ✅ Every planned metric is confirmed computable — no fallbacks needed.
|
||||
- ✅ `max_authors_per_work = 50` chosen from measured data.
|
||||
- ✅ Write path to `multiplicators_v1` verified end-to-end.
|
||||
- ✅ Amplifier signal priorities re-ordered based on measured density
|
||||
(industry co-authorship primary, patents secondary).
|
||||
|
||||
---
|
||||
|
||||
## M1 results (metrics core, run 2026-07-15)
|
||||
|
||||
Modules: `graph.py` (co-author graph via polars self-join, decay weights, hyperauthorship
|
||||
cap), `metrics.py` (Brandes betweenness with inverted weights, Burt constraint on the
|
||||
full graph incl. externals, field entropy, industry co-author share, debut-year-free
|
||||
mentor metrics on `active_years_at`), `scoring.py` + `multipliers.yaml`
|
||||
(within-career-bucket percentiles → weighted sub-scores → tags). 26 unit tests
|
||||
(`pytest`), including exact agreement with networkx oracles for betweenness/constraint
|
||||
and the planted-1893-outlier regression guard for `active_years_at`.
|
||||
|
||||
Run with:
|
||||
|
||||
```bash
|
||||
python build.py --institution-id I62318514 # scores + summary from the cache
|
||||
python validate_sample.py --institution-id I62318514 # 60-person exit check
|
||||
```
|
||||
|
||||
### Full-corpus run (I62318514)
|
||||
|
||||
| Stat | Value |
|
||||
|---|---|
|
||||
| Runtime end-to-end | **2.6 min** (load 15s, graph 31s, metrics 112s) — exit criterion was < 15 min |
|
||||
| Graph | 639,544 nodes (4,921 focal + externals), 4,143,499 edges |
|
||||
| Works used / capped | 160,396 / 4,823 (`max_authors_per_work = 50`) |
|
||||
| Tags at threshold 0.85 | bridger 66, mentor 91, amplifier 609 |
|
||||
|
||||
The amplifier tag count is inflated for now: only `industry_coauthor_share` exists at M1
|
||||
(patents/news/CORDIS join in M3), so weight redistribution makes it a single-metric
|
||||
sub-score. Ignore amplifier tags until M3.
|
||||
|
||||
### M1 exit check — PASS
|
||||
|
||||
Against the 60 hand-labeled researchers in `analysis/career_stage/career_stage_sample.csv`
|
||||
(31 Professor / 29 Researcher), mentor scores must concentrate on professors:
|
||||
|
||||
| known status | n | median mentor score |
|
||||
|---|---|---|
|
||||
| Professor | 25 | **0.715** |
|
||||
| Researcher | 18 | 0.493 |
|
||||
|
||||
Top of the list is face-valid: senior professors with 30–50 mentored juniors and strong
|
||||
last-author-with-junior-first signatures (Bacher, Sures, Hering, Gunzer, …). The two
|
||||
high-scoring "Researchers" are informative, not embarrassing: e.g. a core-facility
|
||||
scientist with 37 juniors but **zero** last-author works — the independent supervision
|
||||
signature correctly separates "publishes with many juniors" from "supervises them".
|
||||
|
||||
### ⚠ Cohort-coverage finding (must be decided in M2)
|
||||
|
||||
17 of the 60 sample people are missing from the 4,921-author cohort. Diagnosed causes:
|
||||
|
||||
1. **University-hospital clinicians are systematically excluded.** Prominent UDE
|
||||
medicine professors (e.g. Witzke, Bingel) have
|
||||
`last_known_institutions = Essen University Hospital (I4210119759)`, and the
|
||||
hospital is **not** in UDE's OpenAlex lineage — OpenAlex models it as a *related*
|
||||
institution, not a child. **2,437 active (2025+) authors** sit behind this gap —
|
||||
roughly half a cohort. Fix: make the cohort definition accept a list of
|
||||
institution IDs (`I62318514` + `I4210119759` + …) per deployment, sourced from
|
||||
`associated_institutions` and confirmed by a human.
|
||||
2. **Stale affiliation years exclude current staff.** E.g. Saccà has
|
||||
`last_known = UDE` but no `affiliations.years >= 2025` entry, so the recency
|
||||
filter drops her. Fix candidates: widen the window (>= 2023), or accept
|
||||
`last_known = UDE` alone with a works-recency check.
|
||||
|
||||
Both are extraction-time cohort decisions with precision/recall tradeoffs — they belong
|
||||
to the coaches/product owner, not to code defaults.
|
||||
|
||||
---
|
||||
|
||||
## M1 validation in detail (what was checked, against what ground truth)
|
||||
|
||||
### The ground truth
|
||||
|
||||
`analysis/career_stage/career_stage_sample.csv` — 60 UDE researchers with manually
|
||||
researched **role labels** (`known_status`: 31 Professor / 29 Researcher incl. doctoral),
|
||||
across five discipline groups (Biology, CS, Engineering, Medicine, Sociology), each with
|
||||
an OpenAlex author ID (so the join to our scores is exact — no name matching involved).
|
||||
The sample was originally built for the career-stage analysis; it does **not** label
|
||||
anyone as a "multiplicator" — no such ground truth exists yet (that is the M3 golden set
|
||||
the innovation coaches will provide).
|
||||
|
||||
### What exactly was evaluated
|
||||
|
||||
One directional sanity check on the riskiest sub-score: *supervision is part of the
|
||||
professor role, so if the mentor sub-score measures anything like real mentorship,
|
||||
professors must score systematically higher than researchers.* Defined check:
|
||||
professors' **median mentor sub-score > researchers'**.
|
||||
|
||||
The check is stronger than it looks because scores are percentiles **within career
|
||||
buckets**: a Senior researcher is compared against Senior professors, not against PhD
|
||||
students, so a trivial "older people score higher" effect is largely normalized away —
|
||||
the gap has to come from mentor behaviour (juniors mentored, last-author-with-junior-
|
||||
first works), not raw seniority.
|
||||
|
||||
### Results (UDE-only cohort, 2026-07-15; archived as `cache/*_I62318514.udeonly.json`)
|
||||
|
||||
43 of 60 matched (17 missing — see the cohort-coverage finding above). Medians:
|
||||
|
||||
| sub-score | Professor (n=25) | Researcher (n=18) | check |
|
||||
|---|---|---|---|
|
||||
| **mentor** | **0.715** | **0.493** | **PASS** |
|
||||
| bridger | 0.603 | 0.508 | (informational) |
|
||||
| amplifier | 0.655 | 0.413 | (single-metric until M3 — ignore) |
|
||||
|
||||
Ranking detail, more convincing than the medians:
|
||||
|
||||
- Top = senior professors with strong dual signals: Gerd Bacher (37 juniors, 16
|
||||
last-author-junior-first works), Bernd Sures (52, 24), Daniel Hering (35, 25),
|
||||
Matthias Gunzer (54 juniors).
|
||||
- Bottom = early-career researchers with 0 juniors.
|
||||
- The two high-scoring "Researchers" are the system working, not failing:
|
||||
Birte Möhlendick (0.924, 12 juniors) — plausibly a group leader whose formal title
|
||||
lags her role; Farnusch Kaschani (0.714, **37 juniors but 0 last-author works**) —
|
||||
the classic core-facility-scientist profile: on many students' papers without
|
||||
supervising them. The two mentor signals disagreeing on exactly this person is why
|
||||
`last_author_with_junior_first` exists as an independent cross-check.
|
||||
|
||||
### What this does NOT show
|
||||
|
||||
It validates the *direction* of the mentor proxy, not that top-ranked people are good
|
||||
mentors or multiplicators: professor-vs-researcher is a coarse label, n=43 is small,
|
||||
bridger has no ground truth in this sample, and amplifier is a single-metric score until
|
||||
M3. The real validation is the coach golden set (M3). This check is kept as a
|
||||
regression: re-run `validate_sample.py` after every weight change or dump refresh.
|
||||
|
||||
---
|
||||
|
||||
## Cohort fix + re-run (2026-07-15, config version 2)
|
||||
|
||||
The hospital gap above is fixed by a **configurable cohort list**: `cohorts.<primary-ID>.
|
||||
institution_ids` in `multipliers.yaml`. **How the list was discovered — and how to
|
||||
build one for another university — is documented in
|
||||
[ASSOCIATED_INSTITUTIONS.md](docs/ASSOCIATED_INSTITUTIONS.md).** For UDE it holds 9 institutions — UDE, Essen
|
||||
University Hospital, the West German Heart Center, the Erwin L. Hahn Institute, and the
|
||||
five OpenAlex lineage children (RISP, DTNW, KWI, ZBT, IUTA) — with the deliberate
|
||||
exclusions (Kliniken Essen-Mitte, the independent An-Institute) documented inline for
|
||||
the coaches to revisit. Candidates were sourced from `associated_institutions` in
|
||||
`openalex-institutions`; the extractor now matches `last_known_institutions` /
|
||||
`affiliations` by **institution ID terms** over the whole list.
|
||||
|
||||
### Before / after (UDE-only → 9-institution cohort)
|
||||
|
||||
| | UDE-only | cohort | note |
|
||||
|---|---|---|---|
|
||||
| Authors | 4,921 | **6,583** | +1,662, mostly hospital clinicians |
|
||||
| Works | 183,661 | **221,603** | |
|
||||
| Graph | 640k nodes / 4.14M edges | 764k / 5.26M | |
|
||||
| Pipeline runtime | 2.6 min | **4.5 min** | still far under the 15-min criterion |
|
||||
| Sample matched | 43/60 | **45/60** | Witzke + Bingel recovered |
|
||||
| Mentor exit check | 0.715 vs 0.493 PASS | **0.699 vs 0.493 PASS** | stable |
|
||||
| Tags (bridger/mentor/amplifier) | 66/91/609 | 96/131/763 | scales with cohort |
|
||||
|
||||
Face validity of the fix: both recovered professors immediately tag as mentors with
|
||||
strong evidence — Witzke (Senior, 73 juniors mentored), Bingel (Senior, 34 juniors,
|
||||
21 last-author-with-junior-first works).
|
||||
|
||||
### The remaining 15 missing, fully diagnosed
|
||||
|
||||
- **9 × correctly excluded** — they left UDE (`last_known` now Halle, Würzburg,
|
||||
Greifswald, OU Netherlands, ISG, or none). The sample is older than the corpus;
|
||||
these are not gaps.
|
||||
- **6 × stale-affiliation cases** — `last_known` IS in the cohort but their most
|
||||
recent cohort affiliation year is 2021–2024, so the `affiliation_years_gte: 2025`
|
||||
recency filter drops them. At least one (Saccà, last seen 2024) is a current
|
||||
professor — publication lag alone can push someone out of a 1-year window.
|
||||
**Recommendation for M2:** set `extraction.affiliation_years_gte: 2023` (already
|
||||
config) — captures normal publication lag while still excluding long-departed
|
||||
authors. Decide with the coaches; it trades a little precision for recall.
|
||||
|
||||
---
|
||||
|
||||
## M2 — pipeline + ES index (done 2026-07-15)
|
||||
|
||||
New modules: `extract.py` (canonical cohort-aware extraction, config-driven),
|
||||
`index.py` (`MultiplicatorsIndexClient` for `multiplicators_v1` on the INSE cluster),
|
||||
`build.py` (single entry point: extract → graph → metrics → scoring → index).
|
||||
`spike_audit.py` remains self-contained for auditing any institution.
|
||||
|
||||
```bash
|
||||
python build.py --institution-id I62318514 # full run (reuses cache)
|
||||
python build.py --institution-id I62318514 --force-extract # refresh from ES
|
||||
python build.py --institution-id I62318514 --no-index # local artifacts only
|
||||
```
|
||||
|
||||
### Index contract (`multiplicators_v1`, INSE cluster)
|
||||
|
||||
- Doc `_id` = `<institution_short>_<author_short>` (e.g. `I62318514_A5087456839`);
|
||||
one doc per author per institution.
|
||||
- Every doc: raw metrics, per-bucket percentiles, sub-scores, tags, career bucket,
|
||||
`suspicious_profile`, evidence (junior ids), `config_hash`, `computed_at`,
|
||||
`cohort_institution_ids`. Explicit mapping is PUT on every run (additive).
|
||||
- Idempotent re-runs: collect the institution's doc ids → bulk-delete → bulk-index →
|
||||
poll `_count` until the expected count is visible. **Verified: delete 9,474 →
|
||||
index 9,474 → count 9,474.**
|
||||
|
||||
### Key-permission gotchas (learned the hard way, encoded in `index.py`)
|
||||
|
||||
The admin-created index + standard INSE key allows: read, `_bulk` index/delete,
|
||||
`_mapping` updates, `_count`. It does **not** allow: index create/delete,
|
||||
`_delete_by_query` (same as org_patents), and — new finding — **`_refresh`
|
||||
(`indices:admin/refresh` → 403)**. A first client version silently relied on refresh
|
||||
and saw phantom docs during delete (stale visibility inflated the delete count) and a
|
||||
too-early post-index count. The client now never calls `_refresh`: it collects all doc
|
||||
ids BEFORE deleting, and verifies by polling `_count` (auto-refresh ≈ 1s) instead.
|
||||
|
||||
### Run with `affiliation_years_gte: 2023` (config v2 → v3)
|
||||
|
||||
| | 2025 cutoff | 2023 cutoff |
|
||||
|---|---|---|
|
||||
| Authors / works | 6,583 / 221,603 | **9,475 / 267,467** |
|
||||
| Graph | 764k nodes / 5.26M edges | 865k / 5.82M |
|
||||
| Full runtime (incl. extract + index) | — | **~14.5 min** |
|
||||
| Sample matched | 45/60 | **51/60** |
|
||||
| Mentor exit check | 0.699 vs 0.493 PASS | **0.740 vs 0.494 PASS** (wider gap) |
|
||||
|
||||
The 9 still-missing sample people are exactly the 9 confirmed leavers (last_known now
|
||||
Halle, Würzburg, Greifswald, …) — correct exclusions, zero unexplained gaps. All six
|
||||
stale-affiliation cases were recovered (some via 2023+ affiliations with the hospital /
|
||||
institute cohort members rather than UDE itself).
|
||||
|
||||
Career-bucket distribution in the index: Early 5,361 / Emerging 1,591 /
|
||||
Established 777 / Senior 1,745. Tags: bridger 133, mentor 161, amplifier 1,107
|
||||
(amplifier still single-metric until M3 — ignore).
|
||||
|
||||
### Next (M3)
|
||||
|
||||
Wire the signal joins into the amplifier score (`org_patents` match_type
|
||||
institution/both, news with name normalization at low weight, CORDIS DOI-join),
|
||||
then calibrate the YAML weights with the innovation coaches against their golden set.
|
||||
M4 (read router in `inse/`) once the UI needs it.
|
||||
|
||||
---
|
||||
|
||||
## M3 — amplifier signal joins (done 2026-07-15)
|
||||
|
||||
Before wiring, a live-index audit showed the amplifier was degenerate: its only input
|
||||
(`industry_coauthor_share`) was 0 for 61.5% of the cohort, and the "top amplifiers"
|
||||
were small-denominator ratio artifacts (share = 1.0 with 2 typed works). Two fixes:
|
||||
|
||||
1. **Shrinkage**: scoring now uses `industry_coauthor_share_shrunk = company/(typed+k)`
|
||||
(k=5, config `signals.industry_share_shrinkage_k`); the raw share stays in the doc.
|
||||
2. **Three independent signal joins** (`signals.py`), weights in YAML
|
||||
(shrunk share 0.50 / patents 0.25 / CORDIS 0.15 / news 0.10):
|
||||
|
||||
| signal | join mechanism | UDE yield (9,474 authors) |
|
||||
|---|---|---|
|
||||
| `patent_count` | `org_patents.matched_authors` author IDs, `match_type ∈ {institution, both}`; name-only kept as `patent_count_name_only` evidence, never scored | 55 authors (17 more name-only) |
|
||||
| `news_mentions` | `aktuell_postproc` LLM-extracted names, normalized-exact match (casefold + diacritic fold); a normalized name shared by >1 cohort authors credits NO ONE | 1,369 authors; **839 ambiguous names skipped** (precision over recall) |
|
||||
| `cordis_eu_projects` | DOI overlap with `cordis_eu_*_publications` → distinct projectIDs. **Case-insensitive term matching** — 21% of CORDIS DOIs contain uppercase and a plain `terms` query silently misses them | 1,342 authors |
|
||||
|
||||
Signal join runtime ≈ 9 min (the case-insensitive CORDIS batches dominate); total
|
||||
pipeline ≈ 20 min. Mentor/bridger untouched: validation unchanged (51/60, mentor
|
||||
check PASS 0.740 vs 0.494).
|
||||
|
||||
### Effect on the amplifier tag
|
||||
|
||||
Tags went **1,107 → 10**. With four independent inputs, a ≥0.85 *weighted mean* of
|
||||
within-bucket percentiles requires being near the top on most channels — the tag now
|
||||
means something. The new top-10 is face-valid (Wiltfang, Erbel, Kaiser, Schierning —
|
||||
patent-holding, industry-connected, media-visible seniors). Two open calibration
|
||||
questions for the coaches:
|
||||
|
||||
- **Threshold per tag?** 0.85 yields 133 bridgers / 161 mentors / 10 amplifiers.
|
||||
If more amplifier candidates are wanted, either lower a per-tag threshold
|
||||
(currently one global `tags.threshold`) or re-weight.
|
||||
- **Split-profile artifact**: an Early-bucket author with 1 active year made top-10
|
||||
amplifier — almost certainly a split OpenAlex profile of a senior professor
|
||||
(patents/news land on the fragment). Bucket-relative ranking amplifies fragments;
|
||||
the `suspicious_profile` flag does not catch splits (only merges). Known
|
||||
limitation — ORCID-based resolution is the deferred fix.
|
||||
|
||||
### M3 remaining
|
||||
|
||||
The **coach calibration session**: golden set of 10–20 known multiplicators, tune the
|
||||
YAML (weights, per-tag thresholds), re-run `validate_sample.py` as regression.
|
||||
|
||||
---
|
||||
|
||||
## Network visualization index (`multiplicator_networks_v1`, added 2026-07-16)
|
||||
|
||||
The scores index answers *what did this person score*; this companion index answers
|
||||
*who are they connected to and how* — everything a frontend needs to draw the
|
||||
ego-network figures (force layout, role colors, tooltips) without recomputing
|
||||
anything. Materialized by `build.py` (`networks.py`) while the full graph is in
|
||||
memory, because the **neighbor-neighbor edges** that make graph shape readable
|
||||
(dense mesh = one community; spokes with gaps = brokered structural holes) come from
|
||||
works that do NOT include the ego — no request-time query can reconstruct them.
|
||||
|
||||
One doc per focal author, `_id = <institution>_<author>` (same scheme as scores):
|
||||
|
||||
| field | content |
|
||||
|---|---|
|
||||
| `nodes[]` | `{id, name, role, inst, active_years, suspicious, company_insts?}`; role ∈ ego / mentee / cohort / industry / external. **`industry` is tie-level**: assigned only when a company affiliation of the neighbour appears on a work *shared with the ego* (matching what `industry_coauthor_share` counts), and `company_insts` names the triggering companies — a lifetime-flag version painted predominantly-academic people orange over a single old dual affiliation. `inst` is the author's most frequent institution. |
|
||||
| `edges[]` | `{a, b, w, n_works, cross, first_year, last_year}` — `w` = decayed tie strength, `cross` = mostly cross-institution |
|
||||
| `ego{}` | header duplicate (bucket, tags, sub_scores, max_sub_score) so a network endpoint renders standalone |
|
||||
| totals | `total_coauthors`, `cohort_coauthors`, `mentee_count`, `shown`, `shown_mentees` |
|
||||
| provenance | `config_hash`, `computed_at`, `cohort_institution_ids` |
|
||||
|
||||
Selection: strongest `network.max_nodes` (42) co-authors by tie weight with up to
|
||||
`network.max_forced_mentees` (14) mentees force-included first — mentees' ties are
|
||||
decayed and team-size-divided, so a pure top-by-weight cut hides exactly the people
|
||||
the mentor score is about. Positions are NOT stored: the webapp's echarts `graph`
|
||||
series (force layout) lays out at render time; map role → color, active_years →
|
||||
symbol size, `cross` → dashed line.
|
||||
|
||||
`nodes`/`edges` are mapped `"enabled": false` (stored, never indexed) — the index
|
||||
stays small and fast for the queryable header fields (`institution_id`, `author_id`,
|
||||
`ego.tags`, `computed_at`, …). Skip building with `--no-network`.
|
||||
|
||||
### Regenerating the HTML report
|
||||
|
||||
`make_report.py` renders a self-contained HTML report of four contrasting cases
|
||||
straight from the two live ES indices — no local cache required, so it works on any
|
||||
machine with cluster access after a build has run:
|
||||
|
||||
```bash
|
||||
python make_report.py --institution-id I62318514
|
||||
# -> reports/multiplier_networks.html (open in any browser; light/dark toggle)
|
||||
|
||||
python make_report.py --institution-id I62318514 \
|
||||
--author-ids A5113304257,A5043495754,A5007801159,A5123934012 # explicit cast
|
||||
```
|
||||
|
||||
The cast is pinned in `report.featured_author_ids` (config) so the report is
|
||||
reproducible across weight tunes and dump refreshes; `--author-ids` overrides it and
|
||||
`--auto` falls back to selecting the current top bridger / mentor / amplifier plus the
|
||||
highest-scoring person who carries **no** tag — the last one exposes where the
|
||||
thresholds bite (and, when that person's best sub-score is *above* 0.85, the
|
||||
`tags.min_active_years` guard that withholds tags from one-year profiles, which are
|
||||
usually **split** OpenAlex identities — the case `suspicious_profile` cannot catch,
|
||||
since that flag detects merges).
|
||||
|
||||
The page layout lives in `report_template.html` (tracked); `reports/` and `cache/` are
|
||||
gitignored, so a `git clean -fdx` or fresh checkout wipes generated reports and
|
||||
extracts — re-run the command above to rebuild the report, and `build.py` only if the
|
||||
indices themselves need refreshing.
|
||||
@@ -0,0 +1,277 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
build.py — single entry point for the multiplicator pipeline (M2).
|
||||
|
||||
extract (cached) -> graph -> metrics -> scoring -> local artifacts -> ES index.
|
||||
|
||||
python build.py --institution-id I62318514 # full run
|
||||
python build.py --institution-id I62318514 --force-extract # refresh the ES extract
|
||||
python build.py --institution-id I62318514 --no-index # skip the ES write
|
||||
|
||||
Artifacts in --cache-dir:
|
||||
authors_<ID>.jsonl.gz / works_<ID>.jsonl.gz the extract (reused unless --force-extract)
|
||||
scores_<ID>.jsonl.gz one scored row per focal author
|
||||
build_summary_<ID>.json stage timings + tag counts + top lists
|
||||
|
||||
The ES write targets `multiplicators_v1` on the INSE cluster (admin-created; the API
|
||||
key cannot create indices). Doc _id = <institution>_<author>; every run deletes the
|
||||
institution's docs first, so re-runs are idempotent.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import gzip
|
||||
import json
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
from extract import extract_to_cache, read_jsonl_gz
|
||||
from graph import build_graph, short_id
|
||||
from index import NETWORK_MAPPING, NETWORKS_INDEX, MultiplicatorsIndexClient
|
||||
from metrics import compute_all_metrics, incident_edges
|
||||
from networks import build_network_docs
|
||||
from scoring import load_config, score_rows
|
||||
from signals import collect_signals, normalize_doi
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--institution-id", required=True)
|
||||
parser.add_argument("--config", default=str(SCRIPT_DIR / "multipliers.yaml"))
|
||||
parser.add_argument("--cache-dir", default=str(SCRIPT_DIR / "cache"))
|
||||
parser.add_argument(
|
||||
"--force-extract", action="store_true",
|
||||
help="Re-extract from ES even if a cache exists.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-index", action="store_true",
|
||||
help="Compute and write local artifacts but skip the ES indexing step.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-signals", action="store_true",
|
||||
help="Skip the patents/news/CORDIS signal joins (amplifier falls back to "
|
||||
"industry co-authorship alone).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--no-network", action="store_true",
|
||||
help="Skip materializing the per-author ego-network visualization docs.",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
short = args.institution_id.strip().rsplit("/", 1)[-1]
|
||||
cache_dir = Path(args.cache_dir)
|
||||
config = load_config(args.config)
|
||||
timings: dict[str, float] = {}
|
||||
|
||||
# ---- extract (cache-aware) ----
|
||||
t0 = time.time()
|
||||
authors_path, works_path, insts = extract_to_cache(
|
||||
args.institution_id, config, cache_dir, force=args.force_extract
|
||||
)
|
||||
cohort_short_ids = [i["short_id"] for i in insts]
|
||||
timings["extract_s"] = round(time.time() - t0, 1)
|
||||
|
||||
# ---- load ----
|
||||
t0 = time.time()
|
||||
focal_ids = {a["id"] for a in read_jsonl_gz(authors_path)}
|
||||
works = list(read_jsonl_gz(works_path))
|
||||
timings["load_cache_s"] = round(time.time() - t0, 1)
|
||||
print(f"Loaded {len(works)} works, {len(focal_ids)} focal authors "
|
||||
f"({timings['load_cache_s']}s)")
|
||||
|
||||
# ---- single pass over works before they are freed: DOIs per focal author
|
||||
# (CORDIS join), per-author institution counts (modal label), and per-WORK
|
||||
# company affiliations (tie-level industry roles in the network docs)
|
||||
focal_short_ids = {short_id(a) for a in focal_ids}
|
||||
max_authors = int(config["extraction"]["max_authors_per_work"])
|
||||
dois_by_author: dict[str, set[str]] = {}
|
||||
inst_counts: dict[str, dict[str, int]] = {}
|
||||
company_by_author_work: dict[str, dict[str, list[str]]] = {}
|
||||
company_work_authors: dict[str, set[str]] = {}
|
||||
for w in works:
|
||||
doi = normalize_doi(w.get("doi"))
|
||||
wid = short_id(w.get("id"))
|
||||
work_authors: set[str] = set()
|
||||
work_companies: dict[str, list[str]] = {}
|
||||
for a in w.get("authorships") or []:
|
||||
aid = short_id((a.get("author") or {}).get("id"))
|
||||
if not aid:
|
||||
continue
|
||||
work_authors.add(aid)
|
||||
if doi and aid in focal_short_ids:
|
||||
dois_by_author.setdefault(aid, set()).add(doi)
|
||||
for inst in a.get("institutions") or []:
|
||||
name = inst.get("display_name")
|
||||
if name:
|
||||
counts = inst_counts.setdefault(aid, {})
|
||||
counts[name] = counts.get(name, 0) + 1
|
||||
if inst.get("type") == "company":
|
||||
work_companies.setdefault(aid, []).append(name)
|
||||
# company evidence only for works that also enter the graph (same cap)
|
||||
if wid and work_companies and 2 <= len(work_authors) <= max_authors:
|
||||
company_work_authors[wid] = work_authors
|
||||
for aid, names in work_companies.items():
|
||||
company_by_author_work.setdefault(aid, {})[wid] = names
|
||||
inst_by_author = {
|
||||
aid: max(counts, key=counts.get) for aid, counts in inst_counts.items()
|
||||
}
|
||||
del inst_counts
|
||||
|
||||
# ---- graph ----
|
||||
t0 = time.time()
|
||||
graph = build_graph(
|
||||
works,
|
||||
focal_ids,
|
||||
max_authors_per_work=config["extraction"]["max_authors_per_work"],
|
||||
decay=config["graph"]["decay"],
|
||||
)
|
||||
del works
|
||||
timings["build_graph_s"] = round(time.time() - t0, 1)
|
||||
print(f"Graph: {len(graph.nodes)} nodes, {len(graph.edges)} edges, "
|
||||
f"{graph.n_works_used} works used, {graph.n_works_capped} capped, "
|
||||
f"ref_year={graph.ref_year} ({timings['build_graph_s']}s)")
|
||||
|
||||
# ---- metrics ----
|
||||
t0 = time.time()
|
||||
metric_rows = compute_all_metrics(
|
||||
graph,
|
||||
junior_active_years_max=config["mentor"]["junior_active_years_max"],
|
||||
senior_active_years_min=config["mentor"]["senior_active_years_min"],
|
||||
progressed_active_years_min=config["mentor"]["progressed_active_years_min"],
|
||||
industry_share_shrinkage_k=config.get("signals", {}).get(
|
||||
"industry_share_shrinkage_k", 5
|
||||
),
|
||||
)
|
||||
timings["metrics_s"] = round(time.time() - t0, 1)
|
||||
print(f"Metrics for {len(metric_rows)} focal authors ({timings['metrics_s']}s)")
|
||||
|
||||
# ---- signal joins (patents / news / CORDIS) ----
|
||||
if args.no_signals:
|
||||
print("Skipping signal joins (--no-signals).")
|
||||
timings["signals_s"] = 0.0
|
||||
else:
|
||||
t0 = time.time()
|
||||
signals_cfg = config.get("signals") or {}
|
||||
display_names = {
|
||||
aid: row.get("display_name") or "" for aid, row in metric_rows.items()
|
||||
}
|
||||
signal_counts = collect_signals(
|
||||
short,
|
||||
display_names,
|
||||
{a: d for a, d in dois_by_author.items() if a in metric_rows},
|
||||
scored_match_types=tuple(
|
||||
signals_cfg.get("patent_match_types", ["institution", "both"])
|
||||
),
|
||||
news_require_relevant=signals_cfg.get("news_require_relevant", True),
|
||||
)
|
||||
for metric, counts in signal_counts.items():
|
||||
for aid, row in metric_rows.items():
|
||||
row[metric] = counts.get(aid, 0)
|
||||
timings["signals_s"] = round(time.time() - t0, 1)
|
||||
print(f"Signal joins done ({timings['signals_s']}s)")
|
||||
|
||||
# ---- scoring ----
|
||||
t0 = time.time()
|
||||
scored = score_rows(metric_rows, config)
|
||||
timings["scoring_s"] = round(time.time() - t0, 1)
|
||||
|
||||
scores_path = cache_dir / f"scores_{short}.jsonl.gz"
|
||||
with gzip.open(scores_path, "wt", encoding="utf-8", newline="\n") as f:
|
||||
for row in scored:
|
||||
f.write(json.dumps(row, ensure_ascii=True) + "\n")
|
||||
print(f"Scores -> {scores_path} ({timings['scoring_s']}s)")
|
||||
|
||||
# ---- index into ES ----
|
||||
docs_written = 0
|
||||
if args.no_index:
|
||||
print("Skipping ES indexing (--no-index).")
|
||||
else:
|
||||
t0 = time.time()
|
||||
es = MultiplicatorsIndexClient()
|
||||
es.ensure_mapping()
|
||||
docs_written = es.index_rows(short, cohort_short_ids, scored)
|
||||
count = es.count_for_institution(short)
|
||||
timings["index_s"] = round(time.time() - t0, 1)
|
||||
print(f"Indexed {docs_written} docs into {es.index} "
|
||||
f"(count for {short}: {count}) ({timings['index_s']}s)")
|
||||
if count != len(scored):
|
||||
raise RuntimeError(
|
||||
f"Post-index count mismatch: expected {len(scored)}, index has {count}"
|
||||
)
|
||||
|
||||
# ---- ego-network visualization docs ----
|
||||
network_docs_written = 0
|
||||
if args.no_index or args.no_network:
|
||||
print("Skipping network materialization.")
|
||||
else:
|
||||
t0 = time.time()
|
||||
network_cfg = config.get("network") or {}
|
||||
network_docs = build_network_docs(
|
||||
graph,
|
||||
metric_rows,
|
||||
scored,
|
||||
incident_edges(graph),
|
||||
inst_by_author,
|
||||
company_by_author_work,
|
||||
company_work_authors,
|
||||
max_nodes=int(network_cfg.get("max_nodes", 42)),
|
||||
max_forced_mentees=int(network_cfg.get("max_forced_mentees", 14)),
|
||||
)
|
||||
net_es = MultiplicatorsIndexClient(index=NETWORKS_INDEX)
|
||||
net_es.ensure_mapping(NETWORK_MAPPING)
|
||||
network_docs_written = net_es.index_rows(short, cohort_short_ids, network_docs)
|
||||
timings["network_s"] = round(time.time() - t0, 1)
|
||||
print(f"Indexed {network_docs_written} network docs into {net_es.index} "
|
||||
f"({timings['network_s']}s)")
|
||||
|
||||
# ---- summary ----
|
||||
tag_counts: dict[str, int] = {}
|
||||
for row in scored:
|
||||
for tag in row["tags"]:
|
||||
tag_counts[tag] = tag_counts.get(tag, 0) + 1
|
||||
|
||||
def top(sub: str, k: int = 10):
|
||||
rows = sorted(scored, key=lambda r: r["sub_scores"].get(sub, 0), reverse=True)
|
||||
return [
|
||||
{
|
||||
"author_id": r["author_id"],
|
||||
"name": r["display_name"],
|
||||
"score": r["sub_scores"][sub],
|
||||
"bucket": r["career_bucket"],
|
||||
"active_years": r["active_years"],
|
||||
"suspicious": r["suspicious_profile"],
|
||||
}
|
||||
for r in rows[:k]
|
||||
]
|
||||
|
||||
summary = {
|
||||
"institution": short,
|
||||
"cohort": cohort_short_ids,
|
||||
"config_hash": config["_config_hash"],
|
||||
"counts": {
|
||||
"focal_authors_scored": len(scored),
|
||||
"nodes": len(graph.nodes),
|
||||
"edges": len(graph.edges),
|
||||
"works_used": graph.n_works_used,
|
||||
"works_capped": graph.n_works_capped,
|
||||
"tags": tag_counts,
|
||||
"suspicious_profiles": sum(1 for r in scored if r["suspicious_profile"]),
|
||||
"es_docs_written": docs_written,
|
||||
"es_network_docs_written": network_docs_written,
|
||||
},
|
||||
"timings": timings,
|
||||
"top_bridgers": top("bridger"),
|
||||
"top_mentors": top("mentor"),
|
||||
"top_amplifiers": top("amplifier"),
|
||||
}
|
||||
summary_path = cache_dir / f"build_summary_{short}.json"
|
||||
with open(summary_path, "w", encoding="utf-8", newline="\n") as f:
|
||||
json.dump(summary, f, ensure_ascii=False, indent=2)
|
||||
print(json.dumps(summary["counts"], ensure_ascii=False, indent=2))
|
||||
print(f"Summary -> {summary_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,5 @@
|
||||
"""Make the module root importable from tests/ (pytest inserts this dir via conftest)."""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent))
|
||||
@@ -0,0 +1,116 @@
|
||||
# Cohort discovery: finding a university's associated institutions in OpenAlex
|
||||
|
||||
How the `cohorts.<ID>.institution_ids` list in `multipliers.yaml` was built for the
|
||||
University of Duisburg-Essen (I62318514), and how to repeat the process for another
|
||||
university. Context: the multiplicator pipeline's author set is only as good as this
|
||||
list — matching UDE alone silently excluded ~2,400 active clinicians, including
|
||||
prominent medicine professors (found via the M1 validation, where 17/60 hand-labeled
|
||||
people were missing).
|
||||
|
||||
## Why this is necessary: `lineage` vs `associated_institutions`
|
||||
|
||||
Every institution document in OpenAlex (index `openalex-institutions`) carries two
|
||||
relationship fields:
|
||||
|
||||
- **`lineage`** — the strict parent hierarchy: a list of institution IDs including the
|
||||
institution itself and its parents. This is what ID-based filters normally use
|
||||
(e.g. `company_connections/logic.py` checks `UDE_OPENALEX_ID in lineage`).
|
||||
- **`associated_institutions`** — a looser list of linked institutions, each with a
|
||||
`relationship` label: `child`, `parent`, or `related`.
|
||||
|
||||
The trap: **OpenAlex models German university hospitals as `related`, not as lineage
|
||||
children.** Essen University Hospital's own `lineage` contains only itself. Any filter
|
||||
built on UDE's ID or lineage therefore can never match hospital-affiliated authors —
|
||||
the entire clinical medical faculty — no matter how the query is written.
|
||||
|
||||
## The discovery method (3 steps)
|
||||
|
||||
### Step 1 — read the university's `associated_institutions`
|
||||
|
||||
Query the `openalex-institutions` document for the primary ID and list its
|
||||
`associated_institutions`. For UDE (I62318514):
|
||||
|
||||
| ID | relationship | name | authors (all-time last_known) |
|
||||
|---|---|---|---|
|
||||
| I4210090139 | child | Rhein-Ruhr Institut für Sozialforschung | 11 |
|
||||
| I4210092428 | child | Deutsches Textilforschungszentrum Nord-West | 170 |
|
||||
| I4210110714 | child | Institute for Advanced Study in the Humanities (KWI) | 81 |
|
||||
| I4210146441 | child | Hydrogen and Fuel Cell Center (ZBT) | 98 |
|
||||
| I4210154243 | child | Institut für Energie- und Umwelttechnik (IUTA) | 233 |
|
||||
| **I4210119759** | **related** | **Essen University Hospital** | **7,484** |
|
||||
| I4210146447 | related | Kliniken Essen-Mitte | 788 |
|
||||
| I2799342142 | related | Salomon Ludwig Steinheim-Institut | — |
|
||||
| I4210124583 | related | IWW Water Centre | — |
|
||||
|
||||
(For comparison: UDE itself has 14,388 all-time last_known authors.)
|
||||
|
||||
### Step 2 — follow one hop into any `related` hospital
|
||||
|
||||
The hospital's own `associated_institutions` revealed a member invisible from UDE's
|
||||
record: the **West German Heart and Vascular Center Essen (I4210161917)** is a `child`
|
||||
of the hospital (1,021 authors) — two hops from UDE.
|
||||
|
||||
### Step 3 — validate against real people (this catches what no query can)
|
||||
|
||||
The **Erwin L. Hahn Institute for MRI (I127668822)** was NOT found by any metadata
|
||||
walk: in OpenAlex it is completely isolated — `lineage` contains only itself,
|
||||
`associated_institutions` is empty. It surfaced only when diagnosing why a specific
|
||||
hand-labeled professor (Ulrike Bingel) was missing from the cohort: it appeared in her
|
||||
affiliation list. Lesson: after building the list from metadata, always check a set of
|
||||
known current researchers against the extracted cohort — the misses point to
|
||||
institutions the graph walk cannot reach.
|
||||
|
||||
## Inclusion decisions for UDE (documented in `multipliers.yaml`)
|
||||
|
||||
**Included (9):**
|
||||
|
||||
- `I62318514` UDE (primary)
|
||||
- `I4210119759` Essen University Hospital — it *is* the university medical centre;
|
||||
its `related` label is an OpenAlex modelling choice, not an organisational fact
|
||||
- `I4210161917` West German Heart and Vascular Center (child of the hospital)
|
||||
- `I127668822` Erwin L. Hahn Institute (joint UDE institute; isolated in OpenAlex)
|
||||
- The five lineage children: RISP, DTNW, KWI, ZBT, IUTA — small but unambiguous
|
||||
|
||||
**Excluded by default (revisit with the coaches):**
|
||||
|
||||
- `I4210146447` Kliniken Essen-Mitte — an independent hospital group; `related`
|
||||
reflects collaboration, not membership; its staff are not UDE researchers
|
||||
- `I2799342142` Salomon Ludwig Steinheim-Institut and `I4210124583` IWW Water
|
||||
Centre — *An-Institute*: legally independent institutes **at** UDE, not **of** it
|
||||
|
||||
The borderline cases are exactly the German-institutional-law ones (An-Institute,
|
||||
municipal hospital groups). These are human judgment calls, which is why the list
|
||||
lives in config with the reasoning inline, not in code.
|
||||
|
||||
## Effect on the cohort (measured)
|
||||
|
||||
| | UDE ID only | 9-institution cohort |
|
||||
|---|---|---|
|
||||
| Authors (affiliation ≥ 2023) | ~7,100¹ | 9,475 |
|
||||
| Hand-labeled sample matched | 43/60² | 51/60 |
|
||||
| Unexplained misses | 17 | **0** (the 9 remaining all verifiably left UDE) |
|
||||
|
||||
¹ approximate — the single-ID number was measured at the 2025 cutoff (4,921); scaled here for context.
|
||||
² at the 2025 cutoff; the cohort fix and the 2023 affiliation window each contributed.
|
||||
|
||||
Recovered by the fix, as a face-validity check: Oliver Witzke (Senior, 73 juniors
|
||||
mentored → tagged mentor) and Ulrike Bingel (Senior, 34 juniors, 21
|
||||
last-author-with-junior-first works → tagged mentor).
|
||||
|
||||
## Repeating this for another university
|
||||
|
||||
1. Fetch `associated_institutions` from `openalex-institutions` for the primary ID;
|
||||
collect all `child` entries and every `related` entry.
|
||||
2. For any `related` hospital / medical centre, fetch ITS `associated_institutions`
|
||||
and collect its children.
|
||||
3. For each candidate, count authors
|
||||
(`last_known_institutions.id == <candidate>` on `openalex-authors`) — size tells
|
||||
you what an inclusion decision is worth.
|
||||
4. Decide inclusions with a human: university hospitals in; independent hospital
|
||||
groups and An-Institute out unless the institution says otherwise.
|
||||
5. Write the `cohorts.<primary-ID>` block in `multipliers.yaml` with the reasoning
|
||||
as inline comments.
|
||||
6. Run the extraction, then validate against a list of known current researchers
|
||||
(professors from several faculties, especially medicine). Every unexplained miss
|
||||
is either a missing cohort member (like the Hahn Institute) or a stale-affiliation
|
||||
case (tune `extraction.affiliation_years_gte`).
|
||||
@@ -0,0 +1,239 @@
|
||||
# Multiplicator Detection — Concept, Technical Walkthrough & Roadmap
|
||||
|
||||
A ground-up explanation of what this module does, how every field in the
|
||||
`multiplicators_v1` index is computed and what it means, where the ideas come from,
|
||||
and where the project stands. Written for a reader with no prior context.
|
||||
|
||||
Companion docs: [README.md](../README.md) (per-milestone results and stats),
|
||||
[ASSOCIATED_INSTITUTIONS.md](ASSOCIATED_INSTITUTIONS.md) (cohort discovery method).
|
||||
|
||||
---
|
||||
|
||||
## 1. What problem this solves
|
||||
|
||||
The university's innovation coaches want to find **multiplicators**: people whose value
|
||||
isn't only their own research output, but their effect on the system around them — they
|
||||
connect groups that otherwise wouldn't talk, they grow junior researchers into
|
||||
independent scientists, they carry research out of academia into industry and the
|
||||
public. These people are invisible in classic rankings (citations, h-index), which
|
||||
measure individual output, not systemic effect.
|
||||
|
||||
The core bet of the whole project: **these behaviors leave measurable traces in
|
||||
publication metadata.** Who you publish with, when, in what role, and across which
|
||||
institutional boundaries is recorded in OpenAlex for every paper. So instead of asking
|
||||
"who is influential?" we ask three narrower, checkable questions, each an archetype:
|
||||
|
||||
- **Bridger** — do your collaborations span otherwise-disconnected communities,
|
||||
fields, institutions, sectors?
|
||||
- **Mentor** — do junior people repeatedly start their careers publishing with you,
|
||||
in the role configuration typical of supervision?
|
||||
- **Amplifier** — does your work escape academia: patents, industry co-authorship,
|
||||
EU projects, press coverage?
|
||||
|
||||
Everything else is machinery for answering those three questions honestly at the
|
||||
scale of ~9,500 people.
|
||||
|
||||
## 2. The pipeline, step by step
|
||||
|
||||
**Step 1 — Define who "the university" is (cohort).** OpenAlex models Essen University
|
||||
Hospital as merely *related* to UDE, not part of it, so filtering by UDE's ID alone
|
||||
silently loses the entire clinical faculty (~2,400 active people). The cohort is
|
||||
therefore an explicit list of 9 institution IDs (UDE + hospital + heart center +
|
||||
affiliated institutes) — the `cohort_institution_ids` array on every document. An
|
||||
author belongs if their last-known institution is in that list **and** they have an
|
||||
affiliation year ≥ 2023 (publication lag makes a 1-year window drop current staff).
|
||||
Details: [ASSOCIATED_INSTITUTIONS.md](ASSOCIATED_INSTITUTIONS.md).
|
||||
|
||||
**Step 2 — Extract.** For those ~9,475 authors we pull **all their works globally** —
|
||||
not just university-affiliated ones — with the *complete* author list of every paper,
|
||||
including external co-authors and each co-author's institution (with its type:
|
||||
education, company, healthcare…). Result: ~267k works, ~3.8M authorship records.
|
||||
The "all works globally" property matters: it makes career histories *exact* for
|
||||
cohort members, while external co-authors' histories are truncated to shared works —
|
||||
a fact the mentor metrics must respect (see §3).
|
||||
|
||||
**Step 3 — Build the co-authorship graph.** Every paper connects each pair of its
|
||||
authors with an edge. Three refinements:
|
||||
|
||||
- **Team-size weighting**: a pair on a 3-author paper gets weight 1/(n−1) = 0.5; on a
|
||||
40-author paper, 1/39. Being 2 of 3 authors is strong evidence you actually work
|
||||
together; being 2 of 40 is weak evidence.
|
||||
- **Time decay**: each paper's contribution is multiplied by 0.8^(years ago). A 2025
|
||||
collaboration counts full; a 2010 one counts ~3%. We're looking for *current*
|
||||
multiplicators.
|
||||
- **Hyperauthorship cap**: papers with >50 authors (CERN-style consortia; the corpus
|
||||
max is 4,839 authors on one paper) are excluded from the graph entirely — that one
|
||||
paper alone would create ~11.7M fake "collaboration" edges and a giant artificial
|
||||
clique. Those papers still count for career metrics.
|
||||
|
||||
Result: ~865k nodes (cohort + all their external co-authors), ~5.8M weighted edges.
|
||||
|
||||
**Step 4 — Compute metrics on that graph** (§3, field by field).
|
||||
|
||||
**Step 5 — Normalize fairly and score.** Raw metrics aren't comparable between a PhD
|
||||
student and a 30-year professor, so every metric becomes a **percentile within the
|
||||
person's career stage**, then three weighted sub-scores, then tags above a threshold
|
||||
(§4).
|
||||
|
||||
**Step 6 — Join external signals** (patents, news, EU projects) and **write everything
|
||||
to `multiplicators_v1`** — one document per person, containing raw values, percentiles,
|
||||
scores, tags, and evidence, so a coach can always see *why* someone scored what they
|
||||
scored.
|
||||
|
||||
## 3. A real document, field by field
|
||||
|
||||
Example: Tabea M. G. Pakull, `_id = I62318514_A5043360678` (institution + author —
|
||||
the same person at another university would be a separate doc). An ES `_version: 8`
|
||||
just means the doc was overwritten 8 times by re-runs; the `fields` block ES returns
|
||||
alongside `_source` is its internal columnar echo — ignore it.
|
||||
|
||||
### Career context
|
||||
|
||||
| field | example value | meaning |
|
||||
|---|---|---|
|
||||
| `active_years` | 3 | Distinct calendar years with ≥1 publication — our seniority measure. We deliberately do **not** use "years since first publication": the repo's career-stage analysis found merged OpenAlex profiles give active professors debut years like 1893. One wrong old paper distorts career span by decades but moves `active_years` by exactly +1. |
|
||||
| `career_bucket` | "Early" | Early ≤4, Emerging ≤9, Established ≤14, Senior >14 active years — thresholds taken unchanged from the backend's `_classify_career_stage`, empirically validated against 60 known professors/researchers. **All percentiles are computed against the same bucket only.** |
|
||||
| `n_works` | 12 | Works in the extract. |
|
||||
| `suspicious_profile` | false | Merged-identity flag (first year <1970 or span >60). True ⇒ treat evidence as low-confidence; ~18% of Seniors carry it. |
|
||||
|
||||
### Bridger metrics (network structure)
|
||||
|
||||
| field | example | what it measures |
|
||||
|---|---|---|
|
||||
| `betweenness` | 0 | **Betweenness centrality** on the cohort-internal graph: how often the strongest connection paths between other cohort members run *through you*. High = the network's traffic must pass you = you connect groups. Edge weights are "closeness", so paths use inverted weights as distances. A 0 is normal early-career; the percentile can still be ~0.44 because most of the bucket is also 0 and ties share their average rank. |
|
||||
| `constraint` → `brokerage` | 0.085 → 0.915 | **Burt's constraint** looks only at your *ego network* (you + your co-authors): do your contacts also know each other? High constraint = you sit inside one dense clique. Low = your contacts live in separate worlds and *you* are the only link — you span "structural holes". Stored as `brokerage = 1 − constraint` so higher = more bridging. Computed on the **full graph including external co-authors**, so it sees outward bridging that internal betweenness can't. In the example: 82 co-authors who barely know each other — 90th percentile of the Early bucket. |
|
||||
| `field_entropy` | 0.98 | Shannon entropy over the scientific fields of the person's papers. 0 = monodisciplinary; 1.0 bit ≈ two fields evenly; 2.0 ≈ four. Topical breadth as a proxy for interdisciplinary bridging (OpenAlex has no faculty structure, so this is the honest substitute — it must never be presented as "bridges faculties"). |
|
||||
| `cross_institution_share` | 0.85 | Share of collaboration weight with co-authors sharing *no* institution with the person — external orientation. |
|
||||
| `strength`, `n_coauthors` | 8.25, 82 | Total decayed edge weight and distinct co-author count — "reach", context only, not scored directly. |
|
||||
|
||||
### Mentor metrics
|
||||
|
||||
OpenAlex has no supervision records and debut years are unreliable, so the mentor
|
||||
signals are built on **`active_years_at(person, year)`** — how many active years
|
||||
someone had accumulated *as of a given year* — which inherits the robustness of
|
||||
`active_years` (a spurious 1893 paper shifts it by exactly 1, not 120).
|
||||
|
||||
| field | definition |
|
||||
|---|---|
|
||||
| `juniors_mentored` | Count of cohort co-authors who, in the year of their *first* joint paper, had ≤4 active years (Early) **while the focal person had ≥10** (Established+). A seniority-*gap* criterion — two PhD students co-publishing never counts. |
|
||||
| `junior_progression_rate` | Of those juniors, the fraction who later reached ≥5 active years — separates "grew them up" from "co-signed once". `null` = no juniors = not applicable (excluded from scoring, not counted against the person). |
|
||||
| `last_author_with_junior_first` | Papers where the person is **last author** with an Early-career **first author** — the classic supervision signature (student first, PI last). Deliberately independent of the gap logic: when the two disagree (37 "juniors" but zero last-author papers) that's the core-facility-scientist pattern, not a mentor. |
|
||||
| `mentoring_rate` | juniors ÷ own active years. Without a rate, prolific seniors win on volume alone (professor median 224 papers vs 11 for researchers). |
|
||||
|
||||
Mentor metrics are computed **only between cohort members**: external co-authors'
|
||||
histories are truncated to shared works, so an external senior would masquerade as a
|
||||
junior. This scope restriction is a data-correctness requirement, not a choice.
|
||||
|
||||
### Amplifier metrics
|
||||
|
||||
| field | source & link quality |
|
||||
|---|---|
|
||||
| `industry_coauthor_share` | Share of typed works with ≥1 company-affiliated co-author. The strongest industry signal available because it's **institution-ID-linked** — no name matching. Kept raw for transparency. |
|
||||
| `industry_coauthor_share_shrunk` | The **scored** variant: company ÷ (typed + 5). Why: with raw shares, someone with 2-of-2 company papers gets share 1.0 and beats someone with 40-of-80 — before this fix, the index's entire top-10 "amplifiers" were such small-denominator artifacts. The +5 makes small samples humble. |
|
||||
| `patent_count` | From `org_patents`, which links patents to OpenAlex author IDs. Only high-confidence matches (`match_type` = institution/both) are scored. |
|
||||
| `patent_count_name_only` | Name-only patent matches — **evidence only, never scored**. |
|
||||
| `news_mentions` | University press corpus, LLM-extracted names, matched after normalizing case and diacritics (René = rene). If a normalized name belongs to *two* cohort people, **nobody** gets credit (839 names skipped at UDE) — miscrediting is worse than missing. Hence the low weight. |
|
||||
| `cordis_eu_projects` | Distinct EU projects joined by **DOI overlap** (the person's paper DOIs ∩ DOIs attached to CORDIS project publications) — no name matching. Matching is case-insensitive because 21% of CORDIS DOIs contain uppercase. |
|
||||
|
||||
### Scoring plumbing
|
||||
|
||||
| field | meaning |
|
||||
|---|---|
|
||||
| `percentiles.*` | Each raw metric's mean-rank percentile *within the career bucket*. Ties share their average rank — that's why a metric at 0 in a mostly-zero bucket shows ~0.44–0.50, not 1.0: a mass of zeros must not be rewarded. `null` metrics are excluded, and their weight is redistributed. |
|
||||
| `sub_scores.{bridger,mentor,amplifier}` | Weighted means of the percentiles. Weights live in `multipliers.yaml`, never in code — coaches retune them. Current amplifier weights: shrunk share 0.50, patents 0.25, CORDIS 0.15, news 0.10. |
|
||||
| `tags` | Sub-score ≥ `tags.threshold` (0.85) ⇒ tag; a person can hold 0–3. Current yield at UDE: 133 bridgers, 161 mentors, 10 amplifiers. |
|
||||
| `max_sub_score` | Best sub-score — the default ranking key. |
|
||||
| `evidence.junior_ids` | Receipts (which people count as mentees) — a coach never sees a bare number. |
|
||||
| `config_hash`, `computed_at` | Which YAML weighting produced the score, and when. Scores are cohort-relative and weight-dependent; without this they'd be unfalsifiable after the next retune. |
|
||||
| `institution_id`, `cohort_institution_ids` | Which university this doc belongs to and which 9 institutions defined its cohort. |
|
||||
|
||||
Worked example (the Pakull doc): amplifier = 0.50·0.99 (shrunk share) + 0.25·0.50
|
||||
(patents, tie-mass) + 0.15·0.98 (one EU project — 98th percentile *for an
|
||||
Early-career person*) + 0.10·0.47 (news) = **0.8131** — high, but under 0.85 ⇒ no
|
||||
tag. Mentor 0.494 ≈ bucket median: all-zero mentor metrics in a bucket where nearly
|
||||
everyone is zero lands exactly mid-pack.
|
||||
|
||||
## 4. related work
|
||||
|
||||
- **Co-authorship graphs as collaboration networks** — Mark Newman's early-2000s
|
||||
studies of scientific collaboration networks, which also introduced the 1/(n−1)
|
||||
team-size weighting. The warning that huge author lists break co-authorship
|
||||
semantics is Blaise Cronin's "hyperauthorship" critique — the basis for the
|
||||
50-author cap.
|
||||
- **Bridger, theory** — Granovetter's "strength of weak ties" (1973): novel
|
||||
information flows across bridges between groups, not within dense cliques.
|
||||
- **Bridger, operationalization** — *betweenness centrality* (Linton Freeman, 1977),
|
||||
computed with Ulrik Brandes' 2001 algorithm (implemented in `metrics.py`, tested
|
||||
against networkx); *structural holes and constraint* (Ronald Burt, 1992; his 2004
|
||||
"Structural holes and good ideas" showed brokers produce more good ideas). The
|
||||
weights-are-distances inversion for betweenness is a standard weighted-network
|
||||
practice. Shannon entropy as a diversity/interdisciplinarity indicator follows
|
||||
standard scientometrics usage (Stirling-style diversity).
|
||||
- **Mentor** — reading mentorship from publication genealogies is established in
|
||||
scientometrics (e.g. Malmgren, Ottino & Amaral's Nature study of mentor–protégé
|
||||
networks). The first-author-student / last-author-PI convention is a documented
|
||||
authorship norm in the life sciences — credible at a medicine-heavy university.
|
||||
Shipped caveat: co-authorship ≠ supervision; it's a proxy, validated directionally
|
||||
against 60 hand-labeled people (professors' median mentor score 0.740 vs
|
||||
researchers' 0.494).
|
||||
- **Amplifier** — the university "third mission" / knowledge-transfer literature
|
||||
(Etzkowitz & Leydesdorff's Triple Helix line): patents, industry co-publication,
|
||||
joint projects as measurable transfer channels. Industry co-authorship as primary
|
||||
indicator is pragmatic: it's the only channel linked by institution IDs rather
|
||||
than names.
|
||||
- **Fair comparison** — percentile indicators within reference groups are the modern
|
||||
bibliometrics standard (compare like with like). Our reference group is the career
|
||||
bucket; the buckets come from this repo's own `analysis/career_stage/` work, which
|
||||
is also the empirical source for the most important design decision: rejecting
|
||||
`first_publication_year` in favor of `active_years`. `active_years_at(A, Y)` is our
|
||||
small extension of that finding.
|
||||
- **Data-quality corrections** (all found by measuring, not assumed): the hospital
|
||||
cohort gap (OpenAlex `related` vs lineage), ratio shrinkage, tie-sharing
|
||||
percentiles, the news ambiguity rule, merged/split-profile flags — responses to
|
||||
the well-known author-disambiguation weaknesses of bibliographic databases.
|
||||
|
||||
## 5. What was achieved (status)
|
||||
|
||||
Three falsifiable behavioral definitions instead of a vague label; a decay- and
|
||||
team-size-weighted collaboration graph over the complete global publication history
|
||||
of a correctly-defined 9-institution cohort; established network-science and
|
||||
bibliometric measures, made robust against the two dominant data pathologies (merged
|
||||
profiles, hyperauthorship); within-career-stage normalization; three independent
|
||||
external evidence channels joined at their honest link quality; and a queryable index
|
||||
where every person carries raw values, percentiles, scores, tags, and receipts —
|
||||
validated against hand-labeled ground truth, every tunable in config, every score
|
||||
stamped with the config that produced it.
|
||||
|
||||
| Milestone | Status |
|
||||
|---|---|
|
||||
| M0 — de-risking spike against the real cluster | ✅ done |
|
||||
| M1 — graph + metrics + scoring core, 60-person validation | ✅ done (PASS) |
|
||||
| M2 — cohort fix, extraction module, idempotent `multiplicators_v1` indexing | ✅ done |
|
||||
| M3 — amplifier signal joins (patents / news / CORDIS) + shrinkage fix | ✅ wired & indexed |
|
||||
|
||||
## 6. Roadmap — what's next
|
||||
|
||||
1. **M3 calibration session (human, next).** Coaches provide a golden set of 10–20
|
||||
known multiplicators, ideally labeled by type. Tune `multipliers.yaml`
|
||||
(sub-score weights, per-tag thresholds — 0.85 currently yields 133/161/10
|
||||
bridger/mentor/amplifier tags; if more amplifier candidates are wanted, introduce
|
||||
per-tag thresholds). Re-run `validate_sample.py` after every change as regression.
|
||||
2. **M4 — read-only serving layer**, once the UI needs it: thin FastAPI router in
|
||||
`inse/multiplicators/` over BOTH indices — `multiplicators_v1` for list views
|
||||
(by tag/bucket/score + per-person evidence) and `multiplicator_networks_v1` for
|
||||
the ego-network visualization (one doc per author: nodes with roles, edges with
|
||||
tie strength/cross-institution flags, ego header — render with echarts force
|
||||
layout; see README "Network visualization index"). Then
|
||||
`./gradlew :service:exportOpenApiSpec` to regenerate the Angular client.
|
||||
3. **Scheduling** — re-run `build.py` per dump refresh (Airflow, like the other
|
||||
crawlers); scores are batch-computed, serving is read-only.
|
||||
4. **Deferred improvements**, in value order:
|
||||
- **ORCID / `ude_persons_1.0` bridge** — the single highest-value follow-up: fixes
|
||||
news linking, catches *split* profiles (the `suspicious_profile` flag only
|
||||
catches merges; one split-profile artifact sits in the current amplifier
|
||||
top-10), and would enable faculty-level bridging via the staff directory.
|
||||
- Per-field percentile cohorts (biologist baselines ≠ sociologist baselines) —
|
||||
decide with coaches.
|
||||
- Project layer as graph edges (consortium co-membership), DFG/Bund signals if a
|
||||
real person-link ever exists.
|
||||
- Committing the module (currently untracked on `feature/find-multipliers`).
|
||||
@@ -0,0 +1,395 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
extract.py — cohort-aware extraction of the author + work sets from Elasticsearch.
|
||||
|
||||
Canonical home of the extraction logic (spike_audit.py and build.py both use it).
|
||||
|
||||
The author set is a UNION OF TWO QUERIES (a correctness requirement found during the
|
||||
seed audit — group 2 recovers ~4% of authors that group 1 silently drops):
|
||||
|
||||
1. backend_compatible last_known_institutions in the cohort AND a recent
|
||||
cohort affiliation (years >= extraction.affiliation_years_gte)
|
||||
2. empty_last_known_recent recent cohort affiliation but NO last_known_institutions
|
||||
|
||||
The cohort is the list of OpenAlex institution IDs from `cohorts.<primary>.institution_ids`
|
||||
in multiplicators.yaml (falling back to the primary ID alone). This exists because
|
||||
OpenAlex does NOT model university hospitals as lineage children — matching only the
|
||||
primary institution excluded ~2,400 active UDE clinicians.
|
||||
|
||||
The work set is ALL works by those authors, globally (full authorship lists incl.
|
||||
external co-authors — required for the bridging signals), paginated with
|
||||
search_after over an id sort, batched ~250 author IDs per terms query.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import gzip
|
||||
import json
|
||||
import os
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterable, Iterator
|
||||
|
||||
import httpx
|
||||
import yaml
|
||||
from dotenv import load_dotenv
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
ENV_PATH = SCRIPT_DIR.parent.parent / "src" / "main" / "inse" / ".env"
|
||||
load_dotenv(dotenv_path=ENV_PATH)
|
||||
|
||||
NES_URL = (os.environ.get("ELASTICSEARCH_URL") or "").rstrip("/")
|
||||
NES_KEY = os.environ.get("ELASTICSEARCH_API_KEY") or ""
|
||||
INSE_URL = (os.environ.get("ELASTICSEARCH_INSE_URL") or "").rstrip("/")
|
||||
INSE_KEY = os.environ.get("ELASTICSEARCH_INSE_API_KEY") or ""
|
||||
|
||||
AUTHOR_PAGE_SIZE = 1000
|
||||
AUTHOR_BATCH_SIZE = 250
|
||||
WORK_PAGE_SIZE = 1000
|
||||
REQUEST_TIMEOUT = 180.0
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# ES helpers
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def _headers(api_key: str) -> dict[str, str]:
|
||||
return {
|
||||
"Authorization": f"ApiKey {api_key}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
}
|
||||
|
||||
|
||||
def es_request(
|
||||
client: httpx.Client,
|
||||
method: str,
|
||||
base_url: str,
|
||||
api_key: str,
|
||||
path: str,
|
||||
body: dict[str, Any] | None = None,
|
||||
) -> httpx.Response:
|
||||
url = f"{base_url}/{path.lstrip('/')}"
|
||||
return client.request(
|
||||
method, url, headers=_headers(api_key), json=body, timeout=REQUEST_TIMEOUT
|
||||
)
|
||||
|
||||
|
||||
def es_search(
|
||||
client: httpx.Client, base_url: str, api_key: str, index: str, body: dict[str, Any]
|
||||
) -> dict[str, Any]:
|
||||
response = es_request(client, "POST", base_url, api_key, f"{index}/_search", body)
|
||||
if not response.is_success:
|
||||
raise RuntimeError(
|
||||
f"ES error {response.status_code} for {index}:\n{response.text[:1000]}"
|
||||
)
|
||||
return response.json()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Config / cohort
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def load_config(path: str | Path) -> dict[str, Any]:
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
return yaml.safe_load(f) or {}
|
||||
|
||||
|
||||
def cohort_ids_for(config: dict[str, Any], primary_short_id: str) -> list[str]:
|
||||
cohort = (config.get("cohorts") or {}).get(primary_short_id) or {}
|
||||
ids = cohort.get("institution_ids")
|
||||
return [str(i) for i in ids] if ids else [primary_short_id]
|
||||
|
||||
|
||||
def resolve_institution(client: httpx.Client, institution_id: str) -> dict[str, Any]:
|
||||
"""Look up ror + display_name from openalex-institutions."""
|
||||
short = institution_id.strip().rsplit("/", 1)[-1]
|
||||
full = f"https://openalex.org/{short}"
|
||||
result = es_search(
|
||||
client, NES_URL, NES_KEY, "openalex-institutions",
|
||||
{"size": 1, "query": {"term": {"id": full}}},
|
||||
)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
raise SystemExit(f"Institution {full} not found in openalex-institutions.")
|
||||
source = hits[0]["_source"]
|
||||
return {
|
||||
"id": full,
|
||||
"short_id": short,
|
||||
"ror": source.get("ror"),
|
||||
"display_name": source.get("display_name"),
|
||||
}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Author queries
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def recent_affiliation_filter(
|
||||
insts: list[dict[str, Any]], year_gte: int
|
||||
) -> dict[str, Any]:
|
||||
"""Recent affiliation with ANY cohort institution (matched by id, ror as backup)."""
|
||||
ids = [i["id"] for i in insts]
|
||||
shoulds: list[dict[str, Any]] = [{"terms": {"affiliations.institution.id": ids}}]
|
||||
rors = [i["ror"] for i in insts if i.get("ror")]
|
||||
if rors:
|
||||
shoulds.append({"terms": {"affiliations.institution.ror": rors}})
|
||||
return {
|
||||
"nested": {
|
||||
"path": "affiliations",
|
||||
"query": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
{"bool": {"should": shoulds, "minimum_should_match": 1}},
|
||||
{"range": {"affiliations.years": {"gte": year_gte}}},
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def last_known_filter(insts: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
return {
|
||||
"nested": {
|
||||
"path": "last_known_institutions",
|
||||
"query": {
|
||||
"terms": {"last_known_institutions.id": [i["id"] for i in insts]}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def last_known_exists_filter() -> dict[str, Any]:
|
||||
return {
|
||||
"nested": {
|
||||
"path": "last_known_institutions",
|
||||
"query": {"exists": {"field": "last_known_institutions.display_name"}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AUTHOR_SOURCE = [
|
||||
"id",
|
||||
"display_name",
|
||||
"orcid",
|
||||
"works_count",
|
||||
"cited_by_count",
|
||||
"last_known_institutions",
|
||||
"affiliations",
|
||||
]
|
||||
|
||||
|
||||
def collect_authors(
|
||||
client: httpx.Client,
|
||||
insts: list[dict[str, Any]],
|
||||
affiliation_year_gte: int,
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
groups = {
|
||||
"backend_compatible": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
last_known_filter(insts),
|
||||
recent_affiliation_filter(insts, affiliation_year_gte),
|
||||
]
|
||||
}
|
||||
},
|
||||
"empty_last_known_recent": {
|
||||
"bool": {
|
||||
"filter": [recent_affiliation_filter(insts, affiliation_year_gte)],
|
||||
"must_not": [last_known_exists_filter()],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
authors: dict[str, dict[str, Any]] = {}
|
||||
for group_name, query in groups.items():
|
||||
search_after = None
|
||||
total = None
|
||||
read = 0
|
||||
while True:
|
||||
body: dict[str, Any] = {
|
||||
"size": AUTHOR_PAGE_SIZE,
|
||||
"track_total_hits": True,
|
||||
"_source": AUTHOR_SOURCE,
|
||||
"query": query,
|
||||
"sort": [{"id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
result = es_search(client, NES_URL, NES_KEY, "openalex-authors", body)
|
||||
hits = result["hits"]["hits"]
|
||||
if total is None:
|
||||
total = result["hits"]["total"]["value"]
|
||||
print(f" [{group_name}] expected {total}")
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
aid = src.get("id")
|
||||
if not aid:
|
||||
continue
|
||||
if aid not in authors:
|
||||
authors[aid] = {
|
||||
"id": aid,
|
||||
"display_name": src.get("display_name"),
|
||||
"orcid": src.get("orcid"),
|
||||
"works_count": src.get("works_count"),
|
||||
"cited_by_count": src.get("cited_by_count"),
|
||||
"source_sets": [group_name],
|
||||
}
|
||||
elif group_name not in authors[aid]["source_sets"]:
|
||||
authors[aid]["source_sets"].append(group_name)
|
||||
read += 1
|
||||
search_after = hits[-1]["sort"]
|
||||
print(f" [{group_name}] read {read}/{total}")
|
||||
time.sleep(0.05)
|
||||
return authors
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Work queries — FULL authorships, no inner_hits
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
WORK_SOURCE = [
|
||||
"id",
|
||||
"doi",
|
||||
"publication_year",
|
||||
"type",
|
||||
"cited_by_count",
|
||||
"primary_topic.id",
|
||||
"primary_topic.display_name",
|
||||
"primary_topic.field.id",
|
||||
"primary_topic.field.display_name",
|
||||
"authorships.author.id",
|
||||
"authorships.author.display_name",
|
||||
"authorships.author_position",
|
||||
"authorships.is_corresponding",
|
||||
"authorships.institutions.id",
|
||||
"authorships.institutions.display_name",
|
||||
"authorships.institutions.type",
|
||||
"authorships.institutions.country_code",
|
||||
"authorships.institutions.lineage",
|
||||
]
|
||||
|
||||
|
||||
def collect_works(
|
||||
client: httpx.Client, author_ids: list[str], work_year_gte: int
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
works: dict[str, dict[str, Any]] = {}
|
||||
total_batches = (len(author_ids) + AUTHOR_BATCH_SIZE - 1) // AUTHOR_BATCH_SIZE
|
||||
for i in range(0, len(author_ids), AUTHOR_BATCH_SIZE):
|
||||
batch = author_ids[i : i + AUTHOR_BATCH_SIZE]
|
||||
batch_no = i // AUTHOR_BATCH_SIZE + 1
|
||||
search_after = None
|
||||
while True:
|
||||
body: dict[str, Any] = {
|
||||
"size": WORK_PAGE_SIZE,
|
||||
"track_total_hits": True,
|
||||
"_source": WORK_SOURCE,
|
||||
"query": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
{"range": {"publication_year": {"gte": work_year_gte}}},
|
||||
{
|
||||
"nested": {
|
||||
"path": "authorships",
|
||||
"query": {
|
||||
"terms": {"authorships.author.id": batch}
|
||||
},
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
"sort": [{"id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
result = es_search(client, NES_URL, NES_KEY, "openalex-works*", body)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
wid = src.get("id")
|
||||
if wid and wid not in works:
|
||||
works[wid] = src
|
||||
search_after = hits[-1]["sort"]
|
||||
print(f" work batch {batch_no}/{total_batches}: unique works {len(works)}")
|
||||
time.sleep(0.05)
|
||||
return works
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Cache IO
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def write_jsonl_gz(path: Path, records: Iterable[dict[str, Any]]) -> None:
|
||||
with gzip.open(path, "wt", encoding="utf-8", newline="\n") as f:
|
||||
for record in records:
|
||||
f.write(json.dumps(record, ensure_ascii=True) + "\n")
|
||||
|
||||
|
||||
def read_jsonl_gz(path: Path) -> Iterator[dict[str, Any]]:
|
||||
with gzip.open(path, "rt", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line:
|
||||
yield json.loads(line)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Top-level: extract to cache
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def extract_to_cache(
|
||||
institution_id: str,
|
||||
config: dict[str, Any],
|
||||
cache_dir: Path,
|
||||
force: bool = False,
|
||||
) -> tuple[Path, Path, list[dict[str, Any]]]:
|
||||
"""Extract authors + works for the cohort to jsonl.gz caches.
|
||||
|
||||
Returns (authors_path, works_path, resolved cohort institutions). Reuses an
|
||||
existing cache unless force=True.
|
||||
"""
|
||||
if not NES_URL or not NES_KEY:
|
||||
raise SystemExit(f"Missing NES credentials. Checked {ENV_PATH}")
|
||||
|
||||
short = institution_id.strip().rsplit("/", 1)[-1]
|
||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||
authors_path = cache_dir / f"authors_{short}.jsonl.gz"
|
||||
works_path = cache_dir / f"works_{short}.jsonl.gz"
|
||||
|
||||
extraction_cfg = config.get("extraction") or {}
|
||||
affiliation_year_gte = int(extraction_cfg.get("affiliation_years_gte", 2023))
|
||||
work_year_gte = int(extraction_cfg.get("work_year_gte", 1950))
|
||||
|
||||
with httpx.Client() as client:
|
||||
insts = [
|
||||
resolve_institution(client, i) for i in cohort_ids_for(config, short)
|
||||
]
|
||||
print(f"Cohort ({len(insts)} institutions, affiliation years >= {affiliation_year_gte}):")
|
||||
for inst in insts:
|
||||
print(f" {inst['short_id']:<14} {inst['display_name']}")
|
||||
|
||||
if not force and authors_path.exists() and works_path.exists():
|
||||
print("Reusing cached extract (use --force-extract to refresh).")
|
||||
return authors_path, works_path, insts
|
||||
|
||||
print("\nExtracting authors...")
|
||||
authors = collect_authors(client, insts, affiliation_year_gte)
|
||||
write_jsonl_gz(authors_path, authors.values())
|
||||
print(f"Authors: {len(authors)} -> {authors_path}")
|
||||
|
||||
print("\nExtracting works (full authorships)...")
|
||||
works_map = collect_works(client, sorted(authors.keys()), work_year_gte)
|
||||
write_jsonl_gz(works_path, works_map.values())
|
||||
print(f"Works: {len(works_map)} -> {works_path}")
|
||||
|
||||
return authors_path, works_path, insts
|
||||
@@ -0,0 +1,259 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
graph.py — co-author graph construction for multiplicator detection (M1, Stage C).
|
||||
|
||||
Input: the cached work extract (see spike_audit.py) as plain dicts.
|
||||
Output: plain-Python structures the metrics module consumes:
|
||||
|
||||
- edges: dict[(src, dst)] -> EdgeStats (undirected, src < dst, SHORT author ids)
|
||||
- nodes: dict[author_id] -> NodeStats (per-author aggregates over their works)
|
||||
|
||||
Design constraints (from the M0 spike):
|
||||
- Works with more than `max_authors_per_work` authors (default 50, chosen from the
|
||||
measured p90=17 / p99=144 distribution) are excluded from GRAPH construction only —
|
||||
a 4,839-author consortium paper is not a collaboration signal, but it still counts
|
||||
toward publication years, which are aggregated here in NodeStats for ALL works.
|
||||
- Edge weights follow the plan: sum of decay^(ref_year - year) / (n_authors - 1)
|
||||
per shared work, so recent, small-team collaborations weigh most.
|
||||
- All author/institution ids are shortened ("https://openalex.org/A5..." -> "A5...")
|
||||
to keep the adjacency structures small.
|
||||
|
||||
Everything here is pure computation over plain data — no I/O, no ES — so it is unit
|
||||
testable with hand-built fixtures.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from dataclasses import dataclass, field
|
||||
from typing import Any, Iterable
|
||||
|
||||
import polars as pl
|
||||
|
||||
OPENALEX_PREFIX = "https://openalex.org/"
|
||||
|
||||
|
||||
def short_id(raw: str | None) -> str | None:
|
||||
if not raw:
|
||||
return None
|
||||
return raw.rsplit("/", 1)[-1] if "/" in raw else raw
|
||||
|
||||
|
||||
@dataclass
|
||||
class EdgeStats:
|
||||
weight: float = 0.0 # decay- and team-size-weighted collaboration strength
|
||||
n_works: int = 0 # raw shared-work count
|
||||
cross_inst_weight: float = 0.0 # weight portion where the pair shared NO institution
|
||||
first_joint_year: int | None = None
|
||||
last_joint_year: int | None = None
|
||||
|
||||
|
||||
@dataclass
|
||||
class NodeStats:
|
||||
display_name: str | None = None
|
||||
is_focal: bool = False # member of the institution author set
|
||||
publication_years: set[int] = field(default_factory=set) # ALL works (uncapped)
|
||||
n_works: int = 0 # ALL works (uncapped)
|
||||
field_counts: dict[str, int] = field(default_factory=dict) # primary_topic.field
|
||||
n_company_works: int = 0 # works with >=1 co-author institution type=company
|
||||
n_typed_works: int = 0 # works where >=1 institution has a non-null type
|
||||
# supervision signature inputs (per work, position-aware; capped works only)
|
||||
n_last_author_works: int = 0
|
||||
last_author_junior_first: list[tuple[str, int]] = field(default_factory=list)
|
||||
# ^ (first_author_id, year) for works where THIS node was last author
|
||||
|
||||
|
||||
@dataclass
|
||||
class Graph:
|
||||
edges: dict[tuple[str, str], EdgeStats]
|
||||
nodes: dict[str, NodeStats]
|
||||
n_works_used: int # works that entered pair generation
|
||||
n_works_capped: int # works excluded by max_authors_per_work
|
||||
ref_year: int # decay reference year
|
||||
|
||||
|
||||
def _work_author_rows(
|
||||
works: Iterable[dict[str, Any]],
|
||||
) -> tuple[list[dict[str, Any]], dict[str, dict[str, Any]]]:
|
||||
"""Flatten works into one row per (work, author) plus per-work metadata."""
|
||||
rows: list[dict[str, Any]] = []
|
||||
work_meta: dict[str, dict[str, Any]] = {}
|
||||
for w in works:
|
||||
wid = short_id(w.get("id"))
|
||||
year = w.get("publication_year")
|
||||
if not wid or not isinstance(year, int):
|
||||
continue
|
||||
authorships = w.get("authorships") or []
|
||||
seen: set[str] = set()
|
||||
work_rows = []
|
||||
has_company = False
|
||||
has_typed = False
|
||||
first_author: str | None = None
|
||||
last_author: str | None = None
|
||||
for a in authorships:
|
||||
aid = short_id((a.get("author") or {}).get("id"))
|
||||
if not aid or aid in seen:
|
||||
continue
|
||||
seen.add(aid)
|
||||
insts = a.get("institutions") or []
|
||||
inst_ids = frozenset(
|
||||
short_id(i.get("id")) for i in insts if i.get("id")
|
||||
)
|
||||
for i in insts:
|
||||
itype = i.get("type")
|
||||
if itype:
|
||||
has_typed = True
|
||||
if itype == "company":
|
||||
has_company = True
|
||||
position = a.get("author_position")
|
||||
if position == "first" and first_author is None:
|
||||
first_author = aid
|
||||
if position == "last":
|
||||
last_author = aid
|
||||
work_rows.append(
|
||||
{
|
||||
"work_id": wid,
|
||||
"year": year,
|
||||
"author_id": aid,
|
||||
"display_name": (a.get("author") or {}).get("display_name"),
|
||||
"inst_ids": inst_ids,
|
||||
}
|
||||
)
|
||||
n_authors = len(seen)
|
||||
field_id = short_id(((w.get("primary_topic") or {}).get("field") or {}).get("id"))
|
||||
work_meta[wid] = {
|
||||
"year": year,
|
||||
"n_authors": n_authors,
|
||||
"field_id": field_id,
|
||||
"has_company": has_company,
|
||||
"has_typed": has_typed,
|
||||
"first_author": first_author,
|
||||
"last_author": last_author,
|
||||
}
|
||||
rows.extend(work_rows)
|
||||
return rows, work_meta
|
||||
|
||||
|
||||
def build_graph(
|
||||
works: Iterable[dict[str, Any]],
|
||||
focal_author_ids: set[str],
|
||||
max_authors_per_work: int = 50,
|
||||
decay: float = 0.8,
|
||||
ref_year: int | None = None,
|
||||
) -> Graph:
|
||||
"""Build the weighted co-author graph and per-author aggregates.
|
||||
|
||||
`focal_author_ids` may contain full URLs or short ids; both are normalized.
|
||||
`ref_year` defaults to the max publication year in the corpus so results are
|
||||
deterministic for a given extract (never wall-clock dependent).
|
||||
"""
|
||||
focal = {short_id(a) for a in focal_author_ids}
|
||||
rows, work_meta = _work_author_rows(works)
|
||||
|
||||
if ref_year is None:
|
||||
ref_year = max((m["year"] for m in work_meta.values()), default=0)
|
||||
|
||||
# ---- node aggregates over ALL works (uncapped) ----
|
||||
nodes: dict[str, NodeStats] = {}
|
||||
for row in rows:
|
||||
aid = row["author_id"]
|
||||
node = nodes.get(aid)
|
||||
if node is None:
|
||||
node = nodes[aid] = NodeStats(
|
||||
display_name=row["display_name"], is_focal=aid in focal
|
||||
)
|
||||
meta = work_meta[row["work_id"]]
|
||||
node.publication_years.add(row["year"])
|
||||
node.n_works += 1
|
||||
if meta["field_id"]:
|
||||
node.field_counts[meta["field_id"]] = (
|
||||
node.field_counts.get(meta["field_id"], 0) + 1
|
||||
)
|
||||
if meta["has_typed"]:
|
||||
node.n_typed_works += 1
|
||||
if meta["has_company"]:
|
||||
node.n_company_works += 1
|
||||
|
||||
# supervision signature (uses author_position; only meaningful on capped works —
|
||||
# "last author" on a 500-author consortium paper is not a supervision signal)
|
||||
for wid, meta in work_meta.items():
|
||||
if not (2 <= meta["n_authors"] <= max_authors_per_work):
|
||||
continue
|
||||
la, fa = meta["last_author"], meta["first_author"]
|
||||
if la and la in nodes:
|
||||
nodes[la].n_last_author_works += 1
|
||||
if fa and fa != la:
|
||||
nodes[la].last_author_junior_first.append((fa, meta["year"]))
|
||||
|
||||
# ---- pair generation via polars self-join (capped works only) ----
|
||||
usable_work_ids = {
|
||||
wid
|
||||
for wid, meta in work_meta.items()
|
||||
if 2 <= meta["n_authors"] <= max_authors_per_work
|
||||
}
|
||||
n_capped = sum(
|
||||
1 for meta in work_meta.values() if meta["n_authors"] > max_authors_per_work
|
||||
)
|
||||
|
||||
pair_rows = [r for r in rows if r["work_id"] in usable_work_ids]
|
||||
edges: dict[tuple[str, str], EdgeStats] = {}
|
||||
if pair_rows:
|
||||
df = pl.DataFrame(
|
||||
{
|
||||
"work_id": [r["work_id"] for r in pair_rows],
|
||||
"author_id": [r["author_id"] for r in pair_rows],
|
||||
}
|
||||
)
|
||||
pairs = (
|
||||
df.join(df, on="work_id", suffix="_b")
|
||||
.filter(pl.col("author_id") < pl.col("author_id_b"))
|
||||
.select("work_id", "author_id", "author_id_b")
|
||||
)
|
||||
# institution sets are tiny per row; resolve shared-institution in Python
|
||||
inst_by_work_author: dict[tuple[str, str], frozenset] = {
|
||||
(r["work_id"], r["author_id"]): r["inst_ids"] for r in pair_rows
|
||||
}
|
||||
for wid, a, b in pairs.iter_rows():
|
||||
meta = work_meta[wid]
|
||||
year = meta["year"]
|
||||
w = (decay ** (ref_year - year)) / (meta["n_authors"] - 1)
|
||||
key = (a, b)
|
||||
e = edges.get(key)
|
||||
if e is None:
|
||||
e = edges[key] = EdgeStats()
|
||||
e.weight += w
|
||||
e.n_works += 1
|
||||
insts_a = inst_by_work_author[(wid, a)]
|
||||
insts_b = inst_by_work_author[(wid, b)]
|
||||
if not (insts_a & insts_b):
|
||||
e.cross_inst_weight += w
|
||||
if e.first_joint_year is None or year < e.first_joint_year:
|
||||
e.first_joint_year = year
|
||||
if e.last_joint_year is None or year > e.last_joint_year:
|
||||
e.last_joint_year = year
|
||||
|
||||
return Graph(
|
||||
edges=edges,
|
||||
nodes=nodes,
|
||||
n_works_used=len(usable_work_ids),
|
||||
n_works_capped=n_capped,
|
||||
ref_year=ref_year,
|
||||
)
|
||||
|
||||
|
||||
def adjacency(graph: Graph) -> dict[str, dict[str, float]]:
|
||||
"""Symmetric weighted adjacency over ALL nodes (focal + external)."""
|
||||
adj: dict[str, dict[str, float]] = {}
|
||||
for (a, b), e in graph.edges.items():
|
||||
adj.setdefault(a, {})[b] = e.weight
|
||||
adj.setdefault(b, {})[a] = e.weight
|
||||
return adj
|
||||
|
||||
|
||||
def focal_subgraph(graph: Graph) -> dict[str, dict[str, float]]:
|
||||
"""Adjacency restricted to focal (institution-internal) nodes only."""
|
||||
adj: dict[str, dict[str, float]] = {}
|
||||
for (a, b), e in graph.edges.items():
|
||||
na, nb = graph.nodes.get(a), graph.nodes.get(b)
|
||||
if na and nb and na.is_focal and nb.is_focal:
|
||||
adj.setdefault(a, {})[b] = e.weight
|
||||
adj.setdefault(b, {})[a] = e.weight
|
||||
return adj
|
||||
@@ -0,0 +1,272 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
index.py — idempotent indexing of scored multiplicator rows into Elasticsearch.
|
||||
|
||||
Target: the `multiplicators_v1` index on the INSE cluster. The index was created by
|
||||
the cluster admin — the standard API key can read/write/update-mapping but NOT
|
||||
create or delete indices, so this module must never attempt index creation.
|
||||
|
||||
Idempotency: doc _id = "<institution_short>_<author_short>", and every run first
|
||||
deletes the institution's existing docs via a search + bulk-delete-by-id loop.
|
||||
That loop (not _delete_by_query) is deliberate: the same cluster rejects
|
||||
_delete_by_query with 403 for the org_patents key — see
|
||||
inse/patents/org/elastic_search_client.py for the precedent.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import json
|
||||
import time
|
||||
from datetime import datetime, timezone
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
|
||||
from extract import INSE_KEY, INSE_URL, _headers
|
||||
|
||||
MULTIPLICATORS_INDEX = "multiplicators_v1"
|
||||
NETWORKS_INDEX = "multiplicator_networks_v1"
|
||||
REQUEST_TIMEOUT = 120.0
|
||||
BULK_CHUNK = 500
|
||||
|
||||
MAPPING = {
|
||||
"properties": {
|
||||
"institution_id": {"type": "keyword"},
|
||||
"cohort_institution_ids": {"type": "keyword"},
|
||||
"author_id": {"type": "keyword"},
|
||||
"display_name": {
|
||||
"type": "text",
|
||||
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
|
||||
},
|
||||
"career_bucket": {"type": "keyword"},
|
||||
"active_years": {"type": "integer"},
|
||||
"n_works": {"type": "integer"},
|
||||
"suspicious_profile": {"type": "boolean"},
|
||||
"tags": {"type": "keyword"},
|
||||
"max_sub_score": {"type": "float"},
|
||||
"sub_scores": {
|
||||
"properties": {
|
||||
"bridger": {"type": "float"},
|
||||
"mentor": {"type": "float"},
|
||||
"amplifier": {"type": "float"},
|
||||
}
|
||||
},
|
||||
# M3 signal counts
|
||||
"patent_count": {"type": "integer"},
|
||||
"patent_count_name_only": {"type": "integer"}, # evidence only, never scored
|
||||
"news_mentions": {"type": "integer"},
|
||||
"cordis_eu_projects": {"type": "integer"},
|
||||
"industry_coauthor_share_shrunk": {"type": "float"},
|
||||
# raw metrics + percentiles kept as dynamic float objects (calibration needs them)
|
||||
"percentiles": {"type": "object", "dynamic": True},
|
||||
"evidence": {
|
||||
"properties": {"junior_ids": {"type": "keyword"}},
|
||||
},
|
||||
"config_hash": {"type": "keyword"},
|
||||
"computed_at": {"type": "date"},
|
||||
}
|
||||
}
|
||||
|
||||
# Visualization docs: nodes/edges live in _source only ("enabled": false — never
|
||||
# indexed/queried per-field, the frontend GETs whole docs by _id or author filter),
|
||||
# which keeps the index small despite ~900 edge objects per doc.
|
||||
NETWORK_MAPPING = {
|
||||
"properties": {
|
||||
"institution_id": {"type": "keyword"},
|
||||
"cohort_institution_ids": {"type": "keyword"},
|
||||
"author_id": {"type": "keyword"},
|
||||
"display_name": {
|
||||
"type": "text",
|
||||
"fields": {"keyword": {"type": "keyword", "ignore_above": 256}},
|
||||
},
|
||||
"ego": {
|
||||
"properties": {
|
||||
"career_bucket": {"type": "keyword"},
|
||||
"active_years": {"type": "integer"},
|
||||
"n_works": {"type": "integer"},
|
||||
"suspicious_profile": {"type": "boolean"},
|
||||
"tags": {"type": "keyword"},
|
||||
"max_sub_score": {"type": "float"},
|
||||
"sub_scores": {
|
||||
"properties": {
|
||||
"bridger": {"type": "float"},
|
||||
"mentor": {"type": "float"},
|
||||
"amplifier": {"type": "float"},
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
"total_coauthors": {"type": "integer"},
|
||||
"cohort_coauthors": {"type": "integer"},
|
||||
"mentee_count": {"type": "integer"},
|
||||
"shown": {"type": "integer"},
|
||||
"shown_mentees": {"type": "integer"},
|
||||
"nodes": {"type": "object", "enabled": False},
|
||||
"edges": {"type": "object", "enabled": False},
|
||||
"config_hash": {"type": "keyword"},
|
||||
"computed_at": {"type": "date"},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class MultiplicatorsIndexClient:
|
||||
def __init__(
|
||||
self,
|
||||
base_url: str | None = None,
|
||||
api_key: str | None = None,
|
||||
index: str = MULTIPLICATORS_INDEX,
|
||||
transport: httpx.BaseTransport | None = None,
|
||||
):
|
||||
self.base_url = (base_url or INSE_URL).rstrip("/")
|
||||
self.api_key = api_key if api_key is not None else INSE_KEY
|
||||
self.index = index
|
||||
self.client = httpx.Client(transport=transport, timeout=REQUEST_TIMEOUT)
|
||||
if not self.base_url or not self.api_key:
|
||||
raise SystemExit("Missing INSE cluster credentials (ELASTICSEARCH_INSE_*).")
|
||||
|
||||
def _request(self, method: str, path: str, **kwargs: Any) -> httpx.Response:
|
||||
return self.client.request(
|
||||
method,
|
||||
f"{self.base_url}/{path.lstrip('/')}",
|
||||
headers=_headers(self.api_key),
|
||||
**kwargs,
|
||||
)
|
||||
|
||||
def ensure_mapping(self, mapping: dict[str, Any] | None = None) -> None:
|
||||
"""PUT the explicit mapping (additive; safe on every run). Never creates the index."""
|
||||
response = self._request(
|
||||
"PUT", f"{self.index}/_mapping", json=mapping or MAPPING
|
||||
)
|
||||
if not response.is_success:
|
||||
raise RuntimeError(
|
||||
f"Mapping update failed ({response.status_code}): {response.text[:500]}"
|
||||
)
|
||||
|
||||
def count_for_institution(self, institution_short_id: str) -> int:
|
||||
response = self._request(
|
||||
"POST",
|
||||
f"{self.index}/_count",
|
||||
json={"query": {"term": {"institution_id": institution_short_id}}},
|
||||
)
|
||||
response.raise_for_status()
|
||||
return response.json()["count"]
|
||||
|
||||
def _wait_for_count(self, institution_short_id: str, expected: int,
|
||||
timeout_s: float = 30.0) -> int:
|
||||
"""Poll _count until it reaches `expected` or timeout.
|
||||
|
||||
The API key is NOT allowed to call _refresh (indices:admin/refresh -> 403),
|
||||
so visibility of deletes/writes depends on the index's auto-refresh
|
||||
(default 1s). Polling is the only verification available to this key."""
|
||||
deadline = time.time() + timeout_s
|
||||
count = -1
|
||||
while time.time() < deadline:
|
||||
count = self.count_for_institution(institution_short_id)
|
||||
if count == expected:
|
||||
return count
|
||||
time.sleep(1.0)
|
||||
return count
|
||||
|
||||
def _collect_ids_for_institution(self, institution_short_id: str) -> list[str]:
|
||||
"""All doc _ids for the institution, paginated with search_after (collected
|
||||
BEFORE any deletes, so stale-visibility cannot inflate or loop the delete)."""
|
||||
ids: list[str] = []
|
||||
search_after = None
|
||||
while True:
|
||||
body: dict[str, Any] = {
|
||||
"size": 1000,
|
||||
"_source": False,
|
||||
"query": {"term": {"institution_id": institution_short_id}},
|
||||
"sort": [{"author_id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
response = self._request("POST", f"{self.index}/_search", json=body)
|
||||
response.raise_for_status()
|
||||
hits = response.json()["hits"]["hits"]
|
||||
if not hits:
|
||||
break
|
||||
ids.extend(h["_id"] for h in hits)
|
||||
search_after = hits[-1]["sort"]
|
||||
return ids
|
||||
|
||||
def delete_for_institution(self, institution_short_id: str) -> int:
|
||||
"""Collect ids, then bulk-delete-by-id (the key rejects _delete_by_query
|
||||
with 403). Returns the number of docs actually deleted."""
|
||||
ids = self._collect_ids_for_institution(institution_short_id)
|
||||
deleted = 0
|
||||
for start in range(0, len(ids), BULK_CHUNK):
|
||||
chunk = ids[start : start + BULK_CHUNK]
|
||||
lines = "".join(
|
||||
json.dumps({"delete": {"_index": self.index, "_id": doc_id}}) + "\n"
|
||||
for doc_id in chunk
|
||||
)
|
||||
bulk = self.client.post(
|
||||
f"{self.base_url}/_bulk",
|
||||
headers={**_headers(self.api_key), "Content-Type": "application/x-ndjson"},
|
||||
content=lines,
|
||||
)
|
||||
bulk.raise_for_status()
|
||||
for item in bulk.json()["items"]:
|
||||
result = item.get("delete", {})
|
||||
if result.get("result") == "deleted":
|
||||
deleted += 1
|
||||
elif result.get("error"):
|
||||
raise RuntimeError(f"Bulk delete error: {result['error']}")
|
||||
if ids:
|
||||
remaining = self._wait_for_count(institution_short_id, 0)
|
||||
if remaining != 0:
|
||||
raise RuntimeError(
|
||||
f"{remaining} docs for {institution_short_id} still visible "
|
||||
f"after delete (expected 0)"
|
||||
)
|
||||
return deleted
|
||||
|
||||
def index_rows(
|
||||
self,
|
||||
institution_short_id: str,
|
||||
cohort_short_ids: list[str],
|
||||
scored_rows: list[dict[str, Any]],
|
||||
) -> int:
|
||||
"""Delete-then-bulk-index all rows for the institution. Returns docs written."""
|
||||
computed_at = datetime.now(timezone.utc).isoformat()
|
||||
deleted = self.delete_for_institution(institution_short_id)
|
||||
print(f"Deleted {deleted} existing docs for {institution_short_id}")
|
||||
|
||||
written = 0
|
||||
for start in range(0, len(scored_rows), BULK_CHUNK):
|
||||
chunk = scored_rows[start : start + BULK_CHUNK]
|
||||
lines = []
|
||||
for row in chunk:
|
||||
doc = {
|
||||
**row,
|
||||
"institution_id": institution_short_id,
|
||||
"cohort_institution_ids": cohort_short_ids,
|
||||
"computed_at": computed_at,
|
||||
}
|
||||
doc_id = f"{institution_short_id}_{row['author_id']}"
|
||||
lines.append(
|
||||
json.dumps({"index": {"_index": self.index, "_id": doc_id}})
|
||||
)
|
||||
lines.append(json.dumps(doc, ensure_ascii=True))
|
||||
bulk = self.client.post(
|
||||
f"{self.base_url}/_bulk",
|
||||
headers={**_headers(self.api_key), "Content-Type": "application/x-ndjson"},
|
||||
content="\n".join(lines) + "\n",
|
||||
)
|
||||
bulk.raise_for_status()
|
||||
result = bulk.json()
|
||||
if result.get("errors"):
|
||||
first_error = next(
|
||||
(i["index"].get("error") for i in result["items"]
|
||||
if i.get("index", {}).get("error")),
|
||||
None,
|
||||
)
|
||||
raise RuntimeError(f"Bulk indexing reported errors, first: {first_error}")
|
||||
written += len(chunk)
|
||||
visible = self._wait_for_count(institution_short_id, written)
|
||||
if visible != written:
|
||||
raise RuntimeError(
|
||||
f"Post-index count mismatch for {institution_short_id}: "
|
||||
f"wrote {written}, index shows {visible} after 30s"
|
||||
)
|
||||
return written
|
||||
@@ -0,0 +1,264 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
make_report.py — render the ego-network HTML report from the LIVE ES indices.
|
||||
|
||||
Reads `multiplicators_v1` (scores) + `multiplicator_networks_v1` (nodes/edges) —
|
||||
the same two documents a frontend service would fetch — and writes a single
|
||||
self-contained HTML file to reports/. No local cache needed: the report can be
|
||||
regenerated any time after a build, on any machine with cluster access.
|
||||
|
||||
python make_report.py --institution-id I62318514
|
||||
python make_report.py --institution-id I62318514 \
|
||||
--author-ids A5113304257,A5043495754 # explicit cast instead of auto-pick
|
||||
|
||||
By default it picks one showcase per tag (highest bridger / mentor / amplifier)
|
||||
plus the highest-scoring person who just misses the tag threshold — the four
|
||||
contrasting cases that make the metrics legible.
|
||||
|
||||
The force-directed layout is computed here and baked into the file so the report
|
||||
stays dependency-free; a real frontend should instead let echarts' `graph` series
|
||||
lay out the same nodes/edges live.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
from pathlib import Path
|
||||
|
||||
import httpx
|
||||
import yaml
|
||||
from dotenv import load_dotenv
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
ENV_PATH = SCRIPT_DIR.parent.parent / "src" / "main" / "inse" / ".env"
|
||||
load_dotenv(dotenv_path=ENV_PATH)
|
||||
|
||||
INSE_URL = (os.environ.get("ELASTICSEARCH_INSE_URL") or "").rstrip("/")
|
||||
INSE_KEY = os.environ.get("ELASTICSEARCH_INSE_API_KEY") or ""
|
||||
SCORES_INDEX = "multiplicators_v1"
|
||||
NETWORKS_INDEX = "multiplicator_networks_v1"
|
||||
|
||||
SCORE_FIELDS = (
|
||||
"author_id", "display_name", "career_bucket", "active_years", "n_works",
|
||||
"suspicious_profile", "tags", "sub_scores", "percentiles", "betweenness",
|
||||
"brokerage", "constraint", "field_entropy", "cross_institution_share",
|
||||
"strength", "n_coauthors", "industry_coauthor_share",
|
||||
"industry_coauthor_share_shrunk", "juniors_mentored",
|
||||
"junior_progression_rate", "mentoring_rate", "last_author_with_junior_first",
|
||||
"patent_count", "news_mentions", "cordis_eu_projects",
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# ES access
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def _headers() -> dict[str, str]:
|
||||
return {"Authorization": f"ApiKey {INSE_KEY}", "Content-Type": "application/json"}
|
||||
|
||||
|
||||
def es_get(client: httpx.Client, index: str, doc_id: str) -> dict | None:
|
||||
r = client.get(f"{INSE_URL}/{index}/_doc/{doc_id}", headers=_headers(), timeout=30)
|
||||
if r.status_code == 404:
|
||||
return None
|
||||
r.raise_for_status()
|
||||
return r.json()["_source"]
|
||||
|
||||
|
||||
def es_search(client: httpx.Client, index: str, body: dict) -> dict:
|
||||
r = client.post(f"{INSE_URL}/{index}/_search", headers=_headers(), json=body, timeout=60)
|
||||
r.raise_for_status()
|
||||
return r.json()
|
||||
|
||||
|
||||
def pick_showcase(client: httpx.Client, institution: str) -> list[tuple[str, str]]:
|
||||
"""(author_id, kind) for the top bridger / mentor / amplifier + top near-miss."""
|
||||
picks: list[tuple[str, str]] = []
|
||||
seen: set[str] = set()
|
||||
for tag in ("bridger", "mentor", "amplifier"):
|
||||
res = es_search(client, SCORES_INDEX, {
|
||||
"size": 5,
|
||||
"_source": ["author_id"],
|
||||
"query": {"bool": {"filter": [
|
||||
{"term": {"institution_id": institution}},
|
||||
{"term": {"tags": tag}},
|
||||
]}},
|
||||
"sort": [{f"sub_scores.{tag}": {"order": "desc"}}],
|
||||
})
|
||||
for hit in res["hits"]["hits"]:
|
||||
aid = hit["_source"]["author_id"]
|
||||
if aid not in seen:
|
||||
picks.append((aid, tag))
|
||||
seen.add(aid)
|
||||
break
|
||||
# highest scorer that carries no tag — shows where the threshold bites
|
||||
res = es_search(client, SCORES_INDEX, {
|
||||
"size": 5,
|
||||
"_source": ["author_id"],
|
||||
"query": {"bool": {
|
||||
"filter": [{"term": {"institution_id": institution}}],
|
||||
"must_not": [{"exists": {"field": "tags"}}],
|
||||
}},
|
||||
"sort": [{"max_sub_score": {"order": "desc"}}],
|
||||
})
|
||||
for hit in res["hits"]["hits"]:
|
||||
aid = hit["_source"]["author_id"]
|
||||
if aid not in seen:
|
||||
picks.append((aid, "example"))
|
||||
seen.add(aid)
|
||||
break
|
||||
return picks
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Layout
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def fr_layout(node_ids, edge_list, w=760, h=560, iters=350, seed=7):
|
||||
"""Fruchterman-Reingold with the ego pinned to the centre (deterministic seed)."""
|
||||
rng = random.Random(seed)
|
||||
pos = {n: [rng.uniform(0, w), rng.uniform(0, h)] for n in node_ids}
|
||||
ego = node_ids[0]
|
||||
pos[ego] = [w / 2, h / 2]
|
||||
k = math.sqrt(w * h / max(len(node_ids), 1)) * 0.9
|
||||
t = w / 8
|
||||
wmax = max((e[2] for e in edge_list), default=1.0)
|
||||
for _ in range(iters):
|
||||
disp = {n: [0.0, 0.0] for n in node_ids}
|
||||
for i, a in enumerate(node_ids):
|
||||
for b in node_ids[i + 1:]:
|
||||
dx = pos[a][0] - pos[b][0]
|
||||
dy = pos[a][1] - pos[b][1]
|
||||
d = max(math.hypot(dx, dy), 0.01)
|
||||
f = k * k / d
|
||||
disp[a][0] += dx / d * f; disp[a][1] += dy / d * f
|
||||
disp[b][0] -= dx / d * f; disp[b][1] -= dy / d * f
|
||||
for a, b, wt in edge_list:
|
||||
dx = pos[a][0] - pos[b][0]
|
||||
dy = pos[a][1] - pos[b][1]
|
||||
d = max(math.hypot(dx, dy), 0.01)
|
||||
f = d * d / k * (0.3 + 0.7 * wt / wmax)
|
||||
disp[a][0] -= dx / d * f; disp[a][1] -= dy / d * f
|
||||
disp[b][0] += dx / d * f; disp[b][1] += dy / d * f
|
||||
for n in node_ids:
|
||||
if n == ego:
|
||||
continue
|
||||
dx, dy = disp[n]
|
||||
d = max(math.hypot(dx, dy), 0.01)
|
||||
pos[n][0] = min(w - 20, max(20, pos[n][0] + dx / d * min(d, t)))
|
||||
pos[n][1] = min(h - 20, max(20, pos[n][1] + dy / d * min(d, t)))
|
||||
t *= 0.97
|
||||
return pos
|
||||
|
||||
|
||||
def compose(client: httpx.Client, institution: str, picks: list[tuple[str, str]]) -> dict:
|
||||
out: dict[str, dict] = {}
|
||||
for author_id, kind in picks:
|
||||
doc_id = f"{institution}_{author_id}"
|
||||
net = es_get(client, NETWORKS_INDEX, doc_id)
|
||||
score = es_get(client, SCORES_INDEX, doc_id)
|
||||
if not net or not score:
|
||||
print(f" skip {author_id}: missing doc", file=sys.stderr)
|
||||
continue
|
||||
node_ids = [n["id"] for n in net["nodes"]]
|
||||
pos = fr_layout(node_ids, [(e["a"], e["b"], e["w"]) for e in net["edges"]])
|
||||
nodes = []
|
||||
for n in net["nodes"]:
|
||||
entry = {
|
||||
"id": n["id"], "name": n["name"], "role": n["role"],
|
||||
"inst": n.get("inst", ""), "active_years": n["active_years"],
|
||||
"x": round(pos[n["id"]][0], 1), "y": round(pos[n["id"]][1], 1),
|
||||
}
|
||||
if n.get("company_insts"):
|
||||
entry["company_insts"] = n["company_insts"]
|
||||
nodes.append(entry)
|
||||
out[author_id] = {
|
||||
"kind": kind,
|
||||
"score_row": {k: score[k] for k in SCORE_FIELDS if k in score},
|
||||
"total_coauthors": net["total_coauthors"],
|
||||
"shown": net["shown"],
|
||||
"nodes": nodes,
|
||||
"edges": [
|
||||
{"a": e["a"], "b": e["b"], "w": e["w"], "n": e["n_works"],
|
||||
"cross": e["cross"], "y0": e["first_year"]}
|
||||
for e in net["edges"]
|
||||
],
|
||||
"config_hash": score.get("config_hash", ""),
|
||||
"computed_at": (score.get("computed_at") or "")[:10],
|
||||
}
|
||||
roles: dict[str, int] = {}
|
||||
for n in nodes:
|
||||
roles[n["role"]] = roles.get(n["role"], 0) + 1
|
||||
print(f" {kind:<10} {score.get('display_name')}: {roles}", file=sys.stderr)
|
||||
return out
|
||||
|
||||
|
||||
TEMPLATE_PATH = SCRIPT_DIR / "report_template.html"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--institution-id", required=True)
|
||||
parser.add_argument(
|
||||
"--author-ids", default="",
|
||||
help="Comma-separated author IDs to feature. Overrides report.featured_author_ids "
|
||||
"in the config; pass --auto to force automatic selection instead.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--auto", action="store_true",
|
||||
help="Ignore the pinned cast and auto-select the current top scorer per tag.",
|
||||
)
|
||||
parser.add_argument("--config", default=str(SCRIPT_DIR / "multipliers.yaml"))
|
||||
parser.add_argument("--out", default=str(SCRIPT_DIR / "reports" / "multiplier_networks.html"))
|
||||
args = parser.parse_args()
|
||||
|
||||
if not INSE_URL or not INSE_KEY:
|
||||
raise SystemExit(f"Missing INSE credentials. Checked {ENV_PATH}")
|
||||
|
||||
institution = args.institution_id.strip().rsplit("/", 1)[-1]
|
||||
|
||||
# cast precedence: --author-ids > --auto > config pin > automatic
|
||||
pinned: list[str] = []
|
||||
if not args.auto and not args.author_ids:
|
||||
config_path = Path(args.config)
|
||||
if config_path.exists():
|
||||
config = yaml.safe_load(config_path.read_text(encoding="utf-8")) or {}
|
||||
pinned = [
|
||||
str(a) for a in ((config.get("report") or {}).get("featured_author_ids") or [])
|
||||
]
|
||||
|
||||
with httpx.Client() as client:
|
||||
ids = [a.strip() for a in args.author_ids.split(",") if a.strip()] or pinned
|
||||
if ids:
|
||||
kinds = ["bridger", "mentor", "amplifier", "example"]
|
||||
picks = [(a, kinds[i] if i < len(kinds) else "example")
|
||||
for i, a in enumerate(ids)]
|
||||
source = "config-pinned" if pinned and not args.author_ids else "explicit"
|
||||
print(f"Cast ({source}): {[p[0] for p in picks]}", file=sys.stderr)
|
||||
else:
|
||||
picks = pick_showcase(client, institution)
|
||||
print(f"Auto-selected showcase: {[p[0] for p in picks]}", file=sys.stderr)
|
||||
data = compose(client, institution, picks)
|
||||
|
||||
if not data:
|
||||
raise SystemExit("No documents found — has build.py run for this institution?")
|
||||
|
||||
template = TEMPLATE_PATH.read_text(encoding="utf-8")
|
||||
payload = json.dumps(data, ensure_ascii=True)
|
||||
assert "</script" not in payload, "data would break out of the script tag"
|
||||
html = template.replace("__DATA__", payload)
|
||||
|
||||
out_path = Path(args.out)
|
||||
out_path.parent.mkdir(parents=True, exist_ok=True)
|
||||
out_path.write_text(html, encoding="utf-8")
|
||||
print(f"Report -> {out_path} ({len(html):,} bytes, {len(data)} cases)")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,341 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
metrics.py — bridger / mentor metrics for multiplicator detection (M1, Stage D).
|
||||
|
||||
All functions are pure computations over the structures produced by graph.py.
|
||||
|
||||
Career-age foundation (see analysis/career_stage/README.md): first_publication_year is
|
||||
UNRELIABLE at UDE (merged OpenAlex profiles -> debut years like 1893), so nothing here
|
||||
uses it. The robust primitive is the prefix-counted active-year count
|
||||
|
||||
active_years_at(A, Y) = |{ y in distinct_publication_years(A) : y <= Y }|
|
||||
|
||||
which a single misattributed old work moves by exactly 1. It inherits the empirically
|
||||
validated career-stage thresholds from inse/persons/logic.py unchanged.
|
||||
|
||||
Mentor metrics are computed over FOCAL (institution-internal) pairs only: the extract
|
||||
contains the complete global history of focal authors, so their year-sets are exact,
|
||||
while external co-authors' year-sets are truncated to shared works (an external senior
|
||||
would look junior). This scope restriction is a data-correctness requirement, not a
|
||||
modelling choice.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import heapq
|
||||
import math
|
||||
from dataclasses import dataclass, field
|
||||
|
||||
from graph import EdgeStats, Graph, adjacency, focal_subgraph
|
||||
|
||||
|
||||
def incident_edges(graph: Graph) -> dict[str, list[tuple[str, EdgeStats]]]:
|
||||
"""One pass over the edge dict -> per-author incident edge lists.
|
||||
|
||||
Every per-author metric must use this instead of scanning graph.edges —
|
||||
a full-edge scan per focal author is O(E * authors) and does not finish."""
|
||||
incident: dict[str, list[tuple[str, EdgeStats]]] = {}
|
||||
for (a, b), e in graph.edges.items():
|
||||
incident.setdefault(a, []).append((b, e))
|
||||
incident.setdefault(b, []).append((a, e))
|
||||
return incident
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Career primitives
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def active_years_at(publication_years: set[int], year: int) -> int:
|
||||
"""Distinct publication years up to and including `year` (robust seniority)."""
|
||||
return sum(1 for y in publication_years if y <= year)
|
||||
|
||||
|
||||
def is_suspicious_profile(publication_years: set[int]) -> bool:
|
||||
"""Merged-profile flag, same rule as inse/persons/logic.py."""
|
||||
if not publication_years:
|
||||
return False
|
||||
first = min(publication_years)
|
||||
span = max(publication_years) - first + 1
|
||||
return first < 1970 or span > 60
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Betweenness — Brandes (2001), weighted variant with Dijkstra.
|
||||
# Weights are collaboration STRENGTHS; shortest paths need DISTANCES, so we
|
||||
# pass 1/weight (strong ties = short distances). Pure stdlib.
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def betweenness_centrality(
|
||||
adj: dict[str, dict[str, float]], normalized: bool = True
|
||||
) -> dict[str, float]:
|
||||
nodes = list(adj.keys())
|
||||
bc = {v: 0.0 for v in nodes}
|
||||
|
||||
for s in nodes:
|
||||
# single-source shortest paths (Dijkstra on 1/weight distances).
|
||||
# All per-source state is lazy (touched nodes only) — a per-source init
|
||||
# over all V nodes would make the whole thing O(V^2) before any work.
|
||||
dist: dict[str, float] = {s: 0.0}
|
||||
sigma: dict[str, float] = {s: 1.0}
|
||||
preds: dict[str, list[str]] = {}
|
||||
done: set[str] = set()
|
||||
order: list[str] = []
|
||||
heap: list[tuple[float, str]] = [(0.0, s)]
|
||||
while heap:
|
||||
d, v = heapq.heappop(heap)
|
||||
if v in done:
|
||||
continue
|
||||
done.add(v)
|
||||
order.append(v)
|
||||
sigma_v = sigma[v]
|
||||
for u, w in adj[v].items():
|
||||
if w <= 0:
|
||||
continue
|
||||
nd = d + 1.0 / w
|
||||
old = dist.get(u)
|
||||
if old is None or nd < old - 1e-12:
|
||||
dist[u] = nd
|
||||
sigma[u] = sigma_v
|
||||
preds[u] = [v]
|
||||
heapq.heappush(heap, (nd, u))
|
||||
elif abs(nd - old) <= 1e-12 and u not in done:
|
||||
sigma[u] += sigma_v
|
||||
preds.setdefault(u, []).append(v)
|
||||
# accumulation, reverse order of discovery
|
||||
delta: dict[str, float] = {}
|
||||
for v in reversed(order):
|
||||
dv = delta.get(v, 0.0)
|
||||
coeff = (1.0 + dv) / sigma[v]
|
||||
for p in preds.get(v, ()):
|
||||
delta[p] = delta.get(p, 0.0) + sigma[p] * coeff
|
||||
if v != s:
|
||||
bc[v] += dv
|
||||
|
||||
# undirected: each pair counted twice
|
||||
for v in bc:
|
||||
bc[v] /= 2.0
|
||||
if normalized and len(nodes) > 2:
|
||||
scale = 1.0 / ((len(nodes) - 1) * (len(nodes) - 2) / 2.0)
|
||||
for v in bc:
|
||||
bc[v] *= scale
|
||||
return bc
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Burt's constraint — low constraint == structural-hole spanner (bridger).
|
||||
# Computed on the FULL graph (external co-authors included): someone whose
|
||||
# UDE-internal network is dense but who alone connects to industry/abroad
|
||||
# is a bridger that internal betweenness cannot see.
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def burt_constraint(
|
||||
adj: dict[str, dict[str, float]], nodes: list[str] | None = None
|
||||
) -> dict[str, float]:
|
||||
"""Constraint c_i = sum_j (p_ij + sum_q p_iq * p_qj)^2 over neighbours j of i.
|
||||
|
||||
p_ij = w_ij / sum_k w_ik. Isolates get constraint 1.0 (fully constrained).
|
||||
"""
|
||||
# strength totals once — recomputing sum(neigh.values()) inside the O(d^2)
|
||||
# inner loop makes this O(d^3) and unusable on hub nodes
|
||||
totals = {v: sum(neigh.values()) for v, neigh in adj.items()}
|
||||
|
||||
result: dict[str, float] = {}
|
||||
targets = nodes if nodes is not None else list(adj.keys())
|
||||
for i in targets:
|
||||
neigh = adj.get(i) or {}
|
||||
total = totals.get(i, 0.0)
|
||||
if total <= 0:
|
||||
result[i] = 1.0
|
||||
continue
|
||||
p_i = {j: w / total for j, w in neigh.items()}
|
||||
c = 0.0
|
||||
for j, p_ij in p_i.items():
|
||||
indirect = 0.0
|
||||
for q, p_iq in p_i.items():
|
||||
if q == j:
|
||||
continue
|
||||
q_neigh = adj.get(q)
|
||||
if not q_neigh:
|
||||
continue
|
||||
w_qj = q_neigh.get(j)
|
||||
if w_qj:
|
||||
indirect += p_iq * (w_qj / totals[q])
|
||||
c += (p_ij + indirect) ** 2
|
||||
result[i] = c
|
||||
return result
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Simple per-node shares
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def field_entropy(field_counts: dict[str, int]) -> float:
|
||||
"""Shannon entropy (bits) over primary_topic.field of an author's works."""
|
||||
total = sum(field_counts.values())
|
||||
if total <= 0:
|
||||
return 0.0
|
||||
ent = 0.0
|
||||
for c in field_counts.values():
|
||||
if c > 0:
|
||||
p = c / total
|
||||
ent -= p * math.log2(p)
|
||||
return ent
|
||||
|
||||
|
||||
def cross_institution_share(
|
||||
graph: Graph,
|
||||
author_id: str,
|
||||
incident: dict[str, list[tuple[str, EdgeStats]]] | None = None,
|
||||
) -> float:
|
||||
"""Share of an author's edge weight where the pair shared no institution."""
|
||||
if incident is None:
|
||||
incident = incident_edges(graph)
|
||||
total = 0.0
|
||||
cross = 0.0
|
||||
for _, e in incident.get(author_id, ()):
|
||||
total += e.weight
|
||||
cross += e.cross_inst_weight
|
||||
return cross / total if total > 0 else 0.0
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Mentor metrics — debut-year-free (see module docstring)
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
@dataclass
|
||||
class MentorMetrics:
|
||||
juniors_mentored: int = 0
|
||||
junior_progression_rate: float | None = None # None if no juniors
|
||||
last_author_with_junior_first: int = 0
|
||||
mentoring_rate: float = 0.0
|
||||
junior_ids: list[str] = field(default_factory=list) # evidence
|
||||
|
||||
|
||||
def mentor_metrics(
|
||||
graph: Graph,
|
||||
focal_author_id: str,
|
||||
junior_active_years_max: int = 4,
|
||||
senior_active_years_min: int = 10,
|
||||
progressed_active_years_min: int = 5,
|
||||
incident: dict[str, list[tuple[str, EdgeStats]]] | None = None,
|
||||
) -> MentorMetrics:
|
||||
"""Seniority-gap mentorship over focal-internal pairs.
|
||||
|
||||
A co-author J counts as "mentored" when, at the year Y of the FIRST joint work:
|
||||
active_years_at(J, Y) <= junior_active_years_max (J was Early-career)
|
||||
active_years_at(focal, Y) >= senior_active_years_min (focal was Established+)
|
||||
Progression: J later reached >= progressed_active_years_min total active years.
|
||||
"""
|
||||
focal_node = graph.nodes.get(focal_author_id)
|
||||
if focal_node is None:
|
||||
return MentorMetrics()
|
||||
if incident is None:
|
||||
incident = incident_edges(graph)
|
||||
|
||||
juniors: list[str] = []
|
||||
progressed = 0
|
||||
for other, e in incident.get(focal_author_id, ()):
|
||||
if e.first_joint_year is None:
|
||||
continue
|
||||
other_node = graph.nodes.get(other)
|
||||
if other_node is None or not other_node.is_focal or not focal_node.is_focal:
|
||||
continue # internal pairs only — external year-sets are truncated
|
||||
y = e.first_joint_year
|
||||
if (
|
||||
active_years_at(other_node.publication_years, y) <= junior_active_years_max
|
||||
and active_years_at(focal_node.publication_years, y) >= senior_active_years_min
|
||||
):
|
||||
juniors.append(other)
|
||||
if len(other_node.publication_years) >= progressed_active_years_min:
|
||||
progressed += 1
|
||||
|
||||
# supervision signature: focal last author, junior (at that work's year) first author
|
||||
last_author_junior_first = 0
|
||||
for first_author, year in focal_node.last_author_junior_first:
|
||||
fa_node = graph.nodes.get(first_author)
|
||||
if fa_node is None or not fa_node.is_focal:
|
||||
continue
|
||||
if active_years_at(fa_node.publication_years, year) <= junior_active_years_max:
|
||||
last_author_junior_first += 1
|
||||
|
||||
total_active = len(focal_node.publication_years)
|
||||
return MentorMetrics(
|
||||
juniors_mentored=len(juniors),
|
||||
junior_progression_rate=(progressed / len(juniors)) if juniors else None,
|
||||
last_author_with_junior_first=last_author_junior_first,
|
||||
mentoring_rate=(len(juniors) / total_active) if total_active else 0.0,
|
||||
junior_ids=juniors,
|
||||
)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Orchestration: all raw metrics for every focal author
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def compute_all_metrics(
|
||||
graph: Graph,
|
||||
junior_active_years_max: int = 4,
|
||||
senior_active_years_min: int = 10,
|
||||
progressed_active_years_min: int = 5,
|
||||
industry_share_shrinkage_k: int = 5,
|
||||
) -> dict[str, dict]:
|
||||
"""Raw (un-normalized) metric rows keyed by focal author id."""
|
||||
internal = focal_subgraph(graph)
|
||||
full_adj = adjacency(graph)
|
||||
incident = incident_edges(graph)
|
||||
focal_ids = [aid for aid, n in graph.nodes.items() if n.is_focal]
|
||||
|
||||
bc = betweenness_centrality(internal) if internal else {}
|
||||
constraint = burt_constraint(full_adj, nodes=[a for a in focal_ids if a in full_adj])
|
||||
|
||||
rows: dict[str, dict] = {}
|
||||
for aid in focal_ids:
|
||||
node = graph.nodes[aid]
|
||||
mm = mentor_metrics(
|
||||
graph,
|
||||
aid,
|
||||
junior_active_years_max=junior_active_years_max,
|
||||
senior_active_years_min=senior_active_years_min,
|
||||
progressed_active_years_min=progressed_active_years_min,
|
||||
incident=incident,
|
||||
)
|
||||
strength = sum(full_adj.get(aid, {}).values())
|
||||
rows[aid] = {
|
||||
"author_id": aid,
|
||||
"display_name": node.display_name,
|
||||
"active_years": len(node.publication_years),
|
||||
"n_works": node.n_works,
|
||||
"suspicious_profile": is_suspicious_profile(node.publication_years),
|
||||
# bridger
|
||||
"betweenness": bc.get(aid, 0.0),
|
||||
"constraint": constraint.get(aid, 1.0),
|
||||
"brokerage": 1.0 - constraint.get(aid, 1.0), # higher = more bridging
|
||||
"field_entropy": field_entropy(node.field_counts),
|
||||
"cross_institution_share": cross_institution_share(graph, aid, incident),
|
||||
"strength": strength,
|
||||
"n_coauthors": len(full_adj.get(aid, {})),
|
||||
# amplifier inputs available from OpenAlex alone
|
||||
"industry_coauthor_share": (
|
||||
node.n_company_works / node.n_typed_works if node.n_typed_works else 0.0
|
||||
),
|
||||
# shrunk variant for SCORING: n_company/(n_typed+k) damps the small-
|
||||
# denominator artifact where 2-of-2 company works outranks 40-of-80 —
|
||||
# the live index's top "amplifiers" were exactly such ratio artifacts
|
||||
"industry_coauthor_share_shrunk": (
|
||||
node.n_company_works / (node.n_typed_works + industry_share_shrinkage_k)
|
||||
if node.n_typed_works
|
||||
else 0.0
|
||||
),
|
||||
# mentor
|
||||
"juniors_mentored": mm.juniors_mentored,
|
||||
"junior_progression_rate": mm.junior_progression_rate,
|
||||
"last_author_with_junior_first": mm.last_author_with_junior_first,
|
||||
"mentoring_rate": mm.mentoring_rate,
|
||||
"junior_ids": mm.junior_ids,
|
||||
}
|
||||
return rows
|
||||
@@ -0,0 +1,121 @@
|
||||
# Multiplicator detection — all tunables live here.
|
||||
# Coaches will retune weights/thresholds; every output doc carries a config_hash
|
||||
# of this file so scores stay attributable to the weighting that produced them.
|
||||
|
||||
version: 2
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Cohorts — which OpenAlex institutions constitute "the university".
|
||||
#
|
||||
# Keyed by the primary institution ID passed as --institution-id. If a cohort
|
||||
# entry exists, the author set is extracted over ALL listed IDs; otherwise the
|
||||
# primary ID alone is used. Needed because OpenAlex does NOT model university
|
||||
# hospitals as lineage children: Essen University Hospital is only "related"
|
||||
# to UDE, which silently excluded ~2,437 active clinicians (incl. prominent
|
||||
# medicine professors) from the cohort — found via the M1 validation, where
|
||||
# 17/60 hand-labeled people were missing.
|
||||
#
|
||||
# Source of candidates: openalex-institutions `associated_institutions` of the
|
||||
# primary ID (children + related), one hop deep. Every inclusion/exclusion is
|
||||
# a human judgment call — document the reason next to each entry.
|
||||
# ---------------------------------------------------------------------------
|
||||
cohorts:
|
||||
I62318514:
|
||||
name: University of Duisburg-Essen
|
||||
institution_ids:
|
||||
- I62318514 # UDE itself (primary)
|
||||
- I4210119759 # Essen University Hospital — the university medical centre;
|
||||
# "related" in OpenAlex, NOT lineage, hence the coverage gap
|
||||
- I4210161917 # West German Heart and Vascular Center Essen — child of the hospital
|
||||
- I127668822 # Erwin L. Hahn Institute for MRI — joint UDE institute,
|
||||
# isolated in OpenAlex (no lineage/associated links at all)
|
||||
- I4210090139 # Rhein-Ruhr Institut für Sozialforschung (child of UDE)
|
||||
- I4210092428 # Deutsches Textilforschungszentrum Nord-West (child of UDE)
|
||||
- I4210110714 # Institute for Advanced Study in the Humanities Essen / KWI (child)
|
||||
- I4210146441 # The Hydrogen and Fuel Cell Center / ZBT (child of UDE)
|
||||
- I4210154243 # Institut für Energie- und Umwelttechnik / IUTA (child of UDE)
|
||||
# Deliberately EXCLUDED (decide with the coaches before enabling):
|
||||
# - I4210146447 Kliniken Essen-Mitte — independent hospital group, only
|
||||
# "related"; staff are not UDE researchers (~788 authors)
|
||||
# - I2799342142 Salomon Ludwig Steinheim-Institut — independent An-Institut
|
||||
# - I4210124583 IWW Water Centre — independent An-Institut
|
||||
|
||||
extraction:
|
||||
# "Recent affiliation" cutoff for the author set. 2023 (not the current year):
|
||||
# publication lag pushes current staff out of a 1-year window — the M1 validation
|
||||
# found 6 current-ish people (incl. an active professor) with newest affiliation
|
||||
# year 2021-2024. 2023 captures normal lag while still excluding long-departed.
|
||||
affiliation_years_gte: 2023
|
||||
work_year_gte: 1950
|
||||
# Chosen from the M0 spike (authors/work p50=5, p90=17, p99=144, max=4839):
|
||||
# cap 50 keeps >=99% of works and excludes only true hyperauthorship, which
|
||||
# carries no collaboration signal but would create giant artificial cliques.
|
||||
max_authors_per_work: 50
|
||||
|
||||
graph:
|
||||
decay: 0.8 # per-year edge weight decay (ref = newest corpus year)
|
||||
|
||||
career:
|
||||
# active_years bucket thresholds — mirror inse/persons/logic.py _classify_career_stage.
|
||||
# Buckets: Early <= 4, Emerging <= 9, Established <= 14, Senior > 14.
|
||||
buckets: [4, 9, 14]
|
||||
bucket_names: [Early, Emerging, Established, Senior]
|
||||
|
||||
mentor:
|
||||
junior_active_years_max: 4 # junior == Early-career at first joint work
|
||||
senior_active_years_min: 10 # focal must be Established+ at first joint work
|
||||
progressed_active_years_min: 5
|
||||
|
||||
signals:
|
||||
# org_patents match_types that count toward the score; "name"-only matches are
|
||||
# carried as evidence (patent_count_name_only) but never scored.
|
||||
patent_match_types: [institution, both]
|
||||
news_require_relevant: true # only aktuell_postproc docs the LLM marked relevant
|
||||
# Shrinkage constant for industry_coauthor_share_shrunk = company/(typed+k):
|
||||
# damps small denominators (2-of-2 works with a company co-author is not a
|
||||
# stronger industry signal than 40-of-80). Found via the live-index audit,
|
||||
# where all top-10 "amplifiers" were such ratio artifacts.
|
||||
industry_share_shrinkage_k: 5
|
||||
|
||||
network:
|
||||
# Per-author ego-network docs for the visualization frontend
|
||||
# (index multiplicator_networks_v1). Nodes shown = strongest co-authors by tie
|
||||
# weight, with mentees force-included first — their decayed, team-size-divided
|
||||
# ties otherwise never make the cut (a 100-mentee professor had ZERO mentees
|
||||
# in his unforced top 42).
|
||||
max_nodes: 42
|
||||
max_forced_mentees: 14
|
||||
|
||||
# Sub-score weights over WITHIN-BUCKET percentiles of the raw metrics.
|
||||
# Weights within each sub-score should sum to 1.
|
||||
weights:
|
||||
bridger:
|
||||
betweenness: 0.35
|
||||
brokerage: 0.25 # 1 - Burt constraint, full graph incl. externals
|
||||
field_entropy: 0.20
|
||||
cross_institution_share: 0.20
|
||||
mentor:
|
||||
juniors_mentored: 0.35
|
||||
mentoring_rate: 0.25
|
||||
last_author_with_junior_first: 0.25
|
||||
junior_progression_rate: 0.15
|
||||
amplifier:
|
||||
industry_coauthor_share_shrunk: 0.50 # primary: ID-linked company co-authorship, shrunk
|
||||
patent_count: 0.25 # high-confidence org_patents (institution/both)
|
||||
cordis_eu_projects: 0.15 # DOI-join, no name matching
|
||||
news_mentions: 0.10 # normalized-exact name match — lossy; keep low
|
||||
|
||||
tags:
|
||||
threshold: 0.85 # tag fires when sub-score >= threshold (multiple allowed)
|
||||
min_active_years: 2 # never tag someone with <2 active years (no history)
|
||||
|
||||
report:
|
||||
# Cast for make_report.py, in order: bridger, mentor, amplifier, near-miss.
|
||||
# Pinned so the report is reproducible — without this the script auto-picks the
|
||||
# current top scorer per tag, which changes with every weight tune or dump refresh.
|
||||
# Remove/empty the list to fall back to automatic selection.
|
||||
featured_author_ids:
|
||||
- A5113304257 # Jan Egger — top bridger
|
||||
- A5043495754 # Cornelius Deuschl — top mentor
|
||||
- A5007801159 # Jens Wiltfang — top amplifier
|
||||
- A5043360678 # Tabea M. G. Pakull — strong profile just below the tag line
|
||||
@@ -0,0 +1,161 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
networks.py — materialize per-author ego-network documents for visualization.
|
||||
|
||||
The scores index answers "what did this person score"; the network index answers
|
||||
"who are they connected to and how" — the data a frontend needs to draw the
|
||||
ego-network figures (force layout, role colors, tooltips). The neighbor-neighbor
|
||||
edges that make graph shape readable (dense mesh = one community, spokes with gaps
|
||||
= brokered structural holes) come from works that do NOT include the ego, so they
|
||||
can only be materialized here, while the full graph is in memory — no request-time
|
||||
query can reconstruct them.
|
||||
|
||||
Doc shape (one per focal author, _id = <institution>_<author>):
|
||||
|
||||
nodes[] {id, name, role, inst, active_years, suspicious}
|
||||
role: ego | mentee | cohort | industry | external
|
||||
edges[] {a, b, w, n_works, cross, first_year, last_year}
|
||||
w = decayed collaboration strength; cross = mostly cross-institution
|
||||
ego{} small header duplicate (bucket, tags, sub_scores) so the network
|
||||
endpoint can render standalone
|
||||
totals total_coauthors, cohort_coauthors, shown
|
||||
|
||||
Node selection: the ego's strongest `max_nodes` co-authors by tie weight, with up
|
||||
to `max_forced_mentees` mentees force-included first — mentees' ties are decayed
|
||||
and team-size-divided, so a pure top-by-weight cut hides exactly the people the
|
||||
mentor score is about (empirically: a 100-mentee professor had zero mentees in his
|
||||
unforced top 42). Positions are NOT stored — the frontend's force layout
|
||||
(e.g. echarts `graph` series) lays out at render time.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any
|
||||
|
||||
from graph import Graph
|
||||
from metrics import is_suspicious_profile
|
||||
|
||||
|
||||
def build_network_docs(
|
||||
graph: Graph,
|
||||
metric_rows: dict[str, dict[str, Any]],
|
||||
scored_rows: list[dict[str, Any]],
|
||||
incident: dict[str, list],
|
||||
inst_by_author: dict[str, str],
|
||||
company_by_author_work: dict[str, dict[str, list[str]]],
|
||||
company_work_authors: dict[str, set[str]],
|
||||
max_nodes: int = 42,
|
||||
max_forced_mentees: int = 14,
|
||||
) -> list[dict[str, Any]]:
|
||||
"""One visualization doc per focal author.
|
||||
|
||||
metric_rows must still carry the FULL `junior_ids` (pre-scoring; the scored
|
||||
rows' evidence list is capped). scored_rows supply the ego header fields.
|
||||
|
||||
Industry roles are TIE-LEVEL, not lifetime: a neighbour is marked `industry`
|
||||
only if a company affiliation of theirs appears on a work SHARED with the ego
|
||||
— matching what `industry_coauthor_share` counts. (The first version flagged
|
||||
anyone who ever had a company affiliation anywhere in the corpus, which
|
||||
painted predominantly-academic people orange over one dual affiliation from
|
||||
years ago, with a university name in the tooltip contradicting the colour.)
|
||||
The triggering company names ship on the node as `company_insts`, and
|
||||
`inst_by_author` should be the author's MOST FREQUENT institution so the
|
||||
default label matches reality.
|
||||
"""
|
||||
scored_by_id = {r["author_id"]: r for r in scored_rows}
|
||||
docs: list[dict[str, Any]] = []
|
||||
|
||||
for ego_id, mrow in metric_rows.items():
|
||||
srow = scored_by_id.get(ego_id)
|
||||
if srow is None:
|
||||
continue
|
||||
mentees = set(mrow.get("junior_ids") or [])
|
||||
ranked = sorted(
|
||||
incident.get(ego_id, []), key=lambda kv: kv[1].weight, reverse=True
|
||||
)
|
||||
|
||||
mentee_picks = [n for n, _ in ranked if n in mentees][:max_forced_mentees]
|
||||
forced = set(mentee_picks)
|
||||
others = [n for n, _ in ranked if n not in forced]
|
||||
selected = [ego_id] + mentee_picks + others[: max_nodes - len(mentee_picks)]
|
||||
idset = set(selected)
|
||||
|
||||
nodes = []
|
||||
for nid in selected:
|
||||
node = graph.nodes[nid]
|
||||
# company evidence ON WORKS SHARED WITH THE EGO only
|
||||
shared_companies: set[str] = set()
|
||||
for wid, names in (company_by_author_work.get(nid) or {}).items():
|
||||
if ego_id in company_work_authors.get(wid, ()):
|
||||
shared_companies.update(names)
|
||||
if nid == ego_id:
|
||||
role = "ego"
|
||||
elif nid in mentees:
|
||||
role = "mentee"
|
||||
elif shared_companies and not node.is_focal:
|
||||
role = "industry"
|
||||
elif node.is_focal:
|
||||
role = "cohort"
|
||||
else:
|
||||
role = "external"
|
||||
entry = {
|
||||
"id": nid,
|
||||
"name": node.display_name,
|
||||
"role": role,
|
||||
"inst": inst_by_author.get(nid, ""),
|
||||
"active_years": len(node.publication_years),
|
||||
"suspicious": is_suspicious_profile(node.publication_years),
|
||||
}
|
||||
if shared_companies:
|
||||
# the receipts for the industry colour (also kept on cohort/
|
||||
# mentee nodes so tooltips can show the industry link)
|
||||
entry["company_insts"] = sorted(shared_companies)
|
||||
nodes.append(entry)
|
||||
|
||||
# all corpus edges among the selected nodes — pair lookups against the
|
||||
# edge dict (~900 per ego), NOT a scan of the 5.8M-edge dict per ego
|
||||
edges = []
|
||||
for i, a in enumerate(selected):
|
||||
for b in selected[i + 1:]:
|
||||
e = graph.edges.get((a, b) if a < b else (b, a))
|
||||
if e is None:
|
||||
continue
|
||||
edges.append(
|
||||
{
|
||||
"a": a,
|
||||
"b": b,
|
||||
"w": round(e.weight, 3),
|
||||
"n_works": e.n_works,
|
||||
"cross": bool(
|
||||
e.weight > 0 and e.cross_inst_weight / e.weight > 0.5
|
||||
),
|
||||
"first_year": e.first_joint_year,
|
||||
"last_year": e.last_joint_year,
|
||||
}
|
||||
)
|
||||
|
||||
cohort_coauthors = sum(
|
||||
1 for n, _ in ranked if graph.nodes[n].is_focal
|
||||
)
|
||||
docs.append(
|
||||
{
|
||||
"author_id": ego_id,
|
||||
"display_name": srow.get("display_name"),
|
||||
"ego": {
|
||||
"career_bucket": srow.get("career_bucket"),
|
||||
"active_years": srow.get("active_years"),
|
||||
"n_works": srow.get("n_works"),
|
||||
"suspicious_profile": srow.get("suspicious_profile"),
|
||||
"tags": srow.get("tags", []),
|
||||
"sub_scores": srow.get("sub_scores", {}),
|
||||
"max_sub_score": srow.get("max_sub_score"),
|
||||
},
|
||||
"total_coauthors": len(ranked),
|
||||
"cohort_coauthors": cohort_coauthors,
|
||||
"mentee_count": len(mentees),
|
||||
"shown": len(selected) - 1,
|
||||
"shown_mentees": len(mentee_picks),
|
||||
"nodes": nodes,
|
||||
"edges": edges,
|
||||
}
|
||||
)
|
||||
return docs
|
||||
@@ -0,0 +1,461 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Multipliers, drawn as networks</title>
|
||||
<style>
|
||||
:root {
|
||||
--surface: #fcfcfb;
|
||||
--surface-2: #f4f3f0;
|
||||
--ink: #0b0b0b;
|
||||
--ink-2: #52514e;
|
||||
--ink-3: #8a8983;
|
||||
--line: #e4e2dc;
|
||||
--ego: #e87ba4;
|
||||
--cohort: #2a78d6;
|
||||
--mentee: #1baf7a;
|
||||
--industry: #eb6834;
|
||||
--external: #b5b4ac;
|
||||
--bar: #2a78d6;
|
||||
--node-stroke: rgba(11,11,11,.35);
|
||||
color-scheme: light;
|
||||
}
|
||||
@media (prefers-color-scheme: dark) {
|
||||
:root:not([data-theme="light"]) {
|
||||
--surface: #1a1a19;
|
||||
--surface-2: #232322;
|
||||
--ink: #ffffff;
|
||||
--ink-2: #c3c2b7;
|
||||
--ink-3: #8a8983;
|
||||
--line: #3a3936;
|
||||
--ego: #d55181;
|
||||
--cohort: #3987e5;
|
||||
--mentee: #199e70;
|
||||
--industry: #d95926;
|
||||
--external: #55544f;
|
||||
--bar: #3987e5;
|
||||
--node-stroke: rgba(255,255,255,.35);
|
||||
color-scheme: dark;
|
||||
}
|
||||
}
|
||||
:root[data-theme="dark"] {
|
||||
--surface: #1a1a19;
|
||||
--surface-2: #232322;
|
||||
--ink: #ffffff;
|
||||
--ink-2: #c3c2b7;
|
||||
--ink-3: #8a8983;
|
||||
--line: #3a3936;
|
||||
--ego: #d55181;
|
||||
--cohort: #3987e5;
|
||||
--mentee: #199e70;
|
||||
--industry: #d95926;
|
||||
--external: #55544f;
|
||||
--bar: #3987e5;
|
||||
--node-stroke: rgba(255,255,255,.35);
|
||||
color-scheme: dark;
|
||||
}
|
||||
:root[data-theme="light"] {
|
||||
--surface: #fcfcfb;
|
||||
--surface-2: #f4f3f0;
|
||||
--ink: #0b0b0b;
|
||||
--ink-2: #52514e;
|
||||
--ink-3: #8a8983;
|
||||
--line: #e4e2dc;
|
||||
--ego: #e87ba4;
|
||||
--cohort: #2a78d6;
|
||||
--mentee: #1baf7a;
|
||||
--industry: #eb6834;
|
||||
--external: #b5b4ac;
|
||||
--bar: #2a78d6;
|
||||
--node-stroke: rgba(11,11,11,.35);
|
||||
color-scheme: light;
|
||||
}
|
||||
|
||||
body {
|
||||
background: var(--surface);
|
||||
color: var(--ink);
|
||||
font-family: Charter, Georgia, 'Times New Roman', serif;
|
||||
line-height: 1.55;
|
||||
margin: 0;
|
||||
}
|
||||
.wrap { max-width: 1160px; margin: 0 auto; padding: 40px 24px 80px; }
|
||||
|
||||
header.page { max-width: 70ch; margin-bottom: 12px; }
|
||||
.eyebrow {
|
||||
font-family: -apple-system, 'Segoe UI', sans-serif;
|
||||
font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
|
||||
color: var(--ink-3); margin: 0 0 10px;
|
||||
}
|
||||
h1 { font-size: 34px; line-height: 1.15; margin: 0 0 12px; text-wrap: balance; font-weight: 700; }
|
||||
.lede { color: var(--ink-2); font-size: 16.5px; margin: 0; }
|
||||
|
||||
.legend {
|
||||
position: sticky; top: 0; z-index: 5;
|
||||
background: var(--surface);
|
||||
border-block: 1px solid var(--line);
|
||||
margin: 28px 0 0;
|
||||
padding: 10px 2px;
|
||||
display: flex; flex-wrap: wrap; gap: 14px 22px; align-items: center;
|
||||
font-family: -apple-system, 'Segoe UI', sans-serif; font-size: 12.5px; color: var(--ink-2);
|
||||
}
|
||||
.legend .li { display: inline-flex; align-items: center; gap: 7px; }
|
||||
.dot { width: 11px; height: 11px; border-radius: 50%; border: 1px solid var(--node-stroke); flex: none; }
|
||||
.dot.ego { outline: 2px solid var(--ink); outline-offset: 1.5px; }
|
||||
.edge-sample { width: 26px; height: 0; border-top: 2px solid var(--ink-3); flex: none; }
|
||||
.edge-sample.dashed { border-top-style: dashed; }
|
||||
|
||||
section.case { margin-top: 52px; }
|
||||
.case-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 14px; margin-bottom: 4px; }
|
||||
.case-eyebrow { font-family: -apple-system,'Segoe UI',sans-serif; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
|
||||
h2 { font-size: 26px; margin: 0; font-weight: 700; }
|
||||
.pill {
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 11.5px; font-weight: 600;
|
||||
padding: 2.5px 10px; border-radius: 999px; letter-spacing: .04em;
|
||||
border: 1px solid var(--line); color: var(--ink-2); background: var(--surface-2);
|
||||
}
|
||||
.pill.tag { color: var(--surface); border: none; }
|
||||
.meta-line { font-family: -apple-system,'Segoe UI',sans-serif; font-size: 13px; color: var(--ink-3); margin: 2px 0 18px; }
|
||||
|
||||
.case-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(280px, 1fr); gap: 26px; align-items: start; }
|
||||
@media (max-width: 900px) { .case-grid { grid-template-columns: 1fr; } }
|
||||
|
||||
.netbox { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); overflow: hidden; }
|
||||
.netbox svg { display: block; width: 100%; height: auto; }
|
||||
.netfoot { font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12px; color: var(--ink-3); padding: 8px 12px; border-top: 1px solid var(--line); }
|
||||
|
||||
.panel { display: flex; flex-direction: column; gap: 18px; }
|
||||
.panel h3 {
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 11px; letter-spacing: .12em;
|
||||
text-transform: uppercase; color: var(--ink-3); margin: 0 0 8px; font-weight: 600;
|
||||
}
|
||||
.scorebar { display: grid; grid-template-columns: 74px 1fr 44px; align-items: center; gap: 10px; margin-bottom: 7px;
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12.5px; }
|
||||
.scorebar .nm { color: var(--ink-2); }
|
||||
.scorebar .val { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); }
|
||||
.track { position: relative; height: 10px; background: var(--surface-2); border-radius: 4px; border: 1px solid var(--line); }
|
||||
.fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px 3px 3px 4px; background: var(--bar); opacity: .55; }
|
||||
.fill.lead { opacity: 1; }
|
||||
.thresh { position: absolute; top: -3px; bottom: -3px; left: 85%; width: 0; border-left: 2px dashed var(--ink-3); }
|
||||
|
||||
table.mx { border-collapse: collapse; width: 100%; font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12.5px; }
|
||||
table.mx th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; padding: 8px 0 4px; }
|
||||
table.mx td { padding: 3.5px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
|
||||
table.mx td.num { font-variant-numeric: tabular-nums; text-align: right; color: var(--ink); white-space: nowrap; }
|
||||
table.mx td.num.hot { font-weight: 700; }
|
||||
|
||||
.reading { max-width: 72ch; margin-top: 18px; font-size: 15.5px; color: var(--ink-2); }
|
||||
.reading strong { color: var(--ink); }
|
||||
|
||||
.tooltip {
|
||||
position: fixed; pointer-events: none; z-index: 20; display: none;
|
||||
background: var(--ink); color: var(--surface);
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12px; line-height: 1.45;
|
||||
padding: 8px 11px; border-radius: 7px; max-width: 260px; box-shadow: 0 4px 14px rgba(0,0,0,.25);
|
||||
}
|
||||
.tooltip .t-name { font-weight: 700; }
|
||||
.tooltip .t-dim { opacity: .75; }
|
||||
|
||||
footer.page { margin-top: 60px; border-top: 1px solid var(--line); padding-top: 16px;
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12.5px; color: var(--ink-3); max-width: 78ch; }
|
||||
svg .node { cursor: pointer; }
|
||||
#themeToggle {
|
||||
position: fixed; top: 14px; right: 14px; z-index: 30;
|
||||
font-family: -apple-system,'Segoe UI',sans-serif; font-size: 12px; padding: 6px 12px;
|
||||
border-radius: 999px; border: 1px solid var(--line); background: var(--surface-2);
|
||||
color: var(--ink-2); cursor: pointer;
|
||||
}
|
||||
#themeToggle:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div class="wrap">
|
||||
<header class="page">
|
||||
<p class="eyebrow" id="topline">Smart-Guide · Multiplier detection</p>
|
||||
<h1>Four researchers, drawn as the networks that scored them</h1>
|
||||
<p class="lede">
|
||||
Each figure shows one person (ringed) and their strongest co-authors, with every
|
||||
collaboration the corpus records <em>among</em> those co-authors. The shape is the
|
||||
metric: spokes that don't touch are brokered structural holes; a dense mesh is a
|
||||
tight community; green marks the juniors a mentor brought up; orange marks a
|
||||
company link on the works shared with that person. Hover any node for its details.
|
||||
</p>
|
||||
</header>
|
||||
|
||||
<div class="legend" id="legend">
|
||||
<span class="li"><span class="dot ego" style="background:var(--ego)"></span>the person (ego)</span>
|
||||
<span class="li"><span class="dot" style="background:var(--cohort)"></span>cohort co-author</span>
|
||||
<span class="li"><span class="dot" style="background:var(--mentee)"></span>their mentee (junior at first joint paper)</span>
|
||||
<span class="li"><span class="dot" style="background:var(--industry)"></span>company link on works shared with the ego</span>
|
||||
<span class="li"><span class="dot" style="background:var(--external)"></span>external academic</span>
|
||||
<span class="li"><span class="edge-sample"></span>collaboration (width = decayed strength)</span>
|
||||
<span class="li"><span class="edge-sample dashed"></span>mostly cross-institution</span>
|
||||
<span class="li">node size = active years</span>
|
||||
</div>
|
||||
|
||||
<div id="cases"></div>
|
||||
|
||||
<footer class="page">
|
||||
Data: OpenAlex works of the institution cohort (works ≤ 50 authors enter the graph;
|
||||
edge strength decays 0.8/year), read from the <code>multiplicators_v1</code> and
|
||||
<code>multiplicator_networks_v1</code> indices. Networks show each ego's strongest
|
||||
co-authors — totals are given per figure. Scores are percentile-normalized within
|
||||
career buckets; tag threshold 0.85. Config <span id="cfg"></span>, computed
|
||||
<span id="ts"></span>. Mentee marking uses the seniority-gap rule and is restricted
|
||||
to cohort members; external co-authors' histories are truncated to shared works, so
|
||||
their node size is a lower bound. An orange node means a company affiliation appeared
|
||||
on a work shared with the ego — the company is named in the tooltip.
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<div class="tooltip" id="tip"></div>
|
||||
<button id="themeToggle" aria-label="Toggle color theme">theme</button>
|
||||
|
||||
<script>
|
||||
const DATA = __DATA__;
|
||||
|
||||
const ROLE = { ego:'--ego', cohort:'--cohort', mentee:'--mentee', industry:'--industry', external:'--external' };
|
||||
const ORDER = ['bridger','mentor','amplifier','example'];
|
||||
const EYEBROW = {
|
||||
bridger: ['Case 1 — the bridger archetype', '--cohort'],
|
||||
mentor: ['Case 2 — the mentor archetype', '--mentee'],
|
||||
amplifier:['Case 3 — the amplifier archetype', '--industry'],
|
||||
example: ['Case 4 — a strong profile below the tag line', '--ego'],
|
||||
};
|
||||
const ROLE_LABEL = {
|
||||
ego: 'This case’s subject',
|
||||
cohort: 'Cohort co-author',
|
||||
mentee: 'Mentee — junior at first joint paper',
|
||||
industry: 'Company link on shared works',
|
||||
external: 'External academic',
|
||||
};
|
||||
|
||||
const fmt = (v, d=2) => v == null ? '—' : (+v).toFixed(d);
|
||||
const pct = v => v == null ? '—' : Math.round(v*100) + '%';
|
||||
|
||||
function readingFor(kind, r, d) {
|
||||
const p = r.percentiles || {};
|
||||
if (kind === 'bridger') return `
|
||||
<strong>${r.display_name}</strong> holds the cohort's highest bridger score
|
||||
(<strong>${fmt(r.sub_scores.bridger,3)}</strong>). The picture explains it: the
|
||||
${d.total_coauthors} co-authors split into groups that barely touch except through
|
||||
the ego — brokerage ${fmt(r.brokerage,2)} (${pct(p.brokerage)} of the career
|
||||
bucket), ${pct(r.cross_institution_share)} of collaboration weight crosses
|
||||
institutions (dashed edges), and betweenness sits at the ${pct(p.betweenness)}
|
||||
percentile. Where the mentor's figure below is one dense mesh, this one is spokes
|
||||
and gaps — the gaps <em>are</em> the structural holes.`;
|
||||
if (kind === 'mentor') return `
|
||||
<strong>${r.display_name}</strong> tops the mentor ranking
|
||||
(<strong>${fmt(r.sub_scores.mentor,3)}</strong>) with ${r.juniors_mentored} cohort
|
||||
co-authors who were Early-career at their first joint paper while the ego was
|
||||
already Established — the green nodes — plus ${r.last_author_with_junior_first}
|
||||
papers in the classic supervision configuration (ego last author, a junior first).
|
||||
The mesh is dense: this is one connected group, the opposite structure of the
|
||||
bridger above. Only the ${d.shown} strongest ties of ${d.total_coauthors} are drawn.`;
|
||||
if (kind === 'amplifier') return `
|
||||
<strong>${r.display_name}</strong> tops the amplifier ranking
|
||||
(<strong>${fmt(r.sub_scores.amplifier,3)}</strong>) on converging independent
|
||||
channels: ${r.patent_count} high-confidence patent${r.patent_count===1?'':'s'},
|
||||
${r.cordis_eu_projects} EU project${r.cordis_eu_projects===1?'':'s'} via DOI
|
||||
overlap, ${r.news_mentions} press mention${r.news_mentions===1?'':'s'}, and a
|
||||
shrunk industry co-authorship share of ${fmt(r.industry_coauthor_share_shrunk,2)}
|
||||
(${pct(p.industry_coauthor_share_shrunk)} of the bucket). With
|
||||
${d.total_coauthors.toLocaleString('en')} total co-authors only the strongest
|
||||
${d.shown} are drawn — orange nodes carry a company affiliation on the shared work.`;
|
||||
const best = Math.max(...Object.values(r.sub_scores));
|
||||
const bestName = Object.entries(r.sub_scores).sort((a,b)=>b[1]-a[1])[0][0];
|
||||
const gated = best >= 0.85;
|
||||
return `
|
||||
<strong>${r.display_name}</strong> is the system's honest edge case: the
|
||||
highest-scoring person who still carries <strong>no tag</strong>. The ${bestName}
|
||||
sub-score reaches ${fmt(best,3)} ${gated
|
||||
? `— <em>above</em> the 0.85 line. The tag is withheld by the
|
||||
<code>min_active_years</code> guard: ${r.active_years} active
|
||||
year${r.active_years===1?'':'s'} is too thin a history to rank on, and a
|
||||
high score on one year is the signature of a <em>split</em> OpenAlex profile
|
||||
— a fragment of someone's record carrying a share of their patents, press or
|
||||
industry ties. The guard catches what <code>suspicious_profile</code> cannot:
|
||||
that flag detects merged identities, not split ones.`
|
||||
: `— just under the 0.85 line, on ${r.active_years} active
|
||||
year${r.active_years===1?'':'s'}. Thresholds are meant to surface the top of
|
||||
each bucket, and this profile sits one weight-tune away from either side.`}
|
||||
Either way it is the case coaches should see: ${d.total_coauthors} co-authors,
|
||||
brokerage ${fmt(r.brokerage,2)} (${pct(p.brokerage)} of the bucket),
|
||||
${pct(r.cross_institution_share)} cross-institution weight — a real profile that
|
||||
the ranking deliberately holds back.`;
|
||||
}
|
||||
|
||||
function svgNet(d) {
|
||||
const W = 760, H = 560, ns = 'http://www.w3.org/2000/svg';
|
||||
const svg = document.createElementNS(ns, 'svg');
|
||||
svg.setAttribute('viewBox', `0 0 ${W} ${H}`);
|
||||
svg.setAttribute('role', 'img');
|
||||
svg.setAttribute('aria-label', `Co-author network of ${d.score_row.display_name}`);
|
||||
const byId = {};
|
||||
d.nodes.forEach(n => byId[n.id] = n);
|
||||
const ego = d.nodes[0];
|
||||
const wmax = Math.max(...d.edges.map(e => e.w), 0.01);
|
||||
|
||||
const eg = document.createElementNS(ns, 'g');
|
||||
d.edges.forEach(e => {
|
||||
const a = byId[e.a], b = byId[e.b];
|
||||
if (!a || !b) return;
|
||||
const ln = document.createElementNS(ns, 'line');
|
||||
ln.setAttribute('x1', a.x); ln.setAttribute('y1', a.y);
|
||||
ln.setAttribute('x2', b.x); ln.setAttribute('y2', b.y);
|
||||
const touchesEgo = (e.a === ego.id || e.b === ego.id);
|
||||
ln.setAttribute('stroke', 'currentColor');
|
||||
ln.setAttribute('stroke-opacity', touchesEgo ? 0.42 : 0.16);
|
||||
ln.setAttribute('stroke-width', Math.max(0.6, Math.min(4.5, 2.8*Math.sqrt(e.w/wmax))));
|
||||
if (e.cross) ln.setAttribute('stroke-dasharray', '4 3');
|
||||
eg.appendChild(ln);
|
||||
});
|
||||
eg.setAttribute('color', 'var(--ink-3)');
|
||||
svg.appendChild(eg);
|
||||
|
||||
const edgeToEgo = {};
|
||||
d.edges.forEach(e => {
|
||||
if (e.a === ego.id) edgeToEgo[e.b] = e;
|
||||
if (e.b === ego.id) edgeToEgo[e.a] = e;
|
||||
});
|
||||
|
||||
const ng = document.createElementNS(ns, 'g');
|
||||
d.nodes.forEach(n => {
|
||||
const c = document.createElementNS(ns, 'circle');
|
||||
const isEgo = n.role === 'ego';
|
||||
const r = isEgo ? 13 : Math.max(4, Math.min(9, 3 + 1.1*Math.sqrt(n.active_years)));
|
||||
c.setAttribute('class', 'node');
|
||||
c.setAttribute('cx', n.x); c.setAttribute('cy', n.y); c.setAttribute('r', r);
|
||||
c.setAttribute('fill', `var(${ROLE[n.role]})`);
|
||||
c.setAttribute('stroke', isEgo ? 'var(--ink)' : 'var(--node-stroke)');
|
||||
c.setAttribute('stroke-width', isEgo ? 2.5 : 1);
|
||||
c.addEventListener('pointerenter', ev => {
|
||||
const e = edgeToEgo[n.id];
|
||||
showTip(ev, `
|
||||
<div class="t-name">${n.name || n.id}</div>
|
||||
<div>${ROLE_LABEL[n.role] || n.role}</div>
|
||||
${n.inst ? `<div class="t-dim">${n.inst}</div>` : ''}
|
||||
${n.company_insts ? `<div>Industry link: ${n.company_insts.join(', ')}</div>` : ''}
|
||||
<div class="t-dim">${n.active_years} active year${n.active_years===1?'':'s'}${
|
||||
e ? ` · tie strength ${e.w.toFixed(2)} · ${e.n} joint work${e.n===1?'':'s'} · since ${e.y0}` : ''}</div>`);
|
||||
});
|
||||
c.addEventListener('pointermove', moveTip);
|
||||
c.addEventListener('pointerleave', hideTip);
|
||||
ng.appendChild(c);
|
||||
});
|
||||
svg.appendChild(ng);
|
||||
|
||||
const label = document.createElementNS(ns, 'text');
|
||||
label.setAttribute('x', ego.x); label.setAttribute('y', ego.y + 30);
|
||||
label.setAttribute('text-anchor', 'middle');
|
||||
label.setAttribute('style', 'font-family:-apple-system,Segoe UI,sans-serif;font-size:12.5px;font-weight:700;fill:var(--ink);paint-order:stroke;stroke:var(--surface);stroke-width:3px;');
|
||||
label.textContent = ego.name;
|
||||
svg.appendChild(label);
|
||||
return svg;
|
||||
}
|
||||
|
||||
const tip = document.getElementById('tip');
|
||||
function showTip(ev, html) { tip.innerHTML = html; tip.style.display = 'block'; moveTip(ev); }
|
||||
function moveTip(ev) {
|
||||
const pad = 14;
|
||||
let x = ev.clientX + pad, y = ev.clientY + pad;
|
||||
const r = tip.getBoundingClientRect();
|
||||
if (x + r.width > innerWidth - 8) x = ev.clientX - r.width - pad;
|
||||
if (y + r.height > innerHeight - 8) y = ev.clientY - r.height - pad;
|
||||
tip.style.left = x + 'px'; tip.style.top = y + 'px';
|
||||
}
|
||||
function hideTip() { tip.style.display = 'none'; }
|
||||
|
||||
function metricRows(r) {
|
||||
const p = r.percentiles || {};
|
||||
const groups = [
|
||||
['Bridging', [
|
||||
['Betweenness', fmt(r.betweenness, r.betweenness && r.betweenness < 0.01 ? 4 : 3), p.betweenness],
|
||||
['Brokerage (1−constraint)', fmt(r.brokerage), p.brokerage],
|
||||
['Field entropy', fmt(r.field_entropy), p.field_entropy],
|
||||
['Cross-institution share', fmt(r.cross_institution_share), p.cross_institution_share],
|
||||
]],
|
||||
['Mentoring', [
|
||||
['Juniors mentored', r.juniors_mentored, p.juniors_mentored],
|
||||
['Last-author + junior first', r.last_author_with_junior_first, p.last_author_with_junior_first],
|
||||
['Mentoring rate', fmt(r.mentoring_rate), p.mentoring_rate],
|
||||
]],
|
||||
['Amplification', [
|
||||
['Industry share (shrunk)', fmt(r.industry_coauthor_share_shrunk), p.industry_coauthor_share_shrunk],
|
||||
['Patents (high-confidence)', r.patent_count, p.patent_count],
|
||||
['EU projects (DOI join)', r.cordis_eu_projects, p.cordis_eu_projects],
|
||||
['News mentions', r.news_mentions, p.news_mentions],
|
||||
]],
|
||||
];
|
||||
let html = '<table class="mx"><tr><th>Metric</th><th style="text-align:right">Raw</th><th style="text-align:right">Bucket pctl</th></tr>';
|
||||
for (const [g, rows] of groups) {
|
||||
html += `<tr><td colspan="3" style="border-top:none;padding-top:10px;font-weight:600;color:var(--ink-3);font-size:11px;letter-spacing:.06em;text-transform:uppercase">${g}</td></tr>`;
|
||||
for (const [nm, raw, pc] of rows) {
|
||||
const hot = pc != null && pc >= 0.9;
|
||||
html += `<tr><td>${nm}</td><td class="num">${raw == null ? '—' : raw}</td><td class="num${hot?' hot':''}">${pc==null?'—':pct(pc)}</td></tr>`;
|
||||
}
|
||||
}
|
||||
return html + '</table>';
|
||||
}
|
||||
|
||||
const container = document.getElementById('cases');
|
||||
let firstCase = null;
|
||||
for (const kind of ORDER) {
|
||||
const key = Object.keys(DATA).find(k => DATA[k].kind === kind);
|
||||
if (!key) continue;
|
||||
const d = DATA[key], r = d.score_row;
|
||||
if (!firstCase) firstCase = d;
|
||||
const [eyebrow, hue] = EYEBROW[kind];
|
||||
const lead = Object.entries(r.sub_scores).sort((a,b)=>b[1]-a[1])[0][0];
|
||||
|
||||
const sec = document.createElement('section');
|
||||
sec.className = 'case';
|
||||
sec.innerHTML = `
|
||||
<p class="case-eyebrow" style="color:var(${hue})">${eyebrow}</p>
|
||||
<div class="case-head">
|
||||
<h2>${r.display_name}</h2>
|
||||
${(r.tags||[]).map(t => `<span class="pill tag" style="background:var(${hue})">${t}</span>`).join('')}
|
||||
${(r.tags||[]).length === 0 ? '<span class="pill">no tag</span>' : ''}
|
||||
<span class="pill">${r.career_bucket} · ${r.active_years} active years</span>
|
||||
${r.suspicious_profile ? '<span class="pill">low-confidence profile</span>' : ''}
|
||||
</div>
|
||||
<p class="meta-line">${r.n_works} works · ${d.total_coauthors.toLocaleString('en')} co-authors
|
||||
(strongest ${d.shown} drawn) · author ${r.author_id}</p>
|
||||
<div class="case-grid">
|
||||
<div class="netbox">
|
||||
<div class="svg-slot"></div>
|
||||
<div class="netfoot">Edges among the drawn co-authors are the corpus's actual
|
||||
collaborations — their density (or absence) is what constraint/brokerage measures.</div>
|
||||
</div>
|
||||
<div class="panel">
|
||||
<div>
|
||||
<h3>Sub-scores <span style="letter-spacing:0;text-transform:none">(dashed line = 0.85 tag threshold)</span></h3>
|
||||
${['bridger','mentor','amplifier'].map(s => `
|
||||
<div class="scorebar">
|
||||
<span class="nm">${s}</span>
|
||||
<span class="track"><span class="fill${s===lead?' lead':''}" style="width:${(r.sub_scores[s]*100).toFixed(1)}%"></span><span class="thresh"></span></span>
|
||||
<span class="val">${fmt(r.sub_scores[s],3)}</span>
|
||||
</div>`).join('')}
|
||||
</div>
|
||||
<div>${metricRows(r)}</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="reading">${readingFor(kind, r, d)}</p>`;
|
||||
sec.querySelector('.svg-slot').appendChild(svgNet(d));
|
||||
container.appendChild(sec);
|
||||
}
|
||||
if (firstCase) {
|
||||
document.getElementById('cfg').textContent = firstCase.config_hash || '—';
|
||||
document.getElementById('ts').textContent = firstCase.computed_at || '—';
|
||||
}
|
||||
|
||||
document.getElementById('themeToggle').addEventListener('click', () => {
|
||||
const root = document.documentElement;
|
||||
const dark = root.getAttribute('data-theme') === 'dark' ||
|
||||
(!root.getAttribute('data-theme') && matchMedia('(prefers-color-scheme: dark)').matches);
|
||||
root.setAttribute('data-theme', dark ? 'light' : 'dark');
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,7 @@
|
||||
httpx>=0.27
|
||||
python-dotenv>=1.0
|
||||
polars>=1.0
|
||||
pyyaml>=6.0
|
||||
|
||||
# test-only (never in the service image):
|
||||
# pip install pytest networkx
|
||||
@@ -0,0 +1,135 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
scoring.py — normalization, sub-scores and tags (M1, Stage F).
|
||||
|
||||
Procedure (per plan §3/§6):
|
||||
1. Bucket every focal author by career stage from `active_years`
|
||||
(Early/Emerging/Established/Senior — thresholds mirror inse/persons/logic.py).
|
||||
2. Percentile-rank every raw metric WITHIN its bucket, so early-career people
|
||||
compete against early-career people. The M0 spike found median active_years = 4:
|
||||
half the cohort is "Early", and institution-wide percentiles would simply rank
|
||||
seniority.
|
||||
3. Sub-scores = weighted mean of the percentiles (weights from multiplicators.yaml).
|
||||
4. Tag anyone >= tags.threshold on a sub-score (multiple tags allowed).
|
||||
|
||||
Raw values, percentiles, and sub-scores are ALL persisted — coaches and calibration
|
||||
both need the intermediates. None/NaN raw values are excluded from percentile ranking
|
||||
and contribute 0 to the weighted mean (weight is redistributed over present metrics).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import hashlib
|
||||
import json
|
||||
from typing import Any
|
||||
|
||||
import yaml
|
||||
|
||||
|
||||
def load_config(path: str) -> dict[str, Any]:
|
||||
with open(path, "r", encoding="utf-8") as f:
|
||||
config = yaml.safe_load(f)
|
||||
config["_config_hash"] = hashlib.sha256(
|
||||
json.dumps(config, sort_keys=True, default=str).encode()
|
||||
).hexdigest()[:12]
|
||||
return config
|
||||
|
||||
|
||||
def career_bucket(active_years: int, thresholds: list[int], names: list[str]) -> str:
|
||||
"""Bucket by active_years. thresholds=[4,9,14] -> Early/Emerging/Established/Senior."""
|
||||
for threshold, name in zip(thresholds, names):
|
||||
if active_years <= threshold:
|
||||
return name
|
||||
return names[len(thresholds)]
|
||||
|
||||
|
||||
def percentile_ranks(values: dict[str, float | None]) -> dict[str, float]:
|
||||
"""Mean-rank percentiles in (0, 1] over the non-None values.
|
||||
|
||||
Ties share their mean rank, so a metric where most values are 0 (e.g.
|
||||
juniors_mentored for Early authors) does not hand everyone a high percentile.
|
||||
"""
|
||||
present = [(aid, v) for aid, v in values.items() if v is not None]
|
||||
if not present:
|
||||
return {}
|
||||
present.sort(key=lambda kv: kv[1])
|
||||
n = len(present)
|
||||
ranks: dict[str, float] = {}
|
||||
i = 0
|
||||
while i < n:
|
||||
j = i
|
||||
while j + 1 < n and present[j + 1][1] == present[i][1]:
|
||||
j += 1
|
||||
mean_rank = (i + j) / 2 + 1 # 1-based mean rank of the tie group
|
||||
for k in range(i, j + 1):
|
||||
ranks[present[k][0]] = mean_rank / n
|
||||
i = j + 1
|
||||
return ranks
|
||||
|
||||
|
||||
def score_rows(
|
||||
metric_rows: dict[str, dict[str, Any]], config: dict[str, Any]
|
||||
) -> list[dict[str, Any]]:
|
||||
"""Turn raw metric rows into scored, tagged, bucket-normalized output rows."""
|
||||
career_cfg = config["career"]
|
||||
weights: dict[str, dict[str, float]] = config["weights"]
|
||||
tag_threshold: float = config["tags"]["threshold"]
|
||||
min_active_years: int = config["tags"].get("min_active_years", 0)
|
||||
|
||||
# 1. bucket assignment
|
||||
buckets: dict[str, list[str]] = {}
|
||||
for aid, row in metric_rows.items():
|
||||
bucket = career_bucket(
|
||||
row["active_years"], career_cfg["buckets"], career_cfg["bucket_names"]
|
||||
)
|
||||
row["career_bucket"] = bucket
|
||||
buckets.setdefault(bucket, []).append(aid)
|
||||
|
||||
# 2. within-bucket percentiles for every metric used by any sub-score
|
||||
metric_names = sorted({m for w in weights.values() for m in w})
|
||||
percentiles: dict[str, dict[str, float]] = {aid: {} for aid in metric_rows}
|
||||
for bucket_members in buckets.values():
|
||||
for metric in metric_names:
|
||||
values = {
|
||||
aid: metric_rows[aid].get(metric)
|
||||
for aid in bucket_members
|
||||
if isinstance(metric_rows[aid].get(metric), (int, float))
|
||||
}
|
||||
for aid, pctl in percentile_ranks(values).items():
|
||||
percentiles[aid][metric] = pctl
|
||||
|
||||
# 3+4. weighted sub-scores and tags
|
||||
out: list[dict[str, Any]] = []
|
||||
for aid, row in metric_rows.items():
|
||||
sub_scores: dict[str, float] = {}
|
||||
for sub, metric_weights in weights.items():
|
||||
total_weight = 0.0
|
||||
acc = 0.0
|
||||
for metric, weight in metric_weights.items():
|
||||
pctl = percentiles[aid].get(metric)
|
||||
if pctl is not None:
|
||||
acc += weight * pctl
|
||||
total_weight += weight
|
||||
sub_scores[sub] = round(acc / total_weight, 4) if total_weight > 0 else 0.0
|
||||
|
||||
tags = (
|
||||
[s for s, v in sub_scores.items() if v >= tag_threshold]
|
||||
if row["active_years"] >= min_active_years
|
||||
else []
|
||||
)
|
||||
|
||||
out.append(
|
||||
{
|
||||
**{k: v for k, v in row.items() if k != "junior_ids"},
|
||||
"percentiles": {
|
||||
m: round(p, 4) for m, p in percentiles[aid].items()
|
||||
},
|
||||
"sub_scores": sub_scores,
|
||||
"tags": tags,
|
||||
"max_sub_score": max(sub_scores.values()) if sub_scores else 0.0,
|
||||
"evidence": {"junior_ids": row.get("junior_ids", [])[:25]},
|
||||
"config_hash": config["_config_hash"],
|
||||
}
|
||||
)
|
||||
|
||||
out.sort(key=lambda r: r["max_sub_score"], reverse=True)
|
||||
return out
|
||||
@@ -0,0 +1,232 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
signals.py — M3 amplifier signal joins: patents, news, EU CORDIS projects.
|
||||
|
||||
Link quality differs per source and dictates how each is used (plan §4):
|
||||
|
||||
PATENTS org_patents.matched_authors carries real OpenAlex author IDs with a
|
||||
doc-level match_type. Only {institution, both} count toward the score;
|
||||
name-only matches are kept as a separate evidence count.
|
||||
NEWS aktuell_postproc holds LLM-extracted person names. Matching is
|
||||
normalized-exact (casefold + diacritic fold): "René Müller" == "rene
|
||||
muller". A normalized name shared by MULTIPLE cohort authors is skipped
|
||||
entirely (precision over recall) — crediting the wrong person is worse
|
||||
than missing a mention. Low YAML weight by design.
|
||||
CORDIS DOI-overlap join (no name matching): the author's work DOIs from the
|
||||
extract intersected with cordis_eu_*_publications DOIs -> distinct
|
||||
project IDs per author.
|
||||
|
||||
All functions return plain dict[author_short_id, count] and are independent of the
|
||||
graph/scoring modules.
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import unicodedata
|
||||
from collections import defaultdict
|
||||
from typing import Any
|
||||
|
||||
import httpx
|
||||
|
||||
from extract import INSE_KEY, INSE_URL, es_search
|
||||
|
||||
PAGE_SIZE = 1000
|
||||
DOI_BATCH = 500
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Patents — org_patents (already author-ID-linked by index_org_patents.py)
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def patent_counts(
|
||||
client: httpx.Client,
|
||||
institution_short_id: str,
|
||||
scored_match_types: tuple[str, ...] = ("institution", "both"),
|
||||
) -> tuple[dict[str, int], dict[str, int]]:
|
||||
"""Per-author patent counts from org_patents.
|
||||
|
||||
Returns (scored, name_only): scored counts only docs whose match_type is in
|
||||
`scored_match_types`; name_only is kept as evidence and never enters the score.
|
||||
"""
|
||||
scored: dict[str, int] = defaultdict(int)
|
||||
name_only: dict[str, int] = defaultdict(int)
|
||||
search_after = None
|
||||
while True:
|
||||
body: dict[str, Any] = {
|
||||
"size": PAGE_SIZE,
|
||||
"_source": ["match_type", "matched_authors.openalex_author_id"],
|
||||
"query": {"term": {"institution_id": institution_short_id}},
|
||||
"sort": [{"patent_id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
result = es_search(client, INSE_URL, INSE_KEY, "org_patents", body)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
target = scored if src.get("match_type") in scored_match_types else name_only
|
||||
for author in src.get("matched_authors") or []:
|
||||
aid = author.get("openalex_author_id")
|
||||
if aid:
|
||||
target[aid] += 1
|
||||
search_after = hits[-1]["sort"]
|
||||
return dict(scored), dict(name_only)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# News — aktuell_postproc (LLM-extracted names, normalized-exact match)
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def normalize_name(name: str) -> str:
|
||||
"""casefold + strip diacritics + collapse whitespace ("René Müller" -> "rene muller")."""
|
||||
decomposed = unicodedata.normalize("NFKD", name)
|
||||
stripped = "".join(c for c in decomposed if not unicodedata.combining(c))
|
||||
return " ".join(stripped.casefold().split())
|
||||
|
||||
|
||||
def news_mention_counts(
|
||||
client: httpx.Client,
|
||||
display_names: dict[str, str],
|
||||
require_relevant: bool = True,
|
||||
) -> tuple[dict[str, int], int]:
|
||||
"""Per-author news mention counts.
|
||||
|
||||
display_names: author_short_id -> display_name for the whole cohort.
|
||||
Returns (counts, ambiguous_names_skipped). Names that normalize identically for
|
||||
more than one cohort author are skipped entirely.
|
||||
"""
|
||||
by_norm: dict[str, list[str]] = defaultdict(list)
|
||||
for aid, name in display_names.items():
|
||||
if name:
|
||||
by_norm[normalize_name(name)].append(aid)
|
||||
ambiguous = {norm for norm, aids in by_norm.items() if len(aids) > 1}
|
||||
|
||||
counts: dict[str, int] = defaultdict(int)
|
||||
search_after = None
|
||||
while True:
|
||||
body: dict[str, Any] = {
|
||||
"size": PAGE_SIZE,
|
||||
"_source": ["authors", "relevant"],
|
||||
"query": {"exists": {"field": "authors"}},
|
||||
"sort": [{"news_id.keyword": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
result = es_search(client, INSE_URL, INSE_KEY, "aktuell_postproc", body)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
if require_relevant and not src.get("relevant"):
|
||||
continue
|
||||
for name in src.get("authors") or []:
|
||||
norm = normalize_name(name)
|
||||
if norm in ambiguous:
|
||||
continue
|
||||
aids = by_norm.get(norm)
|
||||
if aids:
|
||||
counts[aids[0]] += 1
|
||||
search_after = hits[-1]["sort"]
|
||||
return dict(counts), len(ambiguous)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# EU CORDIS — DOI-overlap join
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def normalize_doi(doi: str | None) -> str | None:
|
||||
if not doi:
|
||||
return None
|
||||
doi = doi.strip().casefold()
|
||||
for prefix in ("https://doi.org/", "http://doi.org/", "doi.org/", "doi:"):
|
||||
if doi.startswith(prefix):
|
||||
doi = doi[len(prefix):]
|
||||
return doi or None
|
||||
|
||||
|
||||
def cordis_project_counts(
|
||||
client: httpx.Client,
|
||||
dois_by_author: dict[str, set[str]],
|
||||
) -> dict[str, int]:
|
||||
"""Distinct CORDIS project count per author via DOI overlap.
|
||||
|
||||
dois_by_author values must already be normalized (normalize_doi).
|
||||
"""
|
||||
all_dois = sorted({d for dois in dois_by_author.values() for d in dois})
|
||||
projects_by_doi: dict[str, set[str]] = defaultdict(set)
|
||||
|
||||
for start in range(0, len(all_dois), DOI_BATCH):
|
||||
batch = all_dois[start : start + DOI_BATCH]
|
||||
# NOT a terms query: 21% of CORDIS DOIs contain uppercase, and `terms` on a
|
||||
# keyword field is case-sensitive. Per-term case_insensitive matching instead.
|
||||
result = es_search(
|
||||
client, INSE_URL, INSE_KEY, "cordis_eu_*_publications",
|
||||
{
|
||||
"size": len(batch) * 4, # a DOI can appear in several frameworks
|
||||
"_source": ["doi", "projectID"],
|
||||
"query": {
|
||||
"bool": {
|
||||
"should": [
|
||||
{"term": {"doi": {"value": d, "case_insensitive": True}}}
|
||||
for d in batch
|
||||
],
|
||||
"minimum_should_match": 1,
|
||||
}
|
||||
},
|
||||
},
|
||||
)
|
||||
for hit in result["hits"]["hits"]:
|
||||
src = hit["_source"]
|
||||
doi = normalize_doi(src.get("doi"))
|
||||
project = src.get("projectID")
|
||||
if doi and project is not None:
|
||||
projects_by_doi[doi].add(str(project))
|
||||
|
||||
counts: dict[str, int] = {}
|
||||
for aid, dois in dois_by_author.items():
|
||||
projects: set[str] = set()
|
||||
for doi in dois:
|
||||
projects |= projects_by_doi.get(doi, set())
|
||||
if projects:
|
||||
counts[aid] = len(projects)
|
||||
return counts
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Orchestration
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def collect_signals(
|
||||
institution_short_id: str,
|
||||
display_names: dict[str, str],
|
||||
dois_by_author: dict[str, set[str]],
|
||||
scored_match_types: tuple[str, ...] = ("institution", "both"),
|
||||
news_require_relevant: bool = True,
|
||||
) -> dict[str, dict[str, int]]:
|
||||
"""All signal joins. Returns per-metric dicts keyed by author_short_id."""
|
||||
with httpx.Client() as client:
|
||||
patents_scored, patents_name_only = patent_counts(
|
||||
client, institution_short_id, scored_match_types
|
||||
)
|
||||
news, ambiguous_skipped = news_mention_counts(
|
||||
client, display_names, require_relevant=news_require_relevant
|
||||
)
|
||||
cordis = cordis_project_counts(client, dois_by_author)
|
||||
print(
|
||||
f"Signals: patents scored for {len(patents_scored)} authors "
|
||||
f"(name-only evidence: {len(patents_name_only)}), "
|
||||
f"news mentions for {len(news)} (ambiguous names skipped: {ambiguous_skipped}), "
|
||||
f"CORDIS projects for {len(cordis)}"
|
||||
)
|
||||
return {
|
||||
"patent_count": patents_scored,
|
||||
"patent_count_name_only": patents_name_only,
|
||||
"news_mentions": news,
|
||||
"cordis_eu_projects": cordis,
|
||||
}
|
||||
@@ -0,0 +1,656 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
spike_audit.py — M0 de-risking spike for the multiplicator-detection module.
|
||||
|
||||
Extracts the institution's OpenAlex author set (two-group union) and the FULL-authorship
|
||||
work set for those authors, caches both as gzipped JSONL, and prints an audit report that
|
||||
answers the six questions the rest of the pipeline is betting on:
|
||||
|
||||
1. Reproduction — author / work counts vs the known 4,921 / 183,661 for UDE.
|
||||
2. Field coverage — % of authorships with author_position / is_corresponding, and
|
||||
% of institutions with a non-null `type`. Decides whether the
|
||||
mentorship (last-author) and cross-sector signals are computable.
|
||||
3. Scale — authors-per-work histogram and distinct co-author pair counts at
|
||||
caps of 20 / 50 / 100. Picks max_authors_per_work; confirms the
|
||||
"pure Python / polars, no DuckDB" sizing bet.
|
||||
4. Quality — % of authors flagged has_suspicious_publication_years (merged
|
||||
profiles) and the active_years distribution.
|
||||
5. Permissions — can we create / bulk-write / delete on the INSE cluster, and does
|
||||
_delete_by_query 403 there as it does for org_patents?
|
||||
6. Signals — does org_patents carry matched_authors for this institution, and
|
||||
what is the match_type breakdown?
|
||||
|
||||
Unlike the seed (llm_evaluations/.../build_ude_author_work_set.py) this drops inner_hits
|
||||
and pulls every authorship (external co-authors + their institutions) — without that
|
||||
there is no bridging signal.
|
||||
|
||||
Usage:
|
||||
python service/scripts/multipliers/spike_audit.py --institution-id I62318514
|
||||
|
||||
Credentials are read from service/src/main/inse/.env (ELASTICSEARCH_* for the NES/OpenAlex
|
||||
cluster, ELASTICSEARCH_INSE_* for patents/news). Nothing is written to the real cluster
|
||||
unless --probe-writes is passed (it creates and deletes a throwaway index).
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import collections
|
||||
import gzip
|
||||
import json
|
||||
import math
|
||||
import os
|
||||
import statistics
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
from typing import Any, Iterable, Iterator
|
||||
|
||||
import httpx
|
||||
import yaml
|
||||
from dotenv import load_dotenv
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
ENV_PATH = SCRIPT_DIR.parent.parent / "src" / "main" / "inse" / ".env"
|
||||
load_dotenv(dotenv_path=ENV_PATH)
|
||||
|
||||
# --- clusters -------------------------------------------------------------
|
||||
|
||||
NES_URL = (os.environ.get("ELASTICSEARCH_URL") or "").rstrip("/")
|
||||
NES_KEY = os.environ.get("ELASTICSEARCH_API_KEY") or ""
|
||||
INSE_URL = (os.environ.get("ELASTICSEARCH_INSE_URL") or "").rstrip("/")
|
||||
INSE_KEY = os.environ.get("ELASTICSEARCH_INSE_API_KEY") or ""
|
||||
|
||||
# --- extraction knobs (spike-only; the real build reads these from YAML) --
|
||||
|
||||
AFFILIATION_YEAR_GTE = 2025
|
||||
WORK_YEAR_GTE = 1950
|
||||
AUTHOR_PAGE_SIZE = 1000
|
||||
AUTHOR_BATCH_SIZE = 250
|
||||
WORK_PAGE_SIZE = 1000
|
||||
PAIR_CAPS = (20, 50, 100)
|
||||
REQUEST_TIMEOUT = 180.0
|
||||
PROBE_INDEX = "multiplicators_spike_probe"
|
||||
|
||||
|
||||
# ES helpers
|
||||
|
||||
|
||||
def _headers(api_key: str) -> dict[str, str]:
|
||||
return {
|
||||
"Authorization": f"ApiKey {api_key}",
|
||||
"Content-Type": "application/json",
|
||||
"Accept": "application/json",
|
||||
}
|
||||
|
||||
|
||||
def es_request(
|
||||
client: httpx.Client,
|
||||
method: str,
|
||||
base_url: str,
|
||||
api_key: str,
|
||||
path: str,
|
||||
body: dict[str, Any] | None = None,
|
||||
) -> httpx.Response:
|
||||
url = f"{base_url}/{path.lstrip('/')}"
|
||||
return client.request(
|
||||
method, url, headers=_headers(api_key), json=body, timeout=REQUEST_TIMEOUT
|
||||
)
|
||||
|
||||
|
||||
def es_search(
|
||||
client: httpx.Client, base_url: str, api_key: str, index: str, body: dict[str, Any]
|
||||
) -> dict[str, Any]:
|
||||
response = es_request(client, "POST", base_url, api_key, f"{index}/_search", body)
|
||||
if not response.is_success:
|
||||
raise RuntimeError(
|
||||
f"ES error {response.status_code} for {index}:\n{response.text[:1000]}"
|
||||
)
|
||||
return response.json()
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Institution resolution (parameterised — no hardcoded UDE)
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def resolve_institution(client: httpx.Client, institution_id: str) -> dict[str, Any]:
|
||||
"""Look up ror + display_name for --institution-id from openalex-institutions."""
|
||||
raw = institution_id.strip()
|
||||
short = raw.rsplit("/", 1)[-1]
|
||||
full = f"https://openalex.org/{short}"
|
||||
|
||||
result = es_search(
|
||||
client,
|
||||
NES_URL,
|
||||
NES_KEY,
|
||||
"openalex-institutions",
|
||||
{"size": 1, "query": {"term": {"id": full}}},
|
||||
)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
raise SystemExit(f"Institution {full} not found in openalex-institutions.")
|
||||
|
||||
source = hits[0]["_source"]
|
||||
return {
|
||||
"id": full,
|
||||
"short_id": short,
|
||||
"ror": source.get("ror"),
|
||||
"display_name": source.get("display_name"),
|
||||
}
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Author queries (two-group union — group 2 recovers empty-last-known authors)
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def recent_affiliation_filter(insts: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
"""Recent affiliation with ANY cohort institution (matched by id, ror as backup)."""
|
||||
ids = [i["id"] for i in insts]
|
||||
shoulds: list[dict[str, Any]] = [{"terms": {"affiliations.institution.id": ids}}]
|
||||
rors = [i["ror"] for i in insts if i.get("ror")]
|
||||
if rors:
|
||||
shoulds.append({"terms": {"affiliations.institution.ror": rors}})
|
||||
return {
|
||||
"nested": {
|
||||
"path": "affiliations",
|
||||
"query": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
{"bool": {"should": shoulds, "minimum_should_match": 1}},
|
||||
{"range": {"affiliations.years": {"gte": AFFILIATION_YEAR_GTE}}},
|
||||
]
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def last_known_filter(insts: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
"""last_known_institutions membership in the cohort, matched by ID.
|
||||
|
||||
(The seed script matched the display_name string; ID terms are equivalent for a
|
||||
single institution and the only sane option for a multi-institution cohort.)"""
|
||||
return {
|
||||
"nested": {
|
||||
"path": "last_known_institutions",
|
||||
"query": {
|
||||
"terms": {"last_known_institutions.id": [i["id"] for i in insts]}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
def last_known_exists_filter() -> dict[str, Any]:
|
||||
return {
|
||||
"nested": {
|
||||
"path": "last_known_institutions",
|
||||
"query": {"exists": {"field": "last_known_institutions.display_name"}},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
AUTHOR_SOURCE = [
|
||||
"id",
|
||||
"display_name",
|
||||
"orcid",
|
||||
"works_count",
|
||||
"cited_by_count",
|
||||
"last_known_institutions",
|
||||
"affiliations",
|
||||
]
|
||||
|
||||
|
||||
def author_query(query: dict[str, Any], search_after: Any) -> dict[str, Any]:
|
||||
body = {
|
||||
"size": AUTHOR_PAGE_SIZE,
|
||||
"track_total_hits": True,
|
||||
"_source": AUTHOR_SOURCE,
|
||||
"query": query,
|
||||
"sort": [{"id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
return body
|
||||
|
||||
|
||||
def collect_authors(
|
||||
client: httpx.Client, insts: list[dict[str, Any]]
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
groups = {
|
||||
"backend_compatible": {
|
||||
"bool": {
|
||||
"filter": [last_known_filter(insts), recent_affiliation_filter(insts)]
|
||||
}
|
||||
},
|
||||
"empty_last_known_recent": {
|
||||
"bool": {
|
||||
"filter": [recent_affiliation_filter(insts)],
|
||||
"must_not": [last_known_exists_filter()],
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
authors: dict[str, dict[str, Any]] = {}
|
||||
for group_name, query in groups.items():
|
||||
search_after = None
|
||||
total = None
|
||||
read = 0
|
||||
while True:
|
||||
result = es_search(
|
||||
client, NES_URL, NES_KEY, "openalex-authors",
|
||||
author_query(query, search_after),
|
||||
)
|
||||
hits = result["hits"]["hits"]
|
||||
if total is None:
|
||||
total = result["hits"]["total"]["value"]
|
||||
print(f" [{group_name}] expected {total}")
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
aid = src.get("id")
|
||||
if not aid:
|
||||
continue
|
||||
if aid not in authors:
|
||||
authors[aid] = {
|
||||
"id": aid,
|
||||
"display_name": src.get("display_name"),
|
||||
"orcid": src.get("orcid"),
|
||||
"works_count": src.get("works_count"),
|
||||
"cited_by_count": src.get("cited_by_count"),
|
||||
"source_sets": [group_name],
|
||||
}
|
||||
elif group_name not in authors[aid]["source_sets"]:
|
||||
authors[aid]["source_sets"].append(group_name)
|
||||
read += 1
|
||||
search_after = hits[-1]["sort"]
|
||||
print(f" [{group_name}] read {read}/{total}")
|
||||
time.sleep(0.05)
|
||||
return authors
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Work queries — FULL authorships, no inner_hits
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
WORK_SOURCE = [
|
||||
"id",
|
||||
"doi",
|
||||
"publication_year",
|
||||
"type",
|
||||
"cited_by_count",
|
||||
"primary_topic.id",
|
||||
"primary_topic.display_name",
|
||||
"primary_topic.field.id",
|
||||
"primary_topic.field.display_name",
|
||||
"authorships.author.id",
|
||||
"authorships.author.display_name",
|
||||
"authorships.author_position",
|
||||
"authorships.is_corresponding",
|
||||
"authorships.institutions.id",
|
||||
"authorships.institutions.display_name",
|
||||
"authorships.institutions.type",
|
||||
"authorships.institutions.country_code",
|
||||
"authorships.institutions.lineage",
|
||||
]
|
||||
|
||||
|
||||
def works_batch_query(author_ids: list[str], search_after: Any) -> dict[str, Any]:
|
||||
body = {
|
||||
"size": WORK_PAGE_SIZE,
|
||||
"track_total_hits": True,
|
||||
"_source": WORK_SOURCE,
|
||||
"query": {
|
||||
"bool": {
|
||||
"filter": [
|
||||
{"range": {"publication_year": {"gte": WORK_YEAR_GTE}}},
|
||||
{
|
||||
"nested": {
|
||||
"path": "authorships",
|
||||
"query": {"terms": {"authorships.author.id": author_ids}},
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
"sort": [{"id": {"order": "asc"}}],
|
||||
}
|
||||
if search_after:
|
||||
body["search_after"] = search_after
|
||||
return body
|
||||
|
||||
|
||||
def collect_works(
|
||||
client: httpx.Client, author_ids: list[str]
|
||||
) -> dict[str, dict[str, Any]]:
|
||||
works: dict[str, dict[str, Any]] = {}
|
||||
total_batches = (len(author_ids) + AUTHOR_BATCH_SIZE - 1) // AUTHOR_BATCH_SIZE
|
||||
for i in range(0, len(author_ids), AUTHOR_BATCH_SIZE):
|
||||
batch = author_ids[i : i + AUTHOR_BATCH_SIZE]
|
||||
batch_no = i // AUTHOR_BATCH_SIZE + 1
|
||||
search_after = None
|
||||
while True:
|
||||
result = es_search(
|
||||
client, NES_URL, NES_KEY, "openalex-works*",
|
||||
works_batch_query(batch, search_after),
|
||||
)
|
||||
hits = result["hits"]["hits"]
|
||||
if not hits:
|
||||
break
|
||||
for hit in hits:
|
||||
src = hit["_source"]
|
||||
wid = src.get("id")
|
||||
if wid and wid not in works:
|
||||
works[wid] = src
|
||||
search_after = hits[-1]["sort"]
|
||||
print(f" work batch {batch_no}/{total_batches}: unique works {len(works)}")
|
||||
time.sleep(0.05)
|
||||
return works
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Cache IO
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def write_jsonl_gz(path: Path, records: Iterable[dict[str, Any]]) -> None:
|
||||
with gzip.open(path, "wt", encoding="utf-8", newline="\n") as f:
|
||||
for record in records:
|
||||
f.write(json.dumps(record, ensure_ascii=True) + "\n")
|
||||
|
||||
|
||||
def read_jsonl_gz(path: Path) -> Iterator[dict[str, Any]]:
|
||||
with gzip.open(path, "rt", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
line = line.strip()
|
||||
if line:
|
||||
yield json.loads(line)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Audit computations
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def _percentile(sorted_vals: list[int], q: float) -> int:
|
||||
if not sorted_vals:
|
||||
return 0
|
||||
idx = min(len(sorted_vals) - 1, int(math.ceil(q * len(sorted_vals)) - 1))
|
||||
return sorted_vals[max(0, idx)]
|
||||
|
||||
|
||||
def audit_field_coverage(works: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
n_authorships = 0
|
||||
with_position = 0
|
||||
with_corresponding = 0
|
||||
n_institutions = 0
|
||||
with_inst_type = 0
|
||||
company_institutions = 0
|
||||
|
||||
for w in works:
|
||||
for a in w.get("authorships", []) or []:
|
||||
n_authorships += 1
|
||||
if a.get("author_position"):
|
||||
with_position += 1
|
||||
if a.get("is_corresponding") is not None:
|
||||
with_corresponding += 1
|
||||
for inst in a.get("institutions", []) or []:
|
||||
n_institutions += 1
|
||||
itype = inst.get("type")
|
||||
if itype:
|
||||
with_inst_type += 1
|
||||
if itype == "company":
|
||||
company_institutions += 1
|
||||
|
||||
def pct(x: int, n: int) -> float:
|
||||
return round(100.0 * x / n, 2) if n else 0.0
|
||||
|
||||
return {
|
||||
"authorships_total": n_authorships,
|
||||
"author_position_pct": pct(with_position, n_authorships),
|
||||
"is_corresponding_pct": pct(with_corresponding, n_authorships),
|
||||
"institutions_total": n_institutions,
|
||||
"institution_type_pct": pct(with_inst_type, n_institutions),
|
||||
"company_institutions": company_institutions,
|
||||
}
|
||||
|
||||
|
||||
def audit_scale(works: list[dict[str, Any]]) -> dict[str, Any]:
|
||||
sizes: list[int] = []
|
||||
pairs_at_cap = {cap: 0 for cap in PAIR_CAPS}
|
||||
for w in works:
|
||||
author_ids = {
|
||||
a["author"]["id"]
|
||||
for a in (w.get("authorships") or [])
|
||||
if a.get("author", {}).get("id")
|
||||
}
|
||||
n = len(author_ids)
|
||||
sizes.append(n)
|
||||
for cap in PAIR_CAPS:
|
||||
if 2 <= n <= cap:
|
||||
pairs_at_cap[cap] += n * (n - 1) // 2
|
||||
sizes_sorted = sorted(sizes)
|
||||
return {
|
||||
"works": len(sizes),
|
||||
"authors_per_work": {
|
||||
"p50": _percentile(sizes_sorted, 0.50),
|
||||
"p90": _percentile(sizes_sorted, 0.90),
|
||||
"p99": _percentile(sizes_sorted, 0.99),
|
||||
"max": sizes_sorted[-1] if sizes_sorted else 0,
|
||||
},
|
||||
"hyperauthorship_works_gt_100": sum(1 for s in sizes if s > 100),
|
||||
"pair_instances_at_cap": pairs_at_cap,
|
||||
}
|
||||
|
||||
|
||||
def audit_career(
|
||||
author_ids: set[str], works: list[dict[str, Any]]
|
||||
) -> dict[str, Any]:
|
||||
"""active_years and suspicious-profile flags for in-set authors (exact history)."""
|
||||
years_by_author: dict[str, set[int]] = collections.defaultdict(set)
|
||||
for w in works:
|
||||
year = w.get("publication_year")
|
||||
if not isinstance(year, int):
|
||||
continue
|
||||
for a in w.get("authorships", []) or []:
|
||||
aid = a.get("author", {}).get("id")
|
||||
if aid in author_ids:
|
||||
years_by_author[aid].add(year)
|
||||
|
||||
active_years_list: list[int] = []
|
||||
suspicious = 0
|
||||
for aid in author_ids:
|
||||
years = years_by_author.get(aid)
|
||||
if not years:
|
||||
continue
|
||||
active_years_list.append(len(years))
|
||||
first_year = min(years)
|
||||
span = max(years) - first_year + 1
|
||||
if first_year < 1970 or span > 60:
|
||||
suspicious += 1
|
||||
|
||||
ay_sorted = sorted(active_years_list)
|
||||
return {
|
||||
"authors_with_works": len(ay_sorted),
|
||||
"suspicious_profile_count": suspicious,
|
||||
"suspicious_profile_pct": (
|
||||
round(100.0 * suspicious / len(ay_sorted), 2) if ay_sorted else 0.0
|
||||
),
|
||||
"active_years": {
|
||||
"p50": _percentile(ay_sorted, 0.50),
|
||||
"p90": _percentile(ay_sorted, 0.90),
|
||||
"max": ay_sorted[-1] if ay_sorted else 0,
|
||||
"mean": round(statistics.fmean(ay_sorted), 2) if ay_sorted else 0.0,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
def audit_signals(client: httpx.Client, inst: dict[str, Any]) -> dict[str, Any]:
|
||||
"""Probe org_patents (INSE cluster) for matched_authors + match_type breakdown."""
|
||||
if not INSE_URL or not INSE_KEY:
|
||||
return {"error": "INSE cluster credentials missing"}
|
||||
try:
|
||||
result = es_search(
|
||||
client, INSE_URL, INSE_KEY, "org_patents",
|
||||
{
|
||||
"size": 0,
|
||||
"track_total_hits": True,
|
||||
"query": {"term": {"institution_id": inst["short_id"]}},
|
||||
"aggs": {"by_match_type": {"terms": {"field": "match_type"}}},
|
||||
},
|
||||
)
|
||||
except RuntimeError as exc:
|
||||
return {"error": str(exc)[:300]}
|
||||
buckets = (
|
||||
result.get("aggregations", {}).get("by_match_type", {}).get("buckets", [])
|
||||
)
|
||||
return {
|
||||
"org_patents_for_institution": result["hits"]["total"]["value"],
|
||||
"match_type_breakdown": {b["key"]: b["doc_count"] for b in buckets},
|
||||
}
|
||||
|
||||
|
||||
def audit_permissions(client: httpx.Client, probe_writes: bool) -> dict[str, Any]:
|
||||
"""Test create / bulk / delete-by-query / delete on the INSE cluster."""
|
||||
if not probe_writes:
|
||||
return {"skipped": "pass --probe-writes to test index create/bulk/delete"}
|
||||
if not INSE_URL or not INSE_KEY:
|
||||
return {"error": "INSE cluster credentials missing"}
|
||||
|
||||
out: dict[str, Any] = {}
|
||||
create = es_request(
|
||||
client, "PUT", INSE_URL, INSE_KEY, PROBE_INDEX,
|
||||
{"mappings": {"properties": {"institution_id": {"type": "keyword"}}}},
|
||||
)
|
||||
out["create_index"] = create.status_code
|
||||
if create.is_success:
|
||||
bulk_body = (
|
||||
json.dumps({"index": {"_index": PROBE_INDEX, "_id": "probe_1"}})
|
||||
+ "\n"
|
||||
+ json.dumps({"institution_id": "PROBE"})
|
||||
+ "\n"
|
||||
)
|
||||
bulk = client.post(
|
||||
f"{INSE_URL}/_bulk",
|
||||
headers={**_headers(INSE_KEY), "Content-Type": "application/x-ndjson"},
|
||||
content=bulk_body,
|
||||
timeout=REQUEST_TIMEOUT,
|
||||
)
|
||||
out["bulk_index"] = bulk.status_code
|
||||
client.post(f"{INSE_URL}/{PROBE_INDEX}/_refresh", headers=_headers(INSE_KEY))
|
||||
dbq = es_request(
|
||||
client, "POST", INSE_URL, INSE_KEY, f"{PROBE_INDEX}/_delete_by_query",
|
||||
{"query": {"term": {"institution_id": "PROBE"}}},
|
||||
)
|
||||
out["delete_by_query"] = dbq.status_code # expect 403 if it mirrors org_patents
|
||||
drop = es_request(client, "DELETE", INSE_URL, INSE_KEY, PROBE_INDEX)
|
||||
out["delete_index"] = drop.status_code
|
||||
return out
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Main
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--institution-id", required=True)
|
||||
parser.add_argument(
|
||||
"--config", default=str(SCRIPT_DIR / "multipliers.yaml"),
|
||||
help="YAML config; its cohorts.<ID>.institution_ids extends the author set "
|
||||
"beyond the primary institution (e.g. the university hospital).",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--cache-dir", default=str(SCRIPT_DIR / "cache"),
|
||||
help="Where to read/write the extracted author/work JSONL.gz",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--skip-extract", action="store_true",
|
||||
help="Reuse cached JSONL.gz instead of hitting ES for author/work extraction.",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--probe-writes", action="store_true",
|
||||
help="Create+bulk+delete a throwaway index on INSE to test write permissions.",
|
||||
)
|
||||
args = parser.parse_args()
|
||||
|
||||
if not NES_URL or not NES_KEY:
|
||||
raise SystemExit(f"Missing NES credentials. Checked {ENV_PATH}")
|
||||
|
||||
cache_dir = Path(args.cache_dir)
|
||||
cache_dir.mkdir(parents=True, exist_ok=True)
|
||||
short = args.institution_id.strip().rsplit("/", 1)[-1]
|
||||
authors_path = cache_dir / f"authors_{short}.jsonl.gz"
|
||||
works_path = cache_dir / f"works_{short}.jsonl.gz"
|
||||
|
||||
cohort_ids = [short]
|
||||
config_path = Path(args.config)
|
||||
if config_path.exists():
|
||||
with open(config_path, "r", encoding="utf-8") as f:
|
||||
cfg = yaml.safe_load(f) or {}
|
||||
cohort_cfg = (cfg.get("cohorts") or {}).get(short) or {}
|
||||
if cohort_cfg.get("institution_ids"):
|
||||
cohort_ids = [str(i) for i in cohort_cfg["institution_ids"]]
|
||||
|
||||
with httpx.Client() as client:
|
||||
insts = [resolve_institution(client, i) for i in cohort_ids]
|
||||
inst = insts[0] # primary
|
||||
print(f"Cohort ({len(insts)} institutions):")
|
||||
for i in insts:
|
||||
print(f" {i['short_id']:<14} {i['display_name']}")
|
||||
|
||||
if args.skip_extract and authors_path.exists() and works_path.exists():
|
||||
print("Reusing cached extract.")
|
||||
authors = {a["id"]: a for a in read_jsonl_gz(authors_path)}
|
||||
works = list(read_jsonl_gz(works_path))
|
||||
else:
|
||||
print("\nExtracting authors...")
|
||||
authors = collect_authors(client, insts)
|
||||
write_jsonl_gz(authors_path, authors.values())
|
||||
print(f"Authors: {len(authors)} -> {authors_path}")
|
||||
|
||||
print("\nExtracting works (full authorships)...")
|
||||
author_ids = sorted(authors.keys())
|
||||
works_map = collect_works(client, author_ids)
|
||||
works = list(works_map.values())
|
||||
write_jsonl_gz(works_path, works)
|
||||
print(f"Works: {len(works)} -> {works_path}")
|
||||
|
||||
author_id_set = set(authors.keys())
|
||||
|
||||
print("\nComputing audit...")
|
||||
report = {
|
||||
"institution": inst,
|
||||
"cohort": [
|
||||
{"id": i["short_id"], "display_name": i["display_name"]} for i in insts
|
||||
],
|
||||
"reproduction": {
|
||||
"author_count": len(authors),
|
||||
"work_count": len(works),
|
||||
"group_breakdown": dict(
|
||||
collections.Counter(
|
||||
tuple(sorted(a["source_sets"])) and "+".join(sorted(a["source_sets"]))
|
||||
for a in authors.values()
|
||||
)
|
||||
),
|
||||
},
|
||||
"field_coverage": audit_field_coverage(works),
|
||||
"scale": audit_scale(works),
|
||||
"career_quality": audit_career(author_id_set, works),
|
||||
"signals": audit_signals(client, inst),
|
||||
"permissions": audit_permissions(client, args.probe_writes),
|
||||
}
|
||||
|
||||
report_path = cache_dir / f"spike_report_{short}.json"
|
||||
with open(report_path, "w", encoding="utf-8", newline="\n") as f:
|
||||
json.dump(report, f, ensure_ascii=False, indent=2)
|
||||
|
||||
print("\n=== SPIKE AUDIT REPORT ===")
|
||||
print(json.dumps(report, ensure_ascii=False, indent=2))
|
||||
print(f"\nWritten: {report_path}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -0,0 +1,130 @@
|
||||
"""Tests for graph construction (pair generation, weights, caps, node aggregates)."""
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from graph import build_graph, focal_subgraph, short_id
|
||||
|
||||
|
||||
def make_work(wid, year, authors, field_id=None):
|
||||
"""authors: list of (author_id, institutions[(id,type)], position)."""
|
||||
return {
|
||||
"id": f"https://openalex.org/{wid}",
|
||||
"publication_year": year,
|
||||
"primary_topic": (
|
||||
{"field": {"id": f"https://openalex.org/fields/{field_id}"}}
|
||||
if field_id
|
||||
else None
|
||||
),
|
||||
"authorships": [
|
||||
{
|
||||
"author": {"id": f"https://openalex.org/{aid}", "display_name": aid},
|
||||
"author_position": pos,
|
||||
"institutions": [
|
||||
{"id": f"https://openalex.org/{iid}", "type": itype}
|
||||
for iid, itype in insts
|
||||
],
|
||||
}
|
||||
for aid, insts, pos in authors
|
||||
],
|
||||
}
|
||||
|
||||
|
||||
UDE = [("I1", "education")]
|
||||
COMPANY = [("I9", "company")]
|
||||
|
||||
|
||||
def test_short_id():
|
||||
assert short_id("https://openalex.org/A5023888391") == "A5023888391"
|
||||
assert short_id("A5023888391") == "A5023888391"
|
||||
assert short_id(None) is None
|
||||
|
||||
|
||||
def test_edge_weight_decay_and_team_size():
|
||||
works = [
|
||||
make_work("W1", 2026, [("A1", UDE, "first"), ("A2", UDE, "last")]),
|
||||
make_work("W2", 2025, [("A1", UDE, "first"), ("A2", UDE, "last")]),
|
||||
]
|
||||
g = build_graph(works, {"A1", "A2"}, decay=0.8)
|
||||
assert g.ref_year == 2026
|
||||
e = g.edges[("A1", "A2")]
|
||||
# W1: 0.8^0 / 1 = 1.0 ; W2: 0.8^1 / 1 = 0.8
|
||||
assert e.weight == pytest.approx(1.8)
|
||||
assert e.n_works == 2
|
||||
assert e.first_joint_year == 2025
|
||||
assert e.last_joint_year == 2026
|
||||
|
||||
|
||||
def test_team_size_divides_weight():
|
||||
works = [
|
||||
make_work(
|
||||
"W1", 2026,
|
||||
[("A1", UDE, "first"), ("A2", UDE, "middle"), ("A3", UDE, "last")],
|
||||
)
|
||||
]
|
||||
g = build_graph(works, {"A1", "A2", "A3"})
|
||||
# n_authors=3 -> each pair gets 1/(3-1) = 0.5
|
||||
assert g.edges[("A1", "A2")].weight == pytest.approx(0.5)
|
||||
assert len(g.edges) == 3
|
||||
|
||||
|
||||
def test_hyperauthorship_cap_excludes_pairs_but_keeps_years():
|
||||
big = make_work(
|
||||
"W1", 2020, [(f"A{i}", UDE, "middle") for i in range(1, 61)]
|
||||
)
|
||||
small = make_work("W2", 2021, [("A1", UDE, "first"), ("A2", UDE, "last")])
|
||||
g = build_graph([big, small], {"A1", "A2"}, max_authors_per_work=50)
|
||||
assert g.n_works_capped == 1
|
||||
assert g.n_works_used == 1
|
||||
assert set(g.edges) == {("A1", "A2")}
|
||||
# capped work still contributes publication years
|
||||
assert 2020 in g.nodes["A1"].publication_years
|
||||
assert 2021 in g.nodes["A1"].publication_years
|
||||
|
||||
|
||||
def test_cross_institution_weight():
|
||||
works = [
|
||||
make_work("W1", 2026, [("A1", UDE, "first"), ("A2", COMPANY, "last")]),
|
||||
make_work("W2", 2026, [("A1", UDE, "first"), ("A3", UDE, "last")]),
|
||||
]
|
||||
g = build_graph(works, {"A1", "A2", "A3"})
|
||||
assert g.edges[("A1", "A2")].cross_inst_weight == pytest.approx(1.0)
|
||||
assert g.edges[("A1", "A3")].cross_inst_weight == pytest.approx(0.0)
|
||||
|
||||
|
||||
def test_company_share_and_fields():
|
||||
works = [
|
||||
make_work("W1", 2026, [("A1", UDE, "first"), ("A2", COMPANY, "last")], "F11"),
|
||||
make_work("W2", 2026, [("A1", UDE, "first"), ("A3", UDE, "last")], "F22"),
|
||||
]
|
||||
g = build_graph(works, {"A1"})
|
||||
n = g.nodes["A1"]
|
||||
assert n.n_company_works == 1 and n.n_typed_works == 2
|
||||
assert n.field_counts == {"F11": 1, "F22": 1}
|
||||
|
||||
|
||||
def test_focal_subgraph_excludes_externals():
|
||||
works = [
|
||||
make_work("W1", 2026, [("A1", UDE, "first"), ("EXT", COMPANY, "last")]),
|
||||
make_work("W2", 2026, [("A1", UDE, "first"), ("A2", UDE, "last")]),
|
||||
]
|
||||
g = build_graph(works, {"A1", "A2"})
|
||||
internal = focal_subgraph(g)
|
||||
assert "EXT" not in internal
|
||||
assert set(internal["A1"].keys()) == {"A2"}
|
||||
|
||||
|
||||
def test_last_author_junior_first_recorded():
|
||||
works = [
|
||||
make_work("W1", 2026, [("JUNIOR", UDE, "first"), ("PROF", UDE, "last")]),
|
||||
]
|
||||
g = build_graph(works, {"JUNIOR", "PROF"})
|
||||
assert g.nodes["PROF"].last_author_junior_first == [("JUNIOR", 2026)]
|
||||
assert g.nodes["JUNIOR"].last_author_junior_first == []
|
||||
|
||||
|
||||
def test_duplicate_authorships_deduped():
|
||||
w = make_work("W1", 2026, [("A1", UDE, "first"), ("A1", UDE, "last"), ("A2", UDE, "middle")])
|
||||
g = build_graph([w], {"A1", "A2"})
|
||||
# A1 duplicated -> counts once; n_authors=2 -> weight divisor 1
|
||||
assert g.edges[("A1", "A2")].weight == pytest.approx(1.0)
|
||||
@@ -0,0 +1,231 @@
|
||||
"""Tests for metrics: betweenness vs networkx oracle, constraint on a star,
|
||||
active_years_at robustness (the planted-1893-outlier regression guard), mentor logic."""
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from graph import build_graph
|
||||
from metrics import (
|
||||
active_years_at,
|
||||
betweenness_centrality,
|
||||
burt_constraint,
|
||||
compute_all_metrics,
|
||||
field_entropy,
|
||||
is_suspicious_profile,
|
||||
mentor_metrics,
|
||||
)
|
||||
from test_graph import UDE, make_work
|
||||
|
||||
networkx = pytest.importorskip("networkx")
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# active_years_at — THE regression guard for the whole design premise
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_active_years_at_unmoved_by_planted_1893_outlier():
|
||||
"""A single misattributed 1893 work must shift active_years_at by exactly 1,
|
||||
unlike first_pub_year-based career age, which it would shift by ~120 years."""
|
||||
clean = set(range(2010, 2026)) # 16 active years
|
||||
poisoned = clean | {1893} # merged-profile artifact
|
||||
|
||||
assert active_years_at(clean, 2025) == 16
|
||||
assert active_years_at(poisoned, 2025) == 17 # +1, not +120
|
||||
# seniority classification at the time of an early collaboration is unaffected
|
||||
assert active_years_at(clean, 2013) == 4 # still "Early" in 2013
|
||||
assert active_years_at(poisoned, 2013) == 5 # off by exactly one year
|
||||
|
||||
# the poisoned profile IS flagged for evidence confidence
|
||||
assert not is_suspicious_profile(clean)
|
||||
assert is_suspicious_profile(poisoned)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# betweenness — barbell fixture + networkx oracle
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def _nx_graph(adj):
|
||||
g = networkx.Graph()
|
||||
for a, neigh in adj.items():
|
||||
g.add_node(a)
|
||||
for b, w in neigh.items():
|
||||
g.add_edge(a, b, weight=w, distance=1.0 / w)
|
||||
return g
|
||||
|
||||
|
||||
def test_betweenness_barbell_bridge_dominates():
|
||||
"""Two triangles joined by one bridge node: the bridge has max betweenness."""
|
||||
adj = {}
|
||||
|
||||
def add(a, b, w=1.0):
|
||||
adj.setdefault(a, {})[b] = w
|
||||
adj.setdefault(b, {})[a] = w
|
||||
|
||||
for x, y in [("A", "B"), ("B", "C"), ("A", "C")]:
|
||||
add(x, y)
|
||||
for x, y in [("D", "E"), ("E", "F"), ("D", "F")]:
|
||||
add(x, y)
|
||||
add("C", "M")
|
||||
add("M", "D")
|
||||
|
||||
bc = betweenness_centrality(adj)
|
||||
assert bc["M"] == max(bc.values())
|
||||
assert bc["A"] == pytest.approx(0.0)
|
||||
|
||||
oracle = networkx.betweenness_centrality(
|
||||
_nx_graph(adj), weight="distance", normalized=True
|
||||
)
|
||||
for node, value in bc.items():
|
||||
assert value == pytest.approx(oracle[node], abs=1e-9), node
|
||||
|
||||
|
||||
def test_betweenness_weighted_paths_vs_oracle():
|
||||
"""Weighted graph where the shortest path is NOT the fewest-hops path."""
|
||||
adj = {}
|
||||
|
||||
def add(a, b, w):
|
||||
adj.setdefault(a, {})[b] = w
|
||||
adj.setdefault(b, {})[a] = w
|
||||
|
||||
# strong two-hop route A-X-B (distance 0.2+0.2) beats direct weak A-B (distance 2)
|
||||
add("A", "B", 0.5)
|
||||
add("A", "X", 5.0)
|
||||
add("X", "B", 5.0)
|
||||
add("B", "C", 1.0)
|
||||
|
||||
bc = betweenness_centrality(adj)
|
||||
oracle = networkx.betweenness_centrality(
|
||||
_nx_graph(adj), weight="distance", normalized=True
|
||||
)
|
||||
for node, value in bc.items():
|
||||
assert value == pytest.approx(oracle[node], abs=1e-9), node
|
||||
assert bc["X"] > 0.0 # X sits on the A->B shortest path
|
||||
|
||||
|
||||
def test_betweenness_random_graph_vs_oracle():
|
||||
"""Randomized (but seeded) graph, full oracle comparison."""
|
||||
rng = networkx.gnm_random_graph(24, 60, seed=7)
|
||||
adj = {}
|
||||
for a, b in rng.edges():
|
||||
w = ((a * 31 + b * 17) % 9 + 1) / 3.0 # deterministic pseudo-weights
|
||||
adj.setdefault(str(a), {})[str(b)] = w
|
||||
adj.setdefault(str(b), {})[str(a)] = w
|
||||
for n in rng.nodes():
|
||||
adj.setdefault(str(n), {})
|
||||
|
||||
bc = betweenness_centrality(adj)
|
||||
oracle = networkx.betweenness_centrality(
|
||||
_nx_graph(adj), weight="distance", normalized=True
|
||||
)
|
||||
for node, value in bc.items():
|
||||
assert value == pytest.approx(oracle[node], abs=1e-7), node
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Burt constraint — star fixture
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_constraint_star_center_is_unconstrained():
|
||||
"""Star: the hub bridges structural holes (low constraint); each spoke is
|
||||
fully dependent on the hub (constraint 1.0). Clique members sit in between."""
|
||||
star = {}
|
||||
for spoke in ["S1", "S2", "S3", "S4"]:
|
||||
star.setdefault("HUB", {})[spoke] = 1.0
|
||||
star[spoke] = {"HUB": 1.0}
|
||||
c = burt_constraint(star)
|
||||
assert c["HUB"] == pytest.approx(0.25) # sum of (1/4)^2 * 4
|
||||
for spoke in ["S1", "S2", "S3", "S4"]:
|
||||
assert c[spoke] == pytest.approx(1.0)
|
||||
|
||||
triangle = {
|
||||
"A": {"B": 1.0, "C": 1.0},
|
||||
"B": {"A": 1.0, "C": 1.0},
|
||||
"C": {"A": 1.0, "B": 1.0},
|
||||
}
|
||||
c3 = burt_constraint(triangle)
|
||||
# closed triad: everyone highly constrained, more than the star hub
|
||||
assert c3["A"] > c["HUB"]
|
||||
oracle = networkx.constraint(_nx_graph(triangle), weight="weight")
|
||||
assert c3["A"] == pytest.approx(oracle["A"], abs=1e-9)
|
||||
|
||||
|
||||
def test_field_entropy():
|
||||
assert field_entropy({}) == 0.0
|
||||
assert field_entropy({"F1": 10}) == 0.0
|
||||
assert field_entropy({"F1": 5, "F2": 5}) == pytest.approx(1.0)
|
||||
assert field_entropy({"F1": 1, "F2": 1, "F3": 1, "F4": 1}) == pytest.approx(2.0)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------
|
||||
# Mentor metrics
|
||||
# ---------------------------------------------------------------------
|
||||
|
||||
|
||||
def _career(aid, years, wid_prefix):
|
||||
"""Solo-ish works giving `aid` a publication history (paired with a throwaway
|
||||
co-author so the works survive the n_authors >= 2 filter)."""
|
||||
return [
|
||||
make_work(f"{wid_prefix}{y}", y, [(aid, UDE, "first"), (f"X_{aid}_{y}", [], "last")])
|
||||
for y in years
|
||||
]
|
||||
|
||||
|
||||
def test_mentor_seniority_gap_and_progression():
|
||||
works = []
|
||||
# PROF: established since 2000 (>=10 active years by 2015)
|
||||
works += _career("PROF", range(2000, 2026), "P")
|
||||
# JUNIOR: first-ever activity 2015 (active_years_at(2015)=1), then progresses
|
||||
works += [
|
||||
make_work("J1", 2015, [("JUNIOR", UDE, "first"), ("PROF", UDE, "last")]),
|
||||
]
|
||||
works += _career("JUNIOR", range(2016, 2022), "J") # 6 more years -> progressed
|
||||
# PEER: senior colleague, first joint work 2020 when both are senior
|
||||
works += _career("PEER", range(2000, 2026), "Q")
|
||||
works += [make_work("JP", 2020, [("PEER", UDE, "first"), ("PROF", UDE, "last")])]
|
||||
|
||||
g = build_graph(works, {"PROF", "JUNIOR", "PEER"})
|
||||
mm = mentor_metrics(g, "PROF")
|
||||
|
||||
assert mm.juniors_mentored == 1
|
||||
assert mm.junior_ids == ["JUNIOR"]
|
||||
assert mm.junior_progression_rate == pytest.approx(1.0)
|
||||
# PROF was last author on J1 with a junior first author
|
||||
assert mm.last_author_with_junior_first == 1
|
||||
# the senior PEER never counts
|
||||
assert "PEER" not in mm.junior_ids
|
||||
|
||||
|
||||
def test_mentor_excludes_external_coauthors():
|
||||
"""External co-authors have truncated year-sets and must never count as juniors."""
|
||||
works = _career("PROF", range(2000, 2026), "P")
|
||||
works += [make_work("E1", 2020, [("EXT", [], "first"), ("PROF", UDE, "last")])]
|
||||
g = build_graph(works, {"PROF"}) # EXT not focal
|
||||
mm = mentor_metrics(g, "PROF")
|
||||
assert mm.juniors_mentored == 0
|
||||
assert mm.last_author_with_junior_first == 0
|
||||
|
||||
|
||||
def test_mentor_requires_focal_seniority_at_first_joint_year():
|
||||
"""Two juniors co-publishing: neither mentors the other."""
|
||||
works = [
|
||||
make_work("W1", 2020, [("J1", UDE, "first"), ("J2", UDE, "last")]),
|
||||
make_work("W2", 2021, [("J1", UDE, "first"), ("J2", UDE, "last")]),
|
||||
]
|
||||
g = build_graph(works, {"J1", "J2"})
|
||||
assert mentor_metrics(g, "J2").juniors_mentored == 0
|
||||
|
||||
|
||||
def test_compute_all_metrics_shapes():
|
||||
works = _career("PROF", range(2000, 2026), "P")
|
||||
works += [make_work("J1", 2015, [("JUNIOR", UDE, "first"), ("PROF", UDE, "last")])]
|
||||
g = build_graph(works, {"PROF", "JUNIOR"})
|
||||
rows = compute_all_metrics(g)
|
||||
assert set(rows) == {"PROF", "JUNIOR"}
|
||||
prof = rows["PROF"]
|
||||
assert prof["juniors_mentored"] == 1
|
||||
assert prof["active_years"] == 26
|
||||
assert 0.0 <= prof["industry_coauthor_share"] <= 1.0
|
||||
assert prof["suspicious_profile"] is False
|
||||
@@ -0,0 +1,120 @@
|
||||
"""Property-style tests for scoring: percentile bounds, tie handling, bucket isolation,
|
||||
weight redistribution for missing metrics, tagging rules."""
|
||||
from __future__ import annotations
|
||||
|
||||
import pytest
|
||||
|
||||
from scoring import career_bucket, percentile_ranks, score_rows
|
||||
|
||||
CONFIG = {
|
||||
"_config_hash": "testhash",
|
||||
"career": {"buckets": [4, 9, 14], "bucket_names": ["Early", "Emerging", "Established", "Senior"]},
|
||||
"weights": {
|
||||
"bridger": {"betweenness": 0.5, "field_entropy": 0.5},
|
||||
"mentor": {"juniors_mentored": 1.0},
|
||||
},
|
||||
"tags": {"threshold": 0.85, "min_active_years": 2},
|
||||
}
|
||||
|
||||
|
||||
def row(aid, active_years, betweenness=0.0, entropy=0.0, juniors=0):
|
||||
return {
|
||||
"author_id": aid,
|
||||
"active_years": active_years,
|
||||
"betweenness": betweenness,
|
||||
"field_entropy": entropy,
|
||||
"juniors_mentored": juniors,
|
||||
"junior_ids": [],
|
||||
}
|
||||
|
||||
|
||||
def test_career_bucket_thresholds_match_backend():
|
||||
names = ["Early", "Emerging", "Established", "Senior"]
|
||||
assert career_bucket(1, [4, 9, 14], names) == "Early"
|
||||
assert career_bucket(4, [4, 9, 14], names) == "Early"
|
||||
assert career_bucket(5, [4, 9, 14], names) == "Emerging"
|
||||
assert career_bucket(9, [4, 9, 14], names) == "Emerging"
|
||||
assert career_bucket(10, [4, 9, 14], names) == "Established"
|
||||
assert career_bucket(14, [4, 9, 14], names) == "Established"
|
||||
assert career_bucket(15, [4, 9, 14], names) == "Senior"
|
||||
|
||||
|
||||
def test_percentiles_in_zero_one_and_ties_share_mean_rank():
|
||||
p = percentile_ranks({"a": 1.0, "b": 2.0, "c": 3.0, "d": 4.0})
|
||||
assert all(0.0 < v <= 1.0 for v in p.values())
|
||||
assert p["d"] == pytest.approx(1.0)
|
||||
assert p["a"] == pytest.approx(0.25)
|
||||
|
||||
# a metric that is 0 for most people must not hand out high percentiles
|
||||
p = percentile_ranks({"a": 0, "b": 0, "c": 0, "d": 5})
|
||||
assert p["a"] == pytest.approx(0.5) # mean rank of the 3-way tie: (1+2+3)/3 / 4
|
||||
assert p["d"] == pytest.approx(1.0)
|
||||
# None values are excluded entirely
|
||||
p = percentile_ranks({"a": None, "b": 1.0})
|
||||
assert "a" not in p and p["b"] == pytest.approx(1.0)
|
||||
|
||||
|
||||
def test_percentiles_computed_within_buckets_not_across():
|
||||
rows = {
|
||||
# Early bucket: modest raw values
|
||||
"e1": row("e1", 2, betweenness=0.1, entropy=0.5),
|
||||
"e2": row("e2", 3, betweenness=0.0, entropy=0.0),
|
||||
# Senior bucket: huge raw values
|
||||
"s1": row("s1", 20, betweenness=0.9, entropy=3.0),
|
||||
"s2": row("s2", 25, betweenness=0.8, entropy=2.0),
|
||||
}
|
||||
scored = {r["author_id"]: r for r in score_rows(rows, CONFIG)}
|
||||
# e1 tops the EARLY bucket despite raw values far below the seniors
|
||||
assert scored["e1"]["percentiles"]["betweenness"] == pytest.approx(1.0)
|
||||
assert scored["s1"]["percentiles"]["betweenness"] == pytest.approx(1.0)
|
||||
assert scored["e1"]["career_bucket"] == "Early"
|
||||
assert scored["s1"]["career_bucket"] == "Senior"
|
||||
|
||||
|
||||
def test_monotonicity_more_bridging_never_lowers_score():
|
||||
base = {
|
||||
"a": row("a", 3, betweenness=0.1, entropy=1.0),
|
||||
"b": row("b", 3, betweenness=0.2, entropy=1.0),
|
||||
"c": row("c", 3, betweenness=0.3, entropy=1.0),
|
||||
}
|
||||
improved = {
|
||||
"a": row("a", 3, betweenness=0.25, entropy=1.0), # a gains betweenness
|
||||
"b": row("b", 3, betweenness=0.2, entropy=1.0),
|
||||
"c": row("c", 3, betweenness=0.3, entropy=1.0),
|
||||
}
|
||||
s_base = {r["author_id"]: r for r in score_rows(base, CONFIG)}
|
||||
s_improved = {r["author_id"]: r for r in score_rows(improved, CONFIG)}
|
||||
assert (
|
||||
s_improved["a"]["sub_scores"]["bridger"]
|
||||
>= s_base["a"]["sub_scores"]["bridger"]
|
||||
)
|
||||
|
||||
|
||||
def test_missing_metric_weight_redistributed():
|
||||
rows = {
|
||||
"a": {**row("a", 3, entropy=2.0), "betweenness": None},
|
||||
"b": {**row("b", 3, entropy=1.0), "betweenness": None},
|
||||
}
|
||||
scored = {r["author_id"]: r for r in score_rows(rows, CONFIG)}
|
||||
# bridger falls back to entropy alone; the top entropy holder gets 1.0
|
||||
assert scored["a"]["sub_scores"]["bridger"] == pytest.approx(1.0)
|
||||
|
||||
|
||||
def test_tags_fire_above_threshold_and_respect_min_active_years():
|
||||
rows = {
|
||||
# 8-person Early bucket: m ranks 7/8 = 0.875 >= 0.85 threshold
|
||||
**{f"x{i}": row(f"x{i}", 3, juniors=0) for i in range(6)},
|
||||
"m": row("m", 3, juniors=7),
|
||||
"newbie": {**row("newbie", 1, juniors=9), "active_years": 1},
|
||||
}
|
||||
scored = {r["author_id"]: r for r in score_rows(rows, CONFIG)}
|
||||
assert "mentor" in scored["m"]["tags"]
|
||||
assert scored["newbie"]["tags"] == [] # min_active_years=2 gate
|
||||
|
||||
|
||||
def test_output_carries_raw_percentile_subscore_and_hash():
|
||||
scored = score_rows({"a": row("a", 3, betweenness=0.5)}, CONFIG)[0]
|
||||
assert scored["betweenness"] == 0.5 # raw
|
||||
assert "betweenness" in scored["percentiles"] # percentile
|
||||
assert "bridger" in scored["sub_scores"] # sub-score
|
||||
assert scored["config_hash"] == "testhash"
|
||||
@@ -0,0 +1,35 @@
|
||||
"""Tests for the pure parts of the signal joins: name/DOI normalization and
|
||||
the ambiguity rule for news matching."""
|
||||
from __future__ import annotations
|
||||
|
||||
from signals import normalize_doi, normalize_name
|
||||
|
||||
|
||||
def test_normalize_name_diacritics_case_whitespace():
|
||||
assert normalize_name("René Müller") == "rene muller"
|
||||
assert normalize_name("CHRISTOPH GILLE") == "christoph gille" # news is often ALL-CAPS
|
||||
assert normalize_name(" Anna-Lena Giesecke ") == "anna-lena giesecke"
|
||||
assert normalize_name("Barbara Saccà") == normalize_name("Barbara Sacca")
|
||||
assert normalize_name("Bülent Eken") == "bulent eken"
|
||||
|
||||
|
||||
def test_normalize_doi_prefixes_and_case():
|
||||
assert normalize_doi("https://doi.org/10.1371/journal.pone.0018216") == \
|
||||
"10.1371/journal.pone.0018216"
|
||||
assert normalize_doi("DOI:10.1016/J.CELL.2020.01.001") == "10.1016/j.cell.2020.01.001"
|
||||
assert normalize_doi("doi.org/10.1/x") == "10.1/x"
|
||||
assert normalize_doi("10.1/x") == "10.1/x"
|
||||
assert normalize_doi("") is None
|
||||
assert normalize_doi(None) is None
|
||||
|
||||
|
||||
def test_ambiguous_name_rule():
|
||||
"""Two cohort authors normalizing to the same name -> both excluded from news."""
|
||||
from collections import defaultdict
|
||||
names = {"A1": "Wei Zhang", "A2": "Wei ZHANG", "A3": "Unique Person"}
|
||||
by_norm = defaultdict(list)
|
||||
for aid, n in names.items():
|
||||
by_norm[normalize_name(n)].append(aid)
|
||||
ambiguous = {k for k, v in by_norm.items() if len(v) > 1}
|
||||
assert normalize_name("Wei Zhang") in ambiguous
|
||||
assert normalize_name("Unique Person") not in ambiguous
|
||||
@@ -0,0 +1,109 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
validate_sample.py — M1 exit check against the 60-person hand-labeled sample.
|
||||
|
||||
analysis/career_stage/career_stage_sample.csv holds 60 UDE researchers with
|
||||
manually verified status (31 Professor / 29 Researcher incl. doctoral). The
|
||||
mentor sub-score is a proxy for supervision with no ground truth in OpenAlex,
|
||||
so the cheapest sanity check is: mentor scores must concentrate on the
|
||||
professors. If they don't, the proxy is wrong and M2 waits (plan §5, M1 exit).
|
||||
|
||||
Usage:
|
||||
python validate_sample.py --institution-id I62318514
|
||||
"""
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import csv
|
||||
import gzip
|
||||
import json
|
||||
import statistics
|
||||
from pathlib import Path
|
||||
|
||||
SCRIPT_DIR = Path(__file__).resolve().parent
|
||||
REPO_ROOT = SCRIPT_DIR.parent.parent.parent
|
||||
SAMPLE_CSV = REPO_ROOT / "analysis" / "career_stage" / "career_stage_sample.csv"
|
||||
|
||||
|
||||
def main() -> None:
|
||||
parser = argparse.ArgumentParser(description=__doc__)
|
||||
parser.add_argument("--institution-id", required=True)
|
||||
parser.add_argument("--cache-dir", default=str(SCRIPT_DIR / "cache"))
|
||||
args = parser.parse_args()
|
||||
|
||||
short = args.institution_id.strip().rsplit("/", 1)[-1]
|
||||
scores_path = Path(args.cache_dir) / f"scores_{short}.jsonl.gz"
|
||||
if not scores_path.exists():
|
||||
raise SystemExit(f"Run build.py first — missing {scores_path}")
|
||||
|
||||
scores: dict[str, dict] = {}
|
||||
with gzip.open(scores_path, "rt", encoding="utf-8") as f:
|
||||
for line in f:
|
||||
row = json.loads(line)
|
||||
scores[row["author_id"]] = row
|
||||
|
||||
sample: list[dict] = []
|
||||
with open(SAMPLE_CSV, newline="", encoding="utf-8-sig") as f:
|
||||
for rec in csv.DictReader(f):
|
||||
sample.append(rec)
|
||||
|
||||
by_status: dict[str, list[dict]] = {}
|
||||
missing: list[str] = []
|
||||
for rec in sample:
|
||||
aid = rec["openalex_author_id"].strip()
|
||||
row = scores.get(aid)
|
||||
if row is None:
|
||||
missing.append(f"{rec['name']} ({aid})")
|
||||
continue
|
||||
by_status.setdefault(rec["known_status"], []).append(
|
||||
{"name": rec["name"], "discipline": rec["discipline_group"], **row}
|
||||
)
|
||||
|
||||
print(f"Sample: {len(sample)} people, matched in scores: "
|
||||
f"{sum(len(v) for v in by_status.values())}, missing: {len(missing)}")
|
||||
for m in missing:
|
||||
print(f" MISSING: {m}")
|
||||
|
||||
report: dict = {"missing": missing, "by_status": {}}
|
||||
for sub in ("mentor", "bridger", "amplifier"):
|
||||
print(f"\n=== {sub} sub-score by known status ===")
|
||||
for status, rows in sorted(by_status.items()):
|
||||
vals = [r["sub_scores"][sub] for r in rows]
|
||||
entry = {
|
||||
"n": len(vals),
|
||||
"median": round(statistics.median(vals), 3),
|
||||
"mean": round(statistics.fmean(vals), 3),
|
||||
"min": round(min(vals), 3),
|
||||
"max": round(max(vals), 3),
|
||||
}
|
||||
report["by_status"].setdefault(status, {})[sub] = entry
|
||||
print(f" {status:<12} n={entry['n']:>2} median={entry['median']:.3f} "
|
||||
f"mean={entry['mean']:.3f} range=[{entry['min']:.3f}, {entry['max']:.3f}]")
|
||||
|
||||
# headline check: professors' median mentor score > researchers'
|
||||
prof = report["by_status"].get("Professor", {}).get("mentor", {})
|
||||
res = report["by_status"].get("Researcher", {}).get("mentor", {})
|
||||
if prof and res:
|
||||
ok = prof["median"] > res["median"]
|
||||
print(f"\nM1 exit check — professors' median mentor score "
|
||||
f"({prof['median']}) > researchers' ({res['median']}): "
|
||||
f"{'PASS' if ok else 'FAIL'}")
|
||||
report["m1_exit_mentor_check"] = "PASS" if ok else "FAIL"
|
||||
|
||||
# per-person detail for eyeballing
|
||||
print("\n=== per-person (sorted by mentor score) ===")
|
||||
everyone = [r for rows in by_status.values() for r in rows]
|
||||
for r in sorted(everyone, key=lambda x: x["sub_scores"]["mentor"], reverse=True):
|
||||
status = next(s for s, rows in by_status.items() if r in rows)
|
||||
print(f" {r['sub_scores']['mentor']:.3f} {status:<11} {r['career_bucket']:<12}"
|
||||
f" juniors={r['juniors_mentored']:>3} laj={r['last_author_with_junior_first']:>3}"
|
||||
f" {r['name']} ({r['discipline']})")
|
||||
|
||||
out = Path(args.cache_dir) / f"validation_{short}.json"
|
||||
with open(out, "w", encoding="utf-8", newline="\n") as f:
|
||||
json.dump(report, f, ensure_ascii=False, indent=2)
|
||||
print(f"\nReport -> {out}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
map_news_topics.py — Map news keywords to OpenAlex topics.
|
||||
|
||||
@@ -37,7 +37,7 @@ import json
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
from datetime import datetime, timezone
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
|
||||
from dotenv import load_dotenv
|
||||
@@ -121,7 +121,7 @@ async def fetch_source_entries(cluster: str, max_docs: int | None) -> dict[str,
|
||||
|
||||
|
||||
async def run(args: argparse.Namespace) -> None:
|
||||
built_at = datetime.now(timezone.utc).isoformat()
|
||||
built_at = datetime.now(UTC).isoformat()
|
||||
model_name = os.getenv("SENTENCE_TRANSFORMERS_MODEL_NAME")
|
||||
|
||||
await base.check_backend(args.api_base_url)
|
||||
|
||||
@@ -3,10 +3,8 @@
|
||||
# See documentation in:
|
||||
# https://docs.scrapy.org/en/latest/topics/spider-middleware.html
|
||||
|
||||
from scrapy import signals
|
||||
|
||||
# useful for handling different item types with a single interface
|
||||
from itemadapter import is_item, ItemAdapter
|
||||
from scrapy import signals
|
||||
|
||||
|
||||
class AktuellSpiderMiddleware:
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
|
||||
|
||||
# useful for handling different item types with a single interface
|
||||
from itemadapter import ItemAdapter
|
||||
|
||||
|
||||
class AktuellPipeline:
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import scrapy
|
||||
|
||||
|
||||
class LinksCrawler(scrapy.Spider):
|
||||
name = "aktuell-links"
|
||||
|
||||
|
||||
@@ -1,8 +1,10 @@
|
||||
import scrapy
|
||||
import json
|
||||
from scrapy.linkextractors import LinkExtractor
|
||||
import os
|
||||
|
||||
import scrapy
|
||||
from scrapy.linkextractors import LinkExtractor
|
||||
|
||||
|
||||
class MetaDataCrawler(scrapy.Spider):
|
||||
name = "aktuell-metadata"
|
||||
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
from selenium import webdriver
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.common.exceptions import NoSuchElementException
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
from random import randint
|
||||
import time
|
||||
import sys
|
||||
import time
|
||||
from random import randint
|
||||
|
||||
from elasticsearch import Elasticsearch
|
||||
from selenium import webdriver
|
||||
from selenium.common.exceptions import NoSuchElementException
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
|
||||
es = Elasticsearch()
|
||||
|
||||
@@ -32,7 +33,7 @@ def getLinks(link, driver):
|
||||
elem = driver.find_element(By.XPATH, "/html/body/main/div[2]/div/div/div/div/div/div/div[" + str(counter) + "]/b").text
|
||||
if elem == "Zurück zum Gesamtüberblick":
|
||||
break
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
break
|
||||
|
||||
# get date
|
||||
@@ -45,7 +46,7 @@ def getLinks(link, driver):
|
||||
link = ""
|
||||
try:
|
||||
link = driver.find_element(By.XPATH, "/html/body/main/div[2]/div/div/div/div/div/div/div[" + str(counter) + "]/b/a").get_attribute('href')
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
continue
|
||||
|
||||
links.append(link)
|
||||
@@ -67,17 +68,17 @@ def getData(driver, link, date, date_year, date_num):
|
||||
subtitle = ""
|
||||
try:
|
||||
subtitle = driver.find_element(By.XPATH, "/html/body/main/div[3]/div/div/div/div[1]/div[1]/div/hgroup/h3").text
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
pass
|
||||
maintitle = ""
|
||||
try:
|
||||
maintitle = driver.find_element(By.XPATH, "/html/body/main/div[3]/div/div/div/div[1]/div[1]/div/hgroup/h2").text
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
pass
|
||||
redaktion = ""
|
||||
try:
|
||||
redaktion = driver.find_element(By.XPATH, "/html/body/main/div[3]/div/div/div/div[1]/div[1]/div/p[2]").text
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
pass
|
||||
author = ""
|
||||
if redaktion != "":
|
||||
@@ -86,7 +87,7 @@ def getData(driver, link, date, date_year, date_num):
|
||||
main_content = ""
|
||||
try:
|
||||
main_content = driver.find_element(By.XPATH, "/html/body/main/div[3]/div/div/div/div[1]/div[1]/div/p[1]").text
|
||||
except NoSuchElementException as nsee:
|
||||
except NoSuchElementException:
|
||||
pass
|
||||
|
||||
full_content = main_content
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import subprocess
|
||||
import sys
|
||||
import os
|
||||
import shutil
|
||||
import time
|
||||
import argparse
|
||||
import logging
|
||||
import os
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
|
||||
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import sys
|
||||
import os
|
||||
import json
|
||||
import time
|
||||
import logging
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from urllib.parse import quote
|
||||
|
||||
import requests
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
"""
|
||||
build_patents_openalex_keywords.py — Build IPC/CPC → OpenAlex topic/keyword matches.
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Author→patent final architecture
|
||||
|
||||
Runtime path:
|
||||
|
||||
```text
|
||||
Patent Search → Name Matching → Family Expansion → IPC/CPC Enrichment
|
||||
→ Production Filter → Semantic Topic Fallback V1
|
||||
→ Final Identity Guard (ambiguous authors only) → API
|
||||
```
|
||||
|
||||
Flags (demo enabled): `ENABLE_SEMANTIC_TOPIC_FALLBACK`, `ENABLE_AMBIGUOUS_AUTHOR_IDENTITY_GUARD`.
|
||||
|
||||
## Runtime
|
||||
|
||||
| File | Why |
|
||||
| --- | --- |
|
||||
| `service/src/main/inse/patents/authors/logic.py` | Wires the final pipeline only. |
|
||||
| `service/src/main/inse/config.py` | The two flags above. |
|
||||
| `topic_filter.py` | Production topic filter. |
|
||||
| `semantic_topic_fallback.py` | Combined production + semantic V1. |
|
||||
| `semantic_topic_fallback_v1_frozen.py` | Frozen semantic decision rules. |
|
||||
| `final_ambiguous_author_identity_guard.py` | Frozen identity guard. Runtime entry. |
|
||||
| `ambiguous_author_identity_guard.py` | Helper library imported by the final guard. Not called from `logic.py`. |
|
||||
| `ambiguous_author_identity_guard_v2.py` | Helper library imported by the final guard. Not called from `logic.py`. |
|
||||
| `identity.py`, `name_matching.py`, `name_variants.py` | Name matching and ambiguity. |
|
||||
| `ipc_openalex_mapping.py`, `search_pagination.py`, `search_queries.py`, `service.py` | Search and mapping. |
|
||||
|
||||
## Tests
|
||||
|
||||
| File | Why |
|
||||
| --- | --- |
|
||||
| `test_final_ambiguous_author_identity_guard.py` | Frozen final-guard contract. |
|
||||
| `test_semantic_topic_fallback.py` | Frozen semantic V1 contract. |
|
||||
| `test_identity.py` | Name/ambiguity helpers. |
|
||||
| `test_ipc_openalex_mapping.py` | IPC mapping. |
|
||||
| `test_orthosis_family_identity.py` | Family identity. |
|
||||
| `test_search_pagination.py` | Search pagination. |
|
||||
| `service/scripts/patents/test_evaluate_author_patent_search.py` | Join helpers for original evaluate. |
|
||||
|
||||
## Evaluation inputs
|
||||
|
||||
| Path | Why |
|
||||
| --- | --- |
|
||||
| `experiment_1/`, `experiment_2/`, `experiment_3/` | Original gold, pools, and reports. |
|
||||
| `aggregate_field_analysis/field_error_analysis/` | Frozen sample diagnosis (`field_error_analysis.json`). |
|
||||
| `experiments/semantic_topic_fallback_v1/candidate_decisions.json` | Frozen semantic decisions for the 131-candidate sample. |
|
||||
| `diagnosis_ui_mismatches/{author_id}.json` plus `diagnosis.json` | Live dump inputs for the final evaluation. |
|
||||
|
||||
## Evaluation outputs and runners
|
||||
|
||||
| Path | Why |
|
||||
| --- | --- |
|
||||
| `experiments/semantic_topic_fallback_v1/` | Semantic V1 standalone metrics. |
|
||||
| `experiments/production_with_semantic_fallback_v1/` | Combined semantic metrics. |
|
||||
| `experiments/final_ambiguous_author_identity_guard/` | Frozen final-guard evaluation and presentation. |
|
||||
| `run_experiment_final_ambiguous_author_identity_guard.py` | Reproducible final evaluation (historical V1/V2 numbers are constants). |
|
||||
| `experiment_semantic_topic_fallback_v1.py` | Reproducible semantic V1 evaluation. |
|
||||
| `evaluate_author_patent_search.py` | Original experiment evaluate. |
|
||||
|
||||
Historical Guard V1/V2 comparison numbers live in the final evaluation markdown/CSVs as frozen constants. The old V1/V2 experiment folders and apply paths are not kept.
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
# Evaluation
|
||||
|
||||
## Fixed Sample
|
||||
|
||||
```text
|
||||
18 Autoren
|
||||
131 Kandidaten
|
||||
89 positiv
|
||||
42 negativ
|
||||
```
|
||||
|
||||
## Production
|
||||
|
||||
```text
|
||||
P=0.941
|
||||
R=0.360
|
||||
F1=0.520
|
||||
```
|
||||
|
||||
## Field Error Analysis
|
||||
|
||||
Siehe `field_error_analysis/`.
|
||||
|
||||
## Semantic Topic Fallback
|
||||
|
||||
```text
|
||||
P=0.912
|
||||
R=0.584
|
||||
F1=0.712
|
||||
```
|
||||
|
||||
## Production + Semantic Fallback
|
||||
|
||||
```text
|
||||
P=0.923
|
||||
R=0.674
|
||||
F1=0.779
|
||||
```
|
||||
|
||||
Family-Level:
|
||||
|
||||
```text
|
||||
P=0.907
|
||||
R=0.731
|
||||
F1=0.810
|
||||
```
|
||||
|
||||
## Final Identity Guard
|
||||
|
||||
Siehe `experiments/final_ambiguous_author_identity_guard/`.
|
||||
|
||||
Candidate:
|
||||
|
||||
```text
|
||||
P=0.966
|
||||
R=0.640
|
||||
F1=0.770
|
||||
```
|
||||
|
||||
Family-Level:
|
||||
|
||||
```text
|
||||
P=0.959
|
||||
R=0.701
|
||||
F1=0.810
|
||||
```
|
||||
|
||||
## Status
|
||||
|
||||
```text
|
||||
final / frozen after evaluation
|
||||
demo flags enabled
|
||||
independent validation remains desirable
|
||||
```
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
# Final Ambiguous Author Identity Guard
|
||||
|
||||
Status: **FINAL / FROZEN AFTER EVALUATION**
|
||||
|
||||
Variant: `production_with_semantic_fallback_v1_and_final_identity_guard`
|
||||
|
||||
Feature flag: `ENABLE_AMBIGUOUS_AUTHOR_IDENTITY_GUARD` (demo **enabled**).
|
||||
|
||||
Semantic V1 decision rules were not changed. Production topic-filter internals
|
||||
were not changed. This evaluation was run once; rules were not retuned afterwards.
|
||||
|
||||
## Runtime pipeline
|
||||
|
||||
```text
|
||||
Production KEEP → KEEP
|
||||
|
||||
Production REJECT → Semantic V1
|
||||
Semantic REJECT → REJECT
|
||||
Semantic KEEP
|
||||
unique author → KEEP
|
||||
ambiguous author → robust identity evidence → KEEP, else REJECT
|
||||
```
|
||||
|
||||
## Coauthor rule (frozen before evaluation)
|
||||
|
||||
```text
|
||||
Full-name OA coauthor alone is STRONG: no
|
||||
Context required: yes
|
||||
|
||||
Variant A: >= 2 independently confirmed full-name coauthors
|
||||
Variant B: 1 confirmed coauthor + robust institution
|
||||
Variant C: 1 confirmed coauthor + identity family anchor
|
||||
Variant D: >= 3 shared works, >= 2 distinct years,
|
||||
year window ±8 around the patent year when known,
|
||||
and shared-work institution overlap with assignee or last-known
|
||||
```
|
||||
|
||||
## Candidate metrics
|
||||
|
||||
| Variante | TP | FP | FN | TN | P | R | F1 |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| Production | 32 | 2 | 57 | 40 | 0.941 | 0.360 | 0.520 |
|
||||
| Semantic V1 | 60 | 5 | 29 | 37 | 0.923 | 0.674 | 0.779 |
|
||||
| Guard V1 | 52 | 2 | 37 | 40 | 0.963 | 0.584 | 0.727 |
|
||||
| Guard V2 | 60 | 2 | 29 | 40 | 0.968 | 0.674 | 0.795 |
|
||||
| FINAL | 57 | 2 | 32 | 40 | 0.966 | 0.640 | 0.770 |
|
||||
|
||||
## Family metrics
|
||||
|
||||
| Variante | TP | FP | FN | TN | P | R | F1 |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| Production | 30 | 2 | 37 | 33 | 0.938 | 0.448 | 0.606 |
|
||||
| Semantic V1 | 49 | 5 | 18 | 30 | 0.907 | 0.731 | 0.810 |
|
||||
| Guard V1 | 43 | 2 | 24 | 33 | 0.956 | 0.642 | 0.768 |
|
||||
| Guard V2 | 49 | 2 | 18 | 33 | 0.961 | 0.731 | 0.831 |
|
||||
| FINAL | 47 | 2 | 20 | 33 | 0.959 | 0.701 | 0.810 |
|
||||
|
||||
Unique-name behaviour unchanged: True
|
||||
|
||||
FINAL is more conservative than Guard V2 by design: three gold TPs that V2
|
||||
kept on a single full-name OpenAlex coauthor without extra context are now
|
||||
`identity_reject:coauthor_without_context` (Berroth / Weigel). FP stays 2.
|
||||
No rule was changed after this run.
|
||||
|
||||
## Live cases
|
||||
|
||||
| author | semantic_v1 | guard_v1 | guard_v2 | final |
|
||||
| --- | --- | --- | --- | --- |
|
||||
| Thomas Kaiser A5111380960 | 149 | 22 | 25 | 25 |
|
||||
| Thomas Kaiser A5071644998 | 43 | 3 | 4 | 4 |
|
||||
| Dirk Schadendorf | 6 | 5 | 6 | 6 |
|
||||
| Christian Weber | 13 | 9 | 13 | 11 |
|
||||
| Xiaohong Chen | 31 | 8 | 10 | 8 |
|
||||
| Richard Smith | 19 | 2 | 2 | 2 |
|
||||
|
||||
Live reconstruction follows the Guard V2 dump replay (same patent_map_key
|
||||
behaviour). Published Guard V1/V2 columns are taken from the frozen experiment
|
||||
CSVs; `final` is this run.
|
||||
|
||||
Interpretation (no retuning):
|
||||
|
||||
- Schadendorf stays at 6 (DKFZ case kept via cluster/institution evidence,
|
||||
not a name-only coauthor hit).
|
||||
- Xiaohong Chen returns to 8 (production only): the two V2 coauthor-name
|
||||
additions are gone.
|
||||
- Christian Weber 13 → 11: two coauthor-without-context additions dropped.
|
||||
- Kaiser A5111380960 stays at 25 because three dump rows share a production
|
||||
map key; Production KEEP is never dropped.
|
||||
- Kaiser A5071644998 stays at 4, same as V2, under this dump replay.
|
||||
|
||||
## Semantic-addition reasons (ambiguous authors)
|
||||
|
||||
```text
|
||||
{
|
||||
"identity_reject:name_only": 1,
|
||||
"identity_reject:semantic_only": 2,
|
||||
"identity_keep:multiple_confirmed_coauthors": 17,
|
||||
"identity_keep:coauthor_plus_institution": 1,
|
||||
"identity_reject:coauthor_without_context": 3
|
||||
}
|
||||
```
|
||||
|
||||
## Checks
|
||||
|
||||
```text
|
||||
city-only Lakeside Robotics vs Lakeside University: False (city_only)
|
||||
generic-token Medical Research: False (generic_token)
|
||||
legal-form / country suffix Northwind: True
|
||||
hardcoding audit clean: True
|
||||
Semantic V1 frozen file present: True
|
||||
Gold in runtime: no
|
||||
```
|
||||
|
||||
## Performance
|
||||
|
||||
```text
|
||||
additional_queries: 65
|
||||
cache_hits: 0
|
||||
shared_works_queries: 17
|
||||
coauthor_loads: 24
|
||||
alias_loads: 24
|
||||
wall_clock_seconds: 278.4
|
||||
```
|
||||
|
||||
See `performance.json`.
|
||||
|
||||
## Limitation
|
||||
|
||||
OpenAlex author profiles themselves may contain merge/disambiguation errors.
|
||||
Independent validation remains desirable.
|
||||
|
||||
## Wording
|
||||
|
||||
Die finale Lösung trennt thematische Relevanz von Personenidentität und
|
||||
reduziert dadurch Fehlzuordnungen bei mehrdeutigen Namen deutlich.
|
||||
|
||||
Nicht behauptet: 100 % korrekte Autorenzuordnung, Homonyme vollständig gelöst.
|
||||
|
||||
## Verdict
|
||||
|
||||
```text
|
||||
FINAL_IDENTITY_GUARD_ACCEPTED
|
||||
```
|
||||
+47
@@ -0,0 +1,47 @@
|
||||
# Autor→Patent: finale Disambiguierung
|
||||
|
||||
## Problem
|
||||
|
||||
Strict Topic-ID Matching hat eine hohe Precision, aber einen niedrigen Recall.
|
||||
|
||||
## Semantic Lösung
|
||||
|
||||
Ein Semantic Fallback erhöht den Recall, indem fachlich ähnliche Patente
|
||||
wieder aufgenommen werden, auch ohne exakte Topic-ID.
|
||||
|
||||
## Neues Problem
|
||||
|
||||
Bei häufigen Namen können Homonyme fachlich ähnlich wirken. Semantic Matching
|
||||
prüft Themenähnlichkeit, nicht Personenidentität.
|
||||
|
||||
## Finale Lösung
|
||||
|
||||
Semantic prüft Themenähnlichkeit.
|
||||
Der Identity Guard prüft Personenidentität — nur bei mehrdeutigen Namen und
|
||||
nur für Semantic-Additions. Production KEEP bleibt erhalten.
|
||||
|
||||
## Identity Evidence
|
||||
|
||||
- Institution (ID / ROR / robuster Alias, nicht nur Orts- oder Generictoken)
|
||||
- Personal Identity (spezifischer Name, vom OpenAlex-Profil gestützt)
|
||||
- Patent Family (nur von nicht-semantischer Identity Evidence)
|
||||
- Coauthor plus zusätzlicher Kontext (mehrere Coauthors, Institution oder
|
||||
wiederholte gemeinsame Works)
|
||||
|
||||
Ein bloßer OpenAlex-Coauthor-Name ist allein nicht stark genug.
|
||||
|
||||
## Ergebnis
|
||||
|
||||
Candidate FINAL: TP=57 FP=2 FN=32 TN=40
|
||||
P=0.966 R=0.640 F1=0.770
|
||||
|
||||
Family FINAL: TP=47 FP=2 FN=20 TN=33
|
||||
P=0.959 R=0.701 F1=0.810
|
||||
|
||||
Die finale Lösung trennt thematische Relevanz von Personenidentität und
|
||||
reduziert dadurch Fehlzuordnungen bei mehrdeutigen Namen deutlich.
|
||||
|
||||
## Limitation
|
||||
|
||||
OpenAlex kann selbst gemischte Author-Profile enthalten.
|
||||
Independent validation remains desirable.
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"variant": "production_with_semantic_fallback_v1_and_final_identity_guard",
|
||||
"status": "FINAL / FROZEN AFTER EVALUATION",
|
||||
"created_utc": "20260824T232810Z",
|
||||
"enable_semantic_topic_fallback": true,
|
||||
"enable_ambiguous_author_identity_guard": true,
|
||||
"is_final_identity_guard_enabled": true,
|
||||
"final_source": "C:\\Users\\yvan\\Documents\\AIIS Patente Final\\smartguide\\service\\src\\main\\inse\\patents\\authors\\final_ambiguous_author_identity_guard.py",
|
||||
"diagnosis_sha256": "bff41149298eff42acde2ce3867a541ee64bd2620268e1f593f3a80a2f0cb538",
|
||||
"semantic_decisions_sha256": "1cc3adac579f00cfb12ad3fe8f4294da8812cef1de8ee1ccabf809c2e108c9db",
|
||||
"verdict": "FINAL_IDENTITY_GUARD_ACCEPTED"
|
||||
}
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
variant,tp,fp,fn,tn,precision,recall,f1
|
||||
production,30,2,37,33,0.9375,0.44776119402985076,0.6060606060606061
|
||||
production_with_semantic_fallback_v1,49,5,18,30,0.9074074074074074,0.7313432835820896,0.8099173553719008
|
||||
identity_guard_v1,43,2,24,33,0.9555555555555556,0.6417910447761194,0.7678571428571429
|
||||
identity_guard_v2,49,2,18,33,0.9607843137254902,0.7313432835820896,0.8305084745762712
|
||||
final_identity_guard,47,2,20,33,0.9591836734693877,0.7014925373134329,0.810344827586207
|
||||
|
+132
@@ -0,0 +1,132 @@
|
||||
author_id,author_name,candidate_key,patent_id,source,title,gold,evaluation_field,patent_family_key,author_ambiguous,name_match_type,production_decision,production_reason,semantic_decision,semantic_reason,identity_level,institution_evidence,institution_reason,personal_identity_evidence,coauthor_candidates,confirmed_coauthors,coauthor_context,family_evidence,final_decision,final_reason,temporal_affiliation_status,extra_unattested_given_names,openalex_full_name_count,openalex_coauthor_count
|
||||
A5073666637,Martin Wahl,A5073666637|EPO:01100334.0|EP1130735|20070103|01100334.0,EP1130735,EPO,Circuit arrangement for regulating the transmission power of a battery operated radio device,False,Biology / Biotechnology,EPO:01100334.0,True,full,REJECT,,REJECT,,NONE,False,,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|EPO:01100334.0|EP1130735|20040512|01100334.0,EP1130735,EPO,Circuit arrangement for regulating the transmission power of a battery operated radio device,False,Biology / Biotechnology,EPO:01100334.0,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|EPO:00938548.5|EP1195001|20020410|00938548.5,EP1195001,EPO,METHOD AND DEVICE FOR CORRECTING A CORRUPTED USEFUL SIGNAL,False,Biology / Biotechnology,EPO:00938548.5,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""GRETZER, Ulrich"", ""SCHÖBEL, Ralf""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|EPO:01100334.0|EP1130735|20010905|01100334.0,EP1130735,EPO,Circuit arrangement for regulating the transmission power of a battery operated radio device,False,Biology / Biotechnology,EPO:01100334.0,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|USPTO:15944388|US12150539|20241126|15944388,US12150539,USPTO,Single-bag pack for everyday carry and for travel,False,Biology / Biotechnology,USPTO:15944388,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,NONE,False,no_specific_overlap,False,"[""Charles S Mellen"", ""Charles J Clifford"", ""Lawrence J Lein""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:name_only,unavailable,"[""demian""]",5,194
|
||||
A5073666637,Martin Wahl,A5073666637|USPTO:17494625|US11607029|20230321|17494625,US11607029,USPTO,Luggage systems,False,Biology / Biotechnology,USPTO:17494625,True,initial,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""David S. Logan""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|USPTO:16877824|US11253048|20220222|16877824,US11253048,USPTO,Luggage systems,False,Biology / Biotechnology,USPTO:16877824,True,initial,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""David S. Logan""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|USPTO:16102579|US10694834|20200630|16102579,US10694834,USPTO,Luggage systems,False,Biology / Biotechnology,USPTO:16102579,True,initial,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""David S. Logan""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,194
|
||||
A5073666637,Martin Wahl,A5073666637|USPTO:29516236|USD0775825|20170110|29516236,USD0775825,USPTO,Travel bag,False,Biology / Biotechnology,USPTO:29516236,True,full,REJECT,,REJECT,,NONE,False,,False,"[""Alfred Chehebar""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,"[""demian""]",5,194
|
||||
A5086393240,Clemens Aigner,A5086393240|EPO:04106072.4|EP1569483|20060705|04106072.4,EP1569483,EPO,Method and apparatus for determining the position of a terminal in a cellular mobile network,False,Medicine / Health Sciences,EPO:04106072.4,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Böhm, Peter"", ""Otto, Manfred""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|EPO:04106072.4|EP1569483|20050831|04106072.4,EP1569483,EPO,Method and apparatus for determining the position of a terminal in a cellular mobile network,False,Medicine / Health Sciences,EPO:04106072.4,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Böhm, Peter"", ""Otto, Manfred""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|EPO:04000738.7|EP1555845|20050720|04000738.7,EP1555845,EPO,Method for location determination of subscriber stations of a radio communications system,False,Medicine / Health Sciences,EPO:04000738.7,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Böhm, Peter"", ""Otto, Manfred""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|USPTO:18799079|US12552311|20260217|18799079,US12552311,USPTO,Method for resolution-optimized control of lighting module for motor vehicle light,False,Medicine / Health Sciences,USPTO:18799079,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Erik Haas""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|USPTO:18397838|US12115902|20241015|18397838,US12115902,USPTO,Method for resolution-optimized control of a motor vehicle light module,False,Medicine / Health Sciences,USPTO:18397838,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,NONE,False,generic_token,False,"[""Stefan Miedler"", ""Erik Haas""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:semantic_only,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|USPTO:18397583|US12044378|20240723|18397583,US12044378,USPTO,Method for operation-optimized control of a deflection unit,False,Medicine / Health Sciences,USPTO:18397583,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Erik Haas"", ""Stefan Miedler""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5086393240,Clemens Aigner,A5086393240|USPTO:18397347|US12031691|20240709|18397347,US12031691,USPTO,Light module for motor vehicle light and method for operating such light module,False,Medicine / Health Sciences,USPTO:18397347,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Erik Haas"", ""Stefan Miedler"", ""Jeong Jiyoung"", ""Hyung Joo Kang"", ""Sungdu Kwon""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,326
|
||||
A5023752156,Albert Sickmann,A5023752156|EPO:16727311.9|EP3295177|20181226|16727311.9,EP3295177,EPO,METHOD FOR IDENTIFYING MARKER PROTEINS FOR DIAGNOSIS AND RISK STRATIFICATION OF BLOOD COAGULATION DISORDERS,True,Other,EPO:16727311.9,True,full,REJECT,,REJECT,,NONE,False,,False,"[""BECK, Florian"", ""ZAHEDI, René""]","[""BECK, Florian"", ""ZAHEDI, René""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|EPO:16727311.9|EP3295177|20180321|16727311.9,EP3295177,EPO,METHOD FOR IDENTIFYING MARKER PROTEINS FOR THE DIAGNOSIS AND RISK STRATIFICATION OF BLOOD COAGULATION DISORDERS,True,Other,EPO:16727311.9,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""BECK, Florian"", ""ZAHEDI, René""]","[""BECK, Florian"", ""ZAHEDI, René""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|EPO:15166935.5|EP3091359|20161109|15166935.5,EP3091359,EPO,METHOD FOR IDENTIFYING MARKER PROTEINS FOR DIAGNOSIS AND RISK STRATIFICATION OF BLOOD COAGULATION DISORDERS,True,Other,EPO:15166935.5,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""Zahedi, René"", ""Beck, Florian""]","[""Zahedi, René"", ""Beck, Florian""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|EPO:15180931.6|EP2990787|20170517|15180931.6,EP2990787,EPO,METHOD FOR MEASURING THROMBOCYTE FUNCTION,True,Other,EPO:15180931.6,True,full,REJECT,,REJECT,,NONE,False,,False,"[""West, Jonathan"", ""Janasek, Dirk""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",True,REJECT,not_in_production_or_semantic,unavailable,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|EPO:15180931.6|EP2990787|20160302|15180931.6,EP2990787,EPO,METHOD FOR MEASURING THROMBOCYTE FUNCTION,True,Other,EPO:15180931.6,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""West, Jonathan"", ""Janasek, Dirk""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|USPTO:15572391|US10948496|20210316|15572391,US10948496,USPTO,Method for identifying marker proteins for the diagnosis and risk stratification of blood coagulation disorders,True,Other,USPTO:15572391,True,full,REJECT,,REJECT,,NONE,True,last_known,False,"[""Florian Beck"", ""Rene Zahedi""]","[""Florian Beck"", ""Rene Zahedi""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],7,385
|
||||
A5023752156,Albert Sickmann,A5023752156|USPTO:14835834|US09778248|20171003|14835834,US09778248,USPTO,Method for measurement of thrombocyte function,True,Other,USPTO:14835834,True,full,REJECT,,REJECT,,NONE,False,city_only,False,"[""Jonathan West"", ""Dirk Janasek""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],7,385
|
||||
A5037443412,Krishna Niyogi,A5037443412|EPO:17729973.2|EP3464601|20190410|17729973.2,EP3464601,EPO,TRANSGENIC PLANTS WITH INCREASED PHOTOSYNTHESIS EFFICIENCY AND GROWTH,True,Physics,EPO:17729973.2,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""LONG, Stephen, P."", ""KROMDIJK, Johannes"", ""GLOWACKA, Katarzyna"", ""LEONELLI, Laurie"", ""GABILLY, Stephane, T.""]","[""LONG, Stephen, P."", ""KROMDIJK, Johannes"", ""GABILLY, Stephane, T.""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:18057190|US12529064|20260120|18057190,US12529064,USPTO,Transgenic plants with increased photosynthesis efficiency and growth,True,Physics,USPTO:18057190,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Stephen P. Long"", ""Johannes Kromdijk"", ""Katarzyna Glowacka"", ""Laurie Beth Leonelli"", ""Stephane T. Gabilly""]","[""Stephen P. Long"", ""Johannes Kromdijk"", ""Stephane T. Gabilly""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:16808881|US12054727|20240806|16808881,US12054727,USPTO,Plants with increased water use efficiency,True,Physics,USPTO:16808881,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Stephen P. Long"", ""Katarzyna Glowacka"", ""Johannes Kromdijk"", ""Laurie Beth Leonelli""]","[""Stephen P. Long"", ""Johannes Kromdijk""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:16304633|US11572569|20230207|16304633,US11572569,USPTO,Transgenic plants with increased photosynthesis efficiency and growth,True,Physics,USPTO:16304633,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Stephen P. Long"", ""Johannes Kromdijk"", ""Katarzyna Glowacka"", ""Laurie Leonelli"", ""Stephane T. Gabilly""]","[""Stephen P. Long"", ""Johannes Kromdijk"", ""Stephane T. Gabilly""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:15922763|US11124819|20210921|15922763,US11124819,USPTO,Genes involved in astaxanthin biosynthesis,True,Physics,USPTO:15922763,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Melissa S. Roth"", ""Sean D. Gallaher"", ""Sabeeha Merchant""]","[""Melissa S. Roth"", ""Sean D. Gallaher"", ""Sabeeha Merchant""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:15230332|US10480003|20191119|15230332,US10480003,USPTO,Constructs and systems and methods for engineering a CO2 fixing photorespiratory by-pass pathway,True,Physics,USPTO:15230332,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Cheryl A. Kerfeld"", ""Patrick Shih"", ""Jan Zarzycki""]","[""Cheryl A. Kerfeld"", ""Patrick Shih"", ""Jan Zarzycki""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5037443412,Krishna Niyogi,A5037443412|USPTO:15625798|US10336989|20190702|15625798,US10336989,USPTO,,True,Physics,USPTO:15625798,True,initial,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,no_specific_overlap,False,"[""Zhirong Li"", ""Rachel Dent"", ""Graham Peers""]","[""Rachel Dent"", ""Graham Peers""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,55
|
||||
A5001167896,Martin Glas,A5001167896|EPO:12728260.6|EP2721035|20180613|12728260.6,EP2721035,EPO,GLIOBLASTOMA INHIBITING COMPOUNDS AND THEIR USE,True,Medicine / Health Sciences,EPO:12728260.6,True,full,REJECT,,REJECT,,NONE,False,,False,"[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""GOGOLOK, Sabine"", ""TRAGESER, Daniel"", ""REINARTZ, Roman"", ""WIELAND, Anja""]","[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""GOGOLOK, Sabine"", ""TRAGESER, Daniel"", ""REINARTZ, Roman"", ""WIELAND, Anja""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:13745422.9|EP2879671|20150610|13745422.9,EP2879671,EPO,NICLOSAMIDE AND ITS DERIVATIVES FOR USE IN THE TREATMENT OF SOLID TUMORS,True,Medicine / Health Sciences,EPO:13745422.9,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""SCHEFFLER, Björn""]","[""SCHEFFLER, Björn""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:12728260.6|EP2721035|20140423|12728260.6,EP2721035,EPO,GLIOBLASTOMA INHIBITING COMPOUNDS AND THEIR USE,True,Medicine / Health Sciences,EPO:12728260.6,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""GOGOLOK, Sabine"", ""TRAGESER, Daniel"", ""REINARTZ, Roman"", ""WIELAND, Anja""]","[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""GOGOLOK, Sabine"", ""TRAGESER, Daniel"", ""REINARTZ, Roman"", ""WIELAND, Anja""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:09778433.4|EP2324111|20130703|09778433.4,EP2324111,EPO,"PERIPHERAL ZONE TUMOR CELLS, METHODS FOR THEIR PREPARATION AND USE",True,Medicine / Health Sciences,EPO:09778433.4,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""BRÜSTLE, Oliver"", ""HERRLINGER, Ulrich, Johannes""]","[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""BRÜSTLE, Oliver"", ""HERRLINGER, Ulrich, Johannes""]","{""confirmed_count"": 4, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:10721372.0|EP2424977|20130612|10721372.0,EP2424977,EPO,MICROGLIAL PRECURSOR CELLS FOR THE TREATMENT OF MALIGNANT NEOPLASMS OF THE CENTRAL NERVOUS SYSTEM,True,Medicine / Health Sciences,EPO:10721372.0,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""NEUMANN, Harald"", ""MASGUTOV, Ruslan"", ""HERRLINGER, Ulrich"", ""WELLE, Kristian""]","[""NEUMANN, Harald"", ""HERRLINGER, Ulrich""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:10721372.0|EP2424977|20120307|10721372.0,EP2424977,EPO,MICROGLIAL PRECURSOR CELLS FOR THE TREATMENT OF MALIGNANT NEOPLASMS OF THE CENTRAL NERVOUS SYSTEM,True,Medicine / Health Sciences,EPO:10721372.0,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""NEUMANN, Harald"", ""MASGUTOV, Ruslan"", ""HERRLINGER, Ulrich"", ""WELLE, Kristian""]","[""NEUMANN, Harald"", ""HERRLINGER, Ulrich""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|EPO:09778433.4|EP2324111|20110525|09778433.4,EP2324111,EPO,"PERIPHERAL ZONE TUMOR CELLS, METHODS FOR THEIR PREPARATION AND USE",True,Medicine / Health Sciences,EPO:09778433.4,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""BRÜSTLE, Oliver"", ""HERRLINGER, Ulrich, Johannes""]","[""SCHEFFLER, Björn"", ""SIMON, Matthias"", ""BRÜSTLE, Oliver"", ""HERRLINGER, Ulrich, Johannes""]","{""confirmed_count"": 4, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|USPTO:14420164|US09844522|20171219|14420164,US09844522,USPTO,Niclosamide and its derivatives for use in the treatment of solid tumors,True,Medicine / Health Sciences,USPTO:14420164,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""Björn Scheffler"", ""Anja Wieland""]","[""Björn Scheffler"", ""Anja Wieland""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|USPTO:14126512|US09573960|20170221|14126512,US09573960,USPTO,Glioblastoma inhibiting compounds and their use,True,Medicine / Health Sciences,USPTO:14126512,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""Björn Scheffler"", ""Matthias Simon"", ""Sabine Gogolok"", ""Daniel Trageser"", ""Roman Reinartz"", ""Anja Wieland""]","[""Björn Scheffler"", ""Matthias Simon"", ""Sabine Gogolok"", ""Daniel Trageser"", ""Roman Reinartz"", ""Anja Wieland""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],6,813
|
||||
A5001167896,Martin Glas,A5001167896|USPTO:12867442|US09103819|20150811|12867442,US09103819,USPTO,"Peripheral zone tumor cells, methods for their preparation and use",True,Medicine / Health Sciences,USPTO:12867442,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""Björn Scheffler"", ""Matthias Simon"", ""Oliver Brüstle"", ""Ulrich Johannes Herrlinger""]","[""Björn Scheffler"", ""Matthias Simon"", ""Oliver Brüstle"", ""Ulrich Johannes Herrlinger""]","{""confirmed_count"": 4, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],6,813
|
||||
A5011059806,James Fulcher,A5011059806|EPO:20729116.2|EP3980057|20220413|20729116.2,EP3980057,EPO,"METHODS OF PRODUCING SHIGA TOXIN B-SUBUNIT (STXB) MONOMERS AND OLIGOMERS, AND USES THEREOF",True,Physics,EPO:20729116.2,True,initial,REJECT,,REJECT,,NONE,True,historical_temporal_plausible,False,"[""BILLET, Anne"", ""SCHMIDT, Frédéric"", ""JOHANNES, Ludger"", ""SERVENT, Denis"", ""MOURIER, Gilles"", ""TARTOUR, Éric"", ""KAY, Michael""]","[""KAY, Michael""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],8,57
|
||||
A5011059806,James Fulcher,A5011059806|EPO:86305385|EP0212835|19880210|86305385,EP0212835,EPO,Flexible bulk containers,False,Physics,EPO:86305385,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,"[""edward""]",8,57
|
||||
A5011059806,James Fulcher,A5011059806|EPO:86305385.6|EP0212835|19870304|86305385.6,EP0212835,EPO,Flexible bulk containers,False,Physics,EPO:86305385.6,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,"[""edward""]",8,57
|
||||
A5011059806,James Fulcher,A5011059806|USPTO:17954834|US12629681|20260519|17954834,US12629681,USPTO,Apparatuses and methods for performing multiple omics analysis and processing analyte mixtures,True,Physics,USPTO:17954834,True,initial,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Ying Zhu"", ""Lye Meng Markillie"", ""Ljiljana Paša-Tolić""]","[""Ying Zhu"", ""Lye Meng Markillie""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],8,57
|
||||
A5011059806,James Fulcher,A5011059806|USPTO:17616512|US12527854|20260120|17616512,US12527854,USPTO,"Methods of producing Shiga toxin B-subunit (STxB) monomers and oligomers, and uses thereof",True,Physics,USPTO:17616512,True,initial,REJECT,,REJECT,,NONE,False,historical,False,"[""Anne Billet"", ""Frédéric Schmidt"", ""Ludger Johannes"", ""Denis Servent"", ""Gilles Mourier"", ""Éric Tartour"", ""Michael Kay""]","[""Michael Kay""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],8,57
|
||||
A5035127271,Mark Obermann,A5035127271|EPO:96928055.0|EP0797868|19971001|96928055.0,EP0797868,EPO,AMPLIFIER CIRCUIT FOR RF SYSTEM,True,Other,EPO:96928055.0,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""EVERLINE, Paul""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,187
|
||||
A5035127271,Mark Obermann,A5035127271|EPO:97921176.0|EP0904633|20061018|97921176.0,EP0904633,EPO,POWER DELIVERY SYSTEM AND METHOD OF CONTROLLING THE POWER DELIVERY SYSTEM FOR USE IN A RADIO FREQUENCY SYSTEM,True,Other,EPO:97921176.0,True,initial,REJECT,,REJECT,,NONE,False,,False,"[""LEFFEL, Michael, David"", ""LOUIS, Edward, Vincent"", ""MILLER, Douglas, Edward"", ""AVICOLA, Timothy, Mark""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,187
|
||||
A5035127271,Mark Obermann,A5035127271|EPO:97921176.0|EP0904633|19990331|97921176.0,EP0904633,EPO,POWER DELIVERY SYSTEM AND METHOD OF CONTROLLING THE POWER DELIVERY SYSTEM FOR USE IN A RADIO FREQUENCY SYSTEM,True,Other,EPO:97921176.0,True,initial,REJECT,,REJECT,,NONE,False,generic_token,False,"[""LEFFEL, Michael, David"", ""LOUIS, Edward, Vincent"", ""MILLER, Douglas, Edward"", ""AVICOLA, Timothy, Mark""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,187
|
||||
A5035127271,Mark Obermann,A5035127271|EPO:92902923.9|EP0515662|19960828|92902923.9,EP0515662,EPO,FEED FORWARD DISTORTION MINIMIZATION CIRCUIT,True,Other,EPO:92902923.9,True,initial,REJECT,,REJECT,,NONE,False,,False,"[""LONG, James, F.""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,187
|
||||
A5035127271,Mark Obermann,A5035127271|EPO:92902923.0|EP0515662|19921202|92902923.0,EP0515662,EPO,FEED FORWARD DISTORTION MINIMIZATION CIRCUIT,True,Other,EPO:92902923.0,True,initial,REJECT,,REJECT,,NONE,False,generic_token,False,"[""LONG, James, F.""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,187
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:07818638.4|EP2102357|20131127|07818638.4,EP2102357,EPO,"LTBP2 AS A BIOMARKER, THERAPEUTIC AND DIAGNOSTIC TARGET",True,Engineering,EPO:07818638.4,True,full,REJECT,,REJECT,,NONE,False,,False,"[""GOLZ, Stefan"", ""SUMMER, Holger"", ""GEERTS, Andreas"", ""BRÜGGEMEIER, Ulf"", ""ALBRECHT-KÜPPER, Barbara"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""D'URSO, Donatella"", ""SEEWALD, Michael""]","[""GOLZ, Stefan"", ""SUMMER, Holger"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""SEEWALD, Michael""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,2023
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:07818669.9|EP2074429|20120404|07818669.9,EP2074429,EPO,"CTGF AS A BIOMARKER, THERAPEUTIC AND DIAGNOSTIC TARGET",True,Engineering,EPO:07818669.9,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""GOLZ, Stefan"", ""SUMMER, Holger"", ""GEERTS, Andreas"", ""BRÜGGEMEIER, Ulf"", ""ALBRECHT-KÜPPER, Barbara"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""D'URSO, Donatella"", ""SEEWALD, Michael""]","[""GOLZ, Stefan"", ""SUMMER, Holger"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""SEEWALD, Michael""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],3,2023
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:08734838.9|EP2134859|20091223|08734838.9,EP2134859,EPO,TIMP-4 AS A BIOMARKER FOR THE DIAGNOSIS OF CARDIAC INSUFFICIENCY,True,Engineering,EPO:08734838.9,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,True,historical_temporal_plausible,False,"[""KRAMER, Frank""]","[""KRAMER, Frank""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:coauthor_plus_institution,plausible,[],3,2023
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:07818638.4|EP2102357|20090923|07818638.4,EP2102357,EPO,"LTBP2 AS A BIOMARKER, THERAPEUTIC AND DIAGNOSTIC TARGET",True,Engineering,EPO:07818638.4,True,full,REJECT,,REJECT,,NONE,True,historical_temporal_plausible,False,"[""GOLZ, Stefan"", ""SUMMER, Holger"", ""GEERTS, Andreas"", ""BRÜGGEMEIER, Ulf"", ""ALBRECHT-KÜPPER, Barbara"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""D'URSO, Donatella"", ""SEEWALD, Michael""]","[""GOLZ, Stefan"", ""SUMMER, Holger"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""SEEWALD, Michael""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],3,2023
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:07818642.6|EP2087359|20090812|07818642.6,EP2087359,EPO,"PRSS23 AS A BIOMARKER, THERAPEUTIC AND DIAGNOSTIC TARGET",True,Engineering,EPO:07818642.6,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,True,historical_temporal_plausible,False,"[""GOLZ, Stefan"", ""SUMMER, Holger"", ""GEERTS, Andreas"", ""BRÜGGEMEIER, Ulf"", ""ALBRECHT-KÜPPER, Barbara"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""D'URSO, Donatella"", ""SEEWALD, Michael""]","[""GOLZ, Stefan"", ""SUMMER, Holger"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""SEEWALD, Michael""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,plausible,[],3,2023
|
||||
A5054895539,Hendrik Milting,A5054895539|EPO:07818669.9|EP2074429|20090701|07818669.9,EP2074429,EPO,"CTGF AS A BIOMARKER, THERAPEUTIC AND DIAGNOSTIC TARGET",True,Engineering,EPO:07818669.9,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,True,historical_temporal_plausible,False,"[""GOLZ, Stefan"", ""SUMMER, Holger"", ""GEERTS, Andreas"", ""BRÜGGEMEIER, Ulf"", ""ALBRECHT-KÜPPER, Barbara"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""D'URSO, Donatella"", ""SEEWALD, Michael""]","[""GOLZ, Stefan"", ""SUMMER, Holger"", ""KLEIN, Martina"", ""STEPPAN, Sonja"", ""ELLINGHAUS, Peter"", ""SEEWALD, Michael""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,plausible,[],3,2023
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:10009390.5|EP2284749|20150603|10009390.5,EP2284749,EPO,"Method, computer program and device for executing actions using data sets",False,Medicine / Health Sciences,EPO:10009390.5,True,full,REJECT,,REJECT,,NONE,False,,False,"[""Karthikeyan, A."", ""Kacker Himanshu"", ""Marar Mohan"", ""Boruah Jayanta"", ""Gentes Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:04009852.7|EP1591916|20131106|04009852.7,EP1591916,EPO,"Method, computer program and device for deleting data sets contained in a table system",False,Medicine / Health Sciences,EPO:04009852.7,True,full,REJECT,,REJECT,,NONE,False,,False,"[""Karthikeyan, A."", ""Kacker, Himanshu"", ""Marar, Mohan"", ""Boruah, Jayanta"", ""Gentes, Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:10009390.5|EP2284749|20110216|10009390.5,EP2284749,EPO,"Method, computer program and device for executing actions using data sets",False,Medicine / Health Sciences,EPO:10009390.5,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Karthikeyan, A."", ""Kacker Himanshu"", ""Marar Mohan"", ""Boruah Jayanta"", ""Gentes Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:04009849.3|EP1591914|20051102|04009849.3,EP1591914,EPO,"Method, computer program product and device for importing a plurality of data sets into a system",False,Medicine / Health Sciences,EPO:04009849.3,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Karthikeyan, A."", ""Kacker, Himanshu"", ""Marar, Mohan"", ""Boruah, Jayanta"", ""Gentes, Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:04009852.7|EP1591916|20051102|04009852.7,EP1591916,EPO,"Method, computer program and device for deleting data sets contained in a table system",False,Medicine / Health Sciences,EPO:04009852.7,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Karthikeyan, A."", ""Kacker, Himanshu"", ""Marar, Mohan"", ""Boruah, Jayanta"", ""Gentes, Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:04009850.1|EP1591915|20051102|04009850.1,EP1591915,EPO,"Method, computer program product and computer device for processing data",False,Medicine / Health Sciences,EPO:04009850.1,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Karthikeyan, A."", ""Kacker, Himanshu"", ""Marar, Mohan"", ""Boruah, Jayanta"", ""Gentes, Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:04009851.9|EP1591861|20051102|04009851.9,EP1591861,EPO,"Method, computer program and device for executing actions using data sets",False,Medicine / Health Sciences,EPO:04009851.9,True,full,REJECT,,REJECT,,NONE,False,generic_token,False,"[""Karthikeyan, A."", ""Kacker, Himanshu"", ""Marar, Mohan"", ""Boruah, Jayanta"", ""Gentes, Wolfgang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:80104981.8|EP0026830|19830427|80104981.8,EP0026830,EPO,"Machine for applying staples to the edge of a jacquard cards tape, and staple for use in this machine",False,Medicine / Health Sciences,EPO:80104981.8,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Giger, Walter""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5109170577,Jörg Steinmann,A5109170577|EPO:80104981.8|EP0026830|19810415|80104981.8,EP0026830,EPO,"Machine for applying staples to the edge of a jacquard cards tape, and staple for use in this machine",False,Medicine / Health Sciences,EPO:80104981.8,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Giger, Walter""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,454
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:12006205.4|EP2703858|20170201|12006205.4,EP2703858,EPO,High-efficient CMOS-compatible grating couplers with backside metal mirror,True,Physics,EPO:12006205.4,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""Sfar Zaoui, Wissem"", ""Butschke, Jörg"", ""Letzkus, Florian""]","[""Sfar Zaoui, Wissem"", ""Butschke, Jörg"", ""Letzkus, Florian""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:12006205.4|EP2703858|20140305|12006205.4,EP2703858,EPO,High-efficient CMOS-compatible grating couplers with backside metal mirror,True,Physics,EPO:12006205.4,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""Sfar Zaoui, Wissem"", ""Butschke, Jörg"", ""Letzkus, Florian""]","[""Sfar Zaoui, Wissem"", ""Butschke, Jörg"", ""Letzkus, Florian""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:06792091.8|EP1941311|20130501|06792091.8,EP1941311,EPO,METAMATERIAL HAVING THE CAPABILITY OF BROADBAND LEFT-HANDED GUIDANCE OF ELECTROMAGNETIC WAVES,True,Physics,EPO:06792091.8,True,full,REJECT,,REJECT,,NONE,False,,False,"[""SCHWEIZER, Heinz"", ""GRÄBELDINGER, Hedwig"", ""GIESSEN, Harald"", ""RUMBERG, Axel"", ""FU, Liwei""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",True,REJECT,not_in_production_or_semantic,unavailable,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:06792091.8|EP1941311|20080709|06792091.8,EP1941311,EPO,METAMATERIAL HAVING THE CAPABILITY OF BROADBAND LEFT-HANDED GUIDANCE OF ELECTROMAGNETIC WAVES,True,Physics,EPO:06792091.8,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""SCHWEIZER, Heinz"", ""GRÄBELDINGER, Hedwig"", ""GIESSEN, Harald"", ""RUMBERG, Axel"", ""FU, Liwei""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:05808222.3|EP1815593|20070808|05808222.3,EP1815593,EPO,POWER AMPLIFIER FOR AMPLIFYING HIGH-FREQUENCY (H.F.) SIGNALS,True,Physics,EPO:05808222.3,True,full,KEEP,strict_topic_match,REJECT,,STRONG,True,last_known,False,"[""WU, Lei""]","[""WU, Lei""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,plausible,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:94926093.9|EP0728391|19980729|94926093.9,EP0728391,EPO,CLOCK-RECOVERY CIRCUIT,True,Physics,EPO:94926093.9,True,full,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,,False,"[""WANG, Zhigong""]","[""WANG, Zhigong""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:94926093.0|EP0728391|19960828|94926093.0,EP0728391,EPO,CLOCK-RECOVERY CIRCUIT,True,Physics,EPO:94926093.0,True,full,KEEP,strict_topic_match,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""WANG, Zhigong""]","[""WANG, Zhigong""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,plausible,[],2,174
|
||||
A5008182166,Manfred Berroth,A5008182166|EPO:02360172.7|EP1372024|20031217|02360172.7,EP1372024,EPO,Liquid crystal optical phase modulator,True,Physics,EPO:02360172.7,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,CANDIDATE,False,no_specific_overlap,False,"[""Wessel, Dr. Rudolf"", ""Bülow, Dr. Henning"", ""Pfeiffer, Dr. Thomas""]","[""Bülow, Dr. Henning""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:coauthor_without_context,unavailable,[],2,174
|
||||
A5031103932,Sebastian Schlücker,A5031103932|EPO:18710845.1|EP3593137|20200115|18710845.1,EP3593137,EPO,EFFICIENT LIGAND EXCHANGE OF A DETERGENT BILAYER ON THE SURFACE OF METAL NANOPARTICLES FOR MOLECULAR FUNCTIONALIZATION AND ASSEMBLY,True,Chemistry,EPO:18710845.1,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,last_known,False,"[""KÖNIG, Matthias"", ""YOON, Jun Hee"", ""SELBACH, Florian""]","[""KÖNIG, Matthias"", ""YOON, Jun Hee"", ""SELBACH, Florian""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],4,322
|
||||
A5031103932,Sebastian Schlücker,A5031103932|EPO:08802574.7|EP2193374|20131023|08802574.7,EP2193374,EPO,MARKERS FOR SURFACE-ENHANCED RAMAN SCATTERING,True,Chemistry,EPO:08802574.7,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""KÜSTNER, Bernd"", ""SCHMUCK, Carsten""]","[""KÜSTNER, Bernd"", ""SCHMUCK, Carsten""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],4,322
|
||||
A5031103932,Sebastian Schlücker,A5031103932|EPO:08802574.7|EP2193374|20100609|08802574.7,EP2193374,EPO,COMPOUNDS AND MARKERS FOR SURFACE-ENHANCED RAMAN SCATTERING,True,Chemistry,EPO:08802574.7,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""KÜSTNER, Bernd"", ""SCHMUCK, Carsten""]","[""KÜSTNER, Bernd"", ""SCHMUCK, Carsten""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],4,322
|
||||
A5031103932,Sebastian Schlücker,A5031103932|EPO:07018757.0|EP2040075|20090325|07018757.0,EP2040075,EPO,Compounds and markers for surface-enhanced raman scattering,True,Chemistry,EPO:07018757.0,True,full,KEEP,historical_institution+confirmed_co_inventors,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""Küstner, Bernd"", ""Schmuck, Carsten""]","[""Küstner, Bernd"", ""Schmuck, Carsten""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,historical_institution+confirmed_co_inventors,plausible,[],4,322
|
||||
A5031103932,Sebastian Schlücker,A5031103932|USPTO:12679571|US08854617|20141007|12679571,US08854617,USPTO,Compounds and markers for surface-enhanced Raman scattering,True,Chemistry,USPTO:12679571,True,full,KEEP,strict_topic_match,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""Bernd Küstner"", ""Carsten Schmuck""]","[""Bernd Küstner"", ""Carsten Schmuck""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,plausible,[],4,322
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|EPO:12783811.8|EP2773458|20201223|12783811.8,EP2773458,EPO,CATALYTIC MEMBRANES AND APPLICATIONS THEREOF,True,Biology / Biotechnology,EPO:12783811.8,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,,False,"[""QIAN, Xianghong"", ""ULBRICHT, Mathias"", ""YANG, Qian""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,"[""sumith""]",5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|EPO:12783811.8|EP2773458|20140910|12783811.8,EP2773458,EPO,CATALYTIC MEMBRANES AND APPLICATIONS THEREOF,True,Biology / Biotechnology,EPO:12783811.8,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,city_only,False,"[""QIAN, Xianghong"", ""ULBRICHT, Mathias"", ""YANG, Qian""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,"[""sumith""]",5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|EPO:96936859.0|EP0874683|19981104|96936859.0,EP0874683,EPO,EXTRA-LUMENAL CROSSFLOW PLASMAPHERESIS DEVICES,True,Biology / Biotechnology,EPO:96936859.0,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,no_specific_overlap,False,"[""KESSLER, Stephen""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,"[""sumith""]",5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|USPTO:17342089|US11628408|20230418|17342089,US11628408,USPTO,Bilayer electrospun membranes for treating fracking wastewater via membrane distillation,True,Biology / Biotechnology,USPTO:17342089,True,initial,KEEP,strict_topic_match,REJECT,,STRONG,False,city_only,False,"[""Jorge Almodovar"", ""Yu-Hsuan Chiao"", ""David Alfonso Castilla-Casadiego""]","[""Jorge Almodovar"", ""Yu-Hsuan Chiao"", ""David Alfonso Castilla-Casadiego""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,[],5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|USPTO:15568672|US11028062|20210608|15568672,US11028062,USPTO,Catalytic hydrolysis and dehydration of saccharides,True,Biology / Biotechnology,USPTO:15568672,True,initial,REJECT,,REJECT,,NONE,False,city_only,False,"[""Xianghong Qian""]","[""Xianghong Qian""]","{""confirmed_count"": 1, ""shared_work_count"": 90, ""distinct_years"": [2002, 2005, 2009, 2010, 2012, 2013, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024, 2025], ""unique_institutions"": 32}",True,REJECT,not_in_production_or_semantic,unavailable,[],5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|USPTO:15155822|US10118168|20181106|15155822,US10118168,USPTO,Catalytic membranes and applications thereof,True,Biology / Biotechnology,USPTO:15155822,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,city_only,False,"[""Xianghong Qian"", ""Mathias Ulbricht"", ""Qian Yang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,"[""sumith""]",5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|USPTO:14355364|US09339803|20160517|14355364,US09339803,USPTO,Catalytic membranes and applications thereof,True,Biology / Biotechnology,USPTO:14355364,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,True,historical_temporal_plausible,False,"[""Xianghong Qian"", ""Mathias Ulbricht"", ""Qian Yang""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,plausible,"[""sumith""]",5,143
|
||||
A5027988292,S. Ranil Wickramasinghe,A5027988292|USPTO:13570003|US09132389|20150915|13570003,US09132389,USPTO,Magnetically responsive membranes,True,Biology / Biotechnology,USPTO:13570003,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,True,historical_temporal_plausible,False,"[""Xianghong Qian"", ""Heath H. Himstedt"", ""Mathias Ulbricht"", ""Michael J. Semmens""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,plausible,"[""sumith""]",5,143
|
||||
A5070760948,Robert Weigel,A5070760948|EPO:03720131.6|EP1488508|20050713|03720131.6,EP1488508,EPO,TWO-POINT MODULATOR ASSEMBLY,True,Engineering,EPO:03720131.6,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,CANDIDATE,False,,False,"[""HERZINGER, Stefan"", ""MÄRZINGER, Günter"", ""NEURAUTER, Burkhard""]","[""HERZINGER, Stefan""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:coauthor_without_context,unavailable,[],16,198
|
||||
A5070760948,Robert Weigel,A5070760948|EPO:03720131.6|EP1488508|20041222|03720131.6,EP1488508,EPO,TWO-POINT MODULATOR ASSEMBLY,True,Engineering,EPO:03720131.6,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,CANDIDATE,False,historical,False,"[""HERZINGER, Stefan"", ""MÄRZINGER, Günter"", ""NEURAUTER, Burkhard""]","[""HERZINGER, Stefan""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:coauthor_without_context,implausible,[],16,198
|
||||
A5070760948,Robert Weigel,A5070760948|EPO:97915269.1|EP0878064|20000503|97915269.1,EP0878064,EPO,CODE-MODULATED TRANSMISSION PROCESS AND TRANSMISSION SYSTEM OPERATING ACCORDING THERETO,True,Engineering,EPO:97915269.1,True,full,REJECT,,REJECT,,NONE,False,,False,"[""ZHANG, Zhongping"", ""SEIFERT, Franz""]","[""ZHANG, Zhongping""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],16,198
|
||||
A5070760948,Robert Weigel,A5070760948|EPO:97915269.0|EP0878064|19981118|97915269.0,EP0878064,EPO,CODE-MODULATED TRANSMISSION PROCESS AND TRANSMISSION SYSTEM OPERATING ACCORDING THERETO,True,Engineering,EPO:97915269.0,True,full,REJECT,,REJECT,,NONE,False,historical,False,"[""ZHANG, Zhongping"", ""SEIFERT, Franz""]","[""ZHANG, Zhongping""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],16,198
|
||||
A5070760948,Robert Weigel,A5070760948|USPTO:16551366|US11260242|20220301|16551366,US11260242,USPTO,Systems and methods for use in treating sensory impairment,False,Engineering,USPTO:16551366,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,no_specific_overlap,False,"[""Timothy Kelm"", ""Philip S. Walter"", ""Joshua Reed""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,[],16,198
|
||||
A5070760948,Robert Weigel,A5070760948|USPTO:14008265|US10391331|20190827|14008265,US10391331,USPTO,Systems and methods for use in treating sensory impairment,False,Engineering,USPTO:14008265,True,initial,KEEP,strict_topic_match,REJECT,,skipped_production_keep,False,no_specific_overlap,False,"[""Timothy Kelm"", ""Philip S. Walter"", ""Joshua Reed""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,[],16,198
|
||||
A5113541511,Roland Boese,A5113541511|EPO:12799022.4|EP2771312|20170531|12799022.4,EP2771312,EPO,AGOMELATINE-UREA COMPLEX AND CRYSTALLINE FORMS THEREOF,True,Chemistry,EPO:12799022.4,False,full,KEEP,strict_topic_match,REJECT,,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:12799022.4|EP2771312|20140903|12799022.4,EP2771312,EPO,AGOMELATINE-UREA COMPLEX AND CRYSTALLINE FORMS THEREOF,True,Chemistry,EPO:12799022.4,False,full,KEEP,strict_topic_match,REJECT,,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:09717772.9|EP2247585|20140430|09717772.9,EP2247585,EPO,"CRYSTAL FORMS OF N-[2-(DIETHYLAMINO)ETHYL]-5-[(5-FLUORO-1,2-DIHYDRO-2-OXO-3H-INDOL-3-YLIDENE)METHYL]-2,4-DIMETHYL-1H-PYRROLE-3-CARBOXAMIDE AND METHODS FOR THEIR PREPARATION",True,Chemistry,EPO:09717772.9,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:13158832.9|EP2604603|20130619|13158832.9,EP2604603,EPO,"Crystal forms of N-[2-(diethylamino)ethyl]-5-[(5-fluoro-1,2-dihydro-2-oxo-3H-indol-3-ylidene)methyl]-2,4-dimethyl-1H-pyrrole-3-carboxamide and methods for their preparation",True,Chemistry,EPO:13158832.9,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:09717772.9|EP2247585|20101110|09717772.9,EP2247585,EPO,"CRYSTAL FORMS OF N-Ý2-(DIETHYLAMINO)ETHYL¨-5-Ý(5-FLUORO-1,2-DIHYDRO-2-OXO-3H-INDOL-3-YLIDENE)METHYL¨-2,4-DIMETHYL-1H-PYRROLE-3-CARBOXAMIDE AND METHODS FOR THEIR PREPARATION",True,Chemistry,EPO:09717772.9,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:08008254.8|EP2128160|20100714|08008254.8,EP2128160,EPO,"Indolo[2,3-b]-, Indeno[1,2-b]- and Indeno[2,1-b]pyrido[2,3-f] quinoxaline-3-carboxylic acids and esters, processes for their preparation and their use as antiviral, antibiotic and antitumor agents",True,Chemistry,EPO:08008254.8,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:08008254.8|EP2128160|20091202|08008254.8,EP2128160,EPO,"Indolo[2,3-b]-, Indeno[1,2-b]- and Indeno[2,1-b]pyrido[2,3-f] quinoxaline-3-carboxylic acids and esters, processes for their preparation and their use as antiviral, antibiotic and antitumor agents",True,Chemistry,EPO:08008254.8,False,full,KEEP,historical_institution,REJECT,,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:08004143.7|EP2098521|20090909|08004143.7,EP2098521,EPO,"Crystal forms of N-[2-(diethylamino) ethyl]-5-[fluoro-1,2-dihydro-2-oxo-3H-indol-3-ylidene)methyl]-2,4-dimethyl-1H-pyrolle-3-carboxamide and methods for their prepparation",True,Chemistry,EPO:08004143.7,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:84110796|EP0153989|19860205|84110796,EP0153989,EPO,Sample holder for a powder diffractometer,True,Chemistry,EPO:84110796,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5113541511,Roland Boese,A5113541511|EPO:84110796.4|EP0153989|19850911|84110796.4,EP0153989,EPO,Sample holder for a powder diffractometer,True,Chemistry,EPO:84110796.4,False,full,REJECT,,KEEP,semantic_topic_fallback_v1,skipped_unique_name,False,,False,[],[],{},False,KEEP,unique_name_unchanged,unavailable,[],1,209
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:13818713.3|EP2932264|20190130|13818713.3,EP2932264,EPO,NOVEL MHC-INDEPENDENT TUMOR-ASSOCIATED ANTIGENS,True,Medicine / Health Sciences,EPO:13818713.3,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,False,,False,"[""PASCHEN, Anette"", ""LÜBCKE, Silke"", ""FATHO, Martina"", ""EBERTS, Daniela"", ""ECHCHANNAOUI, Hakim"", ""LENNERZ, Volker"", ""WÖLFEL, Catherine"", ""WÖLFEL, Thomas""]","[""LÜBCKE, Silke"", ""FATHO, Martina"", ""LENNERZ, Volker"", ""WÖLFEL, Catherine"", ""WÖLFEL, Thomas""]","{""confirmed_count"": 5, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,unavailable,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:13818713.3|EP2932264|20151021|13818713.3,EP2932264,EPO,NOVEL MHC-INDEPENDENT TUMOR-ASSOCIATED ANTIGENS,True,Medicine / Health Sciences,EPO:13818713.3,True,full,KEEP,last_known_institution,REJECT,,STRONG,True,historical_temporal_plausible,False,"[""PASCHEN, Anette"", ""LÜBCKE, Silke"", ""FATHO, Martina"", ""EBERTS, Daniela"", ""ECHCHANNAOUI, Hakim"", ""LENNERZ, Volker"", ""WÖLFEL, Catherine"", ""WÖLFEL, Thomas""]","[""LÜBCKE, Silke"", ""FATHO, Martina"", ""LENNERZ, Volker"", ""WÖLFEL, Catherine"", ""WÖLFEL, Thomas""]","{""confirmed_count"": 5, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,last_known_institution,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:00983011.8|EP1230265|20070613|00983011.8,EP1230265,EPO,CTAGE GENE FAMILY,True,Medicine / Health Sciences,EPO:00983011.8,True,full,REJECT,,REJECT,,NONE,False,,False,"[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:04000772.6|EP1555271|20050720|04000772.6,EP1555271,EPO,Peptides useful for diagnosis and therapy of TRP-2+ and/or TRP-1+ tumors,True,Medicine / Health Sciences,EPO:04000772.6,True,full,REJECT,,REJECT,,NONE,True,historical_temporal_plausible,False,"[""Paschen, Annette"", ""Kropshofer, Harald""]","[""Paschen, Annette"", ""Kropshofer, Harald""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:02012705.6|EP1369482|20031210|02012705.6,EP1369482,EPO,Target genes for the diagnosis and treatment of cancer,True,Medicine / Health Sciences,EPO:02012705.6,True,full,REJECT,,REJECT,,NONE,True,historical_temporal_plausible,False,"[""Wittig, Rainer"", ""Poustka, Annemarie"", ""Mollenhauer, Jan""]","[""Poustka, Annemarie"", ""Mollenhauer, Jan""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:01993706.9|EP1349871|20031008|01993706.9,EP1349871,EPO,NOVEL MARKER FOR THE DIAGNOSIS AND THERAPY OF TUMOURS,True,Medicine / Health Sciences,EPO:01993706.9,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,True,historical_temporal_plausible,False,"[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:00983011.8|EP1230265|20020814|00983011.8,EP1230265,EPO,CTAGE GENE FAMILY,True,Medicine / Health Sciences,EPO:00983011.8,True,full,REJECT,,REJECT,,NONE,True,historical_temporal_plausible,False,"[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","[""EICHMÜLLER, Stefan"", ""USENER, Dirk""]","{""confirmed_count"": 2, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|EPO:00983012.6|EP1228224|20020807|00983012.6,EP1228224,EPO,RECOMBINANT ATTENUATED LISTERIAS FOR IMMUNOTHERAPY,True,Medicine / Health Sciences,EPO:00983012.6,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,STRONG,True,historical_temporal_plausible,False,"[""PASCHEN, Annette"", ""CHAKRABORTY, Trinad"", ""DOMANN, Eugen""]","[""PASCHEN, Annette"", ""CHAKRABORTY, Trinad"", ""DOMANN, Eugen""]","{""confirmed_count"": 3, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,identity_keep:multiple_confirmed_coauthors,plausible,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|USPTO:15826879|US10987413|20210427|15826879,US10987413,USPTO,MHC-independent tumor-associated antigens,True,Medicine / Health Sciences,USPTO:15826879,True,full,KEEP,strict_topic_match,REJECT,,STRONG,False,generic_token,False,"[""Annette Paschen"", ""Silke Lübcke"", ""Martina Fatho"", ""Daniela Eberts"", ""Hakim Echchannaoui"", ""Volker Lennerz"", ""Catherine Woelfel"", ""Thomas Woelfel""]","[""Annette Paschen"", ""Silke Lübcke"", ""Martina Fatho"", ""Volker Lennerz"", ""Catherine Woelfel"", ""Thomas Woelfel""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,unavailable,[],26,656
|
||||
A5034365278,Dirk Schadendorf,A5034365278|USPTO:14648703|US09861688|20180109|14648703,US09861688,USPTO,T cell receptors with MHC independent binding to GM-CSF receptor alpha chain,True,Medicine / Health Sciences,USPTO:14648703,True,full,KEEP,strict_topic_match,REJECT,,STRONG,False,historical,False,"[""Annette Paschen"", ""Silke Luebcke"", ""Martina Fatho"", ""Daniela Eberts"", ""Hakim Echchannaoui"", ""Volker Lennerz"", ""Catherine Woelfel"", ""Thomas Woelfel""]","[""Annette Paschen"", ""Silke Luebcke"", ""Martina Fatho"", ""Volker Lennerz"", ""Catherine Woelfel"", ""Thomas Woelfel""]","{""confirmed_count"": 6, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,KEEP,strict_topic_match,implausible,[],26,656
|
||||
A5005196385,Matthew Monroe,A5005196385|EPO:17820949.0|EP3479405|20190508|17820949.0,EP3479405,EPO,PACKAGE-ON-PACKAGE SEMICONDUCTOR DEVICE ASSEMBLIES INCLUDING ONE OR MORE WINDOWS AND RELATED METHODS AND PACKAGES,False,Physics,EPO:17820949.0,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:17738460|US12040279|20240716|17738460,US12040279,USPTO,Through-core via,False,Physics,USPTO:17738460,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,plausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:16830693|US11328997|20220510|16830693,US11328997,USPTO,Through-core via,False,Physics,USPTO:16830693,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:16162070|US10777530|20200915|16162070,US10777530,USPTO,Package-on-package semiconductor device assemblies including one or more windows and related methods and packages,False,Physics,USPTO:16162070,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:15946139|US10629536|20200421|15946139,US10629536,USPTO,Through-core via,False,Physics,USPTO:15946139,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:15238382|US10121766|20181106|15238382,US10121766,USPTO,Package-on-package semiconductor device assemblies including one or more windows and related methods and packages,False,Physics,USPTO:15238382,True,full,REJECT,,REJECT,,NONE,True,last_known,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,implausible,[],2,58
|
||||
A5005196385,Matthew Monroe,A5005196385|USPTO:29546089|USD0794140|20170808|29546089,USD0794140,USPTO,Head for a toy,False,Physics,USPTO:29546089,True,full,REJECT,,REJECT,,NONE,False,,False,[],[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],2,58
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:88112393.9|EP0302422|19931208|88112393.9,EP0302422,EPO,Urea derivatives,True,Physics,EPO:88112393.9,True,full,REJECT,,REJECT,,NONE,False,,False,"[""Matsukubo, Hiroshi"", ""Matsumoto, Toyomi"", ""Miyashita, Mitsutomo"", ""Okamura, Kyuya"", ""Taga, Fukutaro"", ""Hamada, Katsuhiro""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:87109143.5|EP0254068|19920826|87109143.5,EP0254068,EPO,Novel therapeutic agent for gastritis,True,Physics,EPO:87109143.5,True,full,REJECT,,REJECT,,NONE,False,,False,"[""Kasuga, Kazunori"", ""Hamada, Katsuhiro"", ""Imai, Jun"", ""Kamijo, Shinji""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:87109143.5|EP0254068|19900530|87109143.5,EP0254068,EPO,Novel therapeutic agent for gastritis,True,Physics,EPO:87109143.5,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Kasuga, Kazunori"", ""Hamada, Katsuhiro"", ""Imai, Jun"", ""Kamijo, Shinji""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:88112393.9|EP0302422|19900207|88112393.9,EP0302422,EPO,Urea derivatives,True,Physics,EPO:88112393.9,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Matsukubo, Hiroshi"", ""Matsumoto, Toyomi"", ""Miyashita, Mitsutomo"", ""Okamura, Kyuya"", ""Taga, Fukutaro"", ""Hamada, Katsuhiro""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:88112393.9|EP0302422|19890208|88112393.9,EP0302422,EPO,Urea derivatives,True,Physics,EPO:88112393.9,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Matsukubo, Hiroshi"", ""Matsumoto, Toyomi"", ""Miyashita, Mitsutomo"", ""Okamura, Kyuya"", ""Taga, Fukutaro"", ""Hamada, Katsuhiro""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5110282865,Haruo Sekiguchi,A5110282865|EPO:87109143.5|EP0254068|19880127|87109143.5,EP0254068,EPO,Novel therapeutic agent for gastritis,True,Physics,EPO:87109143.5,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Kasuga, Kazunori"", ""Hamada, Katsuhiro"", ""Imai, Jun"", ""Kamijo, Shinji""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],5,63
|
||||
A5058282825,Masayuki Shibuya,A5058282825|EPO:02700734.3|EP1364933|20071003|02700734.3,EP1364933,EPO,OPTICAL RESOLVER AND METHOD OF OPTICALLY RESOLVING ALCOHOL WITH THE SAME,False,Chemistry,EPO:02700734.3,True,full,REJECT,,REJECT,,NONE,False,,False,"[""NEMOTO, Hisao""]","[""NEMOTO, Hisao""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,167
|
||||
A5058282825,Masayuki Shibuya,A5058282825|EPO:02700734.3|EP1364933|20031126|02700734.3,EP1364933,EPO,OPTICAL RESOLVER AND METHOD OF OPTICALLY RESOLVING ALCOHOL WITH THE SAME,False,Chemistry,EPO:02700734.3,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""NEMOTO, Hisao""]","[""NEMOTO, Hisao""]","{""confirmed_count"": 1, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,167
|
||||
A5058282825,Masayuki Shibuya,A5058282825|USPTO:15489835|US10744600|20200818|15489835,US10744600,USPTO,Metal plate for laser processing and method for producing stainless steel plate for laser processing,False,Chemistry,USPTO:15489835,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Kazuyoshi Fujisawa"", ""Kouichi Takeuchi""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,167
|
||||
A5058282825,Masayuki Shibuya,A5058282825|USPTO:13701230|US09979004|20180522|13701230,US09979004,USPTO,Clad material,False,Chemistry,USPTO:13701230,True,full,REJECT,,KEEP,semantic_topic_fallback_v1,NONE,False,no_specific_overlap,False,"[""Kentarou Yoshida"", ""Daisaku Arizono"", ""Syuji Yoshida"", ""Hayato Kita"", ""Kouichi Takeuchi"", ""Hideya Kaminaka""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,identity_reject:semantic_only,unavailable,[],3,167
|
||||
A5058282825,Masayuki Shibuya,A5058282825|USPTO:14361080|US09631249|20170425|14361080,US09631249,USPTO,Stainless steel and method for manufacturing same,False,Chemistry,USPTO:14361080,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Kazuhiko Adachi"", ""Takashi Maeda"", ""Kazuyoshi Fujisawa"", ""Yuuichi Fukumura""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,167
|
||||
A5058282825,Masayuki Shibuya,A5058282825|USPTO:14235873|US09243314|20160126|14235873,US09243314,USPTO,Method for manufacturing high-Si austenitic stainless steel,False,Chemistry,USPTO:14235873,True,full,REJECT,,REJECT,,NONE,False,no_specific_overlap,False,"[""Tomoyuki Sukawa"", ""Shinnya Yamamoto"", ""Kouichi Takeuchi"", ""Hayato Kita"", ""Shuuji Yoshida"", ""Katsuhiko Taketsu""]",[],"{""confirmed_count"": 0, ""shared_work_count"": 0, ""distinct_years"": [], ""unique_institutions"": 0}",False,REJECT,not_in_production_or_semantic,unavailable,[],3,167
|
||||
|
+7
@@ -0,0 +1,7 @@
|
||||
author,author_id,semantic_v1,guard_v1,guard_v2,final,final_replay_v1,final_replay_v2,production_keeps,semantic_v1_adds,works_count,openalex_full_name_count,openalex_coauthor_count,author_ambiguous
|
||||
Thomas Kaiser A5111380960,A5111380960,149,22,25,25,25,25,22,127,2,24,4,True
|
||||
Thomas Kaiser A5071644998,A5071644998,43,3,4,4,3,4,3,40,542,24,134,True
|
||||
Dirk Schadendorf,A5034365278,6,5,6,6,5,6,3,3,2376,26,656,True
|
||||
Christian Weber,A5100603203,13,9,13,11,9,13,8,5,1837,70,356,True
|
||||
Xiaohong Chen,A5100373745,31,8,10,8,8,10,8,23,19059,119,230,True
|
||||
Richard Smith,A5023982706,19,2,2,2,2,2,2,17,47952,101,252,True
|
||||
|
+11
@@ -0,0 +1,11 @@
|
||||
level,variant,tp,fp,fn,tn,precision,recall,f1
|
||||
candidate,production,32,2,57,40,0.9411764705882353,0.3595505617977528,0.5203252032520325
|
||||
candidate,production_with_semantic_fallback_v1,60,5,29,37,0.9230769230769231,0.6741573033707865,0.7792207792207791
|
||||
candidate,identity_guard_v1,52,2,37,40,0.9629629629629629,0.5842696629213483,0.7272727272727273
|
||||
candidate,identity_guard_v2,60,2,29,40,0.967741935483871,0.6741573033707865,0.794701986754967
|
||||
candidate,final_identity_guard,57,2,32,40,0.9661016949152542,0.6404494382022472,0.7702702702702703
|
||||
family,production,30,2,37,33,0.9375,0.44776119402985076,0.6060606060606061
|
||||
family,production_with_semantic_fallback_v1,49,5,18,30,0.9074074074074074,0.7313432835820896,0.8099173553719008
|
||||
family,identity_guard_v1,43,2,24,33,0.9555555555555556,0.6417910447761194,0.7678571428571429
|
||||
family,identity_guard_v2,49,2,18,33,0.9607843137254902,0.7313432835820896,0.8305084745762712
|
||||
family,final_identity_guard,47,2,20,33,0.9591836734693877,0.7014925373134329,0.810344827586207
|
||||
|
+299
@@ -0,0 +1,299 @@
|
||||
{
|
||||
"query_stats": {
|
||||
"additional_queries": 65,
|
||||
"cache_hits": 0,
|
||||
"shared_works_queries": 17,
|
||||
"coauthor_loads": 24,
|
||||
"alias_loads": 24
|
||||
},
|
||||
"per_author": [
|
||||
{
|
||||
"author_id": "A5073666637",
|
||||
"author_name": "Martin Wahl",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 9,
|
||||
"n_coauthors": 194,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 48,
|
||||
"coauthor_load_seconds": 0.504,
|
||||
"alias_load_seconds": 1.716,
|
||||
"shared_works_load_seconds": 0.028
|
||||
},
|
||||
{
|
||||
"author_id": "A5086393240",
|
||||
"author_name": "Clemens Aigner",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 7,
|
||||
"n_coauthors": 326,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 35,
|
||||
"coauthor_load_seconds": 0.49,
|
||||
"alias_load_seconds": 0.954,
|
||||
"shared_works_load_seconds": 0.103
|
||||
},
|
||||
{
|
||||
"author_id": "A5023752156",
|
||||
"author_name": "Albert Sickmann",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 7,
|
||||
"n_coauthors": 385,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 32,
|
||||
"coauthor_load_seconds": 0.252,
|
||||
"alias_load_seconds": 0.802,
|
||||
"shared_works_load_seconds": 0.064
|
||||
},
|
||||
{
|
||||
"author_id": "A5037443412",
|
||||
"author_name": "Krishna Niyogi",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 7,
|
||||
"n_coauthors": 55,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 30,
|
||||
"coauthor_load_seconds": 0.716,
|
||||
"alias_load_seconds": 0.939,
|
||||
"shared_works_load_seconds": 0.039
|
||||
},
|
||||
{
|
||||
"author_id": "A5001167896",
|
||||
"author_name": "Martin Glas",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 10,
|
||||
"n_coauthors": 813,
|
||||
"n_shared_contexts": 1,
|
||||
"n_institution_alias_records": 45,
|
||||
"coauthor_load_seconds": 0.633,
|
||||
"alias_load_seconds": 1.132,
|
||||
"shared_works_load_seconds": 0.455
|
||||
},
|
||||
{
|
||||
"author_id": "A5011059806",
|
||||
"author_name": "James Fulcher",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 5,
|
||||
"n_coauthors": 57,
|
||||
"n_shared_contexts": 2,
|
||||
"n_institution_alias_records": 10,
|
||||
"coauthor_load_seconds": 0.576,
|
||||
"alias_load_seconds": 0.284,
|
||||
"shared_works_load_seconds": 0.116
|
||||
},
|
||||
{
|
||||
"author_id": "A5035127271",
|
||||
"author_name": "Mark Obermann",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 5,
|
||||
"n_coauthors": 187,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 23,
|
||||
"coauthor_load_seconds": 0.467,
|
||||
"alias_load_seconds": 0.404,
|
||||
"shared_works_load_seconds": 0.049
|
||||
},
|
||||
{
|
||||
"author_id": "A5054895539",
|
||||
"author_name": "Hendrik Milting",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 6,
|
||||
"n_coauthors": 2023,
|
||||
"n_shared_contexts": 1,
|
||||
"n_institution_alias_records": 18,
|
||||
"coauthor_load_seconds": 0.484,
|
||||
"alias_load_seconds": 0.38,
|
||||
"shared_works_load_seconds": 1.836
|
||||
},
|
||||
{
|
||||
"author_id": "A5109170577",
|
||||
"author_name": "Jörg Steinmann",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 9,
|
||||
"n_coauthors": 454,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 33,
|
||||
"coauthor_load_seconds": 0.502,
|
||||
"alias_load_seconds": 0.61,
|
||||
"shared_works_load_seconds": 0.304
|
||||
},
|
||||
{
|
||||
"author_id": "A5008182166",
|
||||
"author_name": "Manfred Berroth",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 8,
|
||||
"n_coauthors": 174,
|
||||
"n_shared_contexts": 3,
|
||||
"n_institution_alias_records": 13,
|
||||
"coauthor_load_seconds": 0.474,
|
||||
"alias_load_seconds": 0.315,
|
||||
"shared_works_load_seconds": 0.214
|
||||
},
|
||||
{
|
||||
"author_id": "A5031103932",
|
||||
"author_name": "Sebastian Schlücker",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 5,
|
||||
"n_coauthors": 322,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 18,
|
||||
"coauthor_load_seconds": 0.142,
|
||||
"alias_load_seconds": 0.431,
|
||||
"shared_works_load_seconds": 0.019
|
||||
},
|
||||
{
|
||||
"author_id": "A5027988292",
|
||||
"author_name": "S. Ranil Wickramasinghe",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 8,
|
||||
"n_coauthors": 143,
|
||||
"n_shared_contexts": 1,
|
||||
"n_institution_alias_records": 14,
|
||||
"coauthor_load_seconds": 0.256,
|
||||
"alias_load_seconds": 0.396,
|
||||
"shared_works_load_seconds": 0.078
|
||||
},
|
||||
{
|
||||
"author_id": "A5070760948",
|
||||
"author_name": "Robert Weigel",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 6,
|
||||
"n_coauthors": 198,
|
||||
"n_shared_contexts": 2,
|
||||
"n_institution_alias_records": 53,
|
||||
"coauthor_load_seconds": 0.578,
|
||||
"alias_load_seconds": 1.311,
|
||||
"shared_works_load_seconds": 0.169
|
||||
},
|
||||
{
|
||||
"author_id": "A5113541511",
|
||||
"author_name": "Roland Boese",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 10,
|
||||
"n_coauthors": 209,
|
||||
"n_shared_contexts": 1,
|
||||
"n_institution_alias_records": 79,
|
||||
"coauthor_load_seconds": 0.432,
|
||||
"alias_load_seconds": 1.744,
|
||||
"shared_works_load_seconds": 0.165
|
||||
},
|
||||
{
|
||||
"author_id": "A5034365278",
|
||||
"author_name": "Dirk Schadendorf",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 10,
|
||||
"n_coauthors": 656,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 185,
|
||||
"coauthor_load_seconds": 0.757,
|
||||
"alias_load_seconds": 4.036,
|
||||
"shared_works_load_seconds": 0.654
|
||||
},
|
||||
{
|
||||
"author_id": "A5005196385",
|
||||
"author_name": "Matthew Monroe",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 7,
|
||||
"n_coauthors": 58,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 36,
|
||||
"coauthor_load_seconds": 0.15,
|
||||
"alias_load_seconds": 0.978,
|
||||
"shared_works_load_seconds": 0.006
|
||||
},
|
||||
{
|
||||
"author_id": "A5110282865",
|
||||
"author_name": "Haruo Sekiguchi",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 6,
|
||||
"n_coauthors": 63,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 2,
|
||||
"coauthor_load_seconds": 0.492,
|
||||
"alias_load_seconds": 0.058,
|
||||
"shared_works_load_seconds": 0.045
|
||||
},
|
||||
{
|
||||
"author_id": "A5058282825",
|
||||
"author_name": "Masayuki Shibuya",
|
||||
"scope": "fixed_sample",
|
||||
"n_patents": 6,
|
||||
"n_coauthors": 167,
|
||||
"n_shared_contexts": 1,
|
||||
"n_institution_alias_records": 18,
|
||||
"coauthor_load_seconds": 0.568,
|
||||
"alias_load_seconds": 0.449,
|
||||
"shared_works_load_seconds": 0.107
|
||||
},
|
||||
{
|
||||
"author_id": "A5111380960",
|
||||
"author_name": "Thomas Kaiser A5111380960",
|
||||
"scope": "live",
|
||||
"n_patents": 149,
|
||||
"n_coauthors": 4,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 1,
|
||||
"coauthor_load_seconds": 22.167,
|
||||
"alias_load_seconds": 0.0,
|
||||
"shared_works_load_seconds": 0.066
|
||||
},
|
||||
{
|
||||
"author_id": "A5071644998",
|
||||
"author_name": "Thomas Kaiser A5071644998",
|
||||
"scope": "live",
|
||||
"n_patents": 43,
|
||||
"n_coauthors": 134,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 39,
|
||||
"coauthor_load_seconds": 1.235,
|
||||
"alias_load_seconds": 0.689,
|
||||
"shared_works_load_seconds": 0.224
|
||||
},
|
||||
{
|
||||
"author_id": "A5034365278",
|
||||
"author_name": "Dirk Schadendorf",
|
||||
"scope": "live",
|
||||
"n_patents": 6,
|
||||
"n_coauthors": 656,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 185,
|
||||
"coauthor_load_seconds": 0.208,
|
||||
"alias_load_seconds": 0.0,
|
||||
"shared_works_load_seconds": 0.493
|
||||
},
|
||||
{
|
||||
"author_id": "A5100603203",
|
||||
"author_name": "Christian Weber",
|
||||
"scope": "live",
|
||||
"n_patents": 13,
|
||||
"n_coauthors": 356,
|
||||
"n_shared_contexts": 2,
|
||||
"n_institution_alias_records": 297,
|
||||
"coauthor_load_seconds": 0.747,
|
||||
"alias_load_seconds": 6.286,
|
||||
"shared_works_load_seconds": 0.331
|
||||
},
|
||||
{
|
||||
"author_id": "A5100373745",
|
||||
"author_name": "Xiaohong Chen",
|
||||
"scope": "live",
|
||||
"n_patents": 31,
|
||||
"n_coauthors": 230,
|
||||
"n_shared_contexts": 3,
|
||||
"n_institution_alias_records": 2140,
|
||||
"coauthor_load_seconds": 0.797,
|
||||
"alias_load_seconds": 164.079,
|
||||
"shared_works_load_seconds": 0.634
|
||||
},
|
||||
{
|
||||
"author_id": "A5023982706",
|
||||
"author_name": "Richard Smith",
|
||||
"scope": "live",
|
||||
"n_patents": 19,
|
||||
"n_coauthors": 252,
|
||||
"n_shared_contexts": 0,
|
||||
"n_institution_alias_records": 172,
|
||||
"coauthor_load_seconds": 0.881,
|
||||
"alias_load_seconds": 24.048,
|
||||
"shared_works_load_seconds": 0.274
|
||||
}
|
||||
]
|
||||
}
|
||||
+13
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"production_filter_changed": false,
|
||||
"semantic_v1_decision_rules_changed": false,
|
||||
"gold_changed": false,
|
||||
"candidate_pools_changed": false,
|
||||
"webapp_changed": false,
|
||||
"unique_authors_unchanged": true,
|
||||
"hardcoding_clean": true,
|
||||
"baselines_match": true,
|
||||
"topic_filter_sha256": "f70d6b07a4ea8b79d266a6ed2ef1fcd87395b1acf2e5240c35caf4c528dfa53f",
|
||||
"semantic_v1_frozen_sha256": "3a6656006912f5b5d0ab85aa01c29c1dc5caf8c198b403cfcb145fd1ef4b77b9",
|
||||
"final_guard_sha256": "18ccd99bff324072559003270b8edd9b2e09e4ab59035967b10f58a80329d7a8"
|
||||
}
|
||||
+235
@@ -0,0 +1,235 @@
|
||||
{
|
||||
"status": "FINAL / FROZEN AFTER EVALUATION",
|
||||
"variant": "production_with_semantic_fallback_v1_and_final_identity_guard",
|
||||
"verdict": "FINAL_IDENTITY_GUARD_ACCEPTED",
|
||||
"candidate": {
|
||||
"production": {
|
||||
"tp": 32,
|
||||
"fp": 2,
|
||||
"fn": 57,
|
||||
"tn": 40,
|
||||
"precision": 0.9411764705882353,
|
||||
"recall": 0.3595505617977528,
|
||||
"f1": 0.5203252032520325
|
||||
},
|
||||
"semantic_v1": {
|
||||
"tp": 60,
|
||||
"fp": 5,
|
||||
"fn": 29,
|
||||
"tn": 37,
|
||||
"precision": 0.9230769230769231,
|
||||
"recall": 0.6741573033707865,
|
||||
"f1": 0.7792207792207791
|
||||
},
|
||||
"guard_v1": {
|
||||
"tp": 52,
|
||||
"fp": 2,
|
||||
"fn": 37,
|
||||
"tn": 40,
|
||||
"precision": 0.9629629629629629,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7272727272727273
|
||||
},
|
||||
"guard_v2": {
|
||||
"tp": 60,
|
||||
"fp": 2,
|
||||
"fn": 29,
|
||||
"tn": 40,
|
||||
"precision": 0.967741935483871,
|
||||
"recall": 0.6741573033707865,
|
||||
"f1": 0.794701986754967
|
||||
},
|
||||
"final": {
|
||||
"tp": 57,
|
||||
"fp": 2,
|
||||
"fn": 32,
|
||||
"tn": 40,
|
||||
"precision": 0.9661016949152542,
|
||||
"recall": 0.6404494382022472,
|
||||
"f1": 0.7702702702702703
|
||||
}
|
||||
},
|
||||
"family": {
|
||||
"production": {
|
||||
"tp": 30,
|
||||
"fp": 2,
|
||||
"fn": 37,
|
||||
"tn": 33,
|
||||
"precision": 0.9375,
|
||||
"recall": 0.44776119402985076,
|
||||
"f1": 0.6060606060606061
|
||||
},
|
||||
"semantic_v1": {
|
||||
"tp": 49,
|
||||
"fp": 5,
|
||||
"fn": 18,
|
||||
"tn": 30,
|
||||
"precision": 0.9074074074074074,
|
||||
"recall": 0.7313432835820896,
|
||||
"f1": 0.8099173553719008
|
||||
},
|
||||
"guard_v1": {
|
||||
"tp": 43,
|
||||
"fp": 2,
|
||||
"fn": 24,
|
||||
"tn": 33,
|
||||
"precision": 0.9555555555555556,
|
||||
"recall": 0.6417910447761194,
|
||||
"f1": 0.7678571428571429
|
||||
},
|
||||
"guard_v2": {
|
||||
"tp": 49,
|
||||
"fp": 2,
|
||||
"fn": 18,
|
||||
"tn": 33,
|
||||
"precision": 0.9607843137254902,
|
||||
"recall": 0.7313432835820896,
|
||||
"f1": 0.8305084745762712
|
||||
},
|
||||
"final": {
|
||||
"tp": 47,
|
||||
"fp": 2,
|
||||
"fn": 20,
|
||||
"tn": 33,
|
||||
"precision": 0.9591836734693877,
|
||||
"recall": 0.7014925373134329,
|
||||
"f1": 0.810344827586207
|
||||
}
|
||||
},
|
||||
"unique_unchanged": true,
|
||||
"hardcoding": {
|
||||
"clean": true,
|
||||
"detail": {
|
||||
"authors": {
|
||||
"Thomas Kaiser": false,
|
||||
"Christian Weber": false,
|
||||
"Xiaohong Chen": false,
|
||||
"Richard Smith": false,
|
||||
"Dirk Schadendorf": false
|
||||
},
|
||||
"institutions": {
|
||||
"Bayer": false,
|
||||
"Infineon": false,
|
||||
"DKFZ": false,
|
||||
"Shanghai": false
|
||||
},
|
||||
"fields": {
|
||||
"Medicine": false,
|
||||
"Engineering": false,
|
||||
"Physics": false
|
||||
},
|
||||
"ipc": {
|
||||
"A61": false,
|
||||
"H04": false,
|
||||
"F16": false
|
||||
},
|
||||
"gold_runtime": false
|
||||
}
|
||||
},
|
||||
"query_stats": {
|
||||
"additional_queries": 65,
|
||||
"cache_hits": 0,
|
||||
"shared_works_queries": 17,
|
||||
"coauthor_loads": 24,
|
||||
"alias_loads": 24
|
||||
},
|
||||
"elapsed_seconds": 278.377,
|
||||
"live": [
|
||||
{
|
||||
"author": "Thomas Kaiser A5111380960",
|
||||
"author_id": "A5111380960",
|
||||
"semantic_v1": 149,
|
||||
"guard_v1": 22,
|
||||
"guard_v2": 25,
|
||||
"final": 25,
|
||||
"final_replay_v1": 25,
|
||||
"final_replay_v2": 25,
|
||||
"production_keeps": 22,
|
||||
"semantic_v1_adds": 127,
|
||||
"works_count": 2,
|
||||
"openalex_full_name_count": 24,
|
||||
"openalex_coauthor_count": 4,
|
||||
"author_ambiguous": true
|
||||
},
|
||||
{
|
||||
"author": "Thomas Kaiser A5071644998",
|
||||
"author_id": "A5071644998",
|
||||
"semantic_v1": 43,
|
||||
"guard_v1": 3,
|
||||
"guard_v2": 4,
|
||||
"final": 4,
|
||||
"final_replay_v1": 3,
|
||||
"final_replay_v2": 4,
|
||||
"production_keeps": 3,
|
||||
"semantic_v1_adds": 40,
|
||||
"works_count": 542,
|
||||
"openalex_full_name_count": 24,
|
||||
"openalex_coauthor_count": 134,
|
||||
"author_ambiguous": true
|
||||
},
|
||||
{
|
||||
"author": "Dirk Schadendorf",
|
||||
"author_id": "A5034365278",
|
||||
"semantic_v1": 6,
|
||||
"guard_v1": 5,
|
||||
"guard_v2": 6,
|
||||
"final": 6,
|
||||
"final_replay_v1": 5,
|
||||
"final_replay_v2": 6,
|
||||
"production_keeps": 3,
|
||||
"semantic_v1_adds": 3,
|
||||
"works_count": 2376,
|
||||
"openalex_full_name_count": 26,
|
||||
"openalex_coauthor_count": 656,
|
||||
"author_ambiguous": true
|
||||
},
|
||||
{
|
||||
"author": "Christian Weber",
|
||||
"author_id": "A5100603203",
|
||||
"semantic_v1": 13,
|
||||
"guard_v1": 9,
|
||||
"guard_v2": 13,
|
||||
"final": 11,
|
||||
"final_replay_v1": 9,
|
||||
"final_replay_v2": 13,
|
||||
"production_keeps": 8,
|
||||
"semantic_v1_adds": 5,
|
||||
"works_count": 1837,
|
||||
"openalex_full_name_count": 70,
|
||||
"openalex_coauthor_count": 356,
|
||||
"author_ambiguous": true
|
||||
},
|
||||
{
|
||||
"author": "Xiaohong Chen",
|
||||
"author_id": "A5100373745",
|
||||
"semantic_v1": 31,
|
||||
"guard_v1": 8,
|
||||
"guard_v2": 10,
|
||||
"final": 8,
|
||||
"final_replay_v1": 8,
|
||||
"final_replay_v2": 10,
|
||||
"production_keeps": 8,
|
||||
"semantic_v1_adds": 23,
|
||||
"works_count": 19059,
|
||||
"openalex_full_name_count": 119,
|
||||
"openalex_coauthor_count": 230,
|
||||
"author_ambiguous": true
|
||||
},
|
||||
{
|
||||
"author": "Richard Smith",
|
||||
"author_id": "A5023982706",
|
||||
"semantic_v1": 19,
|
||||
"guard_v1": 2,
|
||||
"guard_v2": 2,
|
||||
"final": 2,
|
||||
"final_replay_v1": 2,
|
||||
"final_replay_v2": 2,
|
||||
"production_keeps": 2,
|
||||
"semantic_v1_adds": 17,
|
||||
"works_count": 47952,
|
||||
"openalex_full_name_count": 101,
|
||||
"openalex_coauthor_count": 252,
|
||||
"author_ambiguous": true
|
||||
}
|
||||
]
|
||||
}
|
||||
+73
@@ -0,0 +1,73 @@
|
||||
# Production + Semantic Fallback V1
|
||||
|
||||
|
||||
## Ziel
|
||||
|
||||
Semantic ausschließlich als Fallback nach Production. Ein von Production akzeptiertes Patent darf durch Semantic niemals wieder entfernt werden.
|
||||
|
||||
Für von Production abgelehnte Patente wird zusätzlich geprüft, ob Patent- und Autorenthemen semantisch ausreichend ähnlich sind.
|
||||
|
||||
## Logik
|
||||
|
||||
```text
|
||||
Production KEEP
|
||||
→ KEEP
|
||||
|
||||
Production REJECT
|
||||
→ Semantic Topic Fallback
|
||||
|
||||
Semantic Match erfolgreich
|
||||
→ KEEP
|
||||
|
||||
Semantic Match nicht erfolgreich
|
||||
→ REJECT
|
||||
```
|
||||
|
||||
Feature-Flag: `ENABLE_SEMANTIC_TOPIC_FALLBACK`.
|
||||
|
||||
## Daten
|
||||
|
||||
Fixed Sample, bereits zur Entwicklung/Analyse verwendet:
|
||||
|
||||
- 18 Autoren
|
||||
- 131 Kandidaten
|
||||
- 89 positiv / 42 negativ
|
||||
|
||||
Keine neuen Gold-Labels. Keine neuen Candidate Pools.
|
||||
|
||||
## Ergebnisse
|
||||
|
||||
Candidate-Level:
|
||||
|
||||
| Variante | TP | FP | FN | TN | P | R | F1 |
|
||||
| --- | --- | --- | --- | --- | --- | --- | --- |
|
||||
| Production | 32 | 2 | 57 | 40 | 0.941 | 0.360 | 0.520 |
|
||||
| standalone semantic_topic_fallback_v1 | 52 | 5 | 37 | 37 | 0.912 | 0.584 | 0.712 |
|
||||
| production_with_semantic_fallback_v1 | 60 | 5 | 29 | 37 | 0.923 | 0.674 | 0.779 |
|
||||
|
||||
|
||||
Production-Keep durch Combined verloren: **0**.
|
||||
|
||||
## Per Field
|
||||
|
||||
|
||||
| Field | Prod F1 | Comb F1 |
|
||||
| --- | --- | --- |
|
||||
| Biology / Biotechnology| 0.933 | 0.875 |
|
||||
| Chemistry | 0.636 | 0.968 |
|
||||
| Medicine / Health Sciences| 0.667 | 0.833 |
|
||||
| Physics | 0.345 | 0.737 |
|
||||
| Engineering | 0.462 | 0.750 |
|
||||
|
||||
## Neue Treffer
|
||||
|
||||
Nur `Production = reject` und `Combined = keep` (siehe `changed_decisions.csv`):
|
||||
|
||||
- neue Candidate-TP: **28**
|
||||
- neue Candidate-FP: **3**
|
||||
- zusätzliche Family-TP: **19**
|
||||
- zusätzliche Family-FP: **3**
|
||||
|
||||
## Fazit
|
||||
|
||||
Auf diesem Fixed Sample erhöht der Fallback den Recall, ohne Production-Treffer zu verlieren.
|
||||
+32
@@ -0,0 +1,32 @@
|
||||
author,patent,gold_label,field,semantic_score,patent_topic,author_topic,IPC/CPC,reason,family_id
|
||||
Martin Wahl,US12150539,False,Biology / Biotechnology,0.92552,Water Resources and Sustainability,Marine Biology and Environmental Chemistry,A45F 3/04 | A45C 5/06 | A45C 7/00 | A45C 13/02 | A45F 3/00 | A45C 7/0027 | A45C 2013/025 | A45F 2003/003,semantic_similarity>=0.75,USPTO:15944388
|
||||
Clemens Aigner,US12115902,False,Medicine / Health Sciences,0.915902,Healthcare Technology and Patient Monitoring,Transplantation: Methods and Outcomes,F21S 41/63 | B60Q 1/14 | G09G 3/00 | B60Q 11/00 | B60Q 1/1415 | G09G 3/001 | B60Q 11/005,semantic_similarity>=0.75,USPTO:18397838
|
||||
Krishna Niyogi,EP3464601,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12N 15/82,semantic_similarity>=0.75,EPO:17729973.2
|
||||
Krishna Niyogi,US12529064,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12N 15/82 | C07K 14/415 | C12N 9/02 | C12N 15/8269 | C12Y 110/99003 | C12Y 114/1309 | C12N 9/0073,semantic_similarity>=0.75,USPTO:18057190
|
||||
Krishna Niyogi,US12054727,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12N 15/82 | C12N 15/8273,semantic_similarity>=0.75,USPTO:16808881
|
||||
Krishna Niyogi,US11572569,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12N 15/82 | C07K 14/415 | C12N 9/02 | C12N 15/8269 | C12Y 110/99003 | C12Y 114/1309 | C12N 9/0055 | C12N 9/0073,semantic_similarity>=0.75,USPTO:16304633
|
||||
Krishna Niyogi,US11124819,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12P 23/00 | C12N 15/52 | C12N 1/12 | C12N 15/67 | C12N 15/79 | C12N 9/10 | C12N 9/1025 | C12Y 203/0102,semantic_similarity>=0.75,USPTO:15922763
|
||||
Krishna Niyogi,US10480003,True,Physics,0.929254,Oil Spill Detection and Mitigation,Earthquake Detection and Analysis,C12N 15/82 | C12N 15/8269 | C12N 15/8243 | Y02P 60/247,semantic_similarity>=0.75,USPTO:15230332
|
||||
Krishna Niyogi,US10336989,True,Physics,0.918819,Polar Research and Ecology,Geophysics and Gravity Measurements,C12N 15/82 | C12N 9/02 | C12N 9/0055 | C12N 15/825 | C12N 15/8269 | C12Y 110/99003,semantic_similarity>=0.75,USPTO:15625798
|
||||
Martin Glas,EP2324111,True,Medicine / Health Sciences,0.916255,Microbial metabolism and enzyme function,"Cancer, Hypoxia, and Metabolism",C12N 5/095 | G01N 33/50,semantic_similarity>=0.75,EPO:09778433.4
|
||||
Martin Glas,EP2424977,True,Medicine / Health Sciences,0.921836,Neurofibromatosis and Schwannoma Cases,Meningioma and schwannoma management,C12N 5/07 | A61P 35/00 | A61K 35/30,semantic_similarity>=0.75,EPO:10721372.0
|
||||
Hendrik Milting,EP2074429,True,Engineering,0.896967,Food and Agricultural Sciences,Cardiac electrophysiology and arrhythmias,G01N 33/68 | C12Q 1/68,semantic_similarity>=0.75,EPO:07818669.9
|
||||
Hendrik Milting,EP2134859,True,Engineering,0.896967,Food and Agricultural Sciences,Cardiac electrophysiology and arrhythmias,C12Q 1/37 | G01N 33/68,semantic_similarity>=0.75,EPO:08734838.9
|
||||
Hendrik Milting,EP2087359,True,Engineering,0.896967,Food and Agricultural Sciences,Cardiac electrophysiology and arrhythmias,G01N 33/68 | G01N 33/50,semantic_similarity>=0.75,EPO:07818642.6
|
||||
Hendrik Milting,EP2074429,True,Engineering,0.896967,Food and Agricultural Sciences,Cardiac electrophysiology and arrhythmias,G01N 33/68 | C12Q 1/68,semantic_similarity>=0.75,EPO:07818669.9
|
||||
Manfred Berroth,EP2703858,True,Physics,0.971175,Optical Systems and Laser Technology,Semiconductor Lasers and Optical Devices,G02B 6/30,semantic_similarity>=0.75,EPO:12006205.4
|
||||
Manfred Berroth,EP1372024,True,Physics,0.919687,Nonlinear Optical Materials Studies,Photonic and Optical Devices,G02F 1/1333,semantic_similarity>=0.75,EPO:02360172.7
|
||||
Sebastian Schlücker,EP2193374,True,Chemistry,0.959088,Spectroscopy and Chemometric Analyses,Spectroscopy and Quantum Chemical Studies,G01N 33/532 | G01N 33/58 | G01N 21/65,semantic_similarity>=0.75,EPO:08802574.7
|
||||
Robert Weigel,EP1488508,True,Engineering,0.928742,Power Systems and Renewable Energy,Microwave Engineering and Waveguides,H03C 3/09,semantic_similarity>=0.75,EPO:03720131.6
|
||||
Robert Weigel,EP1488508,True,Engineering,0.928742,Power Systems and Renewable Energy,Microwave Engineering and Waveguides,H03C 3/09,semantic_similarity>=0.75,EPO:03720131.6
|
||||
Roland Boese,EP2247585,True,Chemistry,0.934338,Catalytic Cross-Coupling Reactions,Organometallic Complex Synthesis and Catalysis,C07D 403/06 | A61K 31/404 | A61P 35/00,semantic_similarity>=0.75,EPO:09717772.9
|
||||
Roland Boese,EP2604603,True,Chemistry,0.934338,Catalytic Cross-Coupling Reactions,Organometallic Complex Synthesis and Catalysis,C07D 403/06 | A61K 31/404 | A61P 35/00,semantic_similarity>=0.75,EPO:13158832.9
|
||||
Roland Boese,EP2247585,True,Chemistry,0.934338,Catalytic Cross-Coupling Reactions,Organometallic Complex Synthesis and Catalysis,C07D 403/06 | A61K 31/404 | A61P 35/00,semantic_similarity>=0.75,EPO:09717772.9
|
||||
Roland Boese,EP2128160,True,Chemistry,0.930522,Synthesis and Properties of Aromatic Compounds,Synthesis and characterization of novel inorganic/organometallic compounds,C07D 471/04 | A61K 31/437 | A61K 31/4375 | A61P 31/00 | A61P 31/12 | A61P 35/00,semantic_similarity>=0.75,EPO:08008254.8
|
||||
Roland Boese,EP2098521,True,Chemistry,0.934338,Catalytic Cross-Coupling Reactions,Organometallic Complex Synthesis and Catalysis,C07D 403/06 | A61K 31/404 | A61P 35/00,semantic_similarity>=0.75,EPO:08004143.7
|
||||
Roland Boese,EP0153989,True,Chemistry,0.93463,X-ray Diffraction in Crystallography,Crystallography and molecular interactions,G01N 23/207,semantic_similarity>=0.75,EPO:84110796
|
||||
Roland Boese,EP0153989,True,Chemistry,0.93463,X-ray Diffraction in Crystallography,Crystallography and molecular interactions,G01N 23/207,semantic_similarity>=0.75,EPO:84110796.4
|
||||
Dirk Schadendorf,EP2932264,True,Medicine / Health Sciences,0.932676,Biosimilars and Bioanalytical Methods,Immunotherapy and Immune Responses,G01N 33/50 | C12N 15/00 | C07K 16/00 | A61K 38/00,semantic_similarity>=0.75,EPO:13818713.3
|
||||
Dirk Schadendorf,EP1349871,True,Medicine / Health Sciences,0.934969,Cancer-related Molecular Pathways,Melanoma and MAPK Pathways,C07K 14/47 | C07K 16/30 | C12Q 1/68,semantic_similarity>=0.75,EPO:01993706.9
|
||||
Dirk Schadendorf,EP1228224,True,Medicine / Health Sciences,0.949736,Bacterial Infections and Vaccines,Immunotherapy and Immune Responses,C12N 15/75 | A61K 39/02 | C12N 1/21,semantic_similarity>=0.75,EPO:00983012.6
|
||||
Masayuki Shibuya,US09979004,False,Chemistry,0.93432,Machine Fault Diagnosis Techniques,Plasma Diagnostics and Applications,B32B 15/01 | H01M 2/26 | B23K 20/04 | B23K 11/00 | B23K 11/11 | B23K 20/233 | C22F 1/08 | B23K 101/28,semantic_similarity>=0.75,USPTO:13701230
|
||||
|
+34
@@ -0,0 +1,34 @@
|
||||
{
|
||||
"variant": "production_with_semantic_fallback_v1",
|
||||
"status": "experimental / evaluation-backed, not independently validated",
|
||||
"created_at": "20260817T034544Z",
|
||||
"logic": "if production_kept: keep; else: semantic_topic_fallback_v1",
|
||||
"semantic_variant": "semantic_topic_fallback_v1",
|
||||
"model": "intfloat/multilingual-e5-base",
|
||||
"threshold": 0.75,
|
||||
"feature_flag": "ENABLE_SEMANTIC_TOPIC_FALLBACK",
|
||||
"feature_flag_default": false,
|
||||
"sample": {
|
||||
"name": "fixed_sample",
|
||||
"tracks": [
|
||||
"experiment_1",
|
||||
"experiment_2",
|
||||
"experiment_3"
|
||||
],
|
||||
"authors": 18,
|
||||
"candidates": 131,
|
||||
"positives": 89,
|
||||
"negatives": 42,
|
||||
"used_for_development": true
|
||||
},
|
||||
"inputs": {
|
||||
"diagnosis": "data\\author_patent_evaluation\\aggregate_field_analysis\\diagnosis\\field_error_analysis.json",
|
||||
"semantic_decisions": "data\\author_patent_evaluation\\aggregate_field_analysis\\experiments\\semantic_topic_fallback_v1\\candidate_decisions.json"
|
||||
},
|
||||
"no_retune": true,
|
||||
"gold_labels_modified": false,
|
||||
"candidate_pools_modified": false,
|
||||
"keyword_search_modified": false,
|
||||
"institution_search_modified": false,
|
||||
"production_filter_function_modified": false
|
||||
}
|
||||
+4
@@ -0,0 +1,4 @@
|
||||
variant,tp,fp,fn,tn,precision,recall,f1
|
||||
production,30,2,37,33,0.9375,0.44776119402985076,0.6060606060606061
|
||||
semantic_topic_fallback_v1,41,5,26,30,0.8913043478260869,0.6119402985074627,0.7256637168141593
|
||||
production_with_semantic_fallback_v1,49,5,18,30,0.9074074074074074,0.7313432835820896,0.8099173553719008
|
||||
|
+19
@@ -0,0 +1,19 @@
|
||||
field,variant,n,tp,fp,fn,tn,precision,recall,f1,engineering_sample_note
|
||||
Biology / Biotechnology,production,17,7,0,1,9,1.0,0.875,0.9333333333333333,
|
||||
Biology / Biotechnology,semantic_topic_fallback_v1,17,7,1,1,8,0.875,0.875,0.875,
|
||||
Biology / Biotechnology,production_with_semantic_fallback_v1,17,7,1,1,8,0.875,0.875,0.875,
|
||||
Chemistry,production,21,7,0,8,6,1.0,0.4666666666666667,0.6363636363636364,
|
||||
Chemistry,semantic_topic_fallback_v1,21,15,1,0,5,0.9375,1.0,0.967741935483871,
|
||||
Chemistry,production_with_semantic_fallback_v1,21,15,1,0,5,0.9375,1.0,0.967741935483871,
|
||||
Medicine / Health Sciences,production,36,10,0,10,16,1.0,0.5,0.6666666666666666,
|
||||
Medicine / Health Sciences,semantic_topic_fallback_v1,36,11,1,9,15,0.9166666666666666,0.55,0.6874999999999999,
|
||||
Medicine / Health Sciences,production_with_semantic_fallback_v1,36,15,1,5,15,0.9375,0.75,0.8333333333333334,
|
||||
Physics,production,33,5,0,19,9,1.0,0.20833333333333334,0.3448275862068966,
|
||||
Physics,semantic_topic_fallback_v1,33,13,0,11,9,1.0,0.5416666666666666,0.7027027027027027,
|
||||
Physics,production_with_semantic_fallback_v1,33,14,0,10,9,1.0,0.5833333333333334,0.7368421052631579,
|
||||
Engineering,production,12,0,2,10,0,0.0,0.0,,known field/homonym/mapping issues
|
||||
Engineering,semantic_topic_fallback_v1,12,6,2,4,0,0.75,0.6,0.6666666666666665,known field/homonym/mapping issues
|
||||
Engineering,production_with_semantic_fallback_v1,12,6,2,4,0,0.75,0.6,0.6666666666666665,known field/homonym/mapping issues
|
||||
Other,production,12,3,0,9,0,1.0,0.25,0.4,
|
||||
Other,semantic_topic_fallback_v1,12,0,0,12,0,,0.0,,
|
||||
Other,production_with_semantic_fallback_v1,12,3,0,9,0,1.0,0.25,0.4,
|
||||
|
+7
@@ -0,0 +1,7 @@
|
||||
level,variant,tp,fp,fn,tn,precision,recall,f1
|
||||
candidate,production,32,2,57,40,0.9411764705882353,0.3595505617977528,0.5203252032520325
|
||||
candidate,semantic_topic_fallback_v1,52,5,37,37,0.9122807017543859,0.5842696629213483,0.7123287671232877
|
||||
candidate,production_with_semantic_fallback_v1,60,5,29,37,0.9230769230769231,0.6741573033707865,0.7792207792207791
|
||||
family,production,30,2,37,33,0.9375,0.44776119402985076,0.6060606060606061
|
||||
family,semantic_topic_fallback_v1,41,5,26,30,0.8913043478260869,0.6119402985074627,0.7256637168141593
|
||||
family,production_with_semantic_fallback_v1,49,5,18,30,0.9074074074074074,0.7313432835820896,0.8099173553719008
|
||||
|
+67
@@ -0,0 +1,67 @@
|
||||
{
|
||||
"created_at": "20260817T034544Z",
|
||||
"variant": "production_with_semantic_fallback_v1",
|
||||
"status": "experimental / evaluation-backed, not independently validated",
|
||||
"checks": {
|
||||
"production_keep_never_rejected": {
|
||||
"pass": true,
|
||||
"count": 0
|
||||
},
|
||||
"frozen_decide_matches_stored_semantic_v1": {
|
||||
"pass": true,
|
||||
"count": 0
|
||||
},
|
||||
"threshold_is_0_75": {
|
||||
"pass": true,
|
||||
"value": 0.75
|
||||
},
|
||||
"model_is_multilingual_e5_base": {
|
||||
"pass": true,
|
||||
"value": "intfloat/multilingual-e5-base"
|
||||
},
|
||||
"gold_labels_not_in_decision_logic": {
|
||||
"pass": true
|
||||
},
|
||||
"production_candidate_metrics_unchanged": {
|
||||
"pass": true,
|
||||
"observed": {
|
||||
"tp": 32,
|
||||
"fp": 2,
|
||||
"fn": 57,
|
||||
"tn": 40,
|
||||
"precision": 0.9411764705882353,
|
||||
"recall": 0.3595505617977528,
|
||||
"f1": 0.5203252032520325
|
||||
}
|
||||
},
|
||||
"keyword_search_untouched": {
|
||||
"pass": true,
|
||||
"path": "service/src/main/inse/patents/keywords/logic.py",
|
||||
"note": "not modified by this integration"
|
||||
},
|
||||
"institution_search_untouched": {
|
||||
"pass": true,
|
||||
"path": "service/src/main/inse/patents/institutions/logic.py",
|
||||
"note": "not modified by this integration"
|
||||
},
|
||||
"candidate_pools_untouched": {
|
||||
"pass": true,
|
||||
"hashes": {
|
||||
"experiment_1": "742069ce4f0a72d5bf9e174e6c10ea66efc01eb6ad1cf45d6e0d5b96598fe499",
|
||||
"experiment_2": "bc65024992ac4acc0c4066eed225a505259870c4f5eea8634e53ee2ccd925f02",
|
||||
"experiment_3": "22c74edb7020762d64b82990636bb958d10b5eed371d7643f0fe3afc5843fd6b"
|
||||
}
|
||||
},
|
||||
"feature_flag_default_off": {
|
||||
"pass": true,
|
||||
"constant": "ENABLE_SEMANTIC_TOPIC_FALLBACK",
|
||||
"setting": "enable_semantic_topic_fallback",
|
||||
"default": false
|
||||
}
|
||||
},
|
||||
"files_sha256": {
|
||||
"topic_filter.py": "f70d6b07a4ea8b79d266a6ed2ef1fcd87395b1acf2e5240c35caf4c528dfa53f",
|
||||
"keywords/logic.py": "9420c80f55cc8d52681ca06e3411027d9a8173a5b735827d38b0c40810e2e2a9",
|
||||
"institutions/logic.py": "25898ac6d2298b8592c25478d00cde42369673c6d582bc659e4b35f86e9bf8f3"
|
||||
}
|
||||
}
|
||||
+74
@@ -0,0 +1,74 @@
|
||||
{
|
||||
"candidate": {
|
||||
"production": {
|
||||
"tp": 32,
|
||||
"fp": 2,
|
||||
"fn": 57,
|
||||
"tn": 40,
|
||||
"precision": 0.9411764705882353,
|
||||
"recall": 0.3595505617977528,
|
||||
"f1": 0.5203252032520325
|
||||
},
|
||||
"semantic_topic_fallback_v1": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
},
|
||||
"production_with_semantic_fallback_v1": {
|
||||
"tp": 60,
|
||||
"fp": 5,
|
||||
"fn": 29,
|
||||
"tn": 37,
|
||||
"precision": 0.9230769230769231,
|
||||
"recall": 0.6741573033707865,
|
||||
"f1": 0.7792207792207791
|
||||
}
|
||||
},
|
||||
"family": {
|
||||
"production": {
|
||||
"tp": 30,
|
||||
"fp": 2,
|
||||
"fn": 37,
|
||||
"tn": 33,
|
||||
"precision": 0.9375,
|
||||
"recall": 0.44776119402985076,
|
||||
"f1": 0.6060606060606061
|
||||
},
|
||||
"semantic_topic_fallback_v1": {
|
||||
"tp": 41,
|
||||
"fp": 5,
|
||||
"fn": 26,
|
||||
"tn": 30,
|
||||
"precision": 0.8913043478260869,
|
||||
"recall": 0.6119402985074627,
|
||||
"f1": 0.7256637168141593
|
||||
},
|
||||
"production_with_semantic_fallback_v1": {
|
||||
"tp": 49,
|
||||
"fp": 5,
|
||||
"fn": 18,
|
||||
"tn": 30,
|
||||
"precision": 0.9074074074074074,
|
||||
"recall": 0.7313432835820896,
|
||||
"f1": 0.8099173553719008
|
||||
}
|
||||
},
|
||||
"new_candidate_tp": 28,
|
||||
"new_candidate_fp": 3,
|
||||
"new_family_tp": 19,
|
||||
"new_family_fp": 3,
|
||||
"fields_with_gain": [
|
||||
"Chemistry",
|
||||
"Medicine / Health Sciences",
|
||||
"Physics",
|
||||
"Engineering"
|
||||
],
|
||||
"fields_with_regression": [
|
||||
"Biology / Biotechnology"
|
||||
],
|
||||
"production_keep_losses": 0
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# semantic_topic_fallback_v1
|
||||
|
||||
Standalone Semantic-Topic-Fallback auf dem Fixed Sample.
|
||||
|
||||
Nicht `production OR semantic`. Production-Keeps können hier durch `domain_conflict` verloren gehen.
|
||||
|
||||
Für von Production abgelehnte Patente wird geprüft, ob Patent- und Autorenthemen semantisch ausreichend ähnlich sind.
|
||||
|
||||
| Variante | P | R | F1 |
|
||||
| --- | ---: | ---: | ---: |
|
||||
| Production | 0.941 | 0.360 | 0.520 |
|
||||
| semantic_topic_fallback_v1 | 0.912 | 0.584 | 0.712 |
|
||||
|
||||
Die kombinierte Variante liegt unter `../production_with_semantic_fallback_v1/`.
|
||||
+4590
File diff suppressed because it is too large
Load Diff
+398
@@ -0,0 +1,398 @@
|
||||
{
|
||||
"created_at": "20260811T005512Z",
|
||||
"validation_label": "exploratory_replay_on_diagnosed_fixed_sample",
|
||||
"variant": "semantic_topic_fallback_v1",
|
||||
"default_threshold": 0.75,
|
||||
"thresholds_tested": [
|
||||
0.7,
|
||||
0.75,
|
||||
0.8
|
||||
],
|
||||
"candidate_count": 131,
|
||||
"pooled": {
|
||||
"production_baseline": {
|
||||
"tp": 32,
|
||||
"fp": 2,
|
||||
"fn": 57,
|
||||
"tn": 40,
|
||||
"precision": 0.9411764705882353,
|
||||
"recall": 0.3595505617977528,
|
||||
"f1": 0.5203252032520325
|
||||
},
|
||||
"semantic_topic_fallback_v1": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
},
|
||||
"semantic_thr_0.70": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
},
|
||||
"semantic_thr_0.75": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
},
|
||||
"semantic_thr_0.80": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
}
|
||||
},
|
||||
"per_field": {
|
||||
"production_baseline": {
|
||||
"Biology / Biotechnology": {
|
||||
"tp": 7,
|
||||
"fp": 0,
|
||||
"fn": 1,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.875,
|
||||
"f1": 0.9333333333333333
|
||||
},
|
||||
"Chemistry": {
|
||||
"tp": 7,
|
||||
"fp": 0,
|
||||
"fn": 8,
|
||||
"tn": 6,
|
||||
"precision": 1.0,
|
||||
"recall": 0.4666666666666667,
|
||||
"f1": 0.6363636363636364
|
||||
},
|
||||
"Engineering": {
|
||||
"tp": 0,
|
||||
"fp": 2,
|
||||
"fn": 10,
|
||||
"tn": 0,
|
||||
"precision": 0.0,
|
||||
"recall": 0.0,
|
||||
"f1": null
|
||||
},
|
||||
"Medicine / Health Sciences": {
|
||||
"tp": 10,
|
||||
"fp": 0,
|
||||
"fn": 10,
|
||||
"tn": 16,
|
||||
"precision": 1.0,
|
||||
"recall": 0.5,
|
||||
"f1": 0.6666666666666666
|
||||
},
|
||||
"Physics": {
|
||||
"tp": 5,
|
||||
"fp": 0,
|
||||
"fn": 19,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.20833333333333334,
|
||||
"f1": 0.3448275862068966
|
||||
},
|
||||
"Other": {
|
||||
"tp": 3,
|
||||
"fp": 0,
|
||||
"fn": 9,
|
||||
"tn": 0,
|
||||
"precision": 1.0,
|
||||
"recall": 0.25,
|
||||
"f1": 0.4
|
||||
}
|
||||
},
|
||||
"semantic_topic_fallback_v1": {
|
||||
"Biology / Biotechnology": {
|
||||
"tp": 7,
|
||||
"fp": 1,
|
||||
"fn": 1,
|
||||
"tn": 8,
|
||||
"precision": 0.875,
|
||||
"recall": 0.875,
|
||||
"f1": 0.875
|
||||
},
|
||||
"Chemistry": {
|
||||
"tp": 15,
|
||||
"fp": 1,
|
||||
"fn": 0,
|
||||
"tn": 5,
|
||||
"precision": 0.9375,
|
||||
"recall": 1.0,
|
||||
"f1": 0.967741935483871
|
||||
},
|
||||
"Engineering": {
|
||||
"tp": 6,
|
||||
"fp": 2,
|
||||
"fn": 4,
|
||||
"tn": 0,
|
||||
"precision": 0.75,
|
||||
"recall": 0.6,
|
||||
"f1": 0.6666666666666665
|
||||
},
|
||||
"Medicine / Health Sciences": {
|
||||
"tp": 11,
|
||||
"fp": 1,
|
||||
"fn": 9,
|
||||
"tn": 15,
|
||||
"precision": 0.9166666666666666,
|
||||
"recall": 0.55,
|
||||
"f1": 0.6874999999999999
|
||||
},
|
||||
"Physics": {
|
||||
"tp": 13,
|
||||
"fp": 0,
|
||||
"fn": 11,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.5416666666666666,
|
||||
"f1": 0.7027027027027027
|
||||
},
|
||||
"Other": {
|
||||
"tp": 0,
|
||||
"fp": 0,
|
||||
"fn": 12,
|
||||
"tn": 0,
|
||||
"precision": null,
|
||||
"recall": 0.0,
|
||||
"f1": null
|
||||
}
|
||||
},
|
||||
"semantic_thr_0.70": {
|
||||
"Biology / Biotechnology": {
|
||||
"tp": 7,
|
||||
"fp": 1,
|
||||
"fn": 1,
|
||||
"tn": 8,
|
||||
"precision": 0.875,
|
||||
"recall": 0.875,
|
||||
"f1": 0.875
|
||||
},
|
||||
"Chemistry": {
|
||||
"tp": 15,
|
||||
"fp": 1,
|
||||
"fn": 0,
|
||||
"tn": 5,
|
||||
"precision": 0.9375,
|
||||
"recall": 1.0,
|
||||
"f1": 0.967741935483871
|
||||
},
|
||||
"Engineering": {
|
||||
"tp": 6,
|
||||
"fp": 2,
|
||||
"fn": 4,
|
||||
"tn": 0,
|
||||
"precision": 0.75,
|
||||
"recall": 0.6,
|
||||
"f1": 0.6666666666666665
|
||||
},
|
||||
"Medicine / Health Sciences": {
|
||||
"tp": 11,
|
||||
"fp": 1,
|
||||
"fn": 9,
|
||||
"tn": 15,
|
||||
"precision": 0.9166666666666666,
|
||||
"recall": 0.55,
|
||||
"f1": 0.6874999999999999
|
||||
},
|
||||
"Physics": {
|
||||
"tp": 13,
|
||||
"fp": 0,
|
||||
"fn": 11,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.5416666666666666,
|
||||
"f1": 0.7027027027027027
|
||||
},
|
||||
"Other": {
|
||||
"tp": 0,
|
||||
"fp": 0,
|
||||
"fn": 12,
|
||||
"tn": 0,
|
||||
"precision": null,
|
||||
"recall": 0.0,
|
||||
"f1": null
|
||||
}
|
||||
},
|
||||
"semantic_thr_0.75": {
|
||||
"Biology / Biotechnology": {
|
||||
"tp": 7,
|
||||
"fp": 1,
|
||||
"fn": 1,
|
||||
"tn": 8,
|
||||
"precision": 0.875,
|
||||
"recall": 0.875,
|
||||
"f1": 0.875
|
||||
},
|
||||
"Chemistry": {
|
||||
"tp": 15,
|
||||
"fp": 1,
|
||||
"fn": 0,
|
||||
"tn": 5,
|
||||
"precision": 0.9375,
|
||||
"recall": 1.0,
|
||||
"f1": 0.967741935483871
|
||||
},
|
||||
"Engineering": {
|
||||
"tp": 6,
|
||||
"fp": 2,
|
||||
"fn": 4,
|
||||
"tn": 0,
|
||||
"precision": 0.75,
|
||||
"recall": 0.6,
|
||||
"f1": 0.6666666666666665
|
||||
},
|
||||
"Medicine / Health Sciences": {
|
||||
"tp": 11,
|
||||
"fp": 1,
|
||||
"fn": 9,
|
||||
"tn": 15,
|
||||
"precision": 0.9166666666666666,
|
||||
"recall": 0.55,
|
||||
"f1": 0.6874999999999999
|
||||
},
|
||||
"Physics": {
|
||||
"tp": 13,
|
||||
"fp": 0,
|
||||
"fn": 11,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.5416666666666666,
|
||||
"f1": 0.7027027027027027
|
||||
},
|
||||
"Other": {
|
||||
"tp": 0,
|
||||
"fp": 0,
|
||||
"fn": 12,
|
||||
"tn": 0,
|
||||
"precision": null,
|
||||
"recall": 0.0,
|
||||
"f1": null
|
||||
}
|
||||
},
|
||||
"semantic_thr_0.80": {
|
||||
"Biology / Biotechnology": {
|
||||
"tp": 7,
|
||||
"fp": 1,
|
||||
"fn": 1,
|
||||
"tn": 8,
|
||||
"precision": 0.875,
|
||||
"recall": 0.875,
|
||||
"f1": 0.875
|
||||
},
|
||||
"Chemistry": {
|
||||
"tp": 15,
|
||||
"fp": 1,
|
||||
"fn": 0,
|
||||
"tn": 5,
|
||||
"precision": 0.9375,
|
||||
"recall": 1.0,
|
||||
"f1": 0.967741935483871
|
||||
},
|
||||
"Engineering": {
|
||||
"tp": 6,
|
||||
"fp": 2,
|
||||
"fn": 4,
|
||||
"tn": 0,
|
||||
"precision": 0.75,
|
||||
"recall": 0.6,
|
||||
"f1": 0.6666666666666665
|
||||
},
|
||||
"Medicine / Health Sciences": {
|
||||
"tp": 11,
|
||||
"fp": 1,
|
||||
"fn": 9,
|
||||
"tn": 15,
|
||||
"precision": 0.9166666666666666,
|
||||
"recall": 0.55,
|
||||
"f1": 0.6874999999999999
|
||||
},
|
||||
"Physics": {
|
||||
"tp": 13,
|
||||
"fp": 0,
|
||||
"fn": 11,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.5416666666666666,
|
||||
"f1": 0.7027027027027027
|
||||
},
|
||||
"Other": {
|
||||
"tp": 0,
|
||||
"fp": 0,
|
||||
"fn": 12,
|
||||
"tn": 0,
|
||||
"precision": null,
|
||||
"recall": 0.0,
|
||||
"f1": null
|
||||
}
|
||||
}
|
||||
},
|
||||
"weigel_false_positives": [
|
||||
{
|
||||
"patent_id": "US11260242",
|
||||
"production_kept": true,
|
||||
"semantic_fallback_kept": true,
|
||||
"semantic_fallback_reason": "exact_topic_or_subfield_id_overlap",
|
||||
"topic_overlap": true,
|
||||
"domain_conflict": true
|
||||
},
|
||||
{
|
||||
"patent_id": "US10391331",
|
||||
"production_kept": true,
|
||||
"semantic_fallback_kept": true,
|
||||
"semantic_fallback_reason": "exact_topic_or_subfield_id_overlap",
|
||||
"topic_overlap": true,
|
||||
"domain_conflict": true
|
||||
}
|
||||
],
|
||||
"biology_check": {
|
||||
"semantic_TP": 7,
|
||||
"semantic_FP": 1,
|
||||
"baseline_biology": {
|
||||
"tp": 7,
|
||||
"fp": 0,
|
||||
"fn": 1,
|
||||
"tn": 9,
|
||||
"precision": 1.0,
|
||||
"recall": 0.875,
|
||||
"f1": 0.9333333333333333
|
||||
}
|
||||
},
|
||||
"recommendation": {
|
||||
"recommended_threshold": 0.75,
|
||||
"verdict": "weiter untersuchen",
|
||||
"reason": "Threshold 0.75 improves recall but increases FP risk (FP 2 → 5). Use only with additional identity guards.",
|
||||
"checks": [
|
||||
"Biology FP semantic@default=1 (want 0); TP=7",
|
||||
"Medicine recall 0.5 → 0.55",
|
||||
"Physics recall 0.20833333333333334 → 0.5416666666666666",
|
||||
"Chemistry recall 0.4666666666666667 → 1.0",
|
||||
"Weigel production FPs still kept by semantic fallback: 2/2 (exact topic overlap precedes fallback)"
|
||||
],
|
||||
"pooled_at_recommended": {
|
||||
"tp": 52,
|
||||
"fp": 5,
|
||||
"fn": 37,
|
||||
"tn": 37,
|
||||
"precision": 0.9122807017543859,
|
||||
"recall": 0.5842696629213483,
|
||||
"f1": 0.7123287671232877
|
||||
}
|
||||
},
|
||||
"notes": [
|
||||
"Exact topic/subfield ID overlap still keeps candidates before semantic fallback.",
|
||||
"No new Elasticsearch index; diagnosis enrichments only.",
|
||||
"Production filter code and gold labels were not modified."
|
||||
]
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
variant,field,TP,FP,FN,TN,precision,recall,f1
|
||||
production_baseline,Biology / Biotechnology,7,0,1,9,1.0,0.875,0.9333333333333333
|
||||
production_baseline,Chemistry,7,0,8,6,1.0,0.4666666666666667,0.6363636363636364
|
||||
production_baseline,Engineering,0,2,10,0,0.0,0.0,
|
||||
production_baseline,Medicine / Health Sciences,10,0,10,16,1.0,0.5,0.6666666666666666
|
||||
production_baseline,Physics,5,0,19,9,1.0,0.20833333333333334,0.3448275862068966
|
||||
production_baseline,Other,3,0,9,0,1.0,0.25,0.4
|
||||
semantic_topic_fallback_v1,Biology / Biotechnology,7,1,1,8,0.875,0.875,0.875
|
||||
semantic_topic_fallback_v1,Chemistry,15,1,0,5,0.9375,1.0,0.967741935483871
|
||||
semantic_topic_fallback_v1,Engineering,6,2,4,0,0.75,0.6,0.6666666666666665
|
||||
semantic_topic_fallback_v1,Medicine / Health Sciences,11,1,9,15,0.9166666666666666,0.55,0.6874999999999999
|
||||
semantic_topic_fallback_v1,Physics,13,0,11,9,1.0,0.5416666666666666,0.7027027027027027
|
||||
semantic_topic_fallback_v1,Other,0,0,12,0,,0.0,
|
||||
semantic_thr_0.70,Biology / Biotechnology,7,1,1,8,0.875,0.875,0.875
|
||||
semantic_thr_0.70,Chemistry,15,1,0,5,0.9375,1.0,0.967741935483871
|
||||
semantic_thr_0.70,Engineering,6,2,4,0,0.75,0.6,0.6666666666666665
|
||||
semantic_thr_0.70,Medicine / Health Sciences,11,1,9,15,0.9166666666666666,0.55,0.6874999999999999
|
||||
semantic_thr_0.70,Physics,13,0,11,9,1.0,0.5416666666666666,0.7027027027027027
|
||||
semantic_thr_0.70,Other,0,0,12,0,,0.0,
|
||||
semantic_thr_0.75,Biology / Biotechnology,7,1,1,8,0.875,0.875,0.875
|
||||
semantic_thr_0.75,Chemistry,15,1,0,5,0.9375,1.0,0.967741935483871
|
||||
semantic_thr_0.75,Engineering,6,2,4,0,0.75,0.6,0.6666666666666665
|
||||
semantic_thr_0.75,Medicine / Health Sciences,11,1,9,15,0.9166666666666666,0.55,0.6874999999999999
|
||||
semantic_thr_0.75,Physics,13,0,11,9,1.0,0.5416666666666666,0.7027027027027027
|
||||
semantic_thr_0.75,Other,0,0,12,0,,0.0,
|
||||
semantic_thr_0.80,Biology / Biotechnology,7,1,1,8,0.875,0.875,0.875
|
||||
semantic_thr_0.80,Chemistry,15,1,0,5,0.9375,1.0,0.967741935483871
|
||||
semantic_thr_0.80,Engineering,6,2,4,0,0.75,0.6,0.6666666666666665
|
||||
semantic_thr_0.80,Medicine / Health Sciences,11,1,9,15,0.9166666666666666,0.55,0.6874999999999999
|
||||
semantic_thr_0.80,Physics,13,0,11,9,1.0,0.5416666666666666,0.7027027027027027
|
||||
semantic_thr_0.80,Other,0,0,12,0,,0.0,
|
||||
|
+4
@@ -0,0 +1,4 @@
|
||||
threshold,TP,FP,FN,TN,precision,recall,f1
|
||||
0.7,52,5,37,37,0.9122807017543859,0.5842696629213483,0.7123287671232877
|
||||
0.75,52,5,37,37,0.9122807017543859,0.5842696629213483,0.7123287671232877
|
||||
0.8,52,5,37,37,0.9122807017543859,0.5842696629213483,0.7123287671232877
|
||||
|
+95
@@ -0,0 +1,95 @@
|
||||
# Field-Error-Analyse der Autor-Patent-Suche
|
||||
|
||||
- Grundlage: drei feste Evaluationsexperimente, 131 Kandidaten
|
||||
- Gold-Labels, Production-Entscheidungen und Production-Code: **unverändert**
|
||||
|
||||
Diese Analyse erklärt, warum der Recall der Autor-Patent-Suche je nach Forschungsbereich unterschiedlich ausfällt.
|
||||
|
||||
Rohdaten in diesem Ordner: `field_error_analysis.json`, `field_metrics.csv`, `aggregate_result.json` und die CSV-Tabellen je Field.
|
||||
|
||||
---
|
||||
|
||||
## 1. Überblick nach Forschungsbereich
|
||||
|
||||
| Forschungsbereich | Precision | Recall | TP | FP | FN | TN |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| Biology / Biotechnology | 1,000 | 0,875 | 7 | 0 | 1 | 9 |
|
||||
| Chemistry | 1,000 | 0,467 | 7 | 0 | 8 | 6 |
|
||||
| Medicine / Health Sciences | 1,000 | 0,500 | 10 | 0 | 10 | 16 |
|
||||
| Physics | 1,000 | 0,208 | 5 | 0 | 19 | 9 |
|
||||
| Engineering | 0,000 | 0,000 | 0 | 2 | 10 | 0 |
|
||||
|
||||
| Field | Recall | Hauptursache |
|
||||
| --- | ---: | --- |
|
||||
| Biology | 0,875 | Topic-Mapping passt gut |
|
||||
| Chemistry | 0,467 | Topic-Miss / fehlende Identitätsevidenz |
|
||||
| Medicine | 0,500 | Medicine → Biology/Biotech |
|
||||
| Physics | 0,208 | Cross-Field-Mappings |
|
||||
| Engineering | 0,000 | Field-Fehler, Homonym, Mappingfehler |
|
||||
|
||||
Die aktuelle Production-Logik ist sehr konservativ:
|
||||
|
||||
- In mehreren Bereichen ist die Precision sehr hoch.
|
||||
- Gleichzeitig werden viele echte Patente nicht erkannt.
|
||||
- Der schlechte Recall hat **nicht in allen Fields dieselbe Ursache**.
|
||||
|
||||
---
|
||||
|
||||
## 2. Warum Biology / Biotechnology gut funktioniert
|
||||
|
||||
Biology / Biotechnology ist der stärkste Bereich der Evaluation.
|
||||
|
||||
Von acht echten Kandidaten wurden sieben erkannt. Alle sieben True Positives besitzen einen exakten Topic-ID- oder Subfield-ID-Overlap zwischen Patent und Autorenprofil.
|
||||
|
||||
Typische IPC-/CPC-Codes wie `C12*`, `A61*` und diagnostische oder biotechnologische Klassifikationen werden häufig auf OpenAlex-Topics gemappt, die bereits im Autorenprofil vorkommen.
|
||||
|
||||
### Schlussfolgerung
|
||||
|
||||
Biology zeigt, dass die bestehende Logik gut funktioniert, wenn das IPC/CPC→OpenAlex-Mapping fachlich korrekt ist und exakte Topic- oder Subfield-IDs übereinstimmen. Dieser Bereich sollte bei späteren Änderungen **nicht verschlechtert** werden.
|
||||
|
||||
---
|
||||
|
||||
## 3. Warum Medicine einen niedrigen Recall hat
|
||||
|
||||
Topic-only erkennt im Bereich Medicine nur 2 von 20 echten Kandidaten. Production rettet weitere echte Patente über Identitätsevidenz (`last_known_institution`, `historical_institution`, Ko-Erfinder). Trotzdem bleiben zehn echte Patente unerkannt.
|
||||
|
||||
Viele medizinische Patente erhalten OpenAlex-Topics aus Biology / Biotechnology oder angrenzenden biomedizinischen Fields, während das Autorenprofil Medicine-spezifische Topic-IDs besitzt. Ohne exakte ID-Übereinstimmung und ohne starke Identitätsevidenz wird abgelehnt.
|
||||
|
||||
Zusätzlich fehlen bei mehreren False Negatives Assignee-Daten, und Institutionsnamen (z. B. DKFZ / German Cancer Research Center) werden nicht zuverlässig als identisch erkannt.
|
||||
|
||||
---
|
||||
|
||||
## 4. Warum Physics besonders viele echte Patente verliert
|
||||
|
||||
Von 24 echten Kandidaten erkennt Production nur fünf.
|
||||
|
||||
Viele Physikpatente liegen in angewandten oder angrenzenden Bereichen (Messtechnik, Materials, Engineering, Chemistry, Biology). Die gemappten Patent-Topics verlassen häufig das OpenAlex-Field Physics. Reine Field- oder Domain-Nähe zählt nicht.
|
||||
|
||||
---
|
||||
|
||||
## 5. Warum Chemistry besser als Topic-only, aber noch nicht gut funktioniert
|
||||
|
||||
Topic-only erkennt drei echte Chemistry-Patente, Production sieben. Die vier zusätzlichen Treffer kommen über Institutions- und Ko-Erfinderevidenz. Die verbleibenden False Negatives haben keinen exakten Topic-Match und keine ausreichende Identitätsevidenz.
|
||||
|
||||
---
|
||||
|
||||
## 6. Warum Engineering in diesem Sample fehlschlägt
|
||||
|
||||
Engineering ist ein **kontaminiertes Sample**, kein reines Mapping-Problem.
|
||||
|
||||
- **Hendrik Milting** ist historisch als Engineering gelabelt, das OpenAlex-Profil ist Medicine / Health Sciences (Kardiologie). Die Gold-positiven Patente sind kardiale Biomarker (`C12Q` / `G01N`), kein Engineering. Root cause: fehlerhafte Field-Zuordnung.
|
||||
- **Robert Weigel** ist ein RF-Ingenieur. Echte RF-Patente (`H03C`, `H04B`) fallen durch fehlenden exakten Topic-/Subfield-Match. `H04B 7/216` wird fälschlich auf Blood-transfusion-Topics gemappt (transmission ↔ transfusion).
|
||||
- Die Production-False-Positives `US11260242` / `US10391331` gehören zu einem medizinischen Namensvetter (`Robert B. Weigel`, A61N), nicht zum RF-Autor. Homonym / Namenskollision.
|
||||
|
||||
Details: `engineering_candidate_analysis.csv`.
|
||||
|
||||
---
|
||||
|
||||
## 7. Allgemeine Hauptursachen des niedrigen Recalls
|
||||
|
||||
1. Zu strikter Topic-ID-Match bei fachlicher Nähe
|
||||
2. Fehlerhafte oder zu grobe IPC/CPC→Topic-Mappings
|
||||
3. Fehlende historische Identitätsevidenz (Institution, Assignee, Ko-Erfinder, Familie)
|
||||
4. Historische Topic-Verschiebung im Autorenprofil
|
||||
5. Homonyme und Namenskollisionen
|
||||
6. Fehlerhafte Field-Zuordnung in der Evaluation
|
||||
+103
@@ -0,0 +1,103 @@
|
||||
# Aggregate field analysis
|
||||
|
||||
- Created: `20260803T140139Z`
|
||||
- Status: `completed`
|
||||
- Experiments: experiment_1, experiment_2, experiment_3
|
||||
- Authors: 18
|
||||
- Authors with primary_field_id: 0
|
||||
- Authors without primary_field_id: 18
|
||||
- Fallback evaluation_field_original: 18
|
||||
- Fallback candidate evaluation_field: 0
|
||||
- Authors without usable field: 0
|
||||
|
||||
## Candidate-level pooled micro metrics
|
||||
|
||||
| Variant | P | R | F1 | TP | FP | FN | TN |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| name_matching | 0.679389 | 1.000000 | 0.809091 | 89 | 42 | 0 | 0 |
|
||||
| topic_only | 0.882353 | 0.168539 | 0.283019 | 15 | 2 | 74 | 40 |
|
||||
| production | 0.941176 | 0.359551 | 0.520325 | 32 | 2 | 57 | 40 |
|
||||
|
||||
## Family-level pooled micro metrics
|
||||
|
||||
| Variant | P | R | F1 | TP | FP | FN | TN |
|
||||
| --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| name_matching | 0.656863 | 1.000000 | 0.792899 | 67 | 35 | 0 | 0 |
|
||||
| topic_only | 0.866667 | 0.194030 | 0.317073 | 13 | 2 | 54 | 33 |
|
||||
| production | 0.937500 | 0.447761 | 0.606061 | 30 | 2 | 37 | 33 |
|
||||
|
||||
## Mean across experiments (candidate-level)
|
||||
|
||||
- **name_matching**: mean P=0.682400 (n=3), mean R=1.000000 (n=3), mean F1=0.808900 (n=3)
|
||||
- **topic_only**: mean P=0.833300 (n=2), mean R=0.159000 (n=3), mean F1=0.366900 (n=2)
|
||||
- **production**: mean P=0.916700 (n=3), mean R=0.356800 (n=3), mean F1=0.507700 (n=3)
|
||||
|
||||
## Field distribution
|
||||
|
||||
| Field | Authors | Candidates | Positive | Negative | Source | ID missing |
|
||||
| --- | ---: | ---: | ---: | ---: | --- | --- |
|
||||
| Biology / Biotechnology | 2 | 17 | 8 | 9 | historical_evaluation_field | True |
|
||||
| Chemistry | 3 | 21 | 15 | 6 | historical_evaluation_field | True |
|
||||
| Engineering | 2 | 12 | 10 | 2 | historical_evaluation_field | True |
|
||||
| Medicine / Health Sciences | 4 | 36 | 20 | 16 | historical_evaluation_field | True |
|
||||
| Other | 2 | 12 | 12 | 0 | historical_evaluation_field | True |
|
||||
| Physics | 5 | 33 | 24 | 9 | historical_evaluation_field | True |
|
||||
|
||||
## Per-field metrics (candidate-level)
|
||||
|
||||
| Field | Authors | Candidates | Variant | TP | FP | TN | FN | P | R | F1 |
|
||||
| --- | ---: | ---: | --- | ---: | ---: | ---: | ---: | ---: | ---: | ---: |
|
||||
| Biology / Biotechnology | 2 | 17 | name_matching | 8 | 9 | 0 | 0 | 0.470588 | 1.000000 | 0.640000 |
|
||||
| Biology / Biotechnology | 2 | 17 | topic_only | 7 | 0 | 9 | 1 | 1.000000 | 0.875000 | 0.933333 |
|
||||
| Biology / Biotechnology | 2 | 17 | production | 7 | 0 | 9 | 1 | 1.000000 | 0.875000 | 0.933333 |
|
||||
| Chemistry | 3 | 21 | name_matching | 15 | 6 | 0 | 0 | 0.714286 | 1.000000 | 0.833333 |
|
||||
| Chemistry | 3 | 21 | topic_only | 3 | 0 | 6 | 12 | 1.000000 | 0.200000 | 0.333333 |
|
||||
| Chemistry | 3 | 21 | production | 7 | 0 | 6 | 8 | 1.000000 | 0.466667 | 0.636364 |
|
||||
| Engineering | 2 | 12 | name_matching | 10 | 2 | 0 | 0 | 0.833333 | 1.000000 | 0.909091 |
|
||||
| Engineering | 2 | 12 | topic_only | 0 | 2 | 0 | 10 | 0.000000 | 0.000000 | — |
|
||||
| Engineering | 2 | 12 | production | 0 | 2 | 0 | 10 | 0.000000 | 0.000000 | — |
|
||||
| Medicine / Health Sciences | 4 | 36 | name_matching | 20 | 16 | 0 | 0 | 0.555556 | 1.000000 | 0.714286 |
|
||||
| Medicine / Health Sciences | 4 | 36 | topic_only | 2 | 0 | 16 | 18 | 1.000000 | 0.100000 | 0.181818 |
|
||||
| Medicine / Health Sciences | 4 | 36 | production | 10 | 0 | 16 | 10 | 1.000000 | 0.500000 | 0.666667 |
|
||||
| Other | 2 | 12 | name_matching | 12 | 0 | 0 | 0 | 1.000000 | 1.000000 | 1.000000 |
|
||||
| Other | 2 | 12 | topic_only | 0 | 0 | 0 | 12 | — | 0.000000 | — |
|
||||
| Other | 2 | 12 | production | 3 | 0 | 0 | 9 | 1.000000 | 0.250000 | 0.400000 |
|
||||
| Physics | 5 | 33 | name_matching | 24 | 9 | 0 | 0 | 0.727273 | 1.000000 | 0.842105 |
|
||||
| Physics | 5 | 33 | topic_only | 3 | 0 | 9 | 21 | 1.000000 | 0.125000 | 0.222222 |
|
||||
| Physics | 5 | 33 | production | 5 | 0 | 9 | 19 | 1.000000 | 0.208333 | 0.344828 |
|
||||
|
||||
## Authors without primary_field_id
|
||||
|
||||
| Author | Track | Field | Fallback |
|
||||
| --- | --- | --- | --- |
|
||||
| A5001167896 | experiment_1 | Medicine / Health Sciences | evaluation_field_original |
|
||||
| A5005196385 | experiment_3 | Physics | evaluation_field_original |
|
||||
| A5008182166 | experiment_2 | Physics | evaluation_field_original |
|
||||
| A5011059806 | experiment_1 | Physics | evaluation_field_original |
|
||||
| A5023752156 | experiment_1 | Other | evaluation_field_original |
|
||||
| A5027988292 | experiment_2 | Biology / Biotechnology | evaluation_field_original |
|
||||
| A5031103932 | experiment_2 | Chemistry | evaluation_field_original |
|
||||
| A5034365278 | experiment_3 | Medicine / Health Sciences | evaluation_field_original |
|
||||
| A5035127271 | experiment_2 | Other | evaluation_field_original |
|
||||
| A5037443412 | experiment_1 | Physics | evaluation_field_original |
|
||||
| A5054895539 | experiment_2 | Engineering | evaluation_field_original |
|
||||
| A5058282825 | experiment_3 | Chemistry | evaluation_field_original |
|
||||
| A5070760948 | experiment_3 | Engineering | evaluation_field_original |
|
||||
| A5073666637 | experiment_1 | Biology / Biotechnology | evaluation_field_original |
|
||||
| A5086393240 | experiment_1 | Medicine / Health Sciences | evaluation_field_original |
|
||||
| A5109170577 | experiment_2 | Medicine / Health Sciences | evaluation_field_original |
|
||||
| A5110282865 | experiment_3 | Physics | evaluation_field_original |
|
||||
| A5113541511 | experiment_3 | Chemistry | evaluation_field_original |
|
||||
|
||||
## Name-matching interpretation
|
||||
|
||||
Recall for name_matching is 1.0 on the complete frozen name pool because every candidate is kept. This is not evidence of reliable attribution; use precision instead.
|
||||
|
||||
## Caveat
|
||||
|
||||
Field results with one author, <10 labeled candidates, or single-class labels are descriptive only and not stably generalizable. Missing OpenAlex `primary_field_id` does not invalidate historical field names (`field_metadata_source=historical_evaluation_field`).
|
||||
|
||||
- Live search performed: no
|
||||
- Gold labels modified: no
|
||||
- Filter decisions recomputed: no
|
||||
|
||||
+1173
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user