Gradient fits on small-magnitude data return their start point as converged: the first-order stopping test is absolute, so it passes where the objective itself is tiny

Đang mở
#1,058 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
55/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start with the implementations of the gntr, trf, and lbfgs stopping criteria and the multiple-shooting tolerances ms_final_grad_tol and ms_optimality_tol. Reproduce the small-magnitude example, including A0 = 3e-5, and inspect the reported objective, gradient tolerance, and start-point parameters. Done means the affected fits no longer report convergence merely because an absolute gradient test passes, with regression coverage for small data and the existing larger-data behavior preserved.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

What you see. A gradient fit (job_type = gntr, trf or lbfgs) on data whose values are small, such as molar concentrations, can return its start point unchanged and report "Stop criterion satisfied" and "Fitting complete". The data say otherwise, and nothing in the output says the fit never moved.

Example. The model is A() -> B() at k1 and B() -> 0 at k2, with A0 = 3e-5. It is fitted to exact Btot data at t = 1..10, generated at k1 = 0.5 and k2 = 0.2, so the optimum is objective 0 there. The config uses objective = sos, loguniform_var k1 and k2 in [0.01, 10], and population_size = 1, so the fit starts at the box centre, k1 = k2 = 0.316.

job_type reported best k1 k2
gntr 8.217e-11 0.316228 (start) 0.316228 (start)
trf 8.217e-11 0.316228 (start) 0.316228 (start)
lbfgs 8.217e-11 0.316228 (start) 0.316228 (start)

Each run prints Stop criterion satisfied with objective function value of 8.217227743771922e-11.

Why. The first-order stopping tests (gntr_grad_tol, trf_grad_tol and their peers, default 1e-8) are absolute. With data of order 1e-5 the objective is of order 1e-10, and so is its gradient at a point far from the optimum. The test passes at the start, and the runner returns it as "gradient already flat at the start point". The same gntr job with A0 = 0.003 (data 100 times larger) moves from the same start to k1 = 0.49976, k2 = 0.20005 (objective 4.7e-13). The same holds for multiple shooting (ms_final_grad_tol, and ms_optimality_tol on its segmented rungs; see #914).

Possible fixes. Make the gradient test relative to the objective's own scale, or to its value at the start. Or refuse to call an unmoved start converged when the objective there is far from what the data allow. At the least, say in the result that the fit stopped at its start point.

Found during independent review of the multiple-shooting batch (#911–#915, #959, #1038, #1049).

Ngôn ngữ chính
Python
Star
26
Fork
25
Merge trung bình
4 giờ 25 phút
Pull request đã merge (30 ngày)
9

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của lanl/PyBNF

Tất cả issue của lanl/PyBNF

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.