Tiếp theoHướng dẫn tiếp theo
Giảm cân và điều chỉnh L2
Nguyên tắc cơ bản
HƯỚNG DẪN cơ bản
Regularization includes techniques that constrain fitting in an effort to improve performance on unseen data.
Nghe hướng dẫn nàyAI thuật lại · ~3 min
It can reduce overfitting, but the strength and method need evaluation because excessive constraints can also cause underfitting.
A flexible model can fit training-specific patterns that do not help on unseen data. Regularization changes the fitting process to discourage some of that behavior. One approach adds a penalty based on the model's weights to the prediction loss. An L2 penalty uses a sum of squared weights and encourages shrinkage. An L1 penalty uses absolute values and, in methods such as Lasso, can produce exact zero coefficients. These penalties are mathematical definitions, so their values can be calculated for a given weight vector. For weights minus two and one, the unscaled L1 penalty is three, while the sum-of-squares L2 penalty is five. The total objective may be written as prediction error plus lambda times the penalty. Lambda determines how much influence that penalty has; it does not erase the prediction-error term. Dropout takes a different approach by randomly zeroing activations during training rather than permanently deleting neurons. Early stopping limits training based on a monitored criterion, often validation performance. Data augmentation can also help constrain what patterns a model learns by supplying relevant variations. None of these methods guarantees better performance in every task. Too much regularization can prevent a model from fitting useful structure. Compare training and validation behavior, choose settings with appropriate validation data, and reserve a separate test set for final evaluation when possible. L2 penalties should also not be treated as universally identical to optimizer weight decay: the Decoupled Weight Decay paper explains important differences for adaptive optimizers.
Evaluating an L2 penalty when training an image classifier.
Using L1-penalized regression to select a sparse set of candidate features.
Applying dropout to randomly zero activations during neural-network training.
Selecting a stopping point using held-out validation performance.
Regularization research includes explicit penalties, augmentation, and the influence of optimization on which fitted solution is selected. Improvements should be assessed on relevant held-out data rather than assumed from the name of a technique. Method choice can vary by architecture and task, and a stronger constraint may help one setting while harming another. Clear reporting of the penalty, its strength, the stopping criterion, and the evaluation split makes results easier to interpret and compare.
Bản tin miễn phí
Ba câu chuyện AI đã được xác minh vào mỗi buổi sáng các ngày trong tuần, được viết bằng tiếng Anh đơn giản. Miễn phí mãi mãi, không có quảng cáo.
Một email mỗi ngày trong tuần. Hủy đăng ký trong một cú nhấp chuột. Chúng tôi không bao giờ bán hoặc chia sẻ địa chỉ của bạn.
Tự kiểm tra
Phản hồi tức thì về mọi câu trả lời và chứng chỉ có thể chia sẻ với ID có thể xác minh sau khi bạn vượt qua khóa học.
Hỗ trợ giáo dục AI miễn phí. AI Understanding là tổ chức phi lợi nhuận 501(c)(3) — không bao giờ có quảng cáo, không có tường phí. Hãy quyên góp
Regularization includes techniques that constrain fitting in an effort to improve performance on unseen data. It can reduce overfitting, but the strength and method need evaluation because excessive constraints can also cause underfitting.
Regularization aims to improve generalization, with an effect that needs validation rather than a guarantee.
L1 phạt giá trị tuyệt đối của các trọng số, có xu hướng đẩy các trọng số ít hữu ích hơn về chính xác bằng 0, thực hiện lựa chọn tính năng tự động. L2 thu nhỏ trọng lượng một cách trơn tru nhưng hiếm khi chính xác về 0.
Việc bỏ học ngẫu nhiên sẽ loại bỏ một phần kích hoạt trong mỗi bước huấn luyện, ngăn không cho các nơ-ron phụ thuộc quá nhiều vào nhau và xấp xỉ một tập hợp các mạng con.
Lambda kiểm soát cường độ chính quy hóa. Lambda lớn hơn mang lại nhiều ảnh hưởng hơn cho hình phạt, giảm trọng lượng mạnh mẽ hơn đối với các mô hình đơn giản hơn.
Việc dừng khi hiệu suất xác thực ngừng cải thiện sẽ ngăn mô hình tiếp tục chuyển sang chế độ ghi nhớ nhiễu, giống như các bộ điều chỉnh khác hạn chế độ phức tạp.
Tiếp tục học hỏi
Đã chọn thêm hướng dẫn cho chủ đề này
Tiếp theoHướng dẫn tiếp theo
Giảm cân và điều chỉnh L2
Nguyên tắc cơ bản