Google AI researchers present a new method to train models, ‘DeepCTRL’

DeepCTRL is now being evaluated on machine learning use cases in physics and healthcare, both of which rely heavily on rules.

Deep neural networks (DNNs) provide increasingly accurate outputs as the volume and variety of their training data increases. While investing in high-quality, large-scale labelled datasets are one strategy to improve models, and another is to apply “rules” – reasoning heuristics, equations, associative logic, or limitations. Consider the classic physics problem of forecasting the future state of a double pendulum system using a model. While the model may learn to predict the system’s total energy at a given point in time only from empirical data, it will often overestimate the energy unless given an equation that incorporates known physical constraints, such as energy conservation. The model can’t represent such well-established physical principles on its own. How could such rules be taught so that DNNs gain the necessary data rather than simply learn from it?

What is DeepCTRL 

Google Cloud AI researchers have offered a unique deep learning training approach that incorporates rules so that the strength of the rules may be controlled at inference. DeepCTRL (Deep Neural Networks with Controllable Rule Representations) combines a rule encoder and a rule-based objective into the model, allowing for a shared representation for decision-making. Data type and model architecture are unimportant to DeepCTRL. 

It can be used with any input/output rule. The key feature of DeepCTRL is that it does not require retraining to alter rule strength – the user may adjust it at inference based on the desired accuracy vs rule verification ratio. 

Advantages of DeepCTRL

The advantages of learning through rules are numerous. For starters, rules can provide additional information in circumstances where data oversight is limited, boosting test accuracy. Second, the rules can help DNNs gain more trust and reliability. The fact that DNNs are ‘black-box’ is a key roadblock to their widespread adoption. Users’ trust is often eroded due to a lack of comprehension of the reasons behind their reasoning and discrepancies of their outputs with human judgement. Inconsistencies can be minimised, and users’ confidence can be improved by implementing rules. For example, if a DNN for loan delinquency prediction can absorb all of a bank’s decision heuristics, the bank’s loan officers can have more confidence in the forecasts. 

Third, DNNs are sensitive to a variety of inputs that are incomprehensive to humans. The impact of these modifications can be reduced using rules since the model search space is confined further to reduce underspecification.

Previous research

Various ways for incorporating ‘rules’ into deep learning, taking into account existing knowledge in a wide range of applications, have been investigated. One method for injecting rules into forecasts is posterior regularisation. The teacher network is created by projecting the student network into a (logic) rule-regularised subspace and then updating the student network to balance between replicating the teacher’s output and anticipating the labels. Adversarial learning is used to penalise undesired biases, specifically for bias rules.

What makes DeepCTRL different? 

DeepCTRL proposes a framework for training with rules that take advantage of Lagrangian duality. Learning with constraints is investigated in using a formulation over the space of confusion matrices and optimisation solvers that work in a series of linear reduction steps. For variational autoencoders, KL divergence is used to inject constraints for regulating output diversity or disentangled latent factor representations. DeepCTRL differs from the others in that it injects the rules so that it provides controllability of rule strength at inference without retraining, which is possible by correct learning of rule representations in the data manifold. Beyond simply increasing rule verification for target precision, this opens up new possibilities.


DeepCTRL offers a number of possible uses in real-world deep learning deployments, including improving accuracy, increasing reliability, and improving human-AI interaction. On the other hand, the researchers have thought it pertinent to highlight that DeepCTRL’s capacity to effectively encode rules can have unintended consequences if it is used with wrong intentions to teach immoral prejudices.

Download our Mobile App

Abhishree Choudhary
Abhishree is a budding tech journalist with a UGD in Political Science. In her free time, Abhishree can be found watching French new wave classic films and playing with dogs.

Subscribe to our newsletter

Join our editors every weekday evening as they steer you through the most significant news of the day.
Your newsletter subscriptions are subject to AIM Privacy Policy and Terms and Conditions.

Our Upcoming Events

15th June | Bangalore

Future Ready | Lead the AI Era Summit

15th June | Online

Building LLM powered applications using LangChain

17th June | Online

Mastering LangChain: A Hands-on Workshop for Building Generative AI Applications

20th June | Bangalore

Women in Data Science (WiDS) by Intuit India

Jun 23, 2023 | Bangalore

MachineCon 2023 India

26th June | Online

Accelerating inference for every workload with TensorRT

MachineCon 2023 USA

Jul 21, 2023 | New York

Cypher 2023

Oct 11-13, 2023 | Bangalore

3 Ways to Join our Community

Telegram group

Discover special offers, top stories, upcoming events, and more.

Discord Server

Stay Connected with a larger ecosystem of data science and ML Professionals

Subscribe to our Daily newsletter

Get our daily awesome stories & videos in your inbox