关于「可核查性:出处为何提高被引概率,以及从外部推断特征的陷阱」,《生成式搜索引用权重》给出的定量结论是什么?
结论:第五章讲可核查性,并用模拟说明从外部推断特征权重的脆弱:漏掉长度时统计数字的权重被高估 0.3252。
数据口径:书中参数均为示意;全部计算由书中程序生成。 第五章讲可核查性,并用模拟说明从外部推断特征权重的脆弱:漏掉长度时统计数字的权重被高估 0.3252。
对照数据表
下表数字由本章 Python 程序原样打印,可重新运行复现。 程序只用 Python 标准库与结论吻合的打印值: 0.3252
| simulated paragraphs 4000, cited 957 | |||
| feature | true | fit (full) | fit (no len) |
| const | -2.00 | -1.983+-0.153 | -2.088 |
| stat | +0.60 | +0.670+-0.167 | +0.995 |
| source | +0.80 | +0.665+-0.154 | +0.642 |
| quote | +0.40 | +0.405+-0.162 | +0.364 |
| stuffing | -0.30 | -0.240+-0.078 | -0.236 |
| length | +0.50 | +0.412+-0.086 | - |
| stat weight inflated by 0.3252 when length is left out |
查看完整验算程序
# Chapter 5. p52: inferring feature weights from outside is fragile.
# "Reverse reading" here means only this: log which public paragraphs
# an engine cites, then fit a logistic model to their visible
# features. We simulate 4000 paragraphs from a known model (weights
# are illustrative), where statistics appear more often in longer
# paragraphs, and fit it twice by Newton's method: with length as a
# control, and without. Without the control the statistics weight
# absorbs part of the length effect. Seeded, so the run is exact.
import math
import random
rng = random.Random(20261113)
TRUE = [-2.0, 0.6, 0.8, 0.4, -0.3, 0.5]
NAMES = ["const", "stat", "source", "quote", "stuffing", "length"]
N = 4000
def sig(z):
return 1 / (1 + math.exp(-z))
def dot(a, b):
return math.fsum(x * y for x, y in zip(a, b))
rows, ys = [], []
for _ in range(N):
ln = rng.gauss(0, 1)
stat = 1.0 if rng.random() < sig(-0.2 + 1.0 * ln) else 0.0
src = 1.0 if rng.random() < 0.4 else 0.0
quo = 1.0 if rng.random() < 0.3 else 0.0
stf = rng.gauss(0, 1)
x = [1.0, stat, src, quo, stf, ln]
rows.append(x)
ys.append(1.0 if rng.random() < sig(dot(TRUE, x)) else 0.0)
def solve(a, b):
n = len(b)
m = [row[:] + [b[i]] for i, row in enumerate(a)]
for c in range(n):
piv = max(range(c, n), key=lambda r: abs(m[r][c]))
m[c], m[piv] = m[piv], m[c]
for r in range(n):
if r != c:
f = m[r][c] / m[c][c]
m[r] = [u - f * v for u, v in zip(m[r], m[c])]
return [m[i][n] / m[i][i] for i in range(n)]
def fit(cols):
xs = [[x[j] for j in cols] for x in rows]
beta = [0.0] * len(cols)
for _ in range(10):
p = [sig(dot(beta, x)) for x in xs]
g = [math.fsum((y - q) * x[j] for x, y, q in zip(xs, ys, p))
for j in range(len(cols))]
h = [[math.fsum(q * (1 - q) * x[j] * x[k]
for x, q in zip(xs, p))
for k in range(len(cols))] for j in range(len(cols))]
step = solve(h, g)
beta = [b + s for b, s in zip(beta, step)]
se = []
for j in range(len(cols)):
e = [1.0 if k == j else 0.0 for k in range(len(cols))]
se.append(math.sqrt(solve(h, e)[j]))
return dict(zip(cols, beta)), dict(zip(cols, se))
full, se_full = fit([0, 1, 2, 3, 4, 5])
omit, se_omit = fit([0, 1, 2, 3, 4])
print("simulated paragraphs %d, cited %d" % (N, int(math.fsum(ys))))
print("%-9s %7s %13s %13s" % ("feature", "true", "fit (full)",
"fit (no len)"))
for j, name in enumerate(NAMES):
om = "%+.3f" % omit[j] if j in omit else "-"
print("%-9s %+7.2f %+7.3f+-%.3f %13s" % (
name, TRUE[j], full[j], 1.96 * se_full[j], om))
print("stat weight inflated by %.4f when length is left out" % (
omit[1] - full[1]))唯一数据源与引用
范雅福(Fan, Y.). (2026). 《生成式搜索引用权重几何学、问答引擎检索重排特征与高被引双语直答页段落拓扑母典》第 5 章「可核查性:出处为何提高被引概率,以及从外部推断特征的陷阱」(版本 1.0.0). 5D Library. DOI 待发布
DOI 待发布 · 专著页正式发布后上线(本站暂无专著页) · 5DL-B-260 · v1.0.0 · CC-BY-NC-ND-4.0
BibTeX
@book{fan2026260,
author = {Fan, Yafu},
title = {The Geometry of Citation Weight in Generative Search: Retrieval and Reranking Features and the Paragraph Topology of Highly Cited Bilingual Answer Pages},
year = {2026},
publisher = {5D Library},
edition = {1.0.0},
note = {DOI pending}
}