Section 7.6
Advice for Getting Unstuck
We conclude the lecture with some advice on what to do when you get stuck. Some problems are just inherently difficult. If you can’t solve a problem then try finding a simpler (related) problem and solve that first. This will give you experience and hints that may help to solve the original problem. You can also break a big problem down into subproblems, which by themselves are easier to solve.
It is a good idea to explore boundary conditions. This will give you a feel for the conditions under which your method works and when it fails. Extreme examples can give surprising results. What happens, for example, if you provide your classification algorithm with an all black image? What about all white?
Reading research papers (both old and new) and blog posts can be an inspiration for ideas. However, be skeptical about results reported in the literature that are not reproducible. If researchers have released code along with their papers, then try downloading and running their code. Similarly, talk to friends and colleagues. If there is nobody around you can try a technique from software development called rubber duck debugging. In this technique, you explain your problem to a rubber duck.1 Just verbalizing the problem is often enough for a solution to present itself. The method works surprisingly well.
A more principled approach is to introduce more information and slowly remove. In the extreme case you can “cheat” by introducing ground-truth information (e.g., features that encode the answer) into your algorithm. Of course, this is only for debugging and the ground-truth needs to be removed once you’ve determined a direction to proceed. It helps to print big warning messages when you’re doing this sort of experiment so as not to accidentally report tainted results. At the other extreme you can test on random features. If you’re algorithm performs better than random guessing, then there is probably something wrong.
Last, you can generate synthetic training data or test cases. This allows you create very large datasets and control the type of samples on which you train/test your model. It can also provide some intermediate ground-truth signals to diagnose what information is important to your algorithm if available (e.g., depth information). There is a very large body of work that looks at how to translate from algorithms trained on synthetic data to perform on real data, a problem known as sim-to-real.
- 1. The duck can be imaginary. No one will know.