Efficient & Correct Predictive Equivalence for Decision Trees
Marques-Silva, Ignatiev
The Rashomon set of decision trees (DTs) finds importance uses. Recent work showed that DTs computing the same classification function, i.e. predictive equivalent DTs, can represent a significant fraction of the Rashomon set. Such redundancy is undesirable. For example, feature importance based on the Rashomon set becomes inaccurate due the existence of predictive equivalent DTs, i.e. DTs with the same prediction for every possible input. In recent work, McTavish et al. proposed solutions for several computational problems related with DTs, including that of deciding predictive equivalent DTs. The approach of McTavish et al. consists of applying the well-known method of Quine-McCluskey (QM) for obtaining minimum-size DNF (disjunctive normal form) representations of DTs, which are then used for comparing DTs for predictive equivalence. Furthermore, the minimum-size DNF representation was also applied to computing explanations for the predictions made by DTs, and to finding predictions in the presence of missing data. However, the problem of formula minimization is hard for the second level of the polynomial hierarchy, and the QM method may exhibit worst-case exponential running time and space. This paper first demonstrates that there exist decision trees that trigger the worst-case exponential running time and space of the QM method. Second, the paper shows that the QM method may incorrectly decide predictive equivalence, if two key constraints are not respected, and one may be difficult to formally guarantee. Third, the paper shows that any of the problems to which the smallest DNF representation has been applied to can be solved in polynomial time, in the size of the DT. The experiments confirm that, for DTs for which the worst-case of the QM method is triggered, the algorithms proposed in this paper are orders of magnitude faster than the ones proposed by McTavish et al.
تتمتع مجموعات Rashomon لأشجار القرار بقيمة تطبيقية مهمة. أظهرت الأبحاث الحديثة أن أشجار القرار التي تحسب نفس دالة التصنيف (أي أشجار القرار المتكافئة تنبؤياً) قد تشكل جزءاً كبيراً من مجموعة Rashomon. هذا التكرار غير مرغوب فيه، على سبيل المثال، أهمية الميزات المستندة إلى مجموعة Rashomon تصبح غير دقيقة بسبب وجود أشجار القرار المتكافئة تنبؤياً. اقترح McTavish وآخرون مؤخراً حلاً لحل المشاكل الحسابية المتعلقة بأشجار القرار، بما في ذلك تحديد أشجار القرار المتكافئة تنبؤياً. تستخدم طريقتهم طريقة Quine-McCluskey (QM) الشهيرة للحصول على تمثيل DNF الأدنى لشجرة القرار، والذي يُستخدم بعد ذلك لمقارنة التكافؤ التنبؤي لأشجار القرار. ومع ذلك، فإن مشكلة تقليل الصيغة صعبة على الطبقة الثانية من التسلسل الهرمي متعدد الحدود، وقد تُظهر طريقة QM تعقيداً زمنياً ومكانياً أسياً في أسوأ الحالات. تثبت هذه الورقة أولاً وجود أشجار قرار تُثير التعقيد الأسي الأسوأ لطريقة QM، وتوضح ثانياً أن طريقة QM قد تحكم بشكل خاطئ على التكافؤ التنبؤي إذا لم تُستوفَ قيدان رئيسيان، وأخيراً تثبت أن جميع المشاكل التي تطبق تمثيل DNF الأدنى يمكن حلها في الوقت متعدد الحدود لحجم شجرة القرار.
المشكلة الأساسية التي تعالجها هذه الورقة هي كفاءة وصحة تحديد التكافؤ التنبؤي لأشجار القرار. أشجار القرار المتكافئة تنبؤياً هي أشجار قرار مختلفة تنتج نفس نتائج التنبؤ لأي إدخال.
تحسين مجموعة Rashomon: في التعلم الآلي، تحتوي مجموعة Rashomon على نماذج متعددة بأداء متقارب. أشجار القرار المتكافئة تنبؤياً تسبب تكراراً في هذه المجموعة، مما يؤثر على دقة تقييم أهمية الميزات.
متطلبات القابلية للتفسير: تُعتبر أشجار القرار على نطاق واسع نماذج قابلة للتفسير، لكن حتى أشجار القرار المثلى تحتاج إلى تفسير رسمي، خاصة في تطبيقات المخاطر العالية.
الكفاءة الحسابية: تواجه الطرق الحالية اختناقات حسابية خطيرة عند التعامل مع أشجار القرار الكبيرة.
تقترح الورقة خوارزمية وقت متعدد الحدود بناءً على WAXp:
الخوارزمية 1: فحص اتساق المسار
def ConsistentPath(A, P, T):
# فحص اتساق التعيين الجزئي A مع مسار الشجرة P
for each feature i:
combine literals from A and P for feature i
if inconsistent: return False
return True
الخوارزمية 2: تحديد WAXp
def IsWAXp(A, c, T):
# تحديد ما إذا كان التعيين الجزئي A هو WAXp للفئة c
for each path P in T:
if Class(P) != c and ConsistentPath(A, P, T):
return False # A متسق مع مسار فئة أخرى
return True
def PredictivelyEquivalent(T1, T2):
for P1 in Paths(T1):
c1 = Class(P1)
A1 = Literals(P1) # إنشاء تعيين جزئي
for P2 in Paths(T2):
c2 = Class(P2)
if c1 != c2 and ConsistentPath(A1, P2, T2):
return False # اكتشاف دليل عدم التكافؤ
return True # لا يمكن إثبات عدم التكافؤ، لذلك متكافئ
تأكيد النمو الأسي: يزداد حجم BCF₁(T) بشكل أسي مع r، مما يتحقق من التحليل النظري
فجوة الأداء الضخمة: بالنسبة لحالة r=200، تحتاج الخوارزمية الجديدة فقط إلى بضع ثوانٍ لمعالجة شجرة قرار بـ 1203 عقدة، بينما تتجاوز طريقة QM المهلة الزمنية عند 57 عقدة
التحقق من الجدوى العملية: يمكن للخوارزمية الجديدة معالجة أشجار القرار الكبيرة التي قد تظهر في التطبيقات الفعلية
تحسين أشجار القرار: Bertsimas & Dunn (2017)، Hu وآخرون (2019)، Demirovic وآخرون (2022)
التقييم الشامل: هذه ورقة عالية الجودة تجمع بين النظرية والممارسة، لا تكشف فقط عن العيوب الأساسية في الطرق الموجودة بل توفر أيضاً حلاً عملياً. التحليل النظري للورقة صارم، والتحقق التجريبي كافٍ، وتتمتع بمساهمات مهمة في مجالات أشجار القرار والذكاء الاصطناعي القابل للتفسير.